Extracting text from a video

I need to extract from the videos the 'Max' values that appear on green on the right part of the screen. I need to make a temperature curve using this values. Really don't know how to extract the text from each of the frames of the video.
Thanks in advance!

回答 (2 件)

KSSV
KSSV 2022 年 11 月 3 日

1 投票

v = VideoReader('Large_Patron_Trim\Large_Patron_Trim.mp4');
N = v.NumFrames ; % Total number of rames
ROI = [1008 215 50 32]; % REgion of interest. Found out using imcrop as this region is same in every frame
Tmax = zeros(N,1) ; % initialie the required
% loop for each frame
for i = 1:N
fprintf('At %d frame of %d frames\n',i,N) ;
frame = read(v,i); % REad the frame
str = ocr(frame,ROI) ; % get the value using ocr
Tmax(i) = str2double(str.Words) ;
end

2 件のコメント

Zakíe Assad
Zakíe Assad 2022 年 11 月 3 日
Hi! Thanks for uor help. I found a problem in the last line, when I excute it, it says: 'Unable to perform assignmente because the left and right sides have a differente number of elements'. Can you help me with this, please?
KSSV
KSSV 2022 年 11 月 3 日
Explore the options of ocr....the problem would be that frame str.Words would have got two cell arrays.. Try to apply some logic to solve it.
Thanks is accepting/ voting the answer.

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

カテゴリ

ヘルプ センター および File ExchangeLanguage Support についてさらに検索

製品

リリース

R2018a

質問済み:

2022 年 11 月 3 日

コメント済み:

2022 年 11 月 3 日

Community Treasure Hunt

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

Start Hunting!

Translated by