ginga
ginga copied to clipboard
--opencv option fails with python 3 and opencv 3.1.0
When using python 3 with opencv
3.1.0, ginga gets an error trying to do rotations:
Error redrawing image: module 'cv2' has no attribute 'getRotationMatrix2D'
Traceback:
File "/home/eric/Git/Ginga/ginga/ImageView.py", line 1250, in redraw_now
self.redraw_data(whence=whence)
File "/home/eric/Git/Ginga/ginga/ImageView.py", line 1292, in redraw_data
rgbobj = self.get_rgb_object(whence=whence)
File "/home/eric/Git/Ginga/ginga/ImageView.py", line 1511, in get_rgb_object
self.t_['rot_deg'])
File "/home/eric/Git/Ginga/ginga/ImageView.py", line 1644, in apply_transforms
logger=self.logger)
File "/home/eric/Git/Ginga/ginga/trcalc.py", line 149, in rotate_clip
M = cv2.getRotationMatrix2D((rotctr_y, rotctr_x), theta_deg, 1)
Apparently, 3.1.0 is missing the getRotationMatrix2D
call (in the python wrapper at least). I confirmed this by importing cv2
from an ipython shell and trying to find the missing function. It's not there.
Platform: Ubuntu 16.04 w/Conda