View Full Version : Starting camera without init dialog

January 9, 2012, 09:01:22

For my capture application (FireCapture) I'm trying to intialize TIS-cameras without dialog. I want to start the cam always in Y800 and with highest framerate/image size.
The following code seems to work for my DMK41 under XP using the older DCAM driver (v4.1.1.1) but some users report errors when they try this on Win7.

bool initCamWithoutDialog() {
Grabber::tVidCapDevListPtr pVidCapDevList = grabber->getAvailableVideoCaptureDevices();
if (!grabber->openDev( (*pVidCapDevList)[0])) {
return false;
std::string camName = grabber->getDev().getName();
size_t found;
found = camName.find("21");
if (found!=std::string::npos) {
if (grabber->setVideoFormat( "Y800 (640x480)" )) {
return grabber->setFPS( 60.0 );
found = camName.find("31");
if (found!=std::string::npos) {
if (grabber->setVideoFormat( "Y800 (1024x768)" )) {
return grabber->setFPS( 30.0 );
found = camName.find("41");
if (found!=std::string::npos) {
if (grabber->setVideoFormat( "Y800 (1280x960)" )) {
return grabber->setFPS( 15.0 );
return false;

Is there something missing in the above code or what I'm doing wrong ?

Thanks for helping,

Stefan Geissler
January 10, 2012, 12:56:47

First of all, I moved the thread, because this is a programming question.

Secondly, you can use the VideoFormatDescription property to check the correct video formats. Please refer to

At http://www.imagingcontrol.com/en_US/support/documentation/class/BinningandROI.htm you will find how to use this.

In order to to query the highest frame rate, you may check the frame rates collection after you selected the video format. http://www.imagingcontrol.com/en_US/support/documentation/class/meth_descGrabber_getAvailableFPS.htm returns a list of framerates and if I remember correctly, there is a "max" function on this vector, that returns the maximum value.

Using this, you do not need to check the camera name.

However, if there is an error message, knowing this is helpful.

Last point: Use the latest driver! http://www.theimagingsource.com/en_US/support/downloads/