fix(calib models): calib struct update

This commit is contained in:
TinyOh 2019-01-14 17:48:24 +08:00
parent b601d9baee
commit e56bf190f6

View File

@ -339,21 +339,12 @@ void RectifyProcessor::InitParams(
generateCameraFromIntrinsicsEquidistant(in_left);
camodocal::CameraPtr camera_odo_ptr_right =
generateCameraFromIntrinsicsEquidistant(in_right);
if (calib_infos) {
auto calib_info_tmp = stereoRectify(camera_odo_ptr_left,
camera_odo_ptr_right,
in_left,
in_right,
ex_right_to_left);
*calib_infos = *calib_info_tmp;
} else {
calib_infos =
stereoRectify(camera_odo_ptr_left,
camera_odo_ptr_right,
in_left,
in_right,
ex_right_to_left);
}
cv::Mat rect_R_l =
cv::Mat::eye(3, 3, CV_32F), rect_R_r = cv::Mat::eye(3, 3, CV_32F);
for (size_t i = 0; i < 3; i++) {
@ -390,6 +381,7 @@ RectifyProcessor::RectifyProcessor(
: Processor(std::move(proc_period)),
calib_model(CalibrationModel::UNKNOW) {
VLOG(2) << __func__ << ": proc_period=" << proc_period;
calib_infos = std::make_shared<struct camera_calib_info_pair>();
InitParams(
*std::dynamic_pointer_cast<IntrinsicsEquidistant>(intr_left),
*std::dynamic_pointer_cast<IntrinsicsEquidistant>(intr_right),