Category "opencv"

Pipe opencv images to ffmpeg using python

How can I pipe openCV images to ffmpeg (running ffmpeg as a subprocess)? (I am using spyder/anaconda) I am reading frames from a video file and do some process

How does OpenCV's DFT-based filter2D actually work?

I have issues comprehending how the filter2D method of the the OpenCV library actually works. The "standard" direct version for small kernel sizes is clear, but

Python OpenCV skew correction for OCR

Currently, I am working on an OCR project where I need to read the text off of a label (see example images below). I am running into issues with the image skew

Python add audio to video opencv

I use python cv2 module to join jpg frames into video, but I can't add audio to it. Is it possible to add audio to video in python without ffmpeg? P.S. Sorry fo

Detect and crop a box in .pdf or image as individual images

I have a multi-page .pdf (scanned images) containing handwriting I would like to crop and store as new separate images. For example, in the visual below I would

python OpenCV - add alpha channel to RGB image

What is the best way to convert RGB image to RGBA in python using opencv? Let's say I have one array with shape (185, 198, 3) - it is RGB and the other is a

How to find extreme outer points in an image with Python OpenCV

I have this image of a statue. I'm trying to find the top, bottom, left, and right most points on the statue. Is there a way to measure the edge of each side

cv2.findContours function is not working in both versions

I am new to computer vision and haven't really went through any tutorials on thresholding or blurring or other filters. I am using the below two piece of codes

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