Colored-pencil Effect

Although colored-pencil is also a popular drawing method,  I cannot find any paper that proposes an algorithm for this effect. But several commercial image processing software do have colored-pencil effect. Among them, I found Ulead PhotoImpact's colored-pencil effect is quite pleasing, so I decide to propose an algorithm that can produce a similar effect as Ulead.

If we compare the original image with the image created, there are two important points we should take into account:

1. Colored-pencil image is brighter than original image. It seems like that brightness is boosted up for colored-pencil effect.

2. Edges are enhanced for colored-pencil image.

The stroke models that we used for oil-paint effect won't be helpful for colored-pencil effect because it cannot preserve edge quite well. Intuitively, a non-linear area operation might be able to achieve this colored-pencil effect. This operation will not only be able to boost intensity for most pixels, but also it should perserve and enhance edges. Since boosting intensity linearly will push all pixel values to the high end, dynamic range of the image will decrease dramatically. To preserve and enhance edge we need to do more operations for edge so that the contrast across edge is still high. The actual algorithm that I propose is a 3*3 area operation. To simplify computation, I assume that each color channel is independent of other channels. So, for each color channel, the new pixel value will be:

New_Value(x,y)= Orig_Value(x,y) + Ratio * [ (255-Orig_Value(x,y)) * Mask( Max_diff (x,y) ) - Max_diff(x,y)*Orig_value(x,y)/100].

New_Value(x,y) is the new pixel value at position (x,y), Orig_Value(x,y) is the original image's pixel value at (x,y)
Ratio is a control factor for the intensity of colored-pencil effect, 0<Ratio<1.
Max_diff(x,y) is a function of  (x,y) 's 3*3 neighborhood. Let's suppose (i,j) are (x,y) 's neighbors, then Max_diff(x,y)= 0  if Orig_Value(x,y) > all (i,j)
otherwise, Max_diff(x,y)= Max( abs (Orig_Value(i,j) -Orig_Value(x,y)).
Mask
(...)= 1/ (Max_diff(x,y)/sqrt(Orig_Value(x,y)+1)/3+1)
Last component of the equation is chosen to enhance edges in a smooth and bright area like cloud.

Below lists resultant images produced by my algorithm and Ulead PhotoImpact, my algorithm is pretty close to the commercial software.

Bridge.jpg (13453 bytes)     bridge_colorpen.jpg (17978 bytes)     Bridge_coloredpen.jpg (17332 bytes)
                  Original Image                                         My colored-pencil effect                    Ulead PhotoImpact's Colored-pencil effect

woman.jpg (14771 bytes)     woman_colorpen.jpg (19699 bytes)    woman_coloredpen.jpg (20229 bytes)
                 Original Image                                         My colored-pencil effect                     Ulead PhotoImpact's Clored-pencil effect