Measurement examples
The Measurement example MMeas.cpp demonstrates how to find a stripe in an image and measure its position, width, and angle.
[Image: MeasExample2.png]
This example also demonstrates how to find the average position, average width, and average angle of a row of pins on a chip.
[Image: Example1.png]
In addition, the example shows you how to perform drawing operations and return measurement statistics.
Code example: mmeas.cpp
Circle markers and advanced settings
There are also examples regarding circle markers and advanced measurement settings. These examples illustrate how to handle:
- A simple circle. [Image: MeasurementCircleProcessingExample.png] In this case, a circle is found with default settings.
- A circle with two possible outer edges (circles).
[Image: MeasurementCircleProcessingExampleDoubleEdge.png]
In this case, only the outermost circle must be measured. To achieve proper results,
MmeasSetMarkerwithM_MAX_ASSOCIATION_DISTANCE(restricts edges) was used. - A circle that is both incomplete and textured (can detect many edges).
[Image: MeasurementCircleProcessingExampleOcclusion.png]
In this case, only the main circle must be measured. To achieve proper results,
MmeasSetMarkerwithM_EDGEVALUE_MINwas set above the default (reduces noise) andM_MAX_ASSOCIATION_DISTANCEwas given a value (restricts edges). - Concentric circles.
[Image: MeasurementCircleProcessingExampleNumerousCircles.png]
In this case, only the inner-most circle must be measured. To achieve proper results,
MmeasSetMarkerwithM_MAX_ASSOCIATION_DISTANCE(restricts edges) was used. Also, the strength score characteristic was removed and a radius score characteristic was set, usingMmeasSetScorewithM_STRENGTH_SCOREandM_RADIUS_SCORE(locates smallest circle).
To run these examples, use the Aurora Imaging Example Launcher in the Aurora Imaging Control Center.