8 Q_(0,0) =
Q_(1,1) = 1.0;
15 Q_(0,0) =
Q_(1,1) = 1.0;
28 const sensor_msgs::CameraInfo&
right)
32 bool changed = changed_left || changed_right;
48 const sensor_msgs::CameraInfoConstPtr&
right)
116 cv::Point3d& xyz)
const 124 double u = left_uv_rect.x, v = left_uv_rect.y;
125 cv::Point3d XYZ( (
Q_(0,0) * u) +
Q_(0,3), (
Q_(1,1) * v) +
Q_(1,3),
Q_(2,3));
126 double W =
Q_(3,2)*disparity +
Q_(3,3);
133 bool handleMissingValues)
const 137 cv::reprojectImageTo3D(disparity, point_cloud,
Q_, handleMissingValues);
StereoCameraModel & operator=(const StereoCameraModel &other)
bool fromCameraInfo(const sensor_msgs::CameraInfo &left, const sensor_msgs::CameraInfo &right)
Set the camera parameters from the sensor_msgs/CameraInfo messages.
PinholeCameraModel right_
double cy() const
Returns the y coordinate of the optical center.
void projectDisparityImageTo3d(const cv::Mat &disparity, cv::Mat &point_cloud, bool handleMissingValues=false) const
Project a disparity image to a 3d point cloud.
static const double MISSING_Z
double fx() const
Returns the focal length (pixels) in x direction of the rectified image.
const PinholeCameraModel & right() const
Get the right monocular camera model.
bool fromCameraInfo(const sensor_msgs::CameraInfo &msg)
Set the camera parameters from the sensor_msgs/CameraInfo message.
std::string tfFrame() const
Get the name of the camera coordinate frame in tf.
void projectDisparityTo3d(const cv::Point2d &left_uv_rect, float disparity, cv::Point3d &xyz) const
Project a rectified pixel with disparity to a 3d point.
double cx() const
Returns the x coordinate of the optical center.
const PinholeCameraModel & left() const
Get the left monocular camera model.
bool initialized() const
Returns true if the camera has been initialized.
const sensor_msgs::CameraInfo & cameraInfo() const
Returns the camera info message held internally.
double fy() const
Returns the focal length (pixels) in y direction of the rectified image.
double baseline() const
Returns the horizontal baseline in world coordinates.
Simplifies interpreting stereo image pairs geometrically using the parameters from the left and right...