Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions examples/python/open_photogrammetry_format/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
"""
Load an Open Photogrammetry Format (OFP) project and display the cameras and point cloud.
Load an Open Photogrammetry Format (OPF) project and display the cameras and point cloud.

OPF specification: https://pix4d.github.io/opf-spec/index.html
Dataset source: https://support.pix4d.com/hc/en-us/articles/360000235126-Example-projects-real-photogrammetry-data#OPF1
Expand Down Expand Up @@ -77,8 +77,12 @@ def __init__(self, path: Path, log_as_frames: bool = True) -> None:
log_as_frames : bool, optional
Whether to log the cameras as individual frames, by default True
"""
import os

self.path = path
self.project = resolve(load(str(path)))
# pyopf doesn't seem to work with regular windows paths, but a "UNC dos path" works
Comment thread
Wumpf marked this conversation as resolved.
path_as_str = "\\\\.\\" + str(path.absolute()) if os.name == 'nt' else str(path)
self.project = resolve(load(path_as_str))
self.log_as_frames = log_as_frames

@classmethod
Expand Down