Image thresholding using min and max pixel intensity values
조회 수: 13 (최근 30일)
이전 댓글 표시
Mayke De Freitas Santos
2018년 9월 3일
댓글: Mayke De Freitas Santos
2018년 9월 3일
Hi,
I'm trying to create a mask based on a minimum and maximum intensity value. All the examples I find are basically thresholding the image from a fixed value (say, 176) to 255. What I need to do is to mask pixels between 165 and 166 to find ROIs on the image.
Thanks!
댓글 수: 0
채택된 답변
Image Analyst
2018년 9월 3일
Try this:
mask = grayImage >= 165 & grayImage <= 166 % Mask of only pixels with GLs of 165 and 166
grayImage(~mask) = 0; % blacken outside the mask.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!