User avatar
jbeale
Posts: 3902
Joined: Tue Nov 22, 2011 11:51 pm

OCR for reading multimeter?

Wed Jan 02, 2013 7:40 pm

I want to get data from an stand-alone DMM (multimeter) into a log file. There is no direct interface, so I need to take a still image of the reading on the LCD and convert it into a text string. For example, given the image below, I want to write "3.539" into a file, and do this repeatedly every 10 seconds or so.
Fluke-DMM.JPG
image of multimeter display
Fluke-DMM.JPG (41.21 KiB) Viewed 19611 times
Apart from getting good enough still frames from a camera, this is basically an OCR (optical character recognition) problem. I gather there is a very powerful, open-source OCR program called Tesseract which is available for Ubuntu, but I'm not sure if anyone has successfully run this on a R-Pi (?) Apparently Tesseract can read entire books, but for this application, I only need to detect digits 0-9 which are each in a fixed location in the frame, so maybe there is a simpler option.

(Note, I know there are DMMs with built-in serial / GPIB / USB ports, and I have some of them, but in this case I want more isolation between the computer and the meter than most of them provide. Also, in one meter I'd like to debug what seems to be an occasional error in the GPIB output.)

I occurs to me that one problem here which you don't have with a book, is the case where the frame is taken with the meter just changing from one reading to another, when the digits may be superimposed. So maybe I also need a "change detection" image algorithm that only presents an image to the OCR which has not changed for the past few frames.

ianmacs
Posts: 31
Joined: Mon Jul 09, 2012 10:42 am

Re: OCR for reading multimeter?

Wed Jan 02, 2013 9:53 pm

Sounds like a nice fun project. I agree Tesseract is overkill for this application, as the digits are displayed on a standard 7-segment LCD, I'd aim for recognizing the state of the individual segments. I'd make sure the relative geometry between camera and device cannot change, so that the segments are always mapped to the same pixels. Put camera and device into a black box together with a sufficient light source, so that environmental light changes have no effect on your recognition rate.

Searching for 7 segment OCR I find this open source project http://www.unix-ag.uni-kl.de/~auerswal/ssocr/ - you might want to use it.

jayrajput
Posts: 1
Joined: Tue Jan 15, 2013 3:48 am

Re: OCR for reading multimeter?

Tue Jan 15, 2013 3:51 am

I am googling for something although not on pi. I wanted to automate reading my RSA FOB key on my ubuntu box.I found this nice tool called ssocr .

http://www.unix-ag.uni-kl.de/~auerswal/ssocr/

You can get some idea from them. I am no way connected with ssocr but just found it nice.

tenochtitlanuk
Posts: 156
Joined: Fri Jul 06, 2012 8:51 pm
Location: Taunton, Somerset, UK

Re: OCR for reading multimeter?

Thu Jan 24, 2013 8:31 pm

While full OCR is the ideal, as long as the camera is fixed & the image has good contrast it may be easier to simply test brightness of each segment at one central pixel.
I'm currently waiting for the PI camera to be released, but checked this method via another language on my PC. I read pixels direct off screen, but you can easily pick pixel data out of the middle of bmp files.
Image
See http://diga.me.uk/sevenSegDecode.html
It's a thought, anyway.

ashishbachhav
Posts: 1
Joined: Wed Oct 01, 2014 8:03 am

Re: OCR for reading multimeter?

Wed Oct 01, 2014 8:29 am

Have you solve this problem.

i am also looking for same solution in vb.net.

plz if you found solution then plz mail me

[MOD removed email address to stop spammers getting it. Please use a PM to contact poster]

Thanks

User avatar
jbeale
Posts: 3902
Joined: Tue Nov 22, 2011 11:51 pm

Re: OCR for reading multimeter?

Wed Oct 01, 2014 2:10 pm

I did get a program that worked to read the multimeter, see this post:
http://www.raspberrypi.org/forums/viewt ... 58#p434782

AMSA
Posts: 2
Joined: Wed Jun 24, 2015 4:51 pm

Re: OCR for reading multimeter?

Wed Jun 24, 2015 4:56 pm

Hi jbeale,

From what I can tell, have implemented the project in the link above. However, I wonder, which webcam did you use and which part of the code access to the camera?

Return to “Automation, sensing and robotics”