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 - nickponline

Pages: 1 [2]
16
How do you export to Sketchfab through the Python API? It doesn't seem to be documented, but I'm sure it can be done :)

17
I've tried:

crs = PhotoScan.CoordinateSystem()
crs.init('EPSG:3857')
chunk.crs = crs
chunk.projection = crs

But the projection doesn't seem to be supported and my tif still come out as:

GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]

instead of:

PROJCS["Google Maps Global Mercator",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Mercator_1SP"],
    PARAMETER["central_meridian",0],
    PARAMETER["scale_factor",1],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]

18
I'm exporting my DEM and Ortho using:

blockw, blockh = 4096, 4096

chunk.exportOrthophoto('ortho.tif', blockw=blockw, blockh=blockh, color_correction=False, blending='mosaic', write_kml=True, write_world=True, projection=chunk.projection)

chunk.exportDem('dem.tif', blockw=blockw, blockh=blockh, write_kml=True, write_world=True, projection=chunk.projection)

I get many ortho-x-x.tif images each 4096x4096 but only a single dem.tif which is 4096x4096 and the DEM uses only the top left of this image?

19
Hi there,

When I type the following commands in the console, it works as expected:

import PhotoScan
doc = PhotoScan.app.document
chunk = doc.chunks.add()
chunk.label = 'My Chunk'

Also if I put in in a script and execute it from Tools->Run script it works.

BUT, if I put those command in a script in ~/Library/Application\ Support/Agisoft/PhotoScan\ Pro/scripts and launch PhotoScan it fails with:

https://www.dropbox.com/s/4x3b9692kp8w5fo/Screenshot%202014-05-13%2016.08.09.png

20
Python and Java API / How do you specify orthophoto width?
« on: January 28, 2014, 10:47:18 PM »
How do you specify orthophoto size generated from exportOrthophoto(). I can only see how to specify resolution (dx, dy) and block size (blockw, blockh) in the API. How you you specify the final image size in pixels?

Pages: 1 [2]