#include <mil.h>
#define NUM_IMAGES 3
#define EXAMPLE_IMAGE_PATH M_IMAGE_PATH MIL_TEXT("GumPackInspection/")
#define IMAGE_FILES EXAMPLE_IMAGE_PATH MIL_TEXT("Image%d.mim")
#define IMAGE_NAME_MAX_LENGTH 200
struct SFixturingData
{
MIL_DOUBLE FixturingOffsetX;
MIL_DOUBLE FixturingOffsetY;
MIL_DOUBLE FixturingAngle;
MIL_DOUBLE GumSpacingX;
MIL_DOUBLE GumSpacingY;
MIL_DOUBLE GumWidth;
MIL_DOUBLE GumHeight;
};
struct SFixturingMarkers
{
MIL_ID VerticalLeftBoundaryMarker;
MIL_ID HorizontalBoundaryStripeMarker;
MIL_ID RowStripeMarker;
MIL_ID FirstColumnStripeMarker;
};
#define GUM_COL_NUM 6
#define GUM_ROW_NUM 2
#define GUM_WIDTH_PERCENTAGE 0.6
#define GUM_HEIGHT_PERCENTAGE 0.8
#define MIN_STANDRAD_DEVIATION 20
#define PERCENTILE_VALUE 10
void LocateandMeasureObject(MIL_ID MilSourceImage, SFixturingMarkers* FixturingMarkers, SFixturingData* FixturingData);
void PrintHeader()
{
MosPrintf(MIL_TEXT("[EXAMPLE NAME]\n")
MIL_TEXT("GumPackInspection\n\n")
MIL_TEXT("[SYNOPSIS]\n")
MIL_TEXT("This example demonstrates how to verify the presence and absence of gums\n")
MIL_TEXT("from a stack of gum packs acquired using an extended depth of field camera.\n\n")
MIL_TEXT("[MODULES USED]\n")
MIL_TEXT("application, buffer, calibration, display, graphics, image processing,\n")
MIL_TEXT("measurement, system.\n"));
MosPrintf(MIL_TEXT("\nPress <Enter> to continue.\n\n"));
MosGetch();
}
int main(void)
{
MIL_ID MilApplication = M_NULL,
MilSystem = M_NULL,
MilDisplay = M_NULL,
MilSourceImage = M_NULL,
MilDestinationImage = M_NULL,
MilChildImage = M_NULL,
MilMaskImage = M_NULL,
MilMaskChildImage = M_NULL,
MilBinImage1 = M_NULL,
MilBinImage2 = M_NULL,
MilGraphicList = M_NULL,
MilOverlayImage = M_NULL,
MilStatContext = M_NULL,
MilStatResult = M_NULL;
MIL_DOUBLE StdDiv;
SFixturingMarkers FixturingMarkers;
SFixturingData FixturingData;
MIL_INT i,
PassNumber, FailNumber,
LowThreshold, HighThreshold;
MIL_TEXT_CHAR SourceImageNames[NUM_IMAGES][IMAGE_NAME_MAX_LENGTH];
MappAllocDefault(M_DEFAULT, &MilApplication, &MilSystem, M_NULL, M_NULL, M_NULL);
MdispAlloc(MilSystem, M_DEFAULT, MIL_TEXT("M_DEFAULT"), M_WINDOWED, &MilDisplay);
MdispZoom(MilDisplay, 0.5, 0.5);
PrintHeader();
MgraAllocList(MilSystem, M_DEFAULT, &MilGraphicList);
MdispControl(MilDisplay, M_ASSOCIATED_GRAPHIC_LIST_ID, MilGraphicList);
MgraControl(M_DEFAULT, M_INPUT_UNITS, M_WORLD);
for (i = 0; i < NUM_IMAGES; i++)
MosSprintf(SourceImageNames[i],IMAGE_NAME_MAX_LENGTH, IMAGE_FILES, i+1);
MmeasAllocMarker(MilSystem, M_EDGE, M_DEFAULT, &(FixturingMarkers.VerticalLeftBoundaryMarker));
MmeasAllocMarker(MilSystem, M_STRIPE, M_DEFAULT, &(FixturingMarkers.HorizontalBoundaryStripeMarker));
MmeasAllocMarker(MilSystem, M_STRIPE, M_DEFAULT, &(FixturingMarkers.RowStripeMarker));
MmeasAllocMarker(MilSystem, M_STRIPE, M_DEFAULT, &(FixturingMarkers.FirstColumnStripeMarker));
MIL_INT SizeX = MbufDiskInquire(SourceImageNames[0], M_SIZE_X, M_NULL);
MIL_INT SizeY = MbufDiskInquire(SourceImageNames[0], M_SIZE_Y, M_NULL);
MbufAlloc2d(MilSystem, SizeX, SizeY, 8+M_UNSIGNED, M_IMAGE+M_PROC+M_DISP, &MilSourceImage);
MilStatContext = MimAlloc(MilSystem, M_STATISTICS_CONTEXT, M_DEFAULT, M_NULL);
MilStatResult = MimAllocResult(MilSystem, M_DEFAULT, M_STATISTICS_RESULT, M_NULL);
MimControl(MilStatContext, M_STAT_STANDARD_DEVIATION, M_ENABLE);
for(i =0; i<NUM_IMAGES; i++)
{
MbufLoad(SourceImageNames[i], MilSourceImage);
MdispSelect(MilDisplay, MilSourceImage);
LocateandMeasureObject(MilSourceImage, &FixturingMarkers, &FixturingData);
if (i==0)
{
MbufAlloc2d(MilSystem, (MIL_INT)FixturingData.GumSpacingX*GUM_COL_NUM, (MIL_INT)FixturingData.GumSpacingY*GUM_ROW_NUM, 8+M_UNSIGNED, M_IMAGE+M_PROC+M_DISP, &MilDestinationImage);
MbufAlloc2d(MilSystem, (MIL_INT)FixturingData.GumSpacingX*GUM_COL_NUM, (MIL_INT)FixturingData.GumSpacingY*GUM_ROW_NUM, 1+M_UNSIGNED, M_IMAGE+M_PROC, &MilMaskImage);
}
MbufClear(MilDestinationImage, 0);
MbufClear(MilMaskImage, 1);
McalUniform(MilDestinationImage, 0, 0, 1.0, 1.0, 0, M_DEFAULT);
McalFixture(MilSourceImage, M_NULL, M_MOVE_RELATIVE, M_POINT_AND_ANGLE, M_NULL, FixturingData.FixturingOffsetX, FixturingData.FixturingOffsetY, FixturingData.FixturingAngle, M_DEFAULT);
MgraColor(M_DEFAULT, M_COLOR_YELLOW);
McalDraw(M_DEFAULT, M_NULL, MilGraphicList, M_DRAW_RELATIVE_COORDINATE_SYSTEM, M_DEFAULT, M_DEFAULT);
MosPrintf(MIL_TEXT("A new gum pack has been located.\n")
MIL_TEXT("\nPress <Enter> to continue.\n\n"));
MosGetch();
MgraClear(M_DEFAULT, MilGraphicList);
McalControl(MilDestinationImage, M_CALIBRATION_CHILD_OFFSET_X, -FixturingData.GumWidth/2);
McalControl(MilDestinationImage, M_CALIBRATION_CHILD_OFFSET_Y, -FixturingData.GumHeight/2);
McalTransformImage(MilSourceImage, MilDestinationImage, M_NULL, M_BILINEAR + M_OVERSCAN_DISABLE, M_DEFAULT, M_WARP_IMAGE+M_USE_DESTINATION_CALIBRATION);
MdispSelect(MilDisplay, MilDestinationImage);
MosPrintf(MIL_TEXT("The gum pack has been warped into a new image.\n\n"));
MbufChild2d(MilDestinationImage, 0, 0, (MIL_INT)(FixturingData.GumWidth*GUM_WIDTH_PERCENTAGE), (MIL_INT)(FixturingData.GumHeight*GUM_HEIGHT_PERCENTAGE), &MilChildImage);
MbufChild2d(MilMaskImage, 0, 0, (MIL_INT)(FixturingData.GumWidth*GUM_WIDTH_PERCENTAGE), (MIL_INT)(FixturingData.GumHeight*GUM_HEIGHT_PERCENTAGE), &MilMaskChildImage);
MbufAlloc2d(MilSystem, (MIL_INT)(FixturingData.GumWidth*GUM_WIDTH_PERCENTAGE), (MIL_INT)(FixturingData.GumHeight*GUM_HEIGHT_PERCENTAGE), 1+M_UNSIGNED, M_IMAGE+M_PROC, &MilBinImage1);
MbufAlloc2d(MilSystem, (MIL_INT)(FixturingData.GumWidth*GUM_WIDTH_PERCENTAGE), (MIL_INT)(FixturingData.GumHeight*GUM_HEIGHT_PERCENTAGE), 1+M_UNSIGNED, M_IMAGE+M_PROC, &MilBinImage2);
PassNumber =0, FailNumber =0;
for (MIL_INT RowIndex=0; RowIndex< GUM_ROW_NUM; RowIndex++)
{
for (MIL_INT ColIndex=0; ColIndex< GUM_COL_NUM; ColIndex++)
{
MbufChildMove(MilChildImage, (MIL_INT)(FixturingData.GumWidth*((1-GUM_WIDTH_PERCENTAGE)/2)+ColIndex*FixturingData.GumSpacingX),
(MIL_INT)(FixturingData.GumHeight*((1-GUM_HEIGHT_PERCENTAGE)/2)+RowIndex*FixturingData.GumSpacingY),
(MIL_INT)(FixturingData.GumWidth*GUM_WIDTH_PERCENTAGE), (MIL_INT)(FixturingData.GumHeight*GUM_HEIGHT_PERCENTAGE),M_DEFAULT);
MbufChildMove(MilMaskChildImage, (MIL_INT)(FixturingData.GumWidth*((1-GUM_WIDTH_PERCENTAGE)/2)+ColIndex*FixturingData.GumSpacingX),
(MIL_INT)(FixturingData.GumHeight*((1-GUM_HEIGHT_PERCENTAGE)/2)+RowIndex*FixturingData.GumSpacingY),
(MIL_INT)(FixturingData.GumWidth*GUM_WIDTH_PERCENTAGE), (MIL_INT)(FixturingData.GumHeight*GUM_HEIGHT_PERCENTAGE),M_DEFAULT);
HighThreshold = MimBinarize(MilChildImage, M_NULL, M_PERCENTILE_VALUE+M_LESS, 100-PERCENTILE_VALUE, M_NULL);
MimBinarize(MilChildImage, MilBinImage1, M_PERCENTILE_VALUE+M_LESS, 100-PERCENTILE_VALUE, M_NULL);
LowThreshold = MimBinarize(MilChildImage, M_NULL, M_PERCENTILE_VALUE+M_GREATER, PERCENTILE_VALUE, M_NULL);
MimBinarize(MilChildImage, MilBinImage2, M_PERCENTILE_VALUE+M_GREATER, PERCENTILE_VALUE, M_NULL);
MimArith(MilBinImage1, MilBinImage2, MilBinImage1, M_AND);
MimControl(MilStatContext, M_CONDITION, M_IN_RANGE);
MimControl(MilStatContext, M_COND_LOW, LowThreshold);
MimControl(MilStatContext, M_COND_HIGH, HighThreshold);
MimStatCalculate(MilStatContext, MilChildImage, MilStatResult, M_DEFAULT);
MimGetResult(MilStatResult, M_STAT_STANDARD_DEVIATION, &StdDiv);
if(StdDiv>MIN_STANDRAD_DEVIATION)
{
MgraColor(M_DEFAULT, M_COLOR_RED);
FailNumber++;
}
else
{
MgraColor(M_DEFAULT, M_COLOR_GREEN);
PassNumber++;
}
MgraRectAngle(M_DEFAULT, MilGraphicList, ColIndex*FixturingData.GumSpacingX, RowIndex*FixturingData.GumSpacingY,
FixturingData.GumWidth*GUM_WIDTH_PERCENTAGE, FixturingData.GumHeight*GUM_HEIGHT_PERCENTAGE, 0, M_CENTER_AND_DIMENSION);
MbufCopy(MilBinImage1, MilMaskChildImage);
}
}
MdispControl(MilDisplay, M_OVERLAY, M_ENABLE);
MdispInquire(MilDisplay, M_OVERLAY_ID, &MilOverlayImage);
MdispControl(MilDisplay, M_OVERLAY_CLEAR, M_DEFAULT);
MbufClearCond(MilOverlayImage, 255, 255, 0, MilMaskImage, M_EQUAL, 0);
if (i ==0)
{
MosPrintf(MIL_TEXT("Displayed in yellow, the saturated pixels (bright and dark pixels) are\n")
MIL_TEXT("masked out from further statistical calculations. The standard deviation\n")
MIL_TEXT("of each gum area is used to infer the presence of any defect.\n\n"));
}
MosPrintf(MIL_TEXT("The number of the gums that passed: %d"), PassNumber);
MosPrintf(MIL_TEXT("\nThe number of the gums that failed: %d\n"), FailNumber);
if(i < NUM_IMAGES-1)
MosPrintf(MIL_TEXT("\nPress <Enter> to continue.\n\n"));
else
MosPrintf(MIL_TEXT("\nPress <Enter> to finish.\n\n"));
MosGetch();
MdispControl(MilDisplay, M_OVERLAY_CLEAR, M_DEFAULT);
MgraClear(M_DEFAULT, MilGraphicList);
MbufFree(MilBinImage2);
MbufFree(MilBinImage1);
MbufFree(MilMaskChildImage);
MbufFree(MilChildImage);
}
MbufFree(MilMaskImage);
MbufFree(MilDestinationImage);
MimFree(MilStatResult);
MimFree(MilStatContext);
MbufFree(MilSourceImage);
MmeasFree(FixturingMarkers.FirstColumnStripeMarker);
MmeasFree(FixturingMarkers.RowStripeMarker);
MmeasFree(FixturingMarkers.HorizontalBoundaryStripeMarker);
MmeasFree(FixturingMarkers.VerticalLeftBoundaryMarker);
if(MilGraphicList)
MgraFree(MilGraphicList);
MdispFree(MilDisplay);
MappFreeDefault(MilApplication, MilSystem, M_NULL, M_NULL, M_NULL);
return 0;
}
#define MEAS_BOX_HEIGHT 50
#define LEFT_EDGE_MEAS_BOX_WIDTH 400
#define LEFT_EDGE_MEAS_BOX_X 250
#define TOP_BOTTOM_MEAS_BOX_WIDTH 1000
#define TOP_BOTTOM_MEAS_BOX_ANGLE 270
#define TOP_ROW_MEAS_BOX_WIDTH 1500
#define TOP_ROW_MEAS_BOX_HEIGHT 120
#define TOP_ROW_MEAS_BOX_ANGLE_DELTA 20
#define TOP_ROW_MEAS_BOX_ANGLE_ACCURACY 0.1
#define STRIPE_WIDTH_LOW 100
#define STRIPE_WIDTH_HIGH 200
#define STRIPE_HEIGHT_LOW 200
#define STRIPE_HEIGHT_HIGH 300
#define FIRST_COLUMN_MEAS_BOX_WIDTH 1000
#define MAX_ASSOCIATION_DISTANCE 10
void LocateandMeasureObject(MIL_ID MilSourceImage, SFixturingMarkers* FixturingMarkers, SFixturingData* FixturingData)
{
MIL_INT SizeX = MbufInquire(MilSourceImage, M_SIZE_X, M_NULL);
MIL_INT SizeY = MbufInquire(MilSourceImage, M_SIZE_Y, M_NULL);
MIL_INT i;
MmeasSetMarker(FixturingMarkers->VerticalLeftBoundaryMarker, M_POLARITY, M_POSITIVE, M_NULL);
MmeasSetMarker(FixturingMarkers->VerticalLeftBoundaryMarker, M_FILTER_TYPE, M_SHEN, M_NULL);
MmeasSetScore(FixturingMarkers->VerticalLeftBoundaryMarker, M_DISTANCE_FROM_BOX_ORIGIN_SCORE, 0, 0, 0, M_MAX_POSSIBLE_VALUE, M_DEFAULT, M_DEFAULT, M_DEFAULT);
MmeasSetScore(FixturingMarkers->VerticalLeftBoundaryMarker, M_STRENGTH_SCORE, 0, 0, M_MAX_POSSIBLE_VALUE, M_MAX_POSSIBLE_VALUE, M_DEFAULT, M_DEFAULT, M_DEFAULT);
MmeasSetMarker(FixturingMarkers->VerticalLeftBoundaryMarker, M_BOX_CENTER, LEFT_EDGE_MEAS_BOX_X, SizeY/2.0);
MmeasSetMarker(FixturingMarkers->VerticalLeftBoundaryMarker, M_BOX_SIZE, LEFT_EDGE_MEAS_BOX_WIDTH, MEAS_BOX_HEIGHT);
MmeasFindMarker(M_DEFAULT, MilSourceImage, FixturingMarkers->VerticalLeftBoundaryMarker, M_DEFAULT);
MIL_DOUBLE VerticalLeftBoundaryAngle;
MmeasGetResultSingle(FixturingMarkers->VerticalLeftBoundaryMarker, M_ANGLE, &VerticalLeftBoundaryAngle, M_NULL, 0);
MmeasSetMarker(FixturingMarkers->HorizontalBoundaryStripeMarker, M_POLARITY, M_POSITIVE, M_NEGATIVE);
MmeasSetMarker(FixturingMarkers->HorizontalBoundaryStripeMarker, M_FILTER_TYPE, M_SHEN, M_NULL);
MmeasSetScore(FixturingMarkers->HorizontalBoundaryStripeMarker, M_STRIPE_WIDTH_SCORE, 0, M_MAX_POSSIBLE_VALUE, M_MAX_POSSIBLE_VALUE, M_MAX_POSSIBLE_VALUE, M_DEFAULT, M_DEFAULT, M_DEFAULT);
MmeasSetMarker(FixturingMarkers->HorizontalBoundaryStripeMarker, M_BOX_CENTER, SizeX/2.0, SizeY/2.0);
MmeasSetMarker(FixturingMarkers->HorizontalBoundaryStripeMarker, M_BOX_SIZE, TOP_BOTTOM_MEAS_BOX_WIDTH, MEAS_BOX_HEIGHT);
MmeasSetMarker(FixturingMarkers->HorizontalBoundaryStripeMarker, M_BOX_ANGLE, TOP_BOTTOM_MEAS_BOX_ANGLE, M_NULL);
MmeasFindMarker(M_DEFAULT, MilSourceImage, FixturingMarkers->HorizontalBoundaryStripeMarker, M_DEFAULT);
MIL_DOUBLE HorizontalBoundaryStripeY, HorizontalBoundaryStripeWidth;
MmeasGetResultSingle(FixturingMarkers->HorizontalBoundaryStripeMarker, M_POSITION, M_NULL, &HorizontalBoundaryStripeY, 0);
MmeasGetResultSingle(FixturingMarkers->HorizontalBoundaryStripeMarker, M_STRIPE_WIDTH, &HorizontalBoundaryStripeWidth, M_NULL, 0);
MmeasSetMarker(FixturingMarkers->RowStripeMarker, M_POLARITY, M_NEGATIVE, M_POSITIVE);
MmeasSetMarker(FixturingMarkers->RowStripeMarker, M_FILTER_TYPE, M_SHEN, M_NULL);
MmeasSetMarker(FixturingMarkers->RowStripeMarker, M_BOX_CENTER, SizeX/2.0, HorizontalBoundaryStripeY-HorizontalBoundaryStripeWidth/4);
MmeasSetMarker(FixturingMarkers->RowStripeMarker, M_BOX_SIZE, TOP_ROW_MEAS_BOX_WIDTH, TOP_ROW_MEAS_BOX_HEIGHT);
MmeasSetMarker(FixturingMarkers->RowStripeMarker, M_BOX_ANGLE, VerticalLeftBoundaryAngle-90, M_NULL);
MmeasSetMarker(FixturingMarkers->RowStripeMarker, M_NUMBER, GUM_COL_NUM, M_NULL);
MmeasSetMarker(FixturingMarkers->RowStripeMarker, M_BOX_ANGLE_MODE, M_ENABLE, M_NULL);
MmeasSetMarker(FixturingMarkers->RowStripeMarker, M_BOX_ANGLE_DELTA_POS, TOP_ROW_MEAS_BOX_ANGLE_DELTA, M_NULL);
MmeasSetMarker(FixturingMarkers->RowStripeMarker, M_BOX_ANGLE_DELTA_NEG, TOP_ROW_MEAS_BOX_ANGLE_DELTA, M_NULL);
MmeasSetMarker(FixturingMarkers->RowStripeMarker, M_BOX_ANGLE_ACCURACY, TOP_ROW_MEAS_BOX_ANGLE_ACCURACY, M_NULL);
MmeasSetMarker(FixturingMarkers->RowStripeMarker, M_MAX_ASSOCIATION_DISTANCE, MAX_ASSOCIATION_DISTANCE, M_NULL);
MmeasSetScore(FixturingMarkers->RowStripeMarker, M_STRIPE_WIDTH_SCORE, STRIPE_WIDTH_LOW, STRIPE_WIDTH_LOW, STRIPE_WIDTH_HIGH, STRIPE_WIDTH_HIGH, M_DEFAULT, M_DEFAULT, M_DEFAULT);
MmeasFindMarker(M_DEFAULT, MilSourceImage, FixturingMarkers->RowStripeMarker, M_DEFAULT);
MIL_DOUBLE TopRowFirstStripeY, TopRowStripeWidthArray[GUM_COL_NUM], TopRowStripeSpacingArray[GUM_COL_NUM-1];
MmeasGetResultSingle(FixturingMarkers->RowStripeMarker, M_POSITION, &(FixturingData->FixturingOffsetX), &TopRowFirstStripeY, 0);
MmeasGetResult(FixturingMarkers->RowStripeMarker, M_BOX_ANGLE_FOUND, &(FixturingData->FixturingAngle), M_NULL);
MmeasGetResult(FixturingMarkers->RowStripeMarker, M_STRIPE_WIDTH, TopRowStripeWidthArray, M_NULL);
MmeasGetResult(FixturingMarkers->RowStripeMarker, M_SPACING, TopRowStripeSpacingArray, M_NULL);
FixturingData->GumSpacingX = 0;
for(i =0; i<GUM_COL_NUM-1; i++)
FixturingData->GumSpacingX += TopRowStripeSpacingArray[i];
FixturingData->GumSpacingX /=GUM_COL_NUM-1;
FixturingData->GumWidth = 0;
for(i =0; i<GUM_COL_NUM; i++)
FixturingData->GumWidth += TopRowStripeWidthArray[i];
FixturingData->GumWidth /= GUM_COL_NUM;
MmeasSetMarker(FixturingMarkers->RowStripeMarker, M_BOX_CENTER, SizeX/2.0, HorizontalBoundaryStripeY+HorizontalBoundaryStripeWidth/4);
MmeasFindMarker(M_DEFAULT, MilSourceImage, FixturingMarkers->RowStripeMarker, M_DEFAULT);
MIL_DOUBLE BottomRowFirstStripeX, BottomRowFirstStripeY;
MmeasGetResultSingle(FixturingMarkers->RowStripeMarker, M_POSITION, &BottomRowFirstStripeX, &BottomRowFirstStripeY, 0);
MmeasSetMarker(FixturingMarkers->FirstColumnStripeMarker, M_POLARITY, M_NEGATIVE, M_POSITIVE);
MmeasSetMarker(FixturingMarkers->FirstColumnStripeMarker, M_FILTER_TYPE, M_SHEN, M_NULL);
MmeasSetScore(FixturingMarkers->FirstColumnStripeMarker, M_STRIPE_WIDTH_SCORE, STRIPE_HEIGHT_LOW, STRIPE_HEIGHT_LOW, STRIPE_HEIGHT_HIGH, STRIPE_HEIGHT_HIGH, M_DEFAULT, M_DEFAULT, M_DEFAULT);
MmeasSetMarker(FixturingMarkers->FirstColumnStripeMarker, M_BOX_CENTER, (FixturingData->FixturingOffsetX+BottomRowFirstStripeX)/2, (TopRowFirstStripeY+BottomRowFirstStripeY)/2);
MmeasSetMarker(FixturingMarkers->FirstColumnStripeMarker, M_BOX_SIZE, FIRST_COLUMN_MEAS_BOX_WIDTH, MEAS_BOX_HEIGHT);
MmeasSetMarker(FixturingMarkers->FirstColumnStripeMarker, M_BOX_ANGLE, FixturingData->FixturingAngle-90, M_NULL);
MmeasSetMarker(FixturingMarkers->FirstColumnStripeMarker, M_NUMBER, GUM_ROW_NUM, M_NULL);
MmeasSetMarker(FixturingMarkers->FirstColumnStripeMarker, M_MAX_ASSOCIATION_DISTANCE, MAX_ASSOCIATION_DISTANCE, M_NULL);
MmeasSetMarker(FixturingMarkers->FirstColumnStripeMarker, M_SEARCH_REGION_CLIPPING, M_ENABLE, M_NULL);
MmeasFindMarker(M_DEFAULT, MilSourceImage, FixturingMarkers->FirstColumnStripeMarker, M_DEFAULT);
MmeasGetResultSingle(FixturingMarkers->FirstColumnStripeMarker, M_POSITION, M_NULL, &(FixturingData->FixturingOffsetY), 0);
MmeasGetResultSingle(FixturingMarkers->FirstColumnStripeMarker, M_STRIPE_WIDTH, &(FixturingData->GumHeight), M_NULL, 0);
MmeasGetResultSingle(FixturingMarkers->FirstColumnStripeMarker, M_SPACING, &(FixturingData->GumSpacingY), M_NULL, 0);
}