Category "opencv"

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

npm install opencv4nodejs error on mac m1 bigSur

I have been trying to install opencv4nodejs package with npm install opencv4nodejs command. But unfortunately the below is being thrown. Have done some research

How to use the output of a CNN as the input of another in an autonomous vehicle

I am developing a mini autonomous car using 3 CNNs and a camera sensor using this approach. One of the CNNs detects lanes on the images and outputs images wit

QR Code Detection from Pyzbar with Camera Image

I am having trouble detecting QR code using Pyzbar. Under perfection condition, I am able to detect the QR code using the original png image. However, when I do

TypeError: Can't convert vector element for 'scores', index=0

I'm trying to take the output of a yolov5s.onnx model and and run NMSBoxes on it. But I keep getting this error: Traceback (most recent call last): File "pyth

numpy and cv2, no modules available after installation via pip on linux

I installed opencv and numpy using pip on debian 11.2 with python 3.9. In visual studio the modules aren't available and terminal returns: Traceback (most recen

AttributeError: module 'cv2.cv2' has no attribute 'CascadeClassifer' (OpenCV Face Detection)

I have tried running this code for the OpenCV face detection and upon running it I get the error (AttributeError: module 'cv2.cv2' has no attribute 'CascadeClas

TypeError: lowerb is not a numpy array, neither a scalar

I needed to run some parts of the code in GPU using cupy instead of numpy. So, I only made comment out for this line # import numpy as np and used this line ins

Estimating distance from camera to ground plane point

How can I calculate distance from camera to a point on a ground plane from an image? I have the intrinsic parameters of the camera and the position (height, p

Is is possible to use OpenCV.js with Web Worker in Angular?

I'm trying to use OpenCV.js in web workers in Angular. My project needs to conduct multiple graphic computings at the same time, which would take long time. But

How to detect corners of a square with Python OpenCV?

In the image below, I am using OpenCV harris corner detector to detect only the corners for the squares (and the smaller squares within the outer squares). Howe

OpenCV Python: How to overlay an image into the centre of another image

How can I paste a smaller image into the center of another image? Both images have the same height, but the smaller one has a width that is always smaller. The