Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Aligning Pointcloud To Mesh

Status
Not open for further replies.

Alek R.

Programmer
Sep 14, 2020
1
0
0
LT
Hello,

I have been given a task to Align the points of a Pointcloud towards a Mesh as closely as possible.

I've read about PCL and specificly the Random Consensus Sampling (RANSAC) algorithm and thought that it's exactly what i'm looking for.

I've attemped to implement the ransac code, using the SampleConsensusModelRegistration<PointXYZ>::ptr to create the model and using the Mesh vertexes as the input cloud, and the Pointcloud as the target cloud.

I first had issues with RANSAC.computeModel failing, so i submited an issue of github and found out that computeModel requires the input and target clouds to be of the same size, which mine weren't.

To fix this I decided to split my Pointcloud into chunks where each chunk would be the same size as the input cloud, and the last chunk i only copied the points from the Pointcloud into it up until there were no points in the Poitcloud thus leaving the remaining points in that chunk with default values.

I then tried this code out and what i got was the same message after trying to computeModel each chunk: '[pcl::RandomSampleConsensus::computeModel] RANSAC found no model.'

And so I am now wondering if wherher or not i've done something incorrectly, or if RANSAC is simply not meant for doing a task such as mine? If so, is there perhaps something else with PCL that i could use to acomplish my goal?

Thank you for your time,
Alek
 
Alek,

Well, this IS a PCL Forum, but I'm afraid we deal with HP's Printer Control Language (PCL), rather than the Point Cloud Library (PCL).

I don't really know where to direct you, but I have found stackoverflow to be wonderfully helpful for certain projects.

Good luck.



Hugh Hood


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top