Intelligent Analysis of Core Identification Based on Intelligent Algorithm of Core Identification

. The communication recognition of mobile phone core is a test of the development of machine vision. The size of mobile phone core is very small, so it is diﬃcult to identify small defects. Based on the in-depth study of the algorithm, combined with the actual needs of core identiﬁcation, this paper improves the algorithm and proposes an intelligent algorithm suitable for core iden-tiﬁcation. In addition, according to the actual needs of core wire recognition, this paper makes an intelligent analysis of the core wire recognition process. In addition, this paper improves the traditional communication image recognition algorithm and analyzes the data of the recognition algorithm according to the shape and image characteristics of the mobile phone core. Finally, after constructing the functional structure of the system model constructed in this paper, the system model is veriﬁed and analyzed, and on this basis, the performance of the improved core recognition algorithm proposed in this paper is veriﬁed and analyzed. From the results of online monitoring and recognition, the statistical accuracy of mobile phone core video recognition is about 90%, which has higher accuracy in mobile phone core image recognition than traditional recognition algorithms. The core line recognition algorithm based on deep learning and machine vision is eﬀective and has a good practical eﬀect.


Introduction
In recent years, with the advent of the era of smart mobility, smartphone applications have become more and more widespread, the frequency of use has become higher and higher, and the overall power consumption has been increasing. Limited by battery capacity, smartphones need to be charged frequently, the demand for mobile phone charging data lines per capita is more than 3, and the sales of data line products continue to increase. As of 2020, there are more than 2,000 data cable manufacturers with an annual output value of more than 60 billion yuan. e industrial scale accounts for more than 90% of the global data cable production. erefore, China is a global data cable manufacturing base. As of the end of 2018, 70% of the members of the US USB-IF Association came from Chinese companies [1]. USB-IF is the American USB Standardization Organization, and its full name is USB Implementers Forum.
At present, the production process of mobile phone core lines in China is mainly completed by semiautomatic equipment. In the production process, it is necessary to use an industrial camera to continuously collect images to determine the position of several wires and to assist in the branching work. However, there are chromatic aberrations in different batches of mobile phone core wires, and in different time periods, different illuminations will also produce chromatic aberrations. Meanwhile, a lot of white dust is attached to the surface of several wires, which will cause a great interference to color recognition. erefore, the current misjudgment rate of the position of several wires of this type of equipment is very high, resulting in a large number of defective products in the production process. Moreover, in the current production process, whether there is any leakage of copper wires when several wires are riveted to the terminal inserts needs to be manually detected. After a long time of work, the human eyes are prone to fatigue, which causes false detection and low manual operation efficiency. Mobile phone core wire manufacturers are actively introducing or developing efficient machine vision technology to improve the recognition rate of the positions of several wires and realize automatic detection of copper wire riveting. However, there has been no substantial progress. e main reason why the recognition rate of the positions of several wires cannot be improved is mainly due to color difference and white dust interference [2]. e main reason why the automatic detection of copper wire riveting cannot be realized is that the copper wire and the riveting piece are made of metal, and the colors are similar, which cannot be clearly distinguished in the image. In summary, the color difference of the core wire of the mobile phone, the white dust on the surface, the copper wire of the same material, and the riveting piece of similar color all interfere with the automatic production and detection of the core wire of the mobile phone [3].
In the welding process of data line terminal and core wire communication, the quality of the solder joint is an important factor affecting the final qualification of data line. In addition, the position correspondence between the data line core and the internal solder joint of the terminal is also an important factor in determining whether the data line is qualified or not. If the position relationship between the data cable core and the internal solder joint of the terminal is not accurate during the welding process, the data cable will inevitably fail to achieve its due function and meet the quality standard and will eventually be treated as waste. If it continues to be misused, the electronic equipment connected to it will be at risk of damage. More importantly, it may cause fire and explosion, which will seriously damage the user's life and property. erefore, in the production process of communication data cable, the realization of fast, accurate, and effective welding between data cable core and terminal is not only related to the production efficiency of data cable but also related to the safety of people's life and property. However, the production equipment technology of most data line production enterprises in China is relatively backward, and the degree of automation is low, resulting in overcapacity of low-end products, fierce competition in the data line market, more general-purpose products, and less high-tech and high value-added products [4]. erefore, in view of this situation, it is necessary to solve the problem of core line sequencing in the production process of USB data line and realize its automation, improve production efficiency, and further improve the competitiveness of China's data line industry. In the era of rapid development of robot technology, some modern forms of intelligent factories and unmanned workshops emerge one after another. In addition, automated products are also widely used in all walks of life, and more and more forms of automation appear in our surrounding companies. With the rapid development of China's economy and the rising labor cost, a large number of labor-intensive industries are gradually transferred overseas. erefore, among data line manufacturers, increasing production demand and pursuing low production costs have begun to become the company's inventory model [5].
With the support of in-depth learning algorithm, this paper constructs a communication core line recognition system suitable for automatic recognition, which can be used in the manufacturing industry.

