Victor Image Processing Library How-to Tips

Pointillistic Effect

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.

Pointillistic Effect

Pointillistic Effect - the Source Code

This function creates a pointillistic version of a grayscale or color image, 8- or 24-bit. Requires Victor Image Processing Library v 4.1x or higher.
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);
   matrixconv(kern1, &tmpsrc, &tmpsrc);
   if(srcimg->bmh->biBitCount == 8) {
      rcode = convertrgbtopal(256, &tmpsrc, resimg);
   else {
      rcode = copyimage(&tmpsrc, resimg);

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