Primitive text direction feature detector#5
Primitive text direction feature detector#5fedirnp wants to merge 5 commits intodchaplinsky:masterfrom fedirnp:master
Conversation
unshred/features/text.py
Outdated
|
Generally looks nice. Thank you for all your hard work |
unshred/features/text.py
Outdated
There was a problem hiding this comment.
You only include into histograms for pixel[0]<MAGIC_COLOR_THRESHOLD (10) values 255-pixel[0]. So the minimum value in histogram would be 245, where it's not 0. I suggest replacing this check with "if value != 0:" or just "if value:" to make the code easier to follow
There was a problem hiding this comment.
Yeah, that is pretty dirty. Planned to remove that code and add image binarization in the beginning...
|
Guys, take a look into the latest version. :-) |
unshred/features/text.py
Outdated
There was a problem hiding this comment.
The previous request still holds: please describe what is each of these "magic" values
|
By the way, in case of just a single line of text, your approach seems to mistake letters for separate lines, i.e. the answer is wrong by 90º. |
|
Guys, I've fixed code accoring your comments. |
There was a problem hiding this comment.
Please remove MAGIC_ from here and other constants.
v.1.1 of text direction feature detector :)