Skip to content

Commit

Permalink
update tic-tac-toe demo
Browse files Browse the repository at this point in the history
  • Loading branch information
Neutree committed Jul 29, 2024
1 parent f72634c commit cba4436
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions projects/demo_tic_tac_toe/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ def find_qipan():
while mode == 1:
img = cam.read()
check_mode_switch(img, disp.width(), disp.height())

# 软件畸变矫正,速度比较慢,建议直接买无畸变摄像头(Sipeed 官方淘宝点询问)
# img = img.lens_corr(strength=1.5)

img_cv = image.image2cv(img, False, False)
gray = cv2.cvtColor(img_cv, cv2.COLOR_RGB2GRAY)

Expand Down Expand Up @@ -202,6 +206,10 @@ def find_qizi():
while mode == 2:
img = cam.read()
check_mode_switch(img, disp.width(), disp.height())

# 软件畸变矫正,速度比较慢,建议直接买无畸变摄像头(Sipeed 官方淘宝点询问)
# img = img.lens_corr(strength=1.5)

blobs = img.find_blobs(thresholds, roi=[1,1,img.width()-1, img.height()-1], x_stride=2, y_stride=1, area_threshold=area_threshold, pixels_threshold=pixels_threshold)
for b in blobs:
corners = b.mini_corners()
Expand Down

0 comments on commit cba4436

Please sign in to comment.