User Tools

Site Tools


wiki:weld_visual_fire

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

wiki:weld_visual_fire [2017/12/05 22:53] (current)
Line 1: Line 1:
 +====== Data visualization using openev ======
 +
 +The goal of this exercise is to demonstrate how to use Openev to visualize WELD .tif products.\\
 +
 +The data are stored at /​home/​user/​ost4sem/​exercise/​weld_data_processing/​x6JIatZlSUMMER2008
 +
 +**Set your working directory:​**
 +
 +  DIR=/​home/​user/​ost4sem/​exercise/​weld_data_processing/​x6JIatZlSUMMER2008
 +  cd $DIR
 +\\
 +We can check that this Linux variable is correct by typing: echo $DIR
 +\\
 +\\
 +**Create a stack image**
 +
 +In this exercise we will visualize the WELD red, green and blue wavelength bands as a true color image by displaying them on the red, green and blue monitor channels. ​ Openev requires multiple bands to be stored together as a stack image, the WELD FILL values (no data values) are designated with a pixel value of -32768 so we need to ignore them when we generate the stack image as:   
 +
 +  gdal_merge.py ​ -separate -n -32768 -co COMPRESS=LZW $DIR/​Band3_TOA_REF.TIF $DIR/​Band2_TOA_REF.TIF $DIR/​Band1_TOA_REF.TIF ​ -o $DIR/​Band321_TOA_REF.tif
 +
 +We will now visualize the stack image  as:
 +  ​
 +  openev $DIR/​Band321_TOA_REF.tif &
 +  ​
 +We can change the minimum and maximum values that are displayed for each band (this is called contrast stretching) to better visualize the data by right clicking on the layers window:\\
 +\\
 +|{{:​wiki:​leyer_icon2.png?​400|}}|
 +\\
 +We can change the band order (Red Band:3, Green Band:2, Blue Band:1) or change the minimum and maximum values as below. ​
 +Remember to press the keyboard "​enter"​ every time that you insert a value.\\
 +\\
 +|{{:​wiki:​band123_icon2.png?​400|}}|
 +\\
 +
 +**Create a log-stretch stack image**
 +
 +For better visualization we can display the natural logarithm of the 3 WELD bands.
 +We can use gdal_calc.py to calculate the log of each band as:
 +
 +  gdal_calc.py -A $DIR/​Band3_TOA_REF.TIF --calc "​log(A)"​ --NoDataValue -32768 --type Float32 ​  ​--outfile ​ $DIR/​Band3_TOA_REF_ln.tif
 +  gdal_calc.py -A $DIR/​Band2_TOA_REF.TIF --calc "​log(A)"​ --NoDataValue -32768 --type Float32 ​  ​--outfile ​ $DIR/​Band2_TOA_REF_ln.tif
 +  gdal_calc.py -A $DIR/​Band1_TOA_REF.TIF --calc "​log(A)"​ --NoDataValue -32768 --type Float32 ​  ​--outfile ​ $DIR/​Band1_TOA_REF_ln.tif
 +
 +Then we can stack the log bands together as:
 +
 +  gdal_merge.py ​ -separate -n -32768 -co COMPRESS=LZW $DIR/​Band3_TOA_REF_ln.tif $DIR/​Band2_TOA_REF_ln.tif Band1_TOA_REF_ln.tif ​ -o $DIR/​Band321_TOA_REF_ln.tif
 +
 +We will now visualize the stack image as:
 +
 +  openev $DIR/​Band321_TOA_REF_ln.tif &
 +
 +We can change the minimum and maximum values that are displayed for each log band by right clicking on the layers window:\\
 +
 +|{{:​wiki:​band321_ln.png?​400|}}|
 +
  
wiki/weld_visual_fire.txt ยท Last modified: 2017/12/05 22:53 (external edit)