Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hi, with findContours you can detect the contours in your image. From the documentation "Each contour is stored as a vector of points". If you want the bounding box of the detected contour you can use the function cv.boundingRect(). An other option is to draw the contour into the image with drawContours. With the parameter CV_FILLED the enclosed image area of the contour will be filled with a user defined color.

Are you sure that the drawing of the border works? The Point(100,100) lies outside the image range. Image coordinates start by 0, so your maximum row and column index is 99.