You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
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!
Cite As
Brett Shoelson (2026). getImagePlanes.m (https://se.mathworks.com/matlabcentral/fileexchange/47461-getimageplanes-m), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.0.0.1 (1.29 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
