Skip to content

Commit

Permalink
Adding a method to set scale
Browse files Browse the repository at this point in the history
Signed-off-by: CursedRock17 <mtglucas1@gmail.com>
  • Loading branch information
CursedRock17 committed Apr 30, 2024
1 parent e50ce50 commit 4199d32
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion camera_calibration/src/camera_calibration/calibrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,9 @@ def get_parameters(self, corners, ids, board, size):
def set_cammodel(self, modeltype):
self.camera_model = modeltype

def set_vga_scale(self, scale):
self.vga_scale = scale

def is_slow_moving(self, corners, ids, last_frame_corners, last_frame_ids):
"""
Returns true if the motion of the checkerboard is sufficiently low between
Expand Down Expand Up @@ -537,7 +540,7 @@ def downsample_and_detect(self, img):
height = img.shape[0]
width = img.shape[1]
if self.vga_scale == 0:
scale = math.sqrt((width*height) / (640.*480.))
scale = math.sqrt((width * height) / (640. * 480.))
else:
scale = self.vga_scale

Expand Down

0 comments on commit 4199d32

Please sign in to comment.