Hello,
I'm using the pre-release Agisoft v1.3 Python API for the following workflow:
#Create a photoscan doc and a chunk object
doc = PhotoScan.app.document
doc.save(newPhotoScanProject)
chunk = doc.addChunk()
##load photos
.......
##Load reference from Exif data
chunk.loadReferenceExif(load_rotation=True, load_accuracy=False)
crs = PhotoScan.CoordinateSystem("EPSG::4326")
chunk.crs = crs
chunk.updateTransform()
#align photos
chunk.matchPhotos(accuracy=PhotoScan.HighAccuracy, preselection=PhotoScan.ReferencePreselection)
chunk.alignCameras()
#Export pointcloud
sparseFile = "sparsePointCloud.ply"
chunk.exportPoints(sparseFile, source = PhotoScan.PointCloudData, binary=True, precision=6, normals=True, colors=True, format = PhotoScan.PointsFormatPLY, projection=chunk.crs )
#TODO: Convert Region of interest defined in geographic coordinates to local coordinates
#For instance: bBoxCenter = PhotoScan.Vector([40.246537, -74.586480, 3.740638564235713])
1) How can I convert a GPS point (specified in lat, lon or UTM) into the chunk frame to set it as chunk.region.center?
2) Is my above exportPoints() usage correct to generate a georeferenced pointcloud?
Thanks!