WO2018086233A1 - Character segmentation method and device, and element detection method and device - Google Patents

Character segmentation method and device, and element detection method and device Download PDF

Info

Publication number
WO2018086233A1
WO2018086233A1 PCT/CN2016/113632 CN2016113632W WO2018086233A1 WO 2018086233 A1 WO2018086233 A1 WO 2018086233A1 CN 2016113632 W CN2016113632 W CN 2016113632W WO 2018086233 A1 WO2018086233 A1 WO 2018086233A1
Authority
WO
WIPO (PCT)
Prior art keywords
character
image
line
pixels
characters
Prior art date
Application number
PCT/CN2016/113632
Other languages
French (fr)
Chinese (zh)
Inventor
李红匣
Original Assignee
广州视源电子科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 广州视源电子科技股份有限公司 filed Critical 广州视源电子科技股份有限公司
Publication of WO2018086233A1 publication Critical patent/WO2018086233A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/148Segmentation of character regions
    • G06V30/153Segmentation of character regions using recognition of characters or words
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/148Segmentation of character regions
    • G06V30/158Segmentation of character regions using character size, text spacings or pitch estimation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/09Recognition of logos
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition

Definitions

  • the present invention relates to the field of character recognition technology, and in particular, to a character segmentation method and apparatus, and a component detection method and apparatus.
  • each circuit board usually includes a variety of components, and each component, such as resistors, capacitors, etc., can have many different models.
  • each component such as resistors, capacitors, etc.
  • different types of components of the same type can be distinguished by the appearance characteristics of the components, such as shape, color, size, and the like.
  • it is difficult to distinguish the different models of components by just the appearance information.
  • the factory prints component information on the surface of the component to distinguish between different models. Therefore, the component can be detected by the character recognition system.
  • the character recognition system generally includes three parts: character extraction, character segmentation, and character recognition.
  • Character segmentation is an important step in the character recognition system.
  • the effect of character segmentation directly affects the accuracy of character recognition and is related to the feasibility of the entire character recognition system.
  • the commonly used character segmentation methods follow image segmentation methods, such as threshold-based segmentation algorithms, edge-based segmentation methods, region-based segmentation methods, and the like.
  • the noise removal effect is poor, that is, many of the divided character regions do not actually contain characters
  • the purpose of the embodiment of the present invention is to provide a character segmentation method, which can realize effective segmentation of characters when input character images, and the calculation is simple.
  • an embodiment of the present invention provides a character segmentation method, including
  • Each of the single characters is divided based on the number of pixels in the column of each of the character line images in which the gray value is within a preset range, thereby obtaining the divided single character regions.
  • a character segmentation method disclosed in the present invention separates the number of pixels in the preset range based on each row of pixels and each column of pixels in the image.
  • Character line and single-character technical solution this method is based on the characteristics of the character itself, using the characteristics of the character area in the character image that are different from the gray values of other areas, segmenting the line character image, and The single character is divided on the basis of the line character image, and the pair of characters can be effectively segmented; the algorithm for calculating the number of pixels is simple, and the problem of complicated calculation and low partitioning efficiency in the prior art is solved.
  • the character segmentation method further includes:
  • the obtained sticky characters existing in each of the single-character regions are detected, and the sticky characters are divided to obtain a final single-character region.
  • the character segmentation method further includes detecting and segmenting the sticky characters, reducing the influence of noise, and improving the segmentation accuracy.
  • segmentation of each line of characters based on the number of pixels in the grayscale value of each row of pixels in the character image in the preset range, thereby obtaining the segmented character line images includes:
  • Each line of characters is divided based on the position of each line of characters, thereby obtaining a plurality of divided line image lines.
  • the acquired input character image usually contains a part of noise.
  • the gray value in each line of pixels in the character image is obtained within a preset range.
  • the improvement can effectively avoid the influence of noise, the algorithm is simple, and the segmentation accuracy is high.
  • the segmentation is performed by dividing each single character based on the number of pixels in each column of each character line image in which the gray value is within a preset range, thereby obtaining the divided single characters.
  • the area includes:
  • the column distribution histogram curve is sequentially scanned according to a preset order, and each of the characters is divided by a pixel dot column whose number of pixels is zero in a preset range, thereby obtaining a plurality of divided characters.
  • the single character area is sequentially scanned according to a preset order, and each of the characters is divided by a pixel dot column whose number of pixels is zero in a preset range, thereby obtaining a plurality of divided characters.
  • the position can be regarded as a character division point, and the division efficiency is high.
  • the method of dividing the glued characters is a drip algorithm.
  • the dripping algorithm simulates the process of water droplets dropping from a high point to a low point, and the trajectory of the water droplets constitutes a segmentation path of characters, and the segmentation effect of the drip algorithm is good, and the noise effect is effectively removed.
  • the acquired character image is a binarized image
  • the pixel value whose gray value is within a preset range is a gray value of 225. Pixels.
  • the number of character lines included in the character image may be input in advance.
  • the present invention provides a character segmentation apparatus, including:
  • a character image obtaining unit configured to acquire a character image
  • a character line dividing unit configured to divide each line of characters based on the number of pixels of the gray level value in each row of pixel points in the character image, thereby obtaining the divided character line images
  • a character dividing unit configured to divide each single character based on the number of pixels in the column of each of the character line images in the preset grayscale value, thereby obtaining the divided Several single-character areas.
  • a character segmentation apparatus disclosed by the present invention first calculates, by a character line segmentation unit, the number of pixel points in the pixel range of the input character image in the preset range. According to the characteristic structure of the character line, the segmentation obtains the character line image; and the character segmentation unit is used to calculate the number of the gray value in the column pixel of the character line image in the preset range of pixels, based on the characteristic structure of each single character, Segmentation acquires each single character; the device is simple to calculate and has high segmentation efficiency.
  • the character segmentation device further includes:
  • the glue character segmentation unit is configured to detect the stuck characters existing in the acquired plurality of single character regions, and divide the glue characters to obtain a final single character region.
  • the character line segmentation unit includes:
  • a first calculating module configured to perform horizontal projection on the character image, respectively calculate a number of pixel points in the pixel range of each row of pixels in a preset range, and obtain the gray value in a preset a line distribution histogram curve of the pixel points in the range; fitting the line distribution histogram curve by a Gaussian function to determine the position of each line character;
  • the character line segmentation module divides each line of characters based on the position of each line of characters to obtain a plurality of character line images.
  • the character segmentation unit includes:
  • a second calculating module configured to vertically project the character line graph, and calculate a number of pixel points in the column of each column of pixels in a preset range, and obtain the gray value in the pre-predetermined range a column distribution histogram curve of the pixel points in the range; sequentially scanning a column distribution histogram curve of the pixel points whose gray value is within a preset range according to a preset order, thereby obtaining the gray value in a preset range a pixel dot column with zero pixel counts;
  • the single-character segmentation module is configured to divide each single character based on the obtained pixel point sequence in which the gray value is zero in the preset range, thereby obtaining the divided single-character regions.
  • the present invention further provides a component detection method, including:
  • Acquiring an image of the component to be detected wherein the image of the component to be detected includes a character image of a printed character of the component to be detected;
  • Character recognition is performed on the character image based on the acquired single character regions, thereby acquiring information of the printed characters of the component to be detected.
  • a component detecting method disclosed by the present invention identifies a component based on printed character information on the component, including three steps of character extraction, character segmentation and character recognition; wherein, a method disclosed by the present invention is adopted.
  • the character segmentation method improves the segmentation efficiency and accuracy of the printed characters on the components in component detection, and improves the accuracy of character recognition due to effective segmentation; ultimately, the efficiency and accuracy of component detection in the present technical solution are improved as a whole.
  • the invention also provides a component detecting device, comprising:
  • the image to be detected image acquiring unit is configured to acquire an image of the component to be detected, wherein the image of the component to be detected includes a character image of a printed character of the component to be detected;
  • a character image obtaining unit configured to acquire a character image
  • a character line dividing unit configured to divide each line of characters based on the number of pixels of the gray level value in each row of pixel points in the character image, thereby obtaining the divided character line images
  • a character dividing unit configured to divide each single character based on the number of pixels in the column of each of the character line images in the preset grayscale value, thereby obtaining the divided And a plurality of single-character regions;
  • the component to be detected information acquiring unit is configured to perform character recognition on the printed character image based on the acquired plurality of the single-character regions, thereby acquiring information of the printed characters of the component to be detected.
  • a component detecting device disclosed in the present invention acquires an image of a component to be detected by an image acquiring unit to be detected, and then acquires a character image in an image of the component to be detected through a character image acquiring unit, and then The character segmentation unit and the character segmentation unit are sequentially segmented and single-characterized to obtain a plurality of single-character regions, and finally, the component information acquisition unit performs component information identification based on the acquired single-character regions, wherein Since the character segmentation method can effectively segment the characters, the segmentation efficiency and accuracy of the printed characters on the components in the component detection are improved, and the accuracy of the character recognition is improved by the effective segmentation; Technical solution component efficiency and accuracy.
  • Embodiment 1 is a schematic flow chart of Embodiment 1 of a character segmentation method according to the present invention
  • step S12 of Embodiment 1 of the character segmentation method provided by the present invention is a schematic flowchart of step S12 of Embodiment 1 of the character segmentation method provided by the present invention
  • step S13 of Embodiment 1 of the character segmentation method provided by the present invention is a schematic flowchart of step S13 of Embodiment 1 of the character segmentation method provided by the present invention
  • Embodiment 4 is a schematic flow chart of Embodiment 2 of a character segmentation method according to the present invention.
  • step S22 of Embodiment 2 of the character segmentation method provided by the present invention is a schematic flowchart of step S22 of Embodiment 2 of the character segmentation method provided by the present invention.
  • FIG. 6 is a schematic flowchart of step S23 of Embodiment 2 of the character segmentation method provided by the present invention.
  • Figure 8 is a horizontal projection view of an exemplary image of the character image of Figure 7;
  • FIG. 9 is a schematic diagram of fitting a line distribution histogram curve obtained by horizontal projection in FIG. 8 by using a Gaussian function
  • Figure 10 is a vertical projection view of an example of a character line image obtained from the character image diagram of Figure 7;
  • FIG. 11 is a schematic diagram of single character division of an example of a character line image in FIG. 10;
  • Figure 12 is a diagram showing an example of the presence of glue characters in a divided single-character area
  • FIG. 13(a) is a diagram showing an example of a number of pixel positions of water droplets in a dripping algorithm used in step S24 of the second embodiment of the present invention
  • FIG. 13(b) is a schematic diagram showing the rule of the drop position of the water drop in the dripping algorithm used in step S24 of the second embodiment provided by the character segmentation method of the present invention
  • Figure 14 is a block diagram showing the structure of an embodiment of a character segmentation apparatus according to the present invention.
  • Figure 15 is a flow chart showing an embodiment of a component detecting method according to the present invention.
  • Figure 16 is a block diagram showing the construction of an embodiment of a component detecting device of the present invention.
  • FIG. 1 is a schematic flowchart of a first embodiment of a character segmentation method according to the present invention.
  • the first embodiment includes the following steps:
  • FIG. 7 is an exemplary diagram of acquired character images
  • the number of pixels in the grayscale value in the preset range in the step S12/step S13 is the number of pixels corresponding to the character region in each row/column of pixels, and the specific implementation time is
  • the preset range of the set gradation value is specifically set according to the gradation value range of the pixel point representing the character in the character image.
  • FIG. 2 is a schematic flowchart of step S12 of the first embodiment, and step S12 includes:
  • FIG. 8 is a horizontal projection view of the acquired character image. Step S121 is described in detail with reference to FIG. 8.
  • the character image in FIG. 8 contains a part of noise.
  • the input is first required.
  • the character image is horizontally projected, and the number of pixels in which the gray value in each row of pixels is within a preset range is calculated, thereby obtaining a line distribution histogram.
  • the character image contains two character lines, and the horizontally projected line distribution histogram corresponding to the obtained line distribution histogram presents two peaks with larger peak values, and is similar to the Gaussian function.
  • the histogram curve can be fitted by a Gaussian function; see Fig. 9, which is obtained by horizontal projection in Fig. 8 using a Gaussian function.
  • the line distribution histogram curve is fitted to the schematic diagram; the position of each line of the character image is determined according to the fitting result.
  • FIG. 3 is a schematic flowchart of step S13 in the first embodiment, and step S13 includes:
  • S132 Scan the column distribution histogram curve in sequence according to a preset order to obtain a pixel point column in which the number of pixels of the gray value in the preset range is zero;
  • FIG. 10 is a vertical projection view of an example of a character line image obtained from the character image example of FIG. 7. It can be seen from FIG. 10 that the boundary position between every two single characters is on the column distribution histogram curve.
  • the number of pixels in which the gray value obtained at the corresponding position is within the preset range is zero. That is to say, when a column in the character line image does not have a pixel whose gray value is within a preset range, the column position can be considered as a single-character split column. Scanning the column distribution histogram curve in the preset order to scan the obtained pixel point column whose number of pixels in the preset range is zero;
  • each single character is divided according to the acquired pixel columns, thereby acquiring a plurality of single character regions.
  • the histogram curve is firstly distributed by the line value of the pixel value of the character image in the preset range, and the position of the character line is determined by fitting with the Gaussian function, and the character image is segmented, thereby obtaining each a character line image; then, the histogram curve is distributed in a column of the number of pixels in the preset range by the gray value of each character line image, and the number of pixels in the preset range is zero.
  • the pixel column performs a one-character split for each character line image.
  • the character line and the single character are sequentially divided, and the pair of characters can be effectively segmented; the algorithm for calculating the number of pixels is simple, and the calculation of the prior art is complicated, and the segmentation efficiency is low. The problem.
  • the second embodiment includes the following steps:
  • FIG. 7 is an exemplary diagram of the acquired character image
  • the input character image is obtained as a character image subjected to binarization processing.
  • the gray point value of the pixel in the extracted character region is 225, that is, the black pixel point
  • the gray value of the pixel in the remaining region is 0; in the second embodiment, the number of black pixel points is used.
  • the character area is recognized as an example.
  • the input image is taken as a binarized image as an example.
  • step S22/step S23 the number of black pixel points in each row/column of pixels is obtained to obtain corresponding rows/ The number of pixels representing the character area in each column of pixels.
  • FIG. 5 is a schematic flowchart of step S22 of the second embodiment, where step S22 includes:
  • S221 Perform horizontal projection on the character image, respectively calculate the number of pixels in each row of pixels with the gray value within a preset range, and obtain a line distribution histogram curve of the pixel points whose gray value is within the preset range;
  • FIG. 8 is a horizontal projection view of the acquired character image, and step S221 is described in detail with reference to FIG. 8.
  • the character image in FIG. 8 includes a part of noise.
  • the input character image needs to be horizontally projected, and the number of black pixel points in each row of pixels is calculated, thereby obtaining a line distribution histogram.
  • the character image contains two character lines, and the horizontally projected line distribution histogram corresponding to the obtained line distribution histogram presents two peaks with larger peak values, and is similar to the Gaussian function.
  • the histogram curve can be fitted by a Gaussian function; see Fig. 9, which is obtained by horizontal projection in Fig. 8 using a Gaussian function.
  • the line distribution histogram curve is fitted to the schematic diagram; the position of each line of the character image is determined according to the fitting result.
  • FIG. 6 is a schematic flowchart of step S23 of the first embodiment, where step S23 includes:
  • FIG. 10 is a vertical projection view of an example of a character line image obtained from the character image example of FIG. 7. It can be seen from FIG. 10 that the boundary position between every two single characters is on the column distribution histogram curve. Black pixels acquired at corresponding positions The number of points is zero. That is to say, when there is no black pixel in a column in the character line image, the column position can be considered as a single-character split column. Scanning the column distribution histogram curve in the preset order to scan the obtained pixel point column whose number of pixels in the preset range is zero;
  • each single character is divided according to the acquired pixel columns, thereby acquiring a plurality of single character regions.
  • the character image acquired in step S21 in the second embodiment may be a character image processed by a character extraction algorithm;
  • the character extraction algorithm refers to an algorithm for extracting a character region, such as template matching, stroke width transformation (SWT), and MSER And other methods.
  • SWT stroke width transformation
  • MSER And other methods such as template matching, stroke width transformation (SWT), and MSER And other methods.
  • the non-character area is removed from the character image processed by the character extraction algorithm, and the character area is reserved.
  • step S24 detects and segments the possible sticky characters.
  • the drip algorithm is used to obtain the segmentation path between the glued characters, and the glued characters are segmented based on the segmentation path.
  • the drip algorithm divides the glue characters by simulating the process of water droplets dropping from a high point to a low point: when the water droplets from the top of the character due to gravity, they will descend downward or horizontally along the outline of the character; When the water droplets are trapped in the concave portion of the character outline, they will penetrate into the stroke of the character and continue to be low; the trajectory through which the water droplet passes constitutes the segmentation path of the character.
  • FIG. 13(a) is a numbering example diagram of the pixel position of the dripping algorithm of the dripping algorithm, assuming that the position of the pixel where the water droplet is currently located is represented by n 0 , and the position of the pixel where the water drop is dropped next time is The five droplets around the pixel are determined.
  • Fig. 13(b) lists six cases in which five pixel points around the water drop may occur and the position where the water drop is next; wherein w represents a white pixel point, b represents a black pixel point, and * indicates that it may be white Pixels may also be black pixels, and arrows indicate the trajectory of water droplets. For example, when the neighboring five pixel points of the current pixel position of the water drop are all white dots or all black dots, the water drops downward.
  • the dripping path of the water droplets can be obtained by the following calculation process:
  • the gravitational potential energy W i is calculated by the following formula:
  • the glued characters are divided according to the obtained water drop dripping path, thereby obtaining the final several single character regions.
  • the histogram curve is distributed through the line of the black pixel points of the character image, the position of the character line is determined at the fitting with the Gaussian function, and the character image is segmented to obtain the image of each character line; a histogram curve of a column of black pixel points of each character line image, and a single character segmentation of each character line image with a pixel column whose gray value is zero in a preset range of pixels Each single character region is obtained; and further, the glue character is used to divide the glue characters in the single character region to obtain the final single character region.
  • the character lines and the single characters are sequentially divided, and the pair of characters can be effectively segmented; and the glue characters are divided by the drip algorithm; the algorithm for calculating the number of pixels is simple, and the present solution is solved.
  • the character line is obtained by fitting the Gaussian function, and the glue characters are divided by the dripping algorithm, the noise interference is greatly reduced, and the accuracy of the segmented characters is improved.
  • FIG. 14 is a schematic structural diagram of an embodiment of a character segmentation apparatus according to the present invention.
  • the apparatus of the embodiment includes a character image acquisition unit 11 and a character line division unit 12. And the character dividing unit 13, specifically:
  • a character image obtaining unit 11 configured to acquire a character image
  • the character line dividing unit 12 is configured to divide each line of characters based on the number of pixels in the preset range of the gray value in each line of the pixel image, thereby obtaining the divided character line images;
  • the character dividing unit 13 is configured to divide each single character based on the number of pixels in each column of each character row image in which the gray value is within a preset range, thereby obtaining the divided single characters. region.
  • the character line dividing unit 12 includes a first calculating module 121 and a character line dividing module 122, specifically:
  • the first calculation module 121 is configured to perform horizontal projection on the character image, respectively calculate the number of pixel points in the pixel range of each row of pixels in the preset range, and obtain the pixel points whose gray value is within the preset range.
  • the line distribution histogram curve; the Gaussian function is used to fit the line distribution histogram curve to determine the position of each line of characters;
  • the character line segmentation module 122 divides each line of characters based on the position of each line of characters, thereby acquiring a plurality of character line images.
  • the character dividing unit 13 includes a second calculating module 131 and a single character dividing module 132, specifically:
  • the second calculating module 131 is configured to vertically project the character line graph, and calculate the gray value in each column of pixels respectively in the preset range.
  • the number of pixels surrounding the circle obtains a histogram curve of the column distribution of the pixel points whose gray value is within the preset range; sequentially scans the column distribution histogram curve of the pixel points whose gray value is within the preset range according to the preset order , thereby obtaining a pixel point column in which the number of pixels of the gray value in the preset range is zero;
  • the single-character segmentation module 132 is configured to divide each single character according to the obtained pixel point sequence in which the acquired gray value is zero in the preset range, thereby obtaining the divided single-character regions.
  • the number of pixels in the grayscale value set in the character segmentation device in the preset range is the number of pixels representing the character region in each row/column of pixels in the image
  • the preset range of the gradation value is set according to the gradation value range indicating the character pixel point.
  • the process of acquiring the character image by the character image acquiring unit 11 in the present embodiment preferably includes obtaining the character image by the process of the character extraction algorithm and the image binarization, and the gray value of the pixel in the character region on the character image is 225, that is, When the black pixel is used, the character dividing device sets the pixel whose gray value is within the preset range as a black pixel.
  • the embodiment of the character segmentation apparatus provided by the present invention further includes an adhesion character segmentation unit 14 for detecting the adhesion characters existing in the acquired single character regions and dividing the adhesion characters to obtain the final single character region. .
  • the method for obtaining the segmentation path between the spliced characters is performed by using the drips algorithm.
  • the specific calculation process may refer to the specific process of step S24 of the second embodiment provided by the character segmentation method of the present invention. Do not repeat them.
  • the character image acquiring unit 11 first acquires the input character image; then, the first calculating module 121 in the character line dividing unit 12 calculates the gray value in each row of the input character image in the preset range. The number of pixels within the line is obtained, the line distribution histogram curve is obtained, the line distribution histogram curve is curve-fitted, the character line position is determined, and the character line segmentation module 122 performs character line segmentation to obtain the character line image; then, the character segmentation
  • the second calculating module 131 in the unit 13 calculates the number of pixels in the column pixel of the character line image in the preset range to determine that the number of pixels in the preset range is zero.
  • the pixel sequence column; the single character segmentation module 132 obtains each single character according to the pixel column division; finally, the glue character segmentation unit 14 divides the glue characters in the single character region by the drip algorithm to obtain the final single character region.
  • the character segmentation device of the embodiment has a simple algorithm, does not require high hardware, and is beneficial to reduce cost; at the same time, the calculation is fast, and the segmentation efficiency is improved; and the segmentation accuracy is high, which is beneficial to the character recognition system when the character is recognized. Identify the effect.
  • the present invention further provides an embodiment of the component detecting method: obtaining the printed character information of the component by identifying the printed character on the component, including the component Information such as model and parameters to achieve the purpose of detecting the component.
  • FIG. 15 is a schematic flowchart of the embodiment, which specifically includes the following steps:
  • the character image acquired in step S32 may refer to the character image example diagram shown in FIG. 7;
  • the process of extracting the character image acquired from the image of the component to be detected in step S32 includes extracting characters, which may be processed by using a following character extraction algorithm: template matching, stroke width conversion (SWT), MSER, and the like.
  • the non-character area is removed on the printed character image processed by the character extraction algorithm, and the printed character area on the component to be detected is retained;
  • step S32 in the process of acquiring the character image of the printed character of the image of the component to be detected, a binarization processing step of the image is further included, and the finally obtained character image is a binarized image.
  • the process of segmenting the character image in the step S33 and the step S34 to obtain a plurality of single-character regions may refer to the specific implementation process of the first embodiment/second embodiment of the character segmentation method of the present invention, and details are not described herein.
  • each single-character region can be correspondingly identified, thereby reading the meaning of the character corresponding to the single character, thereby acquiring the printed character information of the component to be detected, thereby implementing the component.
  • the image of the to-be-detected component including the printed characters on the component to be detected is acquired, and the character image of the printed character is obtained therefrom; the character image is sequentially segmented and single-divided to obtain a plurality of single-character regions; and based on the acquisition Several single-character areas identify printed characters and acquire component information for component detection.
  • the embodiment of the component detecting method provided by the present invention recognizes that the detecting accuracy of the component is higher based on the printed character information on the component than detecting the identifying component from information such as the size, color, and appearance of the component; In the detection, the segmentation efficiency and accuracy of the printed characters on the component are improved, and the accuracy of the character recognition is improved due to the effective segmentation; finally, the efficiency and accuracy of the component detection in the embodiment are improved as a whole.
  • FIG. 16 is a schematic structural diagram of the embodiment.
  • the image to be detected image acquisition unit 10 is configured to acquire an image of the component to be detected, wherein the image of the component to be detected includes a character image of the printed character of the component to be detected;
  • a character image obtaining unit 11 configured to acquire a character image
  • the character line dividing unit 12 is configured to divide each line character based on the number of pixels in the pixel value of each line of the character image in the preset range, thereby obtaining the divided character line images. ;
  • a character dividing unit 13 configured to calculate, according to a pixel point in a preset range, a gray value in each column of pixels in each character line image In the case of a number of cases, each single character is divided to obtain a plurality of single character regions after division;
  • the to-be-detected component information acquiring unit 15 is configured to perform character recognition on the printed character image based on the acquired plurality of single-character regions, thereby acquiring information of the printed characters of the to-be-detected component.
  • the image of the component to be detected is acquired by the image to be detected by the image to be detected 10; then, the image of the component to be detected is extracted by the printed character image extracting unit 11; then, the character row dividing unit 12 and the character dividing unit are sequentially passed through 13 to obtain a plurality of single-character regions; finally, the component information acquisition unit 15 performs component information identification based on the acquired plurality of single-character regions, thereby implementing detection of the component to be detected.
  • the embodiment improves the segmentation efficiency and accuracy of the printed characters on the component in the component detection, and improves the accuracy of the character recognition due to the effective segmentation; finally, the efficiency and accuracy of the component detection in the embodiment are improved as a whole.

