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

4 visualizaciones (últimos 30 días)
pietro
pietro el 5 de Ag. de 2019
Editada: pietro el 5 de Ag. de 2019
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,
Pietro
clear all
v = VideoReader('C:\Users\serbr\Desktop\GRMN8722.MP4');
i=0;
TargetBoundingBox=[804 678 100 38];
NotFound=[];
while hasFrame(v)
i=i+1;
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, ...
Speed{i}.WordConfidences);
end
end
  2 comentarios
Walter Roberson
Walter Roberson el 5 de Ag. de 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
pietro el 5 de Ag. de 2019
I have used a different tool to share the file. Now no advertising since I have used Onedrive

Iniciar sesión para comentar.

Respuestas (0)

Etiquetas

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by