lightness= rgb2lightness(rgb)converts RGB color values to lightness values, excluding the color components.lightnessis same as the L* component in the CIE 1976 L*a*b* color space.
Converted lightness values, returned as anm-by-nimage array. If the input data type isdouble, the output data type isdouble. Otherwise, the output data type issingle.
Data Types:single|double
Extended Capabilities
C/C++ Code Generation Generate C and C++ code using MATLAB® Coder™.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.