Closed maykef closed 6 years ago
Hi @maykef, if your intent is to process with Agisoft or Pix4D you have a couple of options:
I'm closing this because the requested functionality is out of the scope of the tutorial.
We'll also be updating the tutorials soon and will provide extended functionality, including an example on saving data out to tiff files using gdal. We don't currently have writing of metadata out implemented, but we'd love to consider a pull request if someone wants to add that. I would just suggest waiting until the next update to do any work toward that end.
Understood Justin,
Thanks for this.
Use the original files. Both of those software packages support RedEdge and implement the radiometric corrections internally. You don't need to pre-process the files.
I guess for Photoscan this is only true if you perform the whole "Calibrate Reflectance" process. What I mean is that you either get Reflectance values if you use Incident Light Sensor/Reflectance panels or Digital Numbers if you don't. From my experience there's no way to get only Radiance mosaics in Agisoft Photoscan. Would anybody know if the images are corrected for vignetting and row gradient, if the images are just processed normally (without "Calibrate Reflectance"). Maybe this question would be better addressed in the Agisoft forums? :-)
Ok, one last comment on keeping metadata in the images. I haven't had any luck with Python libraries (pyexiftool, py3exiv2). But running exiftool from the command line has given me success. Photoscan does recognize my radiance calibrated images as MicaSense multispectral bands. The important thing is to copy the XMP tags blockwise (-xmp
). If you just use exiftool the normal way and try to copy all tags from one file to another (-all
) they will get "translated" or rearranged internally somehow. So the final command for transfering all metadata from MicaSense raw images to altered images would be:
exiftool -tagsfromfile IMG_0000_1.tif -xmp IMG_0000_1_RAD.tif
exiftool -tagsfromfile IMG_0000_2.tif -xmp IMG_0000_2_RAD.tif
... and so on. Cheers.
Sources: Exiftool FAQ MicaSense Thread
Hi,
The last line in your code does not save images as TIFFS, nor preserves metadata. The consequence is that uploading these images to Pix4D or Agisoft is useless, since all the metadata is lost and, therefore, no mosaic of the band can be created by the programs.
Please advise on using a specific library that preserves Metadata, or a method to copy and paste metadata in last images.