ICF 3.0.5.47
Technical documentation of ICF Libraries
icalib::CSimpleLensCorrection Class Reference

Represents simple correction of image distortion by lenses. More...

#include <CSimpleLensCorrection.h>

Inheritance diagram for icalib::CSimpleLensCorrection:
Collaboration diagram for icalib::CSimpleLensCorrection:

Public Member Functions

 CSimpleLensCorrection ()
 
 CSimpleLensCorrection (const i2d::CVector2d &opticalCenter, double distortionFactor=0, double scaleFactor=1)
 
void Reset (const i2d::CVector2d &opticalCenter=i2d::CVector2d::GetZero(), double distortionFactor=0, double scaleFactor=1)
 Reset this calibration, set to be identity transform.
 
const i2d::CVector2dGetOpticalCenter () const
 
virtual void SetOpticalCenter (const i2d::CVector2d &center)
 
double GetDistortionFactor () const
 
virtual void SetDistortionFactor (double factor)
 
double GetScaleFactor () const
 
virtual void SetScaleFactor (double factor)
 
bool operator== (const CSimpleLensCorrection &calib) const
 
bool operator!= (const CSimpleLensCorrection &calib) const
 
const i2d::CRectangleGetArgumentArea () const override
 Get optional area where arguments are defined properly.
 
const i2d::CRectangleGetResultArea () const override
 Get optional area where results are defined properly.
 
const imath::IUnitInfoGetArgumentUnitInfo () const override
 Get unit description of calibration input (transformation function argument).
 
const imath::IUnitInfoGetResultUnitInfo () const override
 Get unit description of calibration output (transformation function result).
 
std::unique_ptr< i2d::ICalibration2dCreateCombinedCalibration (const ITransformation2d &transformation) const override
 
int GetTransformationFlags () const override
 Get flags of describing type of this transformation.
 
bool GetDistance (const i2d::CVector2d &origPos1, const i2d::CVector2d &origPos2, double &result, ExactnessMode mode=EM_NONE) const override
 Compute a shortness distance in transformed coordinations.
 
bool GetPositionAt (const i2d::CVector2d &origPosition, i2d::CVector2d &result, ExactnessMode mode=EM_NONE) const override
 Get position after transformation.
 
bool GetInvPositionAt (const i2d::CVector2d &transfPosition, i2d::CVector2d &result, ExactnessMode mode=EM_NONE) const override
 Get position after transformation.
 
bool GetLocalTransform (const i2d::CVector2d &origPosition, i2d::CAffine2d &result, ExactnessMode mode=EM_NONE) const override
 Get local transformation (from original to transformed coordinate system) at some original position.
 
bool GetLocalInvTransform (const i2d::CVector2d &transfPosition, i2d::CAffine2d &result, ExactnessMode mode=EM_NONE) const override
 Get local transformation (from transformed to original coordinate system) at some transformed position.
 
bool GetInvValueAt (const i2d::CVector2d &argument, i2d::CVector2d &result) const override
 
i2d::CVector2d GetInvValueAt (const i2d::CVector2d &argument) const override
 
bool GetValueAt (const i2d::CVector2d &argument, i2d::CVector2d &result) const override
 
i2d::CVector2d GetValueAt (const i2d::CVector2d &argument) const override
 
bool Serialize (iser::IArchive &archive) override
 Load or store state of this object as a archive stream.
 
int GetSupportedOperations () const override
 Get set of flags for supported operations.
 
bool CopyFrom (const istd::IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS) override
 Copy this object from another one.
 
bool IsEqual (const istd::IChangeable &object) const override
 Compare this object with another object.
 
std::unique_ptr< istd::IChangeableCloneMe (CompatibilityMode mode=CM_WITHOUT_REFS) const override
 Make a copy of this object.
 
bool ResetData (CompatibilityMode mode=CM_WITHOUT_REFS) override
 Reset data to its default state.
 
- Public Member Functions inherited from i2d::ICalibration2d
virtual std::unique_ptr< ICalibration2dCreateCombinedCalibration (const ITransformation2d &transformation) const =0
 Create new calibration being combination of this calibration and the second one.
 
- Public Member Functions inherited from i2d::ITransformation2d
- Public Member Functions inherited from imath::TISurjectFunction< CVector2d, CVector2d >
virtual bool GetInvValueAt (const CVector2d &argument, CVector2d &result) const=0
 Get inverted function value.
 
