From ae91f3bcd57caf40be958fc1bc5dee7669c726d7 Mon Sep 17 00:00:00 2001 From: Yann Lanthony Date: Thu, 19 Sep 2019 12:50:48 +0200 Subject: [PATCH] [reconstruction] ViewpointWrapper: fix uvCenterOffset for rotated images correctly apply image transformation to principal point correction in uv coordinates. --- meshroom/ui/reconstruction.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meshroom/ui/reconstruction.py b/meshroom/ui/reconstruction.py index 18a5ffd0..015f67e3 100755 --- a/meshroom/ui/reconstruction.py +++ b/meshroom/ui/reconstruction.py @@ -332,7 +332,12 @@ class ViewpointWrapper(QObject): uvPP = QVector2D(float(pp[0]) / self.imageSize.width(), float(pp[1]) / self.imageSize.height()) # convert to offset offset = uvPP - QVector2D(0.5, 0.5) - return offset if self.orientation == 1 else -offset + # apply orientation to principal point correction + if self.orientation == 6: + offset = QVector2D(-offset.y(), offset.x()) + elif self.orientation == 8: + offset = QVector2D(offset.y(), -offset.x()) + return offset @Property(type=float, notify=sfmParamsChanged) def fieldOfView(self):