I’m writing a program to collect a series of images from a USB microscope and generate an average as a way of denoising. I’m having to convert the image into a numpy array, sum the pixels then divide before converting back to an image. Somewhere along the line the channels get mixed so my output is BGR not RGB, I’m
Tag: opencv
How to draw a rectangle around a region of interest in python
I’m having trouble with import cv in my python code. My issue is I need to draw a rectangle around regions of interest in an image. How can this be done in python? I’m doing object detection and would like to draw a rectangle around the objects I believe I’ve found in the image. Answer please don’t try with the
How does one convert a grayscale image to RGB in OpenCV (Python)?
I’m learning image processing using OpenCV for a realtime application. I did some thresholding on an image and want to label the contours in green, but they aren’t showing up in green because my image is in black and white. Early in the program I used gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) to convert from RGB to grayscale, but to go back
Install opencv for Python 3.3
Is OpenCV still not available for Python 3.3 and do I really have to downgrade to Python 2.7 to use it? I didn’t find much about it on the internet, only some posts from 2012 that OpenCV wasn’t yet ported to be used in Python 3.x. But now it’s 2014 and after trying to install the latest OpenCV 2.4.x and
Python Equivalent for bwmorph
I am still coding a fingerprint image preprocessor on Python. I see in MATLAB there is a special function to remove H breaks and spurs: I have searched scikit, OpenCV and others but couldn’t find an equivalent for these two use of bwmorph. Can anybody point me to right direction or do i have to implement my own? Answer You
ImportError: DLL load failed: %1 is not a valid Win32 application. But the DLL’s are there
I have a situation very much like the one at Error “ImportError: DLL load failed: %1 is not a valid Win32 application”, but the answer there isn’t working for me. My Python code says: But that line throws the error shown in the title of this question. I have OpenCV installed in C:libopencv on this 64-bit machine. I’m using 64-bit
How to resize window in opencv2 python
I am using opencv 2 with a webcam. I can get the video stream and process it, but I can’t seem to figure out a way to resize the display window. I have some video images stacked horizontally, but the image dimension is very small that it’s difficult to see things. My code is pretty simple, and along the lines
draw a circle over image opencv
Im usign python and opencv to get a image from the webcam, and I want to know how to draw a circle over my image, just a simple green circle with transparent fill my code: Thanks in advance. Answer Use “thickness” parameter for only the border.
Disable webcam’s Autofocus in Linux
I’m working in embebed system in the beagleboard. The source code is in Python, but I import libraries from OpenCV to do image processing. Actually, I’m using the webcam Logitech c910, it’s a excellent camera but it has autofocus. I would like to know if I can disable the autofocus from Python or any program in Linux? Answer Use program
OpenCV v1/v2 error: the function is not implemented
I’m trying to get OpenCV working with Python on my Ubuntu machine. I’ve downloaded and installed OpenCV, but when I attempt to run the following python code (which should capture images from a webcam and push them to the screen) I get the following error: So I do what they ask: install the packages, move to the folder from whence