Abstract

Provided is a character segmentation method, comprising: obtaining a character image (S11); segmenting to obtain respective rows of characters on the basis of the number of pixels having gray values within a preset range in each row of pixels in the character image, so as to obtain a plurality of character row images (S12); and segmenting to obtain respective single characters on the basis of a number of pixels having gray values within a preset range in each column of pixels in each of the character row images, so as to obtain a plurality of single character regions (S13). The character segmentation method features a simple algorithm, and high segmentation efficiency and accuracy. A character segmentation device is used to obtain a single character region by means of segmentation. An element detection method and device are used to perform segmentation to obtain a character by using the character segmentation method when detecting an element having a surface printed with the character, so as to realize identification of the printed character. The element detection method has high detection efficiency.

Description

一种字符分割方法和装置、及元件检测方法和装置Character segmentation method and device, and component detection method and device 技术领域Technical field
本发明涉及字符识别技术领域,尤其涉及一种字符分割方法和装置,及一种元件检测方法和装置。The present invention relates to the field of character recognition technology, and in particular, to a character segmentation method and apparatus, and a component detection method and apparatus.
背景技术Background technique
在实际生产过程中,每一种电路板上通常包括多种元件,而每一种元件,如电阻、电容等,会有多种不同的型号。有时候,可以通过元件的外观特征,如形状、颜色、大小等信息区分同种元件的不同型号。然而,有时候,仅仅通过外观信息是很难分辨元件的不同型号的。通常情况下,工厂会将元件的信息印刷在元件的表面,从而区分不同的型号。因此,可以通过字符识别系统来对元件进行错件检测。In the actual production process, each circuit board usually includes a variety of components, and each component, such as resistors, capacitors, etc., can have many different models. Sometimes, different types of components of the same type can be distinguished by the appearance characteristics of the components, such as shape, color, size, and the like. However, sometimes it is difficult to distinguish the different models of components by just the appearance information. Typically, the factory prints component information on the surface of the component to distinguish between different models. Therefore, the component can be detected by the character recognition system.
字符识别系统一般包括3个部分:字符提取、字符分割和字符识别。字符分割是字符识别系统中一个重要的步骤,字符分割的效果直接影响到字符识别的准确率,关系到整个字符识别系统的可行性。The character recognition system generally includes three parts: character extraction, character segmentation, and character recognition. Character segmentation is an important step in the character recognition system. The effect of character segmentation directly affects the accuracy of character recognition and is related to the feasibility of the entire character recognition system.
目前,常用的字符分割方法沿用图像分割方法,例如:基于阈值的分割算法,基于边缘的分割方法,基于区域的分割方法等等。At present, the commonly used character segmentation methods follow image segmentation methods, such as threshold-based segmentation algorithms, edge-based segmentation methods, region-based segmentation methods, and the like.
但是,现有的字符分割方法存在以下缺陷:However, the existing character segmentation method has the following drawbacks:
1、去噪声效果差,即分割出的字符区域中很多实际上并不包含字符;1. The noise removal effect is poor, that is, many of the divided character regions do not actually contain characters;
2、计算方法复杂,字符分割效率低。2. The calculation method is complicated and the character segmentation efficiency is low.
发明内容Summary of the invention
本发明实施例的目的是提供一种字符分割方法,对输入的字符图像能实现有效分割字符的同时,计算简便。The purpose of the embodiment of the present invention is to provide a character segmentation method, which can realize effective segmentation of characters when input character images, and the calculation is simple.
为实现上述目的,本发明实施例提供了一种字符分割方法,包括To achieve the above object, an embodiment of the present invention provides a character segmentation method, including
获取字符图像;Get a character image;
基于所述字符图像中每一行像素点中的灰度值在预设范围内的像素点的个数情况,分割每一行字符,从而得到分割后的若干字符行图像;Dividing each line of characters based on the number of pixels in each row of pixels in the character image in a preset range, thereby obtaining segmented character line images;
基于每一所述字符行图像中每一列像素点中的所述灰度值在预设范围内的像素点的个数情况,分割每一单字符,从而得到分割后的若干单字符区域。Each of the single characters is divided based on the number of pixels in the column of each of the character line images in which the gray value is within a preset range, thereby obtaining the divided single character regions.
与现有技术相比,本发明公开的一种字符分割方法,基于图像中每一行像素点和每一列像素点的所述灰度值在预设范围内的像素点的个数情况,分别分割字符行和单字符的技术方案;该方法基于字符本身特性,利用字符图像中字符区域中的与其他区域的灰度值不同的特点,分割行字符图像,并在 行字符图像的基础上分割单字符,能够有效分割对字符;通过计算像素点个数算法简单,解决了现有技术计算复杂,分割效率低的问题。Compared with the prior art, a character segmentation method disclosed in the present invention separates the number of pixels in the preset range based on each row of pixels and each column of pixels in the image. Character line and single-character technical solution; this method is based on the characteristics of the character itself, using the characteristics of the character area in the character image that are different from the gray values of other areas, segmenting the line character image, and The single character is divided on the basis of the line character image, and the pair of characters can be effectively segmented; the algorithm for calculating the number of pixels is simple, and the problem of complicated calculation and low partitioning efficiency in the prior art is solved.
在运用于元件错件检测时,能迅速有效地对元件上的印刷文字进行分割,提高检测的效率和准确性。When used for component fault detection, it can quickly and effectively segment the printed characters on the components, improving the efficiency and accuracy of detection.
进一步地,所述字符分割方法还包括:Further, the character segmentation method further includes:
检测获得的每一所述单字符区域中存在的粘连字符,并分割所述粘连字符,从而得到最终的单字符区域。The obtained sticky characters existing in each of the single-character regions are detected, and the sticky characters are divided to obtain a final single-character region.
作为上述方案的改进,所述字符分割方法还包括对粘连字符进行检测和分割,减少噪声的影响,提高分割准确率。As an improvement of the above solution, the character segmentation method further includes detecting and segmenting the sticky characters, reducing the influence of noise, and improving the segmentation accuracy.
进一步地,所述基于所述字符图像中每一行像素点中的灰度值在预设范围内的像素点的个数情况,分割每一行字符,从而得到分割后的若干字符行图像包括:Further, the segmentation of each line of characters based on the number of pixels in the grayscale value of each row of pixels in the character image in the preset range, thereby obtaining the segmented character line images includes:
对所述字符图像进行水平投影,分别计算每一行像素点中所述灰度值在预设范围内的像素点的个数,获取所述灰度值在预设范围内的像素点的行分布直方图曲线;Performing horizontal projection on the character image, respectively calculating the number of pixel points in the pixel range of each row of pixels in a preset range, and acquiring a row distribution of the pixel points whose gray value is within a preset range Histogram curve
利用高斯函数对所述行分布直方图曲线进行拟合处理,从而确定每一行字符的位置;Using a Gaussian function to fit the line distribution histogram curve to determine the position of each line of characters;
基于每一行字符的位置,分割每一行字符,从而得到分割后的若干字符行图像。Each line of characters is divided based on the position of each line of characters, thereby obtaining a plurality of divided line image lines.
作为上述方案的改进,获取的输入的字符图像通常会包含一部分噪声,为了初步定为字符行的大致位置,先通过获取字符图像中每一行像素点中所述灰度值在预设范围内的像素点的个数的行分布直方图曲线,再利用行分布直方图中每一单字符行所在区域的曲线与高斯函数类似的特性,用高斯函数对行分布直方图进行曲线拟合,进而获得字符行的位。该改进能有效避免噪声的影响,算法简单,且分割准确率高。As an improvement of the above solution, the acquired input character image usually contains a part of noise. In order to initially determine the approximate position of the character line, firstly, the gray value in each line of pixels in the character image is obtained within a preset range. The line distribution histogram curve of the number of pixels, and then using the similarity of the curve of the region where each single character row in the line distribution histogram is similar to the Gaussian function, the Gaussian function is used to curve fit the line distribution histogram, and then obtain The bit of the character line. The improvement can effectively avoid the influence of noise, the algorithm is simple, and the segmentation accuracy is high.
进一步地,所述基于每一所述字符行图像中每一列像素点中的灰度值在预设范围内的像素点的个数情况,分割每一单字符,从而得到分割后的若干单字符区域包括:Further, the segmentation is performed by dividing each single character based on the number of pixels in each column of each character line image in which the gray value is within a preset range, thereby obtaining the divided single characters. The area includes:
对所述字符行图像进行垂直投影,分别计算每一列像素点中的所述灰度值在预设范围内的像素点的个数,获取所述灰度值在预设范围内的像素点的列分布直方图曲线;Performing vertical projection on the character line image, respectively calculating the number of pixels in the column of each of the pixels in the preset range, and acquiring the pixel points in the preset range Column distribution histogram curve;
按照预置顺序依次扫描所述列分布直方图曲线,并以所述灰度值在预设范围内的像素点个数为零的像素点列分割每一所述字符,从而得到分割后的若干所述单字符区域。The column distribution histogram curve is sequentially scanned according to a preset order, and each of the characters is divided by a pixel dot column whose number of pixels is zero in a preset range, thereby obtaining a plurality of divided characters. The single character area.
作为上述方案的改进,当图像的某一列不存在所述灰度值在预设范围内的像素点时,则可以认为此位置为字符分割点,该方案分割效率高。As an improvement of the above solution, when a certain pixel of the image does not have a pixel point whose gray value is within a preset range, the position can be regarded as a character division point, and the division efficiency is high.
进一步地,所述分割所述粘连字符的方法为滴水算法。Further, the method of dividing the glued characters is a drip algorithm.
作为上述方案的改进,滴水算法通过模拟水滴从高处向低处滴落的过程,水滴所经过的轨迹就构成了字符的分割路径,滴水算法的分割效果好,有效去除噪声影响。As an improvement of the above scheme, the dripping algorithm simulates the process of water droplets dropping from a high point to a low point, and the trajectory of the water droplets constitutes a segmentation path of characters, and the segmentation effect of the drip algorithm is good, and the noise effect is effectively removed.
进一步地,获取的所述字符图像为二值化图像,所述灰度值在预设范围内的像素点为灰度值为225 的像素点。Further, the acquired character image is a binarized image, and the pixel value whose gray value is within a preset range is a gray value of 225. Pixels.
作为上述方案的改进,为了提高行分割的准确率,可以预先输入该字符图像包含的字符行数。As an improvement of the above scheme, in order to improve the accuracy of line division, the number of character lines included in the character image may be input in advance.
为实现本发明的目的,相应地,本发明提供一种字符分割装置,包括:In order to achieve the object of the present invention, the present invention provides a character segmentation apparatus, including:
字符图像获取单元,用于获取字符图像;a character image obtaining unit, configured to acquire a character image;
字符行分割单元,用于基于所述字符图像中每一行像素点中的灰度值在预设范围内的像素点的个数情况,分割每一行字符,从而得到分割后的若干字符行图像;a character line dividing unit, configured to divide each line of characters based on the number of pixels of the gray level value in each row of pixel points in the character image, thereby obtaining the divided character line images;
字符分割单元,用于基于每一所述字符行图像中每一列像素点中的所述灰度值在预设范围内的像素点的个数情况,分割每一单字符,从而得到分割后的若干单字符区域。a character dividing unit, configured to divide each single character based on the number of pixels in the column of each of the character line images in the preset grayscale value, thereby obtaining the divided Several single-character areas.
与现有技术相比,本发明公开的一种字符分割装置,先通过字符行分割单元计算输入的字符图像的每一行像素点中所述灰度值在预设范围内的像素点的个数,基于字符行的特性结构,分割获取字符行图像;再通过字符分割单元,计算字符行图像的列像素点中灰度值在预设范围像素点的数,基于每一单字符的特性结构,分割获取每一单字符;该装置计算简单,分割效率高。Compared with the prior art, a character segmentation apparatus disclosed by the present invention first calculates, by a character line segmentation unit, the number of pixel points in the pixel range of the input character image in the preset range. According to the characteristic structure of the character line, the segmentation obtains the character line image; and the character segmentation unit is used to calculate the number of the gray value in the column pixel of the character line image in the preset range of pixels, based on the characteristic structure of each single character, Segmentation acquires each single character; the device is simple to calculate and has high segmentation efficiency.
进一步地,所述字符分割装置还包括:Further, the character segmentation device further includes:
粘连字符分割单元,用于检测获取的所述若干单字符区域中存在的粘连字符,并分割所述粘连字符,从而得到最终的单字符区域。The glue character segmentation unit is configured to detect the stuck characters existing in the acquired plurality of single character regions, and divide the glue characters to obtain a final single character region.
进一步地,所述字符行分割单元包括:Further, the character line segmentation unit includes:
第一计算模块,用于对所述字符图像进行水平投影,分别计算每一行像素点中的所述灰度值在预设范围内的像素点的个数,获取所述灰度值在预设范围内的像素点的行分布直方图曲线;利用高斯函数对所述行分布直方图曲线进行拟合处理,从而确定每一行字符的位置;a first calculating module, configured to perform horizontal projection on the character image, respectively calculate a number of pixel points in the pixel range of each row of pixels in a preset range, and obtain the gray value in a preset a line distribution histogram curve of the pixel points in the range; fitting the line distribution histogram curve by a Gaussian function to determine the position of each line character;
字符行分割模块,基于每一行字符的位置,分割每一行字符,从而获取若干字符行图像。The character line segmentation module divides each line of characters based on the position of each line of characters to obtain a plurality of character line images.
进一步地,所述字符分割单元包括:Further, the character segmentation unit includes:
第二计算模块,用于对所述字符行图进行垂直投影,分别计算每一列像素点中的所述灰度值在预设范围内的像素点的个数,获取所述灰度值在预设范围内的像素点的列分布直方图曲线;按照预置顺序依次扫描所述灰度值在预设范围内的像素点的列分布直方图曲线,从而得到所述灰度值在预设范围内的像素点个数为零的像素点列;a second calculating module, configured to vertically project the character line graph, and calculate a number of pixel points in the column of each column of pixels in a preset range, and obtain the gray value in the pre-predetermined range a column distribution histogram curve of the pixel points in the range; sequentially scanning a column distribution histogram curve of the pixel points whose gray value is within a preset range according to a preset order, thereby obtaining the gray value in a preset range a pixel dot column with zero pixel counts;
单字符分割模块,用于基于获取的所述灰度值在预设范围内的像素点个数为零的像素点列分割每一单字符,从而得到分割后的若干单字符区域。The single-character segmentation module is configured to divide each single character based on the obtained pixel point sequence in which the gray value is zero in the preset range, thereby obtaining the divided single-character regions.
基于本发明所公开的一种字符分割方法,本发明还提供一种元件检测方法,包括:Based on the character segmentation method disclosed by the present invention, the present invention further provides a component detection method, including:
获取待检测元件图像,其中,所述待检测元件图像包括待检测元件的印刷字符的字符图像;Acquiring an image of the component to be detected, wherein the image of the component to be detected includes a character image of a printed character of the component to be detected;
获取所述字符图像; Obtaining the character image;
基于所述字符图像中每一行像素点中的灰度值在预设范围内的像素点的个数情况,分割每一行字符,从而得到分割后的若干字符行图像;Dividing each line of characters based on the number of pixels in each row of pixels in the character image in a preset range, thereby obtaining segmented character line images;
基于每一所述字符行图像中每一列像素点中的所述灰度值在预设范围内的像素点的个数情况,分割每一单字符,从而得到分割后的若干单字符区域;And dividing each single character according to the number of pixels in each column of pixels in each of the character line images in the preset range, thereby obtaining the divided single character regions;
基于获取的若干单字符区域,对所述字符图像进行字符识别,从而获取所述待检测元件的印刷字符的信息。Character recognition is performed on the character image based on the acquired single character regions, thereby acquiring information of the printed characters of the component to be detected.
与现有技术相比,本发明公开的一种元件检测方法,基于元件上的印刷字符信息来识别元件,包括字符提取、字符分割和字符识别三个步骤;其中,采用本发明公开的一种字符分割方法,提高了元件检测中对元件上的印刷字符的分割效率和准确率,且由于有效分割提高了字符识别的准确率;最终整体提高了本技术方案元件检测时效率和准确度。Compared with the prior art, a component detecting method disclosed by the present invention identifies a component based on printed character information on the component, including three steps of character extraction, character segmentation and character recognition; wherein, a method disclosed by the present invention is adopted. The character segmentation method improves the segmentation efficiency and accuracy of the printed characters on the components in component detection, and improves the accuracy of character recognition due to effective segmentation; ultimately, the efficiency and accuracy of component detection in the present technical solution are improved as a whole.
本发明还提供一种元件检测装置,包括:The invention also provides a component detecting device, comprising:
待检测元件图像获取单元,用于获取待检测元件图像,其中,所述待检测元件图像包括待检测元件的印刷字符的字符图像;The image to be detected image acquiring unit is configured to acquire an image of the component to be detected, wherein the image of the component to be detected includes a character image of a printed character of the component to be detected;
字符图像获取单元,用于获取字符图像;a character image obtaining unit, configured to acquire a character image;
字符行分割单元,用于基于所述字符图像中每一行像素点中的灰度值在预设范围内的像素点的个数情况,分割每一行字符,从而得到分割后的若干字符行图像;a character line dividing unit, configured to divide each line of characters based on the number of pixels of the gray level value in each row of pixel points in the character image, thereby obtaining the divided character line images;
字符分割单元,用于基于每一所述字符行图像中每一列像素点中的所述灰度值在预设范围内的像素点的个数情况,分割每一单字符,从而得到分割后的若干单字符区域;待检测元件信息获取单元,用于基于获取的若干所述单字符区域,对所述印刷字符图像进行字符识别,从而获取所述待检测元件的印刷字符的信息。a character dividing unit, configured to divide each single character based on the number of pixels in the column of each of the character line images in the preset grayscale value, thereby obtaining the divided And a plurality of single-character regions; the component to be detected information acquiring unit is configured to perform character recognition on the printed character image based on the acquired plurality of the single-character regions, thereby acquiring information of the printed characters of the component to be detected.
与现有技术相比,本发明公开的一种元件检测装置,通过设有的待检测元件图像获取单元获取待检测元件图像,然后通过字符图像获取单元获取待检测元件图像中的字符图像,接着依次通过字符行分割单元和字符分割单元对印刷字符图像进行分割和单字符分割以获取若干单字符区域,最后通过待检测元件信息获取单元基于获取的若干单字符区域来进行元件信息识别,其中,由于对采用的字符分割方法能实现对字符的有效分割,提高了元件检测中对元件上的印刷字符的分割效率和准确率,且由于有效分割提高了字符识别的准确率;最终整体提高了本技术方案元件检测时效率和准确度。Compared with the prior art, a component detecting device disclosed in the present invention acquires an image of a component to be detected by an image acquiring unit to be detected, and then acquires a character image in an image of the component to be detected through a character image acquiring unit, and then The character segmentation unit and the character segmentation unit are sequentially segmented and single-characterized to obtain a plurality of single-character regions, and finally, the component information acquisition unit performs component information identification based on the acquired single-character regions, wherein Since the character segmentation method can effectively segment the characters, the segmentation efficiency and accuracy of the printed characters on the components in the component detection are improved, and the accuracy of the character recognition is improved by the effective segmentation; Technical solution component efficiency and accuracy.
附图说明DRAWINGS
图1是本发明一种字符分割方法提供的实施例一的流程示意图;1 is a schematic flow chart of Embodiment 1 of a character segmentation method according to the present invention;
图2是本发明一种字符分割方法提供的实施例一的步骤S12的流程示意图;2 is a schematic flowchart of step S12 of Embodiment 1 of the character segmentation method provided by the present invention;
图3是本发明一种字符分割方法提供的实施例一的步骤S13的流程示意图;3 is a schematic flowchart of step S13 of Embodiment 1 of the character segmentation method provided by the present invention;
图4是本发明一种字符分割方法提供的实施例二的流程示意图;4 is a schematic flow chart of Embodiment 2 of a character segmentation method according to the present invention;
图5是本发明一种字符分割方法提供的实施例二的步骤S22的流程示意图; 5 is a schematic flowchart of step S22 of Embodiment 2 of the character segmentation method provided by the present invention;
图6是本发明一种字符分割方法提供的实施例二的步骤S23的流程示意图;6 is a schematic flowchart of step S23 of Embodiment 2 of the character segmentation method provided by the present invention;
图7是获取的字符图像的示例图;7 is an exemplary diagram of an acquired character image;
图8是图7中的字符图像示例图的水平投影示意图;Figure 8 is a horizontal projection view of an exemplary image of the character image of Figure 7;
图9是利用高斯函数对图8中经过水平投影获取的行分布直方图曲线进行拟合示意图;9 is a schematic diagram of fitting a line distribution histogram curve obtained by horizontal projection in FIG. 8 by using a Gaussian function;
图10是从图7字符图像示例图中得到的一字符行图像示例的垂直投影示意图;Figure 10 is a vertical projection view of an example of a character line image obtained from the character image diagram of Figure 7;
图11是图10中的一字符行图像示例的单字符分割示意图;11 is a schematic diagram of single character division of an example of a character line image in FIG. 10;
图12是分割的单字符区域中存在粘连字符的示例图;Figure 12 is a diagram showing an example of the presence of glue characters in a divided single-character area;
图13(a)本发明一种字符分割方法提供的实施例二的步骤S24采用的滴水算法中水滴滴落的像素点位置的一种编号示例图;FIG. 13(a) is a diagram showing an example of a number of pixel positions of water droplets in a dripping algorithm used in step S24 of the second embodiment of the present invention;
图13(b)本发明一种字符分割方法提供的实施例二的步骤S24采用的滴水算法中水滴下一刻低落位置的规则示意图;FIG. 13(b) is a schematic diagram showing the rule of the drop position of the water drop in the dripping algorithm used in step S24 of the second embodiment provided by the character segmentation method of the present invention;
图14是本发明一种字符分割装置提供的实施例的结构示意图;Figure 14 is a block diagram showing the structure of an embodiment of a character segmentation apparatus according to the present invention;
图15是本发明一种元件检测方法提供的实施例的流程示意图;Figure 15 is a flow chart showing an embodiment of a component detecting method according to the present invention;
图16是本发明一种元件检测装置提供的实施例的结构示意图。Figure 16 is a block diagram showing the construction of an embodiment of a component detecting device of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
参见图1,是本发明一种字符分割方法提供的实施例一流程示意图,本实施例一包括步骤:FIG. 1 is a schematic flowchart of a first embodiment of a character segmentation method according to the present invention. The first embodiment includes the following steps:
S11、获取字符图像;S11. Acquire a character image.
参见图7,图7为获取的字符图像的示例图;Referring to FIG. 7, FIG. 7 is an exemplary diagram of acquired character images;
S12、基于字符图像中每一行像素点中的灰度值在预设范围内的像素点的个数情况,分割每一行字符,从而得到分割后的若干字符行图像;S12. Dividing each line of characters based on the number of pixels in the pixel in each line of the pixel image in the preset range, thereby obtaining the divided number of character line images;
S13、基于每一字符行图像中每一列像素点中的灰度值在预设范围内的像素点的个数情况,分割每一单字符,从而得到分割后的若干单字符区域。S13. Divide each single character based on the number of pixels in each column of each character row image in which the gray value is within a preset range, thereby obtaining the divided single character regions.
其中,步骤S12/步骤S13中的灰度值在预设范围内的像素点的个数情况为对应每行/每列像素点中表示字符区域的像素点的个数情况,则具体实施时所设定的灰度值的预设范围为根据字符图像中表示字符的像素点的灰度值范围进行具体的设定。The number of pixels in the grayscale value in the preset range in the step S12/step S13 is the number of pixels corresponding to the character region in each row/column of pixels, and the specific implementation time is The preset range of the set gradation value is specifically set according to the gradation value range of the pixel point representing the character in the character image.
参见图2,图2为本实施例一的步骤S12的流程示意图,步骤S12包括:Referring to FIG. 2, FIG. 2 is a schematic flowchart of step S12 of the first embodiment, and step S12 includes:
S121、对字符图像进行水平投影,分别计算每一行像素点中灰度值在预设范围内的像素点的个数,获取灰度值在预设范围内的像素点的行分布直方图曲线; S121. Perform horizontal projection on the character image, calculate a number of pixel points in which the gray value in each row of pixels is within a preset range, and obtain a line distribution histogram curve of the pixel point whose gray value is within a preset range;
参见图8,图8是获取的字符图像的水平投影图,结合图8对步骤S121进行详细说明:图8中的字符图像包含一部分噪声,为了初步定位字符行图像的大致位置,首先需要对输入的字符图像进行水平投影,计算每一行像素点中灰度值在预设范围内的像素点的个数,从而获得行分布直方图。该字符图像包含两字符行,水平投影后对应获取的行分布直方图呈现两个峰值较大的波峰,且与高斯函数类似。Referring to FIG. 8, FIG. 8 is a horizontal projection view of the acquired character image. Step S121 is described in detail with reference to FIG. 8. The character image in FIG. 8 contains a part of noise. In order to initially locate the approximate position of the character line image, the input is first required. The character image is horizontally projected, and the number of pixels in which the gray value in each row of pixels is within a preset range is calculated, thereby obtaining a line distribution histogram. The character image contains two character lines, and the horizontally projected line distribution histogram corresponding to the obtained line distribution histogram presents two peaks with larger peak values, and is similar to the Gaussian function.
S122、利用高斯函数对行分布直方图曲线进行拟合处理,从而确定每一行字符的位置;S122. Perform a fitting process on the line distribution histogram curve by using a Gaussian function to determine the position of each line of characters;
由于直方图中,每一字符行所对应的曲线与高斯函数类似;因此,可以用高斯函数对直方图曲线进行拟合;参见图9,图9为利用高斯函数对图8中经过水平投影获取的行分布直方图曲线进行拟合示意图;依据拟合结果确定字符图像每一行文字的位置。Since the curve corresponding to each character line in the histogram is similar to the Gaussian function; therefore, the histogram curve can be fitted by a Gaussian function; see Fig. 9, which is obtained by horizontal projection in Fig. 8 using a Gaussian function. The line distribution histogram curve is fitted to the schematic diagram; the position of each line of the character image is determined according to the fitting result.
S123、基于每一行字符的位置,分割每一行字符,从而得到分割后的若干字符行图像。S123. Divide each line of characters based on the position of each line of characters, thereby obtaining the divided number of character line images.
参见图3,图3为本实施例一的步骤S13的流程示意图,步骤S13包括:Referring to FIG. 3, FIG. 3 is a schematic flowchart of step S13 in the first embodiment, and step S13 includes:
S131、对字符行图像进行垂直投影,分别计算每一列像素点中的灰度值在预设范围内的像素点的个数,获取灰度值在预设范围内的像素点的列分布直方图曲线;S131. Perform vertical projection on the character line image, respectively calculate the number of pixel points in the pixel range of each column of pixels in a preset range, and obtain a column distribution histogram of the pixel points whose gray value is within a preset range. curve;
S132、按照预置顺序依次扫描列分布直方图曲线,以获取灰度值在预设范围内的像素点个数为零的像素点列;S132. Scan the column distribution histogram curve in sequence according to a preset order to obtain a pixel point column in which the number of pixels of the gray value in the preset range is zero;
参见图10,图10是从图7字符图像示例图中得到的一字符行图像示例的垂直投影示意图;从图10中可以看出每两单字符间的分界位置在该列分布直方图曲线上相对应的位置处所获取的灰度值在预设范围内的像素点的个数为零。即认为,当字符行图像中某一列不存在灰度值在预设范围内的像素点时,则可以认为此列位置为单字符分割列。按照预置顺序依次扫描列分布直方图曲线,以扫描获取的灰度值在预设范围内的像素点个数为零的像素点列;Referring to FIG. 10, FIG. 10 is a vertical projection view of an example of a character line image obtained from the character image example of FIG. 7. It can be seen from FIG. 10 that the boundary position between every two single characters is on the column distribution histogram curve. The number of pixels in which the gray value obtained at the corresponding position is within the preset range is zero. That is to say, when a column in the character line image does not have a pixel whose gray value is within a preset range, the column position can be considered as a single-character split column. Scanning the column distribution histogram curve in the preset order to scan the obtained pixel point column whose number of pixels in the preset range is zero;
S133、以灰度值在预设范围内的像素点个数为零的像素点列分割每一字符,从而得到分割后的若干单字符区域。S133. Divide each character with a pixel dot column whose gray value is zero in a preset range, thereby obtaining a plurality of divided single character regions.
参见图11,根据获取的这些像素列分割每一单字符,从而获取若干单字符区域。Referring to FIG. 11, each single character is divided according to the acquired pixel columns, thereby acquiring a plurality of single character regions.
具体实施时,首先通过字符图像的灰度值在预设范围内的像素点个数的行分布直方图曲线,与高斯函数拟合处确定字符行位置,对字符图像进行行分割,从而获取每一字符行图像;然后在通过每一字符行图像的灰度值在预设范围内的像素点个数的列分布直方图曲线,以灰度值在预设范围内的像素点个数为零的像素列对每一字符行图像进行单字符的分割。In the specific implementation, the histogram curve is firstly distributed by the line value of the pixel value of the character image in the preset range, and the position of the character line is determined by fitting with the Gaussian function, and the character image is segmented, thereby obtaining each a character line image; then, the histogram curve is distributed in a column of the number of pixels in the preset range by the gray value of each character line image, and the number of pixels in the preset range is zero. The pixel column performs a one-character split for each character line image.
本实施例基于字符图像中表示字符的像素点个数特征,依次分割字符行和单字符,能够有效分割对字符;通过计算像素点个数算法简单,解决了现有技术计算复杂,分割效率低的问题。In this embodiment, based on the feature of the number of pixels representing characters in the character image, the character line and the single character are sequentially divided, and the pair of characters can be effectively segmented; the algorithm for calculating the number of pixels is simple, and the calculation of the prior art is complicated, and the segmentation efficiency is low. The problem.
参见图4,是本发明一种字符分割方法提供的实施例二步骤流程图,本实施例二包括步骤:Referring to FIG. 4, it is a flow chart of the second embodiment of the present invention. The second embodiment includes the following steps:
S21、获取字符图像; S21. Acquire a character image.
同样地,参见图7,图7为获取的字符图像的示例图;Similarly, referring to FIG. 7, FIG. 7 is an exemplary diagram of the acquired character image;
优选地,在本实施例二中,获取输入的字符图像为经过二值化处理的字符图像。经过二值化处理后若提取的字符区域中像素点灰度值为225,即黑色像素点,则其余区域中像素点灰度值为0;本实施例二以黑色像素点个数为特征来识别字符区域为例进行说明。Preferably, in the second embodiment, the input character image is obtained as a character image subjected to binarization processing. After the binarization process, if the gray point value of the pixel in the extracted character region is 225, that is, the black pixel point, the gray value of the pixel in the remaining region is 0; in the second embodiment, the number of black pixel points is used. The character area is recognized as an example.
S22、基于字符图像中每一行像素点中的黑色像素点个数情况,分割每一行字符,从而得到分割后的若干字符行图像;S22. Dividing each line of characters based on the number of black pixel points in each row of pixels in the character image, thereby obtaining segmented character line images;
S23、基于每一字符行图像中每一列像素点中的黑色像素点个数情况,分割每一单字符,从而得到分割后的若干单字符区域;S23. Divide each single character according to the number of black pixel points in each column of pixels in each character line image, thereby obtaining a plurality of divided single character regions;
由于本实施例二以输入的图像为二值化图像为例进行说明,其中,步骤S22/步骤S23中通过获取每行/每列像素点中的黑色像素点个数情况从而获取对应每行/每列像素点中表示字符区域的像素点的个数情况。In the second embodiment, the input image is taken as a binarized image as an example. In step S22/step S23, the number of black pixel points in each row/column of pixels is obtained to obtain corresponding rows/ The number of pixels representing the character area in each column of pixels.
S24、检测获得的每一单字符区域中存在的粘连字符,并分割粘连字符,从而得到最终的单字符区域。S24. Detect the adhesion characters existing in each single character area obtained, and divide the glue characters to obtain a final single character area.
参见图5,图5为本实施例二的步骤S22的流程示意图,步骤S22包括:Referring to FIG. 5, FIG. 5 is a schematic flowchart of step S22 of the second embodiment, where step S22 includes:
S221、对字符图像进行水平投影,分别计算每一行像素点中灰度值在预设范围内的像素点的个数,获取灰度值在预设范围内的像素点的行分布直方图曲线;S221: Perform horizontal projection on the character image, respectively calculate the number of pixels in each row of pixels with the gray value within a preset range, and obtain a line distribution histogram curve of the pixel points whose gray value is within the preset range;
同样地,参见图8,图8是获取的字符图像的水平投影图,结合图8对步骤S221进行详细说明:图8中的字符图像包含一部分噪声,为了初步定位字符行图像的大致位置,首先需要对输入的字符图像进行水平投影,计算每一行像素点中黑色像素点的个数,从而获得行分布直方图。该字符图像包含两字符行,水平投影后对应获取的行分布直方图呈现两个峰值较大的波峰,且与高斯函数类似。Similarly, referring to FIG. 8, FIG. 8 is a horizontal projection view of the acquired character image, and step S221 is described in detail with reference to FIG. 8. The character image in FIG. 8 includes a part of noise. In order to initially locate the approximate position of the character line image, firstly, The input character image needs to be horizontally projected, and the number of black pixel points in each row of pixels is calculated, thereby obtaining a line distribution histogram. The character image contains two character lines, and the horizontally projected line distribution histogram corresponding to the obtained line distribution histogram presents two peaks with larger peak values, and is similar to the Gaussian function.
S222、利用高斯函数对行分布直方图曲线进行拟合处理,从而确定每一行字符的位置;S222. Perform a fitting process on the line distribution histogram curve by using a Gaussian function to determine the position of each line of characters;
由于直方图中,每一字符行所对应的曲线与高斯函数类似;因此,可以用高斯函数对直方图曲线进行拟合;参见图9,图9为利用高斯函数对图8中经过水平投影获取的行分布直方图曲线进行拟合示意图;依据拟合结果确定字符图像每一行文字的位置。Since the curve corresponding to each character line in the histogram is similar to the Gaussian function; therefore, the histogram curve can be fitted by a Gaussian function; see Fig. 9, which is obtained by horizontal projection in Fig. 8 using a Gaussian function. The line distribution histogram curve is fitted to the schematic diagram; the position of each line of the character image is determined according to the fitting result.
S223、基于每一行字符的位置,分割每一行字符,从而得到分割后的若干字符行图像。S223. Divide each line of characters based on the position of each line of characters, thereby obtaining the divided number of character line images.
参见图6,图6为本实施例一的步骤S23的流程示意图,步骤S23包括:Referring to FIG. 6, FIG. 6 is a schematic flowchart of step S23 of the first embodiment, where step S23 includes:
S231、对字符行图像进行垂直投影,分别计算每一列像素点中黑色像素点的个数,获取灰度值在预设范围内的像素点的列分布直方图曲线;S231, performing vertical projection on the character line image, respectively calculating the number of black pixel points in each column of pixels, and obtaining a column distribution histogram curve of the pixel points whose gray value is within a preset range;
S232、按照预置顺序依次扫描列分布直方图曲线,以获取黑色像素点个数为零的像素点列;S232. Scan the column distribution histogram curve in order according to a preset order to obtain a pixel point column with zero black pixel points;
参见图10,图10是从图7字符图像示例图中得到的一字符行图像示例的垂直投影示意图;从图10中可以看出每两单字符间的分界位置在该列分布直方图曲线上相对应的位置处所获取的黑色像素 点的个数为零。即认为,当字符行图像中某一列不存黑色像素点时,则可以认为此列位置为单字符分割列。按照预置顺序依次扫描列分布直方图曲线,以扫描获取的灰度值在预设范围内的像素点个数为零的像素点列;Referring to FIG. 10, FIG. 10 is a vertical projection view of an example of a character line image obtained from the character image example of FIG. 7. It can be seen from FIG. 10 that the boundary position between every two single characters is on the column distribution histogram curve. Black pixels acquired at corresponding positions The number of points is zero. That is to say, when there is no black pixel in a column in the character line image, the column position can be considered as a single-character split column. Scanning the column distribution histogram curve in the preset order to scan the obtained pixel point column whose number of pixels in the preset range is zero;
S233、以黑色像素点个数为零的像素点列分割每一字符,从而得到分割后的若干单字符区域;S233, dividing each character by a pixel dot column having a black pixel number of zero, thereby obtaining a plurality of divided single character regions;
参见图11,根据获取的这些像素列分割每一单字符,从而获取若干单字符区域。Referring to FIG. 11, each single character is divided according to the acquired pixel columns, thereby acquiring a plurality of single character regions.
优选地,本实施例二中的步骤S21中获取输入的字符图像可以为字符提取算法处理的字符图像;字符提取算法是指提取字符区域的算法,如模板匹配、笔画宽度变换(SWT)、MSER等方法。经过字符提取算法处理后的字符图像上会去除非字符区域,保留字符区域。Preferably, the character image acquired in step S21 in the second embodiment may be a character image processed by a character extraction algorithm; the character extraction algorithm refers to an algorithm for extracting a character region, such as template matching, stroke width transformation (SWT), and MSER And other methods. The non-character area is removed from the character image processed by the character extraction algorithm, and the character area is reserved.
此外,由于噪声的存在,两单字符间有的时候会存在粘连,使得步骤S23中得到的单字符区域中可能存在两个字符,参见图12,图12是分割的单字符区域中存在粘连字符的示例图,字符“J”和字符“X”由于噪声存在,在通过步骤S23的分割后仍粘连在一起,同在一个单字符区域中;粘连字符的存在影响了本实施例的分割有效性。为实现有效分割,步骤S24检测并分割可能出现的粘连字符,优选地,本实施例二采用滴水算法来获取粘连字符间的分割路径,基于该分割路径分割粘连字符。In addition, due to the presence of noise, there may be sticking between the two single characters, so that there may be two characters in the single-character area obtained in step S23. Referring to FIG. 12, FIG. 12 is a sticky character in the divided single-character area. For example, the character "J" and the character "X" are still stuck together after being divided by the step S23 due to noise, and are in the same single character region; the existence of the sticky character affects the segmentation validity of the embodiment. . In order to achieve effective segmentation, step S24 detects and segments the possible sticky characters. Preferably, in the second embodiment, the drip algorithm is used to obtain the segmentation path between the glued characters, and the glued characters are segmented based on the segmentation path.
具体地,滴水算法通过模拟水滴从高处向低处滴落的过程,从而对粘连字符进行分割:当水滴从字符顶部由于重力的作用,会沿着字符的轮廓向下低落或水平滚动;当水滴陷在字符轮廓的凹处时,将穿透到字符的笔划后继续低落;水滴所经过的轨迹就构成了字符的分割路径。Specifically, the drip algorithm divides the glue characters by simulating the process of water droplets dropping from a high point to a low point: when the water droplets from the top of the character due to gravity, they will descend downward or horizontally along the outline of the character; When the water droplets are trapped in the concave portion of the character outline, they will penetrate into the stroke of the character and continue to be low; the trajectory through which the water droplet passes constitutes the segmentation path of the character.
参见图13,图13(a)滴水算法的水滴滴落的像素点位置的一种编号示例图,假设水滴当前所在的像素点位置用n0表示,水滴下一刻滴落的像素点位置由其周围的五个水滴像素点决定。图13(b)列举了水滴周围五个像素点可能出现的情况及水滴下一刻低落的位置的六种情况;其中,w表示白色像素点,b表示黑色像素点,*表示既有可能是白色像素点也有可能是黑色像素点,箭头则表示水滴低落的轨迹。例如,水滴当前所在像素点位置的邻近五个像素点全是白点或全是黑点时,水滴向下低落。通过下述计算过程可获取水滴的滴落路径:Referring to FIG. 13, FIG. 13(a) is a numbering example diagram of the pixel position of the dripping algorithm of the dripping algorithm, assuming that the position of the pixel where the water droplet is currently located is represented by n 0 , and the position of the pixel where the water drop is dropped next time is The five droplets around the pixel are determined. Fig. 13(b) lists six cases in which five pixel points around the water drop may occur and the position where the water drop is next; wherein w represents a white pixel point, b represents a black pixel point, and * indicates that it may be white Pixels may also be black pixels, and arrows indicate the trajectory of water droplets. For example, when the neighboring five pixel points of the current pixel position of the water drop are all white dots or all black dots, the water drops downward. The dripping path of the water droplets can be obtained by the following calculation process:
对于待分割的粘连字符图像,水滴当前所在像素点位置坐标表示为(xi,yi),水滴的滴落路径为T,则T(xi+1,yi+1)=f(xi,yi,Wi),i=0,1,...;其中(xi+1,yi+1)表示水滴下一步滴落像素点位置的坐标,Wi表示水滴在当前位置上的重力势能,通过下述公式计算重力势能WiFor the stuck character image to be segmented, the coordinates of the pixel position where the water drop is currently located are represented as (x i , y i ), and the drop path of the water drop is T, then T(x i+1 , y i+1 )=f(x i , y i , W i ), i=0, 1, ...; where (x i+1 , y i+1 ) represents the coordinates of the next drop of the droplet at the pixel position, and W i represents the water droplet at the current position On the gravitational potential energy, the gravitational potential energy W i is calculated by the following formula:
Figure PCTCN2016113632-appb-000001
Figure PCTCN2016113632-appb-000001
其中,
Figure PCTCN2016113632-appb-000002
zj表示nj点的像素值,具体地,若nj点为黑色像素点,则zj=0,若nj点为白色像素点,则zj=1;ωj表示nj点被选为水滴下一步的滴落点的权重大小,且ωj=6-j。那么,水滴下一点滴落的位置为:
among them,
Figure PCTCN2016113632-appb-000002
z j represents the pixel value of n j point, specifically, if n j point is a black pixel point, z j =0, if n j point is a white pixel point, z j =1; ω j indicates that n j point is Select the weight of the next drop point of the water drop, and ω j =6-j. Then, the position where the water drops a little is:
Figure PCTCN2016113632-appb-000003
Figure PCTCN2016113632-appb-000003
根据获取的水滴滴落路径分割粘连字符,从而获得最终的若干单字符区域。The glued characters are divided according to the obtained water drop dripping path, thereby obtaining the final several single character regions.
具体实施时,首先通过字符图像的黑色像素点个数的行分布直方图曲线,与高斯函数拟合处确定字符行位置,对字符图像进行行分割,从而获取每一字符行图像;然后在通过每一字符行图像的黑色像素点个数的列分布直方图曲线,以灰度值在预设范围内的像素点个数为零的像素列对每一字符行图像进行单字符的分割,从而获得每一单字符区域;并进一步地,采用滴水算法分割单字符区域中的粘连字符,从而获得最终的单字符区域。In the specific implementation, firstly, the histogram curve is distributed through the line of the black pixel points of the character image, the position of the character line is determined at the fitting with the Gaussian function, and the character image is segmented to obtain the image of each character line; a histogram curve of a column of black pixel points of each character line image, and a single character segmentation of each character line image with a pixel column whose gray value is zero in a preset range of pixels Each single character region is obtained; and further, the glue character is used to divide the glue characters in the single character region to obtain the final single character region.
本实施例基于字符图像中表示字符的像素点个数特征,依次分割字符行和单字符,能够有效分割对字符;并采用滴水算法分割粘连字符;通过计算像素点个数算法简单,解决了现有技术计算复杂,分割效率低的问题;且通过高斯函数进行拟合的方式获取字符行,以及通过滴水算法分割粘连字符,大大减少噪声的干扰,提高的分割字符的准确率。In this embodiment, based on the feature of the number of pixels representing characters in the character image, the character lines and the single characters are sequentially divided, and the pair of characters can be effectively segmented; and the glue characters are divided by the drip algorithm; the algorithm for calculating the number of pixels is simple, and the present solution is solved. There is a problem of complicated technical calculation and low partitioning efficiency; and the character line is obtained by fitting the Gaussian function, and the glue characters are divided by the dripping algorithm, the noise interference is greatly reduced, and the accuracy of the segmented characters is improved.
本发明一种字符分割装置提供的实施例,参见图14,图14是本发明一种字符分割装置提供的实施例的结构示意图;本实施例装置包括字符图像获取单元11、字符行分割单元12和字符分割单元13,具体地:An embodiment of a character segmentation apparatus according to the present invention is shown in FIG. 14. FIG. 14 is a schematic structural diagram of an embodiment of a character segmentation apparatus according to the present invention. The apparatus of the embodiment includes a character image acquisition unit 11 and a character line division unit 12. And the character dividing unit 13, specifically:
字符图像获取单元11,用于获取字符图像;a character image obtaining unit 11 configured to acquire a character image;
字符行分割单元12,用于基于字符图像中每一行像素点中的灰度值在预设范围内的像素点的个数情况,分割每一行字符,从而得到分割后的若干字符行图像;The character line dividing unit 12 is configured to divide each line of characters based on the number of pixels in the preset range of the gray value in each line of the pixel image, thereby obtaining the divided character line images;
字符分割单元13,用于基于每一字符行图像中每一列像素点中的灰度值在预设范围内的像素点的个数情况,分割每一单字符,从而得到分割后的若干单字符区域。The character dividing unit 13 is configured to divide each single character based on the number of pixels in each column of each character row image in which the gray value is within a preset range, thereby obtaining the divided single characters. region.
字符行分割单元12包括第一计算模块121和字符行分割模块122,具体地:The character line dividing unit 12 includes a first calculating module 121 and a character line dividing module 122, specifically:
第一计算模块121,用于对字符图像进行水平投影,分别计算每一行像素点中的灰度值在预设范围内的像素点的个数,获取灰度值在预设范围内的像素点的行分布直方图曲线;利用高斯函数对行分布直方图曲线进行拟合处理,从而确定每一行字符的位置;The first calculation module 121 is configured to perform horizontal projection on the character image, respectively calculate the number of pixel points in the pixel range of each row of pixels in the preset range, and obtain the pixel points whose gray value is within the preset range. The line distribution histogram curve; the Gaussian function is used to fit the line distribution histogram curve to determine the position of each line of characters;
字符行分割模块122,基于每一行字符的位置,分割每一行字符,从而获取若干字符行图像。The character line segmentation module 122 divides each line of characters based on the position of each line of characters, thereby acquiring a plurality of character line images.
字符分割单元13包括第二计算模块131和单字符分割模块132,具体地:The character dividing unit 13 includes a second calculating module 131 and a single character dividing module 132, specifically:
第二计算模块131,用于对字符行图进行垂直投影,分别计算每一列像素点中的灰度值在预设范 围的像素点的个数,获取灰度值在预设范围内的像素点的列分布直方图曲线;按照预置顺序依次扫描灰度值在预设范围内的像素点的列分布直方图曲线,从而得到灰度值在预设范围内的像素点个数为零的像素点列;The second calculating module 131 is configured to vertically project the character line graph, and calculate the gray value in each column of pixels respectively in the preset range. The number of pixels surrounding the circle, obtains a histogram curve of the column distribution of the pixel points whose gray value is within the preset range; sequentially scans the column distribution histogram curve of the pixel points whose gray value is within the preset range according to the preset order , thereby obtaining a pixel point column in which the number of pixels of the gray value in the preset range is zero;
单字符分割模块132,用于基于获取的灰度值在预设范围内的像素点个数为零的像素点列分割每一单字符,从而得到分割后的若干单字符区域。The single-character segmentation module 132 is configured to divide each single character according to the obtained pixel point sequence in which the acquired gray value is zero in the preset range, thereby obtaining the divided single-character regions.
其中,在该字符分割装置中设定的灰度值在预设范围内的像素点的个数情况为对应图像中每行/每列像素点中表示字符区域的像素点的个数情况,则具体实施时灰度值的预设范围为根据表示字符像素点的灰度值范围进行设定。当本实施例中字符图像获取单元11获取字符图像的过程优选包括经过字符提取算法和图像二值化的处理获取字符图像,且,字符图像上的字符区域中像素点灰度值为225,即黑色像素点时,本字符分割装置将灰度值在预设范围的像素点设定为黑色像素点。Wherein, the number of pixels in the grayscale value set in the character segmentation device in the preset range is the number of pixels representing the character region in each row/column of pixels in the image, In the specific implementation, the preset range of the gradation value is set according to the gradation value range indicating the character pixel point. The process of acquiring the character image by the character image acquiring unit 11 in the present embodiment preferably includes obtaining the character image by the process of the character extraction algorithm and the image binarization, and the gray value of the pixel in the character region on the character image is 225, that is, When the black pixel is used, the character dividing device sets the pixel whose gray value is within the preset range as a black pixel.
本发明提供的字符分割装置的实施例还包括粘连字符分割单元14,粘连字符分割单元14用于检测获取的若干单字符区域中存在的粘连字符,并分割粘连字符,从而得到最终的单字符区域。The embodiment of the character segmentation apparatus provided by the present invention further includes an adhesion character segmentation unit 14 for detecting the adhesion characters existing in the acquired single character regions and dividing the adhesion characters to obtain the final single character region. .
其中,粘连字符单元14分割粘连字符时,采用滴水算法获取粘连字符之间的分割路径,具体的计算过程可以参照本发明一种字符分割方法提供的实施例二的步骤S24的具体过程,此处不做赘述。The method for obtaining the segmentation path between the spliced characters is performed by using the drips algorithm. The specific calculation process may refer to the specific process of step S24 of the second embodiment provided by the character segmentation method of the present invention. Do not repeat them.
具体实施时,首先,字符图像获取单元11先获取输入的字符图像;然后,字符行分割单元12中的第一计算模块121计算输入的字符图像的每一行像素点中灰度值在预设范围内的像素点的个数,得到行分布直方图曲线,对行分布直方图曲线进行曲线拟合,确定字符行位置,字符行分割模块122进行字符行分割以获取字符行图像;接着,字符分割单元13中的第二计算模块131,计算字符行图像的列像素点中灰度值在预设范围内的像素点个数,以确定灰度值在预设范围内的像素点个数为零的像素点列;单字符分割模块132根据这些像素列分割获取每一单字符;最后,由粘连字符分割单元14采用滴水算法分割单字符区域中的粘连字符,从而获得最终的单字符区域。In a specific implementation, first, the character image acquiring unit 11 first acquires the input character image; then, the first calculating module 121 in the character line dividing unit 12 calculates the gray value in each row of the input character image in the preset range. The number of pixels within the line is obtained, the line distribution histogram curve is obtained, the line distribution histogram curve is curve-fitted, the character line position is determined, and the character line segmentation module 122 performs character line segmentation to obtain the character line image; then, the character segmentation The second calculating module 131 in the unit 13 calculates the number of pixels in the column pixel of the character line image in the preset range to determine that the number of pixels in the preset range is zero. The pixel sequence column; the single character segmentation module 132 obtains each single character according to the pixel column division; finally, the glue character segmentation unit 14 divides the glue characters in the single character region by the drip algorithm to obtain the final single character region.
本实施例的字符分割装置内设算法简单,无需较高的硬件,有利于降低成本;同时计算快速,有利于提高分割效率;且分割准确率高,有利于运用于字符识别系统时,提高字符识别效果。The character segmentation device of the embodiment has a simple algorithm, does not require high hardware, and is beneficial to reduce cost; at the same time, the calculation is fast, and the segmentation efficiency is improved; and the segmentation accuracy is high, which is beneficial to the character recognition system when the character is recognized. Identify the effect.
基于本发明一种字符分割方法提供的实施例一/实施例二,本发明还提供一种元件检测方法的实施例:通过识别元件上的印刷字符,获取该元件的印刷字符信息,包括该元件的型号和参数等信息,从而达到检测该元件的目的。参见图15,图15是本实施例的流程示意图,具体包括以下步骤:According to the first embodiment/second embodiment provided by the character segmentation method of the present invention, the present invention further provides an embodiment of the component detecting method: obtaining the printed character information of the component by identifying the printed character on the component, including the component Information such as model and parameters to achieve the purpose of detecting the component. Referring to FIG. 15, FIG. 15 is a schematic flowchart of the embodiment, which specifically includes the following steps:
S31、获取待检测元件图像,其中,待检测元件图像包括待检测元件的印刷字符的字符图像;S31. Acquire an image of the component to be detected, where the image of the component to be detected includes a character image of a printed character of the component to be detected;
S32、获取字符图像;S32. Acquire a character image.
S33、基于字符图像中每一行像素点中的灰度值在预设范围内的像素点的个数情况,分割每一行字符,从而得到分割后的若干字符行图像;S33. Dividing each line of characters based on the number of pixels in the pixel in each line of the pixel image in the preset range, thereby obtaining the divided number of character line images;
S34、基于每一字符行图像中每一列像素点中的灰度值在预设范围内的像素点的个数情况,分割 每一单字符,从而得到分割后的若干单字符区域;S34. Segmentation based on the number of pixels in each column of pixels in each character row image in a preset range Each single character, thereby obtaining a plurality of single character regions after division;
S35、基于获取的若干单字符区域,对印刷字符图像进行字符识别,从而获取待检测元件的印刷字符的信息。S35. Perform character recognition on the printed character image based on the acquired single character regions, thereby acquiring information of the printed characters of the component to be detected.
其中,步骤S32中所获取的字符图像可以参照图7所示的字符图像示例图;The character image acquired in step S32 may refer to the character image example diagram shown in FIG. 7;
优选地,步骤S32中从待检测元件图像中所获取的字符图像的过程包括对字符提取,可以采用以下几种字符提取算法进行处理:模板匹配、笔画宽度变换(SWT)、MSER等方法。经过字符提取算法处理后的印刷字符图像上会去除非字符区域,保留待检测元件上的印刷字符区域;Preferably, the process of extracting the character image acquired from the image of the component to be detected in step S32 includes extracting characters, which may be processed by using a following character extraction algorithm: template matching, stroke width conversion (SWT), MSER, and the like. The non-character area is removed on the printed character image processed by the character extraction algorithm, and the printed character area on the component to be detected is retained;
优选地,步骤S32中,在获取待检测元件图像的印刷字符的字符图像的过程中,还包括对图像的二值化处理步骤,最终获取的字符图像为二值化图像。Preferably, in step S32, in the process of acquiring the character image of the printed character of the image of the component to be detected, a binarization processing step of the image is further included, and the finally obtained character image is a binarized image.
具体地,步骤S33、步骤S34中字符图像进行分割,获取若干单字符区域的具体过程可以参照本发明一种字符分割方法的实施例一/实施例二的具体实施过程,此处不做赘述。Specifically, the process of segmenting the character image in the step S33 and the step S34 to obtain a plurality of single-character regions may refer to the specific implementation process of the first embodiment/second embodiment of the character segmentation method of the present invention, and details are not described herein.
具体地,步骤S35中基于获取的若干单字符区域,可以对每一单字符区域进行对应的识别,从而读取该单字符对应的字符含义,进而获取待检测元件的印刷字符信息,从而实现元件检测;或,步骤S35中基于获取的若干单字符区域,进行模板文字对应匹配,进而获取待检测元件匹配的印刷字符信息,从而实现元件检测。Specifically, in step S35, based on the acquired single-character regions, each single-character region can be correspondingly identified, thereby reading the meaning of the character corresponding to the single character, thereby acquiring the printed character information of the component to be detected, thereby implementing the component. Detecting; or, in step S35, based on the acquired single-character regions, the template text corresponding matching is performed, and then the printed character information matched by the component to be detected is acquired, thereby realizing component detection.
具体实施时,先获取包括有待检测元件上的印刷字符的待检测元件图像,并从中获取印刷字符的字符图像;依次对字符图像进行行分割和单字符分割,获取若干单字符区域;并基于获取的若干单字符区域,识别印刷字符,获取元件信息进行元件检测。In a specific implementation, the image of the to-be-detected component including the printed characters on the component to be detected is acquired, and the character image of the printed character is obtained therefrom; the character image is sequentially segmented and single-divided to obtain a plurality of single-character regions; and based on the acquisition Several single-character areas identify printed characters and acquire component information for component detection.
相比于从元件的大小、颜色和外观等信息来检测识别元件,本发明提供的一种元件检测方法的实施例基于元件上的印刷字符信息来识别元件的检测准确率更高;提高了元件检测中对元件上的印刷字符的分割效率和准确率,且由于有效分割提高了字符识别的准确率;最终整体提高了本实施例元件检测时效率和准确度。The embodiment of the component detecting method provided by the present invention recognizes that the detecting accuracy of the component is higher based on the printed character information on the component than detecting the identifying component from information such as the size, color, and appearance of the component; In the detection, the segmentation efficiency and accuracy of the printed characters on the component are improved, and the accuracy of the character recognition is improved due to the effective segmentation; finally, the efficiency and accuracy of the component detection in the embodiment are improved as a whole.
相应地,本发明还提供一种元件检测装置的实施例,参见图16,图16是本实施例的结构示意图,本实施例具体包括:Correspondingly, the present invention further provides an embodiment of the component detecting device. Referring to FIG. 16, FIG. 16 is a schematic structural diagram of the embodiment.
待检测元件图像获取单元10,用于获取待检测元件图像,其中,待检测元件图像包括待检测元件的印刷字符的字符图像;The image to be detected image acquisition unit 10 is configured to acquire an image of the component to be detected, wherein the image of the component to be detected includes a character image of the printed character of the component to be detected;
字符图像获取单元11;用于获取字符图像;a character image obtaining unit 11; configured to acquire a character image;
字符行分割单元12,用于基于所述字符图像中每一行像素点中的灰度值在预设范围内的像素点的个数情况,分割每一行字符,从而得到分割后的若干字符行图像;The character line dividing unit 12 is configured to divide each line character based on the number of pixels in the pixel value of each line of the character image in the preset range, thereby obtaining the divided character line images. ;
字符分割单元13,用于基于每一字符行图像中每一列像素点中的灰度值在预设范围内的像素点的 个数情况,分割每一单字符,从而得到分割后的若干单字符区域;a character dividing unit 13 configured to calculate, according to a pixel point in a preset range, a gray value in each column of pixels in each character line image In the case of a number of cases, each single character is divided to obtain a plurality of single character regions after division;
待检测元件信息获取单元15,用于基于获取的若干所述单字符区域,对所述印刷字符图像进行字符识别,从而获取所述待检测元件的印刷字符的信息。The to-be-detected component information acquiring unit 15 is configured to perform character recognition on the printed character image based on the acquired plurality of single-character regions, thereby acquiring information of the printed characters of the to-be-detected component.
具体实施时,首先,通过待检测元件图像获取单元10来获取待检测元件图像;然后,通过印刷字符图像提取单元11来提取待检测元件图像;接着,依次通过字符行分割单元12和字符分割单元13来获取若干单字符区域;最后通过待检测元件信息获取单元15基于获取的若干单字符区域来进行元件信息识别,从而实现对待检测元件的检测。In a specific implementation, first, the image of the component to be detected is acquired by the image to be detected by the image to be detected 10; then, the image of the component to be detected is extracted by the printed character image extracting unit 11; then, the character row dividing unit 12 and the character dividing unit are sequentially passed through 13 to obtain a plurality of single-character regions; finally, the component information acquisition unit 15 performs component information identification based on the acquired plurality of single-character regions, thereby implementing detection of the component to be detected.
本实施例提高了元件检测中对元件上的印刷字符的分割效率和准确率,且由于有效分割提高了字符识别的准确率;最终整体提高了本实施例元件检测时效率和准确度。The embodiment improves the segmentation efficiency and accuracy of the printed characters on the component in the component detection, and improves the accuracy of the character recognition due to the effective segmentation; finally, the efficiency and accuracy of the component detection in the embodiment are improved as a whole.
以上所述是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也视为本发明的保护范围。 The above is a preferred embodiment of the present invention, and it should be noted that those skilled in the art can also make several improvements and retouchings without departing from the principles of the present invention. It is the scope of protection of the present invention.

