Abstract

With the less humanized trend of manufacturing production line gradually progressing, real-time recording and tracking of workpieces information have become an essential way to implement efficient management. To collect and identify the workpiece marker is of great significance for product information statistics and quality traceability. Aiming at the problems of inaccurately positioning, difficultly segmenting, and slowly recognizing for capturing the marker of disc workpieces distributed circularly, this study proposes a projection segmentation algorithm based on polar coordinate inverse transformation to locate and separate the circularly arranged marker and extract the total separated characters. The features of the directional gradient histogram (HOG) of characters are used as the input of the support vector machine (SVM) model, and after training, a workpiece marker recognition classifier is obtained. The experiment results show that the recognition accuracy of markers composed of letters and numbers is over 97% by the proposed method. Our proposed method outperformed state-of-the-art approaches in achieving higher recognition accuracy rate with the SVM classifier.

1. Introduction

With the gradual application of industry 4.0 to the modern manufacturing industry, intelligentialization and digitalization have begun to advance automatic production lines. In order to ensure the effective implementation of enterprise’s digital configuration, a workpiece identification system should be established to improve the management level of production process, and then the transferring efficiency of logistics links would be enhanced and the error rate can be reduced. Therefore, it is necessary to assign unique industrial labels to all workpieces as the basis for making out their identities. Compared with the traditional tag or printed marker, which may desquamate or wear over a long time, laser marking can permanently etch the serial numbers on the surface of the workpiece presented by various types of characters containing the basic production information of the workpiece. Problems with these approaches are stability and robustness and particularly light changes that require special attention from researchers. Other than these problems, markers’ speed of recognition and reliability can affect the accuracy [1].

Collecting and identifying the workpiece label as an important information carrier for today’s automatic production line can be used for product quality statistics, quality traceability, and even for quality supervision during the whole life cycle of products. It has played a crucial role in the machining and transformation of industrial production. In order to improve the efficiency of workpiece marker detection and recognition, optical character recognition (OCR) technology has been widely adopted in industrial production. Quality traceability has been an important issue in production. Marking technology can provide a comprehensive solution of the earlier mentioned problem to obtain fast as well as traceable results.

To realize OCR, it needs to determine the position of the character region to be recognized, that is, character region positioning. Recognizing OCR’s importance is a continuous effort from researchers that requires end-to-end machine learning based solutions [2].

The currently used methods and technologies of character location include convolutional neural networks (CNNs), color segmentation, multilayer self-coding combined with SVM, and constrained AdaBoost algorithm and binary technology of kernel density function preprocessing [39]. In order to identify the characters in the license plate quickly and accurately, HAAR features were used to train AdaBoost classifier for finding the characters’ location, and the separated characters were recognized by the trained BP neural network [3]. Compared with the traditional neural network detection method, the positioning detection of steel plate and slab number based on MobileNet acceleration model also improved the detection speed and reduced the network weights [410]. LocNet-based positioning module could replace bounding box regression module to enhance the positioning accuracy of text detector. Furthermore, an improved YOLOV3 algorithm achieved the same effect [11, 12]. However, intelligent data augmentation can be proposed to overcome the insufficient data for industrial detection. Therefore, the proposed method in this study aims to improve identification and generalizes the model for similar industrial items.

Once marker region is detected the character segmentation is needed to recognize character strings one by one, and the effect of character segmentation directly affects the recognition accuracy. Character segmentation can be realized by using connected domain labeling method and horizontal or vertical projection method [3, 13]. There are some algorithms to effectively divide the characters typed serially in horizontal setting or vertical setting, e.g., character segmentation algorithm based on eigenvalue, region maximum segmentation algorithm, and character segmentation algorithm combining the improved color filling algorithm with the improved dripping algorithm [1416]. For the nonlinear segmentation of Roman handwritten characters, the suspected character boundary of cursive script was searched by heuristic derivation, and the effective boundary was screened out by an integrated neural network. The top-down handwritten text line segmentation method was used to realize the character segmentation of nonspaced handwritten documents through a detailed enlargment [17, 18]. To deal with the segmentation of embossed characters in low-quality images with the uneven brightness, the iterative closed-loop feedback segmentation method based on segmentation effect evaluation function was viable [19]. Study [20] proposed a segmentation algorithm of cohesive characters based on the optimal segmentation path, which improved the segmentation effect and accuracy of detonator coding.

