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

2 ビュー (過去 30 日間)
pietro
pietro 2019 年 8 月 5 日
編集済み: pietro 2019 年 8 月 5 日
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 件のコメント
pietro
pietro 2019 年 8 月 5 日
I have used a different tool to share the file. Now no advertising since I have used Onedrive

サインインしてコメントする。

回答 (0 件)

タグ

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by