Herror ::gen_measure_arc (
const HTuple &CenterRow,
const HTuple &CenterCol,
const HTuple &Radius,
const HTuple &AngleStart,
const HTuple &AngleExtent,
const HTuple &AnnulusRadius,
const HTuple &Width,
const HTuple &Height,
const HTuple &Interpolation,
long *MeasureHandle
)
Prepare the extraction of straight edges perpendicular to an annular arc.
::gen_measure_arc prepares the extraction of straight
edges which lie perpendicular to an annular arc. Here,
annular arc denotes a circular arc with an associated width. The
center of the arc is passed in the parameters CenterRow and
CenterCol, its radius in Radius, the starting
angle in AngleStart, and its angular extent relative to the
starting angle in AngleExtent. If AngleExtent >
0, an arc with counterclockwise orientation is generated, otherwise
an arc with clockwise orientation. The radius of the annular arc,
i.e., half its width, is determined by AnnulusRadius.
The edge extraction algorithm is described in the documentation of
the operator ::measure_pos. As discussed there, different
types of interpolation can be used for the calculation of the
one-dimensional gray value profile. For Interpolation =
'nearest_neighbor', the gray values in the measurement are
obtained from the gray values of the closest pixel, i.e., by
constant interpolation. For Interpolation =
'bilinear', bilinear interpolation is used, while for
Interpolation = 'bicubic', bicubic interpolation
is used.
With ::gen_measure_rectangle2, all computations which can be
used for multiple measurements are removed from the actual
measurement. To effect this, an optimized data structure, a
so-called measure object, is constructed and returned in
MeasureHandle. In order to perform the measurement at the
optimum speed, the size of the images for which subsequent
measurements will be made must already be specified in
::gen_measure_rectangle2 with the parameters Width
and Height. This technique increases the speed of the
actual measurement significantly.
Parameters
CenterRow (input_control)
|
point.y -> HTuple.double / long
|
|
Row coordinate of the center of the arc. |
|
Default value: 100.0 |
|
Suggested values: 10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0 |
|
Typical range of values: 0.0 <= CenterRow <= 511.0 (lin) |
|
Minimum increment: 1.0
|
Recommended increment: 10.0
|
CenterCol (input_control)
|
point.x -> HTuple.double / long
|
|
Column coordinate of the center of the arc. |
|
Default value: 100.0 |
|
Suggested values: 10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0 |
|
Typical range of values: 0.0 <= CenterCol <= 511.0 (lin) |
|
Minimum increment: 1.0
|
Recommended increment: 10.0
|
Radius (input_control)
|
number -> HTuple.double / long
|
|
Radius of the arc. |
|
Default value: 50.0 |
|
Suggested values: 10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0 |
|
Typical range of values: 0.0 <= Radius <= 511.0 (lin) |
|
Minimum increment: 1.0
|
Recommended increment: 10.0
|
AngleStart (input_control)
|
angle.rad -> HTuple.double / long
|
|
Start angle of the arc in radians. |
|
Default value: 0.0 |
|
Suggested values: -3.14159265359, -2.35619449019, -1.5707963268, -0.785398163398, 0.0, 0.785398163398, 1.5707963268, 2.35619449019, 3.14159265359 |
|
Typical range of values: -3.14159265359 <= AngleStart <= 3.14159265359 (lin) |
|
Minimum increment: 0.0314159265359
|
Recommended increment: 0.314159265359
|
AngleExtent (input_control)
|
angle.rad -> HTuple.double / long
|
|
Angular extent of the arc in radians. |
|
Default value: 6.28318530718 |
|
Suggested values: -6.28318530718, -5.49778714378, -4.71238898038, -3.926990817, -3.14159265359, -2.35619449019, -1.5707963268, -0.785398163398, 0.785398163398, 1.5707963268, 2.35619449019, 3.14159265359, 3.926990817, 4.71238898038, 5.49778714378, 6.28318530718 |
|
Typical range of values: -6.28318530718 <= AngleExtent <= 6.28318530718 (lin) |
|
Minimum increment: 0.0314159265359
|
Recommended increment: 0.314159265359
|
|
Restriction: AngleExtent != 0.0 |
AnnulusRadius (input_control)
|
number -> HTuple.double / long
|
|
Radius (half width) of the the annulus. |
|
Default value: 10.0 |
|
Suggested values: 10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0 |
|
Typical range of values: 0.0 <= AnnulusRadius <= 511.0 (lin) |
|
Minimum increment: 1.0
|
Recommended increment: 10.0
|
|
Restriction: AnnulusRadius <= Radius |
Width (input_control)
|
extent.x -> HTuple.long
|
|
Width of the image to be processed subsequently. |
|
Default value: 512 |
|
Suggested values: 128, 160, 192, 256, 320, 384, 512, 640, 768 |
|
Typical range of values: 0 <= Width <= 1024 (lin) |
|
Minimum increment: 1
|
Recommended increment: 16
|
Height (input_control)
|
extent.y -> HTuple.long
|
|
Height of the image to be processed subsequently. |
|
Default value: 512 |
|
Suggested values: 120, 128, 144, 240, 256, 288, 480, 512, 576 |
|
Typical range of values: 0 <= Height <= 1024 (lin) |
|
Minimum increment: 1
|
Recommended increment: 16
|
Interpolation (input_control)
|
string -> HTuple.char *
|
|
Type of interpolation to be used. |
|
Default value: 'nearest_neighbor' |
|
List of values: 'nearest_neighbor', 'bilinear', 'bicubic' |
MeasureHandle (output_control)
|
measure_id -> long *
|
|
Measure object handle. |
Result
If the parameter values are correct, the operator
::gen_measure_arc returns the value H_MSG_TRUE. Otherwise an
exception handling is raised.
Possible Predecessors
::draw_circle
Possible Successors
::measure_pos,
::measure_pairs
Alternatives
::edges_sub_pix
Module
Sub-pixel operators
Copyright © 1996-2002 MVTec Software GmbH