Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
DC.h
Go to the documentation of this file.
00001 /********************************************************************
00002 **                Image Component Library (ICL)                    **
00003 **                                                                 **
00004 ** Copyright (C) 2006-2013 CITEC, University of Bielefeld          **
00005 **                         Neuroinformatics Group                  **
00006 ** Website: www.iclcv.org and                                      **
00007 **          http://opensource.cit-ec.de/projects/icl               **
00008 **                                                                 **
00009 ** File   : ICLIO/src/ICLIO/DC.h                                   **
00010 ** Module : ICLIO                                                  **
00011 ** Authors: Christof Elbrechter                                    **
00012 **                                                                 **
00013 **                                                                 **
00014 ** GNU LESSER GENERAL PUBLIC LICENSE                               **
00015 ** This file may be used under the terms of the GNU Lesser General **
00016 ** Public License version 3.0 as published by the                  **
00017 **                                                                 **
00018 ** Free Software Foundation and appearing in the file LICENSE.LGPL **
00019 ** included in the packaging of this file.  Please review the      **
00020 ** following information to ensure the license requirements will   **
00021 ** be met: http://www.gnu.org/licenses/lgpl-3.0.txt                **
00022 **                                                                 **
00023 ** The development of this software was supported by the           **
00024 ** Excellence Cluster EXC 277 Cognitive Interaction Technology.    **
00025 ** The Excellence Cluster EXC 277 is a grant of the Deutsche       **
00026 ** Forschungsgemeinschaft (DFG) in the context of the German       **
00027 ** Excellence Initiative.                                          **
00028 **                                                                 **
00029 ********************************************************************/
00030 
00031 #include <dc1394/control.h>
00032 #include <dc1394/conversions.h>
00033 #include <ICLCore/Types.h>
00034 #include <ICLUtils/Size.h>
00035 #include <string>
00036 #include <vector>
00037 
00038 
00039 
00040 namespace icl{
00042   namespace core{ class ImgBase; }
00045   namespace io{
00047     class DCDevice;
00048     class DCDeviceOptions;
00051 
00052     namespace dc{
00053       
00055       std::string to_string(dc1394video_mode_t vm);
00056   
00058       std::string to_string(dc1394framerate_t fr);
00059   
00061       std::string to_string(dc1394color_filter_t f);
00062       
00064       std::string to_string(dc1394bayer_method_t bm);
00065       
00067       std::string to_string(dc1394feature_t f);
00068   
00070       dc1394video_mode_t videomode_from_string(const std::string &s);
00071       
00073       dc1394framerate_t framerate_from_string(const std::string &s);
00074       
00076       dc1394bayer_method_t bayermethod_from_string(const std::string &s);
00077   
00079       dc1394feature_t feature_from_string(const std::string &s);
00080       
00082       const std::vector<std::string> &getListOfAllFeatures();
00083       
00085       void initialize_dc_cam(dc1394camera_t *c, int nDMABuffers, DCDeviceOptions *options);
00086   
00088       void release_dc_cam(dc1394camera_t *c);
00089       
00091       void set_streaming(dc1394camera_t* c, bool on);
00092       
00094 
00098       dc1394video_frame_t *get_newest_frame(dc1394camera_t* c);
00099       
00101 
00102       dc1394video_frame_t *get_a_frame(dc1394camera_t* c);
00103       
00104     
00105       
00107 
00109       void extract_image_to(dc1394video_frame_t *f,
00110                             dc1394color_filter_t bayerLayout, 
00111                             core::ImgBase **ppoDst, 
00112                             const utils::Size &desiredSizeHint, 
00113                             core::format desiredFormatHint,
00114                             core::depth desiredDepthHint,
00115                             std::vector<icl8u> &dataBuffer,
00116                             dc1394bayer_method_t bayerMethod);
00117       
00119 
00120       void extract_image_to_2(dc1394video_frame_t *f,
00121                               dc1394color_filter_t bayerLayout,
00122                               core::ImgBase **ppoDst, 
00123                               std::vector<icl8u> &dataBuffer,
00124                               dc1394bayer_method_t bayerMethod);
00125   
00127 
00128       bool can_extract_image_to(dc1394video_frame_t *f,
00129                                 const utils::Size &desiredSizeHint, 
00130                                 core::format desiredFormatHint,
00131                                 core::depth desiredDepthHint);
00132   
00134 
00138       void install_signal_handler();
00139       
00141       void bayer2gray(icl8u *src, icl8u*dst, int w, int h);
00142       
00144       dc1394_t *get_static_context();
00145   
00147 
00150       void free_static_context();
00151   
00153 
00154       bool is_dc800_capable(dc1394camera_t *cam);
00155       
00157 
00165       void set_iso_speed(dc1394camera_t *cam, int mbits);
00166     }
00167   } // namespace io
00168 }
00169     
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines