1 | initial version |
I think the image you are refering to is the Canny output and I think is only showing the positive values. Why dont you use the contours in your vector<vector<Point> > contours
? You can plot them with cv::drawContours
and you can find the bounding box by using cv::boundingRect
. You may refer to this tutorial: http://docs.opencv.org/doc/tutorials/imgproc/shapedescriptors/bounding_rects_circles/bounding_rects_circles.html