/******************************** Author: Sravanthi Kota Venkata ********************************/ #include "stitch.h" #include #include "extra.h" #define STITCH_MEM 1<<30 int main(int argc, char* argv[]) { SET_UP mallopt(M_TOP_PAD, STITCH_MEM); mallopt(M_MMAP_MAX, 0); int rows, cols; F2D *x, *y, *v, *interestPnts, *Fcur, *int1, *int2; I2D *Icur; int i, j; char im1[100], im2[100]; scanf("%s", im1); Icur = readImage(im1); rows = Icur->height; cols = Icur->width; for_each_job { v = harris(Icur); interestPnts = getANMS(v, 24); int1 = fMallocHandle(interestPnts->height, 1); int2 = fSetArray(interestPnts->height, 1, 0); for(i=0; iheight; i++) { asubsref(int1,i) = subsref(interestPnts,i,0); asubsref(int2,i) = subsref(interestPnts,i,1); } Fcur = extractFeatures(Icur, int1, int2); } #ifdef CHECK /** Self checking - use expected.txt from data directory **/ { int ret=0; float tol = 0.02; #ifdef GENERATE_OUTPUT fWriteMatrix(Fcur, argv[1]); #endif ret = fSelfCheck(Fcur, "expected_C.txt", tol); if (ret == -1) printf("Error in Stitch\n"); } #endif iFreeHandle(Icur); fFreeHandle(v); fFreeHandle(interestPnts); fFreeHandle(int1); fFreeHandle(int2); fFreeHandle(Fcur); WRITE_TO_FILE return 0; }