Skip to content

Commit

Permalink
Fix explicit check for OpenCV version == 3 causing the Fitter class t…
Browse files Browse the repository at this point in the history
…o try using the OpenCV 2 style call to cv2.calibrate_camera when actually using OpenCV 4 (Issue #35). Increment patch version to 2.1.2.
  • Loading branch information
ssilburn committed Feb 5, 2019
1 parent baea220 commit 9a39823
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
Project Changelog
=================


Bug fix release 2.1.2 (5th Feb 2019)
------------------------------------

Hot on the heels of yesterday's serious bug...another!

Fixes:
* Change explicit check for OpenCV major version == 3 to major version > 2, for compatbility with OpenCV 4.


Bug fix release 2.1.1 (4th Feb 2019)
------------------------------------

Fixes:
* Performing a fit in a newly created calibration raises an exception


Minor Release 2.1.0 (18 Jan 2019)
---------------------------------

Expand Down
2 changes: 1 addition & 1 deletion calcam/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"""

# Calcam version
__version__ = '2.1.1'
__version__ = '2.1.2'

# Import the top level "public facing" classes & functions
from .calibration import Calibration
Expand Down
2 changes: 1 addition & 1 deletion calcam/calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -2190,7 +2190,7 @@ def do_fit(self):

# Do the fit!
if self.model == 'perspective':
if int(cv2.__version__[0]) == 3:
if int(cv2.__version__[0]) > 2:
fit_output = cv2.calibrateCamera(obj_points,img_points,self.image_display_shape,copy.copy(self.initial_matrix),None,flags=self.get_fitflags())
else:
fit_output = cv2.calibrateCamera(obj_points,img_points,self.image_display_shape,copy.copy(self.initial_matrix),flags=self.get_fitflags())
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def query_yes_no(question, default="yes"):
# Actually do the install
setup(
name='Calcam',
version='2.1.1',
version='2.1.2',
url='https://euratom-software.github.io/calcam/',
license='European Union Public License 1.1',
author='Scott Silburn et.al.',
Expand Down

0 comments on commit 9a39823

Please sign in to comment.