HOW TO FIND OUT MAXIMUM TEMPERATURE FROM EACH FRAME(My video has 225 frames) USING MATLAB ?
Show older comments

This Image frame I just took from my thermal simulation video.
Here temperature range: 20-degree Celcius to 84.02 degrees Celcius.
This video has 225 frames. I have to find the maximum temperature in each frame. Then I can plot Maximum temperature vs frames graph.
script:
% This will probably be the high temperature.
highTemp = 84.02;
% This will probably be the low temperature.
lowTemp = 20.05;
thermalImage = lowTemp + (highTemp - lowTemp) * mat2gray(indexedImage);
maxTemperature = max(thermalImage(:));
I was following this code but I am getting the same maximum temperature in each frame.
That is my problem.
I should get the actual maximum temperature in each frame. Then I can plot Maximum temperature vs frames graph.
could you please check this one?
6 Comments
Rik
on 3 Aug 2018
Are you sure you crop the legend? Otherwise that will show up as maximum value.
Antony Joseph
on 3 Aug 2018
Antony Joseph
on 3 Aug 2018
Florian Morsch
on 3 Aug 2018
Edited: Florian Morsch
on 3 Aug 2018
Since i dont know the rest of your code i just make a assumption:
thermalImage = lowTemp + (highTemp - lowTemp) * mat2gray(indexedImage);
maxTemperature = max(thermalImage(:));
if your mat2gray(indexedImage) is 1 at any point, then your math will bring lowTemp + (highTemp - lowTemp)*1, which equals highTemp. So your max(thermalImage(:)); will always have highTemp and so it will be 84.02. Have you checked which value you get from mat2gray(indexedImage);?
Also it could be possible that you indeed have a maximum of 84.02 in every image, so the output of 84.02 for every image could be correct.
Antony Joseph
on 3 Aug 2018
Antony Joseph
on 3 Aug 2018
Edited: Antony Joseph
on 3 Aug 2018
Accepted Answer
More Answers (0)
Categories
Find more on Contrast Adjustment in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