virtual CVector2d GetInvValueAt (const CVector2d &argument) const=0
 Get inverted function value.
 
- Public Member Functions inherited from imath::TIMathFunction< CVector2d, CVector2d >
virtual bool GetValueAt (const CVector2d &argument, CVector2d &result) const=0
 Get function value for specified argument value.
 
virtual CVector2d GetValueAt (const CVector2d &argument) const=0
 Get function value for specified argument value.
 
- Public Member Functions inherited from iser::ISerializable
virtual quint32 GetMinimalVersion (int versionId) const
 Get minimal needed version to correct storing of this data.
 
- Public Member Functions inherited from istd::IChangeable
virtual QMutex * GetChangesLock () const
 Get mutex beeing locked during changes, if available.
 
virtual void BeginChanges (const ChangeSet &changeSet)
 Starts the change transaction.
 
virtual void EndChanges (const ChangeSet &changeSet)
 Ends the change transaction.
 
virtual void BeginChangeGroup (const ChangeSet &changeSet)
 Starts group of changes.
 
virtual void EndChangeGroup (const ChangeSet &changeSet)
 Ends group of changes.
 

Additional Inherited Members

- Public Types inherited from i2d::ICalibration2d
enum  ChangeFlags { CF_CALIBRATION_CHANGED = 0x8d89e2 , CF_AREA_CHANGED , CF_UNITS_CHANGED }
 
enum  TransformationFlags { TF_SUPPORT_COMBINE = 1 << 10 }
 Extension of i2d::ITransformation2d::TransformationFlags. More...
 
- Public Types inherited from i2d::ITransformation2d
enum  ExactnessMode { EM_NONE , EM_EXACT , EM_VISUAL , EM_ANY }
 
enum  TransformationFlags {
  TF_FORWARD = 1 << 0 , TF_INVERTED = 1 << 1 , TF_INJECTIVE = 1 << 2 , TF_SURJECTIVE = 1 << 3 ,
  TF_PRESERVE_NULL = 1 << 4 , TF_PRESERVE_DISTANCE = 1 << 5 , TF_PRESERVE_ANGLE = 1 << 6 , TF_AFFINE = 1 << 7 ,
  TF_CONTINUES = 1 << 8
}
 Flags indication type of this transformation and supported operations. More...
 
- Public Types inherited from imath::TIMathFunction< CVector2d, CVector2d >
typedef CVector2d ArgumentType
 
typedef CVector2d ResultType
 
- Public Types inherited from istd::IChangeable
enum  ChangeFlags {
  CF_ICF_INTERNAL = 0 , CF_ALL_DATA , CF_ANY , CF_DESTROYING ,
  CF_DELEGATED , CF_NO_UNDO
}
 Data model change notification flags. More...
 
enum  SupportedOperations {
  SO_NONE = 0 , SO_OBSERVE = 1 << 0 , SO_COPY = 1 << 1 , SO_CLONE = 1 << 2 ,
  SO_COMPARE = 1 << 3 , SO_RESET = 1 << 4 , SO_CHANGE_LOCK = 1 << 5
}
 Flags for supported operations. More...
 
enum  CompatibilityMode { CM_STRICT , CM_WITHOUT_REFS , CM_WITH_REFS , CM_CONVERT }
 Control how relationship betweeen objects are interpreted. More...
 
- Static Public Member Functions inherited from istd::IChangeable
static const ChangeSetGetNoChanges ()
 Get empty set of changes.
 
static const ChangeSetGetAnyChange ()
 Get anonymous change set.
 
static const ChangeSetGetAllChanges ()
 Get anonymous change set.
 
static const ChangeSetGetDelegatedChanges ()
 Get delegated change set.
 
- Protected Member Functions inherited from istd::IChangeable
virtual void OnBeginChanges ()
 Callback function for begin change event.
 
virtual void OnEndChanges (const ChangeSet &changeSet)
 Callback function for end change event.
 

Detailed Description

Represents simple correction of image distortion by lenses.

Definition at line 21 of file CSimpleLensCorrection.h.

Constructor & Destructor Documentation

◆ CSimpleLensCorrection() [1/2]

icalib::CSimpleLensCorrection::CSimpleLensCorrection ( )

◆ CSimpleLensCorrection() [2/2]

