-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Module: PyVista_ColmapBIN-CRS_Pyside.py
Version: 0.2.1
Platform: Windows (Win32 required for balloon notifications and session guard)
The COLMAP Point Editor is a LichtFeld Studio plugin for loading, inspecting, transforming, cropping, and re-exporting COLMAP sparse reconstruction projects. It reads both binary (.bin) and text (.txt) COLMAP formats and provides an interactive 3D viewport powered by PyVista and VTK, with a PySide6 sidebar for all editing controls.
The coordinate system applies a display-space flip (X and Y negated) so that the point cloud appears correctly oriented in plan view.
| Package | Purpose |
|---|---|
| pyvista | 3D point cloud rendering |
| pyvistaqt | Qt-embedded VTK interactor |
| PySide6 | UI framework |
| numpy | Array operations |
| scipy | Rotation maths (SRT transforms) |
| vtk | Underlying render engine |
Export writes a full COLMAP project (points, images, cameras) to a chosen folder. The current SRT transform and crop bounds are applied at export time. Only points within the crop bounds are written; camera poses are updated to match the SRT.
Both BIN and TXT formats are supported. Format is selected in the System panel before exporting.
A logfile.json is written alongside PyVista_Colmap_settings.json recording each bake and export event, including timestamp, SRT values, crop state, point counts and output folder.
PyVista_Colmap_settings.json is saved next to the script file and stores:
{
"srt": { "Scale": 1.0, "RotX": 0.0, "RotY": 0.0, "RotZ": 0.0,
"TransX": 0.0, "TransY": 0.0, "TransZ": 0.0 },
"fov": 45.0,
"crop": [xmin, xmax, ymin, ymax, zmin, zmax]
}
Use Read / Write in the System panel to load and save. Notepad++ opens the file directly for manual editing.
COLMAP's native coordinate space has Y pointing downward. This editor applies a display-space flip of [−X, −Y, Z] so the point cloud appears with a conventional right-handed plan orientation. This flip is accounted for transparently in all bake, export and crop operations so the exported COLMAP files remain in valid COLMAP coordinate space.
- The editor can only be launched once per LichtFeld Studio session. Close and reopen Studio to start a new session.
- The Notepad++ shortcut is hard-coded to
C:\Program Files\Notepad++\notepad++.exeand falls back to the system default text editor if not found. - Camera model parameter counts are inferred from a fixed lookup table supporting models 0–6 (SIMPLE_PINHOLE through FULL_OPENCV); unknown models default to 4 parameters.