how can i find value of hue component of a pixel of image in matlab.
1 view (last 30 days)
Show older comments
how can i find value of hue component of a pixel of image in matlab.i want to find average pixel intensity in hsv plane to calculate exposure of lightness of image using function given in attachment
Answers (2)
Walter Roberson
on 1 Jun 2015
rgb2hsv() . But if you are looking for intensity that is more commonly calculated by rgb2gray(), or perhaps hsl coordinates would make more sense for intensity than hsv would.
0 Comments
Image Analyst
on 1 Jun 2015
Try rgb2hsv(). See my File Exchange for a demo. http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
1 Comment
Image Analyst
on 1 Jun 2015
"Lightness" is the L in LAB color space. It's a somewhat complicated function that you can find here. The gray in rgb2gray() is a similar weighted sum of the R, G, and B. The "v" in hsv is the value and is like L and gray, but it doesn't really depend on ALL the color channels, just the maximum one: http://www.easyrgb.com/index.php?X=MATH&H=20#text20
You say that you want the "hue component of a pixel of image in matlab...to find average pixel intensity". This doesn't make sense. Intensity is a loosely defined, non-specific term that in layman's usage doesn't line up well with the optical sciences terms. There are lots of "intensity" terms in optics that are all sort of related but different. For example the "intensity" of an image is really like a luminous energy, not intensity , and has units of energy, not intensity. For a dizzying ride down the path of optical units, see http://en.wikipedia.org/wiki/Luminous_intensity - don't worry if you get confused, even people in the optics field get confused because there are so many similar, related, but different concepts.
See Also
Categories
Find more on Optics 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!