CogBeadInspectRunParams ClassCognex VisionPro 9.7
Class that holds the BeadInspect run parameters. These parameters control how BeadInspect detects defects in the runtime image.
Inheritance Hierarchy

System Object
  System MarshalByRefObject
    Cognex.VisionPro.Implementation CogObjectBase
      Cognex.VisionPro.Implementation CogSerializableObjectBase
        Cognex.VisionPro.Implementation CogSerializableChangedEventBase
          Cognex.VisionPro.EdgeInspect CogBeadInspectRunParams

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

[SerializableAttribute]
public class CogBeadInspectRunParams : CogSerializableChangedEventBase, 
	IDisposable

The CogBeadInspectRunParams type exposes the following members.

Constructors

  NameDescription
Public methodCogBeadInspectRunParams 
Constructs a default CogBeadInspectRunParams object.
Public methodCogBeadInspectRunParams(CogBeadInspectRunParams)
Constructs a deep copy of the supplied CogBeadInspectRunParams object.
Protected methodCogBeadInspectRunParams(SerializationInfo, StreamingContext)
Serialization constructor for CogBeadInspectRunParams object.
Top
Methods

  NameDescription
Public methodCopyMaskAndFillLists
Copies the MaskList, the RightFillList, and the LeftFillList from the given CogBeadInspectRunParams, without changing the size of the existing lists in this object. The lists from the given CogBeadInspectRunParams are truncated, or extended with "false" values, to fit within the existing lists.
Public methodCreateAndCopyMaskAndFillLists(CogBeadInspectRunParams)
Creates and initializes the MaskList, the RightFillList, and the LeftFillList. This method gets the desired length of the lists from the MaskList property of the given CogBeadInspectRunParams. The lists are then copied from the given CogBeadInspectRunParams.
Public methodCreateAndCopyMaskAndFillLists(CogBeadInspectTrainResult)
Creates and initializes the MaskList, the RightFillList, and the LeftFillList. This method gets the desired length of the lists from the NumTrainedCalipers property of the given CogBeadInspectTrainResult. The lists are copied from the suggested run params of the given CogBeadInspectTrainResult.
Public methodCreateMaskAndFillLists(CogBeadInspectRunParams)
Creates and initializes the MaskList, the RightFillList, and the LeftFillList. This method gets the desired length of the lists from the MaskList property of the given CogBeadInspectRunParams. The lists are filled with the Boolean value "false".
Public methodCreateMaskAndFillLists(CogBeadInspectTrainResult)
Creates and initializes the MaskList, the RightFillList, and the LeftFillList. This method gets the desired length of the lists from the NumTrainedCalipers property of the given CogBeadInspectTrainResult. The lists are filled with the Boolean value "false".
Public methodCreateObjRef
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject.)
Public methodDestroyMaskAndFillLists
Destroys the existing MaskList, RightFillList, and LeftFillList. After this call, the three properties will return null.
Public methodDispose 
Releases all resources used by this CogBeadInspectRunParams object.
Protected methodDispose(Boolean)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Releases all unmanaged resources used by this CogBeadInspectRunParams object.
(Overrides Object Finalize .)
Protected methodGetAttributes
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetClassName
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetComponentName
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetConverter
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetDefaultEvent
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetDefaultProperty
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetEditor
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetEvents 
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetEvents( Attribute )
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetLifetimeService
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Protected methodGetObjectData
Populates the provided SerializationInfo with the data needed to serialize the object.
(Overrides CogSerializableObjectBase GetObjectData(SerializationInfo, StreamingContext).)
Protected methodGetProperties 
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetProperties( Attribute )
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetPropertyOwner
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInitializeLifetimeService
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Protected methodMemberwiseClone 
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodMemberwiseClone(Boolean)
Creates a shallow copy of the current MarshalByRefObject object.
(Inherited from MarshalByRefObject.)
Protected methodOnChanged(Int64)
This method should be called internally whenever the object's state may have changed.
(Inherited from CogSerializableChangedEventBase.)
Protected methodOnChanged(CogChangedEventArgs)
This method may be called internally whenever a derived object's state may have changed and the derived object expresses this change via a derived CogChangedEventArgs class.
(Inherited from CogSerializableChangedEventBase.)
Public methodResumeAndRaiseChangedEvent
Re-enables raising of the Changed event after SuspendChangedEvent has been called, and raises the Changed event if the ChangedEventSuspended count is reduced to zero and any changes were made while events were suspended. Must be called once for each call to SuspendChangedEvent.
(Inherited from CogSerializableChangedEventBase.)
Public methodSuspendChangedEvent
Temporarily suspends the raising of the Changed event. May be called more than once, and a corresponding call to ResumeAndRaiseChangedEvent must be made for each call to SuspendChangedEvent.
(Inherited from CogSerializableChangedEventBase.)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
Fields

  NameDescription
Public fieldStatic memberSfAbsoluteDistanceThreshold
This bit will be set in the EventArgs of a Changed event every time the value returned by AbsoluteDistanceThreshold may have changed.
Public fieldStatic memberSfConsecutiveFailingCalipersMin
This bit will be set in the EventArgs of a Changed event every time the value returned by ConsecutiveFailingCalipersMin may have changed.
Public fieldStatic memberSfContrastThreshold
This bit will be set in the EventArgs of a Changed event every time the value returned by ContrastThreshold may have changed.
Public fieldStatic memberSfCoverageMax
This bit will be set in the EventArgs of a Changed event every time the value returned by CoverageMax may have changed.
Public fieldStatic memberSfCoverageMaxEnabled
This bit will be set in the EventArgs of a Changed event every time the value returned by CoverageMaxEnabled may have changed.
Public fieldStatic memberSfCoverageMin
This bit will be set in the EventArgs of a Changed event every time the value returned by CoverageMin may have changed.
Public fieldStatic memberSfCoverageMinEnabled
This bit will be set in the EventArgs of a Changed event every time the value returned by CoverageMinEnabled may have changed.
Public fieldStatic memberSfLeftFillList
This bit will be set in the EventArgs of a Changed event every time the value returned by LeftFillList may have changed.
Public fieldStatic memberSfMaskList
This bit will be set in the EventArgs of a Changed event every time the value returned by MaskList may have changed.
Protected fieldStatic memberSfNextSf
Public fieldStatic memberSfRightFillList
This bit will be set in the EventArgs of a Changed event every time the value returned by RightFillList may have changed.
Public fieldStatic memberSfStepThreshold
This bit will be set in the EventArgs of a Changed event every time the value returned by StepThreshold may have changed.
Public fieldStatic memberSfStepThresholdEnabled
This bit will be set in the EventArgs of a Changed event every time the value returned by StepThresholdEnabled may have changed.
Public fieldStatic memberSfWidthMax
This bit will be set in the EventArgs of a Changed event every time the value returned by WidthMax may have changed.
Public fieldStatic memberSfWidthMaxEnabled
This bit will be set in the EventArgs of a Changed event every time the value returned by WidthMaxEnabled may have changed.
Public fieldStatic memberSfWidthMin
This bit will be set in the EventArgs of a Changed event every time the value returned by WidthMin may have changed.
Public fieldStatic memberSfWidthMinEnabled
This bit will be set in the EventArgs of a Changed event every time the value returned by WidthMinEnabled may have changed.
Top
Properties

  NameDescription
