inlinestaticfloatLoG(floatx,floaty,floatdelta){floatd=-(x*x+y*y)/(2*delta*delta);return-1.0f/((float)(CV_PI)*pow(delta,4))*(1+d)*exp(d);}// Laplacian of Gaussian
template<typenameT>inlineTsqr(Tx){returnx*x;}// out of range risk for T = byte, ...
template<classT,intD>inlineTvecSqrDist(constVec<T,D>&v1,constVec<T,D>&v2){Ts=0;for(inti=0;i<D;i++)s+=sqr(v1[i]-v2[i]);returns;}// out of range risk for T = byte, ...
template<classT,intD>inlineTvecDist(constVec<T,D>&v1,constVec<T,D>&v2){returnsqrt(vecSqrDist(v1,v2));}// out of range risk for T = byte, ...