17
Image Image Preprocessing: Preprocessing: Geometric Geometric Correction Correction Jensen, Jensen, 2003 2003 John R. Jensen John R. Jensen Department of Geography Department of Geography University of South University of South Carolina Carolina Columbia, South Columbia, South Carolina 29208 Carolina 29208

Image Preprocessing: Geometric Correction Image Preprocessing: Geometric Correction Jensen, 2003 John R. Jensen Department of Geography University of South

Embed Size (px)

Citation preview

Page 1: Image Preprocessing: Geometric Correction Image Preprocessing: Geometric Correction Jensen, 2003 John R. Jensen Department of Geography University of South

Image Preprocessing: Image Preprocessing: Geometric CorrectionGeometric Correction

Image Preprocessing: Image Preprocessing: Geometric CorrectionGeometric Correction

Jensen, 2003Jensen, 2003Jensen, 2003Jensen, 2003

John R. JensenJohn R. JensenDepartment of GeographyDepartment of Geography

University of South CarolinaUniversity of South CarolinaColumbia, South Carolina 29208Columbia, South Carolina 29208

John R. JensenJohn R. JensenDepartment of GeographyDepartment of Geography

University of South CarolinaUniversity of South CarolinaColumbia, South Carolina 29208Columbia, South Carolina 29208

Page 2: Image Preprocessing: Geometric Correction Image Preprocessing: Geometric Correction Jensen, 2003 John R. Jensen Department of Geography University of South

Geometric Correction Geometric Correction Geometric Correction Geometric Correction

There are two basic types of geometric correction:There are two basic types of geometric correction:* * Image-to-image registrationImage-to-image registration- - useful for registering two or more images together when it is useful for registering two or more images together when it is not necessary to have the interpreted output in a formal map not necessary to have the interpreted output in a formal map

projection. Image-to-image registration may also be used to projection. Image-to-image registration may also be used to perform perform simple non-quantitative change detection.simple non-quantitative change detection.

** Image-to-map rectificationImage-to-map rectification-- Useful when preparing images and interpreted output for presentation Useful when preparing images and interpreted output for presentation in a rigorous map projection using a known geoid and datum. in a rigorous map projection using a known geoid and datum.

Especially valuable when performing digital change detection.Especially valuable when performing digital change detection.

There are two basic types of geometric correction:There are two basic types of geometric correction:* * Image-to-image registrationImage-to-image registration- - useful for registering two or more images together when it is useful for registering two or more images together when it is not necessary to have the interpreted output in a formal map not necessary to have the interpreted output in a formal map

projection. Image-to-image registration may also be used to projection. Image-to-image registration may also be used to perform perform simple non-quantitative change detection.simple non-quantitative change detection.

** Image-to-map rectificationImage-to-map rectification-- Useful when preparing images and interpreted output for presentation Useful when preparing images and interpreted output for presentation in a rigorous map projection using a known geoid and datum. in a rigorous map projection using a known geoid and datum.

Especially valuable when performing digital change detection.Especially valuable when performing digital change detection.

Jensen, 2003Jensen, 2003Jensen, 2003Jensen, 2003

Page 3: Image Preprocessing: Geometric Correction Image Preprocessing: Geometric Correction Jensen, 2003 John R. Jensen Department of Geography University of South

Image-to-MapImage-to-Map Geometric Rectification Geometric Rectification Image-to-MapImage-to-Map Geometric Rectification Geometric Rectification

Image-to-map rectificationImage-to-map rectification requires two basic operations: requires two basic operations:

* * SpatialSpatial Interpolation Using Coordinate Interpolation Using Coordinate Transformation Transformation

** IntensityIntensity Interpolation Interpolation

Image-to-map rectificationImage-to-map rectification requires two basic operations: requires two basic operations:

* * SpatialSpatial Interpolation Using Coordinate Interpolation Using Coordinate Transformation Transformation

** IntensityIntensity Interpolation Interpolation

Jensen, 2003Jensen, 2003Jensen, 2003Jensen, 2003

We will focus our attention on We will focus our attention on image-to-map rectificationimage-to-map rectification because:because:• it is the most widely adopted geometric correction methodology, andit is the most widely adopted geometric correction methodology, and• the image-to-image registration process is very similar.the image-to-image registration process is very similar.

We will focus our attention on We will focus our attention on image-to-map rectificationimage-to-map rectification because:because:• it is the most widely adopted geometric correction methodology, andit is the most widely adopted geometric correction methodology, and• the image-to-image registration process is very similar.the image-to-image registration process is very similar.

Page 4: Image Preprocessing: Geometric Correction Image Preprocessing: Geometric Correction Jensen, 2003 John R. Jensen Department of Geography University of South

Spatial Interpolation Using Coordinate TransformationsSpatial Interpolation Using Coordinate TransformationsSpatial Interpolation Using Coordinate TransformationsSpatial Interpolation Using Coordinate Transformations

ybxbby

yaxaax

210

210

'

'

ybxbby

yaxaax

210

210

'

'

where:where:

x x and and yy are positions in the are positions in the outputoutput-rectified image or map, and -rectified image or map, and x’x’ and and y’y’ represent corresponding positions in the represent corresponding positions in the originaloriginal input input image. image.

where:where:

x x and and yy are positions in the are positions in the outputoutput-rectified image or map, and -rectified image or map, and x’x’ and and y’y’ represent corresponding positions in the represent corresponding positions in the originaloriginal input input image. image.

For moderate distortions in a relatively small area of an image, a For moderate distortions in a relatively small area of an image, a 11stst orderorder, , six-parameter,six-parameter, affine transformationaffine transformation is sufficient to rectify the is sufficient to rectify the imagery to a geographic frame of reference:imagery to a geographic frame of reference:

For moderate distortions in a relatively small area of an image, a For moderate distortions in a relatively small area of an image, a 11stst orderorder, , six-parameter,six-parameter, affine transformationaffine transformation is sufficient to rectify the is sufficient to rectify the imagery to a geographic frame of reference:imagery to a geographic frame of reference:

Jensen, 2003Jensen, 2003Jensen, 2003Jensen, 2003

Page 5: Image Preprocessing: Geometric Correction Image Preprocessing: Geometric Correction Jensen, 2003 John R. Jensen Department of Geography University of South

Spatial Interpolation Using Coordinate TransformationsSpatial Interpolation Using Coordinate TransformationsSpatial Interpolation Using Coordinate TransformationsSpatial Interpolation Using Coordinate Transformations

ybxbby

yaxaax

210

210

'

'

ybxbby

yaxaax

210

210

'

'

This first order transformation can model This first order transformation can model sixsix kinds of kinds of distortion in the remote sensor data, including:distortion in the remote sensor data, including:

• translationtranslation in in xx and and yy,,• scalescale changes in changes in xx and and yy,,• skewskew, and , and • rotationrotation..

This first order transformation can model This first order transformation can model sixsix kinds of kinds of distortion in the remote sensor data, including:distortion in the remote sensor data, including:

• translationtranslation in in xx and and yy,,• scalescale changes in changes in xx and and yy,,• skewskew, and , and • rotationrotation..

Jensen, 2003Jensen, 2003Jensen, 2003Jensen, 2003

Page 6: Image Preprocessing: Geometric Correction Image Preprocessing: Geometric Correction Jensen, 2003 John R. Jensen Department of Geography University of South

How Different Affine Transformations How Different Affine Transformations Fit a Hypothetical SurfaceFit a Hypothetical Surface

How Different Affine Transformations How Different Affine Transformations Fit a Hypothetical SurfaceFit a Hypothetical Surface

Originalsurface

Originalsurface 1st order1st order

2nd order2nd order 3rd order3rd order

Jensen, 2003Jensen, 2003Jensen, 2003Jensen, 2003

Page 7: Image Preprocessing: Geometric Correction Image Preprocessing: Geometric Correction Jensen, 2003 John R. Jensen Department of Geography University of South

Spatial Interpolation LogicSpatial Interpolation LogicSpatial Interpolation LogicSpatial Interpolation Logic

yxy

