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>:tr 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
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>:tr 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