$ tesseract sample1_voltage.tif sample1_voltage Tesseract Open Source OCR Engine v3.04.01 with Leptonica Here’s what happened when I ran the commands: But cropping doesn’t seem to work for the 11.84V so I’m not sure how to get that.īefore anyone puts in a lot of effort with this, please pass your plan by me first, so you don't waste time going down a path that I'm not keen on using. ![]() (I’d prefer to do it all from Linux so it’s all in one place.) Then I could feed that plus the original file through tesseract and combine the contents of the. I guess I could crop the 32.0% with ImageMagicK, or do a batch crop via IrfanView on Windows. Any suggestions on how to get the 11.84V and 32.0% figures extracted from files like sample1.png in a fully automated way? I haven’t found anything useful in the tesseract documentation yet, but if I can get it to look at specific rectangles something like this setRectangle command, then maybe that would be simpler, but I don’t see how to use that from the command line (that link seems to be for the R language). ImageMagicK is also installed, in case I need to use it for cropping or whatever. I don’t know Python, but Python is installed so it could be used if necessary, if someone else writes the code, but it's not my preference. worked for the 32.0% (see sample1_soc.txt attached). failed for the 11.84V (see empty sample1_voltage.txt attached), but I tried cropping the 11.84V and 32.0% figures out to TIF files (see sample1_voltage.tif & sample1_soc.tif attached, also created with IrfanView on Windows) then running them through tesseract, and that: I tried feeding tesseract a negative (created with IrfanView on Windows) of the image, in case it was a black/white issue, but that gave the same output. “32.0%” at the bottom (I really need this SOC figure). ![]() “11.84V” near the bottom left (nice to have this voltage figure, but not vital), and ![]() It produces sample1.txt (attached), which includes plenty of useful figures, but it excludes: The problem I have is, some of the text is not being extracted. (I have hundreds of these screen shots, all in the same size & format, taken over the last year using the LeafSpy Lite app, for the Nissan LEAF EV, and I'll be extracting text from all of them.) I’ve just installed tesseract on my Raspberry Pi running Linux (Raspbain) and I’m trying to extract text from PNG screen shots taken on my phone.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |