[common] multiStep (update/growing) extension of computeMeanAndCovarianceMatrix
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- computer-vision
Research direction
Start with the existing common-module computeMeanAndCovarianceMatrix implementation, then review the proposed updateMeanAndCovarianceMatrix API and its use through segment_ByOBBMT -> segment_ByOBBThread -> updateCentroidAndOBB. Compare incremental results with full recomputation as the point cloud grows; done means the extension is suitable for general use and preserves correct mean and covariance values.
Written by the indexing model from the issue text.
Description
In my segmentation developments I needed and implemented an extension of computeMeanAndCovarianceMatrix to apply periodically to the growing segment without having every time to apply the for loops to all points
essentially as the segment/cluster grows, for segmentation conditions, I needed to recompute mean and covariance.
to make each step faster i calculate mean and covariance as a variation of the previously old calculated values, with a for loop only on added points
the function looks like this
template <typename PointT, typename Scalar> inline unsigned int
updateMeanAndCovarianceMatrix (const pcl::PointCloud &cloud,
Eigen::Matrix<Scalar, 3, 3> &covariance_matrix,
Eigen::Matrix<Scalar, 4, 1> ¢roid,
unsigned int oldSize,
size_t & point_count
)
the first time it is called with oldSize=0 and it works exactly as computeMeanAndCovarianceMatrix
new size and point_count are recorded after this first call
the second time it is called with oldSize= size of previous call
inside the for loop will be shorter like
for (size_t i=oldSize; i<cloud.points.size();++i)
{
and then there are specifically developed formulas to update the global values of mean and covariance putting together the old and the new segment of point cloud
the algorithm is effective and fast
it can be reapplied at every added point or every n added points or also non periodically when you need to update mean or covariance as the set changes
at each step you have to pass mean and covariance of previous call,
they will be updated with new values
I thought it might be useful for PCL common module?
you can see it on my fork implemented and used with this chain of calls
segment_ByOBBMT (thread call)-> segment_ByOBBThread -> updateCentroidAndOBB ->updateMeanAndCovarianceMatrix
but it can be used general purpouse
- Dominant language
- C++
- Stars
- 11.2k
- Forks
- 4.7k
- Avg merge
- 6d 13h
- Merged PRs (30d)
- 10
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PointCloudLibrary/pcl
-
kind: bug status: triage
Difficulty 1/5 Under an hour Newbie friendliness 82/100
PointCloudLibrary/pcl#6536 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
PointCloudLibrary/pcl#6509 · 1 comment ·
Maintainers usually reply within 3 days
-
kind: bug status: triage
Difficulty 4/5 3-5 days Newbie friendliness 48/100
PointCloudLibrary/pcl#6537 ·
Maintainers usually reply within 3 days
-
[cmake] QHULL/FLANN dll missing when linking single modulePossibly taken @SIDDARTHAREDDY8 claimed this 6 days ago. Openkind: bug module: cmake
Difficulty 3/5 Half a day Newbie friendliness 50/100
PointCloudLibrary/pcl#6522 · 1 comment ·
Maintainers usually reply within 3 days
-
kind: bug status: triage
Difficulty 4/5 3-5 days Newbie friendliness 35/100
PointCloudLibrary/pcl#6395 ·
Maintainers usually reply within 3 days
All issues in PointCloudLibrary/pcl
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
nextcloud/passman-android#214 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
feature wsl2
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
microsoft/WSL#42306 · 3 comments ·
Maintainers usually reply within 1 day
-
2026.11.0 fails to install on Intel macOS: requirements.txt pins cryptography==50.0.2 for Darwin x86_64May be free again A pull request for this issue was closed without being merged. Open
Difficulty 1/5 Under an hour Newbie friendliness 87/100
esphome/esphome#22892 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
distante/esphome-components#50 · 1 comment ·
Maintainers usually reply within 1 day