feat(rgbd): add RGB-D reconstruction pipeline
Add end-to-end RGB-D reconstruction support across the C++ core and Python API. - add a native merge_rgbd_views path, view-aware 3D pose containers, and nanobind bindings - expose Python helpers to sample aligned depth, apply per-joint offsets, lift UVD poses to world space, and run reconstruct_rgbd - add RGB-D regression tests for merging, manual pipeline parity, symmetric depth sampling windows, and out-of-bounds joints - bump the project version from 0.1.0 to 0.2.0 for the new feature surface
This commit is contained in:
@@ -45,6 +45,17 @@ struct TrackedPoseBatch3DView
|
||||
const float &at(size_t person, size_t joint, size_t coord) const;
|
||||
};
|
||||
|
||||
struct PoseBatch3DByViewView
|
||||
{
|
||||
const float *data = nullptr;
|
||||
const uint32_t *person_counts = nullptr;
|
||||
size_t num_views = 0;
|
||||
size_t max_persons = 0;
|
||||
size_t num_joints = 0;
|
||||
|
||||
const float &at(size_t view, size_t person, size_t joint, size_t coord) const;
|
||||
};
|
||||
|
||||
struct PoseBatch2D
|
||||
{
|
||||
std::vector<float> data;
|
||||
@@ -74,6 +85,19 @@ struct PoseBatch3D
|
||||
static PoseBatch3D from_nested(const NestedPoses3D &poses_3d);
|
||||
};
|
||||
|
||||
struct PoseBatch3DByView
|
||||
{
|
||||
std::vector<float> data;
|
||||
std::vector<uint32_t> person_counts;
|
||||
size_t num_views = 0;
|
||||
size_t max_persons = 0;
|
||||
size_t num_joints = 0;
|
||||
|
||||
float &at(size_t view, size_t person, size_t joint, size_t coord);
|
||||
const float &at(size_t view, size_t person, size_t joint, size_t coord) const;
|
||||
PoseBatch3DByViewView view() const;
|
||||
};
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
struct PairCandidate
|
||||
@@ -242,6 +266,11 @@ PoseBatch3D triangulate_poses(
|
||||
const TriangulationConfig &config,
|
||||
const TriangulationOptions *options_override = nullptr);
|
||||
|
||||
PoseBatch3D merge_rgbd_views(
|
||||
const PoseBatch3DByViewView &poses_3d,
|
||||
const TriangulationConfig &config,
|
||||
float max_distance = 0.5f);
|
||||
|
||||
TriangulationResult triangulate_with_report(
|
||||
const PoseBatch2DView &poses_2d,
|
||||
const TriangulationConfig &config,
|
||||
@@ -256,6 +285,14 @@ inline PoseBatch3D triangulate_poses(
|
||||
return triangulate_poses(poses_2d.view(), config, options_override);
|
||||
}
|
||||
|
||||
inline PoseBatch3D merge_rgbd_views(
|
||||
const PoseBatch3DByView &poses_3d,
|
||||
const TriangulationConfig &config,
|
||||
float max_distance = 0.5f)
|
||||
{
|
||||
return merge_rgbd_views(poses_3d.view(), config, max_distance);
|
||||
}
|
||||
|
||||
inline TriangulationTrace triangulate_debug(
|
||||
const PoseBatch2D &poses_2d,
|
||||
const TriangulationConfig &config,
|
||||
|
||||
Reference in New Issue
Block a user