Results 1 to 2 of 2

Thread: Starting camera without init dialog

  1. #1
    Join Date
    Jan 2012
    Posts
    1

    Starting camera without init dialog

    Hi,

    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,
    Torsten

  2. #2
    Join Date
    Jan 2003
    Location
    Bremen, Germany
    Posts
    4,203

    Re: Starting camera without init dialog

    Hello,

    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
    http://www.imagingcontrol.com/en_US/...FormatDesc.htm

    At http://www.imagingcontrol.com/en_US/...ningandROI.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/...ailableFPS.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_U...ort/downloads/
    Best regards
    Stefan
    IC Imaging Control Support

Similar Threads

  1. Starting Point IC Capture Settings for Planets (Saturn)?
    By donwaters in forum Astronomy Cameras Support Forum
    Replies: 2
    Last Post: May 3, 2011, 14:40:32
  2. how to get image and show it in dialog
    By ni.jun in forum IC Imaging Control C++ Class Library
    Replies: 2
    Last Post: July 11, 2009, 16:16:52
  3. IC Dialog Application
    By PannetierJerome in forum IC Imaging Control C++ Class Library
    Replies: 3
    Last Post: April 17, 2008, 16:39:38
  4. DMK 21AF04.AS - DirectShow Camera Settings Dialog
    By bazerk in forum Astronomy Cameras Support Forum
    Replies: 2
    Last Post: July 19, 2007, 07:45:15
  5. CDShowError while trying to init
    By jasonrfox in forum IC Imaging Control C++ Class Library
    Replies: 2
    Last Post: December 7, 2006, 22:02:49

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •