From 5c764ae201be9e9b31de184b154f1d51af4fb575 Mon Sep 17 00:00:00 2001 From: Zachary Taylor Date: Sun, 31 Mar 2019 20:09:05 +0200 Subject: [PATCH 1/2] src/undistorter.cpp --- launch/dense_stereo.launch | 6 +++--- src/undistorter.cpp | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/launch/dense_stereo.launch b/launch/dense_stereo.launch index 1436d39..6a5e38c 100644 --- a/launch/dense_stereo.launch +++ b/launch/dense_stereo.launch @@ -3,7 +3,7 @@ - + @@ -20,8 +20,8 @@ - - + + diff --git a/src/undistorter.cpp b/src/undistorter.cpp index 9d02809..3a3c7f7 100644 --- a/src/undistorter.cpp +++ b/src/undistorter.cpp @@ -85,6 +85,7 @@ void Undistorter::distortPixel(const Eigen::Matrix& K_in, // Transform image coordinates to be size and focus independent Eigen::Vector3d norm_pixel_location = R_in * P_out.topLeftCorner<3, 3>().inverse() * pixel_location_3; + norm_pixel_location /= norm_pixel_location.z(); const double& x = norm_pixel_location.x(); const double& y = norm_pixel_location.y(); From 41a93253a1615591ac3b65ab4b471cd224ac4f79 Mon Sep 17 00:00:00 2001 From: Zachary Taylor Date: Sun, 31 Mar 2019 20:12:26 +0200 Subject: [PATCH 2/2] undo launchfile changes --- launch/dense_stereo.launch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/launch/dense_stereo.launch b/launch/dense_stereo.launch index 6a5e38c..1436d39 100644 --- a/launch/dense_stereo.launch +++ b/launch/dense_stereo.launch @@ -3,7 +3,7 @@ - + @@ -20,8 +20,8 @@ - - + +