Claims (12)

  1. 一种字符分割方法,其特征在于,包括:A character segmentation method, comprising:
    获取字符图像;Get a character image;
    基于所述字符图像中每一行像素点中的灰度值在预设范围内的像素点的个数情况,分割每一行字符,从而得到分割后的若干字符行图像;Dividing each line of characters based on the number of pixels in each row of pixels in the character image in a preset range, thereby obtaining segmented character line images;
    基于每一所述字符行图像中每一列像素点中的所述灰度值在预设范围内的像素点的个数情况,分割每一单字符,从而得到分割后的若干单字符区域。Each of the single characters is divided based on the number of pixels in the column of each of the character line images in which the gray value is within a preset range, thereby obtaining the divided single character regions.
  2. 如权利要求1所述的一种字符分割方法,其特征在于,所述字符分割方法还包括:The character segmentation method according to claim 1, wherein the character segmentation method further comprises:
    检测获得的每一所述单字符区域中存在的粘连字符,并分割所述粘连字符,从而得到最终的单字符区域。The obtained sticky characters existing in each of the single-character regions are detected, and the sticky characters are divided to obtain a final single-character region.
  3. 如权利要求1所述的一种字符分割方法,其特征在于,所述基于所述字符图像中每一行像素点中的灰度值在预设范围内的像素点的个数情况,分割每一行字符,从而得到分割后的若干字符行图像包括:The character segmentation method according to claim 1, wherein the segmentation is performed based on the number of pixels in which the gray value in each row of pixels in the character image is within a preset range The characters, and thus the segmented character line images, include:
    对所述字符图像进行水平投影,分别计算每一行像素点中所述灰度值在预设范围内的像素点的个数,获取所述灰度值在预设范围内的像素点的行分布直方图曲线;Performing horizontal projection on the character image, respectively calculating the number of pixel points in the pixel range of each row of pixels in a preset range, and acquiring a row distribution of the pixel points whose gray value is within a preset range Histogram curve
    利用高斯函数对所述行分布直方图曲线进行拟合处理,从而确定每一行字符的位置;Using a Gaussian function to fit the line distribution histogram curve to determine the position of each line of characters;
    基于每一行字符的位置,分割每一行字符,从而得到分割后的若干字符行图像。Each line of characters is divided based on the position of each line of characters, thereby obtaining a plurality of divided line image lines.
  4. 如权利要求1所述的一种字符分割方法,其特征在于,所述基于每一所述字符行图像中每一列像素点中的灰度值在预设范围内的像素点的个数情况,分割每一单字符,从而得到分割后的若干单字符区域包括:The character segmentation method according to claim 1, wherein the number of pixels in each of the column of pixels in each of the character line images is within a preset range, Dividing each single character to obtain a number of divided single-character regions includes:
    对所述字符行图像进行垂直投影,分别计算每一列像素点中的灰度值在预设范围内的像素点的个数,获取所述灰度值在预设范围内的像素点的列分布直方图曲线;Performing vertical projection on the character line image, respectively calculating the number of pixel points in the pixel range of each column of pixels in a preset range, and obtaining a column distribution of the pixel points whose gray value is within a preset range Histogram curve
    按照预置顺序依次扫描所述列分布直方图曲线,并以所述灰度值在预设范围内的像素点个数为零的像素点列分割每一所述字符,从而得到分割后的若干所述单字符区域。The column distribution histogram curve is sequentially scanned according to a preset order, and each of the characters is divided by a pixel dot column whose number of pixels is zero in a preset range, thereby obtaining a plurality of divided characters. The single character area.
  5. 如权利要求2所述的一种字符分割方法,其特征在于,所述分割所述粘连字符的方法为滴水 算法。A character segmentation method according to claim 2, wherein said method of dividing said glue characters is dripping algorithm.
  6. 如权利要求1所述的一种字符分割方法,其特征在于,获取的所述字符图像为二值化图像,所述灰度值在预设范围内的像素点为灰度值为225的像素点。The character segmentation method according to claim 1, wherein the acquired character image is a binarized image, and the pixel whose gray value is within a preset range is a pixel having a gray value of 225. point.
  7. 一种字符分割装置,其特征在于,包括:A character segmentation device, comprising:
    字符图像获取单元,用于获取字符图像;a character image obtaining unit, configured to acquire a character image;
    字符行分割单元,用于基于所述字符图像中每一行像素点中的灰度值在预设范围内的像素点的个数情况,分割每一行字符,从而得到分割后的若干字符行图像;a character line dividing unit, configured to divide each line of characters based on the number of pixels of the gray level value in each row of pixel points in the character image, thereby obtaining the divided character line images;
    字符分割单元,用于基于每一所述字符行图像中每一列像素点中的所述灰度值在预设范围内的像素点的个数情况,分割每一单字符,从而得到分割后的若干单字符区域。a character dividing unit, configured to divide each single character based on the number of pixels in the column of each of the character line images in the preset grayscale value, thereby obtaining the divided Several single-character areas.
  8. 如权利要求7所述的一种字符分割装置,其特征在于,所述字符分割装置还包括:A character segmentation apparatus according to claim 7, wherein said character segmentation means further comprises:
    粘连字符分割单元,用于检测获取的所述若干单字符区域中存在的粘连字符,并分割所述粘连字符,从而得到最终的单字符区域。The glue character segmentation unit is configured to detect the stuck characters existing in the acquired plurality of single character regions, and divide the glue characters to obtain a final single character region.
  9. 如权利要求7所述的一种字符分割装置,其特征在于,所述字符行分割单元包括:A character segmentation apparatus according to claim 7, wherein said character line division unit comprises:
    第一计算模块,用于对所述字符图像进行水平投影,分别计算每一行像素点中的所述灰度值在预设范围内的像素点的个数,获取所述灰度值在预设范围内的像素点的行分布直方图曲线;利用高斯函数对所述行分布直方图曲线进行拟合处理,从而确定每一行字符的位置;a first calculating module, configured to perform horizontal projection on the character image, respectively calculate a number of pixel points in the pixel range of each row of pixels in a preset range, and obtain the gray value in a preset a line distribution histogram curve of the pixel points in the range; fitting the line distribution histogram curve by a Gaussian function to determine the position of each line character;
    字符行分割模块,基于每一行字符的位置,分割每一行字符,从而获取若干字符行图像。The character line segmentation module divides each line of characters based on the position of each line of characters to obtain a plurality of character line images.
  10. 如权利要求7所述的一种字符分割装置,其特征在于,所述字符分割单元包括:A character segmentation apparatus according to claim 7, wherein said character segmentation unit comprises:
    第二计算模块,用于对所述字符行图进行垂直投影,分别计算每一列像素点中的所述灰度值在预设范围内的像素点的个数,获取所述灰度值在预设范围内的像素点的列分布直方图曲线;按照预置顺序依次扫描所述灰度值在预设范围内的像素点的列分布直方图曲线,从而得到所述灰度值在预设范围内的像素点个数为零的像素点列;a second calculating module, configured to vertically project the character line graph, and calculate a number of pixel points in the column of each column of pixels in a preset range, and obtain the gray value in the pre-predetermined range a column distribution histogram curve of the pixel points in the range; sequentially scanning a column distribution histogram curve of the pixel points whose gray value is within a preset range according to a preset order, thereby obtaining the gray value in a preset range a pixel dot column with zero pixel counts;
    单字符分割模块,用于基于获取的所述灰度值在预设范围内的像素点个数为零的像素点列分割每一单字符,从而得到分割后的若干单字符区域。The single-character segmentation module is configured to divide each single character based on the obtained pixel point sequence in which the gray value is zero in the preset range, thereby obtaining the divided single-character regions.
  11. 一种元件检测方法,其特征在于,包括: A component detecting method, comprising:
    获取待检测元件图像,其中,所述待检测元件图像包括待检测元件的印刷字符的字符图像;Acquiring an image of the component to be detected, wherein the image of the component to be detected includes a character image of a printed character of the component to be detected;
    获取所述字符图像;Obtaining the character image;
    基于所述字符图像中每一行像素点中的灰度值在预设范围内的像素点的个数情况,分割每一行字符,从而得到分割后的若干字符行图像;Dividing each line of characters based on the number of pixels in each row of pixels in the character image in a preset range, thereby obtaining segmented character line images;
    基于每一所述字符行图像中每一列像素点中的所述灰度值在预设范围内的像素点的个数情况,分割每一单字符,从而得到分割后的若干单字符区域;And dividing each single character according to the number of pixels in each column of pixels in each of the character line images in the preset range, thereby obtaining the divided single character regions;
    基于获取的若干单字符区域,对所述字符图像进行字符识别,从而获取所述待检测元件的印刷字符的信息。Character recognition is performed on the character image based on the acquired single character regions, thereby acquiring information of the printed characters of the component to be detected.
  12. 一种元件检测装置,其特征在于,包括:A component detecting device, comprising:
    待检测元件图像获取单元,用于获取待检测元件图像,其中,所述待检测元件图像包括待检测元件的印刷字符的字符图像;The image to be detected image acquiring unit is configured to acquire an image of the component to be detected, wherein the image of the component to be detected includes a character image of a printed character of the component to be detected;
    字符图像获取单元,用于获取字符图像;a character image obtaining unit, configured to acquire a character image;
    字符行分割单元,用于基于所述字符图像中每一行像素点中的灰度值在预设范围内的像素点的个数情况,分割每一行字符,从而得到分割后的若干字符行图像;a character line dividing unit, configured to divide each line of characters based on the number of pixels of the gray level value in each row of pixel points in the character image, thereby obtaining the divided character line images;
    字符分割单元,用于基于每一所述字符行图像中每一列像素点中的所述灰度值在预设范围内的像素点的个数情况,分割每一单字符,从而得到分割后的若干单字符区域;a character dividing unit, configured to divide each single character based on the number of pixels in the column of each of the character line images in the preset grayscale value, thereby obtaining the divided a number of single character areas;
    待检测元件信息获取单元,用于基于获取的若干所述单字符区域,对所述印刷字符图像进行字符识别,从而获取所述待检测元件的印刷字符的信息。 The to-be-detected component information acquiring unit is configured to perform character recognition on the printed character image based on the acquired plurality of single-character regions, thereby acquiring information of the printed characters of the to-be-detected component.
