AVTPikeCam.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9 
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 
22 
23 
24 #ifndef __IPA_AVTPIKECAM_H__
25 #define __IPA_AVTPIKECAM_H__
26 
27 #include "StdAfx.h"
28 
29 #ifdef __LINUX__
31 #else
33 #endif
34 
35 #include <cstdlib>
36 
37 #ifdef _WIN32
38  #include <fgcamera.h>
39  #ifdef __MINGW__
40  typedef unsigned char UINT8;
41  #endif
42 #endif
43 
44 #define UINT8P_CAST(x) reinterpret_cast<UINT8*>(x)
45 
46 #ifdef __LINUX__
47  #include <dc1394/dc1394.h>
48  typedef struct
49  {
50  unsigned long Low;
51  unsigned long High;
52  }UINT32HL;
53  #define UINT32 unsigned long
54  #define _UINT32HL
55 #endif
56 
57 #ifdef SWIG
58 %module Sensors
59 %include "Source/Vision/CameraSensors/AbstractColorCamera.h"
60 
61 %{
62  #include "AVTPikeCam.h"
63 %}
64 #endif
65 
66 using namespace std;
67 
68 namespace ipa_CameraSensors {
69 
74 {
81  {
82  public:
84  {
85 #ifndef __LINUX__
86  FGExitModule();
87 #endif
88  };
89  };
90 
91  private:
94  UINT32HL m_GUID;
95  static bool m_OpenExecuted;
97 #ifdef __LINUX__
99  dc1394video_frame_t* m_Frame;
100  dc1394_t* m_IEEE1394Info;
101  dc1394camera_list_t* m_IEEE1394Cameras;
102  dc1394camera_t* m_cam;
103  dc1394video_modes_t m_availableVideoModes;
104 
105  dc1394speed_t m_IsoSpeed;
106  dc1394framerate_t m_FrameRate;
107  dc1394video_mode_t m_VideoMode;
108  dc1394color_coding_t m_ColorCoding;
109 #endif
110 
111 #ifdef _WIN32
112  CFGCamera m_cam;
113  FGNODEINFO m_nodeInfo[5];
114  UINT32 m_NodeCnt;
115  FGFRAME m_Frame;
116 #endif
117  unsigned long LoadParameters(const char* filename, int cameraIndex);
123 
127  unsigned long SetParameters();
128 
129  public:
130 
132  AVTPikeCam ();
134  ~AVTPikeCam ();
135 
136  //*******************************************************************************
137  // AbstractColorCamera interface implementation
138  //*******************************************************************************
139 
140  unsigned long Init(std::string directory, int cameraIndex = 0);
141 
142  unsigned long Open();
143  unsigned long Close();
144 
145  unsigned long GetColorImage(char* colorImageData, bool getLatestFrame);
146  unsigned long GetColorImage(cv::Mat* colorImage, bool getLatestFrame);
147 
148  unsigned long SaveParameters(const char* filename); //speichert die Parameter in das File
149 
165  unsigned long SetProperty(t_cameraProperty* cameraProperty);
166  unsigned long SetPropertyDefaults();
167  unsigned long GetProperty(t_cameraProperty* cameraProperty);
168 
171  unsigned long PrintCameraInformation();
172  unsigned long TestCamera(const char* filename);
173 
174  //*******************************************************************************
175  // Camera specific functions
176  //*******************************************************************************
177 
178 };
179 
183 
184 } // end namespace ipa_CameraSensors
185 
186 #endif //__IPA_AVTPIKECAM_H__
187 
188 
UINT32HL m_GUID
GUID (worldwide unique identifier) of the IEEE1395 camera.
Definition: AVTPikeCam.h:94
static AVTPikeCamDeleter m_Deleter
of the number of cameras from this type
Definition: AVTPikeCam.h:96
bool m_operationMode_B
Camera specific parameters.
Definition: AVTPikeCam.h:93
__DLL_LIBCAMERASENSORS__ AbstractColorCameraPtr CreateColorCamera_AVTPikeCam()
Definition: AVTPikeCam.cpp:36
#define __DLL_LIBCAMERASENSORS__
static bool m_OpenExecuted
Trigger takes care, that AVT library is opend only once.
Definition: AVTPikeCam.h:95


cob_camera_sensors
Author(s): Jan Fischer , Richard Bormann
autogenerated on Thu Mar 19 2020 03:23:05