| MIL 10 Reference
| Customize Help
| Save Settings

MbeadVerify



See also
Availability
Not available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
Next
Synopsis
Verify beads in the target image according to their corresponding template.
Syntax
void MbeadVerify(
MIL_ID ContextBeadId, //in
MIL_ID TargetImageBufId, //in
MIL_ID ResultBeadId, //in
MIL_INT64 ControlFlag //in
)
Description

This function verifies that beads in the target image conform to their corresponding templates in the context. Results of the measured bead are written in the provided result buffer and can be read using MbeadGetResult(). To retrieve whether a measured bead has passed or failed the specifications of its template, use the M_STATUS result. To draw results, use MbeadDraw().

Before your first call to MbeadVerify(), you must train the context using MbeadTrain(). Certain modifications to the bead context, such as adding, deleting, or modifying templates with MbeadTemplate(), or changing some control settings with MbeadControl(), require you to retrain the context before any subsequent call to MbeadVerify(). To inquire the training status of the templates in the context, use MbeadInquire() with M_STATUS.

If you have associated the target image with a calibration context, you can specify that certain input settings be interpreted in world units. To do so, use MbeadControl() with M_TEMPLATE_INPUT_UNITS set to M_WORLD. Note that if you set this constant to M_WORLD but you don't pass MbeadVerify() a calibrated target image, the function will generate an error.

If you are specifying pixel units, make sure the pixel sizes are consistent across all calibrations (for example, pixel sizes should be the same in the training and verification images). When using different calibration contexts, it is recommended that you use world units.

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
ContextBeadId

Specifies the identifier of the bead context that contains the templates with which to validate the beads in the target image. The bead context must have been previously allocated on the required system using MbeadAlloc().

TargetImageBufId

Specifies the identifier of the target image buffer that contains the beads that must be verified, according the templates contained within the bead context. The image buffer must be a 1-band 8-bit unsigned buffer.

This image buffer must not have a region of interest (ROI) associated with it. Using an image buffer with an ROI will cause an error.

To perform the verification, MIL extracts beads from the training image using processes based on the MIL Measurement module. Such processes use a one-dimensional analysis of differences in pixel intensities. For more information about this type of edge extraction, see the Search algorithm section of Chapter 13: Measurement.

ResultBeadId

Specifies the identifier of the bead result buffer in which to write the results of the verification. The bead result buffer must have been previously allocated on the required system using MbeadAllocResult().

ControlFlag

Reserved for future expansion and must be set to M_DEFAULT.

Compilation information
Header Include mil.h.
Library Use mil.lib; milbead.lib.
DLL Requires mil.dll; milbead.dll.
UNSIGNED PROC NONE