PCT/CN2016/113632 2016-11-08 2016-12-30 Character segmentation method and device, and element detection method and device WO2018086233A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610991144.7A CN106599896A (en) 2016-11-08 2016-11-08 Character segmentation method, character segmentation device, element detection method, and element detection device
CN201610991144.7 2016-11-08

Publications (1)

Publication Number Publication Date
WO2018086233A1 true WO2018086233A1 (en) 2018-05-17

Family

ID=58590277

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/113632 WO2018086233A1 (en) 2016-11-08 2016-12-30 Character segmentation method and device, and element detection method and device

Country Status (2)

Country Link
CN (1) CN106599896A (en)
WO (1) WO2018086233A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109726722A (en) * 2018-12-20 2019-05-07 上海众源网络有限公司 A kind of character segmentation method and device
CN111027544A (en) * 2019-11-29 2020-04-17 武汉虹信技术服务有限责任公司 MSER license plate positioning method and system based on visual saliency detection
CN112364871A (en) * 2020-10-27 2021-02-12 重庆大学 Part code spraying character segmentation method based on improved projection algorithm
CN112699890A (en) * 2021-01-07 2021-04-23 北京美斯齐文化科技有限公司 Picture character cutting system
CN116309296A (en) * 2022-12-31 2023-06-23 中山市天柏包装制品有限公司 Intelligent detection method and detection system for defects of packaging box

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108304863B (en) * 2018-01-12 2020-11-20 西北大学 Terra-cotta warriors image matching method using learning invariant feature transformation
CN107958253A (en) * 2018-01-18 2018-04-24 浙江中控技术股份有限公司 A kind of method and apparatus of image recognition
CN109325492B (en) * 2018-08-17 2023-12-19 平安科技(深圳)有限公司 Character cutting method, device, computer equipment and storage medium
CN109299718B (en) * 2018-09-21 2021-09-24 新华三信息安全技术有限公司 Character recognition method and device
CN109948620A (en) * 2019-03-19 2019-06-28 厦门商集网络科技有限责任公司 A kind of character segmentation method and terminal
CN112435222A (en) * 2020-11-11 2021-03-02 深圳技术大学 Circuit board detection method and device and computer readable storage medium
CN115311278B (en) * 2022-10-11 2023-12-22 南通欧惠纺织科技有限公司 Yarn segmentation method for yarn detection

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101567042A (en) * 2009-05-25 2009-10-28 公安部交通管理科学研究所 Method for recognizing characters of number plate images of armed police automobiles
CN101567041A (en) * 2009-05-25 2009-10-28 公安部交通管理科学研究所 Method for recognizing characters of number plate images of motor vehicles based on trimetric projection
CN104463209A (en) * 2014-12-08 2015-03-25 厦门理工学院 Method for recognizing digital code on PCB based on BP neural network
CN105528601A (en) * 2016-02-25 2016-04-27 华中科技大学 Identity card image acquisition and recognition system as well as acquisition and recognition method based on contact type sensor

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101567042A (en) * 2009-05-25 2009-10-28 公安部交通管理科学研究所 Method for recognizing characters of number plate images of armed police automobiles
CN101567041A (en) * 2009-05-25 2009-10-28 公安部交通管理科学研究所 Method for recognizing characters of number plate images of motor vehicles based on trimetric projection
CN104463209A (en) * 2014-12-08 2015-03-25 厦门理工学院 Method for recognizing digital code on PCB based on BP neural network
CN105528601A (en) * 2016-02-25 2016-04-27 华中科技大学 Identity card image acquisition and recognition system as well as acquisition and recognition method based on contact type sensor

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109726722A (en) * 2018-12-20 2019-05-07 上海众源网络有限公司 A kind of character segmentation method and device
CN111027544A (en) * 2019-11-29 2020-04-17 武汉虹信技术服务有限责任公司 MSER license plate positioning method and system based on visual saliency detection
CN111027544B (en) * 2019-11-29 2023-09-29 武汉虹信技术服务有限责任公司 MSER license plate positioning method and system based on visual saliency detection
CN112364871A (en) * 2020-10-27 2021-02-12 重庆大学 Part code spraying character segmentation method based on improved projection algorithm
CN112699890A (en) * 2021-01-07 2021-04-23 北京美斯齐文化科技有限公司 Picture character cutting system
CN116309296A (en) * 2022-12-31 2023-06-23 中山市天柏包装制品有限公司 Intelligent detection method and detection system for defects of packaging box

