Odd results with OpenCV

Continuing on the WW2CP project, I found some test gifs that look like casualty lists by county and state. I pulled down one sample page to see if I could get OpenCV to read the text on the page. No luck at first. The page was black text on gray paper in a gif, so I thought that fixing the brightness and contrast and cropping the page might help, but no.

The pages are organized by sets of columns that list the last name, first name, middle initial, serial number, rank and fate (KIA, DNB, etc). These sets of columns are then organized as three sets of columns on a page. With review of the Pillow documentation, I figured out how to crop the columns to make them one column only. I also figured out how to change the brightness of the page (to make the gray background turn whiter) and the contrast (to make the letters look more like letters). I ran OpenCV on the modified pages and I still could not get OCR to work properly. 

I probably need to look at Natural Language Processing to make this work the way I want. It sounds interesting, but it could also be a rabbit hole of never-ending tasks. Apparently, I may need a corpus (?) of names, I think. I should probably read a book first. (Natural Language Processing with Python).

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s