source: pacpussensors/trunk/PtGreyCameras/Flea3Component.h@ 110

Last change on this file since 110 was 51, checked in by phudelai, 10 years ago

New component added: FLEA3GRABBER_H
FLEA3COMPONENT corrected

File size: 4.1 KB
RevLine 
[48]1/*********************************************************************
2// created: 2013/10/25 - 19:36
3// filename: Flea3Component.h
4//
5// author: Danilo Alves de Lima
6// Copyright Heudiasyc UMR UTC/CNRS 6599
7//
8// version: $Id: $
9//
10// purpose:
11*********************************************************************/
12
13#ifndef FLEA3COMPONENT_H
14#define FLEA3COMPONENT_H
15
16#include "PtGreyCamerasExp.h"
17
18#include <fstream>
19#include <qcoreevent.h>
20#include <qthread.h>
21#include <string>
22
23#include "Pacpus/kernel/ComponentBase.h"
24#include "Pacpus/kernel/DbiteFile.h"
25#include "Pacpus/PacpusTools/ShMem.h"
26
27#include "FlyCapture2.h"
28
29#include <QThread>
30#include <QMutex>
31#include <qdir.h>
32
[50]33#include "../../StdDbtPlayerComponents/ImageBaseStructure.h"
34
[48]35namespace pacpus {
36
37/** Class to provide the obstacle detection from a disparity map data */
38class PTGREYCAMERAS_API Flea3Component: public QThread,
39 public ComponentBase
40{
41public:
42 //============================= DEFAULT ELEMENTS ===============================================
43 Flea3Component(QString name);
44 ~Flea3Component();
45
46 void run();
47
48 virtual void stopActivity(); /*!< to stop the processing thread */
49 virtual void startActivity(); /*!< to start the processing thread */
50 virtual ComponentBase::COMPONENT_CONFIGURATION configureComponent(XmlComponentConfig config);
51 //==============================================================================================
52
53protected:
54
55 // Indicates that thread is running
56 bool is_running;
57
58public:
59
60 /**
61 * Initialize default values
62 */
63 void InitDefault();
64
65private:
66 int cam_serial; // Camera serial to connect
67
68 // Camera configuration
69 bool auto_FrameRate; // Set auto frame rate
70 double cam_FrameRate; // Frame rates in frames per second
71 bool auto_Gain; // Set auto gain
72 double cam_Gain; // Gain value in db
73 bool auto_Exposure; // Set auto exposure
74 double cam_Exposure; // Auto exposure in EV
75 bool auto_Shutter; // Set auto shutter
76 double cam_Shutter; // Shutter in miliseconds
77 bool auto_ExposurebyCode; // Set auto exposure by pos processing method
78 double cam_ExposurebyCode_tshold; // Pecentage of white pixels for threshold
79
80 int cam_video_mode; // DCAM video modes
81 int cam_mode; // Camera modes for DCAM formats as well as Format7
82 int cam_PixelFormat; // Pixel formats available for Format7 modes
83 int cam_ColorProcessingAlgorithm; /**
84 * Color processing algorithms. Please refer to our knowledge base at
85 * article at http://www.ptgrey.com/support/kb/index.asp?a=4&q=33 for
86 * complete details for each algorithm.
87 */
88 int cam_start_point_left; // Image left point (for standard modes only)
89 int cam_start_point_top; // Image top point (for standard modes only)
90 int cam_width; // Image width (for standard modes only)
91 int cam_height; // image height (for standard modes only)
92 int cam_channels; // Image channels (depending of the color processing method)
93
[50]94 //-------------------------------------------- Image save options ------------------------------------------------
95 double image_scale; // Image scale to save
[48]96 int image_compact; // Use jpeg format to save the images
[50]97 int save2dbt; // Save the image in the dbt file (to increases the save rate)
[48]98
[50]99 size_t mSaveImageSize; // Size of the image to be saved
100 //----------------------------------------------------------------------------------------------------------------
[48]101 bool showdebug; // Show frame acquired
102
103 int mMaxImageOutputSize; // Size of the input image data in the memory
104
105 // Output directory
106 QDir mOutputDirectory;
107
[50]108 TimestampedStructImage ImageHeader; // Image header
109 void* img_mem; // Memory position for the header + image data
110 size_t img_mem_size; // Memory size for the header + image data
[48]111
112 bool use_shmem; // If is to use shared memory
113
114 // Imput data
115 ShMem * shmem_image; // Shared memory control access to the image data
116
117 DbiteFile mDbtImage;
118
[50]119 bool THREAD_ALIVE;
[48]120};
121
122}
123#endif // FLEA3COMPONENT
Note: See TracBrowser for help on using the repository browser.