Presentation is loading. Please wait.

Presentation is loading. Please wait.

6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 1 Geographic Information Processing Attribute Plotting Extracting data features Calculating derivatives.

Similar presentations


Presentation on theme: "6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 1 Geographic Information Processing Attribute Plotting Extracting data features Calculating derivatives."— Presentation transcript:

1 6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 1 Geographic Information Processing Attribute Plotting Extracting data features Calculating derivatives Edge sharpening Nearest neighbor analysis Gradient calculations Laplacian filtering Chester County, PA W076N40 - USGS DTED Data

2 6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 2 Data Feature Extraction Spatial derivatives Edges Gradients Curvatures

3 6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 3 Spatial Derivatives Calculate spatial derivative of attribute(s) Can be one- or two-dimensional Result, because of high-pass nature, will have data noise enhanced Convolution is most rapid computation method

4 6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 4 Definition A spatial derivative is the rate of change of a function of space, f(x,y), with respect to distance in that space. Since geographical images are 2-dimensional, we can define derivatives in both the x-direction and the y-direction independently.

5 6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 5 Mathematical Representation

6 6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 6 Image Derivatives Images are not infinitely divisible They are composed of discrete pixels The value of the spatially varying attribute is known only at these pixels. Continuous derivatives must be approximated by discrete derivatives.

7 6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 7 Discrete Derivatives

8 6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 8 Problems Data values may be missing Data may contain noise (corrupted attribute values), derivatives accentuate this noise The accuracy of the derivative calculations may depend upon the spatial frequencies of the image. [High rates of change between pixels will cause errors in the derivatives.]

9 6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 9 Solutions Filter the data, to reduce noise, before taking derivatives. Curve-fit the data [for example using a spline surface] and take derivatives of the resulting smooth curve. Use Savitsky & Golay derivative convolutes (based on curve fitting method) to calculate derivatives with specified smoothing.

10 6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 10 Savitsky and Golay Reference Abraham Savitsky and Marcel J. E. Golay, “Smoothing and Differentiation of Data by Simplified Least Squares Procedures,” Analytical Chemistry, 36 (8), 1627-1639 (July, 1964).

11 6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 11 1-D Derivative by Convolution c = {{0, 0, -2, 0, 0}, {0, 0, -1, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 1, 0, 0}, {0,0, 2, 0, 0}}; g = {{205, 205, 205, 205, 205, 205, 205}, {205, 205, 205, 204, 205, 205, 205}, {205, 205, 205, 203, 205, 205, 205}, {205, 205, 205, 202, 205, 205, 205}, {205, 205, 205, 201, 205, 205, 205}, {205, 205, 205, 200, 205, 205, 205}, {205, 205, 205, 199, 205, 205, 205}}; h = ListConvolve[c/10, g] output = {{0, 1, 0}, {0, 1, 0}, {0, 1, 0}} c = convolute g = data h = program step to filter data

12 6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 12 Detecting Edges Derivatives –Act as high-pass spatial filters –Increase noise - results need smoothing Convolution –Derivative kernel (arbitrary size) –Sobel kernels (3 x 3 arrays) One for x-direction One for y-direction

13 6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 13 Two-Dimensional Derivatives For data field, f(x,y), the derivative vector is defined as: Where,

14 6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 14 Notes G x is convolution giving x-gradient G y is convolution giving y-gradient Actual gradient is vector sum of these (See next slide for polar coordinate vector)

15 6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 15 Derivative Magnitude and Direction Can produce gradient vector at each point.

16 6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 16 Computing Gradients Nearest neighbor differencing –Follows the previous definition –Amplifies data noise (no smoothing) Convolution –Uses special kernels –Can do smoothing simultaneously –Rapid computations (parallel processing)

17 6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 17 Sobel Convolutes Kernel for generating G y (Sobel gradient template for y-direction) Kernel for generating G x (Sobel gradient template for x-direction)

18 6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 18 Malvern Calculation Examples Malvern quadrangle Raw elevations pixels 7.5"x7.5" no filtering

19 6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 19 Sobel Edge Sharpening - x-dir Malvern quadrangle Sobel convolute 3 x 3 array x-direction No prefiltering Accentuates features with steep gradient in x-direction

20 6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 20 Sobel Edge Sharpening - y-dir Malvern quadrangle Sobel convolute 3 x 3 array y-direction No prefiltering Note edges of Great Valley are accentuated

21 6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 21 Gradient Vectors (Sobel) Surface gradients calculated from 3x3 Sobel convolutes

22 6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 22 Savitsky & Golay Convolutes Ref: Analytical Chemistry, 36(8), 1627-1639 (1964) 1st derivative convolutes with quadratic smoothing for 7-point computation: h(i)={ -3, -2, -1, 0, 1, 2, 3 } Performs some noise reduction, due to quadratic curve fitting process. Convolution kernel arrays follow:

23 6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 23 Savitsky & Golay Arrays Kernel for generating G y (quadratic smoothing) Kernel for generating G x (quadratic smoothing)

24 6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 24 Malvern Quadrangle (Sav./ Gol.) Surface gradient directions calculated by 7-point Savitsky & Golay convolutes

25 6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 25 Comparison Sobel convolutes –Small arrays (3 x 3) –Some noise remains Savitsky & Golay convolutes –Can use larger arrays (7 x 7 and larger) –More noise reduction

26 6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 26 Spatial Curvature Second derivative Laplacian operator ( ) on image, I(x,y) Must be (Gaussian) filtered to remove noise caused by high-pass characteristics

27 6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 27 Laplace-of-Gaussian Filter

28 6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 28 Laplacian Convolution Kernel

29 6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 29 Laplacian Image Processing Comments: Peaks accentuated Hills steeper Valleys more pronounced

30 6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 30 Accentuated Surface Features

31 6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 31 Comparison NormalLaplacian Note: Laplacian filtered image has more accentuated surface features.

32 6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 32 Discussion


Download ppt "6/4/2016© 2009 Raymond P. Jefferis III Lect 06 - 1 Geographic Information Processing Attribute Plotting Extracting data features Calculating derivatives."

Similar presentations


Ads by Google