Printer Friendly

High points recognition method of scraped surface based on background subtraction.

1. Introduction

In traditional scraping processing, features of the high points are recognized by human eye and measured by very simple tools after the operation, such as position, contour, density distribution and so on. It needs the workers to be highly skilled and the results could be influenced by many human factors. Furthermore, workers repeat the detection process every time after scraping. The process is cumbersome and labor intensive, thus severely restricts the quality and efficiency of scraping, and limits its application and promotion [1]. Therefore, research on automatic quality inspection of scraped surface is an important way to improve the quality and efficiency of the scraping.

There are several researches have been done on high points recognition methods of the scraped surface. Yoshimi and Hirotaka have developed a CCD image system which identifies high points to scrape by applying thin coats of marking compounds to specimen surface [2], [3]. Wen Yuh Jywe et al. proposed a non-contact laser-based measurement system for evaluation of the scraping workpiece quality, which use the laser beam to scan the surface in order to measure the depth of the scraping spots. Then the 2 1/2D and 3D data of the scraping workpiece is obtained [4], [5].

The works above obtain the message of high points by direct analysis of the scraped workpiece surface. It is difficult in features extraction and there are many interference factors in the methods. In order to get accurate, clear high points characteristic features, the present study proposes a high points recognition method of scraped surface based on background subtraction. With C++ programming language and computer vision library OpenCV, software was developed. High points are recognized and marked after a series of image processing. The experiments show that the method has well high points recognition ability wit high efficiency and good stability.

2. Image acquisition

Experimental workpiece material is cast iron whose surface has already been scrapped. Engineer's blue is prepared by mixing Prussian blue with a non-drying oily material [6]. Firstly, the workpiece surface is cleaned, and an image is taken by a CCD camera, shows as Figure 1. Secondly, the colored oil is brushed onto a standard ruler surface evenly, and the workpiece is then rubbed against the ruler. The transfer (by contact) of the pigment indicates the position of high points on the workpiece. Then Figure 2 is shot by the same CCD video camera in the same position, light and other photography conditions.

3. Digital image processing

The flowchart of image processing for obtaining the high points information is shown in Figure 3. Firstly, Figure 1 and Figure 2 are grayed. Secondly, target image is obtained by the background subtraction method (subtracting Figure 1 from Figure 2). Thirdly, remove most of impulse noises in the target image using a median filter algorithm. It minimizes the effect on the result of subsequent processing and improves inspection quality. To further eliminate noise and smooth the boundary lines of contours, morphological operation is often helpful. Fourthly, negative image obtained using the negative transformation, and contours in the image are drawn. Finally, recognize and mark the high-point center positions.

3.1 Graying and Background subtraction

In image processing, the first step is to convert a color image into a gray image which can significantly reduce the image data, simplify the follow-up processing and greatly improve processing speed. And the gray image can preserve information about the workpiece surface before and after rubbing well.

Background subtraction is commonly used in the motion detection. It can detect special area and segments from the difference between the current image and the background image [7]. It is generally able to provide the most complete feature data, especially if the camera is fixed and the objects of a scene remain static. Therefore, it is particularly suitable for scraping quality inspection what this paper mentioned.

The image before rubbing and the image after rubbing are denoted by h(x, y) and f(x, y) respectively. The difference g(x, y) is obtained by computing the difference between all pairs of corresponding pixels fromf and h, as Equation (1).

g(x y) = f (x y) - h(x y) (1)

binary target image R(x, y) obtained by background subtraction, expressed as Equation (2).


Where T is a specified threshold.

The graying of Figure 1 and Figure 2 and the subsequent background subtraction process are shown in Figure 4.

3.2 Median filtering

Observe image (e) in Figure 4 carefully, there are many noises in the image and the noise probability density function (PDF) accords with PDF of impulse noise described in Equation (3).


Neither [p.sub.a] nor [p.sub.b] is zero, noise values appear as black (pepper) or white (salt) points in the target image, just as salt and pepper granules randomly distribute over the image.

Median filter is nonlinear spatial filter. For certain types of random noise, median filter provides excellent noise-reduction capabilities [8]. It is particularly effective in the presence of impulse noise because of its appearance as white and black dots superimposed on an image.

