OMRChecker
OMRChecker copied to clipboard
[Feature][Core] Auto Rotating the OMR sheet
We want to be able to identify and correct rotation of input images
Some ideas
- Firstly, we can take expected page orientation(portrait/landscape) from user.
- For a start, check for height-width ratio and always rotate clockwise (ignore wrongly rotated images, will be separated later).
- Try both clockwise and anti-clockwise corrections and the one with the "more correct" histogram will be considered.
Acceptance criterion:
- The code should run for rotated versions of all sample images in the repo.
- Proper logging of rotations should be done to make debugging easier
Example real user validation: https://discord.com/channels/590134763784896514/590134763784896520/908620446201696316
Note: this issue is marked with the hacktoberfest
label. Follow #hacktoberfest-discussions
on Discord for further details .
I would like to work on this issues please assign it to me
Hi @aksha123-git , no problem! please go through the code once and discuss an approach for this on discord. Once we have a clarity on how to move forward I'll assign it to you. fyi there is one more person who has approached me to work on this. So better to start a discussion soon.
@aksha123-git let me know if there are any updates or any help needed :)
Please assign this issue to me
@Gauravmauryaios you can discuss your approach with me on discord before getting assigned :)
Pasting approaches from the code comment here:
"""
TODO later Autorotate:
- Rotate 90 : check page width:height, CW/ACW?
- do CW, then pass to 180 check.
- Rotate 180 :
- check markers centroid (OMR specific, paper warping may be imperfect.)
- OCR check
- Check column fields like roll field after morphing should be 'vertical' (based on col_orient)
"""
@Udayraj123 sure
Adding an approach for OMR sheets containing a "direction indicator" marker -
We can create a pre-processor that auto-rotates the image based on the presence of a marker in a given position (it will hit and try the rotations in the order - top, bottom, left, right ref: https://products.aspose.app/omr/create-answer-sheet
Changing difficulty from Medium to Hard considering the scope of the problem is now more generic and an abstract solution is possible from the current dev branch.