After the characters in a string are segmented individually one by one, in some scenes, the convolutional recurrent neural network (CRNN) as an algorithm of segmentation and font recognition realized the recognition of steel slab number and overcame the problem of character adhesion that traditional image processing algorithms cannot solve [10]. Google Tesseract-OCR character recognition engine was effectively applied to the situation of English character recognition [21]. A CNN algorithm can recognize text, and there are several methods, including GA-SVM algorithm, transfer learning method, character recognition method based on capsule network, and number recognition algorithm based on discriminant vector [2224]. OCR technology has a high recognition rate for the horizontal text with regular distribution, but there are some problems such as illegible handwriting, inaccurate positioning, difficult segmentation, and low recognition efficiency for the circular text information marked by laser. Deep learning can quickly identify characters, however, its modeling depends heavily on a large number of training samples. For the conditions of the small samples or difficult sample acquisition, the recognition accuracy of deep learning model would be regressed. In this paper, the image clarity is improved by denoising and enforcement treatment, the projection segmentation method based on the inverse polar coordinate transformation, which is used to accurately segment and extract individual characters, and the HOG features of characters as the inputs are used to train SVM classifier. All the characters allocated circularly on the disc workpiece are identified automatically. Denoising can remove noise from noisy images and restores the original image form. The goal is to learn from the transforming between the source and target domains. The flowchart of the identification algorithm proposed in this paper is shown in Figure 1.

Figure 1 shows us the flowchart of the proposed method. The initial step in the proposed method is the selection of an input image, it aims at removing noise and enhancing it in the second step. The process of positioning of character area mainly takes place in steps 3 and 4 as shown in Figure 1. In the next 4 steps, features extraction, segmentation, polar transformation, and character area positioning adjustment are performed. In the final step, marker identification is done through the SVM classifier.

Based on the above-mentioned problems and our proposed solution, we can list out the main contributions of this paper as follows.(1)This paper proposed an improved HOG-SVM method for marker identification of disc workpiece.(2)This paper proposed to use the denoising method to eliminate small connected areas on the premise of ensuring the integrity of characters.

The remainder of this paper is organized as follows: Section 2 presents the literature review of related studies on the research topic. Section 3 and 4 present the positioning and segmentation of workpiece labels, respectively. Section 5 presents character recognition based on HOG-SVM. The summary of the proposed research, its results and main findings are presented in Section 6.

2. Literature Review

Track workpiece is advantageous for forging technology. A product quality can be analyzed by matching the physical workpiece with the controlling process knowledge. Workpiece tracking was performed in [25] by tagging experiments and reviews. However, printed codes can bias the DIC based identification and fail to identify the engraved codes due to bad lighting. Therefore, a standard system is needed for improved results.

Heterogeneous surface markers were studied in [26] to track workpiece surface with the help of high-speed imaging. The identification of certain strain fields was performed by calculating the relative displacement of heterogeneous surface markers.

To log and track new raw materials for a quick pull is a complex job. More complexity is added by the lack of workpiece stack without appropriate logs. A recent research proposed a method based on logging the visible part location as well as timestamps. A graph-based model was used to highlight the part interactions and stack formation for those parts which are not directly observable [27]. The proposed research has been validated by conducting simulation and experiments. This research work has potential to gauge the marker identification of disc workpiece by extending it.

Machine visions have been applied recently to solve the problem of identifying the location of scattered workpieces [28]. The proposed approach aims to segment the adhesive workpieces and performs their extraction by speeding up the robust features. SVM model has been applied to the proposed research. The result shows that positioning error is low as expected in the study. The SVM can be used in the current study by working as a workpiece marker recognition classifier.

3. Positioning of Workpiece Label

3.1. Coarse Positioning of Workpiece Marker

Accurately knowing the location of the workpiece marker is a necessary prerequisite for its segmentation. According to the features of the circular distribution of the workpiece marker in the synchronization ring, combined with the design size requirements, the workpiece marker region is located coarsely firstly, and the disc object to be detected is shown in Figure 2.

The gray image is swept by a circular window with a diameter slightly larger than that of the external profile of the synchronization ring to be measured. When the gray values of the pixels at the boundary of the circular window are 255, the ROI (region of interest) of the workpiece is extracted, as shown in Figure 3.

The ROI refers to a target area in the given image that plays an important role in improving the accuracy and efficiency of background information regarding its processing and detection.

In order to improve the contrast between the character and noncharacter zones, the gamma transform is used to enhance the image expressed as follows:where is gray value after gamma conversion, is the gray scale factor, is the gray value of the image, and γ is a factor to determine the degree of the whole transformation. Image enhancement contrast of character area is shown in Figure 4.

According to the design size of the synchronization ring and the geometric characteristics of the character allocations, the character region position can be obtained by referring it to the diameter of the dedendum circle of the synchronization ring. The dedendum circle diameter and tooth height are accurately extracted to coarsely locate workpiece marker, by which the diameter of dedendum circle is calculated using dimension measurement method.

The Canny edge detection method is employed to extract the contour of the workpiece. It is a multistep method used for the detection of edges from an input image. The center of synchronization ring is determined coarsely by centroid method expressed as follows:where and are the coordinate of the center of the synchronization ring in the pixel coordinate system, A is the point set of the outer contour, and N is the number of the outer contour pixel points. A centroid method is generally applied to localize the node. Therefore, the centroid method works as a sub-pixel location positioning.

The distances from each outer contour point and tooth root point to the center of the synchronization ring are calculated based on the geometric configuration of the synchronization ring. The least square method is used to fit circles for the tooth vertex and tooth root point. The circle is expressed as follows:where a and b are X and Y coordinates of the centers of the addendum circle or dedendum circle, respectively, and r is the corresponding radius.

According to the principle of minimum sum of squares of distances required by least square fitting, there are some definitions as follows:where formula (4) is substituted into equation (3) and the parameters in (3) are expressed as follows:

Therefore, the diameters (2r) of the addendum circle, the dedendum circle, and the actual coordinates (a, b) of the centers of the circles can be determined, and the coarse positioning of the workpiece marker for the synchronization ring is realized, as shown in Figure 5.

To implement character segmentation algorithm based on projection method requires inverse polar transformation of Figure 5. In order to prevent the expansion line from being lain in the character area, it is necessary to accurately locate the character area and rotate it to a proper position. Firstly, after coarsely positioning the image is binarized with adaptive threshold algorithm, as shown in Figure 6. The small noise in binary image is eliminated by morphological opening operation. According to the boundary tracking algorithm, the topological structure of the area where the label in Figure 6 is located is analyzed, and the ring contour mask is constructed. By using mask and image to perform bitwise exclusive or operation, removes the inner and outer contours of the circle, and determines the position of the character area. The processed result is shown in Figure 7.

The denoised character region is processed with morphological expansion, which makes the adjacent connected components merge to form an integral region containing all label characters. If the minimum circumscribed rectangle of the connected component is obtained, the position of the character area can be determined according to the center of the dedendum circle and the center of the minimum circumscribed rectangle. Therefore, the corresponding rotation angle can be determined.

The minimum circumscribed rectangle is shown in Figure 8. The arc area occupied by the characters corresponding to θ in the image realizes the positioning of the characters.

4. Segmentation of Workpiece Label

Segmentation algorithm is a common character projection method. However, the projection segmentation based method is only suitable for the traditional linear distribution of character images. Therefore, in view of the circular distribution of characters involved in this paper, it is necessary to reverse the polar coordinate transformation of the character area and expand the circular character area into a rectangle, so that the circular distribution of characters can be transformed into a linear distribution. The processed result is shown in Figure 9.