Also Published As

Publication number Publication date
CN106599896A (en) 2017-04-26

Similar Documents

Publication Publication Date Title
WO2018086233A1 (en) Character segmentation method and device, and element detection method and device
WO2019169532A1 (en) License plate recognition method and cloud system
CN108364010B (en) License plate recognition method, device, equipment and computer readable storage medium
CN107545239B (en) Fake plate detection method based on license plate recognition and vehicle characteristic matching
US11282185B2 (en) Information processing device, information processing method, and storage medium
CN109377485B (en) Machine vision detection method for instant noodle packaging defects
US8340420B2 (en) Method for recognizing objects in images
CN107067006B (en) Verification code identification method and system serving for data acquisition
WO2018018788A1 (en) Image recognition-based meter reading apparatus and method thereof
CN105046196B (en) Front truck information of vehicles structuring output method based on concatenated convolutional neutral net
CN109657632B (en) Lane line detection and identification method
CN102426649A (en) Simple steel seal digital automatic identification method with high accuracy rate
CN103310211B (en) A kind ofly fill in mark recognition method based on image procossing
CN111046872B (en) Optical character recognition method
WO2021098163A1 (en) Corner-based aerial target detection method
CN109886978B (en) End-to-end alarm information identification method based on deep learning
CN110097510B (en) Pure-color flower identification method, device and storage medium
CN108830133A (en) Recognition methods, electronic device and the readable storage medium storing program for executing of contract image picture
US20210124918A1 (en) Method and device for acquiring slant value of slant image, terminal and storage medium
CN110598566A (en) Image processing method, device, terminal and computer readable storage medium
CN114331986A (en) Dam crack identification and measurement method based on unmanned aerial vehicle vision
TWI536280B (en) Text localization system for street view image and device thereof
CN104408430B (en) License plate positioning method and device
CN108734158B (en) Real-time train number identification method and device
CN112288372B (en) Express bill identification method capable of simultaneously identifying one-dimensional bar code and three-segment code characters

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16921409

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 04/10/2019)

122 Ep: pct application non-entry in european phase

Ref document number: 16921409

Country of ref document: EP

Kind code of ref document: A1