icalib::CSimpleLensCorrection::CSimpleLensCorrection ( const i2d::CVector2d & opticalCenter,
double distortionFactor = 0,
double scaleFactor = 1 )
explicit

Member Function Documentation

◆ CloneMe()

std::unique_ptr< istd::IChangeable > icalib::CSimpleLensCorrection::CloneMe ( CompatibilityMode mode = CM_WITHOUT_REFS) const
overridevirtual

Make a copy of this object.

You may check, if this functionality is supported over GetSupportedOperations().

Returns
new instance or nullptr, if this operation is not supported.

Reimplemented from istd::IChangeable.

◆ CopyFrom()

bool icalib::CSimpleLensCorrection::CopyFrom ( const istd::IChangeable & object,
CompatibilityMode mode = CM_WITHOUT_REFS )
overridevirtual

Copy this object from another one.

Default implementation in istd::IChangeable does nothing. You may check, if this functionality is supported over GetSupportedOperations().

Reimplemented from istd::IChangeable.

◆ CreateCombinedCalibration()

std::unique_ptr< i2d::ICalibration2d > icalib::CSimpleLensCorrection::CreateCombinedCalibration ( const ITransformation2d & transformation) const
override

◆ GetArgumentArea()

const i2d::CRectangle * icalib::CSimpleLensCorrection::GetArgumentArea ( ) const
overridevirtual

Get optional area where arguments are defined properly.

Returns
pointer to restriction area object or nullptr if there is no defined restrictions.

Implements i2d::ICalibration2d.

◆ GetArgumentUnitInfo()

const imath::IUnitInfo * icalib::CSimpleLensCorrection::GetArgumentUnitInfo ( ) const
overridevirtual

Get unit description of calibration input (transformation function argument).

Returns
unit description of function argument or nullptr, if this information is unsupported.

Implements i2d::ICalibration2d.

◆ GetDistance()

bool icalib::CSimpleLensCorrection::GetDistance ( const i2d::CVector2d & origPos1,
const i2d::CVector2d & origPos2,
double & result,
ExactnessMode mode = EM_NONE ) const
overridevirtual

Compute a shortness distance in transformed coordinations.

Parameters
origPos1first position in original coordinates.
origPos2second position in original coordinates.
resultobject where result distance between positions in transformed coordinates will be stored.
modecontrols needed transformation exactness.
Returns
true, if calculation done correctly.

Implements i2d::ITransformation2d.

◆ GetDistortionFactor()

double icalib::CSimpleLensCorrection::GetDistortionFactor ( ) const

◆ GetInvPositionAt()

bool icalib::CSimpleLensCorrection::GetInvPositionAt ( const i2d::CVector2d & transfPosition,
i2d::CVector2d & result,
ExactnessMode mode = EM_NONE ) const
overridevirtual

Get position after transformation.

Parameters
transfPositionposition in transformed coordination system.
resultresult position (original coordination system).
modecontrols needed transformation exactness.
Returns
true, if calculation done correctly.

Implements i2d::ITransformation2d.

◆ GetInvValueAt() [1/2]

i2d::CVector2d icalib::CSimpleLensCorrection::GetInvValueAt ( const i2d::CVector2d & argument) const
override

◆ GetInvValueAt() [2/2]

bool icalib::CSimpleLensCorrection::GetInvValueAt ( const i2d::CVector2d & argument,
i2d::CVector2d & result ) const
override

◆ GetLocalInvTransform()

bool icalib::CSimpleLensCorrection::GetLocalInvTransform ( const i2d::CVector2d & transfPosition,
i2d::CAffine2d & result,
ExactnessMode mode = EM_NONE ) const
overridevirtual

Get local transformation (from transformed to original coordinate system) at some transformed position.

Parameters
transfPositionposition in transformed coordination system.
resultinverse transformation for specified position.
modecontrols needed transformation exactness.
Returns
true, if calculation done correctly.

Implements i2d::ITransformation2d.

◆ GetLocalTransform()

bool icalib::CSimpleLensCorrection::GetLocalTransform ( const i2d::CVector2d & origPosition,
i2d::CAffine2d & result,
ExactnessMode mode = EM_NONE ) const
overridevirtual

Get local transformation (from original to transformed coordinate system) at some original position.

Parameters
origPositionposition in (original coordination system).
resulttransformation for specified position.
modecontrols needed transformation exactness.
Returns
true, if calculation done correctly.

