How to detect concentric squares?
I have vector of approximated 4-point closed contours. How I can determine that some of them are concentric?
The way to go I thing is using minAreaRect function that returns a RotatedRect
that has a centre. Based on the distance between the centres, you can define an error of "concentricity" of the two or more rectangles.
I througth about it. But if view angle is too big squares turn into quads and can not be decribed by RotatedRect. But I'll try and let you know.
you have also fitEllipse, but it returns RotatedRect too. (Anyway, what do you mean by quad?)
Worked well for me! To compare whether two contours are nested, and to find the biggest one:
Asked: 2014-09-22 06:04:08 -0600
Seen: 640 times
Last updated: Sep 22 '14