A simple Java application is described that allows a SAR image to be analysed for its
most prominent line segments.
The application takes as input a SAR image (GIF or JPEG), and processes it in the
following steps:
- Converts the image to greyscale
- Convolves a "Mexican Hat" Laplacian transform across the greyscale image,
yielding a new image with prominent (high intensity) edge features
- Converts the "edge" image into a Hough space for straight lines
- Orders the Hough space elements in decreasing intensity
- Selects the first N of these elements, which correspond to the N most prominent
edges in the original image
- Converts the N lines into the coordinate system of the original image
Example output for the Ang Kor Wat Temple SAR image is shown below:

- The original image appears top left
- The image after conversion to greyscale is show top right
- The greyscale image after application of the Mexican Hat operator
- The discovered lines are shown overlayed on the original image in yellow in the bottom
right
The application takes a single argument: the name of the input image. An example
sessions is shown below:
J:\Filter>java FilterTest AngKorWat.jpg
Source Image "AngKorWat.jpg"
Size 451x431 pixels
Processing image ...
Convert to greyscale
Apply Mexican Hat convolution
Find lines using Hough Transform
Processing image ...
Convert to greyscale
Apply Mexican Hat convolution
Find lines using Hough Transform
Line 1 Gradient=1.158511150443029 Intercept=-92.02852338314678
Line 2 Gradient=-0.634619297544148 Intercept=284.8814140433867
Line 3 Gradient=1.064891840324791 Intercept=-52.70638015634025
Line 4 Gradient=1.376381920471173 Intercept=-173.918393270269
Line 5 Gradient=-0.9792723507257844 Intercept=429.2396458848719
Line 6 Gradient=-0.7590413130521095 Intercept=332.1741728458583
Line 7 Gradient=0.8272719459724748 Intercept=-7.80432184613749
Line 8 Gradient=-0.4203612930881973 Intercept=221.78273747142552
Line 9 Gradient=1.0648918403247913 Intercept=0.0
Line 10 Gradient=0.7590413130521091 Intercept=15.0988260384481
Line 11 Gradient=-1.064891840324792 Intercept=500.7106114852326
Line 12 Gradient=0.5773502691896262 Intercept=90.2667900869007
Line 13 Gradient=-0.7590413130521095 Intercept=430.31654209577096
Line 14 Gradient=-0.7590413130521095 Intercept=362.37182492275446
Line 15 Gradient=-2.014486937091586 Intercept=852.0243510521631
Finished
The source code.
Julian Bunn, February 1999.
|