Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature][Core] Auto Rotating the OMR sheet #36

Open
Udayraj123 opened this issue Sep 29, 2022 · 9 comments
Open

[Feature][Core] Auto Rotating the OMR sheet #36

Udayraj123 opened this issue Sep 29, 2022 · 9 comments
Labels
advanced enhancement New feature or request Hard

Comments

@Udayraj123
Copy link
Owner

Udayraj123 commented Sep 29, 2022

We want to be able to identify and correct rotation of input images

Some ideas

  1. Firstly, we can take expected page orientation(portrait/landscape) from user.
  2. For a start, check for height-width ratio and always rotate clockwise (ignore wrongly rotated images, will be separated later).
  3. Try both clockwise and anti-clockwise corrections and the one with the "more correct" histogram will be considered.

Acceptance criterion:

  1. The code should run for rotated versions of all sample images in the repo.
  2. 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 .

@aksha123-git
Copy link

I would like to work on this issues please assign it to me

@Udayraj123
Copy link
Owner Author

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.

@Udayraj123
Copy link
Owner Author

@aksha123-git let me know if there are any updates or any help needed :)

@Gauravmauryaios
Copy link

Please assign this issue to me

@Udayraj123
Copy link
Owner Author

@Gauravmauryaios you can discuss your approach with me on discord before getting assigned :)

@Udayraj123
Copy link
Owner Author

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)
        """

@Gauravmauryaios
Copy link

@Udayraj123 sure

@Udayraj123
Copy link
Owner Author

Adding an approach for OMR sheets containing a "direction indicator" marker -
image

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

@Udayraj123
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
advanced enhancement New feature or request Hard
Projects
Development

No branches or pull requests

3 participants