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
Tag: image-processing
Creating your own contour in opencv using python
I have a set of boundary points of an object. I want to draw it using opencv as contour. I have no idea that how to convert my points to contour representation. To the same contour representation which is obtained by following call Any ideas? Thanks Answer By looking at the format of the contours I would think something like
Convert image from PIL to openCV format
I’m trying to convert image from PIL to OpenCV format. I’m using OpenCV 2.4.3. here is what I’ve attempted till now. But I think the image is not getting converted to CV format. The Window shows me a large brown image. Where am I going wrong in Converting image from PIL to CV format? Also , why do i need
How to merge a transparent png image with another image using PIL
I have a transparent png image foo.png and I’ve opened another image with: Now what I need is to merge foo.png with foo2.png. (foo.png contains some text and I want to print that text on foo2.png) Answer First parameter to .paste() is the image to paste. Second are coordinates, and the secret sauce is the third parameter. It indicates a