Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to read time from recorded surveillance camera video?

I have a problem where I have to read the time of recording from the video recorded by a surveillance camera.

The time shows up on the top-left area of the video. Below is a link to screen grab of the area which shows the time. Also, the digit color(white/black) keeps changing during the duration of the video.

alt texthttp://i55.tinypic.com/2j5gca8.png

Please guide me in the direction to approach this problem. I am a Java programmer so would prefer an approach through Java.

EDIT: Thanks unhillbilly for the comment. I had looked at the Ron Cemer OCR library and its performance is much below our requirement.

Since the ocr performance is less than desired, I was planning to build a character set using the screen grabs for all the digits, and using some image/pixel comparison library to compare the frame time with the character-set which will show a probabilistic result after comparison.

So I was looking for a good image comparison library(I would be OK with a non-java library which I can run using the command-line). Also any advice on the above approach would be really helpful.

like image 711
stressed_geek Avatar asked Dec 21 '10 20:12

stressed_geek


1 Answers

It doesn't seem like you need a full blown OCR here.
I presume that the numbers are always in the same position in the image. You only expect digits 0-9 at each of the know positions (in either black or white).
A simple template matching at each position with each of the digits (you'll have 20 templates for the 10 digits at each color) is very fast (real-time) and should give you very accurate results.

like image 117
Adi Shavit Avatar answered Nov 09 '22 23:11

Adi Shavit