Related Work
In a visual image, the edge of the image contains most of the information, such as the location, angle, and shape of the target product. By using different edge detection algorithms, edge information with different accuracy can be obtained. After the research of and scholars, there are many methods that can be used for image edge detection. In order to improve the speed of edge detection, literature [6] proposed a method of approximate calculation of image difference using Krawtchouk polynomial to achieve edge detection. Literature [7] designed an automatic fingerprint recognition algorithm based on edge detection, which has high accuracy and good detection effect. Literature [8] proposed an edge detection algorithm applied to noncontact workpiece detection, which is described as a median filter algorithm that collects two images, applies a one-dimensional filter in the horizontal and vertical directions, and then takes the average value. Literature [9] proposed a character recognition algorithm and shadow removal technology based on edge detection, which are applied to license plate recognition in intelligent transportation systems. Literature [10] designed a vision system for detecting whether materials are assembled on an automatic assembly line, used the Canny operator to detect the edges of assembly materials, and proposed a method to measure the geometric characteristics of a circular target using the Hough transform method. In order to solve the existing problems of Gaussian filtering parameters that are difficult to set, false edges are prone to appear, and local noise is difficult to eliminate when the traditional Canny operator detects edges. Literature [11] proposed an improved algorithm. e algorithm uses wavelet transform to remove noise interference and uses extreme median filter instead of Gaussian filter for edge detection.
Image segmentation is to separate the target from the background. e method proposed in the literature [12] is to detect the local minimum based on the Euclidean distance transform of the binary image of the grain. en, it uses the morphological expansion operator to merge the local minimum points to obtain the internal area of each grain. Finally, it connects the boundary of the region into an initial curve, which is trained by the active contour model and evolves into the boundary curve of the grain so as to achieve the effect of dividing each rice grain. From a visual point of view, image classification is to preprocess the image, such as improving contrast and morphological noise reduction, and then accurately interpret and interpret the target type according to the characteristics of image brightness, hue, and location [13]. Literature [14] used the Fisher discriminant method to project the multidimensional feature vector into one-dimensional space and then used the K-means clustering algorithm for recognition. From the experimental results, it is known that the accuracy of its purity recognition is higher than 94%. Target positioning is followed by image classification, and it is mainly to further determine and identify the pixel coordinate position and size of the specific centroid of the part of interest in the image. e main principle of the method proposed in literature [15] is to threshold the image first, calculate the shape description parameters of the binary image contour, and find all the bright strip objects in the image. After that, it uses the HSV color space to find the region of interest and then compares whether the target is within the approximate range of the HSV and RGB parameters that meet the required pixels. e method proposed in literature [16] uses the image color feature to segment the image, determine the contour moment, determine the centroid coordinates according to the contour moment, and then segment the image according to the high image color characteristics.

