A FRAMEWORK TO DEVELOP INTELLIGENT SYSTEM FOR MEASURING PRODUCT FEATURES USING OPEN CV TECHNIQUE

This research aims to propose an innovative framework using ISO14649 standard to detect defects in manufactured shaped objects or geometric surfaces of non-linear products of the CNC machine. The significant importance in order to recognize the potential to improve industry product quality inspection and encourage the waste of timing machines and product rejection. Open Computer Vision (Open CV) offers a smart, non-contact measurement and cost-effective technique to fulfil the requirements. The framework depends on the new technique of Open CV, which includes two parts: an intelligent selection of work-piece capturing the image for a particular inspection of the planar interfaces such as the hole, rectangular, pocket one, and the symmetric lighting model comparison approach for measurement of defects in the matched images. The contribution of this study is to build a structure in the computer vision method with a convolution neural network that predicts the classification of the feature for better accuracy and emphasizes the significant characteristics of the image processing technique coupled with experimental data on demanding image datasets and quality inspection measures


INTRODUCTION
Computer Vision is a newly increasing technology for object identification, analysis, and comprehension. The image cycle provides the industry with a list of resources and work of the workforce. Meanwhile, Open Computer Vision (Open CV) is a library developed by Intel that may be available in the Python language as a programming tool. Composing high-resolution images from a set of tiles capture module is a common technique used to digitally extend the visual field of an imaging system without reducing its resolution. Certain compounds or cascade images allow for a thorough inspection in a modern context and identify global trends. The new technology of the inspection system in industrial automation creates opportunities for manufacturers all over the world. Developing a new inspection technique can measure the model of high-quality products at the lowest possible cost in the close loop of the process chain. Besides, Dr Kamran Latif from Pakistan has developed an open control system for Computer Numerical Control (CNC) of a 3-axis milling machine, which improves the machining quality, increases productivity, reduces time, and avoids machine accidents . This study continues as auto-inspection with the non-contact section implements the Internet of Things (IoT) to make the machine more open and approximately meet the standard of industry 4.0. The advanced system consists of an open computer vision hardware and software platform to capture the image in real-time and non-contact machine measurement. Therefore, the developed system has been limited primarily in terms of intelligence and flexibility. The new technologies of the intelligent manufacturing inspection system provide potential outcomes for factories all over the world. Developing a new inspection approach will accurately measure the model in the close loop of the process chain of useful high-quality products at the absolute lowest cost. This framework paper presents a new approach to the edge detection algorithm and a planar feature. In fact, the classification of images should train a model and test for a better value of the model and then experimentally prove that the proposed algorithm can be used to measure the dimension of surface feature of Part21file on the origin of the STEP-NC standard. In view of the Vision Inspection system, the work-piece can be detected more accurately. In order to improve the wastages of timing machines and product rejection, this study is important to deteriorate real-time performance, accuracy, precision.

RELATED WORKS
Intelligent manufacturing contributes to a modern manufacturing approach where production machines are entirely networked. Sensors can be tracked and managed by innovative artificial intelligence to enhance product quality, sustainability, and device efficiency (Luo et al., 2019;J. Wang et al., 2018). A system has been extensively studied and implemented using Computer Vision as an effective tool for quality control of products can be distinguished from object detection (Loizou et al., 2015;Tootooni et al., 2016), identification of goal (Fernández-Robles et al., 2017), control based on vision (Schmidt & Wang, 2014;T. Wang et al., 2018), and defective inspection of the product (Aminzadeh & Kurfess, 2015;Jeffrey Kuo et al., 2017). Hence, the module of the inspection should establish whether to re-inspect the faulty material inspection based on the outcome and the confidence of the examination, modify or dispose of the product inspected. Thus, it can avoid low-quality products coming into the market and minimizing labour costs. The inspection system consists of the relevant modules: acquiring images, image processing, decision-making, and extraction (Malamas et al., 2003). A few papers have highlighted that the inspections conducted depend on the design of the last three phases, which are regarded as the cornerstone of the inspection process (Brosnan & Sun, 2004), and closed-loop inspection tends to be integrated with the standard STEP-NC (Saif & Yusof, 2019). Through the analysis of the acquired image, features, and deep machine, learning-powered inspection methods were widely adopted. Hence, the characteristics of product defects such as colour, texture, and shape can be extracted feature using advanced image processing algorithms. An expert software or perhaps an intelligent clustering algorithm may be built-in for further sorting. One key obstacle with a method is how to obtain a coherent and defect-related vector expression for the captured image, such as the extraction of a feature. The durability of the feature entirely depends on the device designer's skill and capability; incorrect extraction may result in a high rate of failure or inaccurate rate of alarm.
Besides, the built-in filters function is subject to a scenario for the application. The manufacturing process has changed, and the output layer previously created may no longer sufficient. In the recent years, deep learning has attracted considerable attention, using a cascade of various levels of nonlinear processing units to extract features, and each level recognizes the previously layer results of the test as an input (Ahmad et al., 2019). With this framework, the extraction and classification of features can be incorporated into one system and optimized together, where the last layer is utilized for the output of the forecasted product, and the others are used to extract the features. Benefitting from its enormous paradigm size, the sophisticated network architecture, and appropriate genetic algorithm, the configured image recognition of the neural network can decide the importance of being able to draw directly and consistently standard features hierarchical structure from valid images obtained in a closely monitored or unmonitored manner. The critical systematic analysis of the gap for the development platform structure of software and hardware configurations that interfaces with the Raspbian computer has been implemented by (Saif et al., 2020). This research will lead to the measuring of the part21 based on the STEP-NC standard by the implementation of a new measurement approach using the Vision Inspection System(VIS). Hence, encouraging product consistency and inspection of the generality. Vision machine designers should rely on storing specific faulty goods instead of setting standards for each type of defect.
The method of the modern camera inspect the dimensions based on surface planner defect detection, according to the mentioned sources, represents: • Examining the region of interest (ROI) using an image processing technology to correct brightness to maximize the accuracy rate of the segmentation of the defects.
• Implementing the difference of grey level to segment defects in the image.

