Development of an algorithm for automated enhancement of digital prototypes in machine engineering

The paper deals with the problem of processing digital prototypes in machine engineering with the use of modern approaches to computer vision, methods of taxonomy (a section of the decision theory), automation of manual retouching techniques. Upon further study of the problem, different taxonomic methods have been considered, among which the reference method has been chosen as the most appropriate for automated search of defective areas of the prototype. As a result, the algorithm for automated enhancement of digital prototypes of the digital image has been developed, using modern information technologies.


Introduction
A distinctive feature of the machines developed now is the computerization of all stages of design, production and operation in the context of the life cycle of products [1][2][3][4][5]. The fact that information systems tend to capture both basic and related aspects of the machine engineering brings about the need to create computer techniques to develop new materials and integrate them into a common data stream.
Lack of verified behavioural models for the used metallic materials and advanced composite materials in technological processes and loaded structures impairs the accuracy of computer modelling in machine engineering.
The process of product development in the machine engineering industry is currently divided into several stages, each of which has its own technical problems: • At the stage of conceptual design, technical designers and engineers often use paper-based or digital formats that are incompatible with the digital data used at the construction stage. The lack of digital data, compatible formats and automation is a characteristic feature that distinguishes this stage from the construction and production stages. These conceptual design data has to be re-created later in a digitalised form, which leads to the waste of time and resources. • At the construction stage, mechanic and electrical engineers use different systems and formats; lack of automation does not allow reacting quickly to changes in production requirements for products. Another problem at the construction stage is that in a typical 3D CAD aimed at work with geometric entities, it is difficult to create and use digital prototypes for testing and optimization of products before their actual implementation. So there arises a need to build complex and costly physical prototypes.

Problem statement
Image editing is a change in the original image by means of classic or digital methods. It may also be defined by the term 'improvement' [5][6][7][8][9][10]18]. The main task of improvement is to fix any defects of the digital material. Its purpose is to bring the image to perfection, but at the same time to preserve its character and nature, preparing the frame for further processing. Digital prototype processing takes longer than its creating, and most professionals spend a lot of time on performing this routine yet absolutely essential function. To solve this problem is the main purpose of this study, which is supposed to simplify work with digital prototypes.
The purpose of this work is to develop a fundamentally new technology (algorithm) of digital prototype defect fixing that will be applied automatically with decision-making techniques, which have not been used in this field before, combined with modern image and object recognition approaches.
To develop the enhancement algorithm, the following tasks have been performed: 1. Review of a prototype research methods and its definition has been made. 2. Research in the field of conservation of 3D images has been carried out. 3. Research on manual approaches to digital prototype defect fixing in machine engineering has been carried out. 4. A defect search algorithm based on the reference method has been developed.

Materials and methods
As a solution of the problem there has been developed an algorithm that implements [6,[8][9][10][11]: • Automated face detection in an image by Viola-Jones. Viola-Jones is one of the best in the 'recognition efficiency/operation speed' ratio. Also, this detector has an extremely low probability of false detection of the target object. The algorithm also operates well even at a sharp angle, for instance of about 30 degrees. At an angle of inclination greater than 30 degrees, the percentage of detections slumps drastically.
• Color-based segmentation of the prototype: The object detection algorithm suggested by P. Viola and M. Jones, in some cases, commits errors of the second kind (false response) on the objects that are significantly different from the background in color. To reduce the error, the stage of scanning candidate areas for color matching was added to the detection algorithm. Thus, in order to modify the object detection algorithm, the following approach was applied: Analyzing a sample of 1000 digital prototypes containing machine engineering objects, we have found out that the color of the object without a background can be described in the RGB color space by the following relation. A pixel (R, G, B) refers to the skin if all the following conditions are met: where R, G, B are respectively the values of the red, green and blue components of the pixel brightness. Using this relation, each pixel of the image is checked on belonging to a specific color range. All pixels that fall in this range will determine the areas of the object, which will then be tested for defects.
• Detection of defective areas by the reference method The reference method is a variant of the taxonomy with possibilities of its effective usage in the decision-making technology and the guaranteed receipt of Pareto-optimal solutions with regard to multi-criteria problems [6][7][8][9].
After defining the object's areas, we obtain an object (pixel) vector meeting the conditions where each object describes the brightness of the color component: red, green, blue.
The following is required to detect imperfections: 1 To normalize initial pixel array; 2 To determine the reference object; 3 To calculate the distance of all objects from the reference one; 4 To rank each object (pixel) with regard to the reference object; 5 To take the most distant pixels with a certain inaccuracy (Eps) as defected areas. • Formal statement of the problem: (1) where: k=1,2,…,n; − the index of the object being examined; n − the number of objects (pixels); Х k j − the value assumed by a j-characteristic property of a k-object; j=1,2,3; − the index of the corresponding characteristic of the pixel n-the number of objects (pixels); Х k j -the value assumed by a j-the characteristic property of a k-object; j=1,2,3; …-the index of the corresponding characteristic of the pixel • Elimination of defective areas using frequency decomposition: Decomposition into spatial frequencies is a method allowing spreading small and large image details into separate layers. One layer will contain the information only about the details (high frequencies), the other layer will contain information about the color and tonal transitions (low frequencies). This makes it easy to correct the shape without affecting the texture of the surface or to correct the texture without affecting the form [4].

Results and discussion
The algorithm developed by us allows for automated enhancement of the digital prototypes quality.  Optimization of the quality of defect repairing is provided by the use of decision-making methods together with advanced computer vision approaches. Using image frequency decomposition and colorbased segmentation allows one not to produce the object and background distortion in the image. With further development, the enhancement algorithm can be implemented in the modern software.
For conducting experiments, we used a PC with the following characteristics: The processor: The manufacturer of the processor is Intel Company The processor type is Core i7 with a frequency of 2.5 GHz The number of processor cores is 4 Maximal bit-timing frequency is 3.7 GHz Cache memory is 6 MB RAM: Random access memory (RAM) is 16 GB Memory type is ddr3l Memory frequency is 1600 MHz Video card: The video card manufacturer is AMD Graphic card is Radeon R9 2GB M370X Hard drive: Hard disk-drive (SSD) is 512 GB The main characteristics of the software product is the quality of elimination of defects of the developed algorithm on the loaded image. The experiment showed that the optimal size of the convolution matrix is equal to the width and height, in the area of which the face is defined, where the width and the length are respectively divided into the range of integers, approximately from 64 to 200. The result of dividing the width and the length is an integer < 3.

Conclusion
Nowadays, experts are paying a lot of attention to the problem of image processing. However, the algorithm and the solution do not exhaust all varieties of existing problems in the field of digital processing of visual information in the machine engineering industry. It illustrates the relevance of the research and development that we conduct.