What backend API to use with DAHENG MER-132 USB3 Vision camera

asked 2019-10-16 19:54:58 -0500

Hi,

I have a DAHENG MER-132 USB3 Vision camera which I am trying to access with opencv (python 3.7, Win 10).

I followed some example code to get my webcam working with capture = cv.VideoCapture(0) and works great. I figured cv.VideoCapture(1) would work for the next camera (external DAHENG MER-132 USB3) but opencv doesn't detect it

Device Manager detects the camera ok and reports it as "Machine Vision Digital Cameras / USB3 Vision Digital Camera, and the Daheng Galaxy Viewer software can display images ok, so hardware is working ok.

Is there a particular backend API I need to use with this type of camera?

If not, are there any other suggestions to get this camera working with opencv/python?

Thanks, Brendan.

edit retag flag offensive close merge delete

Comments

which opencv version is it ?

try the DSHOW backend (default is MSMF):

capture = cv.VideoCapture(0, cv.CAP_DSHOW)
berak gravatar imageberak ( 2019-10-16 23:57:33 -0500 )edit

I tried CAP_DSHOW, CAP_VFW and many of the other backends, but couldn't find anything that worked.

pip freeze reports opencv-python==4.1.1.26

Github shows the latest release as being 4.1.2. Is that likely to have better support for USB3 Vision cameras?

Brendan Simon gravatar imageBrendan Simon ( 2019-10-17 03:58:27 -0500 )edit

does it work with VLC / mediaplayer ? does your camera software come with a c++ sdk ?

berak gravatar imageberak ( 2019-10-17 04:02:32 -0500 )edit

VLC only gives me two options for video capture device: None, Integrated Web Cam. It does not appear to detect the Daheng USB3 camera.

Yes, there is an SDK available. I was able to get a python library (.pyd) file which is a wrapper around the SDK. It seems to work so I can at least get images now, but I'm wondering if it is possible to use opencv directly?

Brendan Simon gravatar imageBrendan Simon ( 2019-10-17 23:10:17 -0500 )edit

It does not appear to detect the Daheng USB3 camera.

ah, ok, but sad, since vlc is using similar dshow / msmf code internally

possible to use opencv directly?

opencv is mainly a computer-vision library, you can use it no matter where your images come from.

(it's not about using webcams, which most python noobs seem to think)

berak gravatar imageberak ( 2019-10-17 23:39:41 -0500 )edit