Forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - venkatg

Pages: [1]
1
Hello,

I'm using the pre-release Agisoft v1.3 Python API for the following workflow:

Code: [Select]
#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!

Pages: [1]