I'm interested in using a stereo camera for calculating depth in video/images. The camera is a USB 3.0 Stereoscopic camera from Leopard Imaging https://www.leopardimaging.com/LI-USB30-V024STEREO.html. I'm using MAC OS X btw.
I was told by their customer support that it's a "UVC" camera. When connected to an apple computer it gives a greenish image.
My end goal is to use OpenCV to grab the left and right frames from both lenses so that I can calculate depth. I'm familiar with OpenCV, but not familiar with working with stereo cameras. Any help would be much appreciated. So far I have been doing this in Python 3:
import numpy as np
import cv2
import sys
from matplotlib import pyplot as plt
import pdb; pdb.set_trace()
print("Camera 1 capture", file=sys.stderr)
cap = cv2.VideoCapture(1)
print("Entering while", file=sys.stderr)
while(True):
_ = cap.grab()
retVal, frame = cap.retrieve()
#gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
cv2.imshow('frame', frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()
This works, but it only gives me a green picture/image with no depth. Any advice on how to get both left and right frames from the camera?