Reconstruction and Recognition of Label Adhesive Characters Based on Adaptive Positioning

Chinese Image Pictogram Journal of Image and Graphics è¡© All 886895 China Image Graphics Signage Adhesive Characters Adaptive Positioning Segmentation Reconstruction and Recognition Hong Tao Liang Weijian Lu Yufeng School of Quality and Safety Engineering, China Metrology Institute, Hangzhou 310018, a sign adhesion Character adaptive positioning segmentation reconstruction recognition algorithm. The method firstly performs pre-processing such as median filtering and binarization on the sign image. Secondly, it uses the mathematical morphology method to open and etch the pre-processed image; remove some useless information between characters and remove the large character spacing; The centroid algorithm finds the geometric center of each character, and uses the Sobel edge detection operator to obtain the ROI (regionofinterest) according to the geometric center. Then, the ROI (regionofinterest) is returned to the original image. The established ROI is used to segment the characters according to the national character spacing. Correlation standard, after adding a rectangle of a certain pixel width after each character to be divided, reconstruct the character image, and then perform CR (optical character recognition recognition) character recognition. The result was character recognition on 993 signs. It can be seen that the current recognition rate of the sign characters is not high. The inaccuracy of the segmentation of the constricted or interlaced characters is one of the main reasons for the error. Accurately dividing the constricted or interlaced characters becomes the key to improve the recognition rate.

At present, the commonly used character segmentation methods are mainly classified by strategy: direct segmentation strategy, recognition-based segmentation strategy and hybrid improved segmentation strategy. The methods based on direct segmentation strategy mainly include projection method, cutting method based on target geometric characteristics and related improved algorithms. These methods are mainly applied to characters with clearly separated spacing, but the segmentation of characters for adhesion or overlap is not accurate, such as (a ) shown. The methods based on the recognition segmentation strategy mainly include recursive segmentation algorithm, finding the shortest path method and the identification optimization method. These methods have many complex uncertainties and are affected greatly. The segmentation results are too dependent on the performance of the recognition classifier. The phenomenon is shown in (b), and the recognizer requires a large amount of data training, and the overall segmentation efficiency is not high. The algorithm based on hybrid improved segmentation strategy combines direct segmentation strategy with recognition-based strategy. Many times it is only for a specific problem and lacks versatility. For example, the license plate character segmentation algorithm proposed by Zhang Yungang et al. using Hough transform and prior knowledge needs to be based on prior knowledge and can only be applied to license plate character segmentation, which lacks versatility. The character segmentation method based on cluster analysis proposed by Chen Li et al., according to the principle that a pixel of the same character constitutes a connected domain, and combined with prior knowledge for segmentation, the method is easy to make the connected element fragmentation not suitable for adhesion or breakage. Segmentation of characters. Aiming at the technical difficulties existing in the current squeezing or staggered blocking character segmentation, a new algorithm based on centroid algorithm for character adaptive positioning and frame segmentation reconstruction is proposed. This paper proposes a new idea of ​​blocking character cutting, which firstly passes the geometric centroid. The algorithm obtains the centroid of each character, and adaptively locates each character border according to the character centroid and then divides and reconstructs the character.

The transfer segmentation is better than the other effect. The traditional character recognition method recognizes the effect. 1 The overall framework of the algorithm. After the image preprocessing, the algorithm obtains each character centroid through the geometric centroid algorithm, and adaptively locates according to centroid. Each character border is divided into a character trace process according to the centroid and border of each character as shown. Firstly, the sign image is pre-processed by median filtering and binarization to reduce external interference. Secondly, the pre-processed image is opened and etched by mathematical morphology method; some useless information between characters is removed. Character spacing; then find the geometric center coordinates of each character through the centroid algorithm, and obtain the ROI (regionofinterest) by the Sobel edge detection operator according to the geometric center coordinates, and then return to the original image to utilize the established ROI. The character is segmented from the character, and according to the national character spacing related standard, the character map recognition is reconstructed after adding a pixel interval of each pixel after each character is divided. In this paper, the centroid algorithm locates each character center and then uses edge detection to obtain the border, then cuts out the characters and then reconstructs the image, which solves the problem of vertical cutting of tight or staggered sticky characters.

