returns a vector of four images:
Please note that because the haar response basically soes a convolution with a kernel of size 2 and we don't have a border, the resulting images are 1 pixel smaller in both directions than the source image. We construct both x and y response at the same time in the functions HaarFirstLine and HaarSecondLine. Because we need to read two lines in the source image to write one line in the destination image HaarFirstLine initialises the pixels in the destination image. HaarSecondLine modifies the values set by HaarFirstLine. Definition at line 75 of file HaarResponse.h. References Impala::Core::Array::Abs(), Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::H(), HaarFirstLine(), HaarSecondLine(), and Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::W(). Referenced by DSurf(), and Impala::Core::Feature::TestFunctions::testHaar(). 00076 { 00077 std::vector<Array::Array2dScalarReal64*> response; 00078 int w = image->W()-1; 00079 int h = image->H()-1; 00080 response.push_back(new Array::Array2dScalarReal64(w, h, 0, 0)); 00081 response.push_back(new Array::Array2dScalarReal64(w, h, 0, 0)); 00082 for(int y=0 ; y<image->H()-1 ; ++y) 00083 { 00084 HaarFirstLine(response, image, y); 00085 HaarSecondLine(response, image, y+1); 00086 } 00087 response.push_back(new Array::Array2dScalarReal64(w,h,0,0)); 00088 response.push_back(new Array::Array2dScalarReal64(w,h,0,0)); 00089 Abs(response[2],response[0]); 00090 Abs(response[3],response[1]); 00091 return response; 00092 }
Here is the call graph for this function:
|