I have a 16 bits camera. When I try to use OpenCV for reading a new frame from this device, OpenCV's .read() function returns a 8 bits image. How can I get raw 16 bits readings from a camera in OpenCV (python)?
import cv2
import numpy as np
scr = 0
num_frames = 10
frames = 0
cam = cv2.VideoCapture(scr)
while True:
ref, frame = cam.read()
print 'Max: ', np.max(frame), '; Min: ', np.min(frame)
if frames == num_frames:
break
else:
frames += 1
cam.release()