11 #define debug(format, ...) fprintf (stderr, (format),## __VA_ARGS__); fflush(stderr)
12 #define debug_lineno() debug("%-25s line %4d \n", __func__, __LINE__ )
15 #define IMG_IN_NAME "images/mask.png"
16 #define IMG_OUT_NAME "images/test-image-%s.png"
40 int main(int argc
, char **argv
)
42 struct timeval tv1
, tv2
;
45 IplImage
*mask
= cvLoadImage(IMG_IN_NAME
, CV_LOAD_IMAGE_UNCHANGED
);
46 //IplImage *im_out = cvCreateImage(CvSize size, int depth, int channels);
47 //IplImage *im_out = cvCloneImage(im);
49 gettimeofday(&tv1
, NULL
);
52 IplImage
*im_out
= test_find_edges_hist(im_in
);
53 //IplImage *im_out = test_find_edges(im_in);
56 gettimeofday(&tv2
, NULL
);
57 t
= ((tv2
.tv_sec
- tv1
.tv_sec
) * 1000000 +
58 tv2
.tv_usec
- tv1
.tv_usec
);
59 printf("took %u microseconds (%0.5f of a frame)\n",
60 t
, (double)t
* (25.0 / 1000000.0));
64 if(asprintf(&filename
, IMG_OUT_NAME
, "final") == -1){};
65 cvSaveImage(filename
, im_out
, 0);