Clear Filters
Clear Filters

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

1 view (last 30 days)
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!

Answers (1)

Image Analyst
Image Analyst on 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.
% 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!