Azzera filtri
Azzera filtri

Text recognition in videos: two almost identical frames, different results

3 visualizzazioni (ultimi 30 giorni)
I have all,
I have collected a series of video with a dashcam installed on a tractor. The dashcam reports the speed of the tractor in the video and I need to extract the speed from the video. To this goal, I have extracted the frames and I have used the OCR function on each frame to recognize the text. In order to improve the accuracy of the text recognition I have:
  • restricted the character set to numbers and the letters "KM" of the unit
  • restricted the analysis to a region of interest
The approach works in some cases but it does not work also in two almost identical frames. In the following links, you can see two identical frames, in this frame the text is not recognized, while in this is recognized.The region of interest is the yellow rectangle. How could I improve the accuracy of the method?
Below, you will find my code
Thank you,
Best regards,
clear all
v = VideoReader('C:\Users\serbr\Desktop\GRMN8722.MP4');
TargetBoundingBox=[804 678 100 38];
while hasFrame(v)
video{i} = readFrame(v);
Speed{i} = ocr(video{i},TargetBoundingBox,'CharacterSet','0123456789KM');
if isempty(Speed{i}.Words)==0
Iocr{i} = insertObjectAnnotation(video{i}, 'rectangle', ...
Speed{i}.WordBoundingBoxes, ...
  2 Commenti
Walter Roberson
Walter Roberson il 5 Ago 2019
The advertising on the page is much larger than your images. I suggest that you use the tools to post the images here.
pietro il 5 Ago 2019
I have used a different tool to share the file. Now no advertising since I have used Onedrive

Accedi per commentare.

Risposte (0)





Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by