From double 2 binary

3 ビュー (過去 30 日間)
Felix
Felix 2013 年 10 月 1 日
コメント済み: Walter Roberson 2013 年 10 月 1 日
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 日
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?
Walter Roberson
Walter Roberson 2013 年 10 月 1 日
BW = IM > (100/256)

サインインしてコメントする。

その他の回答 (0 件)

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by