TMCnet News

Image Based Computer-Aided Manufacturing Technology [Sensors & Transducers (Canada)]
[April 22, 2014]

Image Based Computer-Aided Manufacturing Technology [Sensors & Transducers (Canada)]


(Sensors & Transducers (Canada) Via Acquire Media NewsEdge) Abstract: Image based manufacturing technique is a novel manufacturing method, which is combine of machining technique and machine vision technique. By using the technique, machine tools can perform cutting process according to what they see, which is very like that the machine tool is equipped with "eyes". In this paper, some researches of author about the subject are proposed, and key techniques are included. Construction of image based manufacturing system is introduced briefly. The geometrical model is then built from the image information, in which process shape from shading with adaptive pro-processing method is used. After the model is built, cutting path is planed, and two cutting paths, line cutting and contour cutting, are conducted. NC programs are generated automatically, and machining process is then performed. Finally a prototype system named ImageCAM is introduced. Algorithms developed in our research are verified in the system. Copyright © 2013 IFSA.



Keywords: Image processing, Bitmap, Line cutting method, Contour cutting method, Layer cutting method, Shape from shading (SFS).

(ProQuest: ... denotes formulae omitted.) 1. Introduction Although geometrical modeling techniques is widely used in product developing and manufacturing process, some product surface can not still be described with CAD model. In this situation, the method is required to transform the surface information into CAD model, which can be processed with CAD/CAM software. Reverse engineering (RE) can get surface date and transform the data into CAD model, but some special measurement machines are required in RE process. The measurement machines are generally expensive, and measurement process will be time consuming. When only a picture of the product can be obtained, general RE technique can not perform copping process. This is the time, when machine vision based RE system is required which can extract three dimension information from one or more pictures of a product, and transform the information into geometrical model that CAD system can accept which is subject researched in the paper.


The objective of machine vision is to make computer percept three dimension environment information through two dimension picture, which can detect not only geometric information of object, but also shape, position, motion of the object. Basis of machine vision comes from image processing, model identification, and artificial intelligence [1], Machine vision based manufacturing technique is combination of machine vision technique and manufacturing technique. By using machine vision, three dimension information of object is extracted, geometric model of the object is built, CNC program is generated and machining is conducted. How to get three dimension of object and built its three dimension model are important points of machine vision based manufacturing technique. Prospect of machine vision based manufacturing technique is realizing integration of measurement, modeling, and manufacturing process, which is very like equipping "eyes" to machine tools, and making machine tools to cope the object they see.

Development of machine vision technology gives solid basis to our research. SFS method [2, 3] is an important method in machine vision research. References [4-6] develop and improve SFS method, make machine vision more precision. References [7,8] discus the boundaries between surfaces, making the curve surface smoother. But there will be much work to do for machining a work-piece depending only image of an object.

Machine vision based manufacturing technique is one of advanced manufacturing techniques, which is integration of image processing, CNC technique, machining technique, and can be used in such areas as reverse engineering, fast prototype of product, manufacturing of work of art.

2. Machine Vision Based Manufacturing System Construction of machine vision based manufacturing system is shown in Fig.l, which consists of camera, image processing card, computer, and a machine tool. The camera is used to take the picture of the object which would be coped. The image processing card is used to do some preprocessing of the picture. The task of computer is to build the geometrical model of the surface, get tool path and generate CNC program. The program is transferred to CNC machine tool, with which workpiece is machined. The process is also called three dimension copying. The number of cameras depends on the machine vision method used in the system. For multiple eyes vision system, more than one camera may be used. One eye machine vision method is used in author's research, so that there is only one camera in the system.

Single eye machine vision is a simple one of machine vision techniques, and also main method with which three-dimension information can be extracted from picture. Recovering three-dimension shape from simple picture is called shape from shading (SFS). SFS method is used to get threedimension information from picture in this research.