Detection Logic of the Product Shape
The feature to be obtained in Open CV intend to be in white colour, and background images usually in black colour as trajectory pints are found. The curvature can be recognized as particular-line segments with an approximate contour are subset points that have been described in the original curve. Contour measurement is obtained in Open CV using the method of cv2.approxPolyDP (Uma & Yuvarani, 2017).

Extract the Region of Interest (ROI)
The inspected features may not ensure that all the stored data is task-related, as the insignificant background material mostly represents a significant part of the image, resulting in needless measurements to the next development phase. In reality, a significant part of the image lighting is usually present, resulting in the following classification points in needless measurements. Rectangular then round is generally a very lighting process. For that kind of justification, the predictive Hough transformation will be used to detect a new straight line or circle of the generated edge of the light; the outcome detection may be used to obtain ROI from the filtered framework (J. Wang et al., 2019). It proposed a circular or rectangular region with a specific size and outlet point that could be a viable ROI extraction solution. Consequently, the primary issue of a technique appears with small variation in viewing angle, object instructions, and running time cannot be handled well. Depending on such points, the position of the module to be measured can change, that may cause the failure process to continue with ROI. In general, an industrial inspection method measures the original image information according to the following series of steps

Acquisition of image
Images that contain the necessary information are captured digitally via cameras, digitizers, and others.

Processing Image
Upon capturing all images, users are filtered out to remove noise components or unnecessary reflective surfaces from the lighting system. The image resolution can also improve the image quality by addressing the geometric distortions suggested by the data acquisition.

Feature extraction
A variety of available features, attribute of the object model is measured, feasibly with certain deliberation for anti-overlapping or anti-correlated features, whereas better classification can be accomplished (Oyeleye & Lehtihet, 1998). The cluster of computed features is a representation of the input image. Therefore, these features include dimensions, orientation, surface measurement through edge detection and linkage, and specific texture measures for regions. Characteristics and data can be analysed using various technologies and convolutional neural networks (CNN), such as fuzzy systems.

METHODOLOGY
This proposed framework highlights the essential features of the industrial automated inspection system, which includes flexibility, speed, cost, performance, and product reliability. To develop a system that monitors these features, clarifying precisely which outputs and available inputs are needed.
Overall, an industrial inspection method measurement has been divided into four sections: first, to create the model ISO14649 Part 21 file that needs to measure the model in a 3-Axis Intelitek Prolight milling machine; second, to implement the Open CV using Python code to filter the preprocess image, thirdly using the Raspberry Pi 4 to measure the model involving IoT to meet requirements of industrial 4.0. Lastly, use deep learning, such as CNN, to predict the model feature to get better accuracy.

Case Study
In terms of measuring workpiece geometry, the regular three-axis CNC milling machine can be categorized into four main stages, all operated by the CNC motion controller; spindle, x-axis, y-axis and z-axis. The framework of the inspection data model used in this case study is seen in Figure 1. Every linear axis subsystem has child variable artefacts that are connected to the tool holder of the CNC milling machine to measure the measured dimensions of the linear x axis, linear y-axis and, linear z axis, and camera vision sensors to capture the physical model image of part 21 and to measure the characteristics of the holes, pocket and planar face during the milling operation.

