Image Processing of Surface in Cad/Cam Applications

Abstract Because of difficulty of Reconstructing 3D surface from the 2D captured images in terms of getting a higher resolution compared with the original surface so it has been adopted treatment of surface images after reconstructing the surface by of assembling all 2D images and apply various filters to get the surface closest to the original surface of the sample under test. Various ways have been applied such as Laplacian and Median. It has been found that Median operator gave the best treatment to the surface where it was adopted to find the toolpath through the surface points for the purpose of machining using a CNC milling machine.


Introduction
The Model acquisition of three dimensional models is still very active area of research in the field of computer vision. The key of that model is how to reconstruct it from just two dimensional images [1].
Reverse engineering (RE) is the process of extracting knowledge or design information from anything man-made [1] .In reverse engineering that stand for existing product then used CAD to create a model create it. Using CAD model allows to manipulate the model with added modification or reproduction design aspect of the product.
It's also known as a process or duplication of components that existing by using physical dimensions by capturing. Reverse engineering is undertaken so as to redesign the system with better maintainability or to produce a clone of a system without change or access the main design which is produced [2].
Reverse engineering can also be defined as an approach that's employed in several domains like electrical engineering, computer sciences and lots of others. The most object of RE is that the associate degree analysis of an existing product (that will be a software package application, a mechanical product) so as to provide a reproduce associate degree/or an improved release of this one [3].
We tried to use image processing to find out the axis points of a contour of any surfaces in order to machine it. This paper depends of RE to machine the contour of any surface by capturing a 2D image of the surface then finding the points of the contour using image processing technique and creating the toolpath with a appropriate program or drawing the contour using Auto cad or Inventor software, then creating a toolpath using a special program supplement with the machine.

-Image Processing
Image processing can be define as a technique that promote the raw image received from cameras/sensors placed on satellites, area probes and craft or footage taken in traditional daily life for numerous applications [4].
Digital image process is associate degree ever increasing and dynamic space with applications reaching out into our standard of living like medication, area exploration, authentication, surveillance, automated industry inspection and lots of areas. Applications like these involve completely different processes like image enhancement and object detection [5].
An image is also referred as a two-dimensional function f (x,y), where x and y are spatial coordinates, and therefore the amplitude of (f ) at any combine of coordinates (x , y) is named the intensity or grey level of the image at the same point. When x, y, a n d the amplitude values of (f) are finite, separated quantities, we can tend to decide the image a digital image. The fields of study of digital image process indicate to the process of a digital image by uses digital computer. Hence, a digital image consists of a finite variety of elements, every of that contains an explicit location and value [6].
"These parts are representing picture elements, image elements, peels, and pixels. Pixels are that the term used generally to denote the weather of a digital image [7].

-Median filter
Median filter is used firstly to disappear or take away the noise, though it should even be used for special applications. The enhancement filter highlights edges and details at intervals the image spatial filters are implemented with involution masks. As a result of convolution mask operation provides a result that's a weighted total of the values of a pixel and its neighbors, it's referred to as a linear filter. Overall effects the convolution mask will be predicated primarily based the final pattern [8] The basic median filter is the standard median filter. In this mod, a square window of size 2k+1, where k goes from 1 to N, is used to filter the center pixel. The pixels in the window are first sorted and the center pixel is changed to the median value of the sorted sequence ( fig.1 illustrates a 3 x 3 sampling window). This mod is the simplest of the median filtering techniques and because of its simplicity; it has been used for a long time.
The median filter is also a sliding-window spatial filter, but it exchanges the center value in the window with the median of all the pixel values in the window. As for the mean filter, the kernel is usually square but can be any shape [8]. The median filter works by moving through the image pixel by pixel, exchanging each value with the median value of neighboring pixels.

Laplacian Filter
The Laplacian filter is an example of a 2nd order or the 2nd derivative method of enhancement. It is particularly good at finding the fine detail in an image. Any feature with a sharp discontinuity (like noise, unfortunately) will be enhanced by a Laplacian filter. Therefore, one application of a Laplacian filter is to restore fine detail to an image that has been smoothed to remove noise. The Laplacian type filters will enhance details in all directions equally. [9].

Experimental works
3.1 -The procedure for executing the work procedure that has been used to execute the work the Fig. (3  The work depends on an idea of slicing the surface under test with layers in different heights using a digital camera for capturing 2d images (figure 5 shows some slices) and processing these images or slices using Matlab software to find out the edge of each slice as shown in figure 6 and then assembling them and reconstructing the surface as shown in figure 7. When the surface reconstructed, two filters have been applied to enhancing the accuracy of the surface, Median filter and Laplacian filter. Figure 8 shows the surface reconstructed after applying Median filter and figure 9 shows the surface reconstructed after applying the Laplacian filter.
Finally the tool path has been generated for the surface after applying a median filter, as shown in fig 10.Figures from 11 to 16 shows the steps for machining the surface.  (11 ).The CNC milling machine that used for machining the surface Fig. (12). The G-Code and simulation of machining the surface Fig. (13).The raw material prepared to be machined

Conclusions
From this work it has found that it is possible to enhance the surface that has rebuilt from the surface regenerated using captured images of the origin sample's surface by applying different types of filters such as Median, and Laplacian. As shown from the results coming out of this work that median filter improved the final shape and accurate the surface regarding the surface that regenerated as captured