Extraction of Image Regions of Interest.
e image region of interest (ROI) refers to the target area in a picture, which plays a role in reducing the interference of background information to improve the efficiency and accuracy of image processing and detection. When the core wire of the data cable is used as the research object, there will be effects of chromatic aberration, vibration, and noise on the image acquisition process. is paper chooses to use image graying, morphological opening and closing operations, and threshold segmentation to obtain high-quality pictures of interest as the research goals. e color value of each pixel on the grayscale image is also called grayscale, which refers to the color depth of the midpoint of the black-and-white image, generally ranging from 0 to 255, 255 for white and 0 for black. e so-called gray value refers to the intensity of color, and the gray histogram refers to the number of pixels with the gray value corresponding to each gray value in a digital image. Image degradation is the process of transforming an image from an ideal image to an actual defective image for some reason. Image restoration is the process of improving the degraded image and making the restored image close to the ideal image as much as possible.
e color image (shown in Figure 1) is stored in a multichannel array. Among them, the element in each channel can take a value from 0 to 255. en, for the RGB channels of a color image, a three-channel histogram can be used to describe the proportions of different colors in the image. e color image (shown in Figure 1) is stored in a multichannel array. Among them, the element in each channel can take a value from 0 to 255. en, for the RGB channels of a color image, the three-channel histogram can describe the proportion of its different colors in the image. As shown in Figure 2, the horizontal is the gray value of the image, its value range is 0-255, and the vertical is the number of occurrences of different gray values [17].
Since each channel element is arranged in the matrix row and column order, the morphological characteristics of the image cannot be reflected, and it needs to be converted into a grayscale image. e grayscale image can reflect the characteristics and distribution of the overall and partial brightness and chromaticity levels of the image and can reduce the calculation time and calculation amount of color space conversion. For grayscale images, the 256-level transformation of grayscale ranges from 0 to 255, which does not contain any color information. At this time, the grayscale histogram is shown in Figure 3, the horizontal is the gray value of the image, its value range is 0-255, and the vertical is the number of occurrences of different gray values [18]. en, when performing grayscale processing on a color image, the three components are generally weighted and averaged according to different weights. Its reasonable distribution is shown in the following formula: (1) According to the above distribution method, the grayscale processing result of the color image obtained is shown in Figure 4 [19].
In image processing, threshold segmentation is to achieve the separation of target and background. e main principle is to use the difference in grayscale to divide the pixel level of the core area into several parts, which is convenient for converting the grayscale image into a binary image. at is, it is judged whether the characteristic attribute of each pixel in the image is within the target threshold range so as to determine the target area and the background area.
We assume a threshold and set its threshold to be T. In order to find the threshold value of the background and target feature, the gray value of all the pixel points set greater than the threshold is called the target feature, and the gray value of all the pixel points set less than the threshold is called the background feature. en, its mathematical expression is shown in the following formula [20]: Among them, the gray value of each point of the original image is H(i, j), and the gray value after threshold judgment is F(x, y). Its advantage is that it is simple to calculate, it can In addition, for binary images, it is necessary to mark the regions composed of pixels that meet the four-neighborhood connectivity criterion or the eight-neighborhood connectivity criterion with different unique labels. erefore, the labeling method of connected regions is introduced. It is to assign unique label numbers to multiple target areas in a binary image. Moreover, it mainly prepares for the next step of positioning and matching by making relevant numerical analysis and parameter statistics on the characteristics of the connected area corresponding to each label number. According to the same criterion, in order to make the result error relatively small and closer to the perception of the human eye, the eight-neighborhood connectivity criterion is selected to label the image. e range of interest found according to the threshold is surrounded by a purple line as shown in Figure 5.
Mathematical morphology operation is to use the properties of point sets, integral geometric sets, and topology theory to transform object pixel sets. e most basic operations of morphology are dilation and erosion (Dilation and Erosion), which are often used for noise reduction, segmentation, maximum or minimum value regions, and image gradients. From a mathematical definition, the operation of convolving an image (or a part of the image, denoted by A) and the kernel (denoted by B) is a    morphological operation. Among them, kernel B can have any shape and size, and the anchor point is a separately defined reference point. Similarly, the kernel can also be called a template or mask [21]. e local maximum operation of convolution between kernel B and graphics is called dilation; that is, the maximum pixel value of the area covered by kernel B is found and used as the pixel designated by the reference point. is increases the area around the core wire, as shown in Figure 6. For a multichannel image, the mathematical expression of the maximum value in the sliding window area is shown in equation (3). e corrosion operation is the inverse operation, which reduces the original area, so the corrosion is the operation to find the local minimum, as shown in Figure 7. e multichannel data is separated and processed, and the mathematical expression of the minimum value in the sliding window area is shown in formula (4): According to the basic operations of expansion and corrosion, the superposition of two basic operations is introduced, namely, the operations of morphological opening and closing. e open operation in morphology can remove noise and smooth the target boundary, as shown in formula (5). e closing operation can fill the discrete small holes and scattered parts in the target area, as shown in formula (6) [22]: Corrosion is mainly used to remove some parts of the image in morphology. e etching operation is to take the central position of the structural element (assuming that the element participating in the logical calculation corresponds to the point with element 1 in the two-dimensional matrix, that is, the hole on the grid plate). When moving on the image, if the lower image can be seen through all holes, the image at the central point will be retained; otherwise, it will be removed. e opening operation is to perform the first corrosion operation and then the expansion operation on the image, which is mainly to eliminate the details of the image that are smaller than the structural elements when the local shape of the object remains unchanged. Under normal circumstances, when the background is brighter, it can exclude small-area objects, eliminate isolated points higher than the near point, denoise and smooth the contour of the object, and break the narrow neck. e closing operation is to   Discrete Dynamics in Nature and Society expand the image first and then corrode. Its function is to be able to sort small black holes (black areas) and eliminate isolated points below the collar near point. Moreover, it can also denoise and smooth the contours of objects, bridge narrow discontinuities and slender gullies, eliminate small holes, and fill in the breaks of contour lines [23]. Based on the above opening and closing operations, this paper gives an effect diagram of a core wire. Figure 8 shows the opening and closing operation diagram of the green core wire.
In the case that the color of the image has been recognized, the target positioning of different colors still needs to be improved. According to the existing sorting system, the positioning is divided into three parts, including pixel distance calculation, azimuth angle calculation, and actual distance calculation. e system takes the position information of the target in the figure as input and the actual position of the target as output. e process is shown in Figure 9.
Target positioning is to determine the pixel coordinates of the core line in the image. Usually, it is chosen to use the centroid positioning. Judging from the external characteristics of the core wire, the axisymmetric image has higher accuracy when using this method [24]. If I(i, j) is assumed to be the pixel coordinates of the binary image, at this time, S(x 0 , y 0 ) is the centroid coordinate of the target, and the expression is as follows: Since the appearance of the core wire to be inspected is a cylinder, the orientation of the core wire can be calculated using the spindle positioning method. e main axis of the target graph is set, and the main calculation formula is as shown in the following formula: Among them, S is the boundary information of the core line and B(i, j) is the pixel gray value of the core line in the binary image. en, the sum of the squares of the distances from this straight line to all points on the boundary of the core line of the data line is the smallest so that the straight line can be in a plumb state to avoid numerical ill-conditioned problems [25]. e straight line is expressed in a certain polar coordinate form, as shown in the following formula: ρ � x sin θ + y cos θ.
In the formula, θ is the angle formed by the normal line and the x-axis, and ρ is the distance from the straight line to the origin.
at is, the conversion is as follows, which can be expressed as After the overall calculation, the following formula can be used to express the minimization problem: Moreover, x � (i,j)∈s x ij N , y � (i,j)∈s y ij N .

(13)
When the differential result is equal to 0, we obtain For the existing formula, the process is shown in Figure 10.
After the program is executed, the actual interception and positioning effect diagram is shown in Figure 11.
For digital images stored in the computer, each of them exists as an M * N array, and the brightness (or grayscale) of the image points in the array is the value of each element (called pixel) in the array. When defining the x-and y-axes of the rectangular coordinate system, the coordinate of each pixel is (x, y); that is, the image coordinate system is established by the pixel as the unit, and the distance between the point and the point is called the pixel distance. After that, the distance between the clamp and the core in the image needs to be required [26]. e color recognition positioning system of the core wire is input to the pixel coordinates of the information fixture. en, the centroid coordinates of the core wire are identified. According to the distance relationship between the two points in the coordinate system, the distance between the different color coordinates of the core line and the pixel point of the fixture is equal to the result obtained after the square sum of the difference of the abscissa and ordinate of two points is squared. e mathematical expression is as follows: From the point of view of the establishment of the image coordinate system, after obtaining the centroid coordinates of the fixture and the core line, the azimuth angle of the core line can be judged through the trigonometric function relationship conversion. When the camera is taken as the center point and the horizontal right direction is 0 ∘ , the orientation of the core line can be calculated, as shown in the following formula: θ � − arctan θ(sin θ > 0, cos θ > 0), θ � − (180 + arctan θ)(sin θ > 0, cos θ < 0), θ � arctan θ + 90(sin θ < 0, cos θ < 0), θ � − arctan θ(sin θ < 0, cos θ > 0).

