1 | initial version |
What is your concrete problem? Maybe you want to post what you have so far and let us know what doesn't work or where you have problems.
The following links may also help you to detect rectangles: http://opencv-code.com/tutorials/automatic-perspective-correction-for-quadrilateral-objects/ and http://opencv-code.com/tutorials/detecting-simple-shapes-in-an-image/