Collection of Caliper results.
Inheritance Hierarchy
System MarshalByRefObject
Cognex.VisionPro.Implementation CogObjectBase
Cognex.VisionPro.Caliper CogCaliperResults
Namespace: Cognex.VisionPro.Caliper
Assembly: Cognex.VisionPro.Caliper (in Cognex.VisionPro.Caliper.dll) Version: 65.1.0.0
Syntax
The CogCaliperResults type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| CogCaliperResults | Constructs a new instance of this class. | |
| CogCaliperResults(IntPtr) | Constructs a new instance of this class using com pointer. | |
| CogCaliperResults(CogCaliperResults) | Constructs a new instance of this class as a deep copy of the given instance. |
Methods
| Name | Description | |
|---|---|---|
| Clone | Returns a deep copy of this class instance. Derived classes that implement Clone should override this method; other clients who wish to clone this instance should call ICloneable.Clone. See also CogSerializer.DeepCopyObject | |
| CopyTo | Copies the contents of this collection to an array. | |
| CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) | |
| Dispose | ||
| Dispose(Boolean) | ||
| Equals | (Inherited from Object.) | |
| Finalize | (Overrides Object Finalize .) | |
| GetAttributes |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetClassName |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetComponentName |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetConverter |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetDefaultEvent |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetDefaultProperty |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetEditor |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetEvents |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetEvents( Attribute ) |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetFilteredValues | Filtered image values normalized to the range -255 -> 255. These values represent the contrast at each point in the projected image. | |
| GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
| GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |
| GetObjectData | ||
| GetProjectionValues | Projected image values. These are normalized to the range 0 -> 255 and account for any clipping. | |
| GetProperties |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetProperties( Attribute ) |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetPropertyOwner |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetTime | Elapsed time in milliseconds for the specified time component. | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| IndexOf | Gets the index of the given item. If the item cannot be found -1 is returned. | |
| InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |
| Map | Map between filtered image location and result position and projection image location. | |
| MapFromImage | Map from the image to one of the caliper 1D spaces. | |
| MapToImage | Map from a caliper 1D space back to the image. T parameterizes the direction of projection such that a value of 0 corresponds to the P0PX edge of the caliper window and a value of 1 corresponds to the opposite edge. | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.) | |
| Sort | Sort the results and create a new results object. | |
| ToString | (Inherited from Object.) |
Properties
| Name | Description | |
|---|---|---|
| Count | Gets the number of items contained in this collection. | |
| Edges | Collection of all edges located, in increasing order of position. | |
| IsSynchronized | Gets a value indicating whether access to this collection is synchronized (thread-safe). | |
| Item | Gets or sets the item at the specified index. In C#, this property is the indexer for the collection. | |
| SyncRoot | Gets an object that can be used to synchronize access to this collection. |
Remarks
Collection of caliper results.
Examples
Imports Cognex.VisionPro
Imports Cognex.VisionPro.Caliper
Imports Cognex.VisionPro.ImageProcessing
' Working with a CogCaliperTool object
Dim myCaltool As New CogCaliperTool
' Display a point marker for each found edge
Dim myEdge As CogCaliperEdge
For Each myEdge In myCaltool.Results.Edges
Dim myCPM As New CogPointMarker
myCPM.SetCenterRotationSize(myEdge.PositionX, myEdge.PositionY, 0, 10)
If myEdge.Contrast > 10 Then
myCPM.Color = CogColorConstants.DarkGreen
Else
myCPM.Color = CogColorConstants.Red
End If
CogDisplay1.StaticGraphics.Add(myCPM, "")
Nextusing Cognex.VisionPro; using Cognex.VisionPro.Caliper; using Cognex.VisionPro.ImageProcessing; // Working with a CogCaliperTool object CogCaliperTool myCaltool = new CogCaliperTool(); // Display a point marker for each found edge foreach (CogCaliperEdge myEdge in myCaltool.Results.Edges) { CogPointMarker myCPM = new CogPointMarker(); myCPM.SetCenterRotationSize(myEdge.PositionX, myEdge.PositionY, 0, 10); if ( myEdge.Contrast > 10 ) { myCPM.Color = CogColorConstants.DarkGreen; } else { myCPM.Color = CogColorConstants.Red; } CogDisplay1.StaticGraphics.Add(myCPM, ""); }
See Also