CN114973255B - Single-point character recognition method and device - Google Patents
Single-point character recognition method and device Download PDFInfo
- Publication number
- CN114973255B CN114973255B CN202210523887.7A CN202210523887A CN114973255B CN 114973255 B CN114973255 B CN 114973255B CN 202210523887 A CN202210523887 A CN 202210523887A CN 114973255 B CN114973255 B CN 114973255B
- Authority
- CN
- China
- Prior art keywords
- sub
- character
- picture
- pictures
- summarized
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 34
- 238000012512 characterization method Methods 0.000 claims abstract description 21
- 230000008569 process Effects 0.000 claims abstract description 11
- 238000012937 correction Methods 0.000 claims description 8
- 238000012545 processing Methods 0.000 claims description 6
- 238000004458 analytical method Methods 0.000 claims description 3
- 230000006835 compression Effects 0.000 claims description 3
- 238000007906 compression Methods 0.000 claims description 3
- 238000000605 extraction Methods 0.000 claims description 3
- 230000000694 effects Effects 0.000 abstract description 8
- 230000011218 segmentation Effects 0.000 abstract description 5
- 238000005516 engineering process Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000004590 computer program Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/14—Image acquisition
- G06V30/141—Image acquisition using multiple overlapping images; Image stitching
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/14—Image acquisition
- G06V30/1444—Selective acquisition, locating or processing of specific regions, e.g. highlighted text, fiducial marks or predetermined fields
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/14—Image acquisition
- G06V30/1444—Selective acquisition, locating or processing of specific regions, e.g. highlighted text, fiducial marks or predetermined fields
- G06V30/1452—Selective acquisition, locating or processing of specific regions, e.g. highlighted text, fiducial marks or predetermined fields based on positionally close symbols, e.g. amount sign or URL-specific characters
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/14—Image acquisition
- G06V30/146—Aligning or centring of the image pick-up or image-field
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Character Input (AREA)
Abstract
A single-point character recognition method and device, the method judges the use state of the user, uses the state to judge the process to obtain the picture sequence scanned by the user and carries on the sub-image representation; calculating the similarity difference between sub-pictures according to the sub-picture characterization result, and judging that the use state of the user is a single-point mode when the similarity difference between the frames is smaller than a given similarity difference threshold value; in the single-point mode, splicing sub-pictures in the picture sequence into summarized pictures; and selecting and defining left and right boundaries of the summarized pictures after splicing the sub-pictures, and carrying out character recognition and output on the summarized pictures with the left and right boundaries after being selected and defined. When the inter-frame similarity difference is not smaller than a given similarity difference threshold, judging that the user use state is a sliding mode, splicing the picture sequences into summarized pictures, and directly carrying out character recognition and output. The invention improves the recognition accuracy and the user experience of the word segmentation pen in a single-point scene, and simultaneously can ensure the use effect in a sliding scene.
Description
Technical Field
The invention belongs to the technical field of text recognition, and particularly relates to a single-point character recognition method and device.
Background
At present, a camera, a picture splicing technology and an OCR technology are widely applied to a word segmentation pen product, the existing product is a sliding scanning scene, and the word segmentation technology based on the camera comprises a picture splicing module and an OCR recognition module under the sliding scanning scene, wherein the camera shoots a sliding area of a user to obtain a picture sequence. The picture splicing module splices the picture sequences into a single picture, and the OCR module recognizes the spliced picture to obtain a recognition result of the text of the sliding region of the user.
But in the present stage, the effects of picture stitching and OCR recognition in a single point scene have yet to be improved. The error recognition result is easy to obtain or the recognition result cannot be obtained in a single-point scene, and mainly has two reasons: compared with a sliding scene, in a single-point scene, the front and rear position characters shot by the camera are incomplete; aiming at parameter configuration of a sliding scene, the method is not suitable for a single-point scene, and the problem that words are cut off or no effective picture splicing result exists easily occurs. How to improve the accuracy of character recognition in a single-point scene on the premise of ensuring the use effect of a sliding scene is a technical problem to be solved urgently.
Disclosure of Invention
Therefore, the invention provides a single-point character recognition method and device, which solve the problems that characters are easily truncated or no effective spliced pictures exist in a single-point scene, the character recognition accuracy is low, and the use effect of a sliding scene cannot be guaranteed.
In order to achieve the above object, the present invention provides the following technical solutions: a single-point character recognition method comprises the following steps:
1) Judging the use state of a user, wherein the use state judging process acquires a picture sequence scanned by the user, and sub-picture characterization is carried out on sub-pictures in the picture sequence;
2) Calculating the similarity difference between sub-pictures according to the sub-picture characterization result, and judging that the use state of a user is a single-point mode when the similarity difference between the frames is smaller than a given similarity difference threshold value;
3) When the use state of the user is a single-point mode, splicing the sub-pictures in the picture sequence into summarized pictures;
4) And selecting and defining left and right boundaries of the summarized pictures after splicing the sub-pictures, and performing character recognition and output on the summarized pictures with the left and right boundaries defined by the selection.
In step 1), when sub-images in the image sequence are subjected to sub-image representation, the sub-images in the image sequence are compressed, and hash values of the compressed sub-images are selected for image representation.
In step 3), sub-pictures in the picture sequence are spliced into summarized pictures, and when the area where the characters in the summarized pictures are located is determined, starting position correction is carried out on the characters with the up-down structure and the characters with insufficient projection.
As a preferred embodiment of the single-point character recognition method, the step 4) includes:
41 Binarizing the spliced summarized pictures, and performing Y-axis direction projection to obtain a projection picture;
42 Scanning and judging pixel values in the projection graph to obtain character boundary information;
43 Judging the width information of the candidate characters and the relative position of the center position of the leftmost candidate character from the left edge of the summarized picture according to the character boundary information, and the relative position of the center position of the rightmost candidate character from the right edge of the summarized picture;
44 Acquiring the average width of characters except for the leftmost candidate character and the rightmost candidate character;
45 Judging whether the leftmost character is complete according to the leftmost candidate character and the average character width, and judging whether the rightmost character is complete according to the rightmost candidate character and the average character width;
46 If the leftmost character is the incomplete character, determining the left boundary of the summarized picture according to the relative position of the center position of the leftmost candidate character from the left edge of the summarized picture;
and if the rightmost character is the incomplete character, determining the right boundary of the summarized picture according to the relative position of the center position of the rightmost candidate character from the right edge of the summarized picture.
In step 2), when the inter-frame similarity difference is not smaller than a given similarity difference threshold, determining that the user use state is a sliding mode, and splicing the picture sequences into the summarized pictures and directly performing character recognition and output.
The invention also provides a single-point character recognition device, which comprises:
The use state judging module is used for judging the use state of the user; the use state judging module comprises:
the sub-graph representation sub-module is used for acquiring a picture sequence scanned by a user in the use state judging process and carrying out sub-graph representation on sub-graphs in the picture sequence;
The similarity judging sub-module is used for calculating the inter-frame similarity difference of the sub-pictures according to the sub-picture characterization result, and judging that the use state of the user is a single-point mode when the inter-frame similarity difference is smaller than a given similarity difference threshold value;
the sub-picture splicing module is used for splicing sub-pictures in the picture sequence into summarized pictures when the use state of the user is a single-point mode;
The boundary selection module is used for selecting and defining the left and right boundaries of the summarized picture after the sub-picture is spliced;
and the identification output module is used for carrying out character identification and output on the summarized pictures with the left and right boundaries defined.
As a preferred embodiment of the single-point character recognition device, the usage state judging module further includes:
and the compression processing sub-module is used for compressing the sub-pictures in the picture sequence when the sub-pictures in the picture sequence are subjected to sub-picture characterization, and selecting hash values of the compressed sub-pictures to carry out picture characterization.
As a preferred solution of the single-point character recognition device, the sub-graph stitching module includes:
And the position correction sub-module is used for splicing the sub-pictures in the picture sequence into summarized pictures, and correcting the starting positions of the upper and lower structural characters and the characters with insufficient projection when determining the area where the characters in the summarized pictures are positioned.
As a preferred embodiment of the single-point character recognition device, the boundary selection module includes:
the projection processing sub-module is used for binarizing the spliced summarized pictures and projecting in the Y-axis direction to obtain a projection picture;
The character boundary extraction sub-module is used for scanning and judging pixel values in the projection graph to obtain character boundary information;
The character boundary analysis sub-module is used for judging the width information of the candidate characters and the relative position of the center position of the leftmost candidate character from the left edge of the summarized picture according to the character boundary information and the relative position of the center position of the rightmost candidate character from the right edge of the summarized picture;
An average width obtaining sub-module for obtaining the average width of the characters except the leftmost candidate character and the rightmost candidate character;
the character integrity judging sub-module is used for judging whether the leftmost character is complete according to the leftmost candidate character and the character average width, and judging whether the rightmost character is complete according to the rightmost candidate character and the character average width;
the character boundary defining sub-module is used for determining the left boundary of the summarized picture according to the relative position of the center position of the leftmost candidate character from the left edge of the summarized picture if the leftmost character is a incomplete character;
and if the rightmost character is the incomplete character, determining the right boundary of the summarized picture according to the relative position of the center position of the rightmost candidate character from the right edge of the summarized picture.
As a preferred solution of the single-point character recognition device, in the similarity judging submodule, when the inter-frame similarity difference is not smaller than a given similarity difference threshold, the use state of the user is judged to be a sliding mode; and splicing the picture sequences into the summarized pictures, and directly carrying out character recognition and output.
The invention has the following advantages: judging the use state of a user, acquiring a picture sequence scanned by the user in the use state judging process, and carrying out sub-graph characterization on sub-pictures in the picture sequence; calculating the similarity difference between sub-pictures according to the sub-picture characterization result, and judging that the use state of the user is a single-point mode when the similarity difference between the frames is smaller than a given similarity difference threshold value; when the use state of the user is a single-point mode, splicing the sub-pictures in the picture sequence into summarized pictures; and selecting and defining left and right boundaries of the summarized pictures after splicing the sub-pictures, and carrying out character recognition and output on the summarized pictures with the left and right boundaries after being selected and defined. When the inter-frame similarity difference is not smaller than a given similarity difference threshold, judging that the user use state is a sliding mode, splicing the picture sequences into summarized pictures, and directly carrying out character recognition and output. The invention can avoid word truncation or no effective picture splicing result in the single-point scene, improves the recognition accuracy and user experience of the word segmentation pen in the single-point scene, and can ensure the use effect in the sliding scene.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. It will be apparent to those of ordinary skill in the art that the drawings in the following description are exemplary only and that other implementations can be obtained from the extensions of the drawings provided without inventive effort.
The structures, proportions, sizes, etc. shown in the present specification are shown only for the purposes of illustration and description, and are not intended to limit the scope of the invention, which is defined by the claims, so that any structural modifications, changes in proportions, or adjustments of sizes, which do not affect the efficacy or the achievement of the present invention, should fall within the scope of the invention.
FIG. 1 is a schematic flow chart of a single-point character recognition method according to embodiment 1 of the present invention;
FIG. 2 is a schematic diagram of a boundary defining process of single-point character recognition according to embodiment 1 of the present invention;
Fig. 3 is a schematic diagram of a single-point character recognition device according to embodiment 2 of the present invention.
Detailed Description
Other advantages and advantages of the present invention will become apparent to those skilled in the art from the following detailed description, which, by way of illustration, is to be read in connection with certain specific embodiments, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
Referring to fig. 1, embodiment 1 of the present invention provides a single-point character recognition method, which includes the following steps:
s1, judging the use state of a user, wherein the use state judging process acquires a picture sequence scanned by the user, and sub-graph characterization is carried out on sub-pictures in the picture sequence;
S2, calculating the similarity difference between sub-pictures according to the sub-picture characterization result, and judging that the use state of the user is a single-point mode when the similarity difference between the frames is smaller than a given similarity difference threshold value;
S3, when the use state of the user is a single-point mode, splicing the sub-pictures in the picture sequence into summarized pictures;
s4, selecting and defining left and right boundaries of the summarized pictures after splicing the sub-pictures, and performing character recognition and output on the summarized pictures with the left and right boundaries defined by the selection.
In this embodiment, step S1 compresses the sub-picture in the picture sequence when performing sub-picture characterization on the sub-picture in the picture sequence, and selects the hash value of the compressed sub-picture to perform picture characterization. In step S2, when the inter-frame similarity difference is not smaller than a given similarity difference threshold, determining that the user use state is a sliding mode, and splicing the picture sequences into the summarized pictures and directly performing character recognition and output.
Specifically, in the process of calculating the similarity of the sub-pictures in the picture sequence, the nth, the 2n, the N, k ×n Zhang Zitu tablets are selected, and k×n < r×fs is satisfied, wherein r is a parameter, and is set to 0.5, and fs is the frame rate of the camera. When calculating the similarity of sub-pictures, in order to improve the calculation speed, firstly compressing each frame of sub-picture to the size of M, and selecting the compressed sub-picture hash value as the picture representation.
Meanwhile, calculating the inter-frame similarity difference delta according to the picture characterization result, if delta is smaller than the similarity difference threshold value, judging that the user operation is in a single-point mode, and if not, judging that the user operation is in a sliding mode.
In the single-point mode, in step S3, sub-pictures in the picture sequence are spliced into a summary picture, and when the area where the characters in the summary picture are located is determined, the starting position correction is performed on the characters with the up-down structure and the characters with insufficient projection.
Specifically, compared with the jigsaw in the sliding mode, when determining the region where the characters in the spliced summarized picture are located, the influence of the font structure on the picture cutting is considered, so that the correction of the starting position of the characters is required to improve the greater redundancy. The starting position correction is performed for Chinese characters with up-down structures, such as 'Yes', and simple Chinese characters with insufficient projection, such as 'one'.
Referring to fig. 2, in the single point mode, step S4 includes:
S41, binarizing the spliced summarized pictures, and carrying out Y-axis direction projection to obtain a projection picture;
S42, scanning and judging pixel values in the projection graph to obtain character boundary information;
S43, judging the width information of the candidate characters and the relative position of the center position of the leftmost candidate character from the left edge of the summarized picture according to the character boundary information, and the relative position of the center position of the rightmost candidate character from the right edge of the summarized picture;
S44, acquiring the average width of the characters except the leftmost candidate character and the rightmost candidate character;
s45, judging whether the leftmost character is complete according to the leftmost candidate character and the average character width, and judging whether the rightmost character is complete according to the rightmost candidate character and the average character width;
s46, if the leftmost character is a incomplete character, determining the left boundary of the summarized picture according to the relative position of the center position of the leftmost candidate character from the left edge of the summarized picture;
and if the rightmost character is the incomplete character, determining the right boundary of the summarized picture according to the relative position of the center position of the rightmost candidate character from the right edge of the summarized picture.
Specifically, the purpose of step S4 is to solve the problem of recognition errors caused by incomplete words near the left and right boundary areas in the single-point mode.
Specifically, in step S41, the binarization of the summarized image is to set the gray value of the pixel point on the image to 0 or 255, so that the whole summarized image shows an obvious black-and-white effect. The projection map is obtained by performing Y-axis direction, that is, horizontal projection on the binarized aggregate picture. The binarization projection itself belongs to the prior art, and more mature codes can be realized.
Specifically, according to the character boundary information, the width information W of the candidate characters, the relative position B left of the center position of the leftmost candidate character from the left edge of the summarized picture, and the relative position E right of the center position of the rightmost candidate character from the right edge of the summarized picture are determined. And then removing the leftmost candidate character and the rightmost candidate character, calculating the average width W average of the rest characters, judging the leftmost character as the incomplete character if the absolute difference between the width W Leftmost of the leftmost candidate character and the average width W average of the characters exceeds a given limit threshold, and judging the rightmost character as the incomplete character if the absolute difference between the width W Rightmost of the rightmost candidate character and the average width W average of the characters exceeds the given limit threshold.
When the leftmost character is judged to be the incomplete character, subtracting the relative position B left of the center position of the leftmost candidate character which is 2 times away from the left edge of the summarized picture at the moment to serve as the left boundary of the summarized picture.
When the rightmost character is judged to be the incomplete character, subtracting the relative position E right of the center position of the rightmost candidate character which is 2 times away from the right edge of the summarized picture at the moment to serve as the right boundary of the summarized picture.
Specifically, the relative position B left of subtracting 2 times the center position of the leftmost candidate character from the left edge of the summary picture is relative to the leftmost incomplete character removed. Subtracting the relative position E right of the center position of the rightmost candidate character which is 2 times away from the right edge of the summarized picture, and correspondingly removing the rightmost incomplete character, thereby realizing the definition of the left and right boundaries of the spliced summarized picture.
In summary, the method and the device for determining the sub-picture of the image sequence acquire the image sequence scanned by the user through determining the use state of the user, and perform sub-picture characterization on the sub-picture in the image sequence; calculating the similarity difference between sub-pictures according to the sub-picture characterization result, and judging that the use state of the user is a single-point mode when the similarity difference between the frames is smaller than a given similarity difference threshold value; when the use state of the user is a single-point mode, splicing the sub-pictures in the picture sequence into summarized pictures; and selecting and defining left and right boundaries of the summarized pictures after splicing the sub-pictures, and carrying out character recognition and output on the summarized pictures with the left and right boundaries after being selected and defined. When the inter-frame similarity difference is not smaller than a given similarity difference threshold, judging that the user use state is a sliding mode, splicing the picture sequences into summarized pictures, and directly carrying out character recognition and output. The invention can avoid word truncation or no effective picture splicing result in the single-point scene, improves the recognition accuracy and user experience of the word segmentation pen in the single-point scene, and can ensure the use effect in the sliding scene.
Example 2
Referring to fig. 3, embodiment 2 of the present invention further provides a single-point text recognition device, including:
the use state judging module 1 is used for judging the use state of a user; the use state judging module comprises:
The sub-graph representation sub-module 11 is used for acquiring a picture sequence scanned by a user in the use state judging process and carrying out sub-graph representation on sub-graphs in the picture sequence;
The similarity judging sub-module 12 is configured to calculate a similarity difference between sub-pictures according to the sub-picture characterization result, and when the similarity difference between the frames is smaller than a given similarity difference threshold value, determine that the user use state is a single-point mode;
the sub-picture splicing module 2 is used for splicing sub-pictures in the picture sequence into summarized pictures when the use state of the user is a single-point mode;
the boundary selection module 3 is used for selecting and defining the left and right boundaries of the summarized picture after the sub-picture is spliced;
And the recognition output module 4 is used for carrying out character recognition and output on the summarized pictures with the left and right boundaries defined.
In this embodiment, the usage status determining module 1 further includes:
And the compression processing sub-module 13 is used for compressing the sub-pictures in the picture sequence and selecting hash values of the compressed sub-pictures to perform picture representation when the sub-pictures in the picture sequence are subjected to sub-picture representation.
In this embodiment, the sub-graph stitching module 2 includes:
And the position correction sub-module 21 is used for splicing the sub-pictures in the picture sequence into a summarized picture, and correcting the starting positions of the upper and lower structural characters and the characters with insufficient projection when determining the area where the characters in the summarized picture are positioned.
In this embodiment, the boundary selection module 3 includes:
the projection processing sub-module 31 is configured to binarize the spliced summarized picture, and perform Y-axis direction projection to obtain a projection image;
A character boundary extraction sub-module 32, configured to scan and determine pixel values in the projection map, so as to obtain character boundary information;
The character boundary analysis sub-module 33 is configured to determine, according to the character boundary information, width information of the candidate characters, a relative position of a center position of a leftmost candidate character from a left edge of the summarized picture, and a relative position of a center position of a rightmost candidate character from a right edge of the summarized picture;
An average width acquisition sub-module 34 for acquiring an average width of characters other than the leftmost candidate character and the rightmost candidate character;
The character integrity judging sub-module 35 is configured to judge whether the leftmost character is complete according to the leftmost candidate character and the character average width, and judge whether the rightmost character is complete according to the rightmost candidate character and the character average width;
a character boundary defining sub-module 36, configured to determine a left boundary of the summarized picture according to a relative position of a center position of the leftmost candidate character from a left edge of the summarized picture if the leftmost character is a incomplete character;
and if the rightmost character is the incomplete character, determining the right boundary of the summarized picture according to the relative position of the center position of the rightmost candidate character from the right edge of the summarized picture.
In this embodiment, in the similarity determination submodule 12, when the inter-frame similarity difference is not smaller than a given similarity difference threshold, it is determined that the user use state is a sliding mode; and splicing the picture sequences into the summarized pictures, and directly carrying out character recognition and output.
It should be noted that, because the content of information interaction and execution process between the modules/sub-modules of the above-mentioned device is based on the same concept as the method embodiment in the embodiment 1 of the present application, the technical effects brought by the content are the same as the method embodiment of the present application, and the specific content can be referred to the description in the foregoing illustrated method embodiment of the present application, which is not repeated here.
Example 3
Embodiment 3 of the present invention provides a non-transitory computer-readable storage medium having stored therein program code of a single-point character recognition method, the program code including instructions for performing the single-point character recognition method of embodiment 1 or any possible implementation thereof.
Computer readable storage media can be any available media that can be accessed by a computer or data storage devices, such as servers, data centers, etc., that contain an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (Solid STATE DISK, SSD)), etc.
Example 4
Embodiment 4 of the present invention provides an electronic device, including: a memory and a processor;
The processor and the memory complete communication with each other through a bus; the memory stores program instructions executable by the processor, which invokes the program instructions to perform the single point word recognition method of embodiment 1 or any possible implementation thereof.
Specifically, the processor may be implemented by hardware or software, and when implemented by hardware, the processor may be a logic circuit, an integrated circuit, or the like; when implemented in software, the processor may be a general-purpose processor, implemented by reading software code stored in a memory, which may be integrated in the processor, or may reside outside the processor, and which may reside separately.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.).
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may alternatively be implemented in program code executable by computing devices, so that they may be stored in a memory device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps within them may be fabricated into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
While the invention has been described in detail in the foregoing general description and specific examples, it will be apparent to those skilled in the art that modifications and improvements can be made thereto. Accordingly, such modifications or improvements may be made without departing from the spirit of the invention and are intended to be within the scope of the invention as claimed.
Claims (10)
1. The single-point character recognition method is characterized by comprising the following steps of:
1) Judging the use state of a user, wherein the use state judging process acquires a picture sequence scanned by the user, and sub-picture characterization is carried out on sub-pictures in the picture sequence;
2) Calculating the similarity difference between sub-pictures according to the sub-picture characterization result, and judging that the use state of a user is a single-point mode when the similarity difference between the frames is smaller than a given similarity difference threshold value;
3) When the use state of the user is a single-point mode, splicing the sub-pictures in the picture sequence into summarized pictures;
4) And selecting and defining left and right boundaries of the summarized pictures after splicing the sub-pictures, and performing character recognition and output on the summarized pictures with the left and right boundaries defined by the selection.
2. The single-point character recognition method according to claim 1, wherein in step 1), when sub-images in the image sequence are subjected to sub-image representation, the sub-images in the image sequence are compressed, and hash values of the compressed sub-images are selected for image representation.
3. The method for recognizing single-point characters according to claim 2, wherein in step 3), sub-pictures in the picture sequence are spliced into a summary picture, and when determining an area where characters in the summary picture are located, starting position correction is performed on the characters with up-down structures and the characters with insufficient projection.
4. A single point text recognition method as defined in claim 3, wherein step 4) includes:
41 Binarizing the spliced summarized pictures, and performing Y-axis direction projection to obtain a projection picture;
42 Scanning and judging pixel values in the projection graph to obtain character boundary information;
43 Judging the width information of the candidate characters and the relative position of the center position of the leftmost candidate character from the left edge of the summarized picture according to the character boundary information, and the relative position of the center position of the rightmost candidate character from the right edge of the summarized picture;
44 Acquiring the average width of characters except for the leftmost candidate character and the rightmost candidate character;
45 Judging whether the leftmost character is complete according to the leftmost candidate character and the average character width, and judging whether the rightmost character is complete according to the rightmost candidate character and the average character width;
46 If the leftmost character is the incomplete character, determining the left boundary of the summarized picture according to the relative position of the center position of the leftmost candidate character from the left edge of the summarized picture;
and if the rightmost character is the incomplete character, determining the right boundary of the summarized picture according to the relative position of the center position of the rightmost candidate character from the right edge of the summarized picture.
5. The single-point character recognition method according to claim 1, wherein in step 2), when the inter-frame similarity difference is not smaller than a given similarity difference threshold, it is determined that a user use state is a sliding mode, and the picture sequences are spliced into the summarized pictures and character recognition and output are directly performed.
6. A single point character recognition device, comprising:
The use state judging module is used for judging the use state of the user; the use state judging module comprises:
the sub-graph representation sub-module is used for acquiring a picture sequence scanned by a user in the use state judging process and carrying out sub-graph representation on sub-graphs in the picture sequence;
The similarity judging sub-module is used for calculating the inter-frame similarity difference of the sub-pictures according to the sub-picture characterization result, and judging that the use state of the user is a single-point mode when the inter-frame similarity difference is smaller than a given similarity difference threshold value;
the sub-picture splicing module is used for splicing sub-pictures in the picture sequence into summarized pictures when the use state of the user is a single-point mode;
The boundary selection module is used for selecting and defining the left and right boundaries of the summarized picture after the sub-picture is spliced;
and the identification output module is used for carrying out character identification and output on the summarized pictures with the left and right boundaries defined.
7. The single point character recognition device according to claim 6, wherein the usage status judging module further comprises:
and the compression processing sub-module is used for compressing the sub-pictures in the picture sequence when the sub-pictures in the picture sequence are subjected to sub-picture characterization, and selecting hash values of the compressed sub-pictures to carry out picture characterization.
8. The single point text recognition device of claim 7, wherein the sub-graph stitching module comprises:
And the position correction sub-module is used for splicing the sub-pictures in the picture sequence into summarized pictures, and correcting the starting positions of the upper and lower structural characters and the characters with insufficient projection when determining the area where the characters in the summarized pictures are positioned.
9. The single point text recognition device of claim 8, wherein the boundary selection module comprises:
the projection processing sub-module is used for binarizing the spliced summarized pictures and projecting in the Y-axis direction to obtain a projection picture;
The character boundary extraction sub-module is used for scanning and judging pixel values in the projection graph to obtain character boundary information;
The character boundary analysis sub-module is used for judging the width information of the candidate characters and the relative position of the center position of the leftmost candidate character from the left edge of the summarized picture according to the character boundary information and the relative position of the center position of the rightmost candidate character from the right edge of the summarized picture;
An average width obtaining sub-module for obtaining the average width of the characters except the leftmost candidate character and the rightmost candidate character;
the character integrity judging sub-module is used for judging whether the leftmost character is complete according to the leftmost candidate character and the character average width, and judging whether the rightmost character is complete according to the rightmost candidate character and the character average width;
the character boundary defining sub-module is used for determining the left boundary of the summarized picture according to the relative position of the center position of the leftmost candidate character from the left edge of the summarized picture if the leftmost character is a incomplete character;
and if the rightmost character is the incomplete character, determining the right boundary of the summarized picture according to the relative position of the center position of the rightmost candidate character from the right edge of the summarized picture.
10. The apparatus according to claim 9, wherein the similarity determination sub-module determines that the user use state is a sliding mode when the inter-frame similarity difference is not smaller than a given similarity difference threshold; and splicing the picture sequences into the summarized pictures, and directly carrying out character recognition and output.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210523887.7A CN114973255B (en) | 2022-05-14 | 2022-05-14 | Single-point character recognition method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210523887.7A CN114973255B (en) | 2022-05-14 | 2022-05-14 | Single-point character recognition method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114973255A CN114973255A (en) | 2022-08-30 |
CN114973255B true CN114973255B (en) | 2024-09-10 |
Family
ID=82983870
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210523887.7A Active CN114973255B (en) | 2022-05-14 | 2022-05-14 | Single-point character recognition method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114973255B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2254325A1 (en) * | 2009-05-20 | 2010-11-24 | Dacuda AG | Image processing for handheld scanner |
WO2021232593A1 (en) * | 2020-05-22 | 2021-11-25 | 平安国际智慧城市科技股份有限公司 | Product protocol character recognition-based method and apparatus for recognizing malicious terms, and device |
Family Cites Families (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100514355C (en) * | 2005-09-05 | 2009-07-15 | 富士通株式会社 | Method and device for assigned text line extraction |
WO2009114967A1 (en) * | 2008-03-19 | 2009-09-24 | 东莞市步步高教育电子产品有限公司 | Motion scan-based image processing method and device |
CN102156867B (en) * | 2010-12-27 | 2013-02-20 | 汉王科技股份有限公司 | Method and device for splicing image sequence |
CN102324027B (en) * | 2011-05-27 | 2013-05-29 | 汉王科技股份有限公司 | Scanning and identifying device and method |
CN103116751B (en) * | 2013-01-24 | 2016-07-06 | 河海大学 | A kind of Method of Automatic Recognition for Character of Lcecse Plate |
CN109377834B (en) * | 2018-09-27 | 2021-02-09 | 成都快眼科技有限公司 | Text conversion method and system for assisting blind person in reading |
CN111027546B (en) * | 2019-12-05 | 2024-03-26 | 嘉楠明芯(北京)科技有限公司 | Character segmentation method, device and computer readable storage medium |
CN113220204A (en) * | 2021-06-02 | 2021-08-06 | 深圳云知声信息技术有限公司 | Dictionary pen scanning method and device, electronic equipment and storage medium |
CN113628113B (en) * | 2021-08-11 | 2024-07-23 | 科大讯飞股份有限公司 | Image stitching method and related equipment thereof |
CN113642559B (en) * | 2021-08-18 | 2023-10-17 | 百度在线网络技术(北京)有限公司 | Text acquisition method, device and equipment based on scanning equipment and storage medium |
CN113971808B (en) * | 2021-10-26 | 2025-03-11 | 福建云知声智能科技有限公司 | A streaming text recognition method, device, electronic device and storage medium |
CN114359910B (en) * | 2021-12-30 | 2025-03-28 | 科大讯飞股份有限公司 | Text point reading method, computer equipment and storage medium |
-
2022
- 2022-05-14 CN CN202210523887.7A patent/CN114973255B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2254325A1 (en) * | 2009-05-20 | 2010-11-24 | Dacuda AG | Image processing for handheld scanner |
WO2021232593A1 (en) * | 2020-05-22 | 2021-11-25 | 平安国际智慧城市科技股份有限公司 | Product protocol character recognition-based method and apparatus for recognizing malicious terms, and device |
Also Published As
Publication number | Publication date |
---|---|
CN114973255A (en) | 2022-08-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5318122B2 (en) | Method and apparatus for reading information contained in bar code | |
JP5896245B2 (en) | How to crop a text image | |
CN103400099B (en) | Terminal and two-dimensional code identification method | |
JP2010218061A (en) | Image processing device | |
CN111445424B (en) | Image processing method, device, equipment and medium for processing mobile terminal video | |
KR20150031766A (en) | Method and Apparatus for Using Image Stabilization | |
CN111368574A (en) | Bar code identification method and device | |
KR20100019961A (en) | Character recognition device, program, and method | |
US8538191B2 (en) | Image correction apparatus and method for eliminating lighting component | |
JP2001266068A (en) | Method and device for recognizing table, character- recognizing device, and storage medium for recording table recognizing program | |
US8472078B2 (en) | Image processing apparatus for determining whether a region based on a combined internal region is a table region | |
US20250078496A1 (en) | System and method for capturing by a device an image of a light colored object on a light colored background for uploading to a remote server | |
US8768058B2 (en) | System for extracting text from a plurality of captured images of a document | |
CN113657369B (en) | Character recognition method and related equipment thereof | |
CN113657370B (en) | Character recognition method and related equipment thereof | |
CN114973255B (en) | Single-point character recognition method and device | |
WO2013177240A1 (en) | Textual information extraction method using multiple images | |
KR101473713B1 (en) | Apparatus for recognizing character and method thereof | |
US10373329B2 (en) | Information processing apparatus, information processing method and storage medium for determining an image to be subjected to a character recognition processing | |
CN113538337B (en) | Detection method, detection device and computer readable storage medium | |
CN112541429B (en) | Intelligent image capture method and device, electronic equipment and storage medium | |
CN108447107B (en) | Method and apparatus for generating video | |
CN112233134B (en) | Control segmentation method and device, storage medium, and electronic device | |
CN117993407A (en) | Method, device, equipment and medium for identifying specific object in blurred image | |
CN112911305A (en) | Image compression method for high-speed processing and related equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |