Open odiseo123 opened 7 years ago
I also encountered the same problem. After I read the source code, I found that maybe there is something wrong with Vocabulary.cpp. In the function void Vocabulary::transform(const cv::Mat &feature, WordId &word_id, WordValue &weight ) const
only considered the binary descriptors.
you could fix the bugs by yourself or use DBoW2 instead:)
Same Problem
I also encounter this problem. see the source code find the problem.
I met with the same problem using SIFT and SURF and finally sovled. Always no query results even there is a same image in the database. While I found that the distance is always inf after debugging step by step. I output the input variables in function "DescManip::distance(feature, m_nodes[id].descriptor)",then I checked both feature extraction method, they are not the same...This is the core problem for me.
I'm going to take a look at the problem and try to reproduce it, and solve it. Thanks for the info and sorry for the delay. I was busy with it. If somebody could post a patch with the solution it would be great! In any case, I moved long time ago to fbow. I strongly recommend using it. Why do you prefer DBOW3?
Has anyone found a solution to this issue? I'm using DBOW2 with SURF, but having issues there as well and I'd much rather have out-of-the-box support for SURF.
Hi Rafael, Thanks a lot for this code. I have compiled demo_general and some other demos that basically extend to other features I wanted to test. When matching images against themselves (method testVocCreation) the voc.score method returns a measure of how similar the images are based on the BowVectors v1, v2. Particularly one should obtain a score of 1 when matching the same images, for instance matching "image0.png" vs "image0.png". This is true in the demo program for BINARY features (orb, brisk, akaze). For FLOATING POINT features (surf in the demo) all image combinations return a score of "-0". I have further added SIFT to one of my own demos and I get the same result.
I have also played around with the vocabulary settings "WeightingType" and "ScoringType" as per documented in the DBoW repository. In all tests with floating point descriptors, I keep getting "-0" scores.
Could you point me as to what should be the vocabulary configuration for floating point descriptors? I am compiling in Win7 with VS2015 and OpenCV3.0 libraries.