• 沒有找到結果。

Morphological Contrast Enhancement

2.4 Mathematical Morphology

2.4.4 Morphological Contrast Enhancement

In addition to the operations discussed earlier in connection with the removal of small dark and bright artifacts, dilation and erosion often are used to compute the morphological contrast enhancement of an image, denoted g:

f b f

g =( " )!( 0b). (2- 27)

Fig. 2- 14shows the actions of morphological contrast enhancement. Fig. 2- 15 shows the result of computing the morphological contrast enhancement of the image shown in Fig. 2- 13(a). As expected, the morphological contrast enhancement highlights sharp gray-scale transitions in the input image. The morphological contrast enhancement is sensitive to the shape of the chosen structuring element. As such, the adaptive structuring element has been

30

important filter for our proposed method.

Fig. 2- 14 Morphological contrast enhancement filter

Fig. 2- 15 Morphological contrast enhancement of the image in Fig. 2- 13(a) (a)

f

(b) b

f ! b

(c)

f ! b

(d)

!

( f " b) # ( f 0b)

!

( f " b)

!

( f " b)

!

( f 0b)

2.4.5 Morphological Hit-or-Miss Transform

The morphological hit-or-miss transform is a basic tool for shape detection. We introduce this concept with the aid of Fig. 2- 16 which shows a set

! indicates the original sets, whereas the shading in Fig. 2- 16 (d) and (e) indicates the result of morphological operations. The objective is to find the location of one of the shapes, say,

!

X. Let the origin of each shape be located at its center of gravity. Let

!

X be enclosed by a small window, W. The local background of

! which is needed later. Fig. 2- 16 (d) shows the erosion of

!

A by

!

X (the dashed lines are included for reference). Recall that the erosion of

!

X is completely contained in A. Interpreted another way, A 0

!

X may be viewed geometrically as the set of all locations of the origin of X at which X found a match (hit) in A. Keep in mind that in Fig. 2- 16

!

A consists only of the three disjoint sets

! 16 (d) and (e) that the set of locations for which exactly fits inside

! intersection is precisely the location sought. In other words, if

! We can generalize the notation somewhat by letting B = (B1, B2), where B1 is the set formed from elements of B associated with an object an B2 is the set of elements of B associated with the corresponding background. From the preceding discussion, B1 = X and B2 = (W " X).

32

AB = (A 0B1) ∩ (Ac 0 B2). (2- 29) Thus, set

!

A B contains all the (origin) points at which, simultaneously, B1 found a match (“hit”) in , the another is, dilation and erosion are duals of each other with respect to set

complementation and reflection, is defined as

!

(A0

!

B)c= Ac " B# (2- 31)

By using the definition of set the differences given in Eq. (2-30) and the dual relationship between erosion and dilation given in Eq.(2-31), we can write Eq.(2-29) as

A ○ B = (A0B1 ) – (A ⊕

!

B"2). (2- 32) The reason for using a structuring element B1 associated with objects and an element B2

associated with the background is based on the aseemption that two or more objects are distinct only if they form disjoint (disconnected) sets. This is guaranteed by requiring that each object have at least a one-pixel-thick background around it. In some applications, we may be interested in detecting certain patterns(combinations) of 1’s and 0’s within a set, in which case a background is not required. In such an instance, morphological hit-or-miss transform reduces to simple erosion. As indicated previously, erosion is still a set of matches, bur without the additional requirement of a background match for detecting individual

objects.

Y

X

Z

Y

A = X∪Y∪Z

Origin

!

(W " X)

Ac Θ (W - X)

(c) (d)

A c

(A0X)

(a) (b)

34

Fig. 2- 16 (a) Set

!

A. (b) A window,

!

W, and the local background of

!

X with respect to

!

W,

!

(W " X). (c) Complement of A. (d) Erosion of A by X. (e) Erosion of

!

Ac by

!

(W " X). (f) Intersection of (d) and (e), showing the location of the origin of

!

X, as desired.

(A Θ X) (A

c Θ (W – X))

(f)

CHAPTER 3 The Proposed Method

3-1 The System Structure

In this chapter we propose a method, which combines morphological hit-or-miss transform and local thresholding. Our objective in this thesis is to propose a method for improving the resolution of a GPR Image. The wave energies reflect non-metallic pipes and are weaker than reflected by metallic pipes when we grasp images by using Penetrating Radar Equipments, thus these images are transformed worse than pipe images.

Aiming at this kind of images, we propose a parabola-shape partial image segmentation way through the comparison of other image enhancement methods. The GPR images we adopt in this thesis are all obtained by SIR-2 GPR system experiments. The flowchart is as follows:

36

Fig. 3- 1 Overview of our proposed method GPR Image: *.dzt

Grey-value Image: 8-bit

Binary Image: Threshold

Detect object:

Morphological Hit-or-Miss Transform Cluster

Object Situation

Compare object’s size

Create Parabola Model

Double Refection Wave Have Noises

Local Enhancement Image

Recover Original Image Filter

In this section, we first introduce properties GPR images. Generally, there are two kinds of underground pipes. One is metal series, including iron pipes in general, which can result in clear hyperbola images when images are transformed because they can reflect higher energy waves. The other is non-metallic series, including plastic pipes made of PVC and PE

materials, which result in more easily weak hyperbola images when images are transformed because they reflect weaker waves than metal pipes. Fig. 3- 2 shows three typical hyperbolas, the signal of IRON pipe is stronger than those of PVC and PE pipes. In the thesis we will focus on the enhancement of PVC and PE pipe images. Because the pipe images obtained by experiments are in shapes of hyperbolas, in the thesis we will attempt to develop an image processing method based on this point.

Fig. 3- 2 Three typical kinds of hyperbolas. From left to right are IRON、PVC and PE

First of all, we try to explain hyperbolas as shown in Fig. 3- 2. From the Fig. 3- 3 it may note that only IRON pipes can grasp complete hyperbolas; otherwise, the hyperbolas caused by PVC and PE pipes have been broken. When the threshold value is lowered, the hyperbolic object can’t be separated from background, the gray values of non-metallic pipe (PVC,PE) image are very similar with background’s. In Fig. 3- 3 (h) we can find that PVE and PE pipes with low contrast have histograms that will be narrow and will be centered toward the middle of the gray scale. IRON pipe images in general are clearer, so it is easily to know the position of pipes when experts compare with them with others. While PVE and PE pipes are much more easily affected by image surrounded and noise, it may cause us investigate the wrong

IRON PVC PE

38

(a) (b) (c)

(d) (e) (f)

(g) (h) (i)

Fig. 3- 3 (a)-(c) The IRON、PVC、PE PIPE images (d)-(f) The binary image with threshold value: 139、130、131,range with [0,255] (g)-(i) The histogram.

Traditionally, image enhancement methods are worked in spatial domain. We have discussed five main methods for PVC and PE GPR images, which are Prewitt, Sobel,

Laplacian, Morphological contrast enhancement, and Histogram Equalization. Fig. 3- 4 shows the effect of different image processing. First, we mask the positive hyperbola with the red circles in Fig. 3- 4(b), where we can see the enhanced hyperbola is stronger than the original one. From these pictures it is apparent that IRON has well effect for this methods, on the another hand, in Fig. 3- 4 (a) and (e)strengthens little the effect and thus makes PVC and PE images clearer, but the positive hyperbola still is similar with the background in gray value; in Fig. 3- 4 (c) through (d) PVC and PE pipe images are weak when using Prewitt and Sobel. In Fig. 3- 4(e), Morphological contrast enhancement enhances the PE pipes well, the more

significant effect than others. However, it is still weak in PVC pipes. Above methods are not still sturdy. Last of all, it has the remarkable effect when using Histogram equalization (Fig.

3- 4(b)). In these ways, PE pipes have good effects. However, when the whole image is strengthened, the noise is strengthened at the same time in the GPR images. If we don’t denoise it well, weakened hyperbola may easily be eliminated. Therefore, enhancing the whole image does not necessarily optimize the image.

Finally, the GPR image’s histogram shows that it is the low contrast image and shows the GPR image belongs unimodal histogram. On PE and PVC pipes, the hyperbolas are close to background in gray value, it is a question to separate them that we’ll discuss.

(a) (b)

(c) (d)

(e) (f)

Fig. 3- 4 (a) Laplacian operator (b) Histogram equalization (c) Prewitt operator

40

Then we use the same procedure to process another image. First of all, as in Fig. 3- 5(a), two places which have been circled are hyperbolas. The same as in Fig. 3- 5(c), two hyperbola which have been marked with red lines. This is a high contrast and weak image and the pixels value is also similar to background, we found that we cannot separate hyperbolas from

background by using threshold: 136(Fig. 3- 5). And it is still the same situation after using other spatial domain image enhancement method. We hope get the clear hyperbola which has the more difference from background, that help experts easy to distinguish it. Above image enhancement methods can’t satisfy us. In Fig. 3- 4(e), we found the result of morphological contrast enhancement method is fairly good than other traditional methods. Analysis these two images, Fig. 3- 4 belongs to unimodal histogram, but gray levels of histogram of Fig. 3- 5 distributes averagely, object edge is not clear and the image is high contrast, too. Under the condition of Fig. 3- 4, using histogram equalization can produce significant and desirable effect. If using the other 4 methods stated above, image in Fig. 3- 4 can produce the results better than that in Fig. 3- 4, but they still can be improved. This is because that the histogram of Fig. 3- 4 is narrow and the histogram of Fig. 3- 4 is wide. So using histogram equalization can’t get fairly good effect. So, in Fig. 3- 4 can obtain better result than in Fig. 3- 5 using other methods stated above. It is because it has clearer edge in Fig. 3- 4. Meanwhile, Fig. 3- 5 actually cannot achieve desirable result adequately from either method above. In a weakened image, we usually face the problems of hyperbola being similar to the background in gray value, and mistrial problem due to noise image. We introduce hyperbola model to produce regional area to process hyperbolic object, in order to help the experts to distinguish images and solve the above problems. Thus, if we can get the local histogram that only formed by the hyperbola pixels, we don’t care pixels of the background.

(a) (b)

(c) (d)

(e) (f)

(g) (h)

Fig. 3- 5 (a) The original image with two hyperbola (b)The binary image with threshold value:136 (c) Laplacian operator (d) Histogram equalization (e) Prewitt operator

(f) Sobel operator (g) Morphological contrast enhancement (h) The histogram

42

3-2 Image Processing Technique

3-2-1 Hard Thresholding

The images in this thesis are gray-value images of 8-bit. Gray value is the only reference.

Since the hyperbola always looks similar to the surrounding information, it is not easy to generalize, from the histogram’s distribution, a suitable way for manual threshold value determination. Using the other methods to determine the threshold value [8] can’t be

appropriately applied to this thesis. Hence, we decide the threshold value by manually setting it, then processed hard thresholding on the image, in order to get the primary shape of the image. We found that the threshold values being set are mostly range at about 130 gray levels, which is a fairly good reference value for us to do the trimming , minimizing the potential adjustment range. That will be helpful in automatic threshold value determination. Finally, we still have to decide whether the term to choose the threshold value can retain the hyperbola.

Fig. 3- 6 shows that threshold value range at about 128-135 only. When threshold value is 128, the PVC and PE connected with each other ; when the threshold value is 130, we can get the hyperbolas; when the threshold value is 135, the PVC hyperbolas disappear.

(a) (b)

(c)

Fig. 3- 6 Binary images for difference hard thresholding value: 128,130,135, and this red circles mean invisible object and the red rectangle mean the object location.

3-2-2 Morphological Hit-or-Miss Transform

Traditionally, if hoping to use morphological hit-or-miss transform to find the correct object location, the object must match the structured element totally. But due to the fact that the shapes of hyperbola we’re looking for are not alike totally. We provide two parameters to hit or miss percentage, namely, hit percentage and miss percentage, respectively. And use the corresponding threshold value to trim the proportion of the threshold value and to get the object location of appropriate hyperbola feature. We observe certain amount of the hyperbola, and find out the most frequently exist the hyperbolic radian, in order to use them in designing 2 structured elements of morphological hit-or-miss transform. In Fig. 3- 7, the subset of blue number (no.1) is the hit structuring element and the subset of red number (no.2) is the miss structuring element, finally, the subset of white number (no.0) is don’t care.

In the GPR images, we can regard hyperbola as parabola and same as our structuring elements. The parabola equation is y =m(x! p)2 +q, m is the slope that is used to change the curve rate. If m is big, the parabola shape is steep, on the other hand, if m is smaller, the parabola shape is flat. According to different GPR images, we can also change the structuring element size. In Fig. 3- 8, we can see how the structuring element matches the hyperbola. The hyperbolas always have peak, this shape is the hyperbola feature. According to the feature, we can find the locations of hyperbolas.

44

(a) (b)

(c) (d)

Fig. 3- 7 These structuring elements of morphological hit-or-miss transform

Fig. 3- 8 The hyperbola location marked with red point

3-2-3 Object Detection

In this section, we’ll discuss how to remove the wrong object. First, we introduce GPR images formation theory。Illustrating at Fig. 3- 9,when the radar wave hit the pipes, the instrument will get the reflections of the signals, thus, recording the signal waves. A complete wave will have both positive (180o) and negative (!180o) poles. Hence, when the waves transform to GPR gray-value images, the both positive and negative poles, respectively, obtain an corresponding images. And this pair of hyperbola is the pipe image feature, one is high brightness hyperbola, another is low brightness hyperbola. When the morphological hit-or-miss transform find the wrong object location, we classify them to two types: (1) noise:

even though some noises match the morphological hit-or-miss transform structuring element, but their shapes or size will very different from the correct hyperbola. We measure the rectangle size and the areas for all objects that were found out by morphological hit-or-miss transform. (2) similar hyperbola: there are two common conditions that usually exist, one is , the pipes are beneath the Alarming-band, while the Alarming-band is shallowly beneath the surface of ballast; while the other one, when the double reflection happens on the wave, there would occur one or more similar hyperbola images right under its hyperbola. Fig. 3- 10 (a) shows that a photo has a Alarming-band and a pipe, we let the red double-arrowhead mean the pipe direction. In Fig. 3- 10(b) shows that the feature image of the surface of ballast is two almost straight and energetic straps. Since pipes are not necessarily buried very close to the surface of ballast, when there occur the similar hyperbolic image, we’ll consider it as alarming-band, and determine that it is not the pipe. In Fig. 3- 10(c) there are two similar hyperbola images under the correct hyperbola, so we also regard them as the wrong objects.

This similar hyperbola is the double reflection waves.

46

Fig. 3- 9 No.1 is the positive pole wave and high brightness hyperbola;

No.2 is the negative pole wave and the low brightness hyperbola

(a)

(b) (c)

Fig. 3- 10 (a) A photo has a alarming-band which was circled by red circle and has a pipe was marked by a red line that show the piped direction (b) A alarming-band is similarly to hyperbola under the ballast surface (c) There are two double reflection waves under the correct hyperbola

wave

A pipe

1 2

(1)

(2)

Alarming-band

pipe

Surface of ballast

3-2-4 The Parabola Model

For easy to enhancement the object images, we building up a parabola model by parabola formula:y=m(x! p)2 +q, for ( qp, ) is the parabola apex. For getting the parabola model, we only have three coordinates: two apexes(x1,y1),(x2,y2) and a through point(x3,y3)(see Fig. 3- 11 (a)). When the m is the unknown parameter, the formula is : 2

)

(x2 y2 x3 y3 . First, we measure the parameter m, then substitution back the parabola formula to get the parabola line. Due to two lines cross on one point (Fig. 3- 11 (b)), so we get the full the parabola model (Fig. 3- 11(c)) and the local area. Also shown in the Fig. 3-

11(e)-(f), we can not only separate hyperbola from background but also enhancement the hyperbola images. Our proposed processing procedures is effectively applied on the low contrast GPR images. More experimental results and comparisons are shown in Chapter 4.

48

CHAPTER 4 Experimental Results

In this chapter, we will present more experimental results and comparisons obtained by applying the proposed method described in chapter 3. In section 4.1, we will introduce our experiment environment. Experimental results and comparisons are shown in section 4.2.

4.1 Experimental Environment

Our experimental environment is Mac OS 10.4 on a PowerBook compatible PC with a PowerPC G4 1.67GHz CPU and 1.5 gigabytes RAM. The program was developed in the MATLAB language and the version under MATLAB R14. The GPR data form is *.dzt which is the 8-bit digital form. If this data size is

!

M " N, the start point of the image pixels of this data is from

!

(m + 2,n + 2) to (m,n). Thus, we can translate it to gray scale images save as

*.bmp form. All of our research data is come from the Kun-Fal Li researcher of Chinese petroleum corporation. These GPR images acquired from the GPR system of SIR-2, in Table 4- 1and Table 4- 2 shows the SIR-2 system function. These two table are just only to refer.

Table 4- 1 The SIR-2 SYSTEM function SIR-2 SYSTEM

Pre-processing software yes

Display model Color、gray-value、 Curve models

Working time All day

Transmit rate 2-64KHZ

Scan Rate 8-64

Antenna 15-2500MHZ, more than 20 kinds of antenna Software Develop by itself for the GPR system

Number of Stacks 0-32768

Immediately show Yes

Working environment -25℃~60℃ Humidity 100﹪

Table 4- 2 The U.S. GRP antenna function table.

Function 900MHz 400MHz 200MHz 70MHz 35MHz

Types Model 3101D Model 6103 Model 5106 SUBECHO -70 SUBECHO -40 Central

Frequency 900MHz 400MHz 200MHz 70MHz 35MHz

Wave 1ns 2.5ns 5ns 15ns 30ns

Max explore

depth 0~1.5m 3~5m 5`8m 8~15m 15~30m

Min detection

object 4cm 8cm 16cm 40cm 80cm

Size 8*18*33cm 30*30*17cm 60*60*30 cm 120*15*26 cm 200*15*26 cm

Weight 2.3 Kg 5 Kg 20.5 Kg 4 Kg 5 Kg

In the thesis, we verify our method by making experiments on three test cases. In the following we’ll introduce details. We chose four different strength energies of images in the experiment, which is carried out in different situations, including the first situation with the same number of hyperbolas but different strength are in Fig. 4- 1(a) and (b); the second situation with images obtained from one, two and three pipes shown from Fig. 4- 1(b) to (d) and the third situation with low and high contrast of the weak images.

(a) (b)

50

In Fig. 4- 1, we named images (a) through (c) as Image1-4, and there are four images with the

!

110 " 216,

!

172 "112,

!

109 " 393,

!

48 "129 sizes, respectively. In Fig. 4- 1(a) and (c), from left to right, there are three hyperbolas that are IRON, PVC and PE respectively. In Fig. 4- 1(b), it has only one PVC hyperbola. Fig. 4- 1(d), from left to right, there are two hyperbolas that is the PVC hyperbola. All of above are weak images, but image2 and image3 are the low contrast images and image1 and image4 are the high contrast images. We’ll show their histograms in Fig. 4- 2, respectively. Image1 and imag4 have wide histograms; Imag2 and image3 have narrow histograms.

(a) (b)

(c) (d) Fig. 4- 2 The histograms of experiment images.

Image1 have the stronger double reflection waves under itself’s hyperbola. Image4 has a

Image1 have the stronger double reflection waves under itself’s hyperbola. Image4 has a

相關文件