Core Line Recognition Based on Deep Learning and Machine Vision.
is paper uses deep learning to realize the intelligent recognition of the core wire of the mobile phone and improves the traditional algorithm. According to the actual demand of the core wire recognition, this paper Discrete Dynamics in Nature and Society conducts an intelligent analysis of the core wire recognition process. After constructing the functional structure of the system in this paper, the system model of this paper is verified and analyzed. On this basis, the performance verification and analysis of the improved core wire recognition algorithm proposed in this paper are carried out. is paper obtains multiple sets of core wire pictures from a certain manufacturer and conducts real-time video surveillance during the manufacturing process of mobile phone core wires. e picture has been marked by the quality inspector, so the image recognition result can be compared with the image marking result so that the accuracy of the algorithm constructed in this paper can be analyzed. e results of video monitoring can be compared with the results of the on-site quality inspector, and the accuracy rate can be calculated. erefore, the main quantitative parameter of this paper is the accuracy rate of core wire recognition, and the corresponding table and the corresponding statistical diagram are drawn. e image recognition and analysis of the core wire of the mobile phone are carried out in the form of system simulation, and the results are shown in Table 1 and Figure 12.
According to Table 1, statistical table of image recognition accuracy of mobile phone core, the image recognition accuracy coefficient is always controlled at 95%. Figure 12, statistical chart of image recognition accuracy of mobile phone core line visually, shows this result. It can be seen from the above experimental statistical results that the core line recognition algorithm proposed in this paper has a high accuracy rate in the image recognition of mobile phone core wires, and the accuracy rate is above 95%. After that, this paper uses the system constructed in this paper to conduct real-time video monitoring on the production line, and the statistical recognition accuracy rate is shown in Table 2 and Figure 13.
From the results of online monitoring and recognition, the statistical results of mobile phone core video recognition accuracy fluctuate around 90%, and the core recognition algorithm has high accuracy in mobile phone core image

Conclusion
e recognition of the core wire of the mobile phone is a test of the development of machine vision. Generally speaking, the size of the core wire of the mobile phone is very small, so it is difficult to identify the small flaws in it. Based on the deep learning algorithm, this paper combines the actual requirements of core wire recognition to improve the algorithm and proposes an intelligent system suitable for core wire recognition. In the actual research, the system framework is constructed through two methods of image recognition and video recognition. Meanwhile, in the experimental design, the experimental research is also carried out through the two pattern recognition of image recognition and video recognition.
rough experimental research and analysis, it can be concluded that the core wire recognition method based on deep learning and machine vision constructed in this paper has a certain effect on core wire image and core wire video recognition and can exert a certain quality control effect on actual core wire manufacturing and production.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that there are no conflicts of interest.  Discrete Dynamics in Nature and Society 9