Vision system in quality control automation

Measurement of surface roughness is one of the quality control processes, usually carried out off line. Contact type surface roughness measurement method is commonly used in quality control. The processes consume lot of time with human interaction. In order to reduce or to eliminate non value added time, effective quality inspection tool and automation of the processes has to be utilized. An attempt has been made to automate the process with integration of vision camera in capturing the image of the component surface. The image process technique has the advantage of analyzing the single captured image for multiple area measurement. Hence, the in-line quality control of each component surface roughness measurement is ensured. The automation process involves component movement, image capturing, image processing, and decision making, using sensors, actuators and microcontroller. The proposed in-line quality control of surface roughness with vision system has been successfully developed. The designed automated system has fulfilled the objectives in respect of the scope of the present work.


Introduction
Over the past decades, the need of the mankind has demanded increase in productivity with the improved quality of the products. This has led to innovations, and these innovations have transformed the traditional manufacturing to advanced manufacturing. In view of the increase in productivity, non-value added manufacturing activities (NVAs) need to be eliminated through thorough study. In the manufacturing process, the quality control is one of the important stages. There are several methods of quality checking. One such activity in the manufacturing process is the quality inspection of components' flat surface roughness. Some of the contact type surface roughness measurement methods are Stylus Profilometry, Atomic Force Microscopy etc. Non-contact methods are Laser Measurement Technique, Binary Speckle Image Analysis, Image Processing Techniques etc. Each method has its own advantages and disadvantages. Contact type equipment (Stylus Profilometer) consumes more time for quality check than non-contact type [1]. Atomic Force Microscopy (AFM) has better speed of operation and accuracy. Laser technique can take multiple readings over a desired region. The disadvantage with laser technique is limited working distance [2]. All these surface roughness quality checking methods require an atmosphere free from vibrations, dust, and heat.
The conventional quality checking of a component is made by taking one sample out of a lot to ensure the quality of the particular lot. Such quality checking method may lead to rejection of the whole lot or even acceptance of defective parts. In order to ensure the quality of the product, in the present competitive world, each component has to undergo quality check, which raises the need of in-process inspection. In-process inspection ensures successful control over the quality of the component, reduces the quality check time, ensure inspection of each component, ensure reliability and efficiency of the system. In-process inspection of surface roughness can provide a high-speed quality control check, to reduce skilled labor cost and thereby increasing productivity in modern manufacturing environments.
The image processing technique can be used to analyze quality of the component's surface roughness by capturing the surface image of the work piece through digital camera [3,4]. Image processing technique can be incorporated along the manufacturing line. Such system has the advantages over other techniques. The integration of vision based inspection system reduces production lead-time, increases inspection activity efficiency and quality by eliminating the human interaction in the inspection process. In the present study, an attempt has been made to incorporate the image processing technique in the manufacturing system for flat surface roughness measurement along with component acceptance/rejection automated system based on the analyzed data collected through image processing. The system is developed to demonstrate the concept with the following; a system with a conveyer belt system, metal detection system, component gripping and component positioning system, a camera positioning system, a carriage rotation system, an indicative grinding system along with the delivery conveyor belt system. The Graphical User Interface (GUI) is used for image processing and data handling, and microcontroller is used for controlling the overall process.  The camera arm is designed to rotate with an angle of 120°. The camera is connected to the tip of the arm at an angle of 30° to reach to the required position to capture the image of the component surface. The image captured is processed using GUI program to calculate the surface roughness over a specified region. The system is designed to capture the image from the region of interest before processing the image. This feature facilitate for the better and detailed quality check. shows the schematic diagram of the right side view of the system from the delivery end. Once the image is captured by the camera and the surface roughness of the component is measured by the GUI software, the written program logic verifies the result to accept or to reject the component. The instructions to microcontroller are fed according to the surface roughness value obtained through GUI software. Further, the camera arm retracts to its initial position. The jaw closes to hold the component firmly and with a delay of 5 s, the vertical carriage moves up by 10 cm. The carriage then rotates to delivery end if the component surface roughness value falls within the acceptance limit, else to place it on the grinding end as rejected and to continue the grinding process.  Schematic of the grinding process setup is shown in Fig. 6. If the component is rejected by the GUI, the component from input end is moved to the grinding end. The carriage rotates by an angle of 180° to reach the grinding end. Initially, the grinder carriage moves forward and further the grinder arm moves down to carryout indicative grinding process. After the grinding process, grinder arm and grinder carriage moves to their home position. The camera arm move towards the component to capture the image and to analyze the surface roughness. If the component fulfils the required surface roughness, it is placed in the delivery end by rotating by an angle of 90° in a clockwise direction of the carriage, else the grinding process is repeated.

Camera arm kinematics
Kinematics refers to the analytical study of the motion of a robot manipulator [5]. Camera arm kinematics is calculated by applying the forward kinematics. Fig. 7 shows the schematic diagram of a camera arm.