2 Signage image preprocessing The image captured by the black and white camera to collect the signage image is as shown. The image captured by the black and white camera is a 256-level grayscale image that can be directly processed.

Since the median filtering is not a simple averaging and does not affect the step change and the ramp change of the image, the median filtering can better preserve the edge portion in the original image while suppressing the random sound. The median filtering effect is as shown, (b) the background is smoother relative to the (a) character, which is more conducive to the independence of the characters from the background after binarization.

07 national electric company No brand original cabinet like D4 a national electric H company No 1 / branch 2.2 adaptive binarized sign image after median filtering, hope to highlight the character information and the background sound can be completely removed; The target character is separated from the background. Binarization is an important and basic technique for digital image processing. It is to re-assign gray value by threshold judgment. It is also possible to separate the target from the background and binarize it. The necessary process is convenient for extracting the geometric center coordinates of the characters. In order to facilitate the binarization of the sign characters and the background, it is necessary to enhance the image of the sign image to highlight the character information and weaken the background. Image enhancement is to use specific enhancement methods to highlight certain information in the image according to the specific application scene and the blur of the image, and to attenuate or eliminate the irrelevant information to achieve the purpose of emphasizing the overall or local features of the image.

The logarithmic transformation in the nonlinear transformation of the spatial domain using image enhancement technology can extend the darker pixels in the image, while compressing the black in the brighter image of the eyebrows to enhance the whiteness, which weakens the background and enhances the target character. And suppress the sound, which is good for separating the sign characters from the background.

The logarithmic transformation formula is the degree value, (x,) is the input image point (x,) gray value /min(x,) is the minimum value of the input image pixel gray level, which is a constant, which can make the maximum gray of the output image The degree value is 255. If fmax(X, y) represents the image pixel grayscale maximum value, c can be expressed as the signage image is binarized after image enhancement; I separate the signage characters from the background. Binaryization is determined by determining a threshold value. Each pixel of a gray-scale image of a bar is classified into two types of pixels whose gray value is lower than the threshold according to its gray value; I its gray value is given a value, and the gray value is high. A pixel at or equal to the threshold is classified into another class, and its gray level is assigned to a value. To separate the sign characters from the background, reassign the pixel values ​​to either black or white, separating the characters from the background. Let T be the binarization threshold. If the pixel gray value in the image is lower than the threshold T, the gray value is set to 255. If the gray value is higher than or equal to the threshold T, the gray value is assigned to the value 0, after binarization. The background becomes a black character in the sign image and turns white so that the character and background are separated.

Degree value.

It can be seen from equation (4) that one key to binarization of grayscale images is to find a suitable threshold. Most of the existing image binarization methods are not adaptive. The Otsu method is not only difficult to meet the image processing requirements with small difference between the target and the background gray level, but also the calculation amount is too large, and it is difficult to have high real-time requirements. Under the application. The threshold is a ruler that separates the image from the background. Choosing the appropriate threshold is to preserve the target information as much as possible, and to minimize the interference of the background and sound. In this paper, the binarization threshold T is automatically acquired by the gray mean value, and the binarization effect is good.

First, the gray value of each pixel is obtained, and then the weighted average of these gray values ​​is used as the threshold. The formula of the threshold is the ROI area competition; V is the height of the ROI area, and the ROI is the character detection area. The key to a selected threshold to determine a weighting coefficient, a is determined by the degree of influence of interference background image, if a target made of a shape comparison coriander extract too sharp, but the possibility of false targets due to background noise is relatively large conventional two When the value method is used to binarize the sign image, there is interference in the image after the binarization of the image interferes with the binarization, which affects the character recognition plus (a). The reason why the image is interfered after the traditional binarization method is mainly because the gray value of the spurt point is close to the value of the gray value of the character. The setting of the weighting coefficient a of the spur point is not removed in order to remove the interference of the spur point. Without losing character information. Since the gray value of the spur point is close to the gray value of the character, it is difficult to achieve a satisfactory effect by directly taking the mean value of the gray value of the image as the binarization threshold, and the selected threshold T should be close to the character gray value without affecting the character binarization. Therefore, it is first necessary to calculate the proportion of the sign characters in the entire sign image, and the mean value obtained according to the proportion is closer to the character gray value. In order to find the proportion of characters in the sign, take a sign design template to do the binarization of the characters are assigned to white, the background is assigned to black. After binarization, the number of character pixels is determined to be n according to the black and white pixel value. If the width of the sign template is M' and the length is N', the proportion of the characters in the sign is the value of the characters after the binarization is set. White, back as improved - the effect of the binarization effect is black, so this adaptive threshold method can automatically adjust the threshold with the background and target characters. After binarization based on the ROI detection region pixel gray mean value adaptive threshold method, the background interference can be well removed while retaining the target character information, as shown. It can be seen that there is background interference in the traditional binary image method, and the image is well removed by the improved binarization method.

