[48] | 1 | /// Point Grey Research Bumblebee XB3 acquisition component.
|
---|
| 2 | ///
|
---|
| 3 | /// created @date 2012-07-25
|
---|
| 4 | /// @author Marek Kurdej
|
---|
| 5 | /// @version $Id: $
|
---|
| 6 |
|
---|
| 7 | #ifndef _BUMBLEBEE_H_
|
---|
| 8 | #define _BUMBLEBEE_H_
|
---|
| 9 |
|
---|
| 10 | #include <PGRFlyCapture.h>
|
---|
| 11 | #include <triclops.h>
|
---|
| 12 | #include <qthread.h>
|
---|
| 13 |
|
---|
| 14 | #include "PtGreyCamerasExp.h"
|
---|
| 15 |
|
---|
| 16 | #include "Pacpus/kernel/componentBase.h"
|
---|
| 17 | #include "Pacpus/kernel/DbiteFile.h"
|
---|
| 18 | #include "Pacpus/PacpusTools/ShMem.h"
|
---|
| 19 |
|
---|
| 20 |
|
---|
| 21 | namespace pacpus {
|
---|
| 22 |
|
---|
| 23 | /// Sensor component for 3-camera system Point Grey Research Bumblebee XB3.
|
---|
| 24 | ///
|
---|
| 25 | /// Acquires data and writes it to shared memory segments: "${component-name}-(left|right)".
|
---|
| 26 | /// Written images are already rectified.
|
---|
| 27 | /// Writing to shared memory uses semaphores for synchronization.
|
---|
| 28 | ///
|
---|
| 29 | /// Configuration options:
|
---|
| 30 | /// verbose=INTEGER (verbosity level), default=0
|
---|
| 31 | /// recording=0|1 (is recording? 0=false, 1=true), default=0
|
---|
| 32 | class PTGREYCAMERAS_API BumblebeeXB3
|
---|
| 33 | : public QThread
|
---|
| 34 | , public ComponentBase
|
---|
| 35 | {
|
---|
| 36 | Q_OBJECT
|
---|
| 37 |
|
---|
| 38 | public:
|
---|
| 39 | BumblebeeXB3(QString name);
|
---|
| 40 | ~BumblebeeXB3();
|
---|
| 41 |
|
---|
| 42 | /// starts processing
|
---|
| 43 | virtual void startActivity();
|
---|
| 44 |
|
---|
| 45 | /// stops processing
|
---|
| 46 | virtual void stopActivity();
|
---|
| 47 |
|
---|
| 48 | /// configures component
|
---|
| 49 | virtual ComponentBase::COMPONENT_CONFIGURATION configureComponent(XmlComponentConfig config);
|
---|
| 50 |
|
---|
| 51 | /// thread execution loop
|
---|
| 52 | void run();
|
---|
| 53 |
|
---|
| 54 | private:
|
---|
| 55 | TriclopsContext mTriclops;
|
---|
| 56 |
|
---|
| 57 | FlyCaptureContext mFlycapture;
|
---|
| 58 | FlyCapturePixelFormat mPixelFormat;
|
---|
| 59 |
|
---|
| 60 | int mMaxCols, mMaxRows;
|
---|
| 61 |
|
---|
| 62 | bool mIsRecording;
|
---|
| 63 | int mVerbosityLevel;
|
---|
| 64 |
|
---|
| 65 | size_t mMaxImageSize;
|
---|
| 66 |
|
---|
| 67 | bool THREAD_ALIVE;
|
---|
| 68 |
|
---|
| 69 | ShMem * mShMemLeft;
|
---|
| 70 | //ShMem * mShMemTop;
|
---|
| 71 | ShMem * mShMemRight;
|
---|
| 72 |
|
---|
| 73 | DbiteFile mDbtLeft;
|
---|
| 74 | //DbiteFile mDbtTop;
|
---|
| 75 | DbiteFile mDbtRight;
|
---|
| 76 | };
|
---|
| 77 |
|
---|
| 78 | } // namespace pacpus
|
---|
| 79 |
|
---|
| 80 | #endif /* !_BUMBLEBEE_H_ */
|
---|