SFS method is first proposed by Horn [9], which is main algorithm in machine vision getting three dimensions from camera and is based on the fact that the change of direction of surface leads to the change of gray degree in the picture of the surface. SFS method is an algorithm which can extract three dimensions information from a few pictures of the object, especially from one picture of the object.

SFS method develops very fast in recent years, and is being applied in many fields including industry. Main algorithms of SFS consists of recovering three dimensions information using sheltered boundary [10], recovering three dimensions information from normal direction of surfaces [11], and recovering three dimensions information from orthogonal polynomials [12].

Based on above researches, a new algorithm is proposed in the paper, by which three dimensions information can be recovered more precision than previous method.

3. Modeling of Work-Piece 3.1. Extracting Three-Dimension Information from a Picture In desired condition, grey of image will meet reflection map equation: ... (1) where ... is the normal direction of surface, z = z(x, y) is the equation of surface, (ps,qs ) is the direction of light source, /(x, y ) is the grey of image. Shape from shading is then calculating normal direction of surface (p,q)from grey of image /(x,y). In order to solve the ill-character of reflection map equation, regulation method of depth continue is used. Global optional function is constructed: ... (2) First item of the equation comes from Eq. (1), which means difference between actual grey value I(x, y) and the one calculated from normal parameter p and q. Regulation condition can be expressed with continue constrain condition F(p,q) as: ... (3) Because (p,q,l)r is the normal direction of object surface, the value of Eq. (3) is the change rate of normal line direction. Therefore the smaller the value of second item in Eq. (2), the smoother of object surface is. The (x, y) in Eq. (2) is discrete coordinate of image, and summation region is a part of the image, in which all points are corresponding to the continue surface on same object.

Our target is to get p(x,y) and q(x,y) which make the value of Eq. (2) the minimum. Making derivation of E in Eq. (2) to each p{x, y) and q{x, j) , and letting the derivation be zero, recursive formula of p and q will be derived: ... (4) ... (5) where pt+i,qt+\ are the values of p and q in t+ Ith time recursion, and p,(x,y) , qt(x,y) are the average values of p and q in the neighbor region of (x,y) in t'h time recursion.

... (6) ... (7) By using the recursive formula, three-dimension coordinate of an object can be calculated. This algorithm is based on continue surface, therefore recovered result is accurate only for single continue surface, for example, in Fig. 2. But for non-continue part on an object as the connecting part between two surface patch, recovered result will be very poor [13], for example, in Fig. 3. The reason is that total surface consists of several patches, although each patch is continuing, but boundary between the patches is not continued. It dose not meet the condition of above algorithm.

At the boundary, normal direction of surface patches change greatly. Refraction of light makes grey values on neighbor patch are very close, and shape distortion of recovered surface takes place on the part. In order to solve the problem, SFS with adaptive pre-processing algorithm is developed in author's research.

3.2. SFS Algorithm with Adaptive Pre-processing If the attenuation character of light intensity is strengthened, the change of grey degree will increase, and recovered surface will be more like the sample surface. The main points of the algorithm is that the image is divided into some patches firstly, which is continue inside the patch, and non-continue between the patches. Then grey degree of each patch is reduced according to some rules. And last, sample surface is recovered from pre-processed patches. It is proved that surface recovered from pre-processed patches is more accurate than that recovered from original image.

In order to simplify the problem, pre-processing of the image is turned into one dimension problem, and calculating process is performed line by line. Following is pre-processing procedure: 1) Parameter initialization including threshold value of grey degree ( GREY), windows threshold value (FLAG), and counter(N).

2) Reading in a line of the image, comparing grey degree of each point at the line with the GREY. If it is greater than GREY, counter N plus one, until it is smaller than GREY.

3) If the grey degree of a point is smaller than GREY, counter N is compared with windows threshold FLAG. If it is smaller than FLAG, N pixels are processed, otherwise turning to step (2) until the end of the line.

