Merge pull request #12203 from berak:fix_interactive_calibration

pull/12207/head^2
Alexander Alekhin 6 years ago
commit 90b8a03a89
  1. 2
      apps/interactive-calibration/calibController.cpp

@ -224,8 +224,10 @@ void calib::calibDataController::filterFrames()
cv::Mat newErrorsVec = cv::Mat((int)numberOfFrames - 1, 1, CV_64F); cv::Mat newErrorsVec = cv::Mat((int)numberOfFrames - 1, 1, CV_64F);
std::copy(mCalibData->perViewErrors.ptr<double>(0), std::copy(mCalibData->perViewErrors.ptr<double>(0),
mCalibData->perViewErrors.ptr<double>((int)worstElemIndex), newErrorsVec.ptr<double>(0)); mCalibData->perViewErrors.ptr<double>((int)worstElemIndex), newErrorsVec.ptr<double>(0));
if((int)worstElemIndex < (int)numberOfFrames-1) {
std::copy(mCalibData->perViewErrors.ptr<double>((int)worstElemIndex + 1), mCalibData->perViewErrors.ptr<double>((int)numberOfFrames), std::copy(mCalibData->perViewErrors.ptr<double>((int)worstElemIndex + 1), mCalibData->perViewErrors.ptr<double>((int)numberOfFrames),
newErrorsVec.ptr<double>((int)worstElemIndex)); newErrorsVec.ptr<double>((int)worstElemIndex));
}
mCalibData->perViewErrors = newErrorsVec; mCalibData->perViewErrors = newErrorsVec;
} }
} }

Loading…
Cancel
Save