Skip to content

NovakovaMaria/Color2GrayImgConversion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Color2GrayImgConversion

Implementation of color-to-gray image conversion using salient colors and radial basis functions.

Short Description

This method employs quantization of an image’s salient colors combined with radial basis functions (RBFs) to convert color images to grayscale. It optimizes contrast retention by mapping a small set of dominant colors, identified through k-means clustering, to corresponding grayscale intensities. This ensures the preservation of important visual contrasts in the resultant grayscale images, making it effective for applications where contrast fidelity is crucial.

Additionally, this method adapts differently when converting natural versus synthetic images. For natural images, which often have a wider range of colors and subtler gradients, the process focuses on preserving the richness and depth of the original scene. For synthetic images, which typically feature more defined and fewer colors, the conversion emphasizes clarity and accuracy in replicating the distinct colors and sharp contrasts. Examples of conversions for both natural and synthetic images are provided below.

Three main steps of this color-to-gray image conversion:

1. Quantization Process
2. Assigning Gray Values
3. Final Image Rendering

Acknowledgements

Usage

Compilation

make

Execution

./ZhangWan24 [<input_image>] [<max_k>] [<sigma>] 
  • input_image is color image input for conversion,
  • max_k is maximum number of quantized colors (clusters),
  • sigma controls the spread of the Laplace kernel's influence.

Examples Of The Conversion

Natural image before conversion Natural image after conversion

Synthetic image before conversion Synthetic image after conversion

About

Implementation of color-to-gray image conversion using salient colors and radial basis functions (Zhang L., Wan Y.; Feb. 22, 2024)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors