29 images =
new IplImage *[nblev];
33 for (
int i=1; i<
nbLev; ++i) {
35 im->depth, im->nChannels);
40 for (
int i=0; i<
nbLev; ++i)
41 cvReleaseImage(&
images[i]);
47 for (
int i=1; i<
nbLev; ++i)
53 IplImage *im = cvLoadImage(filename, color);
56 cerr << filename <<
": unable to load image.\n";
76 for (
int i=from; i<to; ++i) {
81 return x << ( from - to );
83 return x >> ( to - from );
92 return x * float(1 << (from-to));
94 return x / float(1 << (to-from));
99 if (( x >= (
unsigned)
images[0]->width ) || ( y >= (
unsigned)
images[0]->height ))
102 for (
int i=0; i<
nbLev; ++i) {
112 for (
int i=0; i<
nbLev; ++i)
119 for (
int i=1; i<
nbLev; ++i)
127 for (
int i=0; i<
nbLev; ++i) {
132 cvSetImageROI(
images[i], r);
138 for (
int i=0; i<
nbLev; ++i) {
139 cvResetImageROI(
images[i]);