Inconsistent default parameters for SURF_GPU (Bug #3616)
Description
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.
Associated revisions
Merge pull request #3616 from marvins:gdal-fixes
History
Updated by Nikolas Engelhard almost 11 years ago
- Assignee deleted (
Vladislav Vinogradov)
Updated by Daniil Osokin almost 11 years ago
Hi, thanks for the attention. Please, send a pull request with fix (http://code.opencv.org/projects/opencv/wiki/How_to_contribute).
- Description changed from Hello I just started with OpenCV with Cuda support and wrote a little proje... to Hello I just started with OpenCV with Cuda support and wrote a little projec... More
- Assignee set to Nikolas Engelhard
Updated by Nikolas Engelhard almost 11 years ago
Hello Daniil
I'll try to submit a patch but I won't have the time in the next weeks.
Updated by Daniil Osokin almost 11 years ago
Thanks, Nikolas! Looking forward to your pull request!
- Assignee changed from Nikolas Engelhard to Vladislav Vinogradov
Updated by Sergei Nosov almost 11 years ago
- Status changed from New to Open
Updated by Maksim Shabunin over 9 years ago
Issue has been transferred to GitHub: https://github.com/Itseez/opencv/issues/4722