python-pcl
python-pcl copied to clipboard
How to set Coefficients in Project inliers object
According to this official tutorial http://www.pointclouds.org/documentation/tutorials/project_inliers.php#project-inliers, Project inliers has "setModelCoefficients" method to set planar coefficients. However, I couldn't call this method. Could anyone suggest a way to set these coefficients?
Hi ,i meet this too . Can you deal with it? and the examples\offical\fitering.py only have the point cloud that PointXYZ but my point cloud is PointCloudXYZRGBA
I am interested in this too. I want project point cloud using a parametric curved surface model, anyone can help me?
@Sirokujira any update on this?
However, you can manually implement a function like this to do the projection to a given plane with coefficients.
` def project(cloud, coefficients) :
normal = np.array(coefficients[:-1])
cloud_array = np.asarray(cloud)
projected_cloud_list = []
for point in cloud_array:
projected_cloud_list.append(point - (normal*(np.dot(point,normal)/np.dot(normal,normal))))
projected_cloud_array = np.array(projected_cloud_list, dtype=np.float32)
return pcl.PointCloud(projected_cloud_array)
`
anyone solve a problem? have a nice day