Category "opencv"

VideoCapture Release - Failed to Allocate Buffers (V4l2src) Jetson NX

I'm using a v4l2sink in gstreamer to tee a video stream that I can access in OpenCV. This works when I open the videocapture device and get frames, however at s

Why python can't find libavcodec.so.54 after Ubuntu update from 14.10 to 16.04?

I've update from Ubuntu 14.10 to 16.04 yesterday and right now I've tried to run my old python + opencv files but every file with opencv gives the same error:

Opencv/numpy issue: "module compiled against API version X but this version of numpy is Y"

I'm new to the world of opencv and few days ago I tried to install it. I installed everything and moved the cv2 file from opencv to python 2.7. I tired oving bo

MediaRecorder Crash?

I am going to record video but it's not working public void startRecord() { if (preVideo()) { mRecorder.start(); } isRecording = true; } p

How to install gstreamer 1.0 badplugin for opencv?

On a Ubuntu 18.04 machine I am trying to use opencv 4.1.2 facedetect in a gstreamer 1.14.5 pipeline but unfortunately the plugin is not installed. I downloaded

normalize histogram in c++ - function normalize in openCV

I need to normalize the histogram of an image f which mean to applicated an transformation of histogram from image in order to extend the range of value of f to

How to create a Python convolution kernel?

I'm trying to create a convolution kernel, and the middle is going to be 1.5. Unfortunately I keep running in to ideas on how to do that. I'm trying to create s

OpenCV real time streaming video capture is slow. How to drop frames or get synced with real time?

Goal and problem I'd like to set up an opencv system to process either HLS streams or RMTP streams, however, I am running into a strange issue regarding a redu

Error: (-215:Assertion failed) npoints > 0 while working with contours using OpenCV

When I run this code: import cv2 image = cv2.imread('screenshoot10.jpg') cv2.imshow('input image', image) gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) edg

Random cropping data augmentation convolutional neural networks

I am training a convolutional neural network, but have a relatively small dataset. So I am implementing techniques to augment it. Now this is the first time i a

Change the Background color of an image set using OpenCV

I have a fingernail dataset and in these images they have different background colors as below image. I need to covert all those image's background color to on

Improve performance of per-pixel image multiplication with mask and thresholding

I am looking for suggestions to make this algorithm run faster. Using C# and EmguCV (a managed wrapper over OpenCV), I am processing images in real-time, adjust

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