mkazhdan / PoissonRecon

Poisson Surface Reconstruction
MIT License
1.56k stars 425 forks source link

txt,asc and ply format input file,different output #202

Open lin-name opened 2 years ago

lin-name commented 2 years ago

Hi,professor. my question is, my original point cloud in asc format get a wrong ply mesh output, so i try to transform the asc to txt, it get the same output as the asc.but, after i transform the original asc point cloud to ply format with CloudCompare software,the output mesh is correct. I am wondering why this happen.

much more specifically, I have my own original point cloud file in asc format,and the command is : PoissonRecon --in point.asc --out mesh.ply then, the mesh output but with some wrong, and the code warning : ..\PoissonRecon-master\Src\FEMTree.Initizlize.inl(line 199) FEMTreeInitizlizer<3,float>::Initizlize
Found bad data:4

then i transform the asc format point cloud to ply format with CloudCompare, and the the command is: PoissonRecon --in point.ply --out mesh.ply the code has no warning, and the output mesh is correct.

and i found the numerical value of nx, ny and nz in the asc is different with that in the ply. Why does this happen?

i am deeply appreciated for your answer and advice.

mkazhdan commented 2 years ago

Can you share the file?

lin-name commented 2 years ago

Thanks for your reply! Sure! The asc and ply type are not supported, and the file is too big to be uploaded. So i upload the file to baiduyun, the link: [https://pan.baidu.com/s/1dBfItDDYeEXlS9LT2U1Pcg]() password: uz6m you may need to download it and unzip. Sorry for this.

The point.asc is my original point cloud file, the point.ply is transformed with the CloudCompare (save->ply(ASCLL)), we can find in the asc, the numerical value is ordered x, y, z, nx, ny, nz, R, G, B. however, the R, G, B is placed in the 4th, 5th, 6th position followed with the nx, ny, nz in the ply, and the nx, ny, nz are different with the value in the asc.

The ply can get the correct mesh output, but the asc has the bad data warning,and there is some strange mesh in the output.

WHY? Thanks!

mkazhdan commented 2 years ago

Apologies. But apparently I cannot download the files from there without installing a network client. Which I would prefer not to. Is there some other way you could share the files?

lin-name commented 2 years ago

Sorry, the point cloud file is too big to be uploded. Maybe email is more suitable. And i have understood it. The main reason is the order of the numerical value in the files, that is, in the original asc file,the order is: x, y, z, nx, ny, nz,R, G, B, howerer, in the transformed ply file, the order is: x, y, z, R, G, B, nx, ny, nz, then i try to regulate the order of nx, ny, nz,R, G, B to R, G, B, nx, ny, nz in the asc file, the code works well and the output mesh is correct. Thank you all the same.

mkazhdan commented 2 years ago

Could you make a small file you could share? Say with just a subset of the points?

lin-name commented 2 years ago

Yes, professor. This is a subset of the points. you can find that nx, ny, nz in the ply(transformed by CloudCompare) are different with that in the asc file. i just import the asc file into the CloudCompare, then save it to ply(ASCII). Why the nx, ny, nz are different? Thanks a lot. point.zip

mkazhdan commented 2 years ago

I'm afraid the .zip file shows up as empty.

lin-name commented 2 years ago

point.zip

lin-name commented 2 years ago

Hi, professor. the .zip contains two files: point.ply and point.asc. i have tried it. 1

mkazhdan commented 2 years ago

I'm afraid that the file I am downloading is only 808 bytes and looks empty to Windows explorer.

lin-name commented 2 years ago

Yes, the .zip is 808 KB. i just use a very small subset of my points, you can unzip the .zip file. Thanks.


发件人: mkazhdan @.> 发送时间: 2021年10月13日 22:39 收件人: mkazhdan/PoissonRecon @.> 抄送: guan-lin @.>; Author @.> 主题: Re: [mkazhdan/PoissonRecon] txt,asc and ply format input file,different output (#202)

I'm afraid that the file I am downloading is only 808 bytes and looks empty to Windows explorer.

― You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/mkazhdan/PoissonRecon/issues/202#issuecomment-942374676, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APUZ32DFBNLQLUN3RLPY75DUGWK27ANCNFSM5FXY5EYA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

mkazhdan commented 2 years ago

I'm afraid Windows Explorer / Bash is still showing the file is empty. Here's the output of running "unzip points.zip": [misha@~/temp]$ unzip point.zip Archive: point.zip End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of point.zip or point.zip.zip, and cannot find point.zip.ZIP, period. [misha@~/temp]$

mkazhdan commented 2 years ago

Not sure why the above is struck-out. In any case, can you share the two files separately (without zipping)?

lin-name commented 2 years ago

Apologies. and i have uploaded the two files in a new repository. the link: https://github.com/guan-lin/asc_and_ply_point_cloud. 2

mkazhdan commented 2 years ago

I'm not really sure. Could be that MeshLab is normalizing the normals and that, together with the fact that everything is being computed using single-precision floats, is causing the problem.

For what it's worth, you could run PoissonRecon with ascii file. You would just have to let the executable know that the file contains colors as well by calling: PoissonRecon --in point.asc --out foo.ply --colors

lin-name commented 2 years ago

Yes, PoissonRecon --in point.asc --out foo.ply --colors this works well and no warnings. Thanks very much!

lin-name commented 2 years ago

Deeply sorry to disturb your work again, but i faced another problem, i am using the older version8.0(Screened Poisson Surface Reconstruction (Version 8.0)), i open the .sln in Visual Studio 2017 (Release x64), and build the executable. then input: PoissonRecon --in eagle.points.ply --out eagle.screened.color.ply --depth 10 --color 16 as your USAGE. 3

it works, but where is the .ply output triangle mesh? The eagle.points.ply input points cloud is in the same path with the PoissonRecon.exe, but where is the out eagle.screened.color.ply? 4

Thanks for your help.

mkazhdan commented 2 years ago

Should be there as well. What happens when you add the "--verbose" flag?

lin-name commented 2 years ago

Still has no output mesh in that path. 5

mkazhdan commented 2 years ago

It looks like the executable is crashing early because there should be a lot more output describing the point cloud, the running time, the memory usage, etc. when using the --verbose flag.