4

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

Community
  • 1
  • 1
Mike
  • 1,727
  • 3
  • 15
  • 25

2 Answers2

3

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.

mevatron
  • 13,911
  • 4
  • 55
  • 72
  • Thanks for the response. I will take a look at doing that. However, just from looking around the web, I have yet to see any evidence that anyone has actually managed to get opencv/python working on os x with prosilica gige cameras. It's not clear that this is even possible, looking at the opencv supported cameras page: http://opencv.willowgarage.com/wiki/Welcome/OS That's why I was wondering if anyone had actually successfully managed to do it. Thanks regardless. – Mike Feb 27 '12 at 19:21
  • Honestly, OpenCV "supported" cameras just means someone has written a wrapper for that particular camera's API. So, since Prosilica provides drivers for Mac OSX I'm going to guess it works. OpenCV is very flexible as to where the imagery comes from; I've used it with embedded cameras that don't have wrappers and it works just like with the `VideoCapture` class. – mevatron Feb 27 '12 at 19:30
2

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.

101
  • 8,514
  • 6
  • 43
  • 69
mark jay
  • 1,256
  • 14
  • 23