Image threshold value question
조회 수: 3 (최근 30일)
이전 댓글 표시
Hello guys, Normally we set one value 'a', then we have [0 a]= black, [a 255]=white My question is, can we do it like this way, [0 a]=black, [a b]=white, [b 255]=black I hold you can understand my terrible description.
댓글 수: 0
채택된 답변
Image Analyst
2013년 2월 20일
Sure, just do two comparisons:
binaryImage = grayImage >= a & grayImage <= b;
댓글 수: 0
추가 답변 (1개)
Thorsten
2013년 2월 20일
I = imread('cameraman.tif');
a = 100; b = 150;
ind = setdiff(find(I > a), find(I < b));
B = logical(size(I));
B(ind) = 1;
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!