[IEEE 2009 2nd International Congress on Image and Signal Processing (CISP) - Tianjin, China...

4
A New Method for Automatically Measurement of Vickers Hardness Using Thick Line Hough Transform and Least Square Method Yu Ji Aiwei Xu Standardization and Fundamental Standards Institute Department of Application Software China Jiliang University Zhejiang Dahua Technology Co.,Ltd Hangzhou, Zhejiang Province, China Hangzhou, Zhejiang Province, China [email protected] [email protected] Abstract A new method for automatically analysing the digital image of Vickers hardness test using Thick Line Hough Transform and Least Square method fitting is presented. First, edge detection is implemented to obtain the edge points using Sobel operator. Second, Thick Line Hough Transform is utilized to fit the edge points. We could obtain four regions where the four vertexes are inside by computing the intersections of these thick lines. In every region, edge points are clustered into two classes using Hough Transform, and then Least Square method is used to fit two lines. The intersection point of the two lines in every region is the vertex of indentation. Then the length of the diagonal and the Vickers hardness could be computed. Experiments prove that the proposed method is better than the traditional method. Keywords - Thick line, Hough Transform, Least Square, Vickers hardness 1. Introduction Vickers hardness of the tested material depends on two variables mainly: the intensity of testing force and the average length of the two diagonals of indentation. The key to analyze the hardness value automatically is how to effectively extract out the area of indentation and then get the average length of diagonals. [1] Wavelet analysis method has been used to analyze Vickers hardness indentation and compute Vickers hardness value automatically. [2][3] This method has strong ability of anti-interference, but it assumes that the indentation’s border is consists of straight lines, so error is inevitably brought in because the indentation’s edges are not really straight lines in fact and commonly are curly to a certain extent. Besides, this method is strongly dependent on the relative position of the tested material and the camera, and the sampling direction is directly affected by the position. Considering that the indentation’s edges are almost straight lines in a vicinal area among the indentation’s vertexes, a new method is presented to determine the vertexes using thick line and thin line Hough transform. Thick Line Hough Transform and Least Square method are used to fix the indentation’s vertexes accurately. Then the average length of two diagonals and the value of Vickers hardness are obtained. Experiments prove that the proposed method leads to fast speed, good precision and good repeatability. 2. Principle of Vickers hardness Test Method Vickers hardness testing method is a kind of indentation method. A tetrahedral pyramid whose two opposite plane is at an angle of 136°is pressed on the tested material surface with selected testing force. After keeping a certain moment, the testing force is taken off. There would be an indentation on the material’s surface. Then the average length of two diagonals are computed (see Fig.1). [4] We get Vickers hardness of the tested material by the equation as follows: HV=0.102*2sin136°F/d 2 0.1891F/d 2 (1). Where HV is Vickers hardness value, d is the average length of the indention’s two diagonals, i.e.d1 and d2, F is the testing force whose unit is N. Fig.1 Sketch of Vickers hardness testing method 3. A New Method for Automatically Measurement of Vickers hardness Using Thick Line Hough Transform and Least Square method To get the indentation’s two diagonals we should find its four vertexes firstly. The vertexes should be found easily as long as the four sides of the indentation are recognized. The sides always are not straight lines and commonly they are curly to a certain extent (see Fig.2). If the sides are mistaken for straight lines, much error would be brought in when computing vertexes. 978-1-4244-4131-0/09/$25.00 ©2009 IEEE

Transcript of [IEEE 2009 2nd International Congress on Image and Signal Processing (CISP) - Tianjin, China...

Page 1: [IEEE 2009 2nd International Congress on Image and Signal Processing (CISP) - Tianjin, China (2009.10.17-2009.10.19)] 2009 2nd International Congress on Image and Signal Processing

A New Method for Automatically Measurement of Vickers Hardness Using Thick Line Hough Transform and Least Square Method

Yu Ji Aiwei Xu Standardization and Fundamental Standards

Institute Department of Application Software

China Jiliang University Zhejiang Dahua Technology Co.,Ltd Hangzhou, Zhejiang Province, China Hangzhou, Zhejiang Province, China

[email protected] [email protected] Abstract

A new method for automatically analysing the digital image of Vickers hardness test using Thick Line Hough Transform and Least Square method fitting is presented. First, edge detection is implemented to obtain the edge points using Sobel operator. Second, Thick Line Hough Transform is utilized to fit the edge points. We could obtain four regions where the four vertexes are inside by computing the intersections of these thick lines. In every region, edge points are clustered into two classes using Hough Transform, and then Least Square method is used to fit two lines. The intersection point of the two lines in every region is the vertex of indentation. Then the length of the diagonal and the Vickers hardness could be computed. Experiments prove that the proposed method is better than the traditional method.

Keywords - Thick line, Hough Transform, Least Square, Vickers hardness 1. Introduction

Vickers hardness of the tested material depends on two variables mainly: the intensity of testing force and the average length of the two diagonals of indentation. The key to analyze the hardness value automatically is how to effectively extract out the area of indentation and then get the average length of diagonals.[1] Wavelet analysis method has been used to analyze Vickers hardness indentation and compute Vickers hardness value automatically.[2][3] This method has strong ability of anti-interference, but it assumes that the indentation’s border is consists of straight lines, so error is inevitably brought in because the indentation’s edges are not really straight lines in fact and commonly are curly to a certain extent. Besides, this method is strongly dependent on the relative position of the tested material and the camera, and the sampling direction is directly affected by the position. Considering that the indentation’s edges are almost straight lines in a vicinal area among the indentation’s vertexes, a new method is presented to determine the vertexes using thick line and thin line Hough transform. Thick Line Hough Transform and Least Square method are used to fix the

indentation’s vertexes accurately. Then the average length of two diagonals and the value of Vickers hardness are obtained. Experiments prove that the proposed method leads to fast speed, good precision and good repeatability. 2. Principle of Vickers hardness Test Method

Vickers hardness testing method is a kind of indentation method. A tetrahedral pyramid whose two opposite plane is at an angle of 136°is pressed on the tested material surface with selected testing force. After keeping a certain moment, the testing force is taken off. There would be an indentation on the material’s surface. Then the average length of two diagonals are computed (see Fig.1).[4] We get Vickers hardness of the tested material by the equation as follows:

HV=0.102*2sin136°F/d2≈0.1891F/d2 (1). Where HV is Vickers hardness value, d is the average length of the indention’s two diagonals, i.e.d1 and d2, F is the testing force whose unit is N.

Fig.1 Sketch of Vickers hardness testing method

3. A New Method for Automatically Measurement of Vickers hardness Using Thick Line Hough Transform and Least Square method

To get the indentation’s two diagonals we should find its four vertexes firstly. The vertexes should be found easily as long as the four sides of the indentation are recognized. The sides always are not straight lines and commonly they are curly to a certain extent (see Fig.2). If the sides are mistaken for straight lines, much error would be brought in when computing vertexes.

978-1-4244-4131-0/09/$25.00 ©2009 IEEE

Page 2: [IEEE 2009 2nd International Congress on Image and Signal Processing (CISP) - Tianjin, China (2009.10.17-2009.10.19)] 2009 2nd International Congress on Image and Signal Processing

For overcoming this problem, a new method is presented for automatically analysing the digital image of Vickers hardness test. Concretely speaking, it is composed of several steps as follows:

Fig.2 Vickers hardness indentation

Firstly, Sobel Operator is used to find the points with maximum or minimum difference value in every row of the whole indentation image. These points are edge points of the indentation.

Secondly, Thick Line Hough Transform is utilized to fit the edge points. As mentioned above, the four sides of the indentation are curly to a certain extent, so if we fit the edge points using traditional Hough Transform only, we would get two straight lines on each indentation’s edge (see Fig.3). For overcoming this problem, we present a new test method that is Thick Line Hough Transform, using this method we get one thick line on each edge. This step is called Rough fitting.

Thirdly, the four intersection points of the above four thick lines are computed. In the nearby region of every point, Hough Transform is utilized to clustered edge points into two classes, each class relates to one straight line. And then Least Square method is used to fit two lines, the intersection point of the two lines is one vertex of the indentation. Then we get the four vertexes. Although the four edges of the indentation are curly, but in the small region among every vertex, the edge of indentation could be regarded as straight line. Error could be remarkably decreased by this way. This step is called Precise-fitting.

Fig3. False fitting result

Finally, after calibration, the real length of indentation’s diagonal is gotten, and then we can compute the value of Vickers hardness by using (1). 3.1 Edge detection using Sobel Operator

Each pixel’s difference value in indentation image is computed using traditional Sobel Operator, then we take the points with maximum or minimum difference value in every row of indentation image as the edge points of the indentation. This method insure that the edge’s width is one pixel. By the way, the illumination is important. Too bright or too dark will cause image distortion: too bright makes image shrink and too dark makes image expand. Both will cause inaccurate measurement results. 3.2 The Thick Line Hough Transform for Rough-fitting In pattern recognition field, Hough Transform (HT) is an effective method for fitting line in binary image. As the following equation, L is a straight line in the parameter space. It is expressed as:

ρ=xcosθ+ysinθ, ρ≥0,0≤θ<π (2), where ρ is the distance from origin to the line, θ is intersection angle of L and X-axis. According to (2), different points (X,Y) in L are transformed into a cluster of sinusoid that intersect (with one another) at the point P in parameter space. Obviously, as long as we find point P in parameter space, we would find the straight line in the image. Hough Transform can be expressed as (2).

For Thick Line Hough Transform, we analyse (2) and Fig.4 firstly. For the same θ, when ρ changes, the straight line has parallel movement (i.e., the line moves down when ρ increases and moves up when ρ decreases). We set t as the increment of ρ, namely, when the transform from image space to parameter space occurs, the value of adds t at a time. The parameter t corresponds to the width of the straight line. As shown in Fig.5, the increment of ρ is t, all the points between the two straight lines are included by one thick line (e.g., point1, point2). In this way, we can solve the problem in Fig.3. At the same time, the size of parameter space and the time of computation are reduced.

Fig.4 The traditional Hough Transform for straight

line recognizing

Page 3: [IEEE 2009 2nd International Congress on Image and Signal Processing (CISP) - Tianjin, China (2009.10.17-2009.10.19)] 2009 2nd International Congress on Image and Signal Processing

Fig.5 The Thick Line Hough Transform

3.3 Thick Hough Transform and Least Square Method for Precise fitting Least Square Method is a kind of square approaching algorithm. Its definition is:

∑[yi- (xi)]2=min (3), where (xi,yi) is a known point, φ(x) is the fitting function. Obviously, Least Square method makes sum of squares of distance between known points and the fitting function. There are two problems: one is that if there are many noise points around real edge points, the fitting function has big error. Another is that if the known points are among several lines, the fitting result has no sense. To solve these problems, firstly, we remove the noise points and separate these points separate these points into several groups using Thick Hough Transform. Points in every group correspond to a straight line. Then we fit each line using Least Square method. So, by using this method we resolve two problems above. Meanwhile, we also solve the problem that the fitting is not accurate when using traditional Hough Transform. The process is described as follows: Suppose that the set of points is:

M=(xi, yi)T,

where i=1,2,……s; s is the amount of the points. The points of set M are distributed among several lines. Before doing Thick Hough Transform, we rewrite (2), the new equation is

k = xicos k + yisin k (i=1,2,…,s;k=1,2,…,R) (4). Suppose dk is the threshold according to testing requirement. R is the amount of the lines to be fitted. Then, with points set M and (4), we fit the lines and get their parameters ( k, k). Finally, we find the points set Mk that corresponds to the fitting line whose parameters are ( k, k). Fit the line with Mk using Least Square method. Then we get the accurate position of the line. Here is the second time we use Thick Hough Transform, but is different. At last time it is used to fit the four sides of the indentation, obtain four thick straight lines and the four points of intersection. At this time it is used together with Least Square method to fit the two thick lines in the small area nearby every point of intersection, then, we get two new thin lines which are more accurate, the two new lines intersect at a point that is the vertex. Rough fitting and Precise fitting are shown in Fig.6 and Fig.7.

Fig6. Rough fitting result

Fig7. Precise fitting result

3.4 Calibration To obtain the actual distance between two points in image, we have to calibrate the images. Figure.8 is a ruler’s image acquired by 20x object lens. In this image, each scale represents 10μm. We select two scale lines and get the number of pixels between them, and then we can get the real distance between two adjacent pixels.

Fig.8 A ruler’s image acquired by 20x object lens

4. Experimental Data Using the method mentioned in this article we do the Vickers hardness test of metallic materials with the testing system we designed (see Table.1). In this table the way to obtain covariance S is that: for the same

Page 4: [IEEE 2009 2nd International Congress on Image and Signal Processing (CISP) - Tianjin, China (2009.10.17-2009.10.19)] 2009 2nd International Congress on Image and Signal Processing

indentation, under the same object lens, we move the testing block little at a time then test the Vickers hardness. After doing this 30 times, we get 30 results and 30 images. In every image the position of the indentation is different. Finally, we compute standard deviation. The repeatability of this testing method is 100% and by this method we can get rid of the influence of artificial factors.[5] The data of standard deviation in Table 1 show that the measurement repeatability is good. According to reference [3], the error of wavelet method is as follows:

(5.006 - 4.914) / 4.914 = 0.019 = 1.9% (5). The error of the method proposed in this paper is as follows: (191.1 – 190.9) / 191.1 = 0.001 = 0.1%. (6). So the precision of the proposed method is better.

Table 1 Experiment data

CRM Force

F/N

Diagonal Vickers

Hardness

value

Standard

deviation

734.4

HV5

49.033 112.38 734.4 0.76

433.7

HV5

49.033 146.24 433.6 0.46

191.1

HV5

49.033 220.41 190.9 0.22

5. Conclusion A new testing method for automatically measure-

ment of Vickers hardness using Thick Line Hough Transform and Least Square method is presented and the testing results prove that this method can insure fast testing speed, strong practicability, good precision and repeatability. This method not only can be used in test of Vickers hardness but also can be used in other fields which need to recognize lines and compute the points of intersection.

6. References [1] SugimotoT, KawaguchiT, “Development of an Automatic Vickers hardness Testing System Using Image Processing Technology,” IEEE Transactionson Industrial Electronics, vol.44, no.5, pp.696~702, 1997. [2] Zhou Qu, Yan Guozheng, Zhang Yi, “A New Method for Quickly and Automatically Analysis of the Image of Vickers Hardness Using Wavelet Theory,” ACTA METROLOGICA SINICA, vol.26, no.3, pp.245~248, July 2005. [3] Wu liming, Zhou qu, Deng Yaohua, Zhu Miaoxian, “Automatically Analyzing the Impress Image of Vickers Hardness Test Using Wavelet,” China Mechanics Engineering, vol.15, no.6, March 2004. [4] ISO6507-1.Metalic materials-Vickers hardness test-Part 1: Test method, pp.2, December 2005. [5] Wu Zungao, Measurement System Analysis, pp.23-28, China Metrology Press, 2003.6.