フィルターのクリア

How to display 3D image in each layer?

2 ビュー (過去 30 日間)
lina
lina 2012 年 11 月 8 日
回答済み: SK 2017 年 10 月 7 日
Hi everyone,
I have an bmp image, let say it's 256x256x3 uint8 I need to show up the image in each layer :
image1 : 256x256x1
image2 : 256x256x2
image3 : 256x256x3
Could you help me guys?
thanks in advance

採用された回答

Grzegorz Knor
Grzegorz Knor 2012 年 11 月 8 日
Just clear unnecessary channels:
I = imread('http://www.3drealms.com/zerohour/images/zhbackground.bmp');
figure
r = I;
r(:,:,2:3) = 0;
imshow(r)
figure
g = I;
g(:,:,[1 3]) = 0;
imshow(g)
figure
b = I;
b(:,:,1:2) = 0;
imshow(b)
  1 件のコメント
lina
lina 2012 年 11 月 8 日
thanks Grzegorz

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

その他の回答 (1 件)

SK
SK 2017 年 10 月 7 日
Hello, I am new to matlab, and trying to understand the logic behind getting size of each input layer of image Grzegorz Knor can u please explain whats happening within following lines of code u mentioned r = I; r(:,:,2:3) = 0; imshow(r) figure g = I; g(:,:,[1 3]) = 0; imshow(g) figure b = I; b(:,:,1:2) = 0; thanks

カテゴリ

Help Center および File ExchangeRead, Write, and Modify Image についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by