subroutine of DSurf - extract from the collection of images 'features'; at the point (x,y) a feature that we will store in vector 'v' x and y are assumed to be in range of the image considering spatiality
Definition at line 37 of file DSurf.h. Referenced by DSurf(). 00040 { 00041 double length = 0.; 00042 int begin = 0; 00043 for(int f=0 ; f<features.size() ; ++f) 00044 { 00045 for(int j=y ; j<y+spatiality ; ++j) 00046 for(int i=x ; i<x+spatiality ; ++i) 00047 { 00048 double v = features[f]->Value(i,j); 00049 vector[begin++] = v; 00050 length += v*v; 00051 } 00052 } 00053 // normalize the vector that we just added 00054 if(length != 0) 00055 { 00056 length = sqrt(length); 00057 for(int i=0 ; i<features.size() * spatiality * spatiality; i++) 00058 vector[i] /= length; 00059 } 00060 }
|