Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ExampleVideoSource_Controller.cpp

Example for using the videosource controller to steer shutter, gain, ...

, VideoSource_Controller

Author
MIP
/*
This file is part of the BIAS library (Basic ImageAlgorithmS).
Copyright (C) 2003, 2004 (see file CONTACTS for details)
Multimediale Systeme der Informationsverarbeitung
Institut fuer Informatik
Christian-Albrechts-Universitaet Kiel
BIAS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
BIAS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with BIAS; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/**
@example ExampleVideoSource_Controller.cpp
@relates VideoSource, VideoSource_Controller
@brief Example for using the videosource controller to steer shutter, gain, ...
@ingroup g_examples
@author MIP
*/
#include <bias_config.h>
#include <Base/Common/BIASpragma.hh>
#include <Base/Image/Image.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Common/W32Compat.hh>
#include <Image/Camera.hh>
#include <wx/wx.h>
#ifdef BIAS_HAVE_UEYE
# include <VideoSource/VideoSource_uEye.hh>
#endif
#ifdef BIAS_HAVE_DCAM
# include <VideoSource/VideoSource_DCAM.hh>
#endif
#ifdef BIAS_HAVE_V4L
# include <VideoSource/VideoSource_V4L.hh>
#endif
#include <VideoSource/VideoSource_Base.hh>
#include <Gui/VideoSource_Controller.hh>
using namespace std;
using namespace BIAS;
/** \cond HIDDEN_SYMBOLS*/
class MyApp : public wxApp
{
public:
virtual bool OnInit();
};
bool MyApp::OnInit()
{
BIAS::Camera<unsigned char> grabimage,vidimage;
#ifdef BIAS_HAVE_DCAM
cam.OpenDevice();
cam.InitImage(grabimage);
cam.PreGrab();
frame->Show(TRUE);
int i=0;
while(i++<100){
cam.GrabSingle(grabimage);
grabimage.Display(true,10,DEFAULT_32to8_scale);
}
#endif
return TRUE;
}
IMPLEMENT_APP(MyApp)
/** \endcond */