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 spaciality
Definition at line 38 of file DSurf.h. Referenced by DSurf(). 00041 { 00042 double length = 0.; 00043 int begin = vector.size(); 00044 vector.reserve(begin + (features.size()*spaciality*spaciality)); 00045 for(int f=0 ; f<features.size() ; ++f) 00046 { 00047 for(int j=y ; j<y+spaciality ; ++j) 00048 for(int i=x ; i<x+spaciality ; ++i) 00049 { 00050 double v = features[f]->Value(i,j); 00051 vector.push_back(v); 00052 length += v*v; 00053 } 00054 } 00055 // normalize the vector that we just added (so ignore the part before 00056 // 'begin') 00057 if(length != 0) 00058 { 00059 length = sqrt(length); 00060 for(int i=begin ; i<vector.size() ; ++i) 00061 vector[i] /= length; 00062 } 00063 }
|