Functions | |
I32 | clip (I32 N, I32 *xy_src, I32 *xy_dst, I32 x_max, I32 x_min, I32 y_max, I32 y_min) |
Performs Window-Clipping for Coordinates at a Pixellist. More... | |
void | translate (I32 N, I32 *xy_src, I32 *xy_dst, I32 mx, I32 my) |
Translates Coordinates of a Pixellist. More... | |
I32 | PL_line_stats (I32 *xy, I32 nr, vcline *line, F32 *dmin, F32 *dmax, F32 *sigma) |
Line Statistics for a Pixellist (I32 integer variant). More... | |
I32 | PL_line_statsF (F32 *xy, I32 nr, vcline *line, F32 *dmin, F32 *dmax, F32 *sigma) |
Line Statistics for a Pixellist (F32 floating point variant). More... | |
I32 | PL_line_ending (I32 *xy, I32 nr, vcline *line, I32 *imin, I32 *imax) |
Pixellist Extrema regarding to a Line's Direction (I32 integer variant). More... | |
I32 | PL_line_endingF (F32 *xy, I32 nr, vcline *line, I32 *imin, I32 *imax) |
Pixellist Extrema regarding to a Line's Direction (F32 floating point variant). More... | |
F32 | PL_line_bendingF (F32 *xy, I32 nr, vcline *line) |
Calculate a Bending Factor of a Line Shaped Pixellist. More... | |
void | PL_transform (I32 N, I32 *xy_src, I32 *xy_dst, I32 mx, I32 my, F32 sx, F32 sy) |
Linear Transforms Coordinates of a Pixellist. More... | |
void | PL_reverse (I32 *xylist, I32 n) |
Reverse Order of Elements at a Pixellist. More... | |
The function performs window-clipping for the (x, y) coordinates in the pixellist. The coordinates are copied from xy_src
to xy_dst
, if they are in a rectangle defined by x_min
, x_max
, y_min
and y_max
, i.e. (x_min
<= x < x_max
) and (y_min
<= y < y_max
) It is allowed to use the function in-place, i.e. xy_dst
= xy_src
.
N | Count of Coordinates in xy_src |
xy_src | Source Pixellist. |
xy_dst | Destination Pixellist. |
x_min,x_max,y_min,y_max | Borders, see Text. |
Count | Count of Coordinates in the result list xy_dst . |
The function performs a translation operation for the (x, y) coordinates in the pixellist xy_src
. The vector (mx
, my
) is added to all coordinates, the result is written to xy_dst
. It is allowed to use the function in-place, i.e. xy_dst
= xy_src
.
N | Count of Coordinates in xy_src and xy_dst . |
xy_src | Source Pixellist. |
xy_dst | Destination Pixellist. |
mx,my | Translation. |
The function calculates some statistics for a line that comes in two representations:
line
in normalized vector representation,xy
).The normalized vector representation could be the output of the function bestline(), the line between the first and the last point of the list or any other preferred line. The pixel-list xy
could be the result of the contour algorithm, a Hough-line, extracted with the function GetHoughPixels(), or any other source.
The function parses through the points in the list and calculates the closest distance to the theoretical line line
. It outputs the minimum (dmin
, should be a negative value or 0, representing a deviation on one side of the line) and the maximum (dmax
, should be a positive value or 0, representing a deviation on the other side of the line) and the standard deviation sigma
, which is the square root of the sum of the squared differences divided by the number nr
of pixels in the list.
ERR_NONE | On Success. |
The function calculates some statistics for a line that comes in two representations:
line
in normalized vector representation,xy
).The normalized vector representation could be the output of the function bestline(), the line between the first and the last point of the list or any other preferred line. The pixel-list xy
could be the result of the contour algorithm, a Hough-line, extracted with the function GetHoughPixels(), or any other source.
The function parses through the points in the list and calculates the closest distance to the theoretical line line
. It outputs the minimum (dmin
, should be a negative value or 0, representing a deviation on one side of the line) and the maximum (dmax
, should be a positive value or 0, representing a deviation on the other side of the line) and the standard deviation sigma
, which is the square root of the sum of the squared differences divided by the number nr
of pixels in the list.
ERR_NONE | On Success. |
The function calculates the first and the last pixel of the pixel-list in the direction of vcline* line
and outputs the index of the corresponding coordinate. When the pixel-list is the result of a contour-following or the output of the function GetHoughPixels(), the pixels in the list are not ordered in general as a line. The function can also use arbitrary pixel-list and output the minimum and maximum coordinate in a given direction specified by vcline* line
. The coordinate of the minimum and maximum pixels are then retrieved as follows:
ERR_NONE | On Success. |
The function calculates the first and the last pixel of the pixel-list in the direction of vcline* line
and outputs the index of the corresponding coordinate. When the pixel-list is the result of a contour-following or the output of the function GetHoughPixels(), the pixels in the list are not ordered in general as a line. The function can also use arbitrary pixel-list and output the minimum and maximum coordinate in a given direction specified by vcline* line
. The coordinate of the minimum and maximum pixels are then retrieved as follows:
ERR_NONE | On Success. |
Input to the function is the F32 floating point pixel-list xy
which is interpreted as data of a 'real' line. line
should be the ideal line or best-line calculated with the xy-data. The function calculates a heuristic 'bending value' for the xy-line which is higher if the line has a higher curvature. Pixels in the middle third of the line are averaged and compared to the rest of the line excluding 5 % of the line at its endings. The F32 output of the function has a magnitude in the order of the average pixel distance from the ideal line.
Reverse sequence of elements in pixel list.
The function operates in-place, i.e. the input list and the output list are identical.
xylist | pixel list input and output (in-place) |
n | number of element-pairs in pixel list |
The function performs a translation operation for the (x, y) coordinates in the pixellist xy_src
. The vector (mx
, my
) is added to all coordinates, then each component is scaled by its respective scale value sx
or sy
, the result is written to xy_dst
. It is allowed to use the function in-place, i.e. xy_dst
= xy_src
.
N | Count of Coordinates in xy_src and xy_dst . |
xy_src | Source Pixellist. |
xy_dst | Destination Pixellist. |
mx,my | Translation. |
sx,sy | Scale. |