Defining a Region of Interest for an IR file (Image) based on a threshold
조회 수: 2(최근 30일)
표시 이전 댓글
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!
댓글 수: 0
답변(1개)
Image Analyst
2023년 3월 23일
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))
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!