Category "opencv"

Loading & Saving Bitmap Images In OpenCV (OpenCV Version = 3.1.0)

My problem is simple at least as I see, or how I feel about it. I tried to load and write Bitmap images with OpenCV in C++ and got sucessed in it, my problem is

Unable to read image text with python tesseract and OpenCV

I am trying read text from this using Python with OpenCV. However, it is not able to read it. import cv2 as cv import numpy as np from matplotlib import pyplot

How to obtain path from ZipFile objects that could be passed into OpenCV?

I would like to pass the image file into OpenCV to create a NumPy array without unzipping it. My code looks like this: zip_file = r'D:\Folder\small_img.zip' w

What and where am I going wrong in this code for pytorch based object detection?

I am using Yolov5 for this project Here is my code import numpy as np import cv2 import torch import torch.backends.cudnn as cudnn from models.experimental impo

How to send a cv::Mat to python over shared memory?

I have a c++ application that sends data through to a python function over shared memory. This works great using ctypes in Python such as doubles and floats. No

Opencv: Jetmap or colormap to grayscale, reverse applyColorMap()

To convert to colormap, I do import cv2 im = cv2.imread('test.jpg', cv2.IMREAD_GRAYSCALE) im_color = cv2.applyColorMap(im, cv2.COLORMAP_JET) cv2.imwrite('color

How to get the OpenCV image from Python and use it in C++ in pybind11?

I'm trying to figure out how it is possible to receive an OpenCV image from a Python in C++. I'm trying to send a callback function, from C++ to my Python modul

Python save numpy array set_printoptions

I have an image which I've read in with cv2 and python. - I think I'm going to 'store' the image as a nparray in my db for later processing, easy retrieval etc.

how does copyTo in opencv c++ works?

I have gone through the below snippet and was wondering how copyTo() in opencv function work. // Make a copy Mat faceWithGlassesNaive1 = faceImage.clone();

Detect digit on a live video camera using OpenCV and TensorFlow

I tried the code provided below to detect digit in the video camera and put a contour around it then classify it using the H5 model but it's giving me bad resul

how to connect to rtsp camera from docker container?

I'm trying to get stream from IP camera with the help of openCV. Non-docker app runs fine on my PC, but i need to run it in a docker container. Here is my Docke

Issues installing opencv 3.2 on python 3.6

How can i install OpenCV 3.2 in linux? Firstly, conda install -c menpo opencv3=3.2.0 installs but gives this import error: File "<stdin>", line 1, in &l

how to install opencv 4.x with python 3 and opencv 3.x with python 2.7 in Linux?

I installed OpenCV 3.3.1 with python 2.7 (GPU), but I tried to install OpenCV4.x with Python3. I followed this post here Output find /usr/local/lib/ -type f

How to convert cv2.rectangle bounding box to YoloV4 annotation format (relative x,y,w,h)?

I have trained a Yolo4 network and it is giving me bounding boxes as: img_array = cv2.cvtColor(cv2.imread('image.png'), cv2.COLOR_BGR2RGB) classes, scores, bbox

How to specify python type hints for complex package as opencv or tensorflow?

I am building a python library and I writing a function like this: def addimg(image) -> None: now I want to specify the type of image as an OpenCV image (e.

can't make work together opencv and kivy with buildozer on android smartphone

I have a problem can't make work together opencv and kivy with buildozer on android smartphone. On pc works fine but when I packaging with buildozer and put in

Understanding contour hierarchies: How to distinguish filled circle/contour and unfilled circle/contour in OpenCV?

I am unable to differentiate between the below two contours. cv2.contourArea() is giving the same value for both. Is there any function to distinguish them in P

(-2:Unspecified error) Can't create layer "FeatureExtractor/MobilenetV3/Conv/hard_swish/add" of type "AddV2" in function 'getLayerInstance'

I am facing a problem in classIds, confs, bbox = net.detect(img,confThreshold=float0.5) How to fix it?Please help. I am trying to run a very simple OpenCV scrip

Changing color within a specific area with opencv using c++

I would like to know if there's a simple way to change a color, say from a shade of grey to white, within an area of interest that would be determined from the

ESP32-CAM stream in OpenCV Python

I am using AI Thinker ESP32-CAM with stream url http://192.168.8.100:81/stream. I have tried this and other techniques but nothing worked for me import numpy a