Subdividing the Image

Jun 19, 2008 at 5:00 PM
When running Dijkstra's algorithm on the gradient image, you will notice that it is necessary to subdivide the image in order to make it run fast enough.  The question is how much padding to use for a particular subsection of the image.  A large amount of padding will slow the algorithm significantly, but it will give an accurate path.  If you don't use any padding, then the algorithm will run faster, but the shortest path will tend to make unexpected detours.  There is usually a good balance between too much and not enough padding.