pcod-common v1.0.0
Shared preprocessing and postprocessing for point-cloud object detection
Loading...
Searching...
No Matches
point_preprocess.hpp
Go to the documentation of this file.
1// Copyright Institute for Automotive Engineering (ika), RWTH Aachen University
2// SPDX-License-Identifier: Apache-2.0
3
4#pragma once
5
6#include <cmath>
7#include <string>
8
9namespace pcod_common {
10
13
16
19 float x_min = 0.0f;
20 float x_max = 0.0f;
21 float y_min = 0.0f;
22 float y_max = 0.0f;
23 float z_min = 0.0f;
24 float z_max = 0.0f;
26 float value_threshold = 1.0f;
27 float min_value = 0.0f;
28 float max_value = 1.0f;
29 float epsilon = 1e-6f;
30
31 bool remove_points_in_zone = false;
32 float nd_x_min = 0.0f;
33 float nd_x_max = 0.0f;
34 float nd_y_min = 0.0f;
35 float nd_y_max = 0.0f;
36
38 float da_cx = 0.0f;
39 float da_cy = 0.0f;
40 float da_radius = 0.0f;
41 float da_bearing_rad = 0.0f;
42 float da_fov_rad = 0.0f;
43};
44
47 public:
49 explicit PointPreprocessor(const PointPreprocessConfig& config) : config_(config) {}
50
52 bool IsPointValid(float x, float y, float z) const;
54 void SetZScoreStats(float mean, float stddev);
56 float NormalizePointFeature(float intensity) const;
57
58 private:
60 float z_score_mean_ = 0.0f;
61 float z_score_std_ = 1.0f;
62};
63
64} // namespace pcod_common
float NormalizePointFeature(float intensity) const
bool IsPointValid(float x, float y, float z) const
PointPreprocessor(const PointPreprocessConfig &config)
void SetZScoreStats(float mean, float stddev)
PointFeatureNormalizationType ParsePointFeatureNormalizationType(const std::string &value)
bool remove_points_in_zone
Enable rectangular no-detection-zone filtering.
float min_value
Minimum for min-max normalization.
float da_cy
Detection-area center Y.
float x_max
Maximum accepted X coordinate.
float value_threshold
Divisor for value-threshold normalization.
bool det_area_remove_outside
Enable radial field-of-view filtering.
float y_min
Minimum accepted Y coordinate.
float epsilon
Lower bound for unsafe normalization divisors.
float z_min
Minimum accepted Z coordinate.
float nd_x_min
No-detection-zone minimum X.
float x_min
Minimum accepted X coordinate.
float da_radius
Detection-area radius.
float z_max
Maximum accepted Z coordinate.
float da_fov_rad
Detection-area angular width in radians.
float nd_y_max
No-detection-zone maximum Y.
float da_bearing_rad
Detection-area center bearing in radians.
float y_max
Maximum accepted Y coordinate.
float da_cx
Detection-area center X.
float max_value
Maximum for min-max normalization.
PointFeatureNormalizationType normalization_type
Feature transform.
float nd_x_max
No-detection-zone maximum X.
float nd_y_min
No-detection-zone minimum Y.