4) Scanning next line, until total image is processed.

If the GREY and FLAG are selected properly, process result will be perfect after one scan. If some light green are there at edge of the image, middle value wave filtering may be needed. After the processing, higher quality geometrical model can be built, as shown in Fig. 4. High quality geometrical model is the bases if high quality CNC code.

33. CNC Programming Using Approximation Method of Polygon Cutting path can be derived through train code tracing to object image contour, then using adaptive including box (AIB) algorithm or approximation method of polygon. AIB method can eliminate effect of noise and get correct contour of work piece, which has been elaborated in reference [14]. Approximation method of polygon has higher precision, is the method used in this paper to generate CNC code. Information in image is of redundancy, approximation method of polygon can be used to descript a contour, which descriptions a curve contour with a polygon. In order to get proper approximating effect, an error index Emax is used to measure degree of approximation.

As shown in Fig. 5, assuming curve from A to B is approximated with line segment AB, letting (*i > Ti Mx2 > T2 ' > (xjv ' Tv ) be coordinate of points on curve, di (/ = 2, * * *, N -1) be distance from (x., y. ) to line segment AB, we have: ... (8) Procedure of using approximation method of polygon is as following: 1) Determining start point of cutting path Px , finding point /5max that is furthest point to Px on the path. The two points divide the path into two segments.

2) Letting initial position of Pm is Pmax , starting from Px , traversing curve from Px to Pm , find point Pi that has maximum error Emax.

3) If Em" is greater than permitting error, let Pi be new Pm and turn to step (2).

4) Otherwise, Pi is a vertex of polygon, Px Pi is a line segment, line CNC code (G01) is generated. Letting Pi be new Px, and Pmax be new Pm, turn to step (2).

5) When Pi is of coincidence to Pmax, the contour from Px to Pmax is processed. The contour from Pmax to P\ can be processed in same way.

4. Machining Example Machine vision based manufacturing technique can be used to machine 2-D curve or 3-D curved surface. For 3-D curved surface, uncut chip is cut out layer after layer. Each layer is a plane curve with same z coordinate. In layer cutting method, 3-D machine can be turned into 2-D machining, therefore only plane cutting is discussed. This method is often called 2.5 axes machining in engineering. After geometrical model is built, CNC Programming process of layer cutting is as following: 1) Determining cutting depth, which is distance between layers. Value of cutting depth is relevant with material of work piece, cutting tool material, and machining requirement.

2) Determining height of cutting layer, which is z coordinate of cutting path of a cutting layer.

3) Calculating the intersection region of the cutting plane and the curve surface which may be a single region or several islands, each of which has their lose boundary.

4) Determining cutting path in 2-D region. Machining can be performed with line cutting or circle cutting algorithm. There are some existing algorithm can be referenced.

After tool path is generated, NC code for special machine tool can also be generated with post proposing program for the machine tool.

A prototype system ImageCAM has been developed in order to prove the algorithm of the paper, which can perform total process of machine vision based manufacturing including pre-processing of image, modeling of work piece, cutting path planning, and NC program generating. CNC system used in the research is SKY2000-I, developed by SKY Co., which is based on Windows platform. The system has 32 bits CPU, supports normal netware, and Chinese operating interface, which is widely used in medium and small machine shops. Fig. 6 is the machining parameters input interface of ImageCAM.

Fig. 7 show the four main stages of machining a water pot from a picture. Fig. 7 (a) is the orignal bitmap of the water pot. Fig. 7 (b) is the three dimensions model built from Fig. 7 (a), this is the most important step of machine vision based manufacturing process. Precision of machining depends greatly on the quality of the model. Fig. 7 (c) is the tool path of the work-piece, line cutting method is adapted in the research. Fig. 7 (d) is the work-piece machined in wax material.

5. Conclusions Machine vision based manufacturing technique is a part of intelligent manufacturing technology, which can find its application in many engineering regions, for examples, in fast prototype manufacturing, reverse engineering, handcraft manufacturing, etc.

