OCR Meter Readings using Raspberry Pi?

I have a wireless energy meter and thermostat at home. I could try to hack them, taking them apart and listening to certain key voltages. However, the circuits are likely small and breakable. And I would like to use the units again and not pay for replacements.

So I was wondering whether I could cheat and input data values using OCR from a webcam or camera. The Raspberry Pi would be well placed to do this. My thoughts so far for the process are set out below. I can probably tackle each independently.

  1. Place meters;
  2. Acquire image;
  3. OCR on image;
  4. Output of OCR to DB or file.

1. Place meters

  • Needs to be a set distance from acquisition device;
  • Mark out so can replicate even if need to take meters in and out;
  • Illumination for night time:
    • Low power (LED?)
    • Filter image when LED is lit?

2. Acquire image

  • Frame grab from webcam;
    • Need to get webcam working;
    • Need to learn command to acquire image;
  • Segment image for different data:
    • Set x,y area in image if meters are placed consistently;
      • Is there a command line tool for this?
    • Test with crop in iPhone/iPad;
    • Output image files for different areas – use these as input for OCR.

3. OCR on image

  • No obvious OCR tool on Raspberry Pi – keep looking;
  • Web services? Does Google/Tesseract have a web service? Use URL?
  • Did common sense check on output:
    • Values will be integer (input parameter for OCR)
    • Values will have decimal point;
  • Create own OCR tool?

4. Output of OCR to DB or file

  • MySQL DB?
  • Key field = time stamp (inc. seconds);
  • Other fields for each item of OCR data;
  • Or flat file, e.g. CSV, with {timestamp, data} tuple.

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 )

Facebook photo

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

Connecting to %s