display problem

2 ビュー (過去 30 日間)
Mohammad Golam Kibria
Mohammad Golam Kibria 2011 年 6 月 20 日
I have a colored Image matrix I of size 296X444X3;
and a 2D matrix I1 of size 296X444.
I1 have some values having 1.
I want to show of that portion of I where I1 have values 1; using the following code:
figure,imshow(I(I1==1))
it shows me the following problem:
Warning: Image is too big to fit on screen; displaying at 1% > In imuitools\private\initSize at 73 In imshow at 262 In standardwithcannyedge at 743

採用された回答

Andrei Bobrov
Andrei Bobrov 2011 年 6 月 20 日
Iout = I;
Iout(repmat(logical(I1),[1,1,3]))=0;
imshow(Iout)
corrected
Iout = I;
Iout(~repmat(logical(I1),[1,1,3]))=0;
imshow(Iout)
  1 件のコメント
Mohammad Golam Kibria
Mohammad Golam Kibria 2011 年 6 月 21 日
Thanks,It is correct but I dont understand the code bellow:
Iout(~repmat(logical(I1),[1,1,3]))=0;
what this line is doing?

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

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by