Camera Intrinsics
Experimental APIs for computing and estimating camera intrinsic parameters and for querying the pixel-mapping between sensor and projector pixels.
These APIs reside in Zivid::Experimental::Calibration and may change without prior notice.
%%{init: {'themeVariables': {'fontSize': '18px'}, 'flowchart': {'nodeSpacing': 30, 'rankSpacing': 35}}}%%
flowchart LR
Camera
Settings
Settings2D
Frame
intrinsicsOp(["intrinsics()"])
estimateOp(["estimateIntrinsics()"])
pixelMappingOp(["pixelMapping()"])
CameraIntrinsics
PixelMapping
Camera -.-> intrinsicsOp --> CameraIntrinsics
Settings -.-> intrinsicsOp
Settings2D -.-> intrinsicsOp
Frame -.-> estimateOp --> CameraIntrinsics
Camera -.-> pixelMappingOp --> PixelMapping
Settings -.-> pixelMappingOp
classDef zividClass fill:#4A8FA4,stroke:#34323D,color:#FFFFFF
classDef api fill:#91D2C8,stroke:#4A8FA4,color:#000000
class Camera,Settings,Settings2D,Frame,CameraIntrinsics,PixelMapping zividClass
class intrinsicsOp,estimateOp,pixelMappingOp api
intrinsics
Returns the camera intrinsic parameters for a given camera and, optionally, capture settings.
Three overloads are available: camera-only, camera plus Settings, and camera plus Settings2D.
-
CameraIntrinsicsintrinsics( Camera&const camera)
Intrinsic parameters of a given camera.
These intrinsic parameters are only appropriate for the resolution that the default 3D settings for the given camera provides. If planning to capture with settings other than the default 3D then use intrinsics(const Camera &camera, const Settings &settings) or intrinsics(const Camera &camera, const Settings2D &settings2d), or one can estimate the intrinsics from the frame after capture with estimateIntrinsics. Note! If there is a mismatch between 2D and 3D resolution then use intrinsics(const Camera &camera, const Settings2D &settings2d).
- パラメータ:
camera -- Reference to camera instance.
- 戻り値:
A CameraIntrinsics instance.
-
CameraIntrinsicsintrinsics( Camera&const camera, Settings&const settings)
Intrinsic parameters of a given camera and settings.
These intrinsic parameters take into account the expected resolution of the point clouds captured with these settings.
Note: This function returns intrinsics for a fixed temperature and aperture value. The only part of Settings currently used by this function is Settings::Sampling::Pixel and Settings::Processing::Resampling::Mode.
For a 2D+3D capture, the 2D color image and 3D point cloud may have different resolutions, depending on the pixel sampling and resampling settings used in the Settings and in the Settings::Color. This function returns intrinsics applicable for the 3D point cloud resolution. You can use intrinsics(const Camera &camera, const Settings2D &settings2d) with Settings::Color for 2D intrinsics.
- パラメータ:
camera -- Reference to camera instance.
settings -- Reference to settings instance.
- 戻り値:
A CameraIntrinsics instance.
-
CameraIntrinsicsintrinsics( Camera&const camera, Settings2D&const settings2d)
Intrinsic parameters of a given camera and 2D settings.
These intrinsics will match the resolution of a 2D capture done using this camera with the provided Settings2D.
- パラメータ:
camera -- Reference to camera instance.
settings2d -- Reference to a 2D settings instance.
- 戻り値:
A CameraIntrinsics instance.
-
Calibratorclass
Public Static Functions
- static CameraIntrinsics ^ Intrinsics (Zivid::NET::Camera ^ camera)
Intrinsic parameters of a given camera.
These intrinsic parameters are only appropriate for the resolution that the default 3D settings for the given camera provides. If planning to capture with settings other than the default 3D then use Experimental::Calibration::Calibrator::Intrinsics(Camera ^camera, Settings ^settings) or Experimental::Calibration::Calibrator::Intrinsics(Camera ^camera, Settings2D ^settings2d), or one can estimate the intrinsics from the frame after capture with . Note! If there is a mismatch between 2D and 3D resolution then use .
- パラメータ:
camera -- Reference to camera instance.
- 戻り値:
A CameraIntrinsics instance.
- static CameraIntrinsics ^ Intrinsics (Zivid::NET::Camera ^ camera, Zivid::NET::Settings ^ settings)
Intrinsic parameters of a given camera and settings.
These intrinsic parameters take into account the expected resolution of the point clouds captured with these settings.
Note: This function returns intrinsics for a fixed temperature and aperture value. The only part of Settings currently used by this function is Settings::Sampling::Pixel and Settings::Processing::Resampling::Mode.
For a 2D+3D capture, the 2D color image and 3D point cloud may have different resolutions, depending on the pixel sampling and resampling settings used in the Settings and in the Settings::Color. This function returns intrinsics applicable for the 3D point cloud resolution. You can use Experimental::Calibration::Calibrator::Intrinsics(Camera ^camera, Settings2D ^settings2d) with Settings::Color for 2D intrinsics.
- パラメータ:
camera -- Reference to camera instance.
settings -- Reference to settings instance.
- 戻り値:
A CameraIntrinsics instance.
- static CameraIntrinsics ^ Intrinsics (Zivid::NET::Camera ^ camera, Zivid::NET::Settings2D ^ settings2d)
Intrinsic parameters of a given camera and 2D settings.
These intrinsics will match the resolution of a 2D capture done using this camera with the provided Settings2D.
- パラメータ:
camera -- Reference to camera instance.
settings2d -- Reference to a 2D settings instance.
- 戻り値:
A CameraIntrinsics instance.
- intrinsics(
- :Cameracamera ,
- :Settings | Settings2D | None=Nonesettings ,
Get intrinsic parameters of a given camera and settings (3D or 2D).
These intrinsic parameters take into account the expected resolution of the point clouds captured with the given settings. If settings are not provided, intrinsics appropriate for the camera's default 3D capture settings is returned.
For a 2D+3D capture, the 2D color image and 3D point cloud may have different resolutions, depending on the pixel sampling and resampling settings used in the Settings and in the Settings.color. This function returns intrinsics applicable for the 3D point cloud resolution. You can call this function with a Settings2D instance for the 2D intrinsics.
- パラメータ:
camera -- A Camera instance
settings -- Settings or Settings2D to be used to get correct intrinsics (optional)
- 戻り値:
A CameraIntrinsics instance
- 例外:
TypeError -- If settings argument is not Settings or Settings2D
estimateIntrinsics
Estimates intrinsic parameters from a captured Frame without access to the camera object directly.
Useful when only a saved frame is available.
-
CameraIntrinsicsestimateIntrinsics( Frame&const frame)
Estimate camera intrinsics for a given frame.
The estimated parameters may be used to project 3D point cloud onto the corresponding 2D image. This function is for advanced use cases. Otherwise, use intrinsics(const Camera &camera) or intrinsics(const Camera &camera, const Settings &settings).
For a 2D+3D capture, the 2D color image and 3D point cloud may have different resolutions, depending on the pixel sampling and resampling settings used in the Settings and in the Settings::Color. This function returns intrinsics applicable for the 3D point cloud resolution.
- パラメータ:
frame -- Reference to frame instance.
- 戻り値:
A CameraIntrinsics instance.
-
Calibratorclass
Public Static Functions
- static CameraIntrinsics ^ EstimateIntrinsics (Zivid::NET::Frame ^ frame)
Estimate camera intrinsics for a given frame.
The estimated parameters may be used to project 3D point cloud onto the corresponding 2D image. This function is for advanced use cases. Otherwise, use Experimental::Calibration::Calibrator::Intrinsics(Camera ^camera) or Experimental::Calibration::Calibrator::Intrinsics(Camera ^camera, Settings ^settings).
For a 2D+3D capture, the 2D color image and 3D point cloud may have different resolutions, depending on the pixel sampling and resampling settings used in the Settings and in the Settings::Color. This function returns intrinsics applicable for the 3D point cloud resolution.
- パラメータ:
frame -- Reference to frame instance.
- 戻り値:
A CameraIntrinsics instance.
- estimate_intrinsics(
- :Frameframe ,
Estimate camera intrinsics for a given frame.
The estimated parameters may be used to project 3D point cloud onto the corresponding 2D image. This function is for advanced use cases. Otherwise, use intrinsics(camera).
For a 2D+3D capture, the 2D color image and 3D point cloud may have different resolutions, depending on the pixel sampling and resampling settings used in the Settings and in the Settings.color. This function returns intrinsics applicable for the 3D point cloud resolution.
- パラメータ:
frame -- A Frame instance
- 戻り値:
A CameraIntrinsics instance
pixelMapping
Returns the mapping between camera sensor pixels and projector pixels for a given camera and capture settings.
-
PixelMappingpixelMapping( Camera&const camera, Settings&const settings)
Return mapping between 3D pixels and 2D pixels given camera and settings.
A Settings object contains specifications for capturing a 3D point cloud and (optionally) a 2D image. In the cases where the 2D image is of higher resolution than the 3D point cloud, it can be useful to know how the index/coordinate of a given 3D pixel maps to index/coordinate in the 2D image. This function provides that information via a PixelMapping object. For a given 3D index (row3d, col3d), the corresponding 2D index is:
row2d = row3d*rowStride + rowOffset col2d = col3d*colStride + colOffset
Note that the offsets may be non-integers. This implies that there is no exact match between the 3D pixel coordinates and the 2D pixel coordinates. Rounding off the result will give the closest matching index in the 2D image.
In cases where the given Settings object specifies that 2D capture is disabled, this function returns the mapping from the point cloud to a hypothetical full-resolution 2D image. In cases where the given Settings object specifies a 2D image of lower resolution than the 3D point cloud, this function will throw an exception.
- パラメータ:
camera -- Reference to camera instance.
settings -- Reference to settings instance.
- 戻り値:
A PixelMapping instance.
Pixel mapping is exposed through the C++ and Python APIs. See the C++ and C# API reference for the full reference.
- pixel_mapping( ) PixelMapping
Return pixel mapping information given camera and settings.
When mapping from a subsampled point cloud to a full resolution 2D image it is important to get the pixel mapping correct. This mapping depends on camera model and settings. This function provides the correct parameters to map the 2D coordinates in a point cloud captured using settings to the full resolution of the camera.
- パラメータ:
camera -- Reference to camera instance.
settings -- Reference to settings instance.
- 戻り値:
A PixelMapping instance.
CameraIntrinsics
The intrinsic parameters returned by intrinsics and
estimateIntrinsics (camera matrix and distortion coefficients).
-
CameraIntrinsicsclass
Information about the intrinsic parameters of the camera (OpenCV model)
Public Functions
-
CameraIntrinsics()
Default constructor.
-
CameraIntrinsics( stdstring&const:: fileName)explicit
Construct CameraIntrinsics by loading from file.
-
stdstringserialize()const::
Serialize to a string.
See also fromSerialized. The returned string is formatted in YAML, and is compatible with the contents of files saved using save.
-
< Argstemplatetypename...>
CameraIntrinsics(Args& &...args)inlineexplicit Constructor taking variadic number of arguments.
One or more descendant types can be provided. All types not provided will be set to their default value. The result is the same as default constructing CameraIntrinsics then invoking
set(args).The provided arguments must be descendants of CameraIntrinsics. These types can be provided:
-
< Argstemplatetypename...>
set(Args& &...args)inlinevoid Set multiple arguments.
The method invokes
set(arg)with each of the provided arguments.The provided arguments must be descendants of CameraIntrinsics. These types can be provided:
-
< Argstemplatetypename...>
CameraIntrinsicscopyWith(Args& &...args)constinline Returns a copy of this object with the given argument(s) set to the new value(s)
Creates a copy of this CameraIntrinsics object, then invokes
set(args)on the copy, and finally returns the copy. This method does not modify the original object.The provided arguments must be descendants of CameraIntrinsics. These types can be provided:
-
CameraMatrix&cameraMatrix()constinlineconst
Get CameraMatrix.
-
CameraMatrix&cameraMatrix()inline
Get CameraMatrix.
-
CameraIntrinsics&set( CameraMatrix&const value)inline
Set CameraMatrix.
-
CameraIntrinsics&set( CameraMatrixCX&const:: value)inline
Set CameraMatrix::CX.
-
CameraIntrinsics&set( CameraMatrixCY&const:: value)inline
Set CameraMatrix::CY.
-
CameraIntrinsics&set( CameraMatrixFX&const:: value)inline
Set CameraMatrix::FX.
-
CameraIntrinsics&set( CameraMatrixFY&const:: value)inline
Set CameraMatrix::FY.
-
Distortion&distortion()constinlineconst
Get Distortion.
-
Distortion&distortion()inline
Get Distortion.
-
CameraIntrinsics&set( Distortion&const value)inline
Set Distortion.
-
CameraIntrinsics&set( DistortionK1&const:: value)inline
Set Distortion::K1.
-
CameraIntrinsics&set( DistortionK2&const:: value)inline
Set Distortion::K2.
-
CameraIntrinsics&set( DistortionK3&const:: value)inline
Set Distortion::K3.
-
CameraIntrinsics&set( DistortionP1&const:: value)inline
Set Distortion::P1.
-
CameraIntrinsics&set( DistortionP2&const:: value)inline
Set Distortion::P2.
-
< Ftemplatetypename>
forEach( F&const f)constinlinevoid Run the given function on each direct member with the value of the member as parameter.
-
< Ftemplatetypename>
forEach( F&const f)inlinevoid Run the given function on each direct member with the value of the member as parameter.
-
==operator( CameraIntrinsics&const other)constbool
Equality operator.
-
!=operator( CameraIntrinsics&const other)constbool
Inequality operator.
-
stdstringtoString()const::
Get the value as string.
-
save( stdstring&const:: fileName)constvoid
Save to the given file.
-
load( stdstring&const:: fileName)void
Load from the given file.
Public Static Functions
-
CameraIntrinsicsfromSerialized( stdstring&const:: value)static
Construct a new CameraIntrinsics instance from a previously serialized string.
See also serialize.
Public Static Attributes
-
DataModelNodeTypenodeType=DataModelNodeTypegroupstaticconstexpr:: ::::
The type of this node.
-
path={}staticconstexprconstchar* ""
The full path for this value.
-
name={}staticconstexprconstchar* "CameraIntrinsics"
The name of this value.
- static constexpr const char * description {R"description(Information about the intrinsic parameters of the camera (OpenCV model))description"}
The description for this value.
Friends
-
stdostream&<<operator(stdostream&:: stream, CameraIntrinsics&const value)inlinefriend::
Operator to send the value as string to a stream.
-
CameraMatrixclass
The camera matrix K (=[fx,0,cx;0,fy,cy;0,0,1])
Public Functions
-
CameraMatrix()
Default constructor.
-
< Argstemplatetypename...>
CameraMatrix(Args& &...args)inlineexplicit Constructor taking variadic number of arguments.
One or more descendant types can be provided. All types not provided will be set to their default value. The result is the same as default constructing
CameraMatrixthen invokingset(args).The provided arguments must be descendants of
CameraMatrix. These types can be provided:
-
< Argstemplatetypename...>
set(Args& &...args)inlinevoid Set multiple arguments.
The method invokes
set(arg)with each of the provided arguments.The provided arguments must be descendants of
CameraMatrix. These types can be provided:
-
< Argstemplatetypename...>
CameraMatrixcopyWith(Args& &...args)constinline Returns a copy of this object with the given argument(s) set to the new value(s)
Creates a copy of this CameraMatrix object, then invokes
set(args)on the copy, and finally returns the copy. This method does not modify the original object.The provided arguments must be descendants of
CameraMatrix. These types can be provided:
-
CameraMatrix&set( CX&const value)inline
Set CX.
-
CameraMatrix&set( CY&const value)inline
Set CY.
-
CameraMatrix&set( FX&const value)inline
Set FX.
-
CameraMatrix&set( FY&const value)inline
Set FY.
-
< Ftemplatetypename>
forEach( F&const f)constinlinevoid Run the given function on each direct member with the value of the member as parameter.
-
< Ftemplatetypename>
forEach( F&const f)inlinevoid Run the given function on each direct member with the value of the member as parameter.
-
==operator( CameraMatrix&const other)constbool
Equality operator.
-
!=operator( CameraMatrix&const other)constbool
Inequality operator.
-
stdstringtoString()const::
Get the value as string.
Public Static Attributes
-
DataModelNodeTypenodeType=DataModelNodeTypegroupstaticconstexpr:: ::::
The type of this node.
-
path={}staticconstexprconstchar* "CameraMatrix"
The full path for this value.
-
name={}staticconstexprconstchar* "CameraMatrix"
The name of this value.
- static constexpr const char * description {R"description(The camera matrix K (=[fx,0,cx;0,fy,cy;0,0,1]))description"}
The description for this value.
Friends
-
stdostream&<<operator(stdostream&:: stream, CameraMatrix&const value)inlinefriend::
Operator to send the value as string to a stream.
-
CXclass
x coordinate of the principal point
Public Types
-
ValueType=doubleusing
The type of the underlying value.
Public Functions
-
CX()=default
Default constructor.
-
CX( doublevalue)inlineexplicitconstexpr
Constructor.
-
value()constdouble
Get the value.
-
stdstringtoString()const::
Get the value as string.
Public Static Functions
Public Static Attributes
-
DataModelNodeTypenodeType=DataModelNodeTypeleafValuestaticconstexpr:: ::::
The type of this node.
-
path={}staticconstexprconstchar* "CameraMatrix/CX"
The full path for this value.
-
name={}staticconstexprconstchar* "CX"
The name of this value.
- static constexpr const char * description {R"description(x coordinate of the principal point)description"}
The description for this value.
-
ValueType=doubleusing
-
CYclass
y coordinate of the principal point
Public Types
-
ValueType=doubleusing
The type of the underlying value.
Public Functions
-
CY()=default
Default constructor.
-
CY( doublevalue)inlineexplicitconstexpr
Constructor.
-
value()constdouble
Get the value.
-
stdstringtoString()const::
Get the value as string.
Public Static Functions
Public Static Attributes
-
DataModelNodeTypenodeType=DataModelNodeTypeleafValuestaticconstexpr:: ::::
The type of this node.
-
path={}staticconstexprconstchar* "CameraMatrix/CY"
The full path for this value.
-
name={}staticconstexprconstchar* "CY"
The name of this value.
- static constexpr const char * description {R"description(y coordinate of the principal point)description"}
The description for this value.
-
ValueType=doubleusing
-
FXclass
Focal length in x.
Public Types
-
ValueType=doubleusing
The type of the underlying value.
Public Functions
-
FX()=default
Default constructor.
-
FX( doublevalue)inlineexplicitconstexpr
Constructor.
-
value()constdouble
Get the value.
-
stdstringtoString()const::
Get the value as string.
Public Static Functions
Public Static Attributes
-
DataModelNodeTypenodeType=DataModelNodeTypeleafValuestaticconstexpr:: ::::
The type of this node.
-
path={}staticconstexprconstchar* "CameraMatrix/FX"
The full path for this value.
-
name={}staticconstexprconstchar* "FX"
The name of this value.
- static constexpr const char * description = { R"description(Focal length in x)description" }
The description for this value.
-
ValueType=doubleusing
-
FYclass
Focal length in y.
Public Types
-
ValueType=doubleusing
The type of the underlying value.
Public Functions
-
FY()=default
Default constructor.
-
FY( doublevalue)inlineexplicitconstexpr
Constructor.
-
value()constdouble
Get the value.
-
stdstringtoString()const::
Get the value as string.
Public Static Functions
Public Static Attributes
-
DataModelNodeTypenodeType=DataModelNodeTypeleafValuestaticconstexpr:: ::::
The type of this node.
-
path={}staticconstexprconstchar* "CameraMatrix/FY"
The full path for this value.
-
name={}staticconstexprconstchar* "FY"
The name of this value.
- static constexpr const char * description = { R"description(Focal length in y)description" }
The description for this value.
-
ValueType=doubleusing
-
CameraMatrix()
-
Distortionclass
The radial and tangential distortion parameters.
Public Functions
-
Distortion()
Default constructor.
-
< Argstemplatetypename...>
Distortion(Args& &...args)inlineexplicit Constructor taking variadic number of arguments.
One or more descendant types can be provided. All types not provided will be set to their default value. The result is the same as default constructing
Distortionthen invokingset(args).The provided arguments must be descendants of
Distortion. These types can be provided:
-
< Argstemplatetypename...>
set(Args& &...args)inlinevoid Set multiple arguments.
The method invokes
set(arg)with each of the provided arguments.The provided arguments must be descendants of
Distortion. These types can be provided:
-
< Argstemplatetypename...>
DistortioncopyWith(Args& &...args)constinline Returns a copy of this object with the given argument(s) set to the new value(s)
Creates a copy of this Distortion object, then invokes
set(args)on the copy, and finally returns the copy. This method does not modify the original object.The provided arguments must be descendants of
Distortion. These types can be provided:
-
Distortion&set( K1&const value)inline
Set K1.
-
Distortion&set( K2&const value)inline
Set K2.
-
Distortion&set( K3&const value)inline
Set K3.
-
Distortion&set( P1&const value)inline
Set P1.
-
Distortion&set( P2&const value)inline
Set P2.
-
< Ftemplatetypename>
forEach( F&const f)constinlinevoid Run the given function on each direct member with the value of the member as parameter.
-
< Ftemplatetypename>
forEach( F&const f)inlinevoid Run the given function on each direct member with the value of the member as parameter.
-
==operator( Distortion&const other)constbool
Equality operator.
-
!=operator( Distortion&const other)constbool
Inequality operator.
-
stdstringtoString()const::
Get the value as string.
Public Static Attributes
-
DataModelNodeTypenodeType=DataModelNodeTypegroupstaticconstexpr:: ::::
The type of this node.
-
path={}staticconstexprconstchar* "Distortion"
The full path for this value.
-
name={}staticconstexprconstchar* "Distortion"
The name of this value.
- static constexpr const char * description {R"description(The radial and tangentialdistortionparameters)description"}
The description for this value.
Friends
-
stdostream&<<operator(stdostream&:: stream, Distortion&const value)inlinefriend::
Operator to send the value as string to a stream.
-
K1class
First radial distortion term.
Public Types
-
ValueType=doubleusing
The type of the underlying value.
Public Functions
-
K1()=default
Default constructor.
-
K1( doublevalue)inlineexplicitconstexpr
Constructor.
-
value()constdouble
Get the value.
-
stdstringtoString()const::
Get the value as string.
Public Static Functions
Public Static Attributes
-
DataModelNodeTypenodeType=DataModelNodeTypeleafValuestaticconstexpr:: ::::
The type of this node.
-
path={}staticconstexprconstchar* "Distortion/K1"
The full path for this value.
-
name={}staticconstexprconstchar* "K1"
The name of this value.
- static constexpr const char * description = { R"description(First radial distortion term)description" }
The description for this value.
-
ValueType=doubleusing
-
K2class
Second radial distortion term.
Public Types
-
ValueType=doubleusing
The type of the underlying value.
Public Functions
-
K2()=default
Default constructor.
-
K2( doublevalue)inlineexplicitconstexpr
Constructor.
-
value()constdouble
Get the value.
-
stdstringtoString()const::
Get the value as string.
Public Static Functions
Public Static Attributes
-
DataModelNodeTypenodeType=DataModelNodeTypeleafValuestaticconstexpr:: ::::
The type of this node.
-
path={}staticconstexprconstchar* "Distortion/K2"
The full path for this value.
-
name={}staticconstexprconstchar* "K2"
The name of this value.
- static constexpr const char * description = { R"description(Second radial distortion term)description" }
The description for this value.
-
ValueType=doubleusing
-
K3class
Third radial distortion term.
Public Types
-
ValueType=doubleusing
The type of the underlying value.
Public Functions
-
K3()=default
Default constructor.
-
K3( doublevalue)inlineexplicitconstexpr
Constructor.
-
value()constdouble
Get the value.
-
stdstringtoString()const::
Get the value as string.
Public Static Functions
Public Static Attributes
-
DataModelNodeTypenodeType=DataModelNodeTypeleafValuestaticconstexpr:: ::::
The type of this node.
-
path={}staticconstexprconstchar* "Distortion/K3"
The full path for this value.
-
name={}staticconstexprconstchar* "K3"
The name of this value.
- static constexpr const char * description = { R"description(Third radial distortion term)description" }
The description for this value.
-
ValueType=doubleusing
-
P1class
First tangential distortion term.
Public Types
-
ValueType=doubleusing
The type of the underlying value.
Public Functions
-
P1()=default
Default constructor.
-
P1( doublevalue)inlineexplicitconstexpr
Constructor.
-
value()constdouble
Get the value.
-
stdstringtoString()const::
Get the value as string.
Public Static Functions
Public Static Attributes
-
DataModelNodeTypenodeType=DataModelNodeTypeleafValuestaticconstexpr:: ::::
The type of this node.
-
path={}staticconstexprconstchar* "Distortion/P1"
The full path for this value.
-
name={}staticconstexprconstchar* "P1"
The name of this value.
- static constexpr const char * description = { R"description(First tangential distortion term)description" }
The description for this value.
-
ValueType=doubleusing
-
P2class
Second tangential distortion term.
Public Types
-
ValueType=doubleusing
The type of the underlying value.
Public Functions
-
P2()=default
Default constructor.
-
P2( doublevalue)inlineexplicitconstexpr
Constructor.
-
value()constdouble
Get the value.
-
stdstringtoString()const::
Get the value as string.
Public Static Functions
Public Static Attributes
-
DataModelNodeTypenodeType=DataModelNodeTypeleafValuestaticconstexpr:: ::::
The type of this node.
-
path={}staticconstexprconstchar* "Distortion/P2"
The full path for this value.
-
name={}staticconstexprconstchar* "P2"
The name of this value.
- static constexpr const char * description {R"description(Second tangentialdistortionterm)description"}
The description for this value.
-
ValueType=doubleusing
-
Distortion()
-
CameraIntrinsics()
-
CameraIntrinsicsstruct
Information about the intrinsic parameters of the camera (OpenCV model)
Public Functions
- System::String ^ Serialize ()
Serialize to a string.
See also FromSerialized. The returned string is formatted in YAML, and is compatible with the contents of files saved using Save.
- void Save (System::String ^ fileName)
Save to the given file.
- void Load (System::String ^ fileName)
Load from the given file.
-
CameraIntrinsics()inline
Constructor.
- CameraIntrinsics ^ CopyWith (CopyWithDelegate ^ delegate)
Create a clone (deep copy) of the current instance and invoke delegate on the clone.
Creates a clone (deep copy) of this object, then invokes the delegate function on the clone, and finally returns the clone. This method can be used to create a clone of an instance and then change one or more properties on the clone in one method call. The current instance is unchanged.
- CameraIntrinsics ^ Clone ()
Create a clone (deep copy) of the current instance.
- System::String ^ ToString () override
Get string representation of the object.
Public Static Attributes
- static CameraIntrinsics(System::String ^ fileName) CameraIntrinsics FromSerialized )(System::String ^ value)
Construct CameraIntrinsics by loading from file.
Construct a new CameraIntrinsics instance from a previously serialized string
See also Serialize.
-
CameraMatrixGroupstruct
The camera matrix K (=[fx,0,cx;0,fy,cy;0,0,1])
Public Functions
-
CameraMatrixGroup()inline
Constructor.
- CameraMatrixGroup ^ CopyWith (CopyWithDelegate ^ delegate)
Create a clone (deep copy) of the current instance and invoke delegate on the clone.
Creates a clone (deep copy) of this object, then invokes the delegate function on the clone, and finally returns the clone. This method can be used to create a clone of an instance and then change one or more properties on the clone in one method call. The current instance is unchanged.
- CameraMatrixGroup ^ Clone ()
Create a clone (deep copy) of the current instance.
- System::String ^ ToString () override
Get string representation of the object.
-
CameraMatrixGroup()inline
-
DistortionGroupstruct
The radial and tangential distortion parameters.
Public Functions
-
DistortionGroup()inline
Constructor.
- DistortionGroup ^ CopyWith (CopyWithDelegate ^ delegate)
Create a clone (deep copy) of the current instance and invoke delegate on the clone.
Creates a clone (deep copy) of this object, then invokes the delegate function on the clone, and finally returns the clone. This method can be used to create a clone of an instance and then change one or more properties on the clone in one method call. The current instance is unchanged.
- DistortionGroup ^ Clone ()
Create a clone (deep copy) of the current instance.
- System::String ^ ToString () override
Get string representation of the object.
-
DistortionGroup()inline
- classCameraIntrinsics(
- :CameraIntrinsics | None=Nonecamera_matrix ,
- :CameraIntrinsics | None=Nonedistortion ,
Information about the intrinsic parameters of the camera (OpenCV model)
Initialization
- classCameraMatrix( )
The camera matrix K (=[fx,0,cx;0,fy,cy;0,0,1])
Initialization
- propertycx
x coordinate of the principal point
- propertycy
y coordinate of the principal point
- propertyfx
Focal length in x
- propertyfy
Focal length in y
- classDistortion(
- :float | int=0.0k1 ,
- :float | int=0.0k2 ,
- :float | int=0.0k3 ,
- :float | int=0.0p1 ,
- :float | int=0.0p2 ,
The radial and tangential distortion parameters
Initialization
- propertyk1
First radial distortion term
- propertyk2
Second radial distortion term
- propertyk3
Third radial distortion term
- propertyp1
First tangential distortion term
- propertyp2
Second tangential distortion term
- propertycamera_matrix
The camera matrix K (=[fx,0,cx;0,fy,cy;0,0,1])
- propertydistortion
The radial and tangential distortion parameters
- classmethodload(file_name)
Construct CameraIntrinsics by loading from file
- save(file_name)
Save to the given file
- classmethodfrom_serialized(value)
Construct a new CameraIntrinsics instance from a previously serialized string
See also serialize.
- serialize()
Serialize to a string
See also from_serialized. The returned string is formatted in YAML, and is compatible with the contents of files saved using save.
PixelMapping
The mapping returned by pixelMapping describing how camera sensor pixels relate to projector pixels.
-
PixelMappingclass
Pixel mapping from subsampled to full resolution.
Required when mapping an index in a subsampled point cloud to e.g. a full resolution 2D image.
Public Functions
-
rowStride()constinlineint
Row stride.
Use it as the increment in a loop when looping through full resolution along rows.
-
colStride()constinlineint
Col stride.
Use it as the increment in a loop when looping through full resolution along columns.
-
rowOffset()constinlinefloat
Offset in y, or row.
Initialize the row counter to this value.
-
colOffset()constinlinefloat
Offset in x, or column.
Initialize the column counter to this value.
- ZIVID_UTILS_EXPORT std::string toString () const
Get string representation.
- ZIVID_UTILS_EXPORT bool operator== (const PixelMapping &rhs) const
Check for equality.
- ZIVID_UTILS_EXPORT bool operator!= (const PixelMapping &rhs) const
Check for inequality.
-
rowStride()constinlineint
The pixel mapping is exposed through the C++ and Python APIs. See the C++ and C# API reference for the full reference.
- classPixelMapping( )
Pixel mapping from subsampled to full resolution.
Required when mapping an index in a subsampled point cloud to e.g. a full resolution 2D image.
Initialization
See also