tags:

views:

156

answers:

2

Hello:

I need to use OpenCV with a GigE Vision Ethernet Camera, but i couldn't find much useful information on how to do this, any pointers, documents and example code?

Basically, i just need to read frames from the camera.

Thanks!

+1  A: 

You don't mention the type of the camera and your platform. On Windows, according to the OpenCV documentation:

Currently two camera interfaces can be used on Windows: Video for Windows (VFW) and Matrox Imaging Library (MIL)

It is unlikely that your GigE camera driver supports VFW, and for MIL you need the MIL library, which is not free AFAIK.

Most GigE cameras will have an API that you can use to capture images. In most cases the API will be based on GenICam. Probably your best approach is to use the API that came with your camera, and then convert the captured image to an IplImage structure (C) or Mat class (C++).

Dani van der Meer
Thanks, yes, its on Windows. So OpenCV needs a driver to communicate with the camera?
Matias Valdenegro
Probably yes. More precisely the camera probably needs a driver to communicate with windows. And you need an API (SDK) of the camera to communicate to it from the software. I say probably, because it depends on the specific camera.
Dani van der Meer
+2  A: 

Gig-E is a communication standard for a wide range of cameras. OpenCV now contains a wrapper for The Prosilica Gig-E based cameras (see CV_CAP_PVAPI)

But in general it's better to use the camera's native API to get the data and then use openCV to convert the returned data into an image, openCv contains a number of Bayer pattern ->RGB routines.

The CvCapture module is convenient for testing, because it can seemlessly read from a camera or a file - but it's not really suitable for high-speed real-time vision

Martin Beckett