Herror ::measure_projection (
    Hobject Image,
    const HTuple &MeasureHandle,
    HTuple *GrayValues
)
HTuple HImage::MeasureProjection (
    const HTuple &MeasureHandle
) const

Extract a gray value profile perpendicular to a rectangle.

::measure_projection extracts a one-dimensional gray value profile perpendicular to a rectangle. This is done by averaging the gray values in ``slices'' perpendicular to the major axis of the rectangle. The sampling is done at subpixel positions in the image Image at integer row and column distances (in the coordinate frame of the rectangle) from the center of the rectangle. Since this involves some calculations which can be used repeatedly in several projections, the operator ::gen_measure_rectangle2 is used to perform these calculations only once, and thus to increase the speed of ::measure_projection significantly. Since there is a trade-off between accuracy and speed in the subpixel calculations of the gray values, different interpolation schemes can be selected in ::gen_measure_rectangle2 (the interpolation only influences rectangles not aligned with the image axes). The measure object generated with ::gen_measure_rectangle2 is passed in MeasureHandle.


Parameters

Image (input_object)
singlechannelimage -> Hobject: HImage ( byte )
Input image.

MeasureHandle (input_control)
measure_id -> HTuple.long
Measure object handle.

GrayValues (output_control)
number-array -> HTuple.double *
Gray value profile.


Result

If the parameter values are correct the operator ::measure_projection returns the value H_MSG_TRUE. Otherwise an exception handling is raised.


Possible Predecessors

::gen_measure_rectangle2


Possible Successors

::close_measure


Alternatives

::gray_projections


Module

Sub-pixel operators



Copyright © 1996-2002 MVTec Software GmbH