Merge pull request #194 from T0ny0/fix_Kinect2_depth_calibration

Depth calibration: using appropriate bin_width and bin_height for all cameras
This commit is contained in:
matlabbe
2017-05-11 13:22:38 -04:00
committed by GitHub
3 changed files with 64 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;
clams::DiscreteDepthDistortionModel::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);