Split text lines into multiple images
Posted: 2015-11-13T03:06:01-07:00
Hello. I would to split an image into multiple images according to its text lines.
I need to cut them horizontally, into n pieces.
Example:
Output:
The following image shows the pixel rows that contains ONLY white color (highlighted by yellow). This maybe could help.
Recap
Preconditions:
- the background of input image is always white #ffffff (it never changes - ie. i am not scanning text from a book).
- text lines never overlaps (there is a clear separation between text lines)
Postconditions (let's be n = #text lines) :
- it should produces n images per n lines
- the result images should be trimmed (it's easy using -trim option)
Thanks for help
I need to cut them horizontally, into n pieces.
Example:
Output:
The following image shows the pixel rows that contains ONLY white color (highlighted by yellow). This maybe could help.
Recap
Preconditions:
- the background of input image is always white #ffffff (it never changes - ie. i am not scanning text from a book).
- text lines never overlaps (there is a clear separation between text lines)
Postconditions (let's be n = #text lines) :
- it should produces n images per n lines
- the result images should be trimmed (it's easy using -trim option)
Thanks for help