how to convert from grayscale to rgb by lightness method ??
3 views (last 30 days)
Show older comments
Hanan Elsayed
on 24 Aug 2021
Commented: Hanan Elsayed
on 24 Aug 2021
how to convert from grayscale to rgb by lightness (desaturation) method (matlab code)??

Accepted Answer
Turlough Hughes
on 24 Aug 2021
Edited: Turlough Hughes
on 24 Aug 2021
You can do the following:
I=imread('peppers.png');
newImage = uint8(( double(min(I,[],3)) + double(max(I,[],3)) ) ./ 2);
imshow(newImage)
More Answers (0)
See Also
Categories
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!