<t>Hi, Daniel,<br/>
<br/>
As I have compiled the CC, in debug version, I can load a .pcd file, in the file tree window, the folder name can be shown correctly, but the file is named as 'no name', as show in the photo, where the one above is a .pcd file and the one below is from a .txt file.<br/>
How can we fix this issue?<br/>
[img][C:\Users\SHAO\Desktop\Capture.PNG]</t>
no name when load a .pcd file with the debug version
Re: no name when load a .pcd file with the debug version
Here is the image.
- Attachments
-
- Capture.PNG (30.05 KiB) Viewed 30253 times
Re: no name when load a .pcd file with the debug version
By the way, with the RANSAC function, the entities detected (with the Detect function of RansacShapeDetector class) are listed in the file tree Window, under primitive, however, for cylinder, it only shows the radius and height, and for sphere, only the radius, how can I get the other parameters like the axis of the cylinder or the center of the sphere?
Best regards
Zilong
Best regards
Zilong
Re: no name when load a .pcd file with the debug version
For the "no name" I guess the PCD filter is not doing its job properly.
The cloud should be named somewhere in the PcdFilter class (probably at the end of the loadFile method) with the 'setName' method.
By default I believe the cloud should be named "unnamed - Cloud" so that CloudCompare can automatically replace the "unnamed" part by the filename. Otherwise you can set anything you want.
And for the center of the sphere, you can take the center of the bounding-box (also displayed in the sphere entity properties).
For the axis of the cylinder, it's more tricky. This one must be read from the 'Transformation history' matrix. This will be 3rd column of the matrix.
The cloud should be named somewhere in the PcdFilter class (probably at the end of the loadFile method) with the 'setName' method.
By default I believe the cloud should be named "unnamed - Cloud" so that CloudCompare can automatically replace the "unnamed" part by the filename. Otherwise you can set anything you want.
And for the center of the sphere, you can take the center of the bounding-box (also displayed in the sphere entity properties).
For the axis of the cylinder, it's more tricky. This one must be read from the 'Transformation history' matrix. This will be 3rd column of the matrix.
Daniel, CloudCompare admin
Re: no name when load a .pcd file with the debug version
Daniel,
The transformation history is interesting for a primitive, however, it is not presented in the manual (for a primitive).
I tested with some cases, it's true that the third column of the matrix gives the axis (direction) of the a cylinder.
Something I found :
1. For a plane, the 3rd column gives the normal and the 4th column gives the position of a point on the plane, and this point is the center of the plane which encloses the support points, is this correct?
2. For a cylinder, the 3rd column gives the direction of the axis and the 4th column gives the position of a point on the axis,and this point is the center of the ideal cylinder which encloses the support points, is this correct?
So as you said, this center for a sphere is also the center of the bounding-box of the center primitive.
One more question on the RANSAC, as presented in the manual, the most important parameter it the minimal number of support points, if this number is too small, the routine gives many more primitives than the one to be detected, if this number is too big, maybe the goal primitive cannot be detected, however, given a point cloud, how to estimate the support points of a primitive?
The transformation history is interesting for a primitive, however, it is not presented in the manual (for a primitive).
I tested with some cases, it's true that the third column of the matrix gives the axis (direction) of the a cylinder.
Something I found :
1. For a plane, the 3rd column gives the normal and the 4th column gives the position of a point on the plane, and this point is the center of the plane which encloses the support points, is this correct?
2. For a cylinder, the 3rd column gives the direction of the axis and the 4th column gives the position of a point on the axis,and this point is the center of the ideal cylinder which encloses the support points, is this correct?
So as you said, this center for a sphere is also the center of the bounding-box of the center primitive.
One more question on the RANSAC, as presented in the manual, the most important parameter it the minimal number of support points, if this number is too small, the routine gives many more primitives than the one to be detected, if this number is too big, maybe the goal primitive cannot be detected, however, given a point cloud, how to estimate the support points of a primitive?
Re: no name when load a .pcd file with the debug version
Yes all your observations are correct (and they are not detailed in the documentation because no one ever asked for them ;)
You could consider the typical dimension of the primitives you are looking for, and estimate the density inside a neighborhood of the right radius? But clearly you generally have to test with various values until you find the right one...
You could consider the typical dimension of the primitives you are looking for, and estimate the density inside a neighborhood of the right radius? But clearly you generally have to test with various values until you find the right one...
Daniel, CloudCompare admin
Re: no name when load a .pcd file with the debug version
Thanks for your confirmation.
Is there a function in CC which gives the minimal distance between any two points in a point cloud?
Is there a function in CC which gives the minimal distance between any two points in a point cloud?
Re: no name when load a .pcd file with the debug version
You can compute the approximate density which is actually for each point the distance to its nearest neighbor (see CCLib::GeometricalAnalysisTools::ComputeLocalDensityApprox - with the 'densityType=DENSITY_KNN'). If you retrieve the minimum distance from the generated scalar field, you'll know the minimum distance between two points inside the cloud.
Daniel, CloudCompare admin