]> pere.pagekite.me Git - homepage.git/blobdiff - mypapers/drafts/geg2210/assignment-8.html
Generated.
[homepage.git] / mypapers / drafts / geg2210 / assignment-8.html
index 65838c49693fa5723c1efa4916379fdca3b6208c..383872b67add2599385fa523258b6afc71f65e07 100644 (file)
@@ -1,31 +1,46 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
   <head>
-    <title></title>
+    <title>Assigment 8 in GEG2210 2005</title>
   </head>
 
   <body>
-    <h1></h1>
 
-Here are my notes from today.
+    <p><a href="http://www.geo.uio.no/geogr/geomatikk/oppgaver/bildeforbedring_eng.html">Assigment 8</a>
+      in <a href="http://www.uio.no/studier/emner/matnat/geofag/GEG2210/index-eng.html">GEG2210</a>
+      - Data Collection - Land Surveying, Remote Sensing and Digital
+        Photogrammetry</p>
 
+    <h1>Image enhancement, filtering and sharpening</h1>
 
-Logged into jern.uio.no using ssh to run ERDAS Imagine.  Started by
-using 'imagine' on the command line.  The images were loaded from
-/mn/geofag/gggruppe-data/geomatikk/
+    <p>By Petter Reinholdtsen and Shanette Dallyn, 2005-05-01.</p>
 
-Tried to use svalbard/tm87.img, but it only have 5 bands.  Next tried
-jotunheimen/tm.img, which had 7 bands.
+<p>This exercise was performed by logging into jern.uio.no using ssh
+and running ERDAS Imagine.  Started by using 'imagine' on the command
+line.  The images were loaded from /mn/geofag/gggruppe-data/geomatikk/</p>
 
-The pixel values in a given band is only a using a given range of
+<p>We tried to use svalbard/tm87.img, but it only have 5 bands.  We
+decided to switch, and next tried jotunheimen/tm.img, which had 7
+bands.</p>
+
+<h2>Some notes on the digital images</h2>
+
+<p>The pixel values in a given band is only a using a given range of
 values.  This is because sensor data in a single image rarely extend
-over the entire range of possible values.
+over the entire range of possible values.</p>
+
+<p>The peak values of the histograms represent the the spectral
+sensitivity values that occure the most often with in the image band
+being analysed.</p>
+
+<h2>Evaluation of the different bands</h2>
 
-Evaluation of the different bands
-=================================
+<p><img src="jotunheimen-truecolor.jpeg" align="right" width="40%">
+This image show the "true colour" version, with the blue range
+assigned to the blue colour, green range to green colour and red range
+to red colour.</p>
 
-band 1, blue (0.45-0.52 um)
----------------------------
+<h3>band 1, blue (0.45-0.52 micrometer - um)</h3>
 
   Visible light, and will display a broad range of values both over
   land and water.  Reflected from ice, as those are visible white and
@@ -33,8 +48,7 @@ band 1, blue (0.45-0.52 um)
   30 and 136.  Mean values of 66.0668.  There are one wide peak with
   center around 50.  There are two peaks at 0 and 255.
 
-band 2, green (0.52-0.60 um)
-----------------------------
+<h3>band 2, green (0.52-0.60 um)</h3>
 
   Visible light, and will display a broad range of values both over
   land and water.  Reflected from ice, as those are visible white and
@@ -42,8 +56,7 @@ band 2, green (0.52-0.60 um)
   to 120.  The mean value is 30.9774.  There are two main peaks at 20
   and 27.  There is also a pie at 0.
 
-band 3, red (0.60-0.69 um)
---------------------------
+<h3>band 3, red (0.60-0.69 um)</h3>
 
   Visible light, and will display a broad range of values both over
   land and water.  Reflected from ice, as those are visible white and
@@ -51,8 +64,8 @@ band 3, red (0.60-0.69 um)
   t 135, with one wide peak around 52.  There are also seem to be two
   peaks at 0 and 255.  The mean value is 34.3403.
 
-band 4, near-infraread (0.76-0.90 um)
--------------------------------------
+<h3>band 4, near-infraread (0.76-0.90 um)</h3>
+<img src="jotunheimen-band4-hist.jpeg" align="right" width="20%">
 
   Water acts as an absorbing body so in the near infrared spectrum,
   water features will appear dark or black meaning that all near
