i try display aligned rgb point clouds using icp algorithm.but during alignment of point cloud throws "invalid allocation size error".
my code:
pcl::pointcloud<pcl::pointxyzrgb>::ptr passingcloudstoicp( pcl::pointcloud<pcl::pointxyzrgb>::ptr pointcloud1, pcl::pointcloud<pcl::pointxyzrgb>::ptr pointcloud2) { pcl::iterativeclosestpoint<pcl::pointxyzrgb, pcl::pointxyzrgb> icp; icp.setinputcloud (pointcloud1); icp.setinputtarget (pointcloud2); // set max correspondence distance 5cm (e.g., correspondences higher distances ignored) icp.setmaxcorrespondencedistance (0.05); //set maximum number of iterations (criterion 1) icp.setmaximumiterations (25); // set transformation epsilon (criterion 2) icp.settransformationepsilon (1e-8); // set euclidean distance difference epsilon (criterion 3) icp.seteuclideanfitnessepsilon (1); //perform alignment icp.align(*finalcloud); return finalcloud; } i have tried debug , done code walkthrough,when icp.align(*finalcloud) executes goes following file registration.hpp,here goes through following function.
--- pcl::registration<pointsource, pointtarget, scalar>::align (pointcloudsource &output, const matrix4& guess)" --- "initcompute()" ---- "setinputcloud(target_)" -- when line executes compiler throws "invalid allocation size 4294967295 bytes" please suggest me how fix error.
any appreciated.
Comments
Post a Comment