Why NaN area is involved in segmented image?

3 ビュー (過去 30 日間)
Tian Tian
Tian Tian 2017 年 11 月 18 日
編集済み: Tian Tian 2017 年 11 月 19 日
I am using water-shed segmentation to segment objects (porous). But areas with NaN value set by codes, is still shown in segmented image (highlighted in color with other objects). Can anyone give me a clue? Thank you.
  2 件のコメント
Image Analyst
Image Analyst 2017 年 11 月 19 日
No. No image and no code mean no answer.
Tian Tian
Tian Tian 2017 年 11 月 19 日
編集済み: Tian Tian 2017 年 11 月 19 日
Thanks for reminding. Below is the code to convert to NaN value. for coloum = 1:width for row =1:height if (I(row,coloum)==0 | I(row,coloum)< 25) I(row,coloum)= nan; end end end In segmentation, I didn't mention any NaN value (only imopen, imclose, then segment).

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

回答 (1 件)

Tian Tian
Tian Tian 2017 年 11 月 19 日
I used below to convert to NaN: for coloum = 1:width for row =1:height if (I(row,coloum)==0 | I(row,coloum)< 25) I(row,coloum)= nan; end end end

Community Treasure Hunt

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

Start Hunting!

Translated by