if my picture contains distorted rectangle(as shown in image A,B) then how could I detect number of good or complete rectangles(in image C) For example if apply square.c from sample it answers 2 or 3 nos. of rectangles?
image link: https://picasaweb.google.com/108974049756701500543/October262011#5667724653724229138
If I find corners and right angles then I am wrong. I think, This approach wont work.