HOME JOURNALS CONTACT

Information Technology Journal

Year: 2012 | Volume: 11 | Issue: 4 | Page No.: 512-515
DOI: 10.3923/itj.2012.512.515
Automatic Positioning of Plastic Sprue Based on Machine Vision
Huang Ying, Pan Qi, Yang Jintao, Zhang Haixiao, Liu Lin, He Zhenhua, Yu Yongquan and Zhang Wenwei

Abstract: A method of automatic positioning of plastic sprue based on Machine Vision has been studied, this method uses morphological operation to segment each part from the workpiece and then recognizes the parts needing to cut by shape matching, finally positions the sprue along the edge of the various parts according to the characteristics of the sprue. This paper uses an improved Canny operator to detect edges of image and Hu moment invariants for shape matching. Through experiments, it proves that the method is feasible and effective and it can position the sprue of the plastic workpiece accurately.

Fulltext PDF Fulltext HTML

How to cite this article
Huang Ying, Pan Qi, Yang Jintao, Zhang Haixiao, Liu Lin, He Zhenhua, Yu Yongquan and Zhang Wenwei, 2012. Automatic Positioning of Plastic Sprue Based on Machine Vision. Information Technology Journal, 11: 512-515.

Keywords: moment invariant, Machine vision, morphological operation, canny operator and sprue positioning

INTRODUCTION

In the production of plastic parts, the general flow is first to let molten plastic distribute by the runner into shape cavity through sprue and then make it to cool, all the while becoming a whole plastic workpiece which parts connect to runner by sprue. When have to use the parts on the workpiece, we must cut down the parts. In traditional manufacturing, the main use of the human eye identification plastic sprue and cut it by hand. This method is simple and feasible, but a great of manpower and resource are used and inefficient.

In order to really automatic cutting the part down from the workpiece by machine, automatic positioning of sprue accurately is extremely important. This paper study a method which based on Machine Vision, Machine vision technology as a non-contact measurement technology, it has such advantages as non-contact, real-time, flexibility, accuracy and reliability, so it is widely used in industrial production and developing rapidly (Sonka et al., 2007).

By means of the characteristic of sprue is thinner than other parts on the workpiece, this paper first detect the edge of the workpiece by improved Canny operator and then make the plastic parts apart from runner by use morphological operation, detect edge of the image one more. Calculate the moment invariant of don’t connected parts graphics of edge graph which processed by morphological operation and compare it with standard part’s moment invariant to determine whether to cut parts. Remove the not parts from the edge graph, add the edge graph treated to the whole edge graph, so there will increase a parts graph line at the sprues than the original edge, this line is the line of cut. Point judgment along the parts border, we can find the line of cut of sprue.

Canny edge operator which used in this paper was proposed based on the optimization algorithms of edge detection operator in 1986, it puts forward three standards so far most strict definition of edge detection, has the very good SNR and precision, therefore, it has been widely used (Canny, 1986). But the filter used in Canny is Gaussian function, which can cause excessive original image smooth, this paper introducing an improved switch median filtering into Canny to achieve edge detection of image. This paper us Hu moment invariant to match parts in the edge image, seven moment invariants was constructed which was based on algebra theory of invariant moments in 1960, this moment invariant have invariance in translation, size and rotation (Ming-Kuei, 1962). The experimental results show that the method mentioned in this paper can position the sprue precise and mark the cutting line of sprue in the graphic.

LOCATION ALGORITHM

The algorithm is divided into the following several steps:

Step 1: Do image binarization of the picture need to process and then use morphological open operation with structural elements on disc. After the treatment, we can get binary image Gb1
Step 2: Detect edge of Gb1 by improved Canny operator proposed in this paper, get a closed edge image Gb1 of the workpiece
Step 3: Have the image Gb1 morphological close operation with structural elements on disc, because of the sprue is thinner than other place on the workpiece, the close operation can disconnect the sprue if the elements is suitable. So, we can get binary image Gb2 in which the parts needed to cut down are disconnect from the runner. And then, detect the edge Ge2 of Gb2
Step 4: Extract each disconnected closed edge in the edge image Ge2 and calculate its Hu moment invariants. And then, calculate the moment distance of the part and standard part to judge whether it is the part need to cut. Move it from the edge image if it isn’t the part need to cut, so can get edge image Ge3 which only contain the parts need to cut down
Step 5: Overlay of Ge3 and Ge1, edge image Ge4 was hence gotten, there have boundary line of parts between parts and sprue, we can location the cutting line of sprue by judge the crossing of parts boundary and sprue

IMPROVED CANNY OPERATOR

The Canny algorithm uses Gaussian filtering on image pre-register smooth processing, Gaussian filter coefficients δ must be determined by human, different Gaussian filter coefficients have a great effect on the effect of the image edge detection, coefficients determined by human is hard to meet the requirements of both of noise smooth and protect the edge information. And in computing image gradient amplitude, it is too sensitive to noise, in actual application of easy to cause the loss of some effective edge details and detect the fake edge, therefore higher requirements for the image smooth processing. This shows, the traditional Canny algorithm Gaussian filtering method of edge detection hard to meet the requirements.

