<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi,<br>
I've got some SPOT5 imagery that I want to convert to (close to)
real colour, and am told that:<br>
Band 1 is green<br>
Band 2 is red<br>
Band 3 is NIR<br>
band 4 is shortwave IR<br>
<br>
I found two different methods for creating pseudo-Blue. (or pseudo
RGB)<br>
Blue = 0.7*Green + 0.24*Red - 0.15*NIR<br>
and the other was:<br>
Blue = 0.85*Band 1 - 0.15*B3<br>
Green = 0.65*Band 1 + 0.35*Band 3<br>
Red = Band 2<br>
<br>
so they are fairly similar (assuming the second one has the same
band order as my image).<br>
<br>
I use gdal_calc.py to create the 3 separate band-tif images and then
gdal_merge.py to create my two variants of the RGB tiffs. <br>
<br>
When I open these images in QGIS 2.0.1, they are brownish rather
that pseudo RGB<br>
I have set the 'style' to multiband colour, "loaded" the min/max
values and then set contrast to "Stretch to Min/Max".<br>
I have also tried various combinations of the 3 bands in case
gdal_merge.py doesn't honour file-order to band order.<br>
<br>
Can anyone offer a solution to this issue?<br>
<br>
Thanks and regards,<br>
Zoltan.<br>
<br>
FYI My script is as follows:<br>
<br>
<font face="Times New Roman"># 20140307 - Zls do bandmath to create
create synthetic RGB<br>
TIFin="3229AA"<br>
gdal_calc.py -A ${TIFin}.tif --A_band=1\<br>
-B ${TIFin}.tif --B_band=2\<br>
-C ${TIFin}.tif --C_band=3\<br>
-D ${TIFin}.tif --D_band=4\<br>
--outfile=${TIFin}r.tif\<br>
--overwrite\<br>
--calc="B"<br>
#<br>
gdal_calc.py -A ${TIFin}.tif --A_band=1\<br>
-B ${TIFin}.tif --B_band=2\<br>
-C ${TIFin}.tif --C_band=3\<br>
-D ${TIFin}.tif --D_band=4\<br>
--outfile=${TIFin}g.tif\<br>
--overwrite\<br>
--calc="A"<br>
# --calc="(A*0.65)+(C*0.35)"<br>
#<br>
gdal_calc.py -A ${TIFin}.tif --A_band=1\<br>
-B ${TIFin}.tif --B_band=2\<br>
-C ${TIFin}.tif --C_band=3\<br>
-D ${TIFin}.tif --D_band=4\<br>
--outfile=${TIFin}b.tif\<br>
--overwrite\<br>
--calc="(A*0.7)+(B*0.24)-(C*0.14)"<br>
# --calc="(A*0.85)-(C*0.15)"<br>
#<br>
rm -f ${TIFin}rgb.tif > /dev/null 2> /dev/null<br>
gdal_merge.py -o ${TIFin}rgbx.tif\<br>
-separate\<br>
${TIFin}r.tif\<br>
${TIFin}g.tif\<br>
${TIFin}b.tif<br>
<br>
</font><br>
<br>
<pre class="moz-signature" cols="72">--
===========================================
Zoltan Szecsei PrGISc [PGP0031]
Geograph (Pty) Ltd.
GIS and Photogrammetric Service
P.O. Box 7, Muizenberg 7950, South Africa.
Mobile: +27-83-6004028
Fax: +27-86-6115323 <a class="moz-txt-link-abbreviated" href="http://www.geograph.co.za">www.geograph.co.za</a>
===========================================</pre>
</body>
</html>