Hello Chaoer,
The script is fine and should work as expected. But you need to perform the following steps for this particular two cameras case:
- uncheck cameras in the Reference pane or clear the coordinate information,
- in the Reference pane settings dialog switch the coordinate system to the local coordinates,
- use Reset Transform option for the active chunk from the Workspace context menu.
Then export points.
Alternatively you can modify the script to export the points in the local coordinates:
crs = PhotoScan.CoordinateSystem('LOCAL_CS["Local Coordinates",LOCAL_DATUM["Local Datum",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]]]')
chunk.exportPoints(path, format = "xyz", projection = crs)
In your project the coordinate system is set to WGS84, so by default .exportPoints function uses this coordinate system, while from GUI you are exporting in local coordinates.