File Exchange

image thumbnail

exploreRGB

version 1.14.0.1 (158 KB) by Brett Shoelson
Simple utility to view all color planes, grayscale, and colorspace conversions of an RGB image.

8 Downloads

Updated 01 Sep 2016

View License

Takes as an input an RGB image (or the name/path of an RGB image) and creates a figure in which you can see side-by-side the original, the grayscale (RGB2GRAY), and the individual R,G, and B color planes.
Advanced mode also displays some colorspace conversions (HSV, YCbCr, L*a*b*) of the image.
Click on any image to expand it and then right-click to export image to base workspace.

Shift-Click to generate Command-Line MATLAB code!

This is a very simple but useful utility for deciding, for instance, how you want to process/segment a color image.

Cite As

Brett Shoelson (2020). exploreRGB (https://www.mathworks.com/matlabcentral/fileexchange/19706-explorergb), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (16)

Nithya, "actual luminance" is a bit hard to pinpoint in this sense, but perhaps the closest you can get to the "definition of luminance" is:

cform = makecform('srgb2xyz');
xyz = applycform(rgb,cform);
lum = xyz(:,:,2);

This is a "relative luminance." That is, it is a luminance with respect to a reference white. The reference white can be adjusted by using the 'WhitePoint' parameter to makecform.

Cheers,
Brett

Nithya

Is the luminance from YCBCR the actual luminance. In case of hdr image(from 5 ldr images)can this be used to find the actual luminance data from this method.

Xidian NO.1

thanks

@MM:

[Note: MM indicated to me in an email that he was getting "file 'file_open.png' not found" errors.]

I verified that 'file_open.png' is included in the zip. Would you please download the submission again and ensure that all files are on your MATLAB path?

Thanks,
Brett

M M

It doesn't seem to work for me...

Suraj Kamya

Although converting images in to different forms is very easy. But way you represent in GUI is very nice.

@Amir:
Please see my comment of 18 Oct, 2010.
Thanks, Brett

Error in exploreRGB (line 176)
expandAxes(ax)

I dont know why I got the following error, otherwise you did great job!!!

Undefined function 'expandAxes' for input arguments of type
'double'.

Error in exploreRGB (line 176)
expandAxes(ax)

Yufei

Brett -
I found explore RGB because I was attempting to replicate your code on Steve's blog.

PLEASE NOTE: To use the new version, you will need to EITHER download EXPANDAXES (http://www.mathworks.com/matlabcentral/fileexchange/18291-expandaxes) OR comment out the corresponding line (line 173). (I recommend the former!)
Cheers,
Brett

As of today, the new code is live herein. Thanks for the interest!
Brett

Hi all,
A few people have contacted me to let me know that this version is not the same as that shown on my guest blog on "Steve on Image Processing." I'm not sure why this function wasn't updated, but I recently re-submitted my modifications; it should be up shortly. In the meantime, if anyone wants to email me directly at char(cumsum([98 16 -13 15 0 -70 69 -11 7 -10 7 7 -4 -1 -46 45 -12 19 -12 15 -8 3 -7 8 -69 53 12 -2])), I will be happy to send the updated file via email.
Cheers,
Brett

Hi Paul,
Thanks very much for drawing my attention to this problem. The file is marked with a modification date of 6/21/10, but the associated code predates that. I don't know why that is, but I will look into how that happened, and I will make sure to put the more recent code on the File Exchange. In the meantime, I would be more than happy to email you a copy of the updated version of exploreRGB. (Just let me know.)
By the way, how did you happen to find your way to exploreRGB today, if you don't mind my asking?
Regards,
Brett

Great function, except the "mode control" does not seem to be in the updated code. The file I downloaded only has a date of 4/24/2008.

Eric Dick

I love this. This is a great tool for showing people RGB concepts. I love how this displays the images in such an elegant layout.

Updates

1.14.0.1

Updated license

1.14.0.0

Now includes Shift-click capabilities to generate MATLAB code at the Command Line!
Also, call customGray directly from ExploreRGB.
Verifies R14b readiness.

1.11.0.0

Now incorporates toggling from normal to advanced mode, to show or hide colorspace conversions.

1.10.0.0

Better image import, better exportability, better default behavior...

1.9.0.0

2/1/11 Minor modification to provide a handle to the window; facilitates closing or referring to exploreRGB window.

1.8.0.0

Somehow, my previous attempt to update to include "advanced mode" failed. Trying again. Also, changing the image to show advanced-mode.

1.6.0.0

Updated M file and license text file copyright to The MathWorks, Inc.

1.4.0.0

added copyright

1.2.0.0

Expande "mode" control--now allows 'Simple" mode, with suppression of export capabilities, and 'Advanced' mode, with additional viewing of HSV, LAB, and YCbCr conversion spaces.

MATLAB Release Compatibility
Created with R2008a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired by: expandAxes(hndls,rotEnable)

Inspired: imageToolbar