In the realization process, a 3 x 3 neighborhood of a point [g.sub.p] is considered. The neighbor point values [s.sub.xy] = {[g.sub.1],[g.sub.2], ..., [g.sub.9]} are sorted and the median value [g.sub.i] is determined. Then, [g.sub.i] is assigned to the point [g.sub.p]. After every point in the image being processed as above, the noise-removal processing for the whole image has been accomplished. The output of 2D mid-value filtering can be computed using the expression as Equation (4).

[??](x, y) = median {g(s, t), (s, t) [member of] [s.sub.xy]} (4)

Where g (s, t) is the target image, and [??](x,y) is the image of median filtering.

The result image after median filtering is illustrated in Figure 5.

3.3 Morphological filtering

When working with grayscale image of complex surface contours, however, several of the more useful operations can be handled by morphological processing. Two important morphological operations are given: opening and closing, they can form a morphological filter [9], [10]. In the case, morphological processing is simply the closing of Figure 5, followed by an opening of the result. The aim of these two operations is to remove noises and to reduce the distortion as possible.

3.4 High points recognizing and marking

The contours which cvFindContours () function in OpenCV found are two types, exterior "contours'" and "holes", and exterior boundaries of the white regions are exterior "contours" and exterior boundaries of the black regions are "holes". If image negatives method isn't used, the result of contour finding is wrong. So image negatives operation is carried out before contour finding and drawing. There are some black discontinuous regions within contours and strong noise points in exterior domain after image negatives operation. So an area threshold is given to fill the noise regions during contour finding and drawing.

The processed output image is shown in Figure 6.

It is noted that the colored oil paste may cover a portion of the surrounding area of each high-point contour and connect the vicinal contours. This yields excessively large contact areas [11]. According to production experience, the high-point contours in the contact areas should be recognized and marked respectively. For example, Figure 7(a) and (b) both have one colored region, (a) is determined to be the presence of one high-point regions, but (b) should be determined to be the presence of two high-point regions. In Figure 7, the black line is the contour of colored regions and the dark dots denote the central point of high points.

Mathematical morphology is a non-linear image processing and analysis theory. It can handle gray image and binary image [12]. And it is especially suitable for image shape analysis. This paper uses opening to break narrow isthmuses, so that the high points can be recognized and marked automatically. Figure 8 shows a cross shaped structuring element of 3 x 3 size pixels (the dark pentagram denotes the origin of the element).

High points recognition and mark algorithm based on mathematical morphology.

(1) Perform one or two morphological opening operations on the image to break narrow isthmuses.

(2) Judge whether the contour is close to shapes defined by processing functions. The shapes are the minimal rectangle that will bound your contour and the ellipse that is the best approximation to the contour.

(3) If the area of a contour reaches the defined threshold value of the minimal rectangle that will bound your contour and it reaches the defined threshold value of the ellipse that is the best approximation to the contour, mark the contour and remove it from the contours sequence. If no contour reaches the defined threshold value, you need to perform steps 2 and do nothing else.

(4) Performs morphological opening operations on the image again. The number of iterations will be added one at the time when the cvMorphologyEX() function is called.

(5) Repeat steps 2 and 4 until the processing for all contours is complete.

The result of the processing is shown in Figure 9.

4. Conclusions

Aiming at the necessity to develop the technology of auto-scraping, this paper proposes a high points recognition algorithm. The algorithm mainly uses background subtraction and morphological opening to recognize and mark the high points of the scraped surface. The result shows that the proposed method is reasonable, reliable, and has a high practicability. However, there are still some details need to be further optimized and improved in the algorithm.

The wide application of auto-scraping system to engineering practice

will greatly improve manufacturing precision and production. High point auto-recognition technology of scraped surface is one of the key problems of auto-scraping research, and is a very important research direction.

Received: 18 September 2012, Revised 10 November 2012, Accepted 18 November 2012

5. Acknowledgements

This work was supported by "the Fundamental Research Funds for the Central Universities" of China (12CX04056A).