Qing and Ding (2004) proposed a switch median filtering method based on sort of the threshold, this paper will do for its further improvement, replace traditional Canny algorithm with an improved switch median filter which based on direction information and with double threshold noise discriminate function.

Switch median filtering method: Based on the above shortcomings of traditional median filter, this paper introduced a kind of improved switch filter structure. This filter first to judge the monitoring point is noise or not, filtering process it until determines it is noise point. If it is not noise, is not to filter. This method can filter the noise effectively and protect edge information well. The mathematical expression of this filter is:

(1)

Fig. 1: Nine convolution kernel

Judgment of noise point based on directional information: Laplacian fuzzy logical median filter is improved in this paper. In an image, the closer two points is, the gray correlation of them is bigger. Therefore, this paper change the original convolution kernels to the new convolution kernels, in the new convolution kernels, the weights are bigger when the point is closer to the checkpoints. These new kernels also added judgment of four directions. These convolution kernels are shown as shown in Fig. 1.

Then, we compute the minimum of these convolution results and compare it with threshold value T:

(2)

where, kp is the p-th kernel, is convolution algorithm.

This noise judge method considered more neighborhood information of testing point adequately, so it has more strong ability of judgment for salt and pepper noise. Noise is mostly concentrated in the flat part of the image and in order to protect the edge and other information, so this paper use smaller threshold T1 to judge noise in the flat part and use bigger threshold T2 in the other parts.

Judgment of the flat part of the image: First, this paper sort the pixel point in Wn[xij], receive in which:

(3)

Setting threshold Biff formula (4) is satisfied, thinks that this testing point is in the flat area.

(4)

where, b is the position offset of sort.

Output of the filter in this paper: Use 5x5 filtering window in this paper, the boundary pixels of images are can’t filter by the method proposed in this paper, so we filter them by the traditional median filter. The output of the filter in this paper is:

(5)

where, (i,j) is the testing point, (W5)[xij] is the filtering operation use the method proposed in this paper.

Hu moment invariants: Hu moment invariants is a very convenient build field descriptor, it is commonly provided to target recognition and character recognition, etc. Hu first used follow seven moment invariants formula to describe target features:

Ming-Kuei showed that the moment group consist of second order and the third order center specifications moment have invariance in translation, size and rotation, it named Hu moment invariant. This paper use Hu moment invariant to distinguish the runner shape and part shape. Standard part’s Hu moment invariants (φs1s2,...φs7) and the Hu moment invariants of the parts edge in the workpiece (φs1s2,...φs7) needed to positioning were calculated. And then, calculate the moment distance of the parts and standard is:

(6)

Set threshold T, this paper reviews the part is the part needed to cut down if Di < T and keep the part’s edge in the edge image, else it isn’t the part and move the part’s edge from the image.

EXPERIMENTAL RESULT

The 8 bit image (256 gray level image) is used and select filtering switch threshold T1=150, T2=200., there is four parts needed to cut on a runner, experiment environment is matlab 2010a. Set the threshold of moment distance to 9, if the moment distance of the part and standard part is less them 9, the part is need to cut. The experimental result is showed as Fig. 2.

The Hu moment invariants of each parts and the positioning results is showed as Table 1.

Figure 2 shows that the positioning method proposed in this paper can location the cutting line of the sprue precise.

Fig. 2(a-h): Experimental image and the results, (a) standard part, (b) original image, (c) Gb2, (d) Ge1, (e) edge Ge2, (f) edge Ge3, (g) edge Ge4 and (h) positioning result

Table 1: Experimental result

Table 1 shows that use the method of calculate the Hu moment invariants of each parts in the edge image and compare it to the template part’s Hu moment invariants can recognize the part needed to cut down effective. Cutting point 1 and 2 is the positioning result of the sprue, the ligature of the two point is the sprue’s cutting line.

CONCLUSION

This paper proposes an automatic positioning method of plastic sprue based on morphological operation, shape recognition based on Hu moment invariants and a improved Canny operator proposed in this paper. This method detect the edge and do shape recognition after morphological and then, find the cutting points of the sprue along the edge of the part needed to cut. From the experimental result, the method proposed in this paper is feasible and effective, it can positioning the sprue accurately.

ACKNOWLEDGMENTS

This work is supported by 211 Project, Guangdong province, P.R. China, under Grant YueFaGai2009 [432].

REFERENCES

  • Sonka, M., V. Hlavac and R. Boyle, 2007. Image Processing Analysis and Machine Vision. 3rd Edn., CL-Engineering, USA., ISBN-13: 978-0495082521, Pages: 872


  • Canny, J.F., 1986. Collision detection for moving polyhedra. IEEE Trans. Pattern Anal. Mach. Intell., 8: 200-209.
    CrossRef    Direct Link    


  • Ming-Kuei, H., 1962. IRE transactions on information theory. J. IT, 8: 179-187.


  • Qing, P. and R.T. Ding, 2004. Threshold switching median filter. J. Image Graghics, 9: 412-416.

  • © Science Alert. All Rights Reserved