Victor Image Processing Library How-to Tips

Watercolor Effect

The watercolor effect is created by smoothing out the irregularities in the image and then accentuating the color boundries.

original
Original
watercolor
Watercolor

Watercolor - the Source Code

This function will create a watercolor version of any grayscale or color image, 8- or 24-bit. Requires Victor Image Processing Library v 4.1x or higher.
int watercolor(imgdes *srcimg, imgdes *resimg)
{
   imgdes tmpsrc;
   int cols, rows, rcode;
   double gamma = 0.7;
   cols = CALC_WIDTH(srcimg);
   rows = CALC_HEIGHT(srcimg);
   allocimage(&tmpsrc, cols, rows, srcimg->bmh->biBitCount);
   copyimage(srcimg, &tmpsrc);
   
   gammabrighten(gamma, &tmpsrc, &tmpsrc);
   removenoise(&tmpsrc, &tmpsrc);
   removenoise(&tmpsrc, &tmpsrc);
   removenoise(&tmpsrc, &tmpsrc);
   sharpen(&tmpsrc, &tmpsrc);
   rcode = copyimage(&tmpsrc, resimg);
   freeimage(&tmpsrc);
   return(rcode);
}

Copyright © 1997 Catenary Systems Inc. All rights reserved. Victor Image Processing Library is a trademark of Catenary Systems.


Victor Image Processing Library homepage | Victor Sample Code