The watercolor effect is created by smoothing out the irregularities in the image and then accentuating the color boundries.
![]() Original |
![]() Watercolor |
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);
}
Victor Image Processing Library homepage |
Victor Sample Code