code style

This commit is contained in:
Osenberg-Y 2018-08-13 18:49:59 +08:00
parent 23e28e20a6
commit 94fd56a65d

View File

@ -65,14 +65,13 @@ bool PointsProcessor::OnProcess(
float *sptr = disparity.ptr<float>(y); float *sptr = disparity.ptr<float>(y);
cv::Vec3f *dptr = _3dImage.ptr<cv::Vec3f>(y); cv::Vec3f *dptr = _3dImage.ptr<cv::Vec3f>(y);
for( x = 0; x < cols; x++) for (x = 0; x < cols; x++) {
{
double d = sptr[x]; double d = sptr[x];
cv::Vec4d homg_pt = Q*cv::Vec4d(x, y, d, 1.0); cv::Vec4d homg_pt = Q * cv::Vec4d(x, y, d, 1.0);
dptr[x] = cv::Vec3d(homg_pt.val); dptr[x] = cv::Vec3d(homg_pt.val);
dptr[x] /= homg_pt[3]; dptr[x] /= homg_pt[3];
if( fabs(d-minDisparity) <= FLT_EPSILON ) { if (fabs(d - minDisparity) <= FLT_EPSILON) {
dptr[x][2] = bigZ; dptr[x][2] = bigZ;
} }
} }