Gray to color image conversion

gray2rgb converts a gray image to RGB based on the colors of the source image

You are now following this Submission

This function converts a gray image to RGB based on the colors of the source image.
This code was originally inspired by the code gray2rgb by Jeny Rajan and Chandrashekar P.S. The code was optimized and rewritten to more closely achieve what was described in the paper "Transfering Color to Grayscale Images" by Welsh, Ashikhmin and Mueller. Identical results to Rajan's code are achieved much more quickly, especially for large images.

Cite As

David Mills (2026). Gray to color image conversion (https://www.mathworks.com/matlabcentral/fileexchange/61722-gray-to-color-image-conversion), MATLAB Central File Exchange. Retrieved .

Acknowledgements

Inspired by: Gray image to Color image conversion

Categories

Find more on Modify Image Colors in Help Center and MATLAB Answers

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0

Unnecessary file was removed from zip.