74 void Init(
const float *k_mat,
int width,
int height) {
75 memcpy(k_mat_, k_mat,
sizeof(
float) * 9);
90 float center[3],
float hwl[3],
float *ry);
102 float center[3],
float hwl[3],
float *ry);
105 float GetProjectionScore(
float ry,
const float *bbox,
const float *hwl,
107 const bool &check_truncation =
true)
const {
110 float *bbox_null_1 =
nullptr;
111 float *bbox_null_2 =
nullptr;
113 hwl, center, check_truncation,
114 bbox_null_1, bbox_null_2);
118 bool AdjustCenterWithGround(
const float *bbox,
const float *hwl,
float ry,
119 const float *plane,
float *center)
const;
122 bool PostRefineCenterWithGroundBoundary(
123 const float *bbox,
const float *hwl,
float ry,
const float *plane,
124 const std::vector<LineSegment2D<float>> &line_seg_limits,
float *center,
125 bool check_lowerbound)
const;
127 int GetDepthXPair(
const float *bbox,
const float *hwl,
const float *center,
128 float ry,
float *depth_pts,
int *x_pts,
129 float *pts_c =
nullptr)
const;
132 float k_mat_[9] = {0};
135 ObjPostProcessorParams params_;
bool PostProcessObjWithGround(const ObjPostProcessorOptions &options, float center[3], float hwl[3], float *ry)
init params
bool PostProcessObjWithDispmap(const ObjPostProcessorOptions &options, float center[3], float hwl[3], float *ry)
none
void Init(const float *k_mat, int width, int height)
process 2d 3d object
virtual ~ObjPostProcessor()=default
T GetScoreViaRotDimensionCenter(const T *k_mat, int width, int height, const T *bbox, const T *rot, const T *hwl, const T *location, const bool &check_truncation, T *bbox_res=nullptr, T *bbox_near=nullptr)
std::vector< LineSegment2D< float > > line_segs