I am having problems fitting a cylinder to a point cloud. Trying to use "pcfitcylinder", an error saying 'the value of 'ptCloud' is invalid. Expected ptCloud to be a pointCloud object' while the pointcloud is a nx3 created from the vertices of an .stl file. The code is:
Bone_model=stlread(fullfile(Bone_path,Bone_file));maxDistance=.5cilinder = pcfitcylinder(Bone_model.vertices,maxDistance);pcshow (Bone_model.vertices);hold on;plot(cilinder)
Is there anything i'm doing wrong?
Best Answer