@@ -61,164 +74,190 @@ band 4, near-infraread (0.76-0.90 um)
   show most values between 7 and 110.  The mean is 40.1144.  There are
   two peaks at 7 and 40.
 
-band 5, mid-infrared (1.55-1.75 um)
------------------------------------
+<h3>band 5, mid-infrared (1.55-1.75 um)</h3>
 
   The ice, glaciers and water do not reflect any mid-infrared light.
   The histogram show most values between 1 and 178.  The mean is
   49.8098 and there are two peaks at 6 and 78, in addition to two
   peaks at 0 and 255.
 
-band 6, thermal infrared (10.4-12.5 um)
----------------------------------------
+<h3>band 6, thermal infrared (10.4-12.5 um)</h3>
 
   Display the temperature on earth.  We can for example see that the
   ice is colder than the surrounding areas.  The histogram show most
   values between 36 to 122.  The mean is 102.734.  There are one wide
   peak around 53, in addition to two peaks at 0 and 255.
 
-band 7, mid-infrared (2.08-2.35 um)
-------------------------------------
+<h3>band 7, mid-infrared (2.08-2.35 um)</h3>
 
   The ice, glaciers and water do not reflect any mid-infrared
   frequencies.  The histogram show most values between 77 and 150.
   The mean is 24.04, and there are one wide peak at 130 and a smaller
   peak at 83, in addition to one peak at 0.
 
-Image enhancement
------------------
+<h3>Image enhancement</h3>
 
-We can get a good contrast stretch by using the histogram
-equalisation.  This will give us the widest range of visible
-separation between features.
+<img src="jotunheimen-std-ir-lin.jpg" width="40%">
+<p>When we look at the linear contrast functions, we can move the
+slope and shift values increasing or decreasing the contrast of the
+image. For example, in the linear contrasting we moved the slope value
+from 1.00 to 3.00 to obtain a brighter appearing image, and then we
+moved the shift from 0 to 10 to recieve a sharper image.</p>
 
-Displaying colour images
-------------------------
+<img src="jotunheimen-std-ir-piece.jpg" align="left" width="25%">
+<img src="jotunheimen-std-ir-pieceimg.jpg" align="right" width="40%">
 
-Comparing a map we found on the web,
-<URL:http://home.online.no/~oe-aase/jotunheimen/jotun2000topper.jpg.>
-and the standard infrared image composition, we can identify some
-features from the colors used:
+<br clear="all">Next we tried the piecewise linear stretching for
+contrast. In this image we tried to make all of the histograms in the
+red, blue and green spectrum as similar as possible so we could detect
+a change in the image.(insert histogram change)
 
- - water is black or green
+<img src="jotunheimen-std-ir-piece2.jpg" align="left" width="25%">
+<img src="jotunheimen-std-ir-pieceimg2.jpg" align="right" width="40%">
 
- - ice and glaciers are white, while snow is light green.
+<br clear="all">We tried to break the slope and move the break point
+to slightly after each histogram peak. This resulted in the image
+obtaining a slightly blue tint and dullness. (put ugly blueish picture
+here) As this result was not really increasing the contrast, we tried
+another variation to try to spread out the histogram peak to use a
+wider range.  This setting gave an improved image, were it is easier
+to see the red vegetation and the white ice.</p>
 
- - vegetation is red.
+<br clear="all"><img src="jotunheimen-std-ir-eq.jpeg" align="right" width="40%">
+<p clear="all">We also tried to do histogram equilization on the
+standard infrared composition.  This changed the colours in the image,
+making the previously green areas red, and the brown areas more light
+blue.  In this new image, we can clearly see the difference between
+two kind of water, one black and one green.  We suspect the green
+water might be deeper, but do not know for sure.</p>
 
- - non-vegetation is brown or dull red when closer to snow and
-   glaciers.
+<p>We can get best contrast stretch by using the histogram
+equalisation.  This gave us the widest range of visible separation
+between features.
 
-Next, we tried to shift the frequencies displayed to use blue for the
-red band, green for the near ir band and red for the mid ir (1.55-1.75
-um).  With this composition, we get some changes in the colours of
-different features:
+<br clear="all">
+<h3>Displaying colour images</h3>
+
+<p><img src="jotun2000topper.jpg" width="40%">
+<!-- img src="jotunheimen-map.jpeg" -->
 