Some key techniques are researched in the paper. Pre-proposing method is proposed, by which high quality image can be gotten, combining with middle value filter, therefore machine quality can be improved. Approximation method of polygon can be used to generate tool path very fast. Prototype system ImageCAM can perform total process of machine vision based manufacturing including pre-processing of image, modeling of work piece, cutting path planning, and NC program generating. Which proves the algorithms of the paper is feasible.

Some problems are still to be researched for the technique to be used in engineering. Most important of the problems is precision of the geometrical model of work piece. Simple and precision modeling algorithm are still looked for ward to.

References [1]. Ambarish G. Mohapatra, Computer vision based smart lane departure warning system for vehicle dynamics control, Sensors & Transducers, Vol. 132, Issue 9, September2011,pp. 122-135.

[2] . Q. Zheng, R. Chellappa, Estimation of illumination direction, albedo, and shape from shading, IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 13, Issue 7, 1991, pp. 680-702.

[3] . J. Oliensis, Shape from shading as a partially well-constrained problem, CVGIP: Image Understanding, Vol. 54, Issue 2,1991, pp. 163-183.

[4] . Takayuki Okatani, Koichiro Deguchi, Shape reconstruction from an endoscope image by shape from shading technique for a point light source at the projection center, Computer Vision and Image Understanding, Vol. 66, Issue 2, 1997, pp. 119-131.

[5] . P. Dupuis, J. Oliensis, Shape from shading: provably convergent algorithms and uniqueness results, in Proceedings of the European Conference on Computer Vision (ECCV'94), Stockholm, Sweden, 1994, pp. 259-268.

[6] . K. M. Lee, C.-C. J. Kuo, Shape from shading with a linear triangular element surface model, IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 15, Issue 8, 1993, pp. 815-822.

[7] . R. Kimmel, A. M. Bruckstein, Global shape from shading, Computer Vision and Image Understanding, Vol. 62, Issue 3,1995, pp. 360-369.

[8] . I. Shimshoni, R. Kimmel, A. M. Bruckstein, DIALOGUE, Global shape from shading, Computer Vision and Image Understanding, Vol. 64, Issue 1, 1996, pp. 188-189.

[9] . B. K. P. Horn, Obtaining shape from shading information, in shape from shading, MIT Press, Cambridge, MA, 1989, pp. 123-171.

[10] . Jin-Hua Sheng, A three-dimensional image processing system shape from shading, Pattern Recognition & Artificial Intelligence, Vol. 4, Issue 4, 1991, pp. 46-52.

[11] Ma Songde, Zhang Zhengyou, Computer Vision, Science press, Beijing, 1998, pp. 194-208.

[12] . Bang-Hwan Kim, Rae-Hong Park, Shape from shading and photometric stereo using surface approximation by legend polynomials, Computer Vision and Image Understanding, Vol. 66, Issue 33, 1997, pp. 255-270.

[13] . He Bin, Ma Tianyu, Wang Yunjian et al., Visual C++ data image processing, People Post Press, Beijing, 2001, pp. 5-8.

[14] . Jia Xicun, 3-D copy technique based on machine vision, Master Thesis, Yahanshan University, 2003.

1 Zhanqi HU,2 Xiaoqin ZHANG,2 Jinze LI,1 Wei LI 1 College of Mechanical Engineering, Yanshan University, Qinhuangdao, Hebei, 066004, China 2 Mechanical and Electrical Engineering College, Hebei Normal University of Science and technology, Qinhuangdao, Hebei, 066004, China 1 Tel.: 0335-8057031, fax: 0335-8074783 E-mail: [email protected] Received: 19 August 2013 /Accepted: 25 October 2013 /Published: 30 November 2013 (c) 2013 International Frequency Sensor Association

[ Back To TMCnet.com's Homepage ]