Digital Data Format and Storage
Learning Objectives What are spatial data models, how do they differ, and which is more common for remotely sensed data? What are digital numbers (and what aren’t they!)? How do you translate DNs to units of light or reflectance? Why should you be cautious about altering the original DNs in an image? What are image bands (layers)? How do we store image data on computers? What are histograms, and what are some ways they are used? What is contrast stretching?
Spatial Data Models What is a “spatial data model”? What are the two main data models used to depict spatial data on computers in GIS and remote sensing?
Vector Data
Raster Data (= grid or matrix)
Remotely Sensed Data Represent the amount of light reflecting off the ground and reaching the satellite sensor. Continuous change from place to place, or not? Often cover large areas (lots of data!) Multiple images (bands) are collected simultaneously for each place in an image What data model might be best for this image?
Would this image lend itself to a different data model?
Picture Elements What is the common abbreviation for picture elements? What shapes can be used? What shape is most common?
Raster Data Imaginary matrix (rows & columns of pixels) is placed over the feature (e.g., the ground) Some phenomenon (e.g. amount of reflected light) is measured A value (called a digital number or DN) representing the strength of the signal (amount of light) is assigned to each grid cell (pixel).
Somewhere on earth
Overlay raster grid
Assign DNs to pixels 32 47 67 93 11 105 79 35 23 56 43 89 21 213 245 201 179 136 155 55 203 163 63 211 189 145 109 122 202
How are DNs assigned? The amount of light coming from a pixel area on the ground depends (in part) on how much light reflects off the materials that fall within that area. Functionally, it is a weighted average of the light reflecting from the various components (what determines the weights??). But, it is not reflectance! Why not? How do you convert DNs to reflectance??
Digital Numbers DN min (0) DN medium DN max The intensity of reflected light determines a numeric DN that is assigned to each pixel Low or None - Lowest DN (0 is at bottom of scale) High - Maximum value (depends on radiometric resolution) Others - Scaled in between (number of possible increments depends on radiometric resolution) DN min (0) DN medium DN max
How do we keep track of pixel locations? Images are presented as 2-d arrays (matrices). Each pixel has a location (x,y) in the array. Position of pixel often described in terms of image columns and rows (called image coordinates) or map coordinates (e.g. latitude/longitude). F(3,2) F(1,4)
Image Bands You can think of image bands (also called channels and sometimes layers) as a collection of pictures taken simultaneously of the same place, each of which measures reflected light from a different part of the spectrum. Together, image bands allow us to create spectral curves for each pixel.
Image Bands (or channels) blue green red 0.4 0.7 0.6 0.5 UV Near-infrared
How are images stored? Many image file formats (e.g., Erdas Imagine) Typically include 1) a header and 2) the image data Image data can be organized in several ways Band Sequential (BSQ) Band Interleaved by Line (BIL) Band Interleaved by Pixel (BIP) You sometimes have to know (or guess) file structures to import images into image processing software.
Example 1 3 2 Band 1 Band 2 Band 3 3 bands, 9 pixels each
Case 1 Band sequential (BSQ) format Band #1 is stored first 3 2 Band sequential (BSQ) format Band #1 is stored first Followed by #2, #3 Bands are stored sequentially
Case 2 BIL format Line #1, band #1 is stored first 3 2 BIL format Line #1, band #1 is stored first Followed by line #1, band #2 Bands are inter-leaved by line
Case 3 BIP format Pixel #1, Line #1, band #1 is stored first 2 BIP format Pixel #1, Line #1, band #1 is stored first Followed by Pixel #1, line #1, band #2 Bands are inter-leaved by PIXEL
Histograms A histogram is a graph showing the number of pixels in a single band corresponding to each possible DN. Histograms give us information about the data distribution in each band (e.g. normal, skewed, bimodal, etc.) We use information from histograms for contrast stretching, atmospheric correction, statistical analyses, and many other applications.
Describe this histogram. # of pixels Describe this histogram.
Contrast Stretching Computer monitors have a range of brightness that they use to display images. Unprocessed remotely sensed images often don’t use the full range, resulting in a “washed-out” image. Contrast stretching changes (usually temporarily) the DNs to take advantage of the full tonal range available on your display. Usually best not to permanently change the DNs. Why?
High Contrast Low Contrast
Types of Contrast Stretches Contrast stretches can be linear (DNs stretched evenly across the available range of values) …or they can be nonlinear (some DNs changed more than others) Within each of these are many different stretching algorithms. Which you choose depends on what you are trying to see in an image. Erdas and other image display software often applies a temporary contrast stretch automatically to make images looks crisp.
Linear Contrast Stretch Non-linear Contrast Stretch Linear Contrast Stretch
Linear stretch (min-max) Laramie Landsat 8 Image Linear stretch (min-max) Standard Deviation stretch Cuts off extremes and linearly stretches remaining pixels
Understanding the structure of images is crucial to understanding how to manipulate imagery to extract information. Laramie, WY Principal Components 4, 3, and 2, assigned to red, green, and blue.