Image destriping: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
(+see also)
(+ref)
 
(2 intermediate revisions by 2 users not shown)
Line 24: Line 24:
<source lang="bash">
<source lang="bash">
# digitize filter mask to reduce noise
# digitize filter mask to reduce noise
r.digit filter
r.digit filter #not working in Grass v7
d.rast filter
d.rast filter
r.mask -i filter
r.mask -i filter
Line 59: Line 59:
== See also ==
== See also ==


* https://www.mapbox.com/blog/debanding-the-world/ (about Landsat7 SLC off debanding)
* [http://paulbourke.net/miscellaneous/imagefilter/ Image Filtering in the Frequency Domain]
* [http://paulbourke.net/miscellaneous/imagefilter/ Image Filtering in the Frequency Domain]
* [https://www.mapbox.com/blog/debanding-the-world/ Landsat 7 destriping]


[[Category: Image processing]]
[[Category: Image processing]]

Latest revision as of 14:34, 10 October 2015

Image destriping with Fast Fourier Transform (FFT)

In some image maps, artifacts (stripes) are visible. These can be reduced with FFT filtering (i.fft).

First we take a look at the original tile (screenshot upper right map):

# set computational region to GDEM map:
g.region rast=imagemap -p
d.mon x0
d.rast imagemap


Then we perform Fast Fourier Transform (FFT; screenshot upper left map):

i.fft in=imagemap real=imagemap_real imag=imagemap_imag
d.mon x1
d.rast imagemap_imag
d.rast imagemap_real


Create a MASK in order to remove noise (screenshot upper left map):

# digitize filter mask to reduce noise
r.digit filter #not working in Grass v7
d.rast filter
r.mask -i filter
d.rast imagemap_real


Inverse FFT to get filtered GDEM back (screenshot lower left map):

i.ifft real=imagemap_real imag=imagemap_imag output=imagemap_filtered
r.mask -r
d.mon x2
d.rast imagemap_filtered
r.colors imagemap_filtered color=elevation 
d.rast imagemap_filtered


Calculate the differences (screenshot lower right diagram):

# validate with differences map:
r.mapcalc "diff = imagemap - imagemap_filtered"
r.colors diff color=differences
d.mon x3
d.rast.leg diff

# done
Workflow of image destriping with FFT

Note: If the MASK is made larger (more to the center), more aggressive destriping occurs.

See also