Closed rmraaron closed 2 years ago
Hi @rmraaron ! Could you give me more information about this problem to try help you properly?
PS: I didn't use this library before with so many file streams, you know? Is that called in a Desktop software where you need to see the result of only one
.ply
file.
.ply
files that are you using?Also, paste the whole error and the stack trace here, please :)
@mfdeveloper
Thanks for your quick reply!
I created a function to call the SurfaceReconstruction
function as follows:
def poisson_reconstruct(input_file, output_file):
surface = SurfaceReconstruction(method_type='open3d', point_cloud_file=input_file, output_file=output_file)
parameters = {
'estimate_normals': {
'fast_normal_computation': False,
'normals': (1, 3)
},
'orient_normals_consistent_tangent_plane': {
'k': 180,
},
'surface_reconstruction_screened_poisson': {
'depth': 8,
'width': 0,
'scale': 1.1,
'linear_fit': False,
'n_threads': -1
}
}
surface.poisson_mesh(**{'filters': parameters})
There are 100 .ply
files in a directory for example, and then I tried to read each .ply file in a loop as the input file for poisson_reconstruct()
function and called poisson_reconstruct(...)
function. It showed:
TypeError: estimate_normals(): incompatible function arguments"
I have solved it since I put the poisson_reconstruct(...)
function in a seperate .py
file, and I call the .py
file each time in the loop and it worked. I guess the reason is that it exists a crash for parameters (.ply
files contain different number of vertices) when SurfaceReconstruction
is run several times in a process.
Thanks very much! Have a nice holiday!
Thanks very much for your great work. The SurfaceReconstruction function works when I reconstruct a mesh. If I use this function in a loop for many ply files, it shows: TypeError: estimate_normals(): incompatible function arguments. Do you know how to fix it? Thanks again!