vision
KinectFusion.hpp
1 // -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
2 
3 #ifndef __KINECT_FUSION_HPP__
4 #define __KINECT_FUSION_HPP__
5 
6 #include <memory>
7 
8 #include <yarp/os/Searchable.h>
9 #include <yarp/sig/Image.h>
10 #include <yarp/sig/IntrinsicParams.h>
11 #include <yarp/sig/Matrix.h>
12 #include <yarp/sig/PointCloud.h>
13 
14 namespace roboticslab
15 {
16 
18 {
19 public:
20  virtual ~KinectFusion() = default;
21 
22  virtual void getCloud(yarp::sig::PointCloudXYZNormalRGBA & cloudWithNormals) const = 0;
23 
24  virtual void getPoints(yarp::sig::PointCloudXYZ & cloud) const = 0;
25 
26  virtual void getPose(yarp::sig::Matrix & pose) const = 0;
27 
28  virtual bool update(const yarp::sig::ImageOf<yarp::sig::PixelFloat> & depthFrame, const yarp::sig::FlexImage & colorFrame = {}) = 0;
29 
30  virtual void reset() = 0;
31 
32  virtual void render(yarp::sig::FlexImage & image) const = 0;
33 };
34 
35 std::unique_ptr<KinectFusion> makeKinFu(const yarp::os::Searchable & config,
36  const yarp::sig::IntrinsicParams & intrinsic,
37  int width, int height);
38 
39 #ifdef HAVE_DYNAFU
40 std::unique_ptr<KinectFusion> makeDynaFu(const yarp::os::Searchable & config,
41  const yarp::sig::IntrinsicParams & intrinsic,
42  int width, int height);
43 #endif
44 
45 #ifdef HAVE_KINFU_LS
46 std::unique_ptr<KinectFusion> makeKinFuLargeScale(const yarp::os::Searchable & config,
47  const yarp::sig::IntrinsicParams & intrinsic,
48  int width, int height);
49 #endif
50 
51 #ifdef HAVE_COLORED_KINFU
52 std::unique_ptr<KinectFusion> makeColoredKinFu(const yarp::os::Searchable & config,
53  const yarp::sig::IntrinsicParams & depthIntrinsic,
54  const yarp::sig::IntrinsicParams & colorIntrinsic,
55  int depthWidth, int depthHeight,
56  int colorWidth, int colorHeight);
57 #endif
58 
59 } // namespace roboticslab
60 
61 #endif // __KINECT_FUSION_HPP__
Definition: KinectFusion.hpp:18
The main, catch-all namespace for Robotics Lab UC3M.
Definition: groups.dox:5