Sunbird-Saral / Project-Saral

MIT License
8 stars 26 forks source link

Changes made to tableCornerDetection #420

Open sanjanats7 opened 12 months ago

sanjanats7 commented 12 months ago

Why:

Page-edge detection was added as an option to improve the flexibility of scanning new layouts. This doesn't require previously printed circles on the page for table corner detection and instead uses contours to detect the edge of the page directly.

What:

The image undergoes Canny edge detection to accentuate edges, from which the most prominent edge representing the page is identified. Subsequently, a bounding rectangle is delineated around the page, and the image is cropped accordingly.

The option to choose between this page-edge detection method and the traditional circle-based approach is integrated for user convenience. The boolean expression expPageCornerDetection (which is present under the threshold in the layout of the roi file) can be made true to use the new method. These modifications are implemented within the SaralSDKOpenCVScannerActivity function.

Changes made to the rois file:

The new ROI for the image detected through the page corner detection is added in the rois file under the type "corner_detection_example_new". Complete Description: https://docs.google.com/document/d/1CkzjVs_hXF311F9xS5Z9mZPOfbzP7VAGk6C0yvMfDbI/edit?usp=sharing