Skip to content

get_contours enhancement #1

@davide710

Description

@davide710

get_contours is the core function, it is the one that detects the 4 corners of the document. Unfortunately it doesn't work all the times. I think the preprocessing of the image before the call to cv2.getContours should be improved: as you can see in examples/ or trying the code yourself, the document is often not detected at all, or not detected right.
If you have any ideas, please write it in a comment or submit a pull request.
Work just on scanner.py, the code is small but if you can't understand some parts don't hesitate to ask questions.

EDIT:
In the last commits I introduced the function white(), which improves the performances drastically. However, I think there's still room for improvement.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions