Industrial camera, no supported videoio backend

hi,

i have three USB-3 cameras Point Grey type cm3-u3-50s5m. Actually, i try to input video for camera calibration (opencv-python).
Example code:

## import opencv for computer vision
import cv2
## import matplotlib to visualize an image
from matplotlib import pyplot as plt

print('opencv version: ', cv2.__version__)

for i in range(10):
    cap = cv2.VideoCapture(i)
    ## Get a frame from the capture device
    ret, frame = cap.read()

    print(ret)
    print(frame)

This dosn’t work because the industrial cameras don’t use the standard video interfaces of the OS. They using USB-3 Protocol.
This is because, thise cameras are quite complex and they are generally used in more complex situations,
where i need a full control over the camera. With the cameras SDK from Point Grey works very well.
Im using somethin else, the software from Stemmer imagining the CVB Box, works perfect.

I need to make a stero calibration and i want to use opencv for this purpose.
Is it possible to interface the cameras with opencv directly?
Can you give me some advice or some documentation about this problem.

Thanks!

still they could have implemented USB UVC as a common interface.

there are industry standards for machine vision. if they implemented one of those, OpenCV should either already have an implementation for that, or that’s a desirable feature and should be reported as an issue on OpenCV’s github.

OpenCV’s videoio module has implemented some backends to “weird” camera interfaces that aren’t simple standard OS APIs. have a look:

https://docs.opencv.org/4.x/d4/d15/group__videoio__flags__base.html#ga023786be1ee68a9105bf2e48c700294d

if you can’t use what OpenCV already has, but you need your custom code for these cameras, then simply replace all uses of VideoCapture with your custom code.

or talk to the manufacturer and tell them you want a firmware upgrade that does USB UVC, or a driver for your OS that exposes the camera to the system in a standard way (dshow/msmf, V4L, …), or you want them to submit a pull request to OpenCV that implements a video backend

I looked at some specs for the camera model you stated.

apparently it supports “USB3 Vision”

this indicates that XIMEA might be a compatible backend: USB3 Vision - OpenCV Q&A Forum

Basler’s “pylon” library claims to support USB3 Vision and GigE Vision. maybe it works with non-basler cameras?

and here’s a random google result for a seemingly third-party driver that interfaces USB3 Vision to system apis, or at least claims compatibility to various software packages like OpenCV, Matlab, …: USB3 Vision driver for Matlab, .NET, VB, C#, C++, Delphi, Java, OpenCV

Hi,

thansk for the quick support.

Sorry, i mean with “They using USB-3 Protocol.” industrial cameras like Point Gray, Basler, Jai-Go and etc. This Cameras supportet “UBS 3 Vision” and “GigE Vision”.
Im using UBS-3 camera “Point Gray” with “USB 3 Vision”.

Actually for the camera calibration i don’t need VideoCapture, correct?
I can take the images for the calibration using some SDK (Stemmer, Point Gray…) and then
i can use this images (for the left and right camera) with OpenCv for the camera calibration, correct?

Im using the Common Vision Blox - Stemmer imagining:
Stemmer imagining - Help
“CVB .Net C#”.

I will try to transform the captured buffer (.Net #C) into OpenCv-Python. I think that will be no problem.

The next step will be to use the VideoCapture in OpenCv-Python.