If DecrementNumToIgnore is true then the number of points ignored is actually (NumToIgnore - Number of calipers that found no edge).
Namespace: Cognex.VisionPro.CaliperAssembly: Cognex.VisionPro.Caliper (in Cognex.VisionPro.Caliper.dll) Version: 73.0.0.0
Syntax
Property Value
Type: BooleanEvents
| Event Type | Reason |
|---|---|
| CogFindCircle Changed | Fires when the value of this property changes. The following state flag may be affected: |
Remarks
If DecrementNumToIgnore is true then the number of points to ignore is decremented by the number of calipers that found no edge. Specifying true for this value makes sure that the number of outliers discarded by the underlying CogFitCircle remains the same when one or more calipers cannot find edges, as long as the number of calipers that found no edge is less than the number of points to ignore.
Default Value: False
Examples
Imports Cognex.VisionPro
Imports Cognex.VisionPro.Caliper
Imports Cognex.VisionPro.ImageProcessing
' Create a CogFindCircle operator and a results object
Dim myFCO As New CogFindCircle
Dim myArc As New CogCircularArc
Dim myFCOResults As New CogFindCircleResults
Dim i As Integer
' 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(CType(myAFT.OutputImage, CogImage8Grey))
' Display the found circle
CogDisplay1.StaticGraphics.Clear()
CogDisplay1.StaticGraphics.Add(myFCOResults.GetCircle.CopyBase(CogCopyShapeConstants.All), "")
' Display some information about the result
lblRes.text = "Points found; " & myFCOResults.NumPointsFound _
& " points used; " & myFCOResults.NumPointsUsed _
& " RMS error: " & myFCOResults.RMSError
' And display some information about each individual result
For i = 0 To myFCOResults.Count - 1
LstRes.Items.Add("Point (" & myFCOResults(i).X.ToString & ", " & myFCOResults(i).Y.ToString _
& ") Found: " & myFCOResults(i).Found & " Used: " & myFCOResults(i).Used _
& " is " & myFCOResults(i).DistanceToCircle & " from found shape.")
Next iusing Cognex.VisionPro; using Cognex.VisionPro.Caliper; using Cognex.VisionPro.ImageProcessing; // Create a CogFindCircle operator and a results object CogFindCircle myFCO = new CogFindCircle(); CogCircularArc myArc = new CogCircularArc(); CogFindCircleResults myFCOResults = new CogFindCircleResults(); int i; // 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().CopyBase(CogCopyShapeConstants.All), ""); // Display some information about the result lblRes.Text = "Points found; " + myFCOResults.NumPointsFound + " points used; " + myFCOResults.NumPointsUsed + " RMS error: " + myFCOResults.RMSError; // And display some information about each individual result for (i = 0; i < myFCOResults.Count; i++) { LstRes.Items.Add("Point (" + myFCOResults[i].X + ", " + myFCOResults[i].Y + ") Found: " + myFCOResults[i].Found + " Used: " + myFCOResults[i].Used + " is " + myFCOResults[i].DistanceToCircle + " from found shape."); }
See Also