Skip to content

Commit

Permalink
[ui] fix uvCenterOffset
Browse files Browse the repository at this point in the history
Fix changes of principal point coord system from #1509.
  • Loading branch information
fabiencastan authored Oct 14, 2021
1 parent 1c66c6d commit cd15a92
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions meshroom/ui/reconstruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,7 @@ def uvCenterOffset(self):
return None
pp = self.solvedIntrinsics["principalPoint"]
# compute principal point offset in UV space
uvPP = QVector2D(float(pp[0]) / self.imageSize.width(), float(pp[1]) / self.imageSize.height())
# convert to offset
offset = uvPP - QVector2D(0.5, 0.5)
offset = QVector2D(float(pp[0]) / self.imageSize.width(), float(pp[1]) / self.imageSize.height())
# apply orientation to principal point correction
if self.orientation == 6:
offset = QVector2D(-offset.y(), offset.x())
Expand Down

0 comments on commit cd15a92

Please sign in to comment.