Clear Filters
Clear Filters

Why using gray images for coding in matlab

2 views (last 30 days)
When we done coding in matlab, I always see converting RGB images into gray ..What is the need for it?

Accepted Answer

Walter Roberson
Walter Roberson on 13 Aug 2015
What is a fundamental difference between Real Numbers and Complex Numbers? Answer: Real Numbers are Orderable but Complex Numbers are not.
As soon as you have multiple dimensions to an object (Red is a dimension, Green is a dimension, Blue is a dimension) then you cannot Order the objects, cannot compare them in a unique manner. Is Mauve "greater than" Pale Green?
A lot of image processing works by making comparisons (of various values). If you cannot Order the values because they are multi-dimensional then you cannot do the comparisons (except for testing if they are identical.)
Converting to grayscale is one of the possible Projections of the 3D space of images into the Plane. There are other possible ways, including computing Hue. Somewhere or other Image Analyst has some demonstration code that involves computing PCA (Principle Component Analysis) on the color values, determining the strongest "direction" through the color space, because some aspects of what humans perceive as color do not happen to match brightness (grayscale.) For example "color persistence", that we continue to identify a color as (say) "red" under a variety of light levels and colors of lights, is not determined by brightness.

More Answers (0)

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!