#include "BIVISION.H"
RegionVectors * CALLBACK VectorizeRegionBorders( WORD ** RegionMatrix,
double dPrecisity,
int Width,
int Height)
Description
This function recieves a Region Matrix, and vectorizes the region borders. Vectorization of an arc is the approximating the arc with straight line segments. The line segments are given by control points. All the arcs are given by ordered point lists, where the first point is connected with the second, the second is connected with the third, etc. This function returns the segmented region borders. The returned segmented arcs are usually topologically circles, in this case the first point of the point list and the last point of the point list are adjacents. The function returns with the list of the point lists. The precisity of the approximating can be tuned. The less the dPrecisity (dPrecisity parameter is the maximum different between a line segment, and the farest point of the given arc segment to approximate) is, the more control points rises, the more accurate the approximating is, but the more time it costs. See the structure defines of the return value at Programming Notes.
Parameters
|
WORD ** |
RegionMatrix |
The input region matrix. |
|
double |
dPrecisity |
Maximum different between a line segment, and the farest point of the given arc segment to approximate. |
|
int |
Width |
Width of the input region matrix. |
|
int |
Height |
Height of the input region matrix. |
Return values
A list of point lists, that is the approximating of all the arcs on the Region Matrix.
Programming notes
typedef struct {
int x;
int y;
void * Next;
} RegionPoint;
typedef struct {
RegionPoint * lpRegPoint;
void * Next;
} RegionVectors;
At the last points and last vectors of the lists, the Next pointers are NULL.
Requirements
Header : Declared in BiVision.h; include BiVision.h.
Library : Use BiVision.lib.
DLLs : BiVision.dll.