Skip to content
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

How to smooth exported ply #4718

Closed
visus100 opened this issue Aug 24, 2019 · 7 comments
Closed

How to smooth exported ply #4718

visus100 opened this issue Aug 24, 2019 · 7 comments

Comments

@visus100
Copy link

requierd info
Camera Model D435i
Firmware Version D400_Series_FW_5_11_11_100
Operating System & Version Win (8.1/10)
Platform PC
SDK Version SDK-WIN10-2.23.0.909
Language C++

Question

After exporting point cloud the surface looks like pixels sharp edges. Does anyone have idea how make (programmatically) to surface smooth (with some kind of examples would be great) of course i mean not implementing smooth shader but geometries change.

I was trying to do some approaches with post-processing filters but it looks like it is the part of exporting thing (or maybe i'm wrong).

actual result

stairs

expectation result

smooth

@MartyG-RealSense
Copy link
Collaborator

The links below may provide useful advice about smoothing out a point cloud.

#1053

#1375

When exporting a ply, also take care to set the depth units correctly.

#2009

Some users have reported that they get better results from exporting the ply from the RealSense Viewer program instead of a script such as export_to_ply.

@visus100
Copy link
Author

Thanks for fast reply.

I digged a lot about it already and i did a lot of things to improve quality of scan. For example: change distance, take care of light conditions, changing power of emitter, etc..

Of course i can get a little bit better result than this what i show but still is looks like "minecraft blocks" (its just for compare)

I was wondering if someone could help me with adding somehow algorithms called "Mesh Smoothing" or "Mesh denoiser" before exporting it to ply.

Here example (paper) of algoritmes what i'm trying to reach:
https://isaacguan.github.io/2018/01/26/Mesh-Smoothing/

Here the demo of upper example:
https://isaacguan.github.io/projects/mesh-smoothing/

Other example (paper):
https://wang-ps.github.io/denoising.html

@agrunnet
Copy link
Contributor

Please tell us more about the setting you chose. This looks worse that it should be.
Depth units =100
Distance=20cm
Turn down laser to 60mW
848x480
90fps
Post process with temporal average and down sample 2x.
Possibly set exposure manually until monchrone image looks quite dark.

@visus100
Copy link
Author

Thanks for sharing this camera settings. This improves my scan expectations (helps me a lot), but still i'm dreaming about some kind of mesh denoiser working just like in example:
https://isaacguan.github.io/projects/mesh-smoothing/

Because it actually looks like points are merged like layers (maybe some kind of improving exporter?)
I'm reaching this smooth model by blender smooth brush in sculpt mode but i need this made programatically.

actual result

stairs 2

expectation result

smooth 2

MartyG-RealSense

Some users have reported that they get better results from exporting the ply from the RealSense Viewer program instead of a script such as export_to_ply.

Can someone share the code for this trick, couse i would like to compare and can't find this.

I have only
points.export_to_ply("filename.ply", color);

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Aug 25, 2019

There is a C++ code example here for export_to_ply:

#2832 (comment)

If you want to programmatically apply processing to a point cloud mesh, it may be better to do it with the Point Cloud Library (PCL), which the RealSense SDK has support for via a wrapper.

https://github.com/IntelRealSense/librealsense/tree/master/wrappers/pcl

I recommend googling for 'pcl mesh smoothing' and 'pcl mesh denoising' for leads on how to do this.

@RealSenseCustomerSupport
Copy link
Collaborator


Can we close this ticket for now unless there are further questions?
Thank you.

@vishnukumarts
Copy link

requierd info
Camera Model D435i
Firmware Version D400_Series_FW_5_11_11_100
Operating System & Version Win (8.1/10)
Platform PC
SDK Version SDK-WIN10-2.23.0.909
Language C++

Question

After exporting point cloud the surface looks like pixels sharp edges. Does anyone have idea how make (programmatically) to surface smooth (with some kind of examples would be great) of course i mean not implementing smooth shader but geometries change.

I was trying to do some approaches with post-processing filters but it looks like it is the part of exporting thing (or maybe i'm wrong).

actual result

stairs

expectation result

smooth

Once I compute the normals to ply file exported, I am also getting result equivalent to the actual
result on your 1st post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants