My problem is that the contrast enhancement method I have in mind is quite specific and relies on different statistics than the current functions like StretchAndClipToMinimumMaximum, i.e. I'd like to use a method that also relies on the mean value of the image.
I can see from the docs that there is a UserDefinedEnhancement option, however I'm not quite clear on how to implement it. For more detail on the code I'm using, please see my related StackOverflow post here https://stackoverflow.com/questions/66664148/pyqgis-custom-contrast-enhancement-function (apologies for dual posting, I haven't received any feedback on StackOverflow and if I get an answer here then I will delete the original post to avoid duplication). My approach is to write a new CustomFunction class that inherits the QgsContrastEnhacementFunction where I can override the `enhance` method with my own algorithm. This makes sense in my head but it doesn't work in practice, the output appears black. Please let me know if I'm missing something, or if pyQGIS simply doesn't support any alternative contrast enhancement methods to do the currently hardcoded methods. -- Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html _______________________________________________ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer