image thumbnail


バージョン (1.29 KB) 作成者: Brett Shoelson
Conveniently extract individual z-planes (e.g., RGB) from an image or axes with one line.

ダウンロード 283 件

更新 2016/9/1


Extract individual planes from an MxNx3 image, or from an axis containing an MxNx3 image.

[R,G,B] = getImagePlanes(I)
Extracts the individual (color) planes from the MxNx3 image specified in I. I may be an image or an axes containing a single MXNx3 image.
I (finally) grew tired of typing:
r = img(:,:,1);
g = img(:,:,2);
b = img(:,:,3);
Now, it's just:
[r,g,b] = getImagePlanes(img);
[r,g,b] = getImagePlanes(gca);

instead! Simple, but useful!


Brett Shoelson (2022). getImagePlanes.m (, MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2014a
Windows macOS Linux
タグ タグの追加

Community Treasure Hunt

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

Start Hunting!