VirtualColorCam.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 #ifndef __IPA_VIRTUALCOLORCAM_H__
24 #define __IPA_VIRTUALCOLORCAM_H__
25 
26 #include "StdAfx.h"
27 #ifdef __LINUX__
29 #else
31 #endif
32 
33 #include <cstdlib>
34 #include <boost/filesystem.hpp>
35 
36 namespace ipa_CameraSensors {
42 {
43  private:
46 
47  std::string m_CameraDataDirectory;
49 
50  std::vector<std::string> m_ColorImageFileNames;
51 
52  unsigned int m_ImageCounter;
53 
59  unsigned long LoadParameters(const char* filename, int cameraIndex);
60 
61  unsigned long SetParameters(){return RET_OK;};
62 
63  public:
64 
65  VirtualColorCam ();
66  ~VirtualColorCam ();
67 
68  //*******************************************************************************
69  // AbstractColorCamera interface implementation
70  //*******************************************************************************
71 
72  unsigned long Init(std::string directory, int cameraIndex = 0);
73 
74  unsigned long Open();
75  unsigned long Close();
76 
77  unsigned long GetColorImage(char* colorImageData, bool getLatestFrame);
78  unsigned long GetColorImage(cv::Mat* image, bool getLatestFrame);
79 
80  unsigned long SaveParameters(const char* filename); //speichert die Parameter in das File
81  unsigned long SetProperty(t_cameraProperty* cameraProperty);
82  unsigned long SetPropertyDefaults();
83  unsigned long GetProperty(t_cameraProperty* cameraProperty);
84  unsigned long PrintCameraInformation();
85  unsigned long TestCamera(const char* filename);
86 
87  //*******************************************************************************
88  // Camera specific functions
89  //*******************************************************************************
90 
93  int GetNumberOfImages();
94 
99  unsigned long SetPathToImages(std::string path);
100 
101 };
102 
106 
107 } // end namespace ipa_CameraSensors
108 
109 #endif //__IPA_VIRTUALCOLORCAM_H__
110 
111 
int m_CameraIndex
Index of the specified camera. Important, when several cameras of the same type are present...
__DLL_LIBCAMERASENSORS__ AbstractColorCameraPtr CreateColorCamera_VirtualCam()
std::vector< std::string > m_ColorImageFileNames
unsigned int m_ImageCounter
Holds the index of the image that is extracted during the next call of AcquireImages ...
#define __DLL_LIBCAMERASENSORS__
std::string m_CameraDataDirectory
Directory where the image data resides.


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