I want to extract contours from a binary canny edge image.
The original image is:
After applying cvCanny() and cvDilate(), I get the following image:
I need the enclosing box(the entire blue box) to be detected as a contour. I apply cvFindContours() and extract the contour with the largest area. However, when I apply cvFindContours(), it modifies the above canny image as follows:
which is not what I intend to do. It then outputs the largest contour to be the mailbox sign inside the blue box.
What is going wrong? Does cvFindContours() modify the input image? What should be done to get just the enclosing blue box?
Thanks.