CogFindCircle NumToIgnore Property Cognex VisionPro 9.7
The number of points that will be ignored in the fitting operation. If DecrementNumToIgnore is true then the number of points ignored is actually (NumToIgnore - Number of calipers that found no edge).

Namespace: Cognex.VisionPro.Caliper
Assembly: Cognex.VisionPro.Caliper (in Cognex.VisionPro.Caliper.dll) Version: 73.0.0.0
Syntax

public int NumToIgnore { get; set; }

Property Value

Type: Int32
Events

Event TypeReason
CogFindCircle Changed

Fires when the value of this property changes.

The following state flag may be affected:

CogFindCircle Changed

Fires when both this property and NumCalipers change.

The following state flags may be affected:

Exceptions

ExceptionCondition
ArgumentException

A value of less than 0 was supplied.

Remarks

The number of points that will be ignored in the fitting operation. If DecrementNumToIgnore is true then the number of points ignored is reduced by the number of calipers which failed to detect an edge.

If the value of this property is changed such that the number of calipers minus the number of points to ignore is less than 3, NumCalipers will be changed so that the difference is 3 and the change event will indicate that both properties have changed.

Default Value: 0

Examples

' Create a CogFindCircle operator and a results object
Dim myFCO As New CogFindCircle
Dim myFCOResults As New CogFindCircleResults

' Configure the CogFindCircle Object
myFCO.ExpectedCircularArc = myArc
myFCO.CaliperRunParams.FilterHalfSizeInPixels = 3
myFCO.NumCalipers = 10
myFCO.CaliperProjectionLength = 25
myFCO.CaliperSearchLength = 35
myFCO.CaliperSearchDirection = CogFindCircleSearchDirectionConstants.Inward

myFCO.DecrementNumToIgnore = True
myFCO.RadiusConstraint = myArc.Radius
myFCO.RadiusConstraintEnabled = True

' Execute it
myFCOResults = myFCO.Execute(myAFT.OutputImage)

' Display the found circle
CogDisplay1.StaticGraphics.Clear()
CogDisplay1.StaticGraphics.Add(myFCOResults.GetCircle, "")

' Display some information about the result
lblRes.Text = "Points found; " & myFCOResults.NumPointsFound _
                                & " points used; " & myFCOResults.NumPointsUsed _
                                & " RMS error: " & myFCOResults.RMSError
// Create a CogFindCircle operator and a results object
    CogFindCircle myFCO = new CogFindCircle();

    CogFindCircleResults myFCOResults = new CogFindCircleResults();

// Configure the CogFindCircle Object
myFCO.ExpectedCircularArc = myArc;
myFCO.CaliperRunParams.FilterHalfSizeInPixels = 3;
myFCO.NumCalipers = 10;
myFCO.CaliperProjectionLength = 25;
myFCO.CaliperSearchLength = 35;
myFCO.CaliperSearchDirection = CogFindCircleSearchDirectionConstants.Inward;

myFCO.DecrementNumToIgnore = true;
myFCO.RadiusConstraint = myArc.Radius;
myFCO.RadiusConstraintEnabled = true;

// Execute it
myFCOResults = myFCO.Execute((CogImage8Grey) myAft.OutputImage);

// Display the found circle
CogDisplay1.StaticGraphics.Clear();
CogDisplay1.StaticGraphics.Add(myFCOResults.GetCircle(), "");
See Also