Hello, I have an image from type double and i want to convert it to binary format with my threshold. Then I try this code:
for i=1:426
for j=1:640
if IM(i,j)>100
bw(i,j)=250
elseif IM(i,j)<100
bw(i,j) =1
end
end
end
it doesn't work.
another way: bw= IM > 100; also doesn't work/ can u help me? thnx
P.S. I can't use this ways only then i work in type - double

 채택된 답변

Walter Roberson
Walter Roberson 2013년 10월 1일

0 개 추천

images of type double are in the range 0 to 1.

댓글 수: 2

Felix
Felix 2013년 10월 1일
So how can I do binarization to this image?
BW = IM > (100/256)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

태그

아직 태그를 입력하지 않았습니다.

질문:

2013년 10월 1일

댓글:

2013년 10월 1일

Community Treasure Hunt

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

Start Hunting!

Translated by