[1] Li, XP., Sun, LL., Liu, YH. (2012). Status of auto-scraping research and analysis of its development. Manufacturing Technology & Machine Tool, (7) 97-100.

[2] Yoshimi, T., Masafumi, S., Tetsuya, Y. et al. (1986). The recognition of bearings by means of a CCD line sensor and the automation of scraping works. Journal of the Japan Society of Precision Engineering, 52 (12) 2087-2092.

[3] Hirotaka, T., Ryuta, Y., Akira, K. et al. (2005). Development of an automatic scraping machine with recognition for bearing of scraped surfaces (3rd report): construction of automatic scraping machine. Journal of the Japan Society for Precision Engineering Supplement Contributed papers, 71 (3) 358-362.

[4] Jywe, W. Y., Wang Hongshu, Bo-Wei Chen. et al (2009). Scraping-workpiece detection device and technology development. The Chinese Society of Mechanical Engineers, the 26th National Conference on Mechanical Engineering.

[5] Hsieh, T. H., Jywe, W. Y., Huang, H. L. et al. (2011). Development of a laser based measurement system for evaluation of the scraping workpiece quality. Optics and Lasers in Engineering, 49 (8) 1045-1053.

[6] Engineer's blue, %27s_blue

[7] Su LK, Huang JH. (2011). Background Extraction of Color Video Based on the Frame-Difference. Journal of Cheng Du University of Information Technology, 25 (2) 167-171.

[8] Gary Bradski, Adrian Kaehler. (2009). Learning OpenCV Tsinghua University Press.

[9] Gonzalez, R. C., Woods, R. E. (2003). Digital image processing 2nd Ed. Publishing House of Electronics Industry, p. 517-561.

[10] Wang, HF., Zhan, GL., Luo, XM. (2009). Research and application of edge detection operator based on mathematical morphology. Computer Engineering and Applications, 45 (9) 223-226.

[11] Kuang-Chao Fan, Jingsyan Torng, Wenyuh Jywe. (2011). 3-D measurement and evaluation of surface texture produced by scraping process. Measurement, 45 (2012) 384-392.

[12] Lu, JF., Yang, JY., et al. (2000). Design of a separating algorithm for overlapping cell images. Journal of Computer Research & Development, 37 (2) 228-232.

Xiaopeng Li, Leilei Sun, Yonghong Liu

College of Mechanical Engineering

China University of Petroleum

Qingdao, Shandong 266580


Author Biographies

Xiaopeng Li was born in Heze City, Shandong Province, China, May 6th, 1978. He received his PhD degree in Mechanical Design and Theory from China University of Petroleum in 2007. Currently, he is an associate professor in College of Electromechanical Engineering in China University of Petroleum. His recent research interest is auto-scraping technology.

Leilei Sun was born in Jining City, Shandong Province, China, July 19, 1987. He received his BS degree in Mechanical Manufacture from Yantai University, Shan Dong, China, in 2011. Currently, he is a postgraduate in College of Electromechanical Engineering, China University of Petroleum. His recent research interest is auto-scraping technology.

Yonghong Liu was born in Xiaoxian City, Anhui Province, China, June 24, 1965. He received his PhD degree in Mechanical Manufacture from Harbin Institute of Technology, Harbin, China, in 1996. Currently, he is a professor and doctoral supervisor in College of Electromechanical Engineering, China University of Petroleum. His research fields include electrical discharge machining of engineering ceramics, expansion sand screen for sand control and control system of subsea drilling equipments.
COPYRIGHT 2013 Digital Information Research Foundation
No portion of this article can be reproduced without the express written permission from the copyright holder.
Copyright 2013 Gale, Cengage Learning. All rights reserved.

Article Details
Printer friendly Cite/link Email Feedback
Author:Li, Xiaopeng; Sun, Leilei; Liu, Yonghong
Publication:Journal of Digital Information Management
Article Type:Report
Date:Apr 1, 2013
Previous Article:Exception detection for web service composition using improved Bayesian network.
Next Article:Structure optimization of ladle bottom based on finite element method.

Terms of use | Privacy policy | Copyright © 2019 Farlex, Inc. | Feedback | For webmasters