Skip to content

Commit

Permalink
#120 :: Bugfix - Was passing point to opencv as (y,x) rather than (x,y)
Browse files Browse the repository at this point in the history
  • Loading branch information
JackBuck committed Mar 22, 2017
1 parent bd46bb7 commit 0b0d984
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions roboplot/dottodot/number_recognition.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ def _estimate_degrees_from_number_centre_to_spot(self):
centroid_x = np.sum(
np.arange(inverted_image.shape[1]).reshape(1, -1) * inverted_image) / total_intensity

return np.rad2deg(np.arctan2(-(self.centre_spot.pt[0] - centroid_y),
self.centre_spot.pt[1] - centroid_x))
return np.rad2deg(np.arctan2(-(self.centre_spot.pt[1] - centroid_y),
self.centre_spot.pt[0] - centroid_x))

def _recognise_number_text(self):
img = Image.fromarray(self._img)
Expand Down

0 comments on commit 0b0d984

Please sign in to comment.