How to generate python bindings for OpenCV based projects
Hello there, There are many C++ projects out there that use OpenCV. On the other hand, it is very tempting to use the python interface of OpenCV, especially for experimentations. Unfortunately, it is...
View ArticleYUV (bytes) to HSV ?
I have a YUV420p stream from picamera. I am able to convert it to RGB with this: def convertYUV(stream,resolution): fwidth,fheight = resolution A = np.frombuffer(stream, dtype=np.uint8) Y =...
View ArticleAlter the video dimensions
As shown in the code below, currently I am getting video to save at 640X480, however I'm looking to modify the dimensions of the saved video. Every time I attempt to simply change the parameters within...
View Articlewhy I have this error message?
AttributeError: 'module' object has no attribute 'SIFT' i have python(x,y) version 2.7 et opencv version3.0.0 why I have this error message?
View ArticleHow to filter objects by color?
Hi, To detect a black object in a cluttered scene I tried to follow [this tutorial](http://www.pyimagesearch.com/2014/10/20/finding-shapes-images-using-python-opencv/). Due to natural light the color...
View Articledebugging opencv python eclipse
I have installed cv2 via pip install cv2 for python2.7. I ran the example programs, for example capturing a video from the webcam etc. and it works fine. As far as I know, one needs the C++ libraries...
View ArticleUnexpected shut down on Opencv
Hello there, Im a beginner in Python even in Opencv, but somehow ive reached the code below. Im 3 weeks with a desperate trouble: The recognition console shut down and write the .txt before the video...
View ArticleSegmentation fault while import cv2 in centos
I'm installing Opencv3 on Centos 2.6 with Python 2.6. I get the error when I `import cv`. I get a `Segmentation fault` error. I'm installing OpenCV like this: yum update && \ yum install -y...
View ArticleIntersection of centroid and line/rectangle
I'm currently making a traffic count system using opencv and python and what I exactly intend to do is that,to increment the counter as soon as the centroid of the blob passes or crosses a line or a...
View ArticleWhy are my imshow windows different after upgrading to opencv 3.1?
Previously I had been using opencv 2.4.11 that was included in my python(x,y) install. When I used imshow() to display an RGB image I was able to easily zoom and if zoomed in close enough the RGB...
View ArticleCoordinates in contour not Accurate/smooth
I'm working on a people counter system and i'm getting the coordinate of each blob detected through the following code: contours, hierarchy = cv2.findContours(thresh,...
View ArticleVisual studio 2013 can't import cv2
I tried to follow this link to compile opencv on visual studio 2013 : > http://docs.opencv.org/3.1.0/d5/de5/tutorial_py_setup_in_windows.html#gsc.tab=0 However, I got this error when I run import...
View Articlekcf tracker in python
Using opencv3.x, the following code works in python: import cv2 p_img = '' # path of the image bb = [] # bounding box of the image here tracker = cv2.Tracker_create('MIL') pix = cv2.imread(p_img) pix...
View ArticleError using SFM with Python
Hello, I am trying to use the SFM opencv contrib module with python3. After dealing with a couple of problems, I can now access to all the SFM functions from python3, e.g. help(cv2.sfm) shows all the...
View ArticlePython OpenCV Kalman Filter, How to set the initial position ?
I tried setting statePre, and statePost variables to desired initial position but it has no effect. The initial position is always (0,0). Thank you
View Articlemosaicing a sequence of overlapping images
I'm trying to generate a mosaic from a sequence of overlapping images. I thought that a possible approach could be to loop over each image, find matching points and mosaic the first 2 images, then use...
View ArticleHow can I upgrade OpenCV from 3.0 to 3.1?
I am using OpenCV with Python. I need to upgrade my OpenCV from 3.0 to 3.1 (I need the dpm modules insinde opencv_contrib). How can I do this?
View Articlefit images with different resolution
Hello, How can I fit and then overlay 2 images which have different resolution ? This is the main image:  I have this one,...
View ArticleIs OpenCV's VideoCapture.read() function skipping frames?
**The Problem** I'm writing a video tracking application (in Python) which requires me to calculate the amount of time an object has spent in a particular region of the frame. What I've done is count...
View ArticlePython. K-nearest neighbour TypeError: samples data type = 17 is not supported
I'm trying to classify some images using SIFT for detect and compute keypoints and descriptors, and then use KNN for classify them into python interpreter: ## Detect keypoints and compute descriptors...
View Article