Issue
I'm trying to extract the data from image using pytesseract. This module has image_to_data, image_to_osd methods. These two methods provides lot of info(TextLineOrder, WritingDirection, ScriptDetection, Orientation etc...) as output.
Below image is the output of image_to_data method. what does values of these columns(level, block_num, par_num, line_num, word_num) meaning?
Output of image_to_osd looks as below. What is the meaning each term in this?
Page number: 0 Orientation in degrees: 0 Rotate: 0 Orientation confidence: 16.47 Script: Latin Script confidence: 4.00
I refered docs but I did not get any info regarding these parameters.
Solution
Column Level:
- Item with no block_num, paragraph_num, line_num, word_num
- Item with block_num and with no paragraph_num, line_num, word_num
- Item with block_num, paragraph_num and with no line_num, word_num
- Item with block_num, paragraph_num, line_num, and with no word_num
- Item with all those numbers
Column block_num: Block number of the detected text or item
Column par_num: Paragraph number of the detected text or item
Column line_num: Line number of the detected text or item
Column word_num: word number of the detected text or item
But above all 4 columns are interconnected.If the item comes from new line then word number will start counting again from 0, it doesn't continue from previous line last word number. Same goes with line_num, par_num, block_num.
Check out the below image for reference.
1st column: block_num
2nd column: par_num
3rd column: line_num
4rth column: word_num
Answered By - Eswar RDS
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.