Forum

Author Topic: How to export colorized mbtiles from photoscan.  (Read 2973 times)

ppant

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
How to export colorized mbtiles from photoscan.
« on: May 02, 2018, 11:50:23 PM »
I am exporting a mbtiles with following piece of code.
Code: [Select]
chunk.exportOrthomosaic('c:\\tmp\\test.mbtiles',format=PhotoScan.RasterFormatMBTiles,image_format=PhotoScan.ImageFormatPNG,min_zoom_level=10, max_zoom_level=20,white_background=False,write_alpha=False)

When I choose
Code: [Select]
image_format= PhotoScan.ImageFormatJPEG

and export tiles in QGIS I can only see gray scale image.
When I change the image format to "PNG" I am seeing nothing in QGIS. Could someone explain to me how to export the colorized mbtiles for example from (CIR images ).

Thanks 

ppant

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
Re: How to export colorized mbtiles from photoscan.
« Reply #1 on: May 03, 2018, 11:03:55 PM »

I am able to do color mbtiles as I requried after much reading the forum with following piece of code 
Code: [Select]
chunk.exportOrthomosaic('test.zip',format=PhotoScan.PhotoScan.RasterFormatMBTiles, image_format = PhotoScan.ImageFormatJPEG, raster_transform = PhotoScan.RasterTransformPalette, min_zoom_level=10, max_zoom_level=20)

where set the  raster transform to Palette

Code: [Select]
raster_transform = PhotoScan.RasterTransformPalette

Thanks

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14851
    • View Profile
Re: How to export colorized mbtiles from photoscan.
« Reply #2 on: May 04, 2018, 12:06:44 AM »
Hello ppant,

What was the input data for this project? And whether you have actually used the Raster Calculator dialog to modify the output?
Best regards,
Alexey Pasumansky,
Agisoft LLC

ppant

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
Re: How to export colorized mbtiles from photoscan.
« Reply #3 on: May 04, 2018, 08:30:39 PM »
Alexey
Input data is the Sequoia Parrot data. I used this after running ortrhomosic get ndvi image.  and output that as mbtiles where colorization is based on Palette.
Code: [Select]
chunk.raster_transform.formula = ["(B4-B2)/(B4+B2)"]

I am working with a python script to do that.


Thanks

ppant

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
Re: How to export colorized mbtiles from photoscan.
« Reply #4 on: May 15, 2018, 04:00:04 PM »
Alexey
As I am able to export tiles (index color etc). Is there a way to export a RGB mbtiles or google tiles based on micasense sensor data from Photoscan.

Thanks


ppant

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
Re: How to export colorized mbtiles from photoscan.
« Reply #5 on: May 16, 2018, 12:20:10 AM »
Extension to the previous question. When the missense data are processed with reflectance and sun correction the resulting orthomosaic in the photos gui is too dark to see the groud object. When I export that file in geotiff with CRS UTM zone i am able to get good view data. But when I export that file in the wgs 84 I get a dark image I see as in photoscan GUI. Furthermore when  export that orthomosaic (wgs84) to tiles could not see the image except a dark patch of an image

need some suggestions how to export some photorealistic output as tiles and gotiff in wgs84 after reflectance panel and sun correction

Thanks

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14851
    • View Profile
Re: How to export colorized mbtiles from photoscan.
« Reply #6 on: May 16, 2018, 09:40:09 PM »
Hello ppant,

For RGB output with the brighter colors you can use raster transformation and define three output channels with the normalization applied.
Best regards,
Alexey Pasumansky,
Agisoft LLC

ppant

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
Re: How to export colorized mbtiles from photoscan.
« Reply #7 on: May 21, 2018, 11:13:26 PM »
Alexey
I tried as you show in the picture I am still not able to output the colorized raster. Could you also show how to do those when with some python scrip?