Defining a Region of Interest for an IR file (Image) based on a threshold

2 vues (au cours des 30 derniers jours)
ariel byun
ariel byun le 23 Mar 2023
hello! I am currently trying to write a function that defines an ROI for an IR file based on a threshold of [0.3 - 1] and if the value is out of that threshold we don't include that in the ROI. I was looking at some functions such as the ninary mask but Im not sure I want to change any values to 0 or 1, i just want to keep the values of the image that is within that threshold. Thanks!

Réponses (1)

Image Analyst
Image Analyst le 23 Mar 2023
It's a generic, general purpose demo of how to threshold an image to find blobs, and then measure things about the blobs, and extract certain blobs based on their areas or diameters.
Basically
% Identify the pixels we want to include in our analysis.
mask = (thermalImage >= 0.3) & (thermalImage <= 1);
% Get mean of those pixels.
meanTemperature = mean(thermalImage(mask))

Community Treasure Hunt

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

Start Hunting!

Translated by