Image processing and OCR beyond SSOCR - Tesseract?

Tags: #<Tag:0x00007f739a00f4f0>

I’m slowly getting my home together with Home Assistant and it’s actually really cool using things like the Hikvision line crossing binary sensor to activate a door bell before the people press the button. Or using konnected.io to monitor PIR’s instead of paying >$1k for a locked-in security vendor.

I have however entered a brave new frontier of trying to read the status of things that aren’t 7 numbers. I have a cobbled together process which:

From a linux bash script:

  • grabs a frame from an RSTP feed
  • slightly rotates and cleans it up using image magick
  • runs it through the Tesseract OCR engine
  • places the file so file sensor can bring it into Home Assistant

For me that was quite the linux environment learning curve but did give me a sense of accomplishment.

But it did get me thinking!! How many times would a generic OCR service work for other things? A silly example would be tapping into the feed of a camera in a garage and sensing when the number plate was there or not there. Another option would be an appropriately sized sign which says “OPEN” visible from a camera when something is open, but obviously not visible when it is closed.

There are probably another 100+ examples that I could come up with and looking through the discussions I haven’t found similar ideas apart from meter reading.

So this post is about me looking for a skilled collaborator to try and give back to the community through the introduction of a re-usable OCR integration?

Key component building blocks:

Any takers?

For what it’s worth, I think this would be a valuable addition to HA. I was just looking for something like this to read my natural gas meter and ran across your post.

I found a couple of people doing similar things that might be helpful for someone building this out.

This guy is reading a water meter using OCR. He has it split into two separate services. An image provider and the OCR server. I could see HA being a great asset here as it could be a generic image provider for the system. Maybe someone could take some of his ideas and make it into a hassio add-on: https://github.com/jomjol/water-meter-measurement-system

I really like what this other guy did as far as hardware and how it isn’t dependant on any external services, but it only working with 7-segment displays. https://medium.com/@trumpetgod/integrating-my-neptune-water-meter-with-home-assistant-896712a8c893

1 Like