I've been wondering about this since I can't find any solid information about detecting rectangles with the OpenCV Library 2.4.4. Is this possible after a Canny edge detection to find the largest rectangle? I could only find some C code http://stackoverflow.com/questions/8667818/opencv-c-obj-c-detecting-a-sheet-of-paper-square-detection (the top answer of the 2).
Is there a way to do this with Java? Cause I can't get the C-code to work in the Java Native Interface part of the application (I find it kind of confusing)