Forum

Author Topic: question about exportOrthophoto function  (Read 3902 times)

Chester Lee

  • Newbie
  • *
  • Posts: 2
    • View Profile
question about exportOrthophoto function
« on: May 27, 2014, 08:28:13 PM »
Hi!

I am trying to implement exporting orthophoto in my script, but don't know why it fails.

This is my code:
Code: [Select]
import PhotoScan
import sys

app = PhotoScan.Application()
new_chunk = PhotoScan.Chunk()

EXPORT_PATH = "Users/"
EXPORT_FORMAT = 'tif'
BLEDING = 'average'
COLOR_CORRECTION = False
WRITE_KML = False
WRITE_WORLD = False

new_chunk.exportOrthophoto(EXPORT_PATH, EXPORT_FORMAT, BLEDING, COLOR_CORRECTION, WRITE_KML, WRITE_WORLD)


app.quit()

This is error information:
Quote
    new_chunk.exportOrthophoto(EXPORT_PATH, EXPORT_FORMAT, BLEDING, COLOR_CORRECTION, WRITE_KML, WRITE_WORLD)
TypeError: region should be (x0, y0, x1, y1) tuple

The platform is Mac OS Maverick.


Any reply will be appreciated!!!!!

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: question about exportOrthophoto function
« Reply #1 on: May 27, 2014, 09:19:27 PM »
Hello Chester Lee,


.exportOrthophoto method has the following arguments:
(path, format='tif', blending='mosaic', color_correction=False, [projection], [region], [dx], [dy], [blockw], [blockh], write_kml=False, write_world=False)

if you are skipping some arguments and leaving default values, you need to specify the arguments' names used.
Best regards,
Alexey Pasumansky,
Agisoft LLC