Image Processing Techniques
Image processing is a technique to enhance and analyze the raw images received from cameras. Image processing is the first step to prepare the image that has been captured for analysis [6]. Besides that an image is a representative of a real scene, this image is presented in such a way in an array or a matrix of square pixels (picture elements) arranged in columns and rows. Therefore, it may be defined as a 2-dimensional function, f (x, y), where x and y are spatial coordinates.
Edges are often used in image analysis for finding region boundaries. They are the regions where pixel brightness changes abruptly. An edge essentially distinguishes between two distinctly different regions or in short, an edge is the border between two different regions [7]. Edge detection of an image reduces significantly the amount of data and filters out information that may be regarded as less relevant, preserving the important structural properties of an image. Most edge detection methods work on the assumption that an edge occurs where there is a discontinuity in the intensity function or a very steep intensity gradient in the image. Using this assumption, the derivative of the intensity values across the image is taken and finding the points where the derivative is a maximum, the edge will have to be marked.
The image representation technique is mainly used in the present work to acquire the maximum and minimum pixel values of the image obtained from the work piece. A coloured image is captured by the camera. It consists of all the 3colours i.e. Red, Green and Blue. It is very difficult to process a color image. In the present work, only red color of the image is extracted. It is nn 8-bit grey scale image. The image can now be accessed as a twodimension array of data, where each data point refers to a pixel for digital images. It consists of values from 0 to 255 only i.e. 256 different pixel values. 0 being pitch black and 255 being white.
The image of the component is captured and stored as bitmap image in the installed drive of the visual basic software. Maximum and minimum pixel of the image is extracted in the particular area of interest and is displayed in the visual basic interface. After getting the pixel values, the intensity factor of the component is obtained using a specified formula. With the knowledge database, surface roughness value is picked corresponding to intensity factor value.

Graphical User Interface
A graphical-based language allows the user to work directly with graphics. A project is a collection of files that makes the user program. They may consist of form, modules, and active x controls [8].
The visual basic software version 6 is used as a graphical user interface. Firstly when the software is opened it asks for new project. Standard EXE is opted and option open is clicked. A form window is opened. In the form window, text boxes, labels, command buttons, picture boxes are created. Properties of all the created icons are set according to the requirement. Double click on the particular icon allow us to write the code. For this project, area of the co-ordinates is specified to find the surface roughness. In the particular area of the co-ordinates, maximum and minimum pixel values are extracted. Minimum pixel value is assigned to the text11.text and maximum value is assigned to the text12.text. These maximum and minimum values are used to find the intensity factor of the component. Text1.text is assigned to the intensity factor formula. If the text1.text value is less than the 0.5 then the PC give the message to microcontroller to deliver the component in the delivery end. If the text1.text value is greater than the 0.5 then the PC give the message to microcontroller to deliver the component in the grinding end. At the same time surface roughness of the component is picked corresponding to intensity factor value and is displayed in the GUI. The Graph of intensity factor versus surface roughness is also displayed.

Experimental setup of the developed setup
Input end: Component moves on the conveyor and is stopped by the proximity sensor. The proximity sensor is connected at the bottom end of the input conveyor. Fig. 9 shows the top view of the setup.
Grinding end: An indicative grinding machine is used to show how the grinding machine works. The machine grinds the component after the component has been placed in the grinding end by the jaw.
Output end: Once the component has met the quality standards it will be placed on the output conveyor by the jaw. The component moves till the end of the output conveyor.
Carriage: It contains camera, vertical carriage with gripper. The carriage moves both in clockwise and anti-clockwise direction. A camera is used to capture the component image. Jaw is used to hold the component. Chain and sprocket is used to move the vertical carriage up and down.

Results
The design intention is achieved successfully and below shows the developed GUI window for acceptance and rejection process, time taken for the test are shown in table 1 and the red box shown in GUI can be moved to any point within the sample snapshot boundary.

Acceptance and rejection process
Output 1: Rejected component with IF>0. 5

and Ra=8.75 µm
The image captured by the camera has to be processed for finding the surface roughness value. Code has been written in such a way that it has to extract maximum and minimum pixel values of red colour over a specified area for finding the intensity factor value. With the help of knowledge database, surface roughness value is picked corresponding to intensity factor value. Variation of Ra value v IF is also showed in the GUI. The 1 st component has not met the quality standard where the IF is greater than 0.5 and that component needs to be grinded to meet the standard by rotating an angle of 180° in anticlockwise direction by the carriage for placing the component in the grinding end. (Fig.  10) Output 2: Accepted component with IF<0. 5

and Ra=3.75 µm
After the grinding process, the camera captures the image of the 2 nd component and the same procedure is followed for finding the surface roughness of the component. If the component has met the quality standard where the IF is less than 0.5, the component is moved to the delivery end by rotating an angle of 90° in clockwise direction. The component on the conveyor moved a distance of 40 cm for 10 s at a speed of 0.04 m/s. Carriage comes to the initial position to do the next operation. The conducted experiment shows that the design intention is fulfilled. (Fig. 11)   Fig. 10. Graphical User Interface with an intensity factor > 0.5 and Ra =10.75 µm

Time taken for the test procedure
In the present work, time taken by the designed automation of the testing process is evaluated. The time taken for the acceptance, rejection and for the consecutive operation is shown in the Table 1. The time consumed for both acceptance and rejection is within ~90 s which include testing of the component for its quality and movement of the component to the delivery end. The integration of image processing technique in to the manufacturing line ensure not only the quality of the component by checking each component but also saves time in terms of movement of the component, as well as the time consumed for the measurement process.

Conclusions
Present work describes the design, development and implementation of automating the vision based system for surface roughness measurement by incorporating the image processing technique in quality control. This system provides fast and flexible quality checking of every component, thereby eliminating the need for separate quality department and ensures 100% defect free production. The designed GUI system also provides facility for the measurement of the whole surface or desired area in the component. Due to the elimination of non value added time viz. movement of component to quality department, the proposed work drastically reduces the lead time and in turn increases productivity and reduces the cost of production.