Skip to main content

Very simple open device and show live video in C++ - Knowledgebase / Software / Software for Windows - The Imaging Source Helpdesk

Very simple open device and show live video in C++

Authors list

In case you use Microsoft Visual Studio C++ and IC Imaging Control 3.4, then you start at

IC Imaging Control 3.4 can be downloaded from

The main() is simple:

int main(int argc, char* argv[])



   atexit( ExitLibrary );

   Grabber grabber;

      grabber.openDev("DFK 33UX183");

      if( !grabber.isDevValid())


      return -1;


   grabber.setVideoFormat("RGB24 (640x480)");


   std::cout << "Press any key to continue!" << std::endl;



   return 0;


In case you use another C++ environment and the C Wrapper DLL from

#include <stdio.h>

#include <conio.h>

#include <tisgrabber.h>

int main()


    HGRABBER hGrabber; // The handle of the grabber object.


    hGrabber = IC_CreateGrabber();

    if( hGrabber )


        IC_OpenVideoCaptureDevice(hGrabber,"DMK 23UV024");

        if( IC_IsDevValid(hGrabber))


    IC_SetVideoFormat(hGrabber,"RGB24 (640x480)");


            printf("Press any key to stop the live video\n" );






    return 0;


If you use Microsoft Visual Studio C++, then IC Imaging Control is recommended, because it is more sophisticated.

Helpful Unhelpful