Cog3DRangeImageCrossSectionExtractCornerV2 ClassCognex VisionPro
The class to extract a corner from profile points that are within the regions. This operator holds a collection of regions. There must be always one region in the collection. The user may add and delete any region as long as the count does not dip below 1.
Inheritance Hierarchy

System Object
  System MarshalByRefObject
    Cognex.VisionPro.Implementation CogObjectBase
      Cognex.VisionPro.Implementation CogSerializableObjectBase
        Cognex.VisionPro.Implementation CogSerializableChangedEventBase
          Cognex.VisionPro3D Cog3DRangeImageCrossSectionOperatorBase
            Cognex.VisionPro3D Cog3DRangeImageCrossSectionExtractCornerV2

Namespace: Cognex.VisionPro3D
Assembly: Cognex.VisionPro3D (in Cognex.VisionPro3D.dll) Version: 65.1.0.0
Syntax

[SerializableAttribute]
public class Cog3DRangeImageCrossSectionExtractCornerV2 : Cog3DRangeImageCrossSectionOperatorBase

The Cog3DRangeImageCrossSectionExtractCornerV2 type exposes the following members.

Constructors

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

  NameDescription
Public methodAddDefaultRegion
Adds a new region to the operator with a default location
(Inherited from Cog3DRangeImageCrossSectionOperatorBase.)
Public methodClearResults
Clear the results' properties of this class.
(Overrides Cog3DRangeImageCrossSectionOperatorBase ClearResults .)
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 methodCreateResultGraphics
Create the graphics and add them to the graphicCollection provided.
(Overrides Cog3DRangeImageCrossSectionOperatorBase CreateResultGraphics(CogGraphicCollection, Boolean).)
Public methodDispose 
Destruct this Cog3DRangeImageCrossSectionOperatorBase.
(Inherited from Cog3DRangeImageCrossSectionOperatorBase.)
Protected methodDispose(Boolean) (Overrides Cog3DRangeImageCrossSectionOperatorBase Dispose(Boolean).)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodExecute
Extracts a corner, and reported its position in the profile selected space name.
(Overrides Cog3DRangeImageCrossSectionOperatorBase Execute(Cog3DRangeImageCrossSectionProfile).)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
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.)
Public methodGetNamesOfOperatorsByType
Gets the names of the operators by output type from the OperatorsParams collection. It returns only the operators that are listed prior to this operator in the OperatorsParams collection. Returns null if no operator was found.
(Inherited from Cog3DRangeImageCrossSectionOperatorBase.)
Protected methodGetObjectData
Implements the GetObjectData method of the ISerializable interface.
(Inherited from CogSerializableObjectBase.)
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 methodInitializeName (Inherited from Cog3DRangeImageCrossSectionOperatorBase.)
Protected methodInitializeRegions (Inherited from Cog3DRangeImageCrossSectionOperatorBase.)
Protected methodInitializeToleranceCollection (Inherited from Cog3DRangeImageCrossSectionOperatorBase.)
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 methodSetRegionToDefaultLocation
Sets the region with the given index to the default region location Cognex Internal Use Only.
(Inherited from Cog3DRangeImageCrossSectionOperatorBase.)
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 memberSfCorner
This bit will be set in the EventArgs of a Changed event every time the value returned by Corner may have changed.
Public fieldStatic memberSfCornerIndex
This bit will be set in the EventArgs of a Changed event every time the value returned by CornerIndex may have changed.
Public fieldStatic memberSfCornerInImage
This bit will be set in the EventArgs of a Changed event every time the value returned by CornerInImage may have changed.
Public fieldStatic memberSfCornerInImage3D
This bit will be set in the EventArgs of a Changed event every time the value returned by CornerInImage3D may have changed.
Public fieldStatic memberSfCornerSelection
This bit will be set in the EventArgs of a Changed event every time the value returned by CornerSelection may have changed.
Public fieldStatic memberSfCornerType
This bit will be set in the EventArgs of a Changed event every time the value returned by CornerType may have changed.
Public fieldStatic memberSfLineFitLength
This bit will be set in the EventArgs of a Changed event every time the value returned by LineFitLength may have changed.
Public fieldStatic memberSfLineFitSpacing
This bit will be set in the EventArgs of a Changed event every time the value returned by LineFitSpacing may have changed.
Public fieldStatic memberSfLineFitValidPointFraction
This bit will be set in the EventArgs of a Changed event every time the value returned by LineFitValidPointFraction may have changed.
Public fieldStatic memberSfMaxCornerAngle
This bit will be set in the EventArgs of a Changed event every time the value returned by MaxCornerAngle may have changed.
Public fieldStatic memberSfMaxGapToFill
This bit will be set in the EventArgs of a Changed event every time the value returned by MaxGapToFill may have changed.
Public fieldStatic memberSfMinCornerAngle
This bit will be set in the EventArgs of a Changed event every time the value returned by MinCornerAngle may have changed.
Protected fieldStatic memberSfNextSf
NextSf state flag.
Public fieldStatic memberSfNumCorners
This bit will be set in the EventArgs of a Changed event every time the value returned by NumCorners may have changed.
Public fieldStatic memberSfShowMaxCornerAngleLine
This bit will be set in the EventArgs of a Changed event every time the value returned by ShowMaxCornerAngleLine may have changed.
Public fieldStatic memberSfShowResultLineFitLines
This bit will be set in the EventArgs of a Changed event every time the value returned by ShowResultLineFitLines may have changed.
Public fieldStatic memberSfShowResultLineFitRegions
This bit will be set in the EventArgs of a Changed event every time the value returned by ShowResultLineFitRegions may have changed.
Public fieldStatic memberSfShowSharpnessGraph
This bit will be set in the EventArgs of a Changed event every time the value returned by ShowSharpnessGraph may have changed.
Public fieldStatic memberSfSortDirectionAngle
This bit will be set in the EventArgs of a Changed event every time the value returned by SortDirectionAngle may have changed.
Public fieldStatic memberSfSortType
This bit will be set in the EventArgs of a Changed event every time the value returned by SortType may have changed.
Public fieldStatic memberSfStopLineFitAtGap
This bit will be set in the EventArgs of a Changed event every time the value returned by StopLineFitAtGap may have changed.
Top
Properties

  NameDescription
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 propertyCombineGraphicsEnabled
Gets or sets the CombineGraphicsEnabled. When true, the combined graphics will be displayed in the last run record. Combined graphics usually are the features or measurements produced by an operator.
(Inherited from Cog3DRangeImageCrossSectionOperatorBase.)
Public propertyCorner
Returns the extracted corner by the execute method. The corner position is in the ProfileSelectedSpaceName. The corner returned is the corner specified by CornerIndex property. Returns null if the corner was not extracted. Always check the status of the operator to be either Passed or FailedTolerance before calling the getter.
Public propertyCornerIndex
Gets or sets the CornerIndex. The corner with the specified index will be returned as the found corner. If more than one corner is found, the corners are sorted first and then the corner with the index specified is returned.
Public propertyCornerInImage
Returns the extracted corner by execute method.The corner position is in the range image SelectedSpaceName. Returns null if the corner was not extracted. Always check the status of the operator to be either Passed or FailedTolerance before calling the getter.
Public propertyCornerInImage3D
Returns the extracted corner by execute method. The corner position is in the range image SelectedSpaceName3D. Always check the status of the operator to be either Passed or FailedTolerance before calling the getter.
Public propertyCornerSelection
Gets or sets the corner to be returned.
Public propertyCornerType
Gets or sets the type of the corner to be extracted. It is a bit field.
Public propertyFeatureInImage
If the operator produces a feature, the feature is returned in the range image SelectedSpaceName stored in the profile. The FeatureInImage is available after the operator was run. The FeatureInImage is set to null at the beginning of the tool run.
(Inherited from Cog3DRangeImageCrossSectionOperatorBase.)
Public propertyFeatureInImage3D
If the operator produces a feature, the feature is returned in the range image SelectedSpaceName3D stored in the profile. The FeatureInImage3D is available after the operator was run. The FeatureInImage3D is set to null at the beginning of the tool run.
(Inherited from Cog3DRangeImageCrossSectionOperatorBase.)
Public propertyHasChanged (Inherited from CogSerializableChangedEventBase.)
Public propertyImageUsedForProfileDisplay
Cognex Internal Use Only.
(Inherited from Cog3DRangeImageCrossSectionOperatorBase.)
Public propertyInputGraphicsEnabled
Gets or sets the InputGraphicsEnabled. When true, the input graphics will be displayed in the current record. Input graphics usually are the regions.
(Inherited from Cog3DRangeImageCrossSectionOperatorBase.)
Public propertyLineFitLength
Gets or sets the LineFitLength. The field specifies the length of the fitting lines in ProfileSelectedSpaceName. A runtime error will be reported if the value, when converted to pixels, is less than 2 pixels, or greater than the profile length.
Public propertyLineFitSpacing
Gets or sets the LineFitSpacing. The field specifies the space between the two fitted lines in ProfileSelectedSpaceName.
Public propertyLineFitValidPointFraction
Gets or sets the LineFitValidPointFraction. The value specifies the minimum fraction of data points within LineFitLength that should be valid to perform line fitting. Valid range is [0, 1]. Valid points consists of profile non-missing points, resampled points, or interpolated points within gaps that were filled. See the algorithm description for more details Cog3DRangeImageCrossSectionExtractCornerV2.
Public propertyMaxCornerAngle
Gets or sets the MaxCornerAngle in radians. The field specifies the maximum (absolute value) angle a corner needs to have for it to be detected. The angle if the change in profile direction.
Public propertyMaxGapToFill
Gets or sets the MaxGapToFill. The field specifies the maximum horizontal length to fill in ProfileSelectedSpaceName.
Public propertyMinCornerAngle
Gets or sets the MinCornerAngle in radians. The field specifies the minimum (absolute value) angle a corner needs to have for it to be detected. The angle if the change in profile direction.
Public propertyName
Gets or sets the name of the operator. When the operator is within a collection, the name is checked for uniqueness.
(Inherited from Cog3DRangeImageCrossSectionOperatorBase.)
Public propertyNumCorners
Returns the number of corners found within the regions.
Public propertyOutputGraphicsEnabled
Gets or sets the OutputGraphicsEnabled. When true, the output graphics will be displayed in the current record. Output graphics usually are the features or measurements produced by an operator.
(Inherited from Cog3DRangeImageCrossSectionOperatorBase.)
Public propertyOutputType
Gets the OutputType of the operator.
(Inherited from Cog3DRangeImageCrossSectionOperatorBase.)
Public propertyRegions
Gets the Regions. The regions property is a collection of ICogRegion.
(Inherited from Cog3DRangeImageCrossSectionOperatorBase.)
Public propertyResultObject
Gets the ResultObject of the operator. The ResultObject is available after the operator was run. The ResultObject is set to null at the beginning of the tool run.
(Inherited from Cog3DRangeImageCrossSectionOperatorBase.)
Public propertySelectedRegionIndex
Cognex Internal Use Only.
(Inherited from Cog3DRangeImageCrossSectionOperatorBase.)
Public propertyShowMaxCornerAngleLine
If both the ShowSharpnessGraph is true and this property is true, the Current.Profile will contain the sharpness graph, the minimum corner angle line and the maximum corner angle line. If ShowSharpnessGraph is false but this property is true, the maximum corner angle line will not be displayed.
Public propertyShowResultLineFitLines
If true and we have an extracted corner, the result fitted lines will be displayed. The result fitted lines will start from the middle of the line fit region along the fitted line and will end at the interest point.
Public propertyShowResultLineFitRegions
If true and we have an extracted corner, the result line fit regions will be displayed. The region will be the same length as the LineFitLength and will be drawn along the profile.
Public propertyShowSharpnessGraph
If true, the Current.Profile record will contain the sharpness graph, and the minimum corner angle line.
Public propertySortDirectionAngle
Gets or sets the SortDirectionAngle in radians. The field specifies the direction along which the sorting of the corners is performed. The value is ignored unless SortType is set to AlongAngleDirection. Valid range is [0, 2PI].
Public propertySortType
Gets or sets the SortType. The sort type specifies how to sort the corners before finding the one specified by the corner index.
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 propertyStatus
Gets the status.
(Inherited from Cog3DRangeImageCrossSectionOperatorBase.)
Public propertyStopLineFitAtGap
Gets or sets the StopLineFitAtGap. The field specifies if the algorithm should stop line fitting at large gaps or skip over them and include points on the other side if the whole gap can fit within LineFitLength.
Public propertyToleranceCollection
Gets the ToleranceCollection. The ToleranceCollection is initialiazed by the operator and the user will not be able to delete or add to it. Each operator adds a pre-defined set based on the operator result object. By default, all tolerances are disabled.
(Inherited from Cog3DRangeImageCrossSectionOperatorBase.)
Public propertyTolerances
Gets the Tolerance object of an item specified by name. if name is not found, the return is null.
(Inherited from Cog3DRangeImageCrossSectionOperatorBase.)
Public propertyXTolerance
Gets the Cog3DRangeImageCrossSectionTolerance object to tolerance the X position.
Public propertyYTolerance
Gets the Cog3DRangeImageCrossSectionTolerance object to tolerance the Y position.
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 algorithm is made up of two algorithms: one that finds corner points based on peaks and valleys, and one that find edge points.

