Page 1 of 1

detect number of rows

PostPosted: Fri Mar 10, 2017 2:25 am
by timtomtomek

I have following image:

On the image i have 10 rows, however I may have between 4-16 rows.
Row names are constant: "ON", "1D", , "1W", ...., "9Y" (always 2 characters).

I need to do following:
1) Detect number of rows
2) Detect rows names (ie. "1D", "1W" etc...). So I need to know that for example '2Y" is in the last row.

Re. 1) I converted image to bitonal and then used Euclidean Color Filtering to find nearest color (white or black), as first row is always yellow that means it converts to WHITE, so having ROW 1 height and GRID height (it is always fixed height) I can calculate number of rows.

Re. 2) I tried using tesseract but unfortunately it is not accurate. Having number of rows from point (1) I can call tesseract just for specific row, but results are not accurate (I tried applying different filters, scaling etc.).
Are there any other options to do that ? for example shape recognition etc. ? what is the best approach for my problem ?