3 adaptive positioning and bordering algorithm 3.1 Mathematical morphology operation after the median filtering and binarization, only the target character and the background are separated. Since the characters are stuck together, the characters are still not separated. Information causes characters to be difficult to identify, so remove redundant information. Using mathematical morphology methods to refine characters to increase character spacing is beneficial for sticky character recognition. Mathematical morphology is a non-linear signal processing tool that breaks down a complex signal into physically meaningful parts and strips it away from the background while maintaining its main shape characteristics.

The most common basic operations in mathematical morphology are corrosion, expansion, open operation, and closed operation. Based on the two basic operations of corrosion and expansion, various other operations can be derived.

Discrete function on =(0,1,A1), defining the sequence structure element g(n) as a discrete function on G = (0,1, knife-1), and then f(n) on g(n) The corrosion is corrosion, which has the effect of reducing the target inner hole and the external isolated sound elimination; the expansion is the process of merging all the background points in the image that are in contact with the target object into the object, and the result is to increase the target and the hole. Zoom out to fill the holes in the target and form a connected domain.

The opening operation of f(n) on g(n) is a closed operation in which the expansion after washing is called open, and the open operation can remove isolated small dots, burrs and bridges, and the total position and shape are unchanged; The post-corrosion process is called a closed operation, which has the effect of filling small holes in the image of the object to connect adjacent objects and smooth the boundary.

Since the sign character sticking first opens the sign character, removes the possible isolated points, burrs and bridges between the characters, and then erodes the characters to open the character spacing algorithm as shown in the figure.

Adhesive characters are mathematically opened and etched as shown. It can be seen that after a certain number of opening operations and corrosion, the character spacing can be increased to facilitate the segmentation of the glue characters, but at the same time, the character information is lost because the corrosion is too serious. Since the sign characters use different fonts and the degree of corrosion is different, the characters should be etched according to the specific situation. According to the characteristics of the smart meter sign characters and a large number, the point at the center of the middle character is the geometric center coordinate point of each character positioned by the centroid algorithm.

The centroid algorithm needs to be binarized to separate the target from the background to get the initial centroid position of the target. An image with few backgrounds and few sounds generally has a good effect on the centroid algorithm, but for images with complex backgrounds and more sounds, there is a certain difficulty in extracting targets. An improved centroid algorithm is used. The stability and accuracy of the centroid algorithm is mainly determined by the threshold segmentation. The improved centroid algorithm uses the adaptive threshold for binarization. The adaptive threshold binarization method has been listed separately.

3.3 Adaptive Fixed Frame After the mathematical morphology method and the centroid algorithm, the geometric center coordinates of each character are found. It is necessary to find the border of each character based on the geometric center coordinates, which can be determined by the geometric center coordinates and the border of the character. One character. The Sobel edge detection operator obtains each character border according to the geometric center coordinates. The steps of determining the border are as follows: determining the abscissa, and performing edge detection by using the Sobel edge detection operator on the left and right sides of the character respectively through the geometric center coordinates. Let the coordinates of the geometric center of the character be (x.,.), and the coordinates of a series of points detected along the geometric center coordinate to the left edge. Their horizontal coordinate sequence is Xl, and X1 is taken as the left horizontal coordinate of the character frame.

Similarly, the coordinates of a series of points detected along the geometric center coordinate to the right edge, whose horizontal coordinate sequence is Xr=Xr1, take Xr as the right horizontal coordinate of the character frame.

