New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[visualize normal] Normals are displayed incorrectly #6024
Comments
Could you share the pointcloud? |
@larshg https://github.com/QiuYilin/test/blob/main/pcl_test/source/croped.pcd This is the pointcloud. |
|
@larshg I found that after removing the invalid points, it was displayed normally, but I did not see any instructions or errors that prohibit the use of invalid points for normal estimation.Why not process it into an algorithm that can filter out invalid points on the underlying mechanism, or are invalid points meaningful in some cases(It is true that invalid values are used when keeping organized, so why not let all classes accept this ordered structure?)? At present, I have a vague feeling that some classes are sensitive to invalid points and some are not. Is there any unified guiding principle? |
Do you build in release or debug - I can verify that the normals is wrong when running in debug mode for some (probably memory indexing) reason. Not sure if its due to invalid points though - I can try add that to verify. |
For normal estimation, invalid points should not be a problem. The normal for an invalid point will simply be (NaN, NaN, NaN). cloud->width = cloud->width * cloud->height;
cloud->height = 1;
normals->width = normals->width * normals->height;
normals->height = 1; |
@mvieth Modified code pretending unorganized:
|
@larshg I build in debug. |
I noticed that if I use BilateralFilter on this point cloud, if the invalid points are not removed, the program will report an error. Is this a feature of BilateralFilter or a related bug? Mycode:
report
|
BilateralFilter should check for invalid points before calling radiusSearch. So yes, that is a bug in BilateralFilter. |
I tried updating the version of vcpkg and recompiling pcl, but the problem still didn't solve. |
The normals can be displayed correctly in pcl 1.13.1. However,new problems about "#define PCL_NO_PRECOMPILE" were generated:
|
At present, I have reverted to a version that can display normally: Windows 10(Version 22H2 19045.4291) MSVC 2019(14.29.30133) vcpkg.json
I hope there is a hint that the 1.14.1 version of pcl on windows can run normally. |
Okay, I may have found the problem. As far as I can tell, the normals are only displayed incorrectly if Windows is used, and the debug configuration is used (release works fine), and the cloud or normals given to the visualizer contain invalid values (NaN). As I mentioned earlier, the |
If I switch to release, will there be any other problems besides the normal display? I switched to the release mode of 1.14.1 and encountered the following situation: SamplingSurfaceNormal will crash if the parameters are set to 0. Is this normal? |
Which parameter? sample or ratio? |
both |
operating system: Windows 10/Windows 11
PCL version: 1.14.0/1.14.1 fc54abc
/8e2d2839fe73a955d49b9a72861de2becf2da
compiler:MSVC 2022 17.8.34309/17.9.5
Details of the environment where I had the problem:
vcpkg baseline: 326d8b43e365352ba3ccadf388d989082fe0f2a6
vcpkg install pcl[qt,vtk,cuda]
The pcl (1.13.1 without cuda) in my old version of vcpkg is correct.
I want to visualize the normals of a point cloud, but the display looks weird.
My code:
The source cloud has 1280000 points. If I extract 432 keypoints from it ,the normals computed will be correct
The text was updated successfully, but these errors were encountered: