Search code examples
androidopencvfeature-detectionkdtree

kdtree training in opencv for ORB feature detector


I am working on real time object recognition using Opancv4android, i am able to detect, extract feature points using ORB detector and descriptor extractor from the image i capture using camera . Now, i want to build a Kdtree and train them with these feature points and later i match these feature points in the tree with feature points detected by the camera in real time and recognizance the object . Please help me on how do i go about building a KD tree in opencv or any pointers or references/tutorials on KDtree for opencv will be very helpful.


Solution

  • FLANN matcher (also this link)is based on the kd-tree, it is build automatically inside matcher.

    But I recommend you to use BFMatcher with Hamming distance - it is designed for binary descriptor as ORB in your case. Here is an example how it is used for FREAK (binary descriptor too).