Canny edge detection is performed on the expanded character area to obtain the edge image of the character area, as shown in Figure 10. After applying the steps of Candy edge detection, we were able to get the following results.

Morphological operations of Canny edge detection method were introduced. The first operation is known as “close operation” that smooth the contours and fills the gaps in a contour. On the other hand, the second method “open operation” contours the objects and breaks the narrow strips [29]. Based on the above-given morphological operations, the close operation is used to fill the minimum holes in the characters and enhance the characters, and then open operation is used to eliminate tiny noise. Binarization of the character area is used to construct the mask image. In order to eliminate the upper and lower boundary lines, the height of the mask is slightly less than that of the character area, so the mask image is corroded. The upper and lower boundary lines can be eliminated by operating on the edge image and mask image, and the effect is shown in Figure 11.

There are still a few large-size noises in the image, which would affect the efficiency and accuracy of projection segmentation and need to be removed. However, the traditional filtering algorithm and morphological operation have been unable to eliminate large-size noise on the premise of ensuring character integrity. Therefore, a denoising method is used to eliminate small connected domains. Therefore, a boundary tracking algorithm is used to detect the connected component in Figure 11, calculate the threshold according to the connected component, and screen the connected component of characters. Later we put the connected component of the filtered character into a new image, and the processed result is shown in Figure 12.

Projection segmentation algorithm includes horizontal projection and vertical projection. The horizontal projection is used to determine the number of lines of characters or the heights of character areas, and the vertical projection is used to determine the width of each character. By projecting horizontally and vertically image in Figure 12, the region where the characters are located can be determined, as shown in Figure 13. According to the projection histogram, the characters are divided and saved. The results are shown in Figure 14.

Figure 14 shows segmentation results based on the projection method. The segmentation results were drawn after using projection histogram from Figure 13.

5. Character Recognition Based on HOG-SVM

5.1. HOG Feature Extraction of Character Image

HOG algorithm can represent the edge or shape information in the image in the form of gradient direction histogram [30]. HOG features are extracted from the segmented single-character images, which are used as input into SVM as feature vectors for training to obtain a character recognition classifier. The process of extracting HOG features of an image is as follows: firstly, the image is divided into a plurality of cells, and each cell is composed of numerous pixels. Secondly, the gradient direction histogram of all pixels in each cell is calculated. The interval composed of several cells is called a block, and an image can be divided into several blocks. Finally, the cells in each interval are normalized to obtain the final HOG features.

The dimension of HOG features is determined by image size, cell size, block size, and other parameters, and the specific calculation formula is as follows:where represent the width and height of the image, respectively, indicates the dimension of bin in each cell, indicates the size of the block, indicates the size of the cell, indicates the step size of block movement in the image. In order to avoid the feature vector dimension being too large and reduce the recognition efficiency, the image size is usually adjusted during training of a machine learning classifier and reduce the feature vector dimension. The HOG features extracted from the segmented single character are shown in Figure 15.

Figure 15 shows us the extraction of both numeric and English letter HOG characters. As one number (3) and single letter (R) are used for HOG extraction, it refers to a single character HOG.

5.2. Character Recognition Based on SVM

Support vector machine (SVM) is a commonly used machine learning classification algorithm. The principle diagram of SVM classification is shown in Figure 16.

Figure 16 shows us the schematic diagram of the proposed SVM classifier. Assuming that there are two types of sample points in two-dimensional space, which are linearly separable, it is necessary to find hyperplane A and separate the two types of sample points. Suppose the expression of the hyperplane iswhere is applied to control the direction of the hyperplane. andintercept b are used to control the hyperplane position.

Each is assigned a category label , that is, add category label to each , each add a category label. , is

The goal of SVM is to find a hyperplane that maximizes the classification interval , and , the problem is transformed into finding the maximum value of the distance d from the support vector to the hyperplane, and its expression is shown in the following formula:

The problem is turned into calculating the minimum of , then the optimal hyperplane needs to meet the conditions as follows:

In the case of linear inseparability, it is necessary to introduce a kernel function, which is used to map samples to a higher dimensional space and make samples linearly separable in the new dimensional space. Compared with the traditional classifier model, SVM has higher accuracy in solving small sample data classification.

In this paper, the HOG-SVM algorithm is used to construct a character recognition classifier, and the training process is as follows:(1)We process input images to locate character areas and segment characters. Then, we build sample library, mark according to character types, and divide into training set and test set.(2)Afterward, we normalize the image size to 48  48 and extract HOG features from the normalized image.(3)We use input features into SVM classifier for supervised training.

Through the above steps, the SVM character recognition classifier is obtained. The SVM model parameters used in this paper are shown in Table 1.

We normalize the size of the image to be recognized to 48  48, extract the HOG feature of the character image, input it into SVM classifier to recognize the character, and finally return the character recognition result.

In this paper, 600 character pictures from different camera angles and different lighting conditions are selected as training samples. There are 200 character pictures as testing samples. The overall recognition rate is shown in Table 2.

Two categories of test samples (letter and number) are listed along with the number of test samples, correct identification quantity, and recognition accuracy rate. Test samples (A, E, F, S, and T) denote the letter category and (1, 2, 3, 5, and 6) refer to number category (Table 2). Each test sample in two categories contains 20 test samples.

The average time consumed is 6.85 s, and the result show that that character segmentation recognition method proposed in this paper has a good recognition effect on the labels of disc-like workpieces distributed in a ring shape.

There is a slight difference in the correct identification quantity between two categories. Letter category of test sample gained 97% correct identification from the proposed approach, and number category gained 98% correct identification. The results show that the proposed approach is equally significance for the identification of letter and number characters.

SVM classifier is usually applied to dichotomy issue, and this research required to test five samples in each of two categories. There were 20 test samples in each test, as shown in Table 2. Comparing recognition accuracy rate results of a study [31] as 93.6893% with this study, we can conclude that the proposed research is better than the existing work. This improved recognition accuracy rate might be due to size and training of SVM classifier in this study. In another study [32], character recognition accuracy was obtained as 94.43% using SVM classifier along with the feature extraction algorithm. This accuracy rate is less than the accuracy results achieved in our research work. Generally, using lower training cycles provides a better accuracy as compared with the higher training cycles.

Present research mainly uses recognition accuracy rate as an evaluation measure for a classification method. A few more evaluation measures, such as build time of a classifier, precision, and misclassification rates have been widely used in the literature [33]. This study shows a limitation in using these measures. Other than these missed measures, mean absolute errors (MAE) and root mean square error (EMSE) [34] can be applied to evaluate the classifiers for the classification and prediction issues.

6. Conclusions

In this study, a character segmentation and recognition based on projection method are proposed and implemented to identify the markers of disc-like workpieces with the circular distribution.

This study proposed to construct a character recognition classifier using the HOG-SVM algorithm for marker identification of disc workpiece. A dataset has been used to evaluate the proposed HOG-SVM algorithm. The authors have used a number of test samples from this dataset to train and evaluate the proposed algorithm. The experimental results show that the recognition accuracy rate of annular distribution markers of disc-like workpieces is over 97%, which is better than state-of-the-art approaches. Therefore, HOG-SVM classifier has been selected as a best classifier impartially. However, the evaluation of the proposed algorithm can be extended by using some popular evaluation measures in future works. This can enhance the robustness of the proposed algorithm for different real world recognition and prediction issues.

Data Availability

The data used to support the findings of this study are included within the article.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

This work was supported by the Key Industrial Chain Project of Shaanxi Province (No. 2021ZDLGY 10-07) and the Scientific-Technological Innovation Projects in Strategic Emerging Industries of Shandong Province (No. 2017TSCYCX-24).