Maximum gray level from rgb image

2 views (last 30 days)
Esther
Esther on 14 Nov 2012
May i know what is the reason when user try to get the maximum gray level and use it in rgb image instead of rgb2gray? what is the need for getting the max gray level?

Answers (1)

Image Analyst
Image Analyst on 14 Nov 2012
I guess you mean getting a new gray scale image where each pixel is the max in either the red, green, or blue channel. I don't think I've done that. I guess whether someone may want to do that would depend on what kind of situation the person is encountering and their plan for an algorithm to process the image. We'd need more information to comment any further.
  6 Comments
Walter Roberson
Walter Roberson on 14 Nov 2012
I.A., this looks to me to thematically similar to the relative illumination correction calculation you sometimes show.
Image Analyst
Image Analyst on 15 Nov 2012
It does seem somewhat similar but I never do it that way. If you're going to do background correction (flat field correction) you wouldn't want to use the max or RGB because that would introduce color artifacts. You'd want to correct each channel at a time, otherwise you'd be doing some white balancing at the same time as you're doing flat fielding. And since the max rgb can change on a pixel by pixel basis, I think that would introduce more noise. In fact there's too much noise already so that's why I've changed from dividing by the "blank shot" image (after smoothing) to modeling the background with a 2D polynomial, and then divide by the perfectly smooth model. That eliminates ALL noise due to the background completely.
But there is one algorithm that uses the max of the RGB, and it's called (not surprisingly) the max-RGB algorithm ( http://www.uea.ac.uk/polopoly_fs/1.133567!troncoso-rey.pdf) and it's used to estimate an illuminant. Not sure if this is what she's trying to do, or if it's some kind of normalization she wants to do. For example going from RGB color space to HSL color space: http://www.easyrgb.com/index.php?X=MATH&H=18#text18

Sign in to comment.

Categories

Find more on Modify Image Colors in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!