MAR (Machine of Attack & Return). V.01 ( THIS IS TOY R/C LEVEL DEVICE, NOT A REAL WEAPON )
My notebook system camera test
2024.01.19 15:49
# my tool : sudo apt-get install guvcview
import cv2
cap = cv2.VideoCapture(0) # 0, 1, 2, 3 ... match with your setting
cap.set(cv2.CAP_PROP_FOURCC, cv2.VideoWriter_fourcc('Y','U','Y','V'))
cap.set(cv2.CAP_PROP_FPS, 30)
cap.set(cv2.CAP_PROP_FRAME_WIDTH, 640)
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 480)
i = 0
cv2.namedWindow("preview")
while cap.isOpened():
ret, frame = cap.read()
#left_img = frame[:, 0:1279, :] # cut left half
#right_img= frame[:, 1280:2560, :] # cut right half
if ret:
cv2.imshow('preview', frame)
i += 1
key = cv2.waitKey(delay=2)
if key == ord('t'): # save camera input (both eyes in 1 image)
cv2.imwrite('./img/test'+str(i)+'.jpg', frame)
i += 1
if key == ord('g'): # save both eyes image seperately
i += 1
if key == ord('q') or key == 27:
break
cap.release()
cv2.destroyAllWindows()
Comment 0
No. | Subject | Author | Date | Views |
---|---|---|---|---|
10 | New software resources | me | 2024.02.20 | 77 |
9 | Simple Attraction & Repulsion of Swarm practice | me | 2024.02.01 | 80 |
8 |
My Simple 2D Inverse Kinematics with BGRABitmat library [2]
![]() | me | 2024.01.21 | 109 |
7 |
My Simple 2D Inverse Kinematics with BGRABitmat library [1]
![]() | me | 2024.01.20 | 86 |
6 |
Inverse Kinematic with AI
![]() | me | 2024.01.19 | 81 |
5 |
Inverse Kinematic in 10 min. from YouTube
![]() | me | 2024.01.19 | 74 |
» | My notebook system camera test | me | 2024.01.19 | 76 |
3 |
Binocular Cam
![]() | me | 2024.01.14 | 76 |
2 | Object Pascal with MPU-9250 | me | 2023.10.06 | 84 |
1 |
Intro (Keeps changing)
![]() | me | 2023.09.28 | 89 |