erget / StereoVision

Library and utilities for 3d reconstruction from stereo cameras.
http://erget.github.io/StereoVision
GNU General Public License v3.0
648 stars 268 forks source link

Windows has file write errors for Point_Cloud.py #20

Closed kahlju closed 6 years ago

kahlju commented 6 years ago
def` write_ply(self, output_file):`
        """Export ``PointCloud`` to PLY file for viewing in MeshLab."""
        points = np.hstack([self.coordinates, self.colors])`
        with open(output_file, 'w') as outfile:
            outfile.write(self.ply_header.format(
                                            vertex_count=len(self.coordinates)))
            np.savetxt(outfile, points, '%f %f %f %d %d %d')

Using` point_cloud.py in Windows you get write issues for the open function. It is my understanding that in linux/ this will just write the file if it doesn't exist already. I'm actually switching to a linux machine in the next week or so to avoid this issue as my programming isn't that strong.

Here are similar SO cases involving this issue: https://stackoverflow.com/questions/31347339/python-astonishing-ioerror-on-windows-creating-files-errno-13-permission https://stackoverflow.com/questions/26690627/python-permissionerror-while-writing-a-file-to-windows-dir

The answer to the second one is a little complicated for me and it would take some digging to find the appropriate code to fix this but I will try and if I get a working solution, I will upload it. Has anyone on windows machines had this stereovision package work 100% all the way through the code? (I have to currently use it bc I have a work computer I am trying to develop on the company network, rules and all).

erget commented 6 years ago

Sorry to hear about this, but as you're switching to Linux soon anyway, I'm going to call this Windows-specific and close the issue.

acsignal commented 4 years ago

Is there any update on this? I am trying to run the same script on Windows and am getting a similar error

erget commented 4 years ago

No update. I'm not striving for Windows support with this package and also unfortunately don't really have the time to maintain it except for minor changes.