- - water is black
+<img src="jotunheimen-std-ir.jpeg" width="40%"></p>
 
- - ice and glaciers are light blue, while snow is dark blue.
+<p>Comparing a map we found on the web, and the standard infrared
+image composition, we can identify some features from the colors
+used:</p>
 
- - vegetation is light green and yellow.
+<img src="jotunheimen-ir-2band.jpeg" align="right" width="40%">
+<ul>
 
- - non-vegetation is red or brown.
+ <li>water is black or green
+
+ </li><li>ice and glaciers are white, while snow is light green.
+
+ </li><li>vegetation is red.
+
+ </li><li>non-vegetation is brown or dull red when closer to snow and
+   glaciers.
+
+</li></ul>
+
+<p>Next, we tried to shift the frequencies displayed to use blue for the
+red band, green for the near ir band and red for the mid ir (1.55-1.75
+um).  With this composition, we get some changes in the colours of
+different features:</p>
 
-Filtering and image sharpening
-==============================
 
-We decided to work on the grey scale version of the thermal infrared.
-This one has lower resolution then the rest of the bands, with 120m
-spatial resolution while the others have 30m spatial resolution.
+<ul>
+ <li>water is black
 
-The high pass filtering seem to enhance the borders between the
-pixels.  Edge detection gave us the positions of glaciers and water.
-We tried a gradient filter using this 3x3 matrix: [ 1 2 -1 / 2 0 -2 /
-1 -2 -1 ].  It gave a similar result to the edge detection.
+ </li><li>ice and glaciers are light blue, while snow is dark blue.
 
+ </li><li>vegetation is light green and yellow.
 
-We also tried unsharp filtering using this 3x3 matrix: [ -1 -1 -1 / -1
-8 -1 / -1 -1 -1 ].  This gave similar results to the edge detection
-too.
+ </li><li>non-vegetation is red or brown.
 
-We started to suspect that the reason the 3x3 filters gave almost the
-same result was that the fact that the spatial resolution of the
-thermal band is actually 4x4 pixels.  Because of this, we tried with a
-5x5 matrix, making sure it sums up to 0.
+</li></ul>
 
-   -1 -1 -1 -1 -1
-   -1 -1 -1 -1 -1
-   -1 -1 24 -1 -1
-   -1 -1 -1 -1 -1
-   -1 -1 -1 -1 -1
 
-Next, we tried some different weight:
+<h2>Filtering and image sharpening</h2>
 
-   -1 -1 -1 -1 -1
-   -1 -2 -2 -2 -1
-   -1 -2 32 -2 -1
-   -1 -2 -2 -2 -1
-   -1 -1 -1 -1 -1
+<img src="jotunheimen-band4.jpeg" width="40%">'
+<p clear="all">We decided to work on the grey scale version of the
+near infrared (band4).  We changed the colour assignment to use this
+band for all three colours, giving us a gray scale image.</p>
 
-This one gave more lines showing the borders between the thermal
-pixels.
+<img src="jotunheimen-band4-low3.jpeg" width="40%">'
+<p clear="all">We applied the 3x3 low pass filter on this image, and
+this gave us almost the same image as the original.  If you look
+closely you can see that some white dots in the original disapper, and
+some of the water edges seem to blur very slightly.</p>
 
-From: shanette Dallyn <shanette_dallyn@yahoo.ca>
-Subject: Re: My notes from todays exercise
-To: Petter Reinholdtsen <pere@hungry.com>
-Date: Sat, 30 Apr 2005 15:16:59 -0400 (EDT)
+<img src="jotunheimen-band4-high3.jpeg" width="40%">'
+<p clear="all">We also tried the 3x3 high pass filter on the band4
+grey scale image.  This gave a very noisy image.  Edges of vallies and
+ice are not well defined.  The black waters are still obvious.</p>
 
-Hey Petter!
- Allright, I looked up some stuff on statistics and the most valuable
-conclusion that I can come up with for the histograpm peak question is:
-"The peak values of the histograms represent the the spectral sensitivity
-values that occure the most often with in the image band being analysed"
-For the grey level question go to http://www.cs.uu.nl/wais/html/na-dir/sci/
-Satellite-Imagery-FAQ/part3.html I found this and thought that the first major
-paragraph pretty much answered the question for the grey levels.
-theory of convolution:
+<img src="jotunheimen-band4-edge3.jpeg" width="40%">'
+<p clear="all">We also tried the 3x3 edge detection, and this gave us
+an image that makes it difficult to distinguish elevation features
+such as the valleys. Rather, edge detection allows us to study main
+features in an area like the lakes. (insert band4 edge 3 image)
 
