Instrument text line positioning method based on directional voting

Through the text clustering algorithm based on direction voting, the problem of difficult character orientation positioning is solved in the collection of water and gas meter meter meter measurement data, efficient recognition and positioning is achieved, and the robustness and efficiency of the intelligent meter reading system are improved.

CN110210473BActive Publication Date: 2025-01-17SUNTRONT TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201810166674.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-02-28
Publication Date
2025-01-17
Estimated Expiration
2038-02-28

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

The present invention discloses an instrument text line positioning method based on direction voting. The method first obtains text fragments through stroke character detection on an image, then divides the image into smaller cells for regional field search to obtain adjacent text area pairs, and then performs text direction voting on the adjacent area pairs to determine the direction of the local text area. Finally, the text fragments located in each local direction are found and spliced ​​together to clarify the text line.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of meter reading recognition, and in particular to a method for locating meter text lines based on direction voting. Background Art

[0002] With the rapid development of urbanization, water, electricity, gas and heat meters have become standard meters for modern residences. In view of the needs of energy metering, charging and management, how to effectively collect metering data of various meters has become a huge problem faced by management departments. In the past few years, my country has successfully and large-scaled the application of a series of intelligent technologies such as intelligent metering, data collection and remote control in the field of residential electric energy meters. However, the development of this work in the field of water, gas and heat is slightly slow. This is due to both economic factors such as price and technical difficulties caused by the working characteristics of water and gas meters themselves, resulting in the intelligent level of water and gas meter reading far behind that of electric meters. However, with the country's emphasis on energy consumption and the rapid development of electronic technology, many new technologies have been applied more to the field of metering instruments. For example, the camera direct reading technology based on CMOS image sensor chips has been applied in the remote meter reading system of water and gas meters, providing a new solution for solving the problem of water and gas meter metering data collection. Meter readers can use mobile phones to take photos and then automatically identify meter data, which greatly reduces the workload of workers and improves work efficiency. However, the recognition robustness of the algorithm based on mobile phone photo recognition has always been a difficulty. Many research institutions at home and abroad have not solved this problem well. Due to the usual installation position of water and gas meters, the photo results are not very ideal, with angles skewed, tilted, blurred, etc. This brings great difficulties to the direction positioning and recognition of characters. The present invention proposes a new method to detect the tilt angle and direction of characters. Summary of the invention

[0003] In order to solve the above problems, the present invention proposes an efficient text clustering algorithm based on text direction voting. First, the image is detected by stroke characters to obtain text fragments, and then the image is divided into smaller cells for regional field search to obtain adjacent text area pairs, and then the adjacent area pairs are voted for text direction to determine the local text area direction. Finally, the text fragments located in each local direction are found and spliced ​​together to clarify the text lines.

[0004] In order to achieve the above object, the technical solution of the present invention is as follows:

[0005] The instrument text line positioning method based on direction voting has the following specific steps:

[0006] S1: First, pass the image through the stroke feature point character detector. The character detector takes an appropriate threshold value to divide the text segments according to the strength of the feature points: pass the image through the stroke feature point detector. For a positive stroke feature point and its associated darker pixels , segmentation threshold : Strength value is slightly higher than The intensity of the darkest pixel is set to ; Similarly, for a negative stroke feature point , segmentation threshold : The intensity value is slightly lower than The intensity of the darkest pixel is set to , divide the text segments according to the obtained threshold;

[0007] S2: Divide the image into smaller cells, in each region ,in For a collection of text fragment regions, find all regions , so that and Adjacent, if and are two adjacent regions, then they are represented as , if the centroids of the two are close enough to each other after being normalized by their areas, and the two are of similar size, they can be written as:

[0008]

[0009] in It is a region The center of mass, It is a region The convex hull area of ​​​​the image is a simple search in a two-dimensional space point, so the search can be achieved by cutting the image into smaller cells, but it must be a search in the nearest cell;

[0010] S3: Each pair of adjacent regions votes for its text direction, where the text direction is given by a line passing through the two adjacent centroids. Each vote for the text direction is expressed in polar coordinates. Thus, vertical text lines can also be detected, and the two-dimensional parameter space is quantized into a fixed-size matrix, so that small differences in line parameters are eliminated, and the text directions with the highest number of votes (i.e., the direction pair with the most support numbers) can be easily found at the local maximum in the matrix;

