Definition at line 129 of file HarrisLaplaceDetector.h. References DoMaxPoints(), Impala::Core::Array::GaussDerivative(), mPrecision, Impala::Core::Array::Mul(), Impala::Core::Array::MulVal(), mUseRecGauss, and Impala::Core::Array::RecGauss(). Referenced by CHLDetector(), and HLDetector(). 00132 { 00133 Real64 sigmaIntegr = sigmaN; 00134 Real64 sigmaDiff = 0.7125 * sigmaN; 00135 00136 // compute Lx and Ly Gaussian derivatives 00137 Array2dScalarReal64* Lx = 0; 00138 Array2dScalarReal64* Ly = 0; 00139 if(mUseRecGauss) 00140 { 00141 RecGauss(Lx, imIntensity, sigmaDiff, sigmaDiff, 1, 0, mPrecision); 00142 RecGauss(Ly, imIntensity, sigmaDiff, sigmaDiff, 0, 1, mPrecision); 00143 } else { 00144 GaussDerivative(Lx, imIntensity, sigmaDiff, 1, 0, mPrecision); 00145 GaussDerivative(Ly, imIntensity, sigmaDiff, 0, 1, mPrecision); 00146 } 00147 00148 // VERY IMPORTANT: SCALE MULTIPLIER! 00149 Array2dScalarReal64* Lx2 = 0; // aka mu11 00150 Mul(Lx2, Lx, Lx); 00151 MulVal(Lx2, Lx2, sigmaDiff * sigmaDiff); 00152 00153 Array2dScalarReal64* Ly2 = 0; // aka mu22 00154 Mul(Ly2, Ly, Ly); 00155 MulVal(Ly2, Ly2, sigmaDiff * sigmaDiff); 00156 00157 Array2dScalarReal64* LxLy = 0; // aka mu12/mu21 00158 Mul(LxLy, Lx, Ly); 00159 MulVal(LxLy, LxLy, sigmaDiff * sigmaDiff); 00160 00161 delete Lx; 00162 delete Ly; 00163 00164 // compute Harris 00165 Array2dScalarReal64* harrisOutput = 0; 00166 Array::Harris<Array2dScalarReal64>(harrisOutput, Lx2, Ly2, LxLy, 00167 sigmaIntegr, harrisK, mUseRecGauss); 00168 00169 delete Lx2; 00170 delete Ly2; 00171 delete LxLy; 00172 00173 DoMaxPoints(harrisOutput, std::back_inserter(pointList), harrisThreshold); 00174 00175 // write the Harris cornerness to an image on disk 00176 /*std::string output = "debug.png"; 00177 Array2dVec3UInt8* buf = ArrayCreate<Array2dVec3UInt8> 00178 (harrisOutput->CW(), harrisOutput->CH()); 00179 GetRgbPixels(harrisOutput, buf->CPB(), std::string("Stretch")); 00180 00181 WritePng(buf, output); 00182 delete buf;*/ 00183 00184 delete harrisOutput; 00185 }
Here is the call graph for this function:
|