-                      Specialty Definition: Convolution                       
-                                                                              
-                   (From Wikipedia, the free Encyclopedia)                    
+<img src="jotunheimen-band4-grad3.jpeg" width="40%">'
+<p clear="all">We tried a gradient filter using this 3x3 matrix.  The
+matrix was chosen to make sure the sum of all the weights were zero,
+and to make sure the sum of horizontal, vertical and diagonal numbers
+were zero too.</p>
 
-In mathematics and in particular, functional analysis, the convolution
-(German: Faltung) is a mathematical operator which takes two functions and and
-produces a third function that in a sense represents the amount of overlap
-between and a reversed and translated version of .
+<p><table align="center">
+  <tbody><tr><td>1</td><td>2</td><td>-1</td></tr>
+  <tr><td>2</td><td>0</td><td>-2</td></tr>
+  <tr><td>1</td><td>-2</td><td>-1</td></tr>
+</tbody></table></p>
 
-The convolution of and is written . It is defined as the integral of the
-product of the two functions after one is reversed and shifted.
+<p>The gradient filter used gave us enhancement on lines in the
+vertical, horizontal and diagonal directions. This is seen by the
+white lines that outline certain areas of main features like the
+rivers within the vallies and some of the lakes.</p>
 
-The integration range depends on the domain on which the functions are
-defined. In case of a finite integration range, and are often considered as
-cyclically extended so that the term does not imply a range violation. Of
-course, extension with zeros is also possible.
+<img src="jotunheimen-band4-neg1.jpeg" width="40%">'
+<p>When we rework the matrix to equal negative one, we end up with a
+lot of noise in the image that also seems to blurr the image. Using a
+negative one matrix is not optimal if you are trying to obtain
+sharpness.</p>
 
-If and are two independent random variables with probability densities and ,
-respectively, then the probability density of the sum is given by the
-convolution .
+<p><table align="center">
+  <tbody><tr><td>-1</td><td>-1</td><td>-1</td></tr>
+  <tr><td>-1</td><td>7</td><td>-1</td></tr>
+  <tr><td>-1</td><td>-1</td><td>-1</td></tr>
+</tbody></table></p>
 
-For discrete functions, one can use a discrete version of the convolution. It
-is then given by
+<img src="jotunheimen-band4-plus1.jpeg" width="40%">'
+<p clear="all">We then tried with a 3x3 matrix were the sum of all
+values equals 1, to enhance the high frequency parts of the image.</p>
 
-When multiplying two polynomials, the coefficients of the product are given by
-the convolution of the original coefficient sequences, in this sense (using
-extension with zeros as mentioned above).
+<p><table align="center">
+  <tbody><tr><td>-1</td><td>-1</td><td>-1</td></tr>
+  <tr><td>-1</td><td>9</td><td>-1</td></tr>
+  <tr><td>-1</td><td>-1</td><td>-1</td></tr>
+</tbody></table></p>
 
-Generalizing the above cases, the convolution can be defined for any two
-square-integrable functions defined on a locally compact topological group. A
-different generalization is the convolution of distributions.
+<p clear="all">This gave us a sharper looking image compared to the
+result of the negative 1 filter.  This is not really obvious unless
+one is comparing the two images carefully.  In order to see more
+differences the matrix sums would have to be more then plus/minus one.</p>
 
-I hope this will help!
+<h2>References</h2>
 
-Shanette
+<ul>
+  <li><a href="http://www.cs.uu.nl/wais/html/na-dir/sci/Satellite-Imagery-FAQ/part3.html">Satellite-Imagery-FAQ</a>
+</li></ul>
 
     <hr>
     <address><a href="mailto:pere@hungry.com">Petter Reinholdtsen</a></address>
 <!-- Created: Sun May  1 13:25:38 CEST 2005 -->
 <!-- hhmts start -->
-Last modified: Sun May  1 13:32:31 CEST 2005
+Last modified: Sun May  1 14:28:48 CEST 2005
 <!-- hhmts end -->
   </body>
 </html>