FLANN은 SURF와 같은 4-byte floating point 기반 descriptor에서만 사용할 수 있다.
BRIEF는 (바이트 단위로 재구성된) 바이너리 스트링이기 때문에 FLANN을 사용하는 것은 어려울 듯.
ㅠㅠ
해결 방안은
1. SURF로 해본다. --> 일단은 이쪽으로 MH를 실험.
2. 다른 ANN 라이브러리를 찾는다.
http://opencv-users.1802565.n2.nabble.com/FLANN-help-td6185055.html
FLANN works with 4 bytes descriptors because needs to calculate distances and then uses floating point values.
Try to take a look at original FLANN documentation at FLANN site, but I'm pretty sure about it.
Walter
-----
Walter Lucetti
http://www.robot-home.it
-----
Inviato da Samsung Galaxy Tab
"huck.wach" <
[hidden email]> ha scritto:>I can make it work using SURF descriptors rather than BRIEF descriptors. And the only difference I can tell is that BRIEF uses 1 byte descriptors and SURF uses 4 byte. It seems like FLANN is expecting the 4 byte ones. I suppose I can convert the brief ones to 4 byte but that seems not the best option. Is there a way to ask FLANN to work with the 1 byte descriptors of BRIEF?
>
>--- In
[hidden email], "huck.wach" <huck.wach@...> wrote:
>>
>> I'm trying to follow the example in the two samples descriptor_extractor_matcher and matching_to_many_images. But I keep having runtime errors. In one attempt I try this...
>>
>> cv::FlannBasedMatcher matcher;
>> matcher.match( desc[0], desc[1], matches );
https://code.ros.org/trac/opencv/ticket/978
Ticket #978 (reopened enhancement)
Crash when using BruteForce-Hamming or BruteForce-HammingLUT descriptor matchers
Reported by: |
tijszwinkels |
Owned by: |
mdim |
Priority: |
minor |
Component: |
samples |
Version: |
SVN (trunk) |
Keywords: |
descriptor matcher compatibility |
Cc: |
yvonnic2m@… |
|
|
This crash can easily be reproduced with the matching_to_many_images sample program.
Both:
matching_to_many_images SURF SURF BruteForce?-Hamming foo.jpg foo.txt foodir
and
matching_to_many_images SURF SURF BruteForce?-HammingLUT foo.jpg foo.txt foodir
fail with the following error:
OpenCV Error: Assertion failed (DataType?<ValueType?>::type == queryDescriptors.type()) in commonKnnMatchImpl, file /home/tijs/src/OpenCV-svn/opencv/opencv/modules/features2d/include/opencv2/features2d/features2d.hpp, line 2132
terminate called after throwing an instance of 'cv::Exception'
what(): /home/tijs/src/OpenCV-svn/opencv/opencv/modules/features2d/include/opencv2/features2d/features2d.hpp:2132: error: (-215) DataType?<ValueType?>::type == queryDescriptors.type() in function commonKnnMatchImpl
Aborted
OpenCV version: Latest SVN (trunk@4844)
Kernel 2.6.32 x86_64
gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
Built with: SSE2 SSE3 SSSE3 TBB and CUDA among others.
Change History