yxx

)0349150.0()005576.0(130162'

)005481.0(034187.02366.382'

yxy

yxx

)0349150.0()005576.0(130162'

)005481.0(034187.02366.382'

ybxbby

yaxaax

210

210

'

'

ybxbby

yaxaax

210

210

'

'

Jensen, 2003Jensen, 2003Jensen, 2003Jensen, 2003

The goal is to fill a The goal is to fill a matrix that is in a matrix that is in a

standard map projection standard map projection with the appropriate with the appropriate values from a non-values from a non-planimetric image.planimetric image.

The goal is to fill a The goal is to fill a matrix that is in a matrix that is in a

standard map projection standard map projection with the appropriate with the appropriate values from a non-values from a non-planimetric image.planimetric image.

Page 8: Image Preprocessing: Geometric Correction Image Preprocessing: Geometric Correction Jensen, 2003 John R. Jensen Department of Geography University of South

Spatial Interpolation Using Coordinate TransformationSpatial Interpolation Using Coordinate TransformationSpatial Interpolation Using Coordinate TransformationSpatial Interpolation Using Coordinate Transformation

All of the original GCPs selected are usually All of the original GCPs selected are usually notnot used to compute the final used to compute the final six-parameter coefficients and constants used to rectify the input image.six-parameter coefficients and constants used to rectify the input image. There is an iterative process that takes place. First, all of the original GCPs There is an iterative process that takes place. First, all of the original GCPs (e.g., 20 GCPs) are used to compute an initial set of six coefficients and (e.g., 20 GCPs) are used to compute an initial set of six coefficients and constants. The root mean squared error (RMSE) associated with each of constants. The root mean squared error (RMSE) associated with each of these initial 20 GCPs is computed and summed. Then, the individual GCPs these initial 20 GCPs is computed and summed. Then, the individual GCPs that contributed the greatest amount of error are determined and deleted. that contributed the greatest amount of error are determined and deleted. After the first iteration, this might only leave 16 of 20 GCPs. A new set of After the first iteration, this might only leave 16 of 20 GCPs. A new set of coefficients is then computed using the16 GCPs. The process continues coefficients is then computed using the16 GCPs. The process continues until the RMSE reaches a user-specified threshold (e.g., until the RMSE reaches a user-specified threshold (e.g., <<1 pixel error in the 1 pixel error in the x -direction and x -direction and <<1 pixel error in the y-direction). The goal is to remove the 1 pixel error in the y-direction). The goal is to remove the GCPs that introduce the most error into the multiple-regression coefficient GCPs that introduce the most error into the multiple-regression coefficient computation. When the acceptable threshold is reached, the final computation. When the acceptable threshold is reached, the final coefficients and constants are used to rectify the input image to an output coefficients and constants are used to rectify the input image to an output image in a standard map projection as previously discussed.image in a standard map projection as previously discussed.

All of the original GCPs selected are usually All of the original GCPs selected are usually notnot used to compute the final used to compute the final six-parameter coefficients and constants used to rectify the input image.six-parameter coefficients and constants used to rectify the input image. There is an iterative process that takes place. First, all of the original GCPs There is an iterative process that takes place. First, all of the original GCPs (e.g., 20 GCPs) are used to compute an initial set of six coefficients and (e.g., 20 GCPs) are used to compute an initial set of six coefficients and constants. The root mean squared error (RMSE) associated with each of constants. The root mean squared error (RMSE) associated with each of these initial 20 GCPs is computed and summed. Then, the individual GCPs these initial 20 GCPs is computed and summed. Then, the individual GCPs that contributed the greatest amount of error are determined and deleted. that contributed the greatest amount of error are determined and deleted. After the first iteration, this might only leave 16 of 20 GCPs. A new set of After the first iteration, this might only leave 16 of 20 GCPs. A new set of coefficients is then computed using the16 GCPs. The process continues coefficients is then computed using the16 GCPs. The process continues until the RMSE reaches a user-specified threshold (e.g., until the RMSE reaches a user-specified threshold (e.g., <<1 pixel error in the 1 pixel error in the x -direction and x -direction and <<1 pixel error in the y-direction). The goal is to remove the 1 pixel error in the y-direction). The goal is to remove the GCPs that introduce the most error into the multiple-regression coefficient GCPs that introduce the most error into the multiple-regression coefficient computation. When the acceptable threshold is reached, the final computation. When the acceptable threshold is reached, the final coefficients and constants are used to rectify the input image to an output coefficients and constants are used to rectify the input image to an output image in a standard map projection as previously discussed.image in a standard map projection as previously discussed.

Jensen, 2003Jensen, 2003Jensen, 2003Jensen, 2003

Page 9: Image Preprocessing: Geometric Correction Image Preprocessing: Geometric Correction Jensen, 2003 John R. Jensen Department of Geography University of South

Spatial Interpolation Using Coordinate TransformationSpatial Interpolation Using Coordinate TransformationSpatial Interpolation Using Coordinate TransformationSpatial Interpolation Using Coordinate Transformation

22origorigerror yyxxRMS 22

origorigerror yyxxRMS

where:where:xxorigorig and and yyorigorig are are the are are the originaloriginal row and column coordinates of the GCP in row and column coordinates of the GCP in

the image and the image and x’x’ and and y’y’ are the are the computed or estimatedcomputed or estimated coordinates in the coordinates in the original image when we utilize the six coefficients. Basically, the closer these original image when we utilize the six coefficients. Basically, the closer these paired values are to one another, the more accurate the algorithm (and its paired values are to one another, the more accurate the algorithm (and its coefficients). The square root of the squared deviations represents a measure coefficients). The square root of the squared deviations represents a measure of the accuracy of each GCP. By computing of the accuracy of each GCP. By computing RMSRMSerrorerror for all GCPs, it is for all GCPs, it is

possible to (1) see which GCPs contribute the greatest error, and 2) sum all possible to (1) see which GCPs contribute the greatest error, and 2) sum all the the RMSRMSerrorerror..

