getImagePlanes.m

版本 1.0.0.1 (1.3 KB) 作者: Brett Shoelson
Conveniently extract individual z-planes (e.g., RGB) from an image or axes with one line.
283.0 次下载
更新时间 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);
or
[r,g,b] = getImagePlanes(gca);

instead! Simple, but useful!

引用格式

Brett Shoelson (2024). getImagePlanes.m (https://www.mathworks.com/matlabcentral/fileexchange/47461-getimageplanes-m), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2014a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Grid Lines, Tick Values, and Labels 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.1

Updated license

1.0.0.0