MmeasCalculate()函数

Synopsis

Calculate measurements, using two markers.

Format

void MmeasCalculate(ContextId, Marker1Id, Marker2Id, MeasResultId, MeasurementList)

MIL_ID ContextId; Measurement context identifier
MIL_ID Marker1Id; Identifier of first marker
MIL_ID Marker2Id; Identifier of second marker
MIL_ID MeasResultId; Measurement result buffer identifier
long MeasurementList; List of measurements to calculate

Description

Calculate the specified measurements, using the specified markers. Edge and stripe markers must have been previously located in the target image with MmeasFindMarker. The position of point markers must have been previously set, using MmeasSetMarker.

The parameter settings of the specified measurement context control the behavior of this function and can be set with MmeasControl.

Results are stored in the specified measurement result buffer and can be obtained, using MmeasGetResult.

The ContextId parameter specifies the identifier of the measurement context. This parameter must be given a valid measurement context identifier or can be set to M_DEFAULT, in which case, the default measurement context of the current MIL application will be used.

The Marker1Id parameter specifies the identifier of the marker to use as the first reference position for calculating measurements.

The Marker2Id parameter specifies the identifier of the marker to use as the second reference position for calculating measurements.

The MeasResultId parameter specifies the identifier of the result buffer in which to place calculation results.

The MeasurementList parameter specifies which measurement(s) to calculate. The following lists the measurements that can be calculated. To calculate more than one measurement, add the predefined values together (for example, M_DISTANCE+M_ANGLE):

M_DISTANCE Calculate the distance between both markers.
M_ANGLE Calculate the angle of the line joining two markers, relative to the positive X-axis. The value can be any between 0° and 360°.
M_LINE_EQUATION Calculate the equation of the line joining both markers.
M_DEFAULT Perform all of the above calculations.

See also

MmeasGetResult, MmeasSetMarker, MmeasFindMarker

《MmeasCalculate()函数》上有2条评论

评论已关闭。