where:where:xxorigorig and and yyorigorig are are the are are the originaloriginal row and column coordinates of the GCP in row and column coordinates of the GCP in

the image and the image and x’x’ and and y’y’ are the are the computed or estimatedcomputed or estimated coordinates in the coordinates in the original image when we utilize the six coefficients. Basically, the closer these original image when we utilize the six coefficients. Basically, the closer these paired values are to one another, the more accurate the algorithm (and its paired values are to one another, the more accurate the algorithm (and its coefficients). The square root of the squared deviations represents a measure coefficients). The square root of the squared deviations represents a measure of the accuracy of each GCP. By computing of the accuracy of each GCP. By computing RMSRMSerrorerror for all GCPs, it is for all GCPs, it is

possible to (1) see which GCPs contribute the greatest error, and 2) sum all possible to (1) see which GCPs contribute the greatest error, and 2) sum all the the RMSRMSerrorerror..

A way to measure the accuracy of a geometric rectification algorithm A way to measure the accuracy of a geometric rectification algorithm (actually, its coefficients) is to compute the Root Mean Squared Error (actually, its coefficients) is to compute the Root Mean Squared Error ((RMSRMSerrorerror) for each ground control point using the equation:) for each ground control point using the equation:

A way to measure the accuracy of a geometric rectification algorithm A way to measure the accuracy of a geometric rectification algorithm (actually, its coefficients) is to compute the Root Mean Squared Error (actually, its coefficients) is to compute the Root Mean Squared Error ((RMSRMSerrorerror) for each ground control point using the equation:) for each ground control point using the equation:

Jensen, 2003Jensen, 2003Jensen, 2003Jensen, 2003

Page 10: Image Preprocessing: Geometric Correction Image Preprocessing: Geometric Correction Jensen, 2003 John R. Jensen Department of Geography University of South

Characteristics of Ground Control Points Characteristics of Ground Control Points Characteristics of Ground Control Points Characteristics of Ground Control Points

Point Point NumberNumber

Order of Order of Points Points

DeletedDeleted

Easting on Easting on MapMap

X1X1

Northing on Northing on MapMap

Y1Y1

X’ pixelX’ pixel Y’ PixelY’ Pixel Total RMS Total RMS error after error after this point this point deleteddeleted

11 1212 597120597120 3,627,0503,627,050 150150 185185 0.5010.501

22 99 597,680597,680 3,627,8003,627,800 166166 165165 0.6630.663

……....

2020 11 601,700601,700 3,632,5803,632,580 283283 1212 8.5428.542

Total RMS error with Total RMS error with allall 20 GCPs used: 20 GCPs used: 11.01611.016

If we delete If we delete GCP #20, GCP #20,

the RMSE the RMSE will be will be 8.452 8.452

If we delete If we delete GCP #20, GCP #20,

the RMSE the RMSE will be will be 8.452 8.452

Page 11: Image Preprocessing: Geometric Correction Image Preprocessing: Geometric Correction Jensen, 2003 John R. Jensen Department of Geography University of South

Image-to-Map Geometric Rectification Image-to-Map Geometric Rectification Image-to-Map Geometric Rectification Image-to-Map Geometric Rectification

Intensity InterpolationIntensity Interpolation::

• Unfortunately, geometric correction algorithms rarely Unfortunately, geometric correction algorithms rarely direct us to go to an integer row and column in the original direct us to go to an integer row and column in the original imagery (e.g., row 2, column 2) to get a brightness value to imagery (e.g., row 2, column 2) to get a brightness value to fill a location in the rectified output image. Rather, the fill a location in the rectified output image. Rather, the location is usually a floating point number (e.g., column 2.4, location is usually a floating point number (e.g., column 2.4, row 2.7). Therefore, intensity interpolation algorithms row 2.7). Therefore, intensity interpolation algorithms (often referred to as (often referred to as resamplingresampling) are used to obtain a ) are used to obtain a brightness value from the desired location in the original brightness value from the desired location in the original image and then place this value in the output matrix. image and then place this value in the output matrix.

Intensity InterpolationIntensity Interpolation::

• Unfortunately, geometric correction algorithms rarely Unfortunately, geometric correction algorithms rarely direct us to go to an integer row and column in the original direct us to go to an integer row and column in the original imagery (e.g., row 2, column 2) to get a brightness value to imagery (e.g., row 2, column 2) to get a brightness value to fill a location in the rectified output image. Rather, the fill a location in the rectified output image. Rather, the location is usually a floating point number (e.g., column 2.4, location is usually a floating point number (e.g., column 2.4, row 2.7). Therefore, intensity interpolation algorithms row 2.7). Therefore, intensity interpolation algorithms (often referred to as (often referred to as resamplingresampling) are used to obtain a ) are used to obtain a brightness value from the desired location in the original brightness value from the desired location in the original image and then place this value in the output matrix. image and then place this value in the output matrix.

Jensen, 2003Jensen, 2003Jensen, 2003Jensen, 2003

Page 12: Image Preprocessing: Geometric Correction Image Preprocessing: Geometric Correction Jensen, 2003 John R. Jensen Department of Geography University of South

Image-to-Map Geometric Rectification Image-to-Map Geometric Rectification Image-to-Map Geometric Rectification Image-to-Map Geometric Rectification

There are several There are several intensity interpolationintensity interpolation (resampling)(resampling) algorithms, including algorithms, including::

* * Nearest NeighborNearest Neighbor

** Bilinear Interpolation Bilinear Interpolation

** Cubic Convolution Cubic Convolution

There are several There are several intensity interpolationintensity interpolation (resampling)(resampling) algorithms, including algorithms, including::

* * Nearest NeighborNearest Neighbor

** Bilinear Interpolation Bilinear Interpolation

** Cubic Convolution Cubic Convolution

Jensen, 2003Jensen, 2003Jensen, 2003Jensen, 2003

Page 13: Image Preprocessing: Geometric Correction Image Preprocessing: Geometric Correction Jensen, 2003 John R. Jensen Department of Geography University of South

Nearest-Neighbor Resampling Nearest-Neighbor Resampling Nearest-Neighbor Resampling Nearest-Neighbor Resampling

The brightness value closest to the predicted The brightness value closest to the predicted x’x’, , y’y’ coordinate coordinate is assigned to the output is assigned to the output x,yx,y coordinate. coordinate.

The brightness value closest to the predicted The brightness value closest to the predicted x’x’, , y’y’ coordinate coordinate is assigned to the output is assigned to the output x,yx,y coordinate. coordinate.

Jensen, 2003Jensen, 2003Jensen, 2003Jensen, 2003

Page 14: Image Preprocessing: Geometric Correction Image Preprocessing: Geometric Correction Jensen, 2003 John R. Jensen Department of Geography University of South

Bilinear Interpolation Bilinear Interpolation Bilinear Interpolation Bilinear Interpolation

