how to obtain Binary image ?? , Image binarization

Hi,
I intend to obtain the binary image. The intensity values of real image (varies from 0 to 4096) stored in the matrix, let's say 'h' . I tried to obtain the binarized images with the follwoing code, but I got some wierd image.. Do I need to play with the thresold ??
BW = imbinarize(h,'global');
imagesc(BW);

回答 (1 件)

Walter Roberson
Walter Roberson 2020 年 12 月 15 日

0 投票

imagesc uses the current colormap. After you use it
colormap(gray(2))

1 件のコメント

Turbulence Analysis
Turbulence Analysis 2020 年 12 月 15 日
Thanks for an reply, I tried this one. In fact, I switched to imshow (), but still I am not getting the expected image .. I have attached the real and binarized image for your refrence. .

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

質問済み:

2020 年 12 月 15 日

コメント済み:

2020 年 12 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by