[Qgis-user] Raster

Nicolas Cadieux nicolas.cadieux at archeotec.ca
Sun May 24 10:47:56 PDT 2020


Hi William,

I looked at the data you sent me.  The problem is likely overexposed and 
that basically means very white value have band 1 to 3 set at 
255,255,255.  I tried three solutions.

The first is to make all the white pixels null pixel.  Then adding a 
Google Satellite layer under.  The nodata pixels are transparent.  That 
solution does not work basically because of pixel misregistration 
between both layers.  It looks bad. See 2layer_solution in the project I 
sent you.

The second option is to interpolate the nodata values (the white) using 
t.fill.stats found in the Processing toolbox, and then recombining the 
bands (look at the Interpolated_band123 layer) That could work but 
generally, pixel tend to become much darker. This should not be the case 
because we are dealing with highlights.  Also, you have some highlights 
that are not 255,255,255 but very close.  They now stick out. Maybe a 
better interpolation can be found.  I did not play with this much.

The best solution is the simplest.  Use the green local stretch icon in 
the raster toolbar (you may need to activate it).  Under layer > layer 
properties > Symbology set render type to multiband color.  Red: min = 
32, max =207, Green: min = 26, max = 179, and Blue: Min = 33, max 152 
give good results.  But basically zoom in and click the icon.

This way, you will not notice the overexposure and the colors will be 
nicer.

Cheers!

Nicolas


On 2020-05-24 12:01 a.m., William Reynolds wrote:
> I have a raster image I would like to assign a value to the 3 RGB 
> bands that are equal to 255.  I have several hundred raster images 
> where the image is overexposed (white) and band1=255, band2=255 and 
> band3=255.
>
> Is there a way to run a script that would assign a new value to each 
> of the three bands if the band1, band2 and band3 values = 255?
>
> Bill
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20200524/3d8bd6ef/attachment.html>


More information about the Qgis-user mailing list