#include <MultiSenseTypes.hh>
Classes | |
class | Data |
Public Attributes | |
Data | left |
Data | right |
Class used For querying/setting camera calibration.
Parameters are for the maximum operating resolution of the device: CMV2000: 2048x1088 CVM4000: 2048x2048
Example code to querying the current camera calibration from a sensor:
{.cpp} // // Instantiate a channel connecting to a sensor at the factory default // IP address crl::multisense::Channel* channel; channel = crl::multisense::Channel::Create("10.66.171.21"); channel->setMtu(7200); // // Create a image::Calibration instance to store the queried calibration crl::multisense::image::Calibration imageCalibration; // // Query the camera calibration from the Channel instance crl::multisense::Status status = channel->getImageCalibration(imageCalibration); // // Check to see if the calibration query succeeded if(crl::multisense::Status_Ok != status) { throw std::runtime_error("Unable to query image calibration"); } // // Use the image calibration... // // Destroy the channel instance crl::multisense::Channel::Destroy(channel);
Example code to set a camera calibration:
{.cpp} // // Instantiate a channel connecting to a sensor at the factory default // IP address crl::multisense::Channel* channel; channel = crl::multisense::Channel::Create("10.66.171.21"); channel->setMtu(7200); // // Create a image::Calibration instance to store the queried calibration crl::multisense::image::Calibration imageCalibration; // // Initialize left and right calibration matrices. // In this example we are using arbitrary values. These should be // parameters generated from stereo calibration routine. All sensors // ship pre-calibrated so this operation is unnecessary. imageCalibration.left.M = { {1, 0, 0}, {0, 1, 0}, {0, 0, 1} }; imageCalibration.right.M = { {1, 0, 0}, {0, 1, 0}, {0, 0, 1} }; imageCalibration.left.D = { 1, 1, 1, 1, 1, 0, 0, 0 }; imageCalibration.right.D = { 1, 1, 1, 1, 1, 0, 0, 0 }; imageCalibration.left.R = { {1, 0, 0}, {0, 1, 0}, {0, 0, 1} }; imageCalibration.right.R = { {1, 0, 0}, {0, 1, 0}, {0, 0, 1} }; imageCalibration.left.P = { {1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0} }; imageCalibration.right.P = { {1, 0, 0, 1}, {0, 1, 0, 0}, {0, 0, 1, 0} }; // // Send the new camera calibration to the sensor crl::multisense::Status status = channel->setImageCalibration(imageCalibration); // // Check to see if the sensor successfully received the new camera calibration if(crl::multisense::Status_Ok != status) { throw std::runtime_error("Unable to set image calibration"); } // // Destroy the channel instance crl::multisense::Channel::Destroy(channel);
Definition at line 1092 of file MultiSenseTypes.hh.
Full resolution camera calibration corresponding to the left camera
Definition at line 1113 of file MultiSenseTypes.hh.
Full resolution camera calibration corresponding to the right camera
Definition at line 1115 of file MultiSenseTypes.hh.