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

조회 수: 4 (최근 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
Walter Roberson
Walter Roberson 2019년 8월 5일
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 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