-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
orthophoto-png option does not work with multispectral #1658
Comments
I have capacity to work on this ticket and will hopefully get a PR submitted in the next few days. |
I have a first-rev for a solution on this committed here: however I am not sure how to get the correct scaling statistics from GDAL. If I use the caclulated stats from GDAL (left image) the colors are quite off, however if I take the exact same command and take the calculated stats from QGIS (right image), the image renders perfectly. From what I can tell it doesn't seem to be an issue with band ordering (since I have tried it both ways) or with "nodata values" interfering with stat calculations (since GDAL says novalues do not intefere with stat calculations). I am also a little confused as to why the min values are often negative. I don't think it's an issue with GDAL using 'approximated' stats either since I have also tried passing in "False" to "ComputeRasterMinMax", as well as using the '-mm' flag with 'gdalinfo'. Here is the command used to generate the image on the left: And the image on the right: @pierotofy / @smathermather Do you guys have any ideas as to what I did wrong here? |
I'm not sure this approach will work, you will end up rescaling (stretching) the RGB channels for all outputs, even non-multispectral outputs. Personally, I think that there's limitations to gdal_translate and writing a proper function using rasterio might be the way to go to handle all cases. Similar to how WebODM handles exports: https://github.com/OpenDroneMap/WebODM/blob/master/app/raster_utils.py |
@pierotofy Would this be something that you or your team would have any availability to work on? |
Probably not in the near term. |
When processing a multi-spectral dataset and including the --orthophoto-png odm option the following error is output from gdal:
Which is to suggest that perhaps ODM needs to perform rescaling on the tif before piping it through GDAL, as per:
https://gis.stackexchange.com/questions/244073/unable-to-convert-3-band-spacenet-dataset-geotiff-image-to-either-jpg-or-png-wit
I have seen this occur on about 4 different multispectral datasets, including rededge-p data. The orthophoto.tif file renders perfectly fine in QGIS so I know it's not an issue with the orthophoto.
The text was updated successfully, but these errors were encountered: