JasCosta / Ex3

0 stars 0 forks source link

Erro #1

Open JasCosta opened 1 year ago

JasCosta commented 1 year ago

Professor carreguei uma point cloud do dataset do trabalho 2, gravei uma nova nuvem e quando tento abrir para segmentar os planos dá-me o erro jc@jc:~/Documents/savi_22-23-main/SAVI-master/Job2/Parte09/Ex3$ /bin/python3 /home/jc/Documents/savi_22-23-main/SAVI-master/Job2/Parte09/Ex2/main.py Load a ply point cloud, print it, and render it Starting plane detection Plane equation: -0.04264275640828626 x + 0.8292505384431472 y + 0.5572478262116901 z + -0.2229281628277095 = 0 jc@jc:~/Documents/savi_22-23-main/SAVI-master/Job2/Parte09/Ex3$ /bin/python3 /home/jc/Documents/savi_22-23-main/SAVI-master/Job2/Parte09/Ex3/main.py Load a ply point cloud, print it, and render it Starting plane detection Segmented plane from pc with 164146 with 140572 inliers. Plane: 0.05310077771323345 x + 0.8479486149480495 y + 0.5274120341952145 z + -0.8465163569880896 = 0 Starting plane detection Segmented plane from pc with 23574 with 22883 inliers. Plane: 0.5809799222590165 x + 0.34424633207564975 y + 0.7375342654984707 z + -0.8543363162765202 = 0 Starting plane detection Segmented plane from pc with 691 with 674 inliers. Plane: -0.3968489631213821 x + 0.8962873335486043 y + 0.19793917295426075 z + -0.1908396008135399 = 0 Starting plane detection Segmented plane from pc with 17 with 17 inliers. Plane: -0.06621950542700178 x + 0.8705639593455592 y + 0.48757909080433987 z + -0.15057483256782844 = 0 Starting plane detection Traceback (most recent call last): File "/home/jc/Documents/savi_22-23-main/SAVI-master/Job2/Parte09/Ex3/main.py", line 117, in main() File "/home/jc/Documents/savi_22-23-main/SAVI-master/Job2/Parte09/Ex3/main.py", line 88, in main point_cloud = plane.segment() # new point cloud are the outliers of this plane detection File "/home/jc/Documents/savi_22-23-main/SAVI-master/Job2/Parte09/Ex3/main.py", line 50, in segment plane_model, inlier_idxs = self.point_cloud.segment_plane(distance_threshold=distance_threshold, RuntimeError: [Open3D Error] (std::tuple<Eigen::Matrix<double, 4, 1, 0, 4, 1>, std::vector<long unsigned int, std::allocator > > open3d::geometry::PointCloud::SegmentPlane(double, int, int, double) const) /root/Open3D/cpp/open3d/geometry/PointCloudSegmentation.cpp:191: There must be at least 'ransac_n' points.

miguelriemoliveira commented 1 year ago

Olá @JasCosta ,

você está a tentar segmentar um plano numa nuvem de pontos de entrada que não tem nenhum ponto. Repare que o penúltimo RANSAC deu o seguinte relatório

Segmented plane from pc with 17 with 17 inliers

e depois você tentar outra vez fazer um RANSAC numa nuvem com 17 -17 = 0 pontos.

O erro é explícito "There must be at least 'ransac_n' points."

miguelriemoliveira commented 1 year ago

Quanto ao issue, o melhor é criar nos issues do repositório de savi em https://github.com/miguelriemoliveira/savi_22-23/issues

O seu código pode ficar aqui neste repo e você coloca um link para cá.