Point cloud color problem in Matlab

Hi Folks,

I encounter a problem when loading a point cloud (in ply format) into Matlab using the ‘pcread’ command. Because the return point cloud object cannot read the color points and therefore, they have no color to display in Matlab. 

After doing some research on this problem, I found that there is an unperfect solution on this problem in one of the posts on the Matlab Community:

https://de.mathworks.com/matlabcentral/answers/334621-why-is-pcread-not-reading-the-colour-in-a-ply-file

"A friend of mine has just found a solution to this, which I will add in case anyone else encounters this problem.

If I open the .PLY file from Pix4D in notepad the colours are called e.g. " property uchar diffuse_red", which different to what pcread is expecting.

By changing the colour names to e.g. " property uchar red" and saving the .PLY file, pcread was able to read the point cloud with correct colours."

 

This solution works for a small point cloud that I have (~100mb). But when I want to open a much bigger point cloud (~1.5Gb), its size exceeded the maximum size can be read by the notepad and I can’t make the modification. Does anyone have any other solutions to this?

 

Thank you so much!

Frank

Hi,

Can you please try one of the suggested text editors from here and let me know how it goes? 

Cheers! 

HI Frank,

Thanks for posting the problem. I am in the same situation plus when i try to open the ply file, only the head files are normal, the rest are wired codes. Its totally unreadable, some one say its a utf 8 issue. But i still csn figure it out.

Charlir

Hi Frank,

just noticed that if you are using pix4d produced .ply file, the head should be binary_little_endian. But in my matlab program, the pcread cant read the binary file but it can read the ascii head file. I am wondering how you nake it.

Thanks.

Charlie