HALCON Reference Manual 10.0.2
Table of Contents / 1D Measuring ClassesClassesClasses | | | Operators

measure_projectionT_measure_projectionmeasure_projectionMeasureProjectionMeasureProjection (Operator)

Name

measure_projectionT_measure_projectionmeasure_projectionMeasureProjectionMeasureProjection — Extract a gray value profile perpendicular to a rectangle or annular arc.

Signature

measure_projection(Image : : MeasureHandle : GrayValues)

Herror T_measure_projection(const Hobject Image, const Htuple MeasureHandle, Htuple* GrayValues)

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

HTuple HImage::MeasureProjection(const HMeasure& MeasureHandle) const

HTuple HMeasure::MeasureProjection(const HImage& Image) const

void HOperatorSetX.MeasureProjection(
[in] IHUntypedObjectX* Image, [in] VARIANT MeasureHandle, [out] VARIANT* GrayValues)

VARIANT HMeasureX.MeasureProjection([in] IHImageX* Image)

VARIANT HImageX.MeasureProjection([in] IHMeasureX* MeasureHandle)

static void HOperatorSet.MeasureProjection(HObject image, HTuple measureHandle, out HTuple grayValues)

HTuple HMeasure.MeasureProjection(HImage image)

HTuple HImage.MeasureProjection(HMeasure measureHandle)

Description

measure_projectionmeasure_projectionmeasure_projectionMeasureProjectionMeasureProjection extracts a one-dimensional gray value profile perpendicular to a rectangle or annular arc. This is done by averaging the gray values in “slices” perpendicular to the major axis of the rectangle or arc. The sampling is done at subpixel positions in the image ImageImageImageImageimage 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_rectangle2gen_measure_rectangle2gen_measure_rectangle2GenMeasureRectangle2GenMeasureRectangle2 is used to perform these calculations only once, thus increasing the speed of measure_projectionmeasure_projectionmeasure_projectionMeasureProjectionMeasureProjection 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_rectangle2gen_measure_rectangle2gen_measure_rectangle2GenMeasureRectangle2GenMeasureRectangle2 (the interpolation only influences rectangles not aligned with the image axes). The measure object generated with gen_measure_rectangle2gen_measure_rectangle2gen_measure_rectangle2GenMeasureRectangle2GenMeasureRectangle2 is passed in MeasureHandleMeasureHandleMeasureHandleMeasureHandlemeasureHandle.

Attention

It should be kept in mind that measure_projectionmeasure_projectionmeasure_projectionMeasureProjectionMeasureProjection ignores the domain of ImageImageImageImageimage for efficiency reasons. If certain regions in the image should be excluded from the measurement a new measure object with appropriately modified parameters should be generated.

Parallelization

Parameters

ImageImageImageImageimage (input_object)  singlechannelimage objectHImageHImageHImageXHobject (byte / uint2 / real)

Input image.

MeasureHandleMeasureHandleMeasureHandleMeasureHandlemeasureHandle (input_control)  measure_id HMeasure, HTupleHMeasure, HTupleHMeasureX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong)

Measure object handle.

GrayValuesGrayValuesGrayValuesGrayValuesgrayValues (output_control)  number-array HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Gray value profile.

Result

If the parameter values are correct the operator measure_projectionmeasure_projectionmeasure_projectionMeasureProjectionMeasureProjection returns the value 2 (H_MSG_TRUE). Otherwise an exception is raised.

Possible Predecessors

gen_measure_rectangle2gen_measure_rectangle2gen_measure_rectangle2GenMeasureRectangle2GenMeasureRectangle2

Possible Successors

close_measureclose_measureclose_measureCloseMeasureCloseMeasure

Alternatives

gray_projectionsgray_projectionsgray_projectionsGrayProjectionsGrayProjections

Module

1D Metrology


Table of Contents / 1D Measuring ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH