Skip to content

Commit c6a4d89

Browse files
authored
fix undefined variable issue
1 parent 03a7c79 commit c6a4d89

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

afy/camera_selector.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def make_grid(images, cell_size=(320, 240), cols=2):
5656
def mouse_callback(event, x, y, flags, userdata):
5757
global g_selected_cam
5858
if event == 1:
59-
cell_size, grid_cols = userdata
59+
cell_size, grid_cols, cam_frames = userdata
6060
c = x // cell_size[0]
6161
r = y // cell_size[1]
6262
camid = r * grid_cols + c
@@ -70,7 +70,7 @@ def select_camera(cam_frames, window="cameras"):
7070
grid = make_grid(cam_frames, cols=grid_cols)
7171

7272
cv2.namedWindow(window)
73-
cv2.setMouseCallback(window, mouse_callback, (cell_size, grid_cols))
73+
cv2.setMouseCallback(window, mouse_callback, (cell_size, grid_cols, cam_frames))
7474
cv2.imshow(window, grid)
7575

7676
while True:

0 commit comments

Comments
 (0)