Search code examples
javaimage-processingocrtesseractseven-segment-display

7 segment OCR java application


I've been working on this project for a few months now and need some assistance. I am trying to recognize the characters on an image from an old camera that used a seven segment LED to imprint the frame number in the lower right hand corner of the image. issue is that these images are of people and the skin tone messes with some of the images with lighter skin tone. But most in general cant be recognized by conventional OCR, I am attempting to use Tesseract but have been unsuccessful in compiling the application just to test with it and train it. I am here to ask if any one else has a similar problem or knows of an alternative to Tesseract to be able to recognize these characters. preferably a trainable ocr. My searches have come up null.

example image


Solution

  • Most OCR's have trouble with image background so you should first try to isolate the text first. As this is computer-rendered text then:

    1. text is most likely on the same place in image

      So no need to search for it.

    2. text is done most likely always with the same font

      If you have it that will ease up things a lot and can use even simple methods like per pixel comparison or correlation coefficient with better results then neural network based classification. You can also try this simple OCR.

    3. you can detect the "exact" color of text filtering out all the rest

      Try to detect if the text is solid or transparent (add/xor to image pixels). Anyway after this it should not be too much hard to detect text pixels. Once you can detect your text pixels reliably black out everything else and then use OCR.