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.


Messages - pyeah

Pages: [1]
1
Python and Java API / False color export with MicaSense camera (python)
« on: January 21, 2019, 12:01:14 PM »
Hello,

I am trying to export a False Color orthomosaic from a MicaSense flight campaign, using the python API.

In the interface, I am able to do this:

  • Tools => Set Raster Transform => Transform tab => load three bands (B3/10000, B2/10000 and B1/10000
  • Tools => Set Raster Transform => Palette tab => choose False Color from the dropdown

If I want to transform this in Python code, I end up with something like this:

chunk.raster_transform.formula=["B3/10000","B2/10000","B1/10000"];
chunk.raster_transform.palette = "False Color";
chunk.exportOrthomosaic("D:/test.tif", raster_transform=PhotoScan.RasterTransformPalette);

However, selecting the palette does not seem to work here. In the API, I notice the following keywords in the RasterTransform definition:

  • false_color => list of false color channels
  • palette => dict object type

But I am not sure how to use them here.

Thanks for looking into this.

Best regards,
Pieter-Jan




2
Python and Java API / Re: Set coordinate system to WGS 84 + EGM96
« on: November 30, 2018, 06:29:34 PM »
Excellent, works great.

3
Python and Java API / Set coordinate system to WGS 84 + EGM96
« on: November 27, 2018, 02:18:44 PM »
Hello,

In the interface of PhotoScan (version 1.4.4), it is possible to set the coordinate system to WGS 84 + EGM96 (see attached image). Since there is no corresponding EPSG code for this (correct?), I am not able to set this through the python API.

Is there another way of doing this? I tried the following:

Code: [Select]
chunk.crs = PhotoScan.CoordinateSystem("EPSG::4326")
chunk.crs.addGeoid("C:/Program Files/Agisoft/PhotoScan Pro/geoids/egm96-15.tif")
chunk.updateTransform()

But got the following error:

Code: [Select]
2018-11-27 12:04:06 Traceback (most recent call last):
2018-11-27 12:04:06   File "D:/Mapeo/MS/914_20180905_HAM801/output-ms/align/DGM_000914_align.py", line 2224, in <module>
2018-11-27 12:04:06     chunk.crs.addGeoid("C:/Program Files/Agisoft/PhotoScan Pro/geoids/egm96-15.tif")
2018-11-27 12:04:06 SystemError: <built-in method addGeoid of type object at 0x000000000BBD2D98> returned NULL without setting an error
2018-11-27 12:04:06 Error: OpenCL not supported

Thanks for checking this out.

Best regards

4
Python and Java API / Export Photo Thumbnails
« on: September 21, 2018, 12:31:08 PM »
Hello,

Is there a way to export or to access the image thumbnails as generated by PhotoScan? In the API document, I see the option to list the thumbnails, but not to save or get the resulting paths.

Best regards,

Pages: [1]