Algorithm for recognition of details in the machine vision systems at automation of assembly processes

The aim is an experimental research on the flat objects recognition using dimensionless marks of the contours of their binary images and determining the possibility of applying this method in computer vision systems of assembly robots. The main problem with the automation of assembly operations is the recognition of parts for the subsequent picking up of the robot arm. The basis for the formation of attribute vectors is the characteristics of the image contour. Recognition of a class of an unknown object consists in receipt of its contour, calculation of primary parameters and forming of a vector of dimensionless marks. Further mean square deviations of its vector of dimensionless marks from all reference are calculated. The minimum value of a deviation will specify probable belonging to the corresponding class.


Introduction
One of the ways of increasing the efficiency of production is to automate the assembly process.This is connected with the use of robotic centers.[1][2][3][4][5].
The main problem that needs to be solved when automating the assembly task, is to indicate type of detail for the robot's manipulator.Details in the field of a vision system may lie randomly and with different locations relative to their center.This complicates the task of recognition.
Objects recognition assumes an object as markment to one of their predefined types.An operation of sorting components in the development of information processing algorithms in computer vision systems can be stated as the problem of image recognition, perceived by the video camera of a system.For this purpose, the received images are processed and analyzed [5,6].
Detection and identification of objects is an integral part of human activity.An object is defined not only as a digital representation of a fragment of the local two-dimensional scene, but its approximate description, as a set of specific properties or marks.The main purpose of their description -is their use in the process of establishing of object capability, carried out by comparison.The objective is to identify the recognition of any object to a particular class by analyzing the vector of values of calculated marks.The information about the relationship between the values of the object marks and its belonging to a certain class a recognition algorithm has to learn from the training set of objects for which the marks of attributes and classes are known [5,6].

Methodology
For the study proposed in [7,8] algorithm a set of binary images of separate real flat objects was chosen.It is shown in Fig. 1.The experiment was conducted on a presentable display access of each of the 10 real flat objects (RFO).To do this, initially generating of a set of rotated images is performed.For each of the images centroids of objects are calculated and an array of rotated images of each of the 10 RFO in a step of 1 degree is formed.On the whole, we get 3600 images.
Then we make simulation of accidental occurrence of an object in the field of recognition pattern.
With the help of random number generators (RNG) with a normal distribution 10 sets of 2,000 images are formed from 360 rotated images of each of the 10 RFO.
With the second RNG we get a number in the range of 0.364 to 0.720.This limitation is necessary to minimize the layout of images out of the operating field.4000 numbers are generated for 2000 implementations of each object.We will assume the first number RNG the coordinate of the center of gravity on the axis X Xn of an object, the second number -Yn.Thus, the coordinates of the center of gravity of each of 2000 of the implementations of each of the 10 RFO can be defined.According to these coordinates 2000 of the implementations of each of the 10 RFO are placed on the display space.
Then we calculate the number of dots in each of 2000 of the implementation of each of the 10 TFO, that is calculate the area of object S0 and perimeter P0.
For each of the obtained object implementation single-point contours are formed according to the algorithm in [7,8].
For each of them the number of dots forming the contour of each of the 2000 of the implementations of each of the 10 RFO is calculated.Next we define the metric length of the contour of each of the 2000 of the implementations of each of the 10 RFO.
For each implementation the value of the curvature at the points of each contour of the 2000 of the implementations of each of the 10 RFO is determined.According to the obtained points the reference point of convex and concave sections of the contour are determined.We determine the number of reference points of convex, concave and linear plots of contours.2) and (3) we calculate the total length of the convex, concave and basic blocks of the entire contour of each object: (1) where: a -distance between 4th connected points; b -distance between D's connected points; М1 -the number of contour points with a value of 90; М2 -the number of contour points with a value of -90; М3 -the number of contour points with a value of 135; M4 -the number of contour points with a value of -135; К -the number of 4 connected contour points; Т -the number of D connected points of the contour.Using calculated parameters, calculates the vectors of dimensionless marks of the 2000 of the implementations of each of the 10 RFO with formulas (4) -( 19).

Recognition
After receiving vector marks for all generated realizations the standards for recognizing each of the 2000 implementations of each of the 10 RFO is carried out in the dialog mode.
In the histogram obtained while generating we choose a vector mark of the most frequently used options from 360 rotated variants, for example, the 1st RFO, while the formation of 2000 implementations.For this vector of coefficients of the standard deviation (20) we calculate Zi from 2000 implementations.
where: n -number of mars; l -number of recognizable object (l = 1,2, ..., 2000); Kj -the value of the j-feature vector of coefficients K of the selected standard; Kjl -the value of the j-feature vector of coefficients K of the selected implementation.2000 implementaions are calculated Zi.Among them are Zmin sought Found values Zmin indicate the number of implementations among 2000 images which vector marks coincide with the vector-mark selected as a reference implementation.Obviously, with one standard it is impossible to recognize all 2000 implementations of the 1st RFO.
Secondly, based on the histogram we select as a standard the reference vector of the next most frequently used options from 360 rotated, for example, the 1st RFO, while formation of 2000 implementations.We calculate 2000 standard deviation Zi.Among them Zmin are searched by the formula (21).
Found values Zmin indicate the numbers of implementations among 2000 images which vector marks coincide with the vector mark of a standard implementation, etc. Selecting of standards for the realization of the 1st RFO continues till until all 2000 implementations are recognized.
Similarly, the choice of standards is carried out for all implementations of all other 9 RFO.The results of standard selection for 2000 implementations of each of the 10 RFO are shown in Table 1.Thus, this training of the recognition system is completed.
To check the operation of the system of recognition, an examination of 20000 trained implementations of all 10 RFO on the basis of formulas (20) and ( 21) is carried out.The exam consists of comparing the vector marks of all 20000 implementations of all 10 RFO with the selected standards.
A random object is selected.It features all the above procedures of producing dimensionless marks of contours.The resultant vector of the unknown RFO is com-pared to all standard vectors in Table 2.The type of RFO is determined according to min {Zmin}.
The exam procedure is repeated for the 2nd unknown object, and so on for all of 20000 realizations of all 10 RFO.

Conclusion
Object 5 has a simple symmetrical contour.Its rotated images do not differ substantially among themselves.Therefore, it took only 8 standards for the detection of the object.The object 10 has a complex shape.This led to the need to use 45 standards for the full recognition of all implementations of the object.On average, it takes about 28 standards.
During the research the experimental studies have been conducted on the recognition of individual testing of flat objects on the basis of non-dimensional marks of their contours.Experiments were carried out on the basis of presentable selection in 2000 images for selected 10 objects.
The results showed high efficiency of the proposed non-dimensional marks.The amount of standards required for the recognition depends on the complexity and symmetry of the contour of the object.With this set of etalons vectors of coefficients the detection of unknown objects was 100%.
Recognition time indicators are obtained for algorithms for test selection circuit and for determination of the coefficients.The method of guided search was used as an algorithm for contour detection.This method and algorithm of marking reference points are the most time-consuming in this system and they can be optimized for use in a real system in order to reduce the recognition time.
Thus, the use of the proposed recognition algorithm will reduce the number of errors in the recognition of parts when automating assembly operations using robotic complexes.
The reported study was funded by RFBR according to the research project №18-07-01191.

Table 1 .
Numbers of etalons of all RFO.