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

Panel has 10 sides instead of 4 #2

Open
robstolarz opened this issue Apr 15, 2019 · 1 comment
Open

Panel has 10 sides instead of 4 #2

robstolarz opened this issue Apr 15, 2019 · 1 comment

Comments

@robstolarz
Copy link
Owner

While running ./ohnoify.py ./build/originals/media/tumblr_owj0qjOPZ01vbwf2ko1_1280.png -o /tmp --debug with the comic from http://webcomicname.com/post/165508600064, this debug output is produced:

[(10, 152484), (4, 150926), (4, 149362), (9, 736), (9, 550), (9, 486), (8, 468), (9, 432), (9, 420), (7, 390), (12, 368), (7, 357), (12, 352), (5, 348), (10, 342), (11, 336), (10, 336), (8, 320), (11, 315), (13, 300), (6, 297), (12, 286), (5, 285), (8, 272), (9, 264), (11, 252), (10, 247), (10, 247), (12, 240), (8, 238), (12, 234), (8, 210), (8, 210), (9, 208), (10, 208), (8, 195), (12, 180), (8, 154), (8, 144), (10, 135), (9, 135), (8, 117), (4, 36), (8, 30), (8, 25), (7, 20), (7, 20), (6, 20), (2, 13)]
image had 2 rectangles.
of these, the closest was 88.83692925805124 units from the bottom right

I'm on Arch Linux 5.0.7-vfio, with Python 3.7.3 and 2.7.16, OpenCV 4.1.0.

@robstolarz
Copy link
Owner Author

From the interactive debug, it seems like the first panel is detected as having ten sides because it isn't detected as fully connected at the top left corner. It doesn't prevent the panel we want from being detected and clipped, but when ohnoify.py is run normally this causes the panel count to be under 3 so the program will decide it's just not a comic.

Theories for fixing this:

  1. currently the contour detection is augmented by some cheap threshold ops, maybe replacing this with Canny with a high aperture is a better bet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant