Skip to content

Commit

Permalink
webcam test and config
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-edward committed Apr 29, 2024
1 parent 4d380c7 commit 457d930
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 0 deletions.
1 change: 1 addition & 0 deletions uwrt_mars_rover_science/dinolite/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
settings.json
29 changes: 29 additions & 0 deletions uwrt_mars_rover_science/dinolite/config/info.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Dinolite microscope camera intrinsics

[image]

width
640

height
480

[dinolite]

camera matrix
0.00000 0.00000 0.00000
0.00000 0.00000 0.00000
0.00000 0.00000 0.00000

distortion
-0.41527 0.31874 -0.00197 0.00071 0.00000

rectification
1.00000 0.00000 0.00000
0.00000 1.00000 0.00000
0.00000 0.00000 1.00000

projection
0.00000 0.00000 0.00000 0.00000
0.00000 0.00000 0.00000 0.00000
0.00000 0.00000 0.00000 0.00000
19 changes: 19 additions & 0 deletions uwrt_mars_rover_science/dinolite/scripts/webcam_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"""Script for testing webcam connection to opencv."""

import cv2

# 0 is default index of webcam
vid = cv2.VideoCapture(0)

while(True):
# read frame
ret, frame = vid.read()
# display frame
cv2.imshow('frame', frame)

# press q to quit
if cv2.waitKey(1) & 0xFF == ord('q'):
break

vid.release()
cv2.destroyAllWindows()
Binary file not shown.

0 comments on commit 457d930

Please sign in to comment.