vision
RgbdDetection.hpp
1 // -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
2 
3 #ifndef __RGBD_DETECTION_HPP__
4 #define __RGBD_DETECTION_HPP__
5 
6 #include <yarp/os/Bottle.h>
7 #include <yarp/os/BufferedPort.h>
8 #include <yarp/os/RFModule.h>
9 
10 #include <yarp/dev/PolyDriver.h>
11 #include <yarp/dev/IRGBDSensor.h>
12 
13 #include <yarp/sig/Image.h>
14 #include <yarp/sig/IntrinsicParams.h>
15 
16 #include "IDetector.hpp"
17 #include "YarpCropCallback.hpp"
18 
19 namespace roboticslab
20 {
21 
26 class RgbdDetection : public yarp::os::RFModule
27 {
28 public:
29  ~RgbdDetection() override
30  { close(); }
31 
32  bool configure(yarp::os::ResourceFinder &rf) override;
33  double getPeriod() override;
34  bool updateModule() override;
35  bool interruptModule() override;
36  bool close() override;
37 
38 private:
39  yarp::dev::PolyDriver sensorDevice;
40  yarp::dev::IRGBDSensor * iRGBDSensor;
41  yarp::sig::IntrinsicParams depthIntrinsicParams;
42 
43  yarp::dev::PolyDriver detectorDevice;
44  IDetector * iDetector;
45 
46  yarp::os::BufferedPort<yarp::os::Bottle> statePort;
47  yarp::os::BufferedPort<yarp::sig::ImageOf<yarp::sig::PixelRgb>> imagePort;
48  yarp::os::BufferedPort<yarp::os::Bottle> cropPort;
49  YarpCropCallback cropCallback;
50 
51  double period;
52 };
53 
54 } // namespace roboticslab
55 
56 #endif // __RGBD_DETECTION_HPP__
Interface for object detection.
Definition: IDetector.hpp:17
2.5D detection.
Definition: RgbdDetection.hpp:27
Definition: YarpCropCallback.hpp:23
The main, catch-all namespace for Robotics Lab UC3M.
Definition: groups.dox:5