The new peak and alley algorithm uses two line segments to detect angle differential on a profile. Think of the line segments as two subway cars moving along the profile. The intersection of the two line segments is equivalent to the pivot point between the two subway cars. As the line segments move along the profile the angle between the lines is measured (at their point of intersection) and when this angle is within the specified thresholds a corner is identified.

The corner finder algorithm consists of 7 steps listed below for more in - depth understanding :

1. The profile is resampled to have equal arc length between sample points and gaps in the profile are filled using interpolation.

2. The interpolated points in the gaps are then marked as valid for processing if the gap length is less than or equal to a user specified value, or invalid. The MaxGapToFill is used in this step

3. For each valid point, two lines are fitted around the point using the line length specified by the user. The algorithm determines first if points around a gap can be used, and then if there are enough valid points to fit a line. The center point must be a valid point. LineFitLength, LineFitSpacing, StopLineFitAtGap, and LineFitValidPointFraction are used in this step.

4. Angle differential is computed at each valid point using the line length specified by the user. The algorithm determines first if points around a gap can be used, and then if there are enough valid points to fit a line. LineFitLength, LineFitSpacing, StopLineFitAtGap, and LineFitValidPointFraction are used in this step.

5. Angle differentials that are within the angle thresholds are detected, and at each instance, the corner location is determined by intersecting the 2 line segments around the point. CornerType, MinCornerAngle, and MaxCornerAngle are used in this step.

6. Corners are then sorted and returned to the user. SortType and SortDirectionAngle are used in this step.

7. VisionPro will return a single corner point chosen by the user. CornerSelection is used in this step.

The edge point’s algorithm is quite different and relies on identifying edge points at missing pixel regions after filling gaps smaller than MaxGapToFill.

See Also