Changes made to tableCornerDetection #420
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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