Fix disparity_processor.cc bug

This commit is contained in:
kalman 2018-12-08 21:10:31 +08:00
parent b9db889fa3
commit 206683b76f

View File

@ -98,7 +98,7 @@ bool DisparityProcessor::OnProcess(
// whereas other algorithms output 32-bit floating-point disparity map. // whereas other algorithms output 32-bit floating-point disparity map.
sgbm_->compute(input->first, input->second, disparity); sgbm_->compute(input->first, input->second, disparity);
#endif #endif
output->value = disparity / 16 + 1; disparity.convertTo(output->value, CV_32F, 1./16, 1);
output->id = input->first_id; output->id = input->first_id;
output->data = input->first_data; output->data = input->first_data;
return true; return true;