I have a multiband (WV3) satellite image that I'm displaying in false color (R=NIR, G=Red, B=Green) on QGIS 2.14. The quality of the results I'm getting via simply changing the band rendering in Layer-> Properties -> Style -> Band rendering --> Render Type: Multiband color are substantially different, and lower than using the SCP-plugin:
I need to do this programmatically via PyQGIS, so I can't use the plugin. I have also tried to play around with raster enhancement buttons but no success. Does anyone know how to improve the quality of band rendering?
UPDATE As pointed out by @user30184, the issue was the fact the max values were not updated in the band rendering (pressing the 'Load' button in the band rendering window). The problem remains - how to update the rendered min/max values via PyQGIS? My current code:
lyr = iface.activeLayer() #An multiband (8 band) raster lyr.renderer().setRedBand(7) lyr.renderer().setGreenBand(5) lyr.renderer().setBlueBand(3) if hasattr(lyr, "setCacheImage"): lyr.setCacheImage(None) lyr.triggerRepaint()