Real-time video capture from CMOS High Speed camera

Hello, I want to get real-time video from high-speed camera or microscope camera connected to my PC. When I type 0 1 2 into videoCapture(), it doesn’t see the camera. How can I process the video viewed from this camera in real-time?

My camera is ORCA-Flash4.0 LT+ Digital CMOS camera C11440-42U30 | Hamamatsu Photonics

As a general rule, especially for industrial cameras, try to use the provided API/SDK. They offer full control over the camera, to be able to use them with full potential. The VideoCapture class is really basic, and it doesn’t support specialized cameras.
The API allows to capture to a memory buffer, that you can transform to OpenCV Mat. Something like (pseudocode):

int w,h;
uchar *buffer;
Camera cam;
    cv::Mat frame(h,w,CV_8U,buffer);
    //...processing part...

Note: it seems that the DCAM-API is only available for Windows/Mac and C++ language.

1 Like

well yes and no.

the VideoCapture class is basic but only in the lack of flexibility. OpenCV has a ton of backends for common and uncommon APIs. all of those are supported (ok, some were removed, some unmaintained/obsolete, some may not be built by default).

if the manufacturer doesn’t bother to give their device a standard interface like USB UVC, which is supported by all operating systems, that’s their fault and you’re stuck with their SDK, that is maybe supported by OpenCV already, or else you’d have to write some code to adapt.