I need to know if this algorithm is known:
void getMatches(IpVec &ipts1, IpVec &ipts2, IpPairVec &matches, float ratio) { float dist, d1, d2; Ipoint *match; matches.clear(); for (unsigned int i = 0; i < ipts1.size(); i++) { d1 = d2 = FLT_MAX; for (unsigned int j = 0; j < ipts2.size(); j++) { dist = ipts1[i] - ipts2[j]; if (dist < d1)
class Ipoint { public: //! Destructor ~Ipoint() { }; //! Constructor Ipoint() : orientation(0) { }; //! Gets the distance in descriptor space between Ipoints float operator-(const Ipoint &rhs) { float sum = 0.f; for (int i = 0; i < 64; ++i) { //std::cout << i << "\n"; try { sum += (this->descriptor[i] - rhs.descriptor[i])*(this->descriptor[i] - rhs.descriptor[i]); } catch (char *str) { std::cout << "Caught some other exception: " << str << "\n"; } } return sqrt(sum); }; //! Coordinates of the detected interest point float x, y; //! Detected scale float scale; //! Orientation measured anti-clockwise from +ve x-axis float orientation; //! Sign of laplacian for fast matching purposes int laplacian; //! Vector of descriptor components float descriptor[64]; //! Placeholds for point motion (can be used for frame to frame motion analysis) float dx, dy; //! Used to store cluster index int clusterIndex; };
This compares the results of the SURF algorithm.
- Is this the nearest neighbor algorithm? It is like func looking for the closest point of each point.
- Can I do the same using Quadtree or kd-tree?
- Is there a better algorithm for comparing points of the image and know if they are the same or similar?
- Preferably I want to save them in mysql and build a kd tree to compare 1 image across all images, what is possible?
- Is RANSAC useful for anything in this task?
- Is there a way to catch false positives?
source share