Cong Luong
Cong Luong

Reputation: 33

Pymeshlab filter gives results with artifacts while Meshlab doesn't - MLS projection

I used the filter compute_mls_projection_apss in Pymeshlab to project a subdiv version of a mesh onto its original raw mesh. If I perform this operation on Meshlab (Filter --> Point Set --> MLS projection (APSS), option: filter scale = 1), it works fine. But when performing the same operation on Pymeshlab version, the result has a lot of spike artifacts. What are the causes of this problem and how can I fix it ? Or if you know other available implementations of MLS projection, please let me know. Thank you in advance !

Below is the code I used:

import pymeshlab as pml

layers = pml.MeshSet()

# subdiv
layers.load_new_mesh("DFAUST_f_1024_subdiv.ply")

# ground truth
layers.load_new_mesh("DFAUST_f_1024.ply")
layers.compute_mls_projection_apss(controlmesh=1, proxymesh=0, filterscale = 1.000000)
layers.set_current_mesh(0)

layers.save_current_mesh("DFAUST_f_1024_proj.ply")

Spike artifacts from Pymeshlab filter

You can find the meshes to reproduce this problem in this google drive folder: https://drive.google.com/drive/folders/1r90E5toloGAFdURjOCyprORqFc9wJitf?usp=sharing

I tried changing data type of the mesh's vertices to double, float32, float64 but the artifacts persist since I believe Pymeshlab and Meshlab use different floating point precision:

import pymeshlab as pml
import igl
import numpy as np

layers = pml.MeshSet()
# subdiv
v, f = igl.read_triangle_mesh("DFAUST_f_1024_subdiv.ply")
subdiv_mesh = pml.Mesh(v.astype(np.double), f.astype(np.uint32))
layers.add_mesh(subdiv_mesh)

# ground truth
v, f = igl.read_triangle_mesh("DFAUST_f_1024.ply")
raw_mesh = pml.Mesh(v.astype(np.double), f.astype(np.uint32))
layers.add_mesh(raw_mesh)
layers.compute_mls_projection_apss(controlmesh=1, proxymesh=0, filterscale = 1.000000)
layers.set_current_mesh(0)
layers.save_current_mesh("DFAUST_f_1024_proj_double.ply")

Upvotes: 0

Views: 118

Answers (0)

Related Questions