ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cloudViewer::camera::PinholeCameraIntrinsic Class Reference

Contains the pinhole camera intrinsic parameters. More...

#include <PinholeCameraIntrinsic.h>

Inheritance diagram for cloudViewer::camera::PinholeCameraIntrinsic:
Collaboration diagram for cloudViewer::camera::PinholeCameraIntrinsic:

Public Member Functions

 PinholeCameraIntrinsic ()
 Default Constructor. More...
 
 PinholeCameraIntrinsic (int width, int height, const Eigen::Matrix3d &intrinsic_matrix)
 Parameterized Constructor. More...
 
 PinholeCameraIntrinsic (PinholeCameraIntrinsicParameters)
 Parameterized Constructor. More...
 
 PinholeCameraIntrinsic (int width, int height, double fx, double fy, double cx, double cy)
 Parameterized Constructor. More...
 
virtual ~PinholeCameraIntrinsic () override
 
void SetIntrinsics (int width, int height, double fx, double fy, double cx, double cy)
 Set camera intrinsic parameters. More...
 
std::pair< double, double > GetFocalLength () const
 Returns the focal length in a tuple of X-axis and Y-axis focal lengths. More...
 
std::pair< double, double > GetPrincipalPoint () const
 
double GetSkew () const
 Returns the skew. More...
 
bool IsValid () const
 Returns true iff both the width and height are greater than 0. More...
 
bool ConvertToJsonValue (Json::Value &value) const override
 
bool ConvertFromJsonValue (const Json::Value &value) override
 
- Public Member Functions inherited from cloudViewer::utility::IJsonConvertible
virtual ~IJsonConvertible ()
 
virtual std::string ToString () const
 Convert to a styled string representation of JSON data for display. More...
 

Public Attributes

int width_ = -1
 Width of the image. More...
 
int height_ = -1
 Height of the image. More...
 
Eigen::Matrix3d intrinsic_matrix_
 

Additional Inherited Members

- Static Public Member Functions inherited from cloudViewer::utility::IJsonConvertible
static bool EigenVector3dFromJsonArray (Eigen::Vector3d &vec, const Json::Value &value)
 
static bool EigenVector3dToJsonArray (const Eigen::Vector3d &vec, Json::Value &value)
 
static bool EigenVector4dFromJsonArray (Eigen::Vector4d &vec, const Json::Value &value)
 
static bool EigenVector4dToJsonArray (const Eigen::Vector4d &vec, Json::Value &value)
 
static bool EigenMatrix3dFromJsonArray (Eigen::Matrix3d &mat, const Json::Value &value)
 
static bool EigenMatrix3dToJsonArray (const Eigen::Matrix3d &mat, Json::Value &value)
 
static bool EigenMatrix4dFromJsonArray (Eigen::Matrix4d &mat, const Json::Value &value)
 
static bool EigenMatrix4dToJsonArray (const Eigen::Matrix4d &mat, Json::Value &value)
 
static bool EigenMatrix4dFromJsonArray (Eigen::Matrix4d_u &mat, const Json::Value &value)
 
static bool EigenMatrix4dToJsonArray (const Eigen::Matrix4d_u &mat, Json::Value &value)
 
static bool EigenMatrix6dFromJsonArray (Eigen::Matrix6d &mat, const Json::Value &value)
 
static bool EigenMatrix6dToJsonArray (const Eigen::Matrix6d &mat, Json::Value &value)
 
static bool EigenMatrix6dFromJsonArray (Eigen::Matrix6d_u &mat, const Json::Value &value)
 
static bool EigenMatrix6dToJsonArray (const Eigen::Matrix6d_u &mat, Json::Value &value)
 

Detailed Description

Contains the pinhole camera intrinsic parameters.

Definition at line 34 of file PinholeCameraIntrinsic.h.

Constructor & Destructor Documentation

◆ PinholeCameraIntrinsic() [1/4]

cloudViewer::camera::PinholeCameraIntrinsic::PinholeCameraIntrinsic ( )

Default Constructor.

◆ PinholeCameraIntrinsic() [2/4]

cloudViewer::camera::PinholeCameraIntrinsic::PinholeCameraIntrinsic ( int  width,
int  height,
const Eigen::Matrix3d &  intrinsic_matrix 
)

Parameterized Constructor.

Parameters
widthwidth of the image. (Default: -1).
heightheight of the image. (Default: -1).
intrinsic_matrix3x3 intrinsic matrix. (Default: Identity).

◆ PinholeCameraIntrinsic() [3/4]

cloudViewer::camera::PinholeCameraIntrinsic::PinholeCameraIntrinsic ( PinholeCameraIntrinsicParameters  )

Parameterized Constructor.

Parameters
PinholeCameraIntrinsicParameters- Sets the camera parameters to the default settings of one of the sensors.

◆ PinholeCameraIntrinsic() [4/4]

cloudViewer::camera::PinholeCameraIntrinsic::PinholeCameraIntrinsic ( int  width,
int  height,
double  fx,
double  fy,
double  cx,
double  cy 
)

Parameterized Constructor.

Parameters
widthwidth of the image.
heightheight of the image.
fxfocal length along the X-axis.
fyfocal length along the Y-axis.
cxprincipal point of the X-axis.
cyprincipal point of the Y-axis.

◆ ~PinholeCameraIntrinsic()

virtual cloudViewer::camera::PinholeCameraIntrinsic::~PinholeCameraIntrinsic ( )
overridevirtual

Member Function Documentation

◆ ConvertFromJsonValue()

bool cloudViewer::camera::PinholeCameraIntrinsic::ConvertFromJsonValue ( const Json::Value &  value)
overridevirtual

◆ ConvertToJsonValue()

bool cloudViewer::camera::PinholeCameraIntrinsic::ConvertToJsonValue ( Json::Value &  value) const
overridevirtual

◆ GetFocalLength()

std::pair<double, double> cloudViewer::camera::PinholeCameraIntrinsic::GetFocalLength ( ) const
inline

◆ GetPrincipalPoint()

std::pair<double, double> cloudViewer::camera::PinholeCameraIntrinsic::GetPrincipalPoint ( ) const
inline

◆ GetSkew()

double cloudViewer::camera::PinholeCameraIntrinsic::GetSkew ( ) const
inline

◆ IsValid()

bool cloudViewer::camera::PinholeCameraIntrinsic::IsValid ( ) const
inline

Returns true iff both the width and height are greater than 0.

Definition at line 101 of file PinholeCameraIntrinsic.h.

Referenced by cloudViewer::camera::pybind_camera_classes(), and cloudViewer::io::rpc::SetLegacyCamera().

◆ SetIntrinsics()

void cloudViewer::camera::PinholeCameraIntrinsic::SetIntrinsics ( int  width,
int  height,
double  fx,
double  fy,
double  cx,
double  cy 
)
inline

Set camera intrinsic parameters.

Parameters
width- width of the image.
height- height of the image.
fx- focal length along the X-axis.
fy- focal length along the Y-axis.
cx- principal point of the X-axis.
cy- principal point of the Y-axis.

Definition at line 75 of file PinholeCameraIntrinsic.h.

Referenced by cloudViewer::t::io::RealSenseSensorConfig::GetMetadataJson(), main(), and cloudViewer::camera::pybind_camera_classes().

Member Data Documentation

◆ height_

◆ intrinsic_matrix_

◆ width_


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