Depth calibration: using appropriate bin_width and bin_height for all cameras

This commit is contained in:
Anton Onishchenko
2017-05-10 13:54:11 +03:00
parent 8eab31c469
commit df40b0b8d3
3 changed files with 62 additions and 1 deletions

View File

@@ -391,7 +391,9 @@ void DepthCalibrationDialog::calibrate(
const cv::Size & imageSize = sequence.begin()->second.cameraModels()[0].imageSize();
if(_model == 0)
{
_model = new clams::DiscreteDepthDistortionModel(imageSize.width, imageSize.height);
size_t bin_width, bin_height;
util3d::GetBinSize(imageSize.width, imageSize.height, bin_width, bin_height);
_model = new clams::DiscreteDepthDistortionModel(imageSize.width, imageSize.height, bin_width, bin_height);
}
UASSERT(_model->getWidth() == imageSize.width && _model->getHeight() == imageSize.height);