Category "opencv"

How To set the size of image more than default value in OpenCV

What is the default frame size of opencv image streaming frame ? If I set Width and height of frame more than default frame size what happens? import cv2 cam

OpenCV Python - No module named cv2 (again)

I know that this question has already been asked here a few times, but since no answer helped me so far, I'm posting it here again. What I did: I cloned the r

OCR : Replace recognized text with its translation like google translate

I am working on an OCR project. I using Firebase ML Kit for Optical character recognition. I have to replace the text with its translation in different language

OpenCV version 4.1.0 drawContours error: (-215:Assertion failed) npoints > 0 in function 'drawContours'

I have the following code that worked well with OpenCV 3.4.1 and now is not working with OpenCV 4.1.0 and gives an error. I do not know how to adapt the code wi

Video Streaming from IP Camera in Python Using OpenCV cv2.VideoCapture

I am trying to get video stream in python from IP camera but i am getting an error. I am Using Pycharm IDE. import cv2 scheme = '192.168.100.23' host = schem

YoloV5 Image identification and Tracking -How to Draw a A continuous line connecting the previous point and current point until the object is in frame

I am trying to Detect human objects and balls from video input, I am able to identify both objects and draw a square box around the identified objects, but how

How to use PYZBAR to decode QR code OpenCV - Python?

I'm using python PYZBAR to decode QR code captured by real time cam. decode(input_frame) Naturally the output I get is as follows [Decoded(data=b'DATA', type='

Storing RTSP stream as video file with OpenCV VideoWriter

I'm developing a Python module, with OpenCV, that connects to an RTSP stream to perform some preprocessing on the video (mostly, reducing fps and resolution), a

Python OpenCV streaming from camera - multithreading, timestamps

I ran simple python script on Raspberry Pi 3. This script is responsible to open video device and stream data (800x600) to HTTP endpoint using MJPEG. When I rec

Is there a way to convert numpy array to PNG/JPG... payload without saving it as a file?

Suppose there exists a numpy array, data. I am trying to do the equivalent of the following cv2.imwrite(filename, data) with open(filename, 'rb') as fp: da

Interactive labeling of images in jupyter notebook

I have a list of pictures: pictures = {im1,im2,im3,im4,im5,im6} Where im1: im2: im3: im4: im5: im6: I want to assign the pictures to labels (1,

Write video in Azure Function

I have videos that i want to process in Azure function (Service Bus Queue trigger). When new message arrives and function gets called i do the following: Downl

Python OpenCV - Extrapolating the largest rectangle off of a set of contour points

I'm trying to make an OpenCV detect a bed in the image. I am running the usual Grayscale, Blur, Canny, and I've tried Convex Hull. However, since there's quite

cannot unpack non-iterable numpy.float64 object python3 opencv

I am getting this error and cant understand why the issue is appearing. Below will be the code and error. The result of the last printable workout [-8.545822

After deployment Cv2 can not access the webcam

I need help.   I was building facial recognition using Flask. In the local browser, it was working fine but after deployed into AWS EC2 instance Ubuntu ser

ValueError: cannot reshape array of size 921600 into shape (224,224,3)

I trained a model using Transfer Learning(InceptionV3) and when I tried to predict the results it shows: ValueError: cannot reshape array of size 921600 into sh

error: ‘selectROI’ is not a member of ‘cv’

I use Ubuntu 18.04 and opencv3.4.0(with 3.3.1contrib), when i try to compile my project, these errors occured: /home/sunyq/SiamMaskCpp/demo.cpp:98:24: error: &l

Fast method to retrieve contour mask from a binary mask in Python

I want to make a realtime application, which involves finding the edges of a binary mask. I need something fast, without GPU if possible, that runs hopefully be

imread returns None, violating assertion !_src.empty() in function 'cvtColor' error

I am trying to do a basic colour conversion in python however I can't seem to get past the below error. I have re-installed python, opencv and tried on both pyt

Detecting camera motion with opencv

I am working on drone stabilization close to walls using a camera. For this to work I need to extract the motion the camera makes relative to the wall. For now