Geoscience Reference
In-Depth Information
b
a
Fig. 8.11 h e concept of the Hough transform: a parametrization of lines in the xy -plane, and
b sinusoidal curves in the p ΚΈ parameter space, with the point of intersection corresponding to
the line that passes through two dif erent pixels of an edge feature (modii ed from Gonzales
et al. 2009).
I3 = adapthisteq(I2,'ClipLimit',0.1,'Distribution','Rayleigh');
imshow(I3,'InitialMagnification',30)
Here, ClipLimit limits the contrast enhancement using a real scalar from 0 to
1, with higher numbers resulting in greater contrast; the default value is 0.01.
h e Distribution parameter dei nes the desired histogram shape for the tiles
by specifying a distribution type, such as Uniform , Rayleigh and Exponential .
Using a ClipLimit of 0.1 and a Rayleigh distribution yields good results.
Using the function im2bw then converts the I3 image to a binary image ( I4 ) by
thresholding. If the threshold is 1.0 the image is all black, corresponding to
the pixel value of 0. If the threshold is 0.0 the image is all white, corresponding
to a pixel value of 1. We manually change the threshold value until we get a
reasonable result and i nd 0.55 to be a suitable threshold.
I4 = im2bw(I3, 0.55);
imshow(I4,'InitialMagnification',30)
h e function hough implements the Hough transform, houghpeaks i nds
the high-count accumulator cells in the Hough transform, and houghlines
extracts lines in the original image, based on the other two functions. We
determine the n =15 lines corresponding to the i rst 15 maxima of the Hough
transform and store i t een of the lines (lines 1 to 5, 6 to 10, and 11 to 15) in
three separate variables lines1 , lines2 and lines3 .
[H,theta,rho] = hough(I4);
peaks = houghpeaks(H,15);
Search WWH ::




Custom Search