The pointillistic effect makes an image appear as if it had been painted in the style of Seurat with lots of little dots and dabs of paint. It is created by generating circular areas of color and enhancing them.
![]() Original |
![]() Pointillistic Effect |
int pointill(imgdes *srcimg, imgdes *resimg)
{
imgdes tmpsrc, tmp8;
int cols, rows, rcode;
static UCHAR kern1[10] = {0,-1,0,-1,5,-1,0,-1,0,1};
cols = CALC_WIDTH(srcimg);
rows = CALC_HEIGHT(srcimg);
allocimage(&tmpsrc, cols, rows, 24);
allocimage(&tmp8, cols, rows, 8);
if(srcimg->bmh->biBitCount == 8) {
convertpaltorgb(srcimg, &tmpsrc);
}
else {
copyimage(srcimg, &tmpsrc);
}
removenoise(&tmpsrc, &tmpsrc);
convertrgbtopalex(200, &tmpsrc, &tmp8, CR_OCTREEDIFF);
convertpaltorgb(&tmp8, &tmpsrc);
freeimage(&tmp8);
matrixconv(kern1, &tmpsrc, &tmpsrc);
if(srcimg->bmh->biBitCount == 8) {
rcode = convertrgbtopal(256, &tmpsrc, resimg);
}
else {
rcode = copyimage(&tmpsrc, resimg);
}
freeimage(&tmpsrc);
return(rcode);
}
Victor Image Processing Library homepage |
Victor Sample Code