Cog3DLensDistortionCorrector ClassCognex VisionPro
This class provides lens distortion correction based on a camera calibration. At training-time, this class trains an image corrector using the lens distortion data in a camera calibration, and produces a new camera calibration to be used with corrected images. At run-time, via the Execute() method, this class converts an acquired (raw) image into a corrected image where the lens distortion has been removed.
Inheritance Hierarchy

System Object
  System MarshalByRefObject
    Cognex.VisionPro.Implementation CogObjectBase
      Cognex.VisionPro.Implementation CogSerializableObjectBase
        Cognex.VisionPro3D Cog3DLensDistortionCorrector

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

[SerializableAttribute]
public class Cog3DLensDistortionCorrector : CogSerializableObjectBase, 
	IDisposable

The Cog3DLensDistortionCorrector type exposes the following members.

Constructors

  NameDescription
Public methodCog3DLensDistortionCorrector 
Construct this default Cog3DLensDistortionCorrector. Note that IsTrained is false.
Public methodCog3DLensDistortionCorrector(Cog3DLensDistortionCorrector)
Protected methodCog3DLensDistortionCorrector(SerializationInfo, StreamingContext)
Top
Methods

  NameDescription
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 methodDispose 
Protected methodDispose(Boolean)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodExecute
Perform image correction (lens distortion removal) on the specified image. Use Raw2DFromPhys3DUsingCorrectImage as the camera calibration for the returned, corrected image.
Protected methodFinalize (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 (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.)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Public methodTrain
Train the image corrector using the specified camera calibration.
Public methodUntrain
Discard the trained data. Note that IsTrained will return false until Train() is called again.
Top
Properties

  NameDescription
Public propertyIsTrained
Gets whether this image corrector is trained.
Public propertyRaw2DFromPhys3DUsingCorrectedImage
Gets the camera calibration produced at training-time. This is the camera calibration which should be used with the corrected images.
Top
Remarks

The new camera calibration produced at training-time (Raw2DFromPhys3DUsingCorrectedImage) has a distortion model of Cog3DCameraCalibrationDistortionModelConstants.eNoDistortion, and has extrinsic parameters (Raw2DFromPhys3DUsingCorrectedImage.Camera3DFromPhys3D) that are the same as the original camera calibration (specified at training-time) extrinsic parameters.

2D features in the corrected image mapped to 3D rays in Phys3D space using Raw2DFromPhys3DUsingCorrectedImage, correspond to exactly the same 3D rays as corresponding 2D features in the uncorrected image mapped using the original camera calibration specified at training-time.

See Also