Forum

Author Topic: How to convert coord and projection for all camera in the chunk ? PhotoScan 1.26  (Read 2459 times)

yossiz

  • Newbie
  • *
  • Posts: 1
    • View Profile
As I'm using this code for creating 3D model from .jpg photos from UAV.

import PhotoScan
doc = PhotoScan.app.document
doc.open("project.psz")
chunk = doc.chunk
app = PhotoScan.Application()


print("---Align Photo...")
chunk.matchPhotos(accuracy=PhotoScan.LowAccuracy, preselection=PhotoScan.GenericPreselection)
chunk.alignCameras()


print("---Build Dense Cloud...")
chunk.buildDenseCloud(quality=PhotoScan.MediumQuality)

print("---Build Mesh...")
chunk.buildModel(surface=PhotoScan.HeightField, interpolation=PhotoScan.EnabledInterpolation)


print("---Defining coordinate settings...")
coord = PhotoScan.Vector([104.148348, 18.350459, 1052.977])
crs = PhotoScan.CoordinateSystem("EPSG::4326")
crs_new = PhotoScan.CoordinateSystem("EPSG::32648")
coord = crs.unproject(coord)
coord = crs_new.project(coord)

print("---Build Orthomosaic...")
chunk.buildOrthomosaic(surface=PhotoScan.DataSource.ModelData,blending=PhotoScan.BlendingMode.MosaicBlending,color_correction=False,projection=crs_new)
 
doc.save()


But the coordinate and projection are not change in the same way. (not going to be UTM)

So how can I solve this problem?

« Last Edit: June 19, 2017, 11:25:11 AM by yossiz »