Commit 90b8a03a authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #12203 from berak:fix_interactive_calibration

parents a24a8294 49e0126b
...@@ -224,8 +224,10 @@ void calib::calibDataController::filterFrames() ...@@ -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));
std::copy(mCalibData->perViewErrors.ptr<double>((int)worstElemIndex + 1), mCalibData->perViewErrors.ptr<double>((int)numberOfFrames), if((int)worstElemIndex < (int)numberOfFrames-1) {
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;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment