Updated by Daniil Osokin almost 11 years ago


Hello

I just started with OpenCV with Cuda support and wrote a little project using SURF_GPU and found a strange behaviour:

in GPU.hpp:
explicit SURF_GPU(double _hessianThreshold, int _nOctaves=4,
int _nOctaveLayers=2, *bool _extended=false*, float _keypointsRatio=0.01f, bool _upright = false);

but also

modules/nonfree/src/surf_gpu.cpp
cv::gpu::SURF_GPU::SURF_GPU()
{
hessianThreshold = 100;
*extended = 1;*
nOctaves = 4;
nOctaveLayers = 2;
keypointsRatio = 0.01f;
upright = false;
}

This code therefore fails:
SURF_GPU sgpu;
assert( ! sgpu.extended);

but this one is valid:
SURF_GPU sgpu(100);
assert( ! sgpu.extended);

Passing a value for the hessianThreshold should not change the descriptor size.

Fixing this is trivial but would also probably break some programs.

Back