Skip to content

Commit

Permalink
Fixing a small bug in apply inverse of a rigid model
Browse files Browse the repository at this point in the history
  • Loading branch information
Adi Suissa-Peleg committed Oct 13, 2017
1 parent fa9228c commit 62a459c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rh_renderer/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ def apply_inv(self, p):
Returns a new 2D point(s) after applying the inverse transformation on the given point(s) p
"""
# The inverse matrix of the [2,2] rigid matrix is similar to the forward matrix (the angle is negative),
# the delta needs to be computed by R-1*delta
# the delta needs to be computed by R-1*-delta
inv_delta = np.dot([[self.cos_val, self.sin_val],
[-self.sin_val, self.cos_val]], self.delta).T
[-self.sin_val, self.cos_val]], -self.delta).T
if p.ndim == 1:
return np.dot([[self.cos_val, self.sin_val],
[-self.sin_val, self.cos_val]],
Expand Down

0 comments on commit 62a459c

Please sign in to comment.