Binary Image Library
|
#include <stdlib.h>
#include <math.h>
Data Structures | |
struct | CELL |
Functions | |
int | discrete_voronoi (int *seeds, int width, int height) |
Discrete Voronoi cell code.
Calculate Voronoi cells for a binary image. Useful if you don't need exact Voronoi tesselation.
by Malcolm McLean
int discrete_voronoi | ( | int * | seeds, |
int | width, | ||
int | height | ||
) |
Calculate discrete Voronoi cells.
[in] | seeds | - set empty cells to -1, filled cells to the value (usually unique for each point) |
width | - image width | |
height | - image height |
On output, seeds will be expanded to fill the Voronoi cell Where there is conflict, the top left-most seed wins (change neighbour scan routine to adjust).