// Segmentation.h -- data structure for segmentation // // Copyright © Daniel Scharstein, 2004. // /////////////////////////////////////////////////////////////////////////// // a structure to store a segment struct CSegXYT { int nPix; // number of pixels float col[3]; // average color int root; // index of equivalent segment (itself initially) int num; // "cleaned up" number during renumbering int xmin, xmax, ymin, ymax; // bounding box // constructors CSegXYT() {} CSegXYT(int n, float c0, float c1, float c2, int r) : nPix(n), root(r), num(r) {col[0] = c0; col[1] = c1; col[2] = c2;} }; // prototype // defined in Segmentation.cpp void diffuseAndSegmentImage(CByteImage* im, CByteImage *seg, int iters, int difThresh, int segThresh, int mergeThresh, int colorByIndex, int nFrames, int minSize,int output);