Public propertyAbsoluteDistanceThreshold
Gets or sets the maximum absolute amount an edge position can deviate from a trained edge position. It is specified as a fraction of the average bead width.
Public propertyChangedEventSuspended
If nonzero, indicates that the raising of the Changed event has been suspended. This value is incremented when SuspendChangedEvent is called and decremented when ResumeAndRaiseChangedEvent is called.
(Inherited from CogSerializableChangedEventBase.)
Public propertyConsecutiveFailingCalipersMin
Gets or sets the minimum number of consecutive failing calipers for a defect to be reported. Indirectly this property determines the length (along the bead) of the smallest reported defect.
Public propertyContrastThreshold
Gets or sets the minimum contrast required for detecting the edges of the bead.
Public propertyCoverageMax
Gets or sets the maximum acceptable coverage, any coverage above this value can be a defect.
Public propertyCoverageMaxEnabled
Gets or sets a flag to indicate whether the CoverageMax tolerance is enabled. If true, CoverageMax will be used at runtime to report defects of type Overfill.
Public propertyCoverageMin
Gets or sets the minimum acceptable coverage, any coverage below this value can be a defect.
Public propertyCoverageMinEnabled
Gets or sets a flag to indicate whether the CoverageMin tolerance is enabled. If true, CoverageMin will be used at runtime to report defects of type Underfill.
Public propertyHasChanged (Inherited from CogSerializableChangedEventBase.)
Public propertyLeftFillList
Gets an ICogBoolList whose Boolean elements indicate which calipers along the trained bead path should insert a "fill edge" if no edge is found on the left side (relative to the path direction) of the bead at runtime.
Public propertyMaskList
Gets an ICogBoolList whose Boolean elements indicate which calipers along the trained bead path should be ignored at runtime when searching for defects.
Public propertyRightFillList
Gets an ICogBoolList whose Boolean elements indicate which calipers along the trained bead path should insert a "fill edge" if no edge is found on the right side (relative to the path direction) of the bead at runtime.
Public propertyStateFlags
Returns the complete set of state flags supported on this object. The flags may be indexed by name as shown in the following C# code snippet: if (changedObject.StateFlags["Color"] & eventArgs.StateFlags) { ... }
(Inherited from CogSerializableChangedEventBase.)
Public propertyStepThreshold
Gets or sets the maximum relative amount an edge position can deviate from neighboring edges. It is specified as a fraction of average bead width at that location. A low value means a closer match and a high value means more tolerance.
Public propertyStepThresholdEnabled
Gets or sets a flag to indicate whether the StepThreshold tolerance is enabled. If true, StepThreshold will be used at runtime to report defects of type AboveStepThreshold.
Public propertyWidthMax
Gets or sets the maximum acceptable width ratio, any ratio above this value can be a defect. The ratio is computed using the bead width at runtime to the average bead width at train time.
Public propertyWidthMaxEnabled
Gets or sets a flag to indicate whether the WidthMax tolerance is enabled. If true, WidthMax will be used at runtime to report defects of type TooWide.
Public propertyWidthMin
Gets or sets the minimum acceptable width ratio, any ratio below this value can be a defect. The ratio is computed using the bead width at runtime to the average width at train time.
Public propertyWidthMinEnabled
Gets or sets a flag to indicate whether the WidthMin tolerance is enabled. If true, WidthMin will be used at runtime to report defects of type TooNarrow.
Top
Events

  NameDescription
Public eventChanged
This event is raised when one or more parts of the object's state may have changed.
(Inherited from CogSerializableChangedEventBase.)
Top
Remarks

The parameters in this class define the acceptable tolerances for a bead. The tolerances can be enabled or disabled, and a defect will be reported if the bead is outside any enabled tolerance.

The bead inspect tool process the image in 2 phases: the first phase is all about calipers, and the second phase is all about defects.
Caliper processing consists of the following:

  • Lay down the calipers to detect edge pairs. This step uses the ContrastThreshold and AbsoluteDistanceThreshold to determine which edges are considered for scoring.
  • Then the scoring procedure chooses the best pair of edges based on:
    • Pair width
    • Edge positions
    • Consistency with neighboring edge positions
After all of this, defects are detected using any of the (five) enabled tolerances of this class (and maybe some non-enable criteria, like, are any edges missing).
A defect is reported for any sequence of ConsecutiveFailingCalipersMin (or more) calipers where all of the individual calipers are deemed out of tolerance

An instance of this class must be provided as an argument to the Execute(ICogVisionData, CogBeadInspectRunParams) method of the CogBeadInspectPattern class. The Execute() method is called automatically every time you call the Run  method of the CogBeadInspectTool class, causing the tool to inspect the bead path in the InputImage for defects.

For more information on the definition of a bead and bead path in this context, please refer to the remarks section of the CogBeadInspectPattern class.

See Also