CSCI 5280 Project 3

Contrast Preserving Decolorization

 

Xiong Yuanjun

SID: 1155018814

2013.3.26

 

 

1 Project Files

Matlab Code

Test Images

Output Images

 

 

2 Project Description

Decolorization - the process to transform a color image to a grayscale one - is a basic tool in digital printing, stylized black-and-white photography, and in many single channel

image processing applications

Model

The decolorization function is defined as g = f(c), which is a mapping from color image c to gray image g.

The mapping function is further expressed as

where {m} is the set of monomial basis and {w} is the corresponding coefficients.

With the weak color order assumption, the energy function w.r.t parameter {w} can be finally written as

Algorithm

The overall algorithm is like this

3 Implementation

The implementation is using MATLAB with the skeleton code provided. The main acceleration skill is to use 2D filter [1,-1] and [1;-1] to get the difference between neighbors.

 

4 Experiments

Test Images

Here we got 10 test images, with different contents. They are

Description: Description: Description: C:\Course\Image Processing and CV\Projects\3\cpcolor2gray code\test images\1.png        Description: Description: Description: C:\Course\Image Processing and CV\Projects\3\cpcolor2gray code\test images\2.png         Description: Description: Description: C:\Course\Image Processing and CV\Projects\3\cpcolor2gray code\test images\3.png            Description: Description: Description: C:\Course\Image Processing and CV\Projects\3\cpcolor2gray code\test images\4.png         Description: Description: Description: C:\Course\Image Processing and CV\Projects\3\cpcolor2gray code\test images\5.png

                            Image 1                                                                                       Image 2                                                                              Image 3                                                                                       Image 4                                                                     Image 5

 

Description: Description: Description: C:\Course\Image Processing and CV\Projects\3\cpcolor2gray code\test images\6.png        Description: Description: Description: C:\Course\Image Processing and CV\Projects\3\cpcolor2gray code\test images\7.png                   Description: Description: Description: C:\Course\Image Processing and CV\Projects\3\cpcolor2gray code\test images\8.png              Description: Description: Description: C:\Course\Image Processing and CV\Projects\3\cpcolor2gray code\test images\9.png             Description: Description: Description: C:\Course\Image Processing and CV\Projects\3\cpcolor2gray code\test images\10.png

                            Image 6                                                                                       Image 7                                                                                                          Image 8                                                                                                 Image 9                                                                                                          Image 10

 

Parameters

In this program, there is one only one parameter we need to set. That is the variation of Gaussian functions, .

Here I use the

 

Experiment Results

Then we get 10 output image, listed below. Their original image are shown next to each image.

Description: Description: Description: C:\Course\Image Processing and CV\Projects\3\cpcolor2gray code\outImage\1.png Description: Description: Description: C:\Course\Image Processing and CV\Projects\3\cpcolor2gray code\test images\1.png

Description: Description: Description: C:\Course\Image Processing and CV\Projects\3\cpcolor2gray code\outImage\2.png Description: Description: Description: C:\Course\Image Processing and CV\Projects\3\cpcolor2gray code\test images\2.png

Description: Description: Description: C:\Course\Image Processing and CV\Projects\3\cpcolor2gray code\outImage\3.png Description: Description: Description: C:\Course\Image Processing and CV\Projects\3\cpcolor2gray code\test images\3.png

Description: Description: Description: C:\Course\Image Processing and CV\Projects\3\cpcolor2gray code\outImage\4.png Description: Description: Description: C:\Course\Image Processing and CV\Projects\3\cpcolor2gray code\test images\4.png

Description: Description: Description: C:\Course\Image Processing and CV\Projects\3\cpcolor2gray code\outImage\5.png Description: Description: Description: C:\Course\Image Processing and CV\Projects\3\cpcolor2gray code\test images\5.png

Description: Description: Description: C:\Course\Image Processing and CV\Projects\3\cpcolor2gray code\outImage\6.png Description: Description: Description: C:\Course\Image Processing and CV\Projects\3\cpcolor2gray code\test images\6.png

Description: Description: Description: C:\Course\Image Processing and CV\Projects\3\cpcolor2gray code\outImage\7.png Description: Description: Description: C:\Course\Image Processing and CV\Projects\3\cpcolor2gray code\test images\7.png

Description: Description: Description: C:\Course\Image Processing and CV\Projects\3\cpcolor2gray code\outImage\8.png Description: Description: Description: C:\Course\Image Processing and CV\Projects\3\cpcolor2gray code\test images\8.png

Description: Description: Description: C:\Course\Image Processing and CV\Projects\3\cpcolor2gray code\outImage\9.png Description: Description: Description: C:\Course\Image Processing and CV\Projects\3\cpcolor2gray code\test images\9.png

Description: Description: Description: C:\Course\Image Processing and CV\Projects\3\cpcolor2gray code\outImage\10.png Description: Description: Description: C:\Course\Image Processing and CV\Projects\3\cpcolor2gray code\test images\10.png

 Numeric Evaluation

Using the function ccpr(), we get the following ccpr value:

Text Box: MY  		67.13         65.7        64.74        63.25        62.34        60.95        59.65        58.74        57.67        56.82        55.81
YUV  		58.24        56.38        55.26        53.84        52.87        51.71        50.56         49.7        48.52        47.98        47.06
CIE LAB  	56.32        54.73        53.74        52.35        51.49        50.25        48.86         47.9        46.76        46.24        45.53
 

 

 

 

 


We can set that the CCPR significantly improved the contrast of decolorized picture.

 

 

Return To Course Page