View Full Version : build a programm in C++ in Linux

October 7, 2014, 17:57:27

I need to build a program in C++ in Linux, for my final project in university,in order to communicate, change settings (iris,exposure time), capture an image and save it to a specific place.
I am using this GigE Camera DFK23G274.I
So, i want to give me some directions about the library i have to use and some directions for how to use it.

Dimiou Marios

Stefan Geissler
October 8, 2014, 09:30:56

A good point for starting is

Please look at the "Aravis" part.

October 12, 2014, 14:00:57
i looked for it but i could not understand how i can do it.... :bad:

Stefan Geissler
October 13, 2014, 08:59:55

the Linux software is not as simple. I guess, you are experienced with GIT and you downloaded a built the ARAVIS lib as shown on the Aravis home page.
Then you compiled the the gstreamer pipeline modules, right?

October 13, 2014, 12:28:41
Basically no....i am trying to find out what is happening with aravis lib. I have no experience with camera programming.... so i don't know about gstreamer pipeline modules for example....i am totally new in this programming sector.....

Stefan Geissler
October 13, 2014, 13:53:52
Then I suppose to search in the internet about using gstreamer in Linux. There is a lot of to read, often hard to understand. This will take its time, but it is necessary.

About Aravis: It is a library, that encapsulates the GigEVision protocol, so you can control the camera with your own programs and receive the images.

So you should also learn, how to compile the Aravis library.

I am very sorry, I am aware, that is not the answer you wanted to read, but you have to learn about linux fist.

October 18, 2014, 14:30:53
Stefan, finally i change camera.... and i am going to use DFK23U274 which is a usb camera. A colleague of yours gave this V4L2 and opencv code

and i add some changes, for changing exposure time and gain and imwrite() command for saving picture to a specific file. My question is if this code is ready to be used...!!!

The code i have added in main is this:
//setting exposure
ctrl.id = V4L2_CID_EXPOSURE;
ctrl.value = "an integer for exposure";
ioctl(fd, VIDIOC_S_CTRL, &ctrl);

//setting gain
ctrl.id = V4L2_CID_GAIN;
ctrl.value = "an integer for gain";
ioctl(fd, VIDIOC_S_CTRL, &ctrl);

Thanks a lot