[0011] S4: Each local maximum parameter , by calculating the line (or the distance is less than the quantum error) and arrange them in the direction of the line, which can clearly locate the text line. Since a region may have different parameters on different lines , so the local maxima are processed in descending order of their voting numbers, and each region is allowed to be included in a single text line. This process ensures that longer text lines are superior to shorter text lines and spurious text lines can be eliminated.

[0012] The beneficial effects of the present invention are:

[0013] The instrument text line positioning method based on directional voting of the present invention can efficiently identify the directional positioning of characters. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Attached Figure 1 The figure is a flow chart of the system of the present invention.

[0015] Attached Figure 2 This is the original picture of the instrument.

[0016] Attached Figure 3 The present invention uses a stroke feature point character detector, and the character detector takes a suitable threshold value to divide the text segments according to the strength of the feature points.

[0017] Attached Figure 4 The present invention obtains the direction of the local text segment in the cell after the nearest neighbor algorithm and the voting algorithm.

[0018] Attached Figure 5 The present invention obtains the text segment direction after the local direction is reduced. DETAILED DESCRIPTION

[0019] The technical solution of the present invention is further described in detail below in conjunction with specific implementation methods and accompanying drawings.

[0020] The instrument text line positioning method based on direction voting is mainly used in situations where instrument reading information is obtained by camera. The specific recognition steps are as follows:

[0021] Step 1: First, pass the image through the stroke feature point character detector. The character detector takes an appropriate threshold value to divide the text fragments according to the strength of the feature points; as shown in the attached figure Figure 3 As shown in the green box, the red dots are the stroke end feature points, and the blue dots are the stroke bend feature points.

[0022] Step 2: Segment the image into smaller cells, and perform a neighboring region search in each local area based on the centroid of the text segment to find the adjacent text pairs in this part;

[0023] Step 3: Use polar coordinates to represent the text centroid, and the text direction is given by the line passing through the two centroids of adjacent segments. Since the text direction is represented by polar coordinates, vertical text lines can be detected. Then vote on the text direction in this part to obtain the local maximum parameter, as shown in the attached figure. Figure 4shown.

[0024] Step 4: By calculating the centroids of all regions that lie on the line (or whose distance is less than the quantum error) and arranging them in the direction of the line, the text line can be clearly located, as shown in the figure below. Figure 5 shown.

Claims

1. The instrument text line positioning method based on direction voting, the steps are as follows: S1: First, pass the image through the stroke feature point character detector. The character detector takes an appropriate threshold to divide the text segments according to the feature point intensity: Pass the image through the stroke feature point detector. For a positive stroke feature point P and its related darker pixel P d , segmentation threshold θ p : Strength value higher than P d The intensity of the darkest pixel is set to θ p= max(I X )+1|x∈P d ; For a negative stroke feature point P, the segmentation threshold θ p : Strength value is lower than P d The intensity of the darkest pixel is set to θ p =min(I x )+1|x∈P d , divide the text segments according to the obtained threshold; S2: Divide the image into smaller cells, in each region r i ∈R, where R is the set of text segment regions, find all regions r j ∈R, such that r i and r j Adjacent, if r i and r j are two adjacent regions, then it is expressed as N(r j ,r i ), if the centroids of the two objects are close to each other after normalization by their areas, and they have the same size, they can be written as: Where C(r) is the centroid of region r, A(r) is the convex hull area of ​​region r. Since the region neighborhood search is a simple search in a two-dimensional space point, the search can be achieved by cutting the image into smaller cells, but the search must be in the nearest cell. S3: Each pair of neighboring regions votes for its text direction, where the text direction is given by a line passing through two neighboring centroids. Each vote for the text direction is expressed in the polar coordinate system ρ = x sinθ + y cosθ, so that vertical text lines can be detected. The two-dimensional parameter space (ρ, θ) is quantized into a fixed-size matrix to eliminate the differences in line parameters, and the text direction with the highest number of votes can be easily found in the local maximum in the matrix; S4: Each local maximum parameter (ρ, θ) can be clearly located by calculating the centroids of all regions on the line (ρ, θ) and arranging them in the direction of the line. Since a region may have different parameters (ρ, θ) on different lines, the local maxima are processed in descending order of their voting numbers, and each region is allowed to be included in a single text line.

Citation Information

Patent Citations

  • Multi-direction text detection method of natural scene

    CN105005764A

  • Document image direction detection device and document image direction detection method

    CN106485193A