Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Fisheye calibration tool #440

Empty file modified camera_calibration/CHANGELOG.rst
100644 → 100755
Empty file.
Empty file modified camera_calibration/CMakeLists.txt
100644 → 100755
Empty file.
Empty file modified camera_calibration/button.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified camera_calibration/doc/conf.py
100644 → 100755
Empty file.
Empty file modified camera_calibration/doc/index.rst
100644 → 100755
Empty file.
Empty file modified camera_calibration/mainpage.dox
100644 → 100755
Empty file.
Empty file modified camera_calibration/package.xml
100644 → 100755
Empty file.
Empty file modified camera_calibration/rosdoc.yaml
100644 → 100755
Empty file.
Empty file modified camera_calibration/setup.py
100644 → 100755
Empty file.
Empty file modified camera_calibration/src/camera_calibration/__init__.py
100644 → 100755
Empty file.
206 changes: 143 additions & 63 deletions camera_calibration/src/camera_calibration/calibrator.py
100644 → 100755

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ def __init__(self, queue, opencv_calibration_node):
def run(self):
cv2.namedWindow("display", cv2.WINDOW_NORMAL)
cv2.setMouseCallback("display", self.opencv_calibration_node.on_mouse)
cv2.createTrackbar("Camera type: \n 0 : pinhole \n 1 : fisheye", "display", 0,1, self.opencv_calibration_node.on_model_change)
cv2.createTrackbar("scale", "display", 0, 100, self.opencv_calibration_node.on_scale)

while True:
if self.queue.qsize() > 0:
self.image = self.queue.get()
Expand Down Expand Up @@ -273,6 +275,8 @@ def on_mouse(self, event, x, y, flags, param):
# Only shut down if we set camera info correctly, #3993
if self.do_upload():
rospy.signal_shutdown('Quit')
def on_model_change(self,model_select_val):
self.c.set_distmodel( "pinhole" if model_select_val < 0.5 else "fisheye")

def on_scale(self, scalevalue):
if self.c.calibrated:
Expand Down
Empty file modified camera_calibration/test/directed.py
100644 → 100755
Empty file.
Empty file modified camera_calibration/test/multiple_boards.py
100644 → 100755
Empty file.