I have the following simple script to capture and show stream from a thermal camera:
import cv2
camera_index = 0
cap = cv2.VideoCapture(camera_index)
cap.set(cv2.CAP_PROP_FRAME_WIDTH, 640)
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 480)
cap.set(cv2.CAP_PROP_BRIGHTNESS, 0.5)
cap.set(cv2.CAP_PROP_WB_TEMPERATURE, 3500)
while True:
ret, frame = cap.read()
cv2.imshow('Thermal camera', frame)
key = cv2.waitKey(1)
if key == ord('q'):
break
cap.release()
cv2.destroyAllWindows()
I am not able to get correct images using this script, the image I am getting in return looks like this:
I believe I am doing something wrong here with colors and formats as I expect a black-and-white thermal image from this.
Edit:
Camera: Optis Xi 400 Frame shape: (290, 382, 3) Frame type: uint8