I have a thermal camera that I am opening using python. The camera has 2 photo quality modes:
- .05MP 4:3 (256x192)
- .10MP 3:2 (384x256)
When I run my code it defaults to option 2 but I would like to run at as option 1. I tried changing cv2.VideoCapture(0) to cv2.VideoCapture(1) but that only changes the usb camera being used.
import cv2
import os, sys
cv2.namedWindow("CAM")
vc = cv2.VideoCapture(0)
if vc.isOpened(): # try to get the first frame
rval, frame = vc.read()
else:
rval = False
i = 0
while rval:
cv2.imshow("CAM", frame)
rval, frame = vc.read()
key = cv2.waitKey(33)
cv2.imwrite(os.path.join(savefold, f'test_{i:05}.png'), frame)
i+=1
if key == 27:
break
vc.release()
cv2.destroyWindow("CAM")