Extracting text from a video
70 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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!
0 commentaires
Réponses (2)
Cris LaPierre
le 3 Nov 2022
You'll need to use OCR (optical character recognition). See this page: https://www.mathworks.com/help/vision/ug/recognize-text-using-optical-character-recognition-ocr.html
You can find more details and some examples here: https://www.mathworks.com/help/vision/text-detection-and-recognition.html
You may also find the answers in this post helpful: https://www.mathworks.com/matlabcentral/answers/24685-text-detection-extraction-in-video
0 commentaires
KSSV
le 3 Nov 2022
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 commentaires
KSSV
le 3 Nov 2022
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.
Voir également
Catégories
En savoir plus sur Language Support dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!