Binary Image Library
|
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "heap.h"
Data Structures | |
struct | APOINT |
Functions | |
int | astar (unsigned char *binary, int width, int height, int sx, int sy, int ex, int ey, int **pathx, int **pathy) |
A* path finding algorithm, for binary images.
It finds the path between two points by gradually expanding shells of accessible points round the two points until they meet.
Many thanks to Richard Heathfield for the heap (priority queue).
int astar | ( | unsigned char * | binary, |
int | width, | ||
int | height, | ||
int | sx, | ||
int | sy, | ||
int | ex, | ||
int | ey, | ||
int ** | pathx, | ||
int ** | pathy | ||
) |
A star path finding algorithm.
[in] | binary | - the binary image |
width | - image width | |
height | - image height | |
sx | - start point x-coordinate | |
sy | - start point y-coordinate | |
ex | - end point x coordinate | |
ey | - end point y coordinate | |
[out] | pathx | - return for x-coordinates of path (malloced) |
[out] | pathy | - return for y-coordinates of path (malloced) |