Proposed AUTO-Inspection System
The framework is an effort to establish a new inspection system that strengthens the innovation system from Dr Kamran Latif by integrating a new IoT revelations inspection technique with Open CV. It significantly reduces the defects and makes the system more accessible, advanced, highly available, smart, and accurate . In this proposed system, the software and hardware framework is selected. The auto-inspection identifies the software development methodology for the CNC system through this system PC, Raspberry Pi 4 with SD card and accessories are utilized as the hardware platform, and operating system Windows 10, Python/PyCharm, CNN Prediction Accuracy, and Open CV are selected as the software platform. The incorporation of the two platforms builds an automatic inspection system for the CNC milling machine. This conceptual methodology has been experimentally applied to the Intelitek Prolight 1000 CNC model shown in Figure 2. The key emphasis of the proposed auto-inspection system is to enhance the measurement of features at a reasonable cost in real-time and to focus on improving quality, productivity, and accuracy shown in Figure 3.

Raspberry Pi 4 Model B
The new model throughout the Raspberry Pi range is the Raspberry Pi 4 Model B series. Whereas it offers revolutionary compared to the previous generation, which improves processing speed, graphical performance, memory, and accessibility while sustaining backward compatibility and equivalent power consumption.
Step1: Creating the model of ISO 14649 part21 file The mode in Figure 2 shows the platform of the research that produce a work-piece of ISO 14649 part21 file from previous studies of Dr. kamran Latif and machine the model with the 3-axis Intelitek Prolight milling machine.
Step2: Development of inspection interface software.
In this step, the inspection software is developed using Python/PyCharm and Open CV. This software uses an ISO14649 Part 21 file model as an input object model. It connects towards a Raspberry Pi 4 camera, which involves the Open CV tool Library to measure the dimensions of the model or workpiece. This interfacing module contains many functions such as image capture, model coordinates calibration, work-piece database acquisition, convolutional neural network/detection system, and product feature specifications. The description of an image recognition algorithm used in the image processing tool within Open CV library. Hence the main image is transformed into a grayscale image, a black-and-white image, and the object is the threshold for detecting the frame's rectangular edge.
Step 3: Development of inspection platform for CNC System. This aspect requires hardware and software features to establish a connection between hardware and computer through accessible hardware and software object detection. Intelitek Prolight 1000 CNC has been used in the proposed research, as shown in Figure 2.  Step 4: Experimental of model /objects The proposed platform of auto-inspection shows in Figure 4. The research platform uses the new Open CV technique to inspect the work-piece consisting of two hardware and software approaches. The first approach to the development of an auto-inspection file for part 21 based on ISO 14649, nevertheless, will be to design the work-piece using Catia software as a case study for this research and create the work-piece on the Intelitek Prolight 3-axis milling machine. So apply the IoT revolutions for this study and link the camera vision for measuring the model using Raspberry Pi 4 as hardware consisting of a camera, SD card, internet, and so on. The second approach to building algorithms that aims to measure the model by using the Open CV library to integrate a Python 3.8.1 version algorithm within PyCharm for an editor of the language.
In addition, setup or approaches may be merged together by using the Raspbian webserver to each other. This phase of the experimental model can be converted to Open CV tools to capture the image with the measurements of the features using a high-resolution camera.

FUTURE TREND
The industrial of the future is intended to take on a more fully accessible, standardized, and collaborative model, detect of which are already increasingly obvious in many parts of the globe. Advanced inspection in the manufacturing sector will become more reliable, effective, transparent, and consistent when merged from concept to execution. In fact, industries are no longer entirely dependent on the workforce for simple or complex tasks. Industrial automation has become a great asset within the highly competitive market of digital technology and the IoT. The auto-inspection of industrial processes has become a popular method. With developments in technology and telecommunications for artificial intelligence (AI), this activity will become redundant in the coming years. The new technology of the inspection system in industrial automation creates opportunities for manufacturers all over the world. Developing a new inspection technique can measure the model with highly acceptable quality products at the lowest possible cost in the close loop of the process chain.

CONCLUSION
Propose an efficient framework focused on a model prediction method for detecting defects in planar manufactured products or planar surface irregularities of non-planar products. A certain framework can resolve disputes where the lighting design of the image and calibration-product images are vastly different. There is no coherence between the pattern and validation-product images. The Open CV tool and Python programming language is used to measure the dimension's shape and several variables in a specific region of the object image. The advanced system consists of an Open CV hardware and software platform for capturing the image in real-time and non-contact machine measurement. The algorithm's primary emphasis must be used to detect and identify various geometric patterns within the product geometries manufacturing sector. A convolutional neural network applies to predict better accuracy of the model feature. Experimental measurements demonstrate the admirable implementation of the developed framework on challenging image datasets.