Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Performing Canny on noisy images will lead to bad results, It is preferable to choose better color space (Lab (*b)) and threshold or use another edge detector for example:

image description image description

You can find straight lines using hough transform ( eliminate unwanted lines) then find intersections. You can also use generalized hough to detect rectangle but that's not supported in Opencv.

Method 2 :

-Threshold and eliminate unwanted contours . - Use Minimum area rectangle.