Mike
Mike

Reputation: 1827

Prosilica GigE camera with OpenCV/python

I'm using a GigE (ethernet) prosilica GC camera on Mac OS X, and have been able to read it out through the proprietary sample viewing software from Allied Vision.

I would like to be able to read out the camera using OpenCV. I have opencv installed correctly, but I am not sure how to read out the camera. The last person to ask this question (~2 years ago) was told to use the native camera API to do this, and then analyze the images with opencv:

OpenCV with GigE Vision Cameras

However, I would like to know if it is even possible to do this with python/ opencv. There seems to be very little information online about how to do this, so I'm curious if anyone managed to get it to work, and could post some example code/etc. I have all my camera IP address information, model, etc, if that helps, but I don't know how to even tell opencv where to look.

Thanks in advance,

Mike

Upvotes: 4

Views: 7274

Answers (2)

mark jay
mark jay

Reputation: 1284

Try Pymba

You can use Allied Vision's new SDK Vimba and a python interface called Pymba. Instructions are on the Pymba github page but basically you

  • Install Vimba
  • Install Pymba via pip install pymba

There's example code in the repo. I've been using it and it's pretty straight forward.

Upvotes: 2

mevatron
mevatron

Reputation: 14011

I believe OpenCV interfaces to the Prosilica cameras via the PvAPI. You'll need to make sure OpenCV is compiled with this setting using the WITH_PVAPI CMake option (you will need to build from source). cap_pvapi.cpp is the wrapper for the PvAPI driver that will allow you to use the VideoCapture class.

To build OpenCV from source, take a look at the tutorials here.

Upvotes: 3

Related Questions