Tiling Example

This example program performs various image processing operations on a tiled image. Just choose the processing operation and specify whether to highlight tile borders. Note that the tile borders are shown for the input image; those of the output image might be different (for example, for the function iplRotate).

To run the example from the command line, type:
> tile [-f<function =Blur>] [-highlight =No]

The source:

char* testFilterTiledImage( IplImage* srcimg, IplImage* dstimg, const char* filter )
{
   char funcname[32];
   int size = dstimg->width * dstimg->height;
   double xshift, yshift;

   switch( toupper(filter[0]) ) {
   case 'S' :
	   iplFixedFilter( srcimg, dstimg, IPL_SOBEL_3x3_V );
	   strcpy( funcname, "Sobel V3x3" );
      break;
...
   case 'R' :
      iplGetRotateShift( Width/2, Height/2, 33, &xshift, &yshift);
	   iplRotate( srcimg, dstimg, 33, xshift, yshift, IPL_INTER_LINEAR );
	   strcpy( funcname, "Rotate L33" );
      break;
   default :
	   strcpy( funcname, "Unknow Functions" );
      break;
   }
   sprintf( title, "%s", funcname );
   return title;
}

You can see here that tiled images are proccessed just like non-tiled images. Note that you have to implement the tiling system using CallBack function. The following function is used in the example

void __stdcall tileCallback( const IplImage *shape, int xindex, int yindex, int mode ) {

   switch( mode ) {
   case IPL_GET_TILE_TO_READ :
   case IPL_GET_TILE_TO_WRITE:
      getTile( (IplImage*)shape, xindex, yindex );
      break;
   case IPL_RELEASE_TILE:
      putTile( shape, xindex, yindex );
      break;
   }
}

* Legal Information © 1998-2000, Intel Corporation