Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Acquire Images with GigE Cameras on Linux with Plain C [closed]

Is there a library that I can use for acquiring images from a GigE camera with plain C on Linux ? To be more specific I have a Basler GigE camera and the pylon software installed. There is also sample code in C++. But I want and need to use C (in my job this is actually THE right thing to do to use C). It would be great if there was something useful as libdc1394 just for GigE.

like image 200
Bitterblue Avatar asked Feb 15 '13 08:02

Bitterblue


2 Answers

"GigE Vision" is actually a computer vision camera standard, and most cameras also implement the Genicam standard for adjusting parameters. At least that is the theory - I have a high-speed GigE camera that is not found by Pylon or AVT for some unknown reason (officially it's only supported by eBus from Pleora). You might be able to get the specifications for those standards, but I'm not sure if they are freely available.

Regarding a library, I just tried Aravis under Ubuntu12.04 and it worked for my camera (streaming 512x512 pixel at 190 frames/second). It's written in C as far as I can tell. As a hint, to compile the Viewer that is included you have to install all the gstreamer-dev packages, including libgstreamer-plugins-base0.10-dev.

like image 58
sfx Avatar answered Oct 05 '22 05:10

sfx


Most implementations will use C++ and at best expose a c-api building on that because GenICam is a very complicated thing to implement - and the reference implementation works, is free and is used by nearly all SDK vendors. You can implement alot of the acquisition without that much in C but it is very difficult to cut GenICam out of the loop - this is because vendors have used GenICam XML documents as a sort of domain specific programming language/environment - the effort is comparable to implementing a web-browser from scratch.

Aravis does exist but depends on gstreamer and does seem to be mainly in C but it will only go so far on the complex XML support needed for many cameras. I'd never use gstreamer in a mission critical setting or where reliable operation is required in addition to where high performance or high efficiency is required. I believe the best option on the market is Pleora's SDK FYI - no relation. Having said that - I've written such a library (with C++ :-) which I cannot share to address problems I've mentioned.

like image 38
Jason Newton Avatar answered Oct 05 '22 03:10

Jason Newton