Determine the ordinate, and use the Sobel edge detection operator to perform edge detection on the upper and lower sides of the character through the geometric center coordinates. The coordinates of a series of points detected along the geometric center coordinate to the upper edge, their ordinate series is = yt1, t2, and Yt is taken as the ordinate above the character frame.

Similarly, the coordinates of a series of points detected along the geometric center coordinate to the lower edge, whose ordinate series is A=yM, take Yb as the ordinate below the character frame.

The centroid algorithm and edge detection are used to adaptively position and frame the three different versions of the characters. The effect is as shown. The three versions of the characters first use the centroid algorithm to find out the shape of each character (4) version of the wood 37 symbol 泞 shape heart tv 丨 and edge detection selection effect m text algorithm adaptive positioning to set the border, due to tightening or staggered adhesions It will affect the centroid of each character, and the glued characters can also be treated as a single character, so the centroid algorithm can well find the character centroid and separate each character separately. After the centroid algorithm finds the character centroid, the edge detection is used to determine the border of each character, and the center of the character and the border are obtained to establish the ROI area of ​​each character, such as the rectangular box. The results show that the algorithm can well separate each character of different versions.

It can be seen that because the character size is different, after positioning and setting the border, the border size of each character is also different. Adding the R0I directly according to these borders; using the established R0I to cut the characters in the original image, the characters to be cut The size is definitely not the same, which is not conducive to character reconstruction, affecting character recognition. Therefore, the characters need to be normalized before the characters are reconstructed. The normalization process is to normalize the borders containing each character.

