I have a working python script that uses the video writer from opencv. source https://gist.github.com/stanchiang/b4e4890160a054a9c1d65f9152172600 If i take in a file, and regardless of whether I simply pass the video frame through to the writer (effectively duplicating the file) or if i try to edit the frame, the file is always larger. I would like for it to be no
Tag: opencv
Histogram of my cam in real time
Im trying to show the histogram in real time from grayscale of my webcam, the problem is that histogram is not being update and my cam stop until i close histogram’s window. How can i fix this? I want to show the grayscale img from my webcam and its histogram in same time, is possible do that? Answer I have
Normalizing images in OpenCV produces black image?
I wrote the following code to normalize an image using NORM_L1 in OpenCV. But the output image was just black. How to solve this? Answer If you want to change the range to [0, 1], make sure the output data type is float.
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: you know some workaround this? Answer I think it may help if you install these packages. and FFmpeg as well.
Attribute error while using opencv for face recognition
I am teaching myself how to use openCV by writing a simple face recognition program I found on youtube. I have installed opencv version 2 as well as numpy 1.8.0. I am using python 2.7. I copyed this code exactly how it was done in the video and article links below, yet I keep getting errors. AttributeError: ‘module’ object has
Access pixel values within a contour boundary using OpenCV in Python
I’m using OpenCV 3.0.0 on Python 2.7.9. I’m trying to track an object in a video with a still background, and estimate some of its properties. Since there can be multiple moving objects in an image, I want to be able to differentiate between them and track them individually throughout the remaining frames of the video. One way I thought
Capturing video from two cameras in OpenCV at once
How do you capture video from two or more cameras at once (or nearly) with OpenCV, using the Python API? I have three webcams, all capable of video streaming, located at /dev/video0, /dev/video1, and /dev/video2. Using the tutorial as an example, capturing images from a single camera is simply: And this works fine. However, if I try to initialize a
Removing pixels surrounded by white pixels OpenCV
I have a black and white image which has a lot of noise. I would like to remove only black pixels that are completely surrounded by white ones. I tried doing so with Filter2d, but I could not achieve it. Answer I’d use a convolution (again) 1: As you can see, the result array has changed all “black” pixels (here
Saving a video capture in python with openCV : empty video
I’m new in Python (2.7) and I try to work on video processing (with module openCv “cv2”). Starting with tutorials, I try to use the script of this tutorial : paragraph “Saving a video”. Everything works fine excepting that the video I’m saving is empty. I can find output.avi in my directory but its memory size is 0kb an, of
OpenCV Python: cv2.findContours – ValueError: too many values to unpack
I’m writing an opencv program and I found a script on another stackoverflow question: Computer Vision: Masking a human hand When I run the scripted answer, I get the following error: The code: Any help is appreciated! Answer I got the answer from the OpenCV Stack Exchange site. Answer THE ANSWER: I bet you are using the current OpenCV’s master