ToFCameraBase.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * TI Voxel Lib component.
  3. *
  4. * Copyright (c) 2014 Texas Instruments Inc.
  5. */
  6. #ifndef VOXEL_TI_TOFCAMERABASE_H
  7. #define VOXEL_TI_TOFCAMERABASE_H
  8. #include <DepthCamera.h>
  9. #include "TI3DToFExports.h"
  10. #include "ToFDepthFrameGenerator.h"
  11. namespace Voxel
  12. {
  13. namespace TI
  14. {
  15. /// This is a generic ToFCamera which is not strictly dependent on TI's ToF chips
  16. class TI3DTOF_EXPORT ToFCameraBase : public DepthCamera
  17. {
  18. protected:
  19. RawDataFramePtr _rawDataFrame; // Used by _captureDepthFrame(). This is not exposed to DepthCamera
  20. virtual bool _captureRawUnprocessedFrame(RawFramePtr &rawFrame);
  21. virtual bool _convertToDepthFrame(const RawFramePtr &rawFrame, DepthFramePtr &depthFrame);
  22. virtual bool _start();
  23. virtual bool _stop();
  24. virtual bool _initStartParams();
  25. virtual bool _getAmplitudeNormalizingFactor(float &factor) = 0;
  26. virtual bool _getDepthScalingFactor(float &factor) = 0;
  27. bool _init();
  28. virtual bool _onReset();
  29. Ptr<ToFDepthFrameGenerator> _tofDepthFrameGenerator;
  30. public:
  31. ToFCameraBase(const String &name, const String &chipset, DevicePtr device): DepthCamera(name, chipset, device),
  32. _tofDepthFrameGenerator(new ToFDepthFrameGenerator())
  33. {
  34. _frameGenerators[1] = std::dynamic_pointer_cast<FrameGenerator>(_tofDepthFrameGenerator);
  35. }
  36. virtual ~ToFCameraBase() {}
  37. };
  38. }
  39. }
  40. #endif // TOFCAMERABASE_H