5

Im new to 3D reconstruction i have point cloud. and i write it on .ply file.But when i press on it file

Meshlab provides me an Error . please find the below and meshlab could allow open that file

 Unespected eof

please find my bunney(copy).ply file

ply
format ascii 1.0
comment Mars model by Paul Bourke
element vertex 259200
property float x
property float y
property float z
element face 516960
property list uchar int vertex_indices
end_header
15081.5 -3.45644e+06 65.8061
15081 -3.45659e+06 197.422
15078.2 -3.45648e+06 329.009
15075.4 -3.45663e+06 460.597
15071.2 -3.4567e+06 592.148
15065.6 -3.45674e+06 723.653
15059.9 -3.457e+06 855.16
15050.7 -3.45674e+06 986.473
14541.2 3.33642e+06 -698.464
14547.7 3.33663e+06 -571.58
14551.5 3.33649e+06 -444.589
14552.7 3.336e+06 -317.541
14556.9 3.33645e+06 -190.56
14558.7 3.33661e+06 -63.5247
3 0 721 1
3 721 0 720
3 1 722 2
3 722 1 721
3 2 723 3
3 723 2 722

get rid of that error what should i change in my bunney(copy).ply ? please help me.

Please find below the image Error MeshLab

coderide
  • 93
  • 1
  • 1
  • 8
  • having the same problem. I found this one here: http://sourceforge.net/p/meshlab/bugs/238/ but "export LANG=C" doesnt help in my case. – mojovski May 01 '15 at 20:50
  • 1
    I ran into this issue as well, and did the following: Change scientific notation to decimal, removed comment lines, as well as some other things that are not relevant here and was able to load it. – mlh3789 Jul 08 '15 at 16:31

3 Answers3

8

In my case, the data was correct however not read properly by meshlab due to locale settings. Once restarted the program using LC_ALL=C meshlab, the ply finally loaded. Version 2016.12.

saurabheights
  • 3,967
  • 2
  • 31
  • 50
  • Specifically, this is due to the environment variable `LC_NUMERIC` being set to a locale that uses `,` for the decimal place separator. You really only have to change it to a local that uses `.` or to C. E.g., `export LC_NUMERIC='en_US.UTF-8'` or `export LC_NUMERIC=C` – stephen Nov 09 '19 at 13:41
  • @stephen I am not so well versed with Locale Environment Variables. If you are very sure, let me know or I will read on this once free and then update the answer. And thank you :) – saurabheights Nov 09 '19 at 17:26
  • 1
    Your answer is fine. I was just providing more details and being more specific about the cause of the problem, since it appears in other programs as well. You could replace `LC_ALL` with `LC_NUMERIC` in your answer and it would solve the comma issue. However, I have not extensively used meshlab so perhaps there is additional functionality affected by `LC_ALL`, so I would leave the answer as is. – stephen Nov 13 '19 at 08:04
  • @snwflk LOL, its alright. Working/Studying in germany, so was easy for me to catch as my system locale is set to deutch language. – saurabheights Jan 11 '20 at 16:24
2

As shown in your ply file:

element vertex 259200

and

element face 516960

It means your ply file contains data of 259200 vertices and 516960 faces. However, your ply file does not have those much data. So the MeshLab would show errors " Unespected eof".

You need to confirm that your ply file has as much data as you describe.

flyingzhao
  • 86
  • 5
  • Sorry I'm a very beginner, but how to onfirm that your ply file has as much data as I describe ? – Bastienm Jul 21 '17 at 10:00
  • For example, `element vertex 259200` means you have 259200 vertex, you just need to confirm your ply file contains data of 259200 vertex. – flyingzhao Jul 21 '17 at 11:56
  • Yea I understood that, but what do you mean by confirm. MeshLab is not asking any confirmation. It just says "Error details: Unespected eof" and I don't have other option than press "ok". Am I supposed to add someting in the .ply file or to change an option in MeshLab ? – Bastienm Jul 21 '17 at 12:21
  • 1
    MeshLab does not warn you. You need to check it by yourself and then load it ito MeshLab. – flyingzhao Jul 21 '17 at 13:24
  • At the end I just replace the "." by "," and it works – Bastienm Jul 24 '17 at 08:06
-3

Try putting a blank line at the end of your file. This may or may not resolve your problem.

kpie
  • 9,588
  • 5
  • 28
  • 50