bagofwords (Bug #1859)
Description
在bagofwords.cpp文件下的compute函数,其中最后一个参数Mat* _descriptors是用来返回检测出keypoints对应的descriptors,但是返回结果始终为空。经过跟踪代码发现函数体中的Mat descriptors是用来保存检测的descriptors。估计原因是在Mat descriptors = _descriptors ? *_descriptors : Mat(); 而在调用compute函数时_descriptors 是不为空的,descriptors 的值应该指向 _descriptors 内存空间,不知道为什么最后结果为空。如果在函数体最后加入一条语句
if (_descriptors)
{
*_descriptors=descriptors.clone();
}
函数就正常返回keypoints对应的descriptors。
Associated revisions
Merge pull request #1859 from SpecLad:string-plus-equals
History
Updated by Alexander Shishkov almost 13 years ago
You can reopen this bug after providing English description. At the moment I can't understand your problem.
- Status changed from Open to Cancelled
- Category changed from features2d to trash
Updated by Alexander Shishkov almost 13 years ago
- Target version set to 2.4.0