Basic Digital Image Processing A Basic Introduction to Digital Image Processing ~~~~~~~~~~ Rev. Ronald J. Wasowski, C.S.C. Associate Professor of Environmental Science University of Portland Portland, Oregon 24 September 2015 The structure of digital images An image processing overview Image restoration Image enhancement Information extraction Image processing hardware & software The Structure of Digital Images An array of pixels Picture elements Rows & columns of pixels Rows are horizontal Columns are vertical Lines & samples of pixels Lines are horizontal Samples are vertical Pixels contain a numerical value DN Digital number Lowest value is black Highest value is white An Overview of Image Processing Three fundamental categories Image restoration Images often include defects of various kinds Image enhancement Images often need to be made more readable Information extraction This is always the ultimate goal Image Restoration: Line Drop-outs Part or all of some image lines are missing Scanner or recorder malfunction Data transmission drop-outs Reconstruct the missing data Use filters to estimate missing pixel values Linear, bilinear & cubic interpolation algorithms Multiple adjacent image lines are missing Landsat 7 scan line corrector failure Image Restoration: Banding All sensors change over time & at different rates Multiple sensors in every scanner system 6 image lines per EW scan for Landsat MSS data 16 image lines per EW scan for Landsat TM data 2048 image lines per NS path for pushbroom sensors Calculate DN x & σ for each scan line set Force x & σ to be equal for entire scan line set Worst just before sensor recalibration Satellite pushbroom scanners almost impossible Landsat images rotated to North almost impossible
Image Restoration: Line Offsets Satellites orbit from N ~11 E to S ~11 W Constant sunlight illumination azimuth Satellite s orbit precesses exactly once per year Earth rotates from W to E under the satellite Image acquisition takes 7 to 25 seconds Image provider offsets scan lines Use appropriate software Every satellite scanner system is different Satellite roll may introduce additional offsets Landsat ETM+ Scan Edge Effects Landsat ETM+ Scan Line Pattern Image Restoration: Random Noise Imaging sensor instabilities Satellite electronic subsystem instabilities Voltage spikes & dips Data transmission instabilities Severe thunderstorms in data transmission path Improved subsystems quality Appropriate filtering of resulting image data Satellites are not designed to be serviceable Severe degradation makes imagery useless Restoration: Atmospheric Scattering Scattering degrades information content Scattering is selective Rayleigh scattering Blue light scattered most & reflected infrared light least Discard blue spectral band Scattergrams estimate amount of scattering Pixels from very dark areas (e.g., water & lava) Calculate least squares regression line Subtract intercept DN value from every pixel No dark areas available to calculate intercept Variable scattering in different image areas Restoration: Geometric Distortions Relief displacement High elevations displaced away from center Low elevations displaced toward center Imaging platform motions Roll Wing tips up or down Pitch Nose tips up or down Yaw Nose turns into the wind Imaging system malfunctions Failure to properly offset scan lines Landsat 7 scan line corrector failure
Relief Displacement Geometry Aerial Photo Relief Displacement http://www.fas.org/irp/imint/docs/rst/sect11/sect11_4.html http://www.geog.ucsb.edu/~jeff/115a/lectures/geometry/relief_displacement.jpg Imaging Platform Roll, Pitch & Yaw Landsat 7 Scan Line Corrector (SLC) http://www.flightsim.com/vbfs/content.php?12220-feature-around-the-world-2006-part-5 Mount Hood: 25 August 2012 Image Enhancement: Contrast Common Contrast Stretches Entire brightness range seldom used Distinguish details in both lava fields & glacier ice Most images appear quite dark & low in contrast Spread out DN values over brightness range Force some pixels to black & others to white Saturate some number or percent of pixels to 0 & 255 Default is often 1.00% saturation or 0.39% saturation Spread out other DN s using various algorithms Linear, Gaussian, histogram equalization Everyone s visual perception is different Linear DN s are spread evenly between 0 & 255 Decisions are made regarding percent saturation Gaussian DN s nearly a bell curve between 0 & 255 Some flexibility in choosing the value for σ Histogram equalization DN s are spread unevenly between 0 & 255 Cumulative frequency distribution a straight line
Image Enhancement: Density Slicing The human eye has limited color perception Human eyes only perceive ~ 1,500 colors Computer screens have great color capability Computer screens display ~ 16 million colors Drastically reduce number of displayed colors Inaccurate color representation Inherent limitations of 3-color displays RGB Sharp Aquos televisions are 4-color displays RGBY Image Enhancement: Edges Linear features on images are often subtle All satellite imagery tends to be low contrast Use filters that increase contrast along edges Directional algorithms Only enhance lines trending in a particular direction Selectively accentuate faults zones, joint sets, ridges Non-directional algorithms Equally enhance lines trending in all directions Non-linear features may remain low contrast Image Enhancement: Sharpening Non-linear images features are often subtle Tendency of satellite imagery to be low contrast Employ filters that increase local contrast High-pass filters Low-pass filters Linear features may remain low contrast Image Enhancement: Digital Mosaics Entire area not covered by one image Obtain enough images to cover entire area Stitch the images together into a mosaic Match geometry at edges of images Match contrast of adjacent images Match color of adjacent images Lighting differences in different seasons Land cover differences in different seasons Image Enhancement: Data Merging Spatial resolution seldom as good as desired Satellites acquire high-resolution pan band Typically twice as good as multispectral bands Landsat ETM+ 30 m multispectral & 15 m pan French SPOT 20 m multispectral & 10 m pan Use of alternative color spaces RGB Human eyes sensitive to red, green & blue IHS Intensity, hue [ color ] & saturation [vividness] Procedure Convert 3 appropriate bands from RGB into IHS Double band size by pixel replication Replace intensity with high-resolution pan band Convert from IHS back into RGB Image Enhancement: Synthetic Stereo Visual interpretation may benefit from stereo Obtain appropriate satellite image Obtain appropriate DEM Generate synthetic left & right stereo images Print & view with traditional stereo viewers View on-screen with special hardware & software DEM s may have poor resolution DEM spacing much larger than image pixel size Vertical accuracy may be especially bad
Information Extraction: PCA Principal Components Analysis The problem of spectral autocorrelation Adjacent bands may contain same information Visually apparent in scattergrams DN values of two spectral bands displayed on a graph Procedure Generate new set of synthetic spectral bands Input as many bands as desired Usually all available spectral bands Output as many bands as desired Usually only 3 spectral bands No more than the number of input spectral bands Successive PCA images look less like the original scene Minimize autocorrelation between spectral bands Specify the percent information content in each PCA band Information Extraction: Ratio Images Spectral bands pairs may contain information Both positive & negative correlations Carefully design ratio images Simple ratios Normalized ratios Vegetation index images VI images NDVI Normalized difference vegetation index NDVI = (IR1 Red) / (IR1 + Red) Confusing influence of soil moisture Specialized VI algorithms Information Extraction: Classification Abundant information in multispectral data Supervised multispectral classification The user does know what is in the scene The user designates areas of each land cover/use type Training sites Multispectral color definitions calculated from training sites Unsupervised multispectral classification The user does not know what is in the scene The computer finds colors that are actually there Multispectral color definitions calculated by sampling pixels Assumption that color correlates with land cover Fresh asphalt & deep clear water are indistinguishable Information Extraction: Change Monitor various kinds of environmental change Use multi-date imagery Raw spectral bands Classified or transformed images Calculation of change vectors Similar to statistical trend lines Appropriate imagery in not always available Mount St. Helens Generic Image Processing Software Adobe PhotoShop Import a wide variety of image formats Limited to BSQ (band sequential) format Monochrome, RGB color & CMYK color Wide variety of image enhancements Contrast, color, sharpness, filters etc. Export a wide variety of image formats BMP, GIF, JPG, TIF & many others Irfanview Excellent public domain software Windows only Dedicated Image Processing Software Public domain MicroMSI Attempt to do things better Designed as a teaching tool Works only under Windows Proprietary Erdas Imagine De facto world standard Works under Windows & Unix operating systems Steep learning curve