22 #include "gtest/gtest_prod.h" 29 namespace perception {
47 void Init(
size_t width,
size_t height,
48 const std::string& sensor_name =
"velodyne64");
66 void FilterClusters(
const float* confidence_map,
const float* category_map,
67 float confidence_threshold,
float category_threshold);
86 inline std::vector<SppClusterPtr>&
GetClusters() {
return clusters_; }
89 inline const std::vector<SppClusterPtr>&
GetClusters()
const {
99 const uint16_t*
operator[](
size_t id)
const {
return labels_[id]; }
134 uint16_t** labels_ =
nullptr;
137 char** range_mask_ =
nullptr;
138 std::vector<SppClusterPtr> clusters_;
139 std::string sensor_name_;
142 static const size_t kDefaultReserveSize = 500;
144 FRIEND_TEST(SppClusterTest, spp_cluster_test);
void FilterClusters(const float *confidence_map, float threshold)
void CalculateClusterHeading(const float *heading_map)
void CollectClusterFromSppLabelImage()
void CalculateClusterClass(const float *class_map, size_t class_num)
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
void ResizeClusters(size_t size)
const uint16_t *const * GetSppLabelImage() const
Definition: spp_label_image.h:83
size_t GetClusterNum() const
Definition: spp_label_image.h:102
const uint16_t * operator[](size_t id) const
Definition: spp_label_image.h:99
void ResetClusters(size_t size)
void AddPixelSample(size_t id, uint16_t x, uint16_t y)
Definition: spp_label_image.h:115
~SppLabelImage()
Definition: spp_label_image.h:35
std::shared_ptr< const SppCluster > SppClusterConstPtr
Definition: spp_cluster.h:132
void ClearClusters()
Definition: spp_label_image.h:123
SppClusterConstPtr GetCluster(size_t id) const
Definition: spp_label_image.h:110
uint16_t * operator[](size_t id)
Definition: spp_label_image.h:95
const std::vector< SppClusterPtr > & GetClusters() const
Definition: spp_label_image.h:89
uint16_t ** GetSppLabelImage()
Definition: spp_label_image.h:80
void ProjectClusterToSppLabelImage()
void CalculateClusterTopZ(const float *top_z_map)
void IFree2(T ***A)
Definition: i_alloc.h:79
Definition: spp_label_image.h:32
SppLabelImage()
Definition: spp_label_image.h:34
void Init(size_t width, size_t height, const std::string &sensor_name="velodyne64")
std::shared_ptr< SppCluster > SppClusterPtr
Definition: spp_cluster.h:131
std::shared_ptr< const SppLabelImage > SppLabelImageConstPtr
Definition: spp_label_image.h:149
SppClusterPtr GetCluster(size_t id)
Definition: spp_label_image.h:106
void InitRangeMask(float range, float boundary_distance)
Image< uchar > * threshold(Image< T > *src, int t)
Definition: imutil.h:63
std::vector< SppClusterPtr > & GetClusters()
Definition: spp_label_image.h:86
std::shared_ptr< SppLabelImage > SppLabelImagePtr
Definition: spp_label_image.h:148