Code covered by the BSD License  

Highlights from
exploreRGB

4.0

4.0 | 7 ratings Rate this file 63 Downloads (last 30 days) File Size: 128 KB File ID: #19706
image thumbnail

exploreRGB

by

 

24 Apr 2008 (Updated )

Simple utility to view all color planes, grayscale, and colorspace conversions of an RGB image.

| Watch this File

File Information
Description

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 (requires expandAxes) and then right-click to export image to base workspace.

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

Acknowledgements

Expand Axes inspired this file.

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.6 (R2008a)
Other requirements For full benefit, also download: http://www.mathworks.com/matlabcentral/fileexchange/18291-expandaxes
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (16)
12 Nov 2013 Brett Shoelson

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

12 Nov 2013 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.

17 Oct 2013 Xidian NO.1

thanks

16 May 2013 Brett Shoelson

@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

16 May 2013 M M

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

07 Apr 2013 Suraj Kamya

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

10 Mar 2013 Brett Shoelson

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

09 Mar 2013 Amir Pasha Mahmoudzadeh

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)

28 Oct 2010 Yufei  
22 Oct 2010 J.Paul Rinehimer

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

18 Oct 2010 Brett Shoelson

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

18 Oct 2010 Brett Shoelson

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

12 Oct 2010 Brett Shoelson

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

09 Oct 2010 Brett Shoelson

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

08 Oct 2010 J.Paul Rinehimer

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.

02 Sep 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
18 Feb 2010

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.

04 May 2010

added copyright

21 Jun 2010

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

12 Oct 2010

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

02 Feb 2011

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

28 Mar 2013

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

28 Mar 2013

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

Contact us