#include "imagealgebra.h"
#include "display.h"

// define some macros

#define IAP IA_IntPoint
#define IAIPS IA_IntPointSet
#define IAIDI IA_IntDiscreteImage
#define IADT IA_IntDDTemplate

main()
{
int Dimension=2;  // 2-d images and templates
int NumPoints=5;   // 5 points in template

// creation of template

IAP PointArray[] = {IAP(0,0), IAP(0,1), IAP(1,0), IAP(-1,0), IAP(0,-1)};
IAIPS PointSet(Dimension, PointArray, NumPoints);


// reading input image

IAIDI a=IAIDI::read_PGM("/cis/vision/cap6657/images/sr71.noisy.pgm");

// display input

display(to_uchar(a));
}
