SIFT algorithm and KD tree - algorithm

I'm actually trying to implement image matching using SIFT algorithm.
But I'm actually stuck, and I wonder if you can help me.
I have the first step ( the descriptors, with x and y, and all the 128 features vectors ) and I'm now trying to do the KD-tree in order to search the nearest neighbor of each descriptors. I understood the concept of kd-tree, but I don't understand on what I have to separate the descriptors. I have to make the KD-tree based on their (x,y)? If yes, how can it helps me, since I have to find the nearest neighbor using the descriptor? Maybe I have not understand what I had to understand?
Thanks in advance!
Best regards!

Related

Algorithm to move points to get given distance

I am working on a tool which modifies geometries. One task is to move points that their (Euclidian) distances among each other are bigger than a given distance by considering that the sum of the moved ways is a minimum. A non-iterative solution which does not measure distances in between is preferred.
I need a algorithm in 3d, but a 1d or 2d explanation as a starting point would be very welcome.
The later coding will be in Python. In case a solution already exists I would use it.
A link to a book or paper related to this problem would be also helpful.
Thanks Hans G

Basic continuous 2D map exploration ( with obstacles ) algorithms

Here is the problem: There is a map which size is anywhere from 200*200 pixels to 1000*1000 pixels. Each pixel is a third of an inch in length/width.
The map has walls coming from it (which can be of any size), and can be pre-processed by any means. However, when the problem starts, a robot (of pixel size 18*18) is placed in an unknown location, along with several obstacles and one goal, all of which are in an unknown location.
If the robot bumps into any wall/object/goal it immediately dies. As such it has a simple laser scanner that perfectly sees an 80*80 pixel square ahead of it,centered on the robot.
I have already solved the problem of localizing the robot and determining its position (within a small error) on the grid. I am having a bit of trouble with making a good algorithm for going across the entire map until the goal is found.
I have the idea of making the robot go to the lower right, and somehow sweeping left to right, avoiding obstacles, and walls, until the goal is found, however I am unsure of a good way to do that.
Are there any decent algorithms for such a thing, or are there better ones for what I am trying to do?
You are looking for Pathfinding Algorithms
Some suggestions include "Flood Fill" algorithm or "Dijkstra’s algorithm" very similar to Lee's algorithm (I might even argue they are the same), but it's just another term to search for
This is probably the most popular simple path finding algorithm: "A*search" (a star Search) this link also showcases a few other path finding algorithms. (Another helpful link).
The key with a*star search is that you must know where you are (localization) and where the goal is. Dijkstra type algorithms are able to find the goal without prior knowledge of its location.
The one and only algorithm that comes to my mind is a simple Lee algorithm. Here's a pretty decent tutorial about what it does and how it works.
Using this algorithm you should be able to find all the obstacles and eventually find the goal, also you will find the shortest path to the goal.
The only big difference is that you have to move an 80x80 object instead of a 1x1 object, but I will let you deal with the way you will implement this.

I am looking for an algorithm to solve a "sliding puzzle", the kind of puzzle where you have an image broken into 16 pieces in a 4x4 frame

I am looking for an algorithm to solve a "sliding puzzle", the kind of puzzle where you have an image broken into 16 pieces in a 4x4 frame, that you try to reassemble for a scrambled starting position.
This particular puzzle has a restriction, the rows move only to the right (and wrap around), the whole row at once and the columns move only up (and wrap around), the whole column at once, both in one-tile steps.
Is the math too complex?
Anyone has experience with this kind of problem?
This link will provide you the answer. They talk about the different distance functions used by the heuristic. A* is simpler to find open source implementations of.
as for pretty much any problem, one "easy/simple" method to solve such a problem is to represent puzzle states as a graph, and use a graph search / path finding algorithm (DFS,BFS,Dijkstra,A*,etc.). Maybe there is some genius special algorithm that fits this problem better, but you would probably need quite a lot of insight to get better than A* / bidirectional dijkstra.

How to find the intersection between cuboid and tetrahedron efficiently

I need an efficient approach to finding the intersection of a cuboid and a tetrahedron.
I am new to CGAL but got some basic experience in using it. Currently, I am following a post and using the suggested intersection operation N1 * N2, where N1,N2 are Nef polyhedrons. But it is not efficient and in fact VERY slow.
Anyone can help with an even more efficient usage of CGAL or the similar library to do this.
If any possibility, a simple tutorial example would be mostly appreciated.
Thank you very much and I appreciate your any hint.
Rong

Nearest Neighbor Searching using Voronoi Diagrams

I've successfully implemented a way to generate Voronoi diagrams in 2 dimensions using Fortune's method. But now I'm trying to use it for nearest neighbor queries for a point (which is not one of the original points used to generate the diagram). I keep seeing people saying that it can be done in O(lg n) time (and I believe them), but I can't find a description of how it's actually done.
I'm familiar with binary searches, but I can't figure out a good criteria to guarantee that upper bound. I also figured maybe it could have to do with inserting the point into the diagram and updating surrounding cells, but can't think (or find) of a good way to do that.
Can anyone clue me in, or point to a place with a more thorough description?
I think that some kind of search structure has to be made from plane subdivision (Voronoi diagram), like Kirkpatrick's point location data structure.

Resources