Merge pull request #23204 from whuaegeanse:fix-sift

pull/23214/head
Alexander Alekhin 2 years ago
commit cb2052dbfe
  1. 3
      modules/features2d/src/sift.simd.hpp

@ -850,7 +850,6 @@ else // CV_8U
#endif
}
#else
float* dst = dstMat.ptr<float>(row);
float nrm1 = 0;
for( k = 0; k < len; k++ )
{
@ -860,6 +859,7 @@ else // CV_8U
nrm1 = 1.f/std::max(nrm1, FLT_EPSILON);
if( dstMat.type() == CV_32F )
{
float *dst = dstMat.ptr<float>(row);
for( k = 0; k < len; k++ )
{
dst[k] = std::sqrt(rawDst[k] * nrm1);
@ -867,6 +867,7 @@ if( dstMat.type() == CV_32F )
}
else // CV_8U
{
uint8_t *dst = dstMat.ptr<uint8_t>(row);
for( k = 0; k < len; k++ )
{
dst[k] = saturate_cast<uchar>(std::sqrt(rawDst[k] * nrm1)*SIFT_INT_DESCR_FCTR);

Loading…
Cancel
Save