COcvAcquisitionComp.h
Go to the documentation of this file.
1 #ifndef iocv_COcvAcquisitionComp_included
2 #define iocv_COcvAcquisitionComp_included
3 
4 
5 // OpenCV includes
6 #include <opencv/cv.h>
7 #include <opencv/highgui.h>
8 #undef min
9 #undef max
10 
11 // ACF includes
12 #include "i2d/CRectangle.h"
13 #include "ilog/TLoggerCompWrap.h"
14 #include "icomp/CComponentBase.h"
16 
17 // ACF-Solutions includes
20 #include "icam/IExposureParams.h"
21 #include "isig/ITriggerParams.h"
23 
24 
25 namespace iocv
26 {
27 
28 
34  virtual public isig::ITriggerConstraints,
35  virtual public iproc::TSyncProcessorWrap<icam::IBitmapAcquisition>
36 {
37 public:
39 
40  I_BEGIN_COMPONENT(COcvAcquisitionComp);
41  I_REGISTER_INTERFACE(icam::IBitmapAcquisition);
42  I_REGISTER_INTERFACE(isig::ITriggerConstraints);
43  I_END_COMPONENT;
44 
45  enum MessageId
46  {
47  };
48 
50 
51  bool IsCameraValid() const;
52 
53  // reimplemented (iproc::TSyncProcessorWrap<icam::IBitmapAcquisition>)
54  virtual int DoProcessing(
55  const iprm::IParamsSet* paramsPtr,
56  const istd::IPolymorphic* inputPtr,
57  istd::IChangeable* outputPtr,
58  ibase::IProgressManager* progressManagerPtr = NULL);
59 
60  // reimplemented (icam::IBitmapAcquisition)
61  virtual istd::CIndex2d GetBitmapSize(const iprm::IParamsSet* paramsPtr) const;
62 
63  // reimplemented (isig::ITriggerConstraints)
64  virtual bool IsTriggerModeSupported(int triggerMode) const;
65 
66 protected:
67  // reimplemented (icomp::CComponentBase)
68  virtual void OnComponentCreated();
69  virtual void OnComponentDestroyed();
70 
71 private:
72  I_REF(icam::IExposureParams, m_defaultExposureParamsCompPtr);
73  I_REF(isig::ITriggerParams, m_triggerParamsCompPtr);
74  I_REF(i2d::CRectangle, m_imageRegionParamsCompPtr);
75 
76  I_ATTR(bool, m_singleShootAttrPtr);
77  I_ATTR(double, m_timeoutAttrPtr);
78 
79  CvCapture* m_cameraPtr;
80 };
81 
82 
83 } // namespace iocv
84 
85 
86 #endif // !iocv_COcvAcquisitionComp_included
87 
88 
bool IsCameraValid() const
virtual int DoProcessing(const iprm::IParamsSet *paramsPtr, const istd::IPolymorphic *inputPtr, istd::IChangeable *outputPtr, ibase::IProgressManager *progressManagerPtr=NULL)
Open CV based camera component implementation.
virtual istd::CIndex2d GetBitmapSize(const iprm::IParamsSet *paramsPtr) const
virtual void OnComponentDestroyed()
virtual bool IsTriggerModeSupported(int triggerMode) const
ilog::CLoggerComponentBase BaseClass
virtual void OnComponentCreated()

© 2007-2011 Witold Gantzke and Kirill Lepskiy