PDA

View Full Version : video format and fps setting



roberts
January 12, 2010, 16:15:14
Hello,
I'm using DFx21AUC03 camera and MS Visual Studio 2005.The purpose of my application is setting all camera supported properties (video format, fps, white balance, gain,etc.) from command line. Here is my test scenario. First I run my application and set various properties to some new values. Then I exit my application and run IC Capture 2.1 application. All properties except video format and fps are updated to those new, previously set values from my application. If I change video format and fps properties from the IC Capture application, those values are preserved when I rerun IC Capture next time. I would like to preserve all property values modified from my application, the same as IC Capture does. Please advice if you have any idea where is the problem. Here is my simplified code snipped of setting fps:


Grabber grabber;
if (grabber.openDev("DFx 21AUC03"))
{
double fps = 5.0;
if (grabber.setFPS(fps))
{
fps = grabber.getFPS();
std::cout << "fps is: " << fps << std::endl;
}
}
grabber.closeDev();

The output fps value is correct (5.0), but if I run IC Capture then this new value is not preserved (shows its previous value).

Stefan Geissler
January 12, 2010, 17:49:30
Hi,

First of all, the camera has no own memory for properties. The property values are saved in too locations:
1.) The driver saves them in the registry. But Video format, frame rate and if available video norm are not saved.
The reason is, that may be there is a program, that will crash, if a "wrong" video format is set.

2.) IC Capture saves the settings in an own ICCF file. This contains Video format, frame rate and if available video norm.

However, you can not rely on the settings the driver saves in the registry. If any other application accesses the camera and changes properties, then the driver will save this too.

The correct way is, that each application saves the properties on its own.

IC Imaging Control offers the methods Grabber::SaveDeviceStateToFile() and Grabber::LoadDeviceStateFromFile() for doing this.

I guess, you have another none IC Imaging Control using application, that is not able to preset the properties, right?

roberts
January 12, 2010, 18:59:38
My application already has a custom configuration manager, I was just confused why all properties except video format and fps restore their values. Thanks for your explanation.