getImagePlanes.m

Conveniently extract individual z-planes (e.g., RGB) from an image or axes with one line.
283 Downloads
Aktualisiert 1. Sep 2016

Lizenz anzeigen

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!

Zitieren als

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

Kompatibilität der MATLAB-Version
Erstellt mit R2014a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Grid Lines, Tick Values, and Labels finden Sie in Help Center und MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Veröffentlicht Versionshinweise
1.0.0.1

Updated license

1.0.0.0