Assigns output pixel values by interpolating brightness values in two Assigns output pixel values by interpolating brightness values in two orthogonal direction in the input image. It basically fits a plane to the orthogonal direction in the input image. It basically fits a plane to the 44 pixel values nearest to the desired position (pixel values nearest to the desired position (x’x’, , y’y’) and then computes a new ) and then computes a new brightness value based on the weighted distances to these points. For brightness value based on the weighted distances to these points. For example, the distances from the requested (example, the distances from the requested (x’x’, , y’y’) position at 2.4, 2.7 in the ) position at 2.4, 2.7 in the input image to the closest four input pixel coordinates (2,2; 3,2; 2,3;3,3) are input image to the closest four input pixel coordinates (2,2; 3,2; 2,3;3,3) are computed . Also, the closer a pixel is to the desired computed . Also, the closer a pixel is to the desired x’,y’x’,y’ location, the location, the more weight it will have in the final computation of the average. more weight it will have in the final computation of the average.

Assigns output pixel values by interpolating brightness values in two Assigns output pixel values by interpolating brightness values in two orthogonal direction in the input image. It basically fits a plane to the orthogonal direction in the input image. It basically fits a plane to the 44 pixel values nearest to the desired position (pixel values nearest to the desired position (x’x’, , y’y’) and then computes a new ) and then computes a new brightness value based on the weighted distances to these points. For brightness value based on the weighted distances to these points. For example, the distances from the requested (example, the distances from the requested (x’x’, , y’y’) position at 2.4, 2.7 in the ) position at 2.4, 2.7 in the input image to the closest four input pixel coordinates (2,2; 3,2; 2,3;3,3) are input image to the closest four input pixel coordinates (2,2; 3,2; 2,3;3,3) are computed . Also, the closer a pixel is to the desired computed . Also, the closer a pixel is to the desired x’,y’x’,y’ location, the location, the more weight it will have in the final computation of the average. more weight it will have in the final computation of the average.

4

12

4

12

1

k k

k k

k

wt

D

DZ

BV

4

12

4

12

1

k k

k k

k

wt

D

DZ

BVwhere where ZZkk are the surrounding four data point values, are the surrounding four data point values,

and and DD22kk are the distances squared from the point in are the distances squared from the point in

question (question (x’x’, , y’y’)) to the these data points. to the these data points.

where where ZZkk are the surrounding four data point values, are the surrounding four data point values,

and and DD22kk are the distances squared from the point in are the distances squared from the point in

question (question (x’x’, , y’y’)) to the these data points. to the these data points.

Jensen, 2003Jensen, 2003Jensen, 2003Jensen, 2003

Page 15: Image Preprocessing: Geometric Correction Image Preprocessing: Geometric Correction Jensen, 2003 John R. Jensen Department of Geography University of South

Bilinear InterpolationBilinear InterpolationBilinear InterpolationBilinear Interpolation

Jensen, 2003Jensen, 2003Jensen, 2003Jensen, 2003

Page 16: Image Preprocessing: Geometric Correction Image Preprocessing: Geometric Correction Jensen, 2003 John R. Jensen Department of Geography University of South

Cubic Convolution Cubic Convolution

Assigns values to output pixels in much the same manner as bilinear interpolation, except that the weighted values of 16 pixels surrounding the location of the desired x’, y’ pixel are used to determine the value of the output pixel.

Assigns values to output pixels in much the same manner as bilinear interpolation, except that the weighted values of 16 pixels surrounding the location of the desired x’, y’ pixel are used to determine the value of the output pixel.

16

12

16

12

1

k k

k k

k

wt

D

D

Z

BV

16

12

16

12

1

k k

k k

k

wt

D

D

Z

BVwhere Zk are the surrounding four data point values, and D2

k are the distances squared from the point in question (x’, y’) to the these data points.

where Zk are the surrounding four data point values, and D2

k are the distances squared from the point in question (x’, y’) to the these data points.

Jensen, 2003Jensen, 2003Jensen, 2003Jensen, 2003

Page 17: Image Preprocessing: Geometric Correction Image Preprocessing: Geometric Correction Jensen, 2003 John R. Jensen Department of Geography University of South

Cubic ConvolutionCubic ConvolutionCubic ConvolutionCubic Convolution

Jensen, 2003Jensen, 2003Jensen, 2003Jensen, 2003