필터 지우기
필터 지우기

Pointnet++ issue"Index exceeds the number of array elements. Index must not exceed 0. Error in helperNorm​alizePoint​Cloud (line 16)"

조회 수: 3 (최근 30일)
Hi!
Can someone help me with this? I am trying to performe task "Segment Aerial Point Cloud" from example "AerialLidarSemanticSegmentationUsingPointNetExample". I use a model I trained my own data, then I tried to test the trained model back to my data. However, I encounter the problem "Index exceeds the number of array elements. Index must not exceed 0. Error in helperNormalizePointCloud (line 16)".

채택된 답변

Sai Pavan
Sai Pavan 2023년 11월 28일
Hi Ziyuan,
I understand that you are trying to resolve the index error raised in ‘helperNormalizePointCloud’ function when testing the semantic segmentation model on a test point cloud taken from a custom dataset.
The ‘helperNormalizePointCloud’ function is used in the example to normalize the point cloud, such that X-Limits, Y-Limits and Z-Limits of the point cloud are in the range [0,1]. The function creates an array ‘xyzMin’ in line 16, which contains the minimum range of coordinates of the point cloud in each axis, computed with the help of ‘XLimits’, ‘YLimits’ and ‘ZLimits’ properties. However, the “index exceed number of array elements” error is occurring here as it appears that the test point cloud may lack 1 or more dimensions resulting in the range properties giving out empty vectors.
The error can be verified by checking if the point cloud contains any values in the X, Y and Z axes using ‘XLimits’, ‘YLimits’ and ‘ZLimits’ properties. If one of them returns an empty vector, then it verifies that the point cloud does not contain 3-dimensional data. The error can be resolved by testing the model on point clouds which certainly have 3D data.
Please refer to the below documentation to learn more about ‘XLimits’, ‘YLimits’, ‘ZLimits’ and other properties of a point cloud object: https://www.mathworks.com/help/vision/ref/pointcloud.html?searchHighlight=ptcloud.XLimits&s_tid=srchtitle_support_results_1_ptcloud.XLimits#:~:text=cloud%0ApointCloud%20object-,Properties,-expand%20all
Hope it helps.
Regards,
Sai Pavan
  댓글 수: 1
Ziyuan LI
Ziyuan LI 2023년 11월 28일
I think you provide a thoughful answer I will spend some time to digest it. I am appriciate your time on answering my question.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Labeling, Segmentation, and Detection에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by