ed_sensor_integration
segmenter.h
Go to the documentation of this file.
1 #ifndef ED_SENSOR_INTEGRATION_SEGMENTER_H_
2 #define ED_SENSOR_INTEGRATION_SEGMENTER_H_
3 
5 
6 #include <rgbd/types.h>
7 #include <geolib/datatypes.h>
8 #include <opencv2/core/core.hpp>
10 
11 #include <ed/convex_hull.h>
12 #include <ed/types.h>
13 
14 #include <vector>
15 
16 namespace cv
17 {
18  class Mat;
19 }
20 
21 namespace geo
22 {
23  class DepthCamera;
24 }
25 
26 // ----------------------------------------------------------------------------------------------------
27 
28 class Segmenter
29 {
30 
31 public:
32 
34 
35  ~Segmenter();
36 
37  void removeBackground(cv::Mat& depth_image, const ed::WorldModel& world, const geo::DepthCamera& cam,
38  const geo::Pose3D& sensor_pose, double background_padding);
39 
40  void calculatePointsWithin(const rgbd::Image& image, const geo::Shape& shape,
41  const geo::Pose3D& shape_pose, cv::Mat& filtered_depth_image) const;
50  cv::Mat preprocessRGBForSegmentation(const cv::Mat& rgb_image, const cv::Mat& filtered_depth_image) const;
51 
62  std::vector<cv::Mat> cluster(const cv::Mat& depth_image, const geo::DepthCamera& cam_model,
63  const geo::Pose3D& sensor_pose, std::vector<EntityUpdate>& clusters, const cv::Mat& rgb_image, bool logging=false);
64 
65 private:
67 };
68 
69 #endif
Segmenter
Definition: segmenter.h:28
datatypes.h
Segmenter::preprocessRGBForSegmentation
cv::Mat preprocessRGBForSegmentation(const cv::Mat &rgb_image, const cv::Mat &filtered_depth_image) const
Preprocess RGB image for segmentation. This function masks the RGB image with the filtered depth imag...
Definition: src/kinect/segmenter.cpp:184
geo
Segmenter::cluster
std::vector< cv::Mat > cluster(const cv::Mat &depth_image, const geo::DepthCamera &cam_model, const geo::Pose3D &sensor_pose, std::vector< EntityUpdate > &clusters, const cv::Mat &rgb_image, bool logging=false)
Cluster the depth image into segments. Applies new algorithm which is the YOLO - SAM - BMM depth segm...
Definition: src/kinect/segmenter.cpp:202
Segmenter::config_
tue::Configuration config_
Definition: segmenter.h:66
Segmenter::removeBackground
void removeBackground(cv::Mat &depth_image, const ed::WorldModel &world, const geo::DepthCamera &cam, const geo::Pose3D &sensor_pose, double background_padding)
Definition: src/kinect/segmenter.cpp:77
vector
convex_hull.h
rgb_image
cv::Mat rgb_image
cam
geo::DepthCamera cam
geo::Transform3T
image
cv::Mat image
tue::config::ReaderWriter
rgbd::Image
Segmenter::calculatePointsWithin
void calculatePointsWithin(const rgbd::Image &image, const geo::Shape &shape, const geo::Pose3D &shape_pose, cv::Mat &filtered_depth_image) const
Definition: src/kinect/segmenter.cpp:147
ed::WorldModel
Segmenter::~Segmenter
~Segmenter()
Definition: src/kinect/segmenter.cpp:38
Segmenter::Segmenter
Segmenter(tue::Configuration config)
Definition: src/kinect/segmenter.cpp:31
configuration.h
entity_update.h
geo::DepthCamera
cv
types.h
depth_image
cv::Mat depth_image
geo::Shape
config
tue::config::ReaderWriter config