# Help with simple OCR of two-digit numbers

**URL:** <https://discourse.nodered.org/t/help-with-simple-ocr-of-two-digit-numbers/79339>\
**Category:** General\
**Created:** [21 June 2023 17:20 UTC](https://discourse.nodered.org/t/help-with-simple-ocr-of-two-digit-numbers/79339 "2023-06-21T17:20:13Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![grant1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/grant1/32/49890_2.png) [@grant1](https://discourse.nodered.org/u/grant1)\
**Post date:** [23 June 2023 02:38 UTC](https://discourse.nodered.org/t/help-with-simple-ocr-of-two-digit-numbers/79339/6 "2023-06-23T02:38:22Z")

</div>

After a few days of experimenting, the ability of the Tesseract.js to correctly perform seven segment optical character recognition is not reliable or repeatable. So I went back to searching and found some interesting [attempts](https://discourse.nodered.org/t/extract-numbers-from-image/43529/3) & technologies, but the best was a standalone [program](https://github.com/auerswal/ssocr) called [SSOCR](https://www.unix-ag.uni-kl.de/~auerswal/ssocr/) (seven segment optical character recognition). After using the standard image cleanup tools available, it has done a very nice job of interpreting the numbers. My test flow is shown below, where you can see I needed to trim the output and convert from string to number. I will incorporate this into the overall flow whereby the image is grabbed via the webcam, cleaned up, saved to the hard drive, and then read by SSOCR via the Exec node.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/9/f9d012dd5584f9ce09e050c9b6bf60a25a35d2e5.png)

---

_[View the full topic](https://discourse.nodered.org/t/help-with-simple-ocr-of-two-digit-numbers/79339)._