Through the centroid algorithm and edge detection, the border of each character is determined. It is assumed that the border of a character is a rectangular frame that is fixed by (not, Yt, Yb>, and normalization is to normalize the rectangle. The steps are as follows: 1>Because each character needs to be split with the characters on the left and right sides of the character, the left and right horizontal coordinates of each character rectangle should be as close as possible to the respective characters in order to separate the sticky characters. This is also the core of the blocking character segmentation. Therefore, the left and right abscissas of the sea character border remain unchanged during the normalization process.

Suppose the upper ordinate series of a set of character borders is Yt = FM, Yw. Since the ordinate of each character in a group of characters is different, the size of the cut characters is different, so the normalization of the rectangle is actually vertical. Normalization of coordinates. The normalization of the ordinate must include the original character, so take the minimum value of the ordinate as the new upper ordinate of all characters, and take the maximum value of the ordinate as the new lower ordinate of all characters.

It is assumed that Ftmin is the minimum value of the upper ordinate sequence of the character frame, and Yb is the maximum value of the lower ordinate sequence of the character frame, that is, in order to make the normalized character in the middle of the image, the upper and lower ordinates are transformed. Subtracting d unit pixels from the upper ordinate to the lower ordinate plus d unit pixels, the frame is normalized to the lower ordinate.

After normalization, each character border is fixed by (no, Ytmin - dbmax + d).

After the character border is normalized, the ROI is established and then returned to the original image to determine the split box of each character. The split box in the original image is as shown. Each of the character segmentation frames is framed by the centroid algorithm and the edge detection adaptive positioning frame, and then normalized, and the segmentation frame can accurately select each character.

4 character segmentation reconstruction 4.1 character segmentation According to the segmentation box in the segmentation of the characters, the segmentation of the characters as shown in 0 can be seen that each segmentation of the characters can be well separated from each other and maintain their character characteristics.

4.2 Normalized reconstruction After character segmentation, the efficiency is improved for easy identification; the segmented characters are reconstructed on an image for recognition. When the character is reconstructed, the divided characters need to be arranged and reconstructed according to the original character sequence, and the rectangular spacing bar with the distance d (greater than the national character spacing standard) is added to the character to increase the character spacing for easy identification.

It is determined that the character reconstruction order is sorted according to the horizontal coordinate of the left side of each character frame. Suppose the series is full = XU12, X is the set of characters on the left side of the character frame obtained by the centroid algorithm and edge detection. When rebuilding, you need to sort according to the size of the left horizontal coordinate. Set > not 2 >> No, when the character is reconstructed Sort the characters according to the sequence Xi=Um person 4.

Rectangular spacers need to determine the race, height, and fill color, which is the key to character reconstruction. In theory, when the character spacing is 1 pixel, the characters can be individually recognized without sticking to the traditional character recognition method. However, due to noise and other interference, and in order to improve the accuracy and stability of character recognition, in order to make the reconstructed character spacing large enough for character recognition, select the interval rectangle bar competition d' (larger than the national character spacing standard) pixel. The height and the normalized character border are the same height. The choice of the rectangular spacer fill color is the core of the character reconstruction. The fill color must be clearly distinguished from the character, and it should be as close as possible to the background color. Intervaling each character does not affect character recognition.

In this paper, the mode of the pixel value of the sign background is used as the color of the fill color. The effect of the character reconstruction is shown in Fig. 1. It can be seen from 1 that the spacer can adapt the background well and does not affect the character recognition.

The 1 split character is adaptively added after the rectangular spacer is added. After the 3 character recognition characters are reconstructed in a certain order and a rectangular spacer is added, the characters are increased and the characters are no longer glued and easily recognized, and the recognition accuracy and stability are obviously improved. The character recognition effect reconstructed according to the algorithm of the present invention is as shown in 2.

孑符原阁 "1 adapt to positioning and set the edge of the crop (d return to M map to select 7 ul) 榀 according to the edge cut t: (a magical a 竽 ( ( (1) Yu Fu i only - 3 algorithm segmentation The reconstruction recognition process diagram uses the algorithm of this paper and the projection method or the recursive segmentation algorithm to simultaneously recognize the character effects on the same image as shown in 4 and 5. Among them, the correct recognition character is the projection method or recursive segmentation. The algorithm recognizes the effect after segmentation.

It can be seen from the experimental results that the algorithm can well recognize the characters in the signboard, and has a high recognition rate for the compact or staggered sticky characters that are difficult to identify by the projection method and the recursive segmentation algorithm. In the 993 signboards of different character versions, the correctly recognized sign 945 blocks of 48 unrecognizable signs, 48 ​​pieces of unqualified manual signs, mainly due to serious interference such as film and sign wear, the sign characters are difficult to identify. Therefore, tb) projection method splits the effect along rEUg--(This paper compares the method with the investment method and the A(c) woody method. 4 The algorithm and the projection method are compared. The recognition accuracy of the algorithm is 95. 7%. At the same time, in order to increase the contrast, the projection method and the recursive segmentation algorithm are used to segment and identify 993 different character versions of the signs respectively. Their recognition rates are 81.5% and 86.3% respectively. Experiments such as 6,6 images are at the top left. The recognition character of the first line is the recognition effect of the algorithm in this paper. The character recognized by the second line in the upper left is the projection method or the recursive segmentation algorithm. The experimental results of the recognition effect are shown in Table 1. Table 1 The total number of signage characters in the label recognition result The algorithm recognition rate/% The recognition of the number can not be counted. The algorithm of the cut-off method is based on the image analysis of the successfully recognized sign characters. The algorithm is very suitable for the signage images of various layouts.

A small number of signs failed to be identified, mainly due to the wear of the signs and the interference of the film on the sign characters, coupled with the influence of the workshop environment and lighting conditions, making it difficult to correctly identify the sign characters even if they are accurately segmented.

6 Conclusions Aiming at the characteristics of signage characters, an adaptive positioning and segmentation reconstruction recognition algorithm for adhesion characters is proposed. Through median filtering, binarization separates the target character from the background, and then mathematically opens and erodes the target character. It has a large character spacing; finds the center of each character through the centroid algorithm and passes Sobel operator performs edge detection to find each character border to establish roi and then return to the original image. Use the established roi to segment the characters. After each character is divided, add 5 pixels of the rectangular spacer strip to reconstruct the character image and then perform OCR characters. Identification. Experiments on segmentation and reconstruction of a large number of signage images show that compared with the traditional character recognition method, the proposed algorithm can accurately identify the squeezing or staggering glue characters and has strong anti-interference ability. The algorithm has a simple and simple effect and is not subject to the versatility of the sign layout.

This paper is mainly applied to the range where the signage or staggered glue characters can be separated by a certain method. The next research direction is how the glues are too serious or the overlapping characters are divided and reconstructed.

Sachet Bag Hotel Amenities Set

YANGZHOU PENGYOU TOURISM SUPPLIES FACTORY , https://www.yzpengyou.com