Implements i2d::ITransformation2d.

◆ GetOpticalCenter()

const i2d::CVector2d & icalib::CSimpleLensCorrection::GetOpticalCenter ( ) const

◆ GetPositionAt()

bool icalib::CSimpleLensCorrection::GetPositionAt ( const i2d::CVector2d & origPosition,
i2d::CVector2d & result,
ExactnessMode mode = EM_NONE ) const
overridevirtual

Get position after transformation.

Parameters
origPositionposition in (original coordination system).
resultresult position (transformed coordination system).
modecontrols needed transformation exactness.
Returns
true, if calculation done correctly.

Implements i2d::ITransformation2d.

◆ GetResultArea()

const i2d::CRectangle * icalib::CSimpleLensCorrection::GetResultArea ( ) const
overridevirtual

Get optional area where results are defined properly.

Returns
pointer to restriction area object or nullptr if there is no defined restrictions.

Implements i2d::ICalibration2d.

◆ GetResultUnitInfo()

const imath::IUnitInfo * icalib::CSimpleLensCorrection::GetResultUnitInfo ( ) const
overridevirtual

Get unit description of calibration output (transformation function result).

Returns
unit description of function result or nullptr, if this information is unsupported.

Implements i2d::ICalibration2d.

◆ GetScaleFactor()

double icalib::CSimpleLensCorrection::GetScaleFactor ( ) const

◆ GetSupportedOperations()

int icalib::CSimpleLensCorrection::GetSupportedOperations ( ) const
overridevirtual

Get set of flags for supported operations.

See also
SupportedOperations

Reimplemented from istd::IChangeable.

◆ GetTransformationFlags()

int icalib::CSimpleLensCorrection::GetTransformationFlags ( ) const
overridevirtual

Get flags of describing type of this transformation.

Implements i2d::ITransformation2d.

◆ GetValueAt() [1/2]

i2d::CVector2d icalib::CSimpleLensCorrection::GetValueAt ( const i2d::CVector2d & argument) const
override

◆ GetValueAt() [2/2]

bool icalib::CSimpleLensCorrection::GetValueAt ( const i2d::CVector2d & argument,
i2d::CVector2d & result ) const
override

◆ IsEqual()

bool icalib::CSimpleLensCorrection::IsEqual ( const istd::IChangeable & object) const
overridevirtual

Compare this object with another object.

Parameters
objectObject to be compared You may check, if this functionality is supported over GetSupportedOperations().
Returns
true if the objects are identical and false otherwise.

Reimplemented from istd::IChangeable.

◆ operator!=()

bool icalib::CSimpleLensCorrection::operator!= ( const CSimpleLensCorrection & calib) const
inline

Definition at line 103 of file CSimpleLensCorrection.h.

References operator==().

◆ operator==()

bool icalib::CSimpleLensCorrection::operator== ( const CSimpleLensCorrection & calib) const

Referenced by operator!=().

◆ Reset()

void icalib::CSimpleLensCorrection::Reset ( const i2d::CVector2d & opticalCenter = i2d::CVector2d::GetZero(),
double distortionFactor = 0,
double scaleFactor = 1 )

Reset this calibration, set to be identity transform.

◆ ResetData()

bool icalib::CSimpleLensCorrection::ResetData ( CompatibilityMode mode = CM_WITHOUT_REFS)
overridevirtual

Reset data to its default state.

Default implementation in istd::IChangeable does nothing. You may check, if this functionality is supported over GetSupportedOperations().

Returns
true if the operation was successful, and false otherwise.

Reimplemented from istd::IChangeable.

◆ Serialize()

bool icalib::CSimpleLensCorrection::Serialize ( iser::IArchive & archive)
overridevirtual

Load or store state of this object as a archive stream.

Type of operation is depending on archive type.

See also
iser::IArchive

Implements iser::ISerializable.

◆ SetDistortionFactor()

virtual void icalib::CSimpleLensCorrection::SetDistortionFactor ( double factor)
virtual

◆ SetOpticalCenter()

virtual void icalib::CSimpleLensCorrection::SetOpticalCenter ( const i2d::CVector2d & center)
virtual

◆ SetScaleFactor()

virtual void icalib::CSimpleLensCorrection::SetScaleFactor ( double factor)
virtual

The documentation for this class was generated from the following file:

© Witold Gantzke and Kirill Lepskiy