CN116758551A - OCR character recognition method applied to dictionary pen - Google Patents

OCR character recognition method applied to dictionary pen Download PDF

Info

Publication number
CN116758551A
CN116758551A CN202310800506.XA CN202310800506A CN116758551A CN 116758551 A CN116758551 A CN 116758551A CN 202310800506 A CN202310800506 A CN 202310800506A CN 116758551 A CN116758551 A CN 116758551A
Authority
CN
China
Prior art keywords
database
dictionary
target image
fitting
preset
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.)
Pending
Application number
CN202310800506.XA
Other languages
Chinese (zh)
Inventor
谢振辉
王烈峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Readboy Education Technology Co Ltd
Original Assignee
Readboy Education Technology Co Ltd
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 Readboy Education Technology Co Ltd filed Critical Readboy Education Technology Co Ltd
Priority to CN202310800506.XA priority Critical patent/CN116758551A/en
Publication of CN116758551A publication Critical patent/CN116758551A/en
Pending legal-status Critical Current

Links

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/142Image acquisition using hand-held instruments; Constructional details of the instruments
    • 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/32Digital ink
    • G06V30/333Preprocessing; Feature extraction
    • G06V30/347Sampling; Contour coding; Stroke extraction

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Character Discrimination (AREA)

Abstract

The invention relates to the technical field of computers, in particular to an OCR (optical character recognition) method applied to dictionary pens.

Description

OCR character recognition method applied to dictionary pen
Technical Field
The invention relates to the technical field of computers, in particular to an OCR character recognition method applied to dictionary pens.
Background
The OCR character recognition is a character recognition method based on a computer vision technology, a text image is converted into a computer-readable text format by utilizing an image processing technology, so that character recognition and input are realized, the core technology of OCR character recognition comprises links such as image preprocessing, feature extraction, character recognition, result verification and the like, and through the synergistic effect of the links, a dictionary pen can realize an efficient and accurate OCR character recognition function, and better learning and inquiring experience is provided for users.
Chinese patent publication No.: CN113642584a discloses a text recognition method, which relates to the technical field of artificial intelligence, in particular to the technical field of computer vision and deep learning, and can be applied to scenes such as optical character recognition OCR. The specific implementation scheme is as follows: acquiring a plurality of image sequences obtained by continuously scanning a document; image stitching is carried out based on a plurality of image sequences, and a plurality of corresponding continuous stitched image frames are obtained, wherein an overlapping area exists between every two continuous stitched image frames; performing character recognition based on a plurality of continuous spliced image frames to obtain a plurality of corresponding recognition results; and performing de-duplication processing on the multiple recognition results based on overlapping areas between every two continuous spliced image frames in the multiple continuous spliced image frames to obtain a text recognition result aiming at the document.
However, the prior art has the following problems:
in the prior art, in the process of scanning handwritten characters by using a dictionary pen, the recognition effect and efficiency of the dictionary pen on some characters are not ideal due to the fact that the uniformity, definition, fluency and the like of the handwritten characters of different people are different, the conventional dictionary pen does not consider the factors, and the character recognition efficiency and effect of the dictionary pen are improved based on the mode of automatically adjusting the recognized characters of different handwritten characters.
Disclosure of Invention
In order to solve the problem that the recognition effect and efficiency of dictionary pens on some characters are not ideal due to the fact that the uniformity, definition, fluency and the like of the handwritten characters of different people are different in the process of scanning the handwritten characters by using the dictionary pens, the invention provides an OCR character recognition method applied to the dictionary pens, which comprises the following steps:
step S1, acquiring a first target image acquired in an initial sliding time period in a single sliding process of a dictionary pen, wherein the initial sliding time period is the time length which is elapsed by a preset sliding time of an initial sliding point in the single sliding process of the dictionary pen;
step S2, preprocessing is carried out based on the first target image, wherein the preprocessing comprises the steps of obtaining an average brightness value in the first target image, judging whether to adjust the exposure intensity of an exposure unit on a dictionary pen based on the average brightness value, obtaining fitting parameters of each text outline, a plurality of dictionary databases and a plurality of exclusive databases, and determining the dictionary databases and the exclusive databases matched with the first target image based on the average fitting parameters, wherein the average brightness value is the average value of the brightness of each pixel point in the first target image;
step S3, based on the matching result of the first target image, the dictionary database and the exclusive database determined in the step S2, determining the recognition mode of the character outline in the second target image acquired in the subsequent sliding period in the single sliding process of the dictionary pen, including,
under a first preset condition, fitting each text outline with sample data of an optimal dictionary database matched with the first target image, and judging text content represented by each text outline;
under a second preset condition, fitting each text outline with sample data in a plurality of screened dictionary databases, and judging text content represented by each text outline;
under a third preset condition, fitting each text outline with sample data in an optimal exclusive database matched with the first target image, and judging text content represented by each text outline;
the first preset condition is that the first target image is matched with any dictionary database;
the second preset condition is that the first target image is not matched with each dictionary database and each exclusive database;
the third preset condition is that the first target image is not matched with each dictionary database, and the first target image is matched with any proprietary database;
and S4, acquiring the recognition rate of completing all character outline recognition in the step S3, and judging whether to construct a proprietary database based on the recognition rate.
Further, in the step S2, whether to adjust the exposure intensity of the exposure unit on the dictionary pen is determined based on the magnitude of the average brightness value, wherein,
comparing the average brightness value with a preset first brightness comparison threshold value and a preset second brightness comparison threshold value,
judging that the exposure intensity of an exposure unit on the dictionary pen needs to be adjusted under the first brightness comparison result or the second brightness comparison result;
the first brightness comparison result is that the average brightness value is smaller than the preset first brightness comparison threshold value, and the second brightness comparison result is that the average brightness value is larger than or equal to the preset second brightness comparison threshold value.
Further, in the step S2, the exposure intensity of the exposure unit is adjusted according to the comparison result, wherein,
under a first brightness condition, increasing the exposure intensity of the exposure unit by a preset exposure intensity adjustment parameter;
under the second brightness condition, the exposure intensity of the exposure unit is reduced, and the reduction is a preset exposure intensity adjustment parameter;
the first brightness condition is that the comparison result is a first brightness comparison result, and the second brightness condition is that the comparison result is a second brightness comparison result.
Further, in the step S2, fitting parameters of the text outline and the dictionary database and the proprietary database are determined, wherein,
comparing the text outline with sample data in the dictionary database or the exclusive database, determining the maximum fitting degree of a plurality of fitting degrees of the text outline and the sample data, determining the maximum fitting degree as the fitting parameter of the text outline and the dictionary database or the exclusive database, wherein the dictionary databases store sample data belonging to different font types, and the sample data is the text outline stored in the dictionary database or the exclusive database.
Further, in said step S2, it is determined whether said first target image matches said dictionary database or a proprietary database based on average fitting parameters, wherein,
the average fitting parameter is the average value of the fitting parameter of each text outline of the first target image and a single dictionary database or a single exclusive database, the average fitting parameter is compared with a preset fitting comparison threshold value,
if the comparison result meets a preset fitting condition, judging that the first target image is matched with the dictionary database or the exclusive database;
the preset fitting condition is that the average fitting parameter is greater than or equal to the preset fitting comparison threshold value.
Further, in said step S3, a number of dictionary databases are determined which are screened, wherein,
and determining the order of average fitting parameters of the first target image and each dictionary database, and screening a plurality of dictionary databases of preset quantity one by one in descending order.
Further, in said step S3, an optimal dictionary database and an optimal proprietary database are determined which match said first target image, wherein,
determining the sequence of average fitting parameters of the first target image and the matched dictionary database, and determining the dictionary database corresponding to the maximum average fitting parameter as an optimal dictionary database;
and determining the sequence of the average fitting parameters of the first target image and the matched proprietary database, and determining the proprietary database corresponding to the maximum average fitting parameter as the optimal proprietary database.
Further, in the step S3, text contents represented by text outlines are determined, wherein,
calculating the fitting degree of the text outline and sample data in a dictionary database or/and a proprietary database, acquiring the sequence of the fitting degrees, determining sample data corresponding to the maximum fitting degree, and determining text content associated with the sample data as text content represented by the text outline.
Further, in said step S4, it is determined whether or not to construct a proprietary database based on said identification rate, wherein,
comparing the identification rate with a preset rate comparison threshold,
judging and constructing a dedicated database under the preset rate comparison condition;
the preset rate comparison condition is that the recognition rate is smaller than the preset rate comparison threshold, and the recognition rate is the ratio of the number of character outlines to the time required for completing recognition of all the character outlines.
Further, in said step S4, a proprietary database is constructed, wherein,
the step of constructing the exclusive database comprises the steps of newly constructing the exclusive database, extracting text outlines in the first target image and the second target image, establishing association relations between the text outlines and corresponding text contents, and storing the association relations in the newly constructed exclusive database.
Compared with the prior art, the method and the device have the advantages that the first target image acquired in the initial sliding period in the single sliding process of the dictionary pen is acquired, whether the exposure intensity of the exposure unit on the dictionary pen is adjusted is judged based on the average brightness value in the first target image, the dictionary database and the exclusive database matched with the first target image are determined based on the average fitting parameters of the character outlines, the dictionary databases and the exclusive databases, so that the recognition mode of the character outlines in the second target image acquired in the subsequent sliding period in the single sliding process of the dictionary pen is determined, the sample data in the database determined by the first target image are fitted with the character outlines, the character content represented by the character outlines is judged, whether the exclusive database is constructed is judged based on the recognition rate for completing the recognition of all the character outlines, and the character recognition efficiency and the character recognition effect of the dictionary pen are improved.
In particular, in the invention, the exposure intensity of the exposure unit on the dictionary pen is adjusted based on the average brightness value in the first target image, the average brightness value of the first target image is too large to cause image reflection, the average brightness value of the first target image is too small to cause image darkness, the image reflection and darkness can both cause the dictionary pen to not accurately recognize the text content represented by the text outline in the first target image, in the practical situation, when the average brightness value of the first target image collected by the dictionary pen is too large, the exposure intensity of the exposure unit should be reduced to avoid overexposure, when the average brightness value of the first target image collected by the dictionary pen is too small, the exposure intensity of the exposure unit should be increased to increase the brightness of the image, and the exposure intensity of the exposure unit on the dictionary pen is adjusted based on the average brightness value in the first target image, so that the effect of the second target image collected by the dictionary pen in the subsequent sliding period is improved.
In particular, in the invention, the dictionary database and the exclusive database matched with the first target image are determined based on the average fitting parameter, the fitting parameter is represented by the maximum fitting degree of the text outline in the first target image and the sample data in the dictionary database and the exclusive database, the fitting degree of the text outline and the dictionary database and the exclusive database is represented, in actual conditions, if the average fitting parameter of each text outline in the first target image and the sample data in the dictionary database and the exclusive database is larger, the fitting degree of the first target image and the dictionary database and the exclusive database is higher, if the average fitting parameter is larger than the preset fitting contrast threshold, the matching of the first target image and the dictionary database and the exclusive database can be judged, therefore, the matching of the first target image and the dictionary database and the exclusive database can be reliably determined based on the fitting parameter, the corresponding text outline recognition mode is adopted for different matching results of the first target image and the dictionary database and the exclusive database, and the recognition efficiency of the text outline in the second target image acquired in the subsequent sliding period is improved.
In particular, in the invention, based on the determined matching result of the first target image, the dictionary database and the exclusive database, the recognition mode of the text outline in the second target image collected in the subsequent sliding period in the single sliding process of the dictionary pen is determined, under the first preset condition that the first target image is matched with any dictionary database, the sample data in the dictionary database corresponding to the maximum average fitting parameter of the first target image and each dictionary database is fitted with each text outline in the second target image, under the second preset condition that the first target image is not matched with each dictionary database, a plurality of dictionary databases with preset quantity are sequentially screened according to the sequence from high average fitting parameter of the first target image and each dictionary database, the sample data in the screened dictionary databases are fitted with each text outline in the second target image, under the third preset condition that the first target image is not matched with each dictionary database, the maximum average fitting parameter of the first target image and each dictionary database is matched with each text outline in the second dictionary database, namely, the recognition effect of the text outline in the first target image and each dictionary database is improved, and the text fitting efficiency of the first target image and each dictionary database is judged.
In particular, in the invention, whether to construct the exclusive database is judged based on the recognition rate of completing the recognition of all the character outlines, in the practical situation, if the fitting degree of each character outline with the dictionary database and sample data in the exclusive database is smaller, the recognition rate of each character outline is lower by fitting and recognizing each character outline with the dictionary database and sample data in the exclusive database, which can cause longer time to be spent in completing the recognition of all the character outlines, reduce the efficiency of the dictionary pen in recognizing the character outlines, newly construct the exclusive database for the special character outlines with lower recognition rate, further perfect the exclusive database in the dictionary pen, and then fit the character outlines closer to the character outlines with the sample data in the established exclusive database, thereby improving the efficiency and effect of the character recognition of the dictionary pen.
Drawings
FIG. 1 is a schematic diagram of steps of an OCR character recognition method applied to a dictionary pen according to an embodiment of the invention;
fig. 2 is a flowchart of an OCR character recognition method applied to a dictionary pen according to an embodiment of the invention.
Detailed Description
In order that the objects and advantages of the invention will become more apparent, the invention will be further described with reference to the following examples; it should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are merely for explaining the technical principles of the present invention, and are not intended to limit the scope of the present invention.
It should be noted that, in the description of the present invention, terms such as "upper," "lower," "left," "right," "inner," "outer," and the like indicate directions or positional relationships based on the directions or positional relationships shown in the drawings, which are merely for convenience of description, and do not indicate or imply that the apparatus or elements must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as limiting the present invention.
Furthermore, it should be noted that, in the description of the present invention, unless explicitly specified and limited otherwise, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be either fixedly connected, detachably connected, or integrally connected, for example; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the above terms in the present invention can be understood by those skilled in the art according to the specific circumstances.
Referring to fig. 1 and fig. 2, which are schematic diagrams of steps of an OCR character recognition method applied to a dictionary pen and a flowchart of the OCR character recognition method applied to the dictionary pen according to an embodiment of the invention, the OCR character recognition method applied to the dictionary pen of the invention includes:
step S1, acquiring a first target image acquired in an initial sliding period in a single sliding process of a dictionary pen, wherein the initial sliding period is the time length which is elapsed by a preset initial sliding point sliding time t in the single sliding process of the dictionary pen, and t is less than or equal to 1.5S;
step S2, preprocessing is carried out based on the first target image, wherein the preprocessing comprises the steps of obtaining an average brightness value in the first target image, judging whether to adjust the exposure intensity of an exposure unit on a dictionary pen based on the average brightness value, obtaining fitting parameters of each text outline, a plurality of dictionary databases and a plurality of exclusive databases, and determining the dictionary databases and the exclusive databases matched with the first target image based on the average fitting parameters, wherein the average brightness value is the average value of the brightness of each pixel point in the first target image;
step S3, based on the matching result of the first target image, the dictionary database and the exclusive database determined in the step S2, determining the recognition mode of the character outline in the second target image acquired in the subsequent sliding period in the single sliding process of the dictionary pen, including,
under a first preset condition, fitting each text outline with sample data of an optimal dictionary database matched with the first target image, and judging text content represented by each text outline;
under a second preset condition, fitting each text outline with sample data in a plurality of screened dictionary databases, and judging text content represented by each text outline;
under a third preset condition, fitting each text outline with sample data in an optimal exclusive database matched with the first target image, and judging text content represented by each text outline;
the first preset condition is that the first target image is matched with any dictionary database;
the second preset condition is that the first target image is not matched with each dictionary database and each exclusive database;
the third preset condition is that the first target image is not matched with each dictionary database, and the first target image is matched with any proprietary database;
and S4, acquiring the recognition rate of completing all character outline recognition in the step S3, and judging whether to construct a proprietary database based on the recognition rate.
Specifically, in the invention, based on the determined matching result of the first target image, the dictionary database and the exclusive database, the recognition mode of the text outline in the second target image collected in the subsequent sliding period in the single sliding process of the dictionary pen is determined, under the first preset condition that the first target image is matched with any dictionary database, the sample data in the dictionary database corresponding to the maximum average fitting parameter of the first target image and each dictionary database is fitted with each text outline in the second target image, under the second preset condition that the first target image is not matched with each dictionary database, a plurality of dictionary databases with preset quantity are sequentially screened according to the sequence from high average fitting parameter of the first target image and each dictionary database, the sample data in the screened dictionary databases are fitted with each text outline in the second target image, under the third preset condition that the first target image is not matched with each dictionary database, the maximum average fitting parameter of the first target image and each dictionary database is matched with each text outline in the second dictionary database, namely, the recognition effect of the text outline in the first target image and each dictionary database is improved, and the text outline in the first target image is matched with the first dictionary database is judged, and the text outline in the first dictionary database is matched with the text outline in the maximum fitting condition.
Specifically, the specific structure of the dictionary pen is not limited, the dictionary pen adopts a conventional form, and generally, the dictionary pen is provided with a shooting device for scanning target characters and an exposure unit for providing exposure, the shooting device can be a camera which can only complete the function of shooting target images, the exposure unit can be an LED lamp or other types of light sources for illuminating a scanned area so as to provide proper exposure conditions, and the function of only completing the function of illuminating the scanned area in the scanning process of the dictionary pen so as to provide exposure is not repeated in the prior art.
Specifically, the specific manner of acquiring the average brightness value in the first target image is not limited, and the image processing module preset with the image processing algorithm is set in the dictionary pen, so that the function of acquiring the average brightness value in the first target image can be only completed, and the description is omitted.
Specifically, the specific implementation manner of fitting the text contours in the target image with the dictionary database and the sample data in the exclusive database is not limited, the text contours in the target image, the dictionary database and the exclusive database can be extracted by using a template matching method, the text contours in the target image are compared with the text contours in the dictionary database and the exclusive database, and the function of fitting the text contours in the target image with the sample data in the dictionary database and the exclusive database only needs to be completed, and the description is omitted.
Specifically, the specific setting modes of the dictionary database and the exclusive database are not limited, the dictionary database and the exclusive database can be created through proper DBMS software, the sample data to be stored are inserted into the dictionary database and the exclusive database by using a data importing tool, the function of setting the dictionary database and the exclusive database can be completed, and the method is the prior art and is not repeated here.
Specifically, the dictionary database and the exclusive database store text outlines, and the association relation between each text outline and the represented text content is pre-established, so that the text content represented by the acquired text outline in the actual scanning process can be identified by comparing the text outlines with the text outlines in the dictionary database or the exclusive database.
Specifically, in the step S2, whether to adjust the exposure intensity of the exposure unit on the dictionary pen is determined based on the magnitude of the average brightness value, wherein,
comparing the average brightness value B with a preset first brightness comparison threshold B1 and a second brightness comparison threshold B2, wherein B1 is more than 0 and B2,
judging that the exposure intensity of an exposure unit on the dictionary pen needs to be adjusted under the first brightness comparison result or the second brightness comparison result;
the first brightness comparison result is that the average brightness value is smaller than the preset first brightness comparison threshold value, and the second brightness comparison result is that the average brightness value is larger than or equal to the preset second brightness comparison threshold value.
Specifically, in this embodiment, the preset first brightness contrast threshold B1 and second brightness contrast threshold B2 are calculated based on a standard brightness value Δb, where α1 represents a first coefficient, α2 represents a second coefficient, α1 is greater than or equal to 0.7 and smaller than or equal to 0.9,1.1 and α2 is less than or equal to 1.3, and the difference between the outline and the boundary of the characters after the scanned image is grayed is obtained by continuously changing the exposure brightness of the exposure unit.
Specifically, in this embodiment, the first coefficient α1 and the second coefficient α2 should be within a reasonable interval, and in order to avoid inaccurate determination of whether to adjust the exposure intensity of the exposure unit on the dictionary pen due to too large or too small coefficients, the person skilled in the art may select the values of the first coefficient α1 and the second coefficient α2 from the interval [0.7,0.9] and [1.1,1.3], respectively.
Specifically, in the step S2, the exposure intensity of the exposure unit is adjusted according to the comparison result, wherein,
under the first brightness condition, increasing the exposure intensity of the exposure unit by a preset exposure intensity adjustment parameter d0;
under the second brightness condition, the exposure intensity of the exposure unit is reduced by a preset exposure intensity adjustment parameter d0;
the first brightness condition is that the comparison result is a first brightness comparison result, the second brightness condition is that the comparison result is a second brightness comparison result, and d0 is more than 0.
Specifically, in the present embodiment, the preset exposure intensity adjustment parameter D0 is calculated based on the exposure intensity D of the exposure unit before adjustment, and d0=α3d is set, where α3 represents a third coefficient, and 0.2+.α3+.0.5.
Specifically, in the present embodiment, to avoid the coefficient being too large and to characterize the adjustment effect, the person skilled in the art may select the value of the third coefficient α3 from within the interval [0.2,0.5 ].
Specifically, in the invention, the exposure intensity of the exposure unit on the dictionary pen is adjusted based on the average brightness value in the first target image, the average brightness value of the first target image is too large to cause image reflection, the average brightness value of the first target image is too small to cause image darkness, the image reflection and darkness can both cause the dictionary pen to not accurately identify the text content represented by the text outline in the first target image, in the practical situation, when the average brightness value of the first target image collected by the dictionary pen is too large, the exposure intensity of the exposure unit is reduced so as to avoid overexposure, and when the average brightness value of the first target image collected by the dictionary pen is too small, the exposure intensity of the exposure unit is increased so as to increase the brightness of the image, and the exposure intensity of the exposure unit on the dictionary pen is adjusted based on the average brightness value in the first target image, so that the effect of the second target image collected by the dictionary pen in the subsequent sliding period is improved.
Specifically, in the step S2, fitting parameters of the text outline and the dictionary database and the proprietary database are determined, wherein,
comparing the text outline with sample data in the dictionary database or the exclusive database, determining the maximum fitting degree of a plurality of fitting degrees of the text outline and the sample data, determining the maximum fitting degree as the fitting parameter of the text outline and the dictionary database or the exclusive database, wherein the dictionary databases store sample data belonging to different font types, and the sample data is the text outline stored in the dictionary database or the exclusive database.
Specifically, the specific operation mode of the fitting degree of the text outline in the target image and the sample data is not limited, the fitting degree of the text outline in the target image and the sample data can be obtained by calculating Euclidean distances of corresponding points of each point on the shape of the text outline in the target image and the text outline of the sample data, and the fitting degree of the text outline in the target image and the sample data can be calculated only by completing the function of calculating the fitting degree of the text outline in the target image and the sample data, and the detailed description is omitted.
In particular, in the step S2, it is determined whether the first target image matches the dictionary database or a proprietary database based on average fitting parameters, wherein,
the average fitting parameter is the average fitting parameter delta N of each text outline of the first target image and a single dictionary database or a single exclusive database, the average fitting parameter delta N is compared with a preset fitting comparison threshold N0, N0 is more than 0,
if the comparison result meets a preset fitting condition, judging that the first target image is matched with the dictionary database or the exclusive database;
the preset fitting condition is that the average fitting parameter delta N is larger than or equal to the preset fitting comparison threshold value.
Specifically, in this embodiment, a preset fit contrast threshold N0 is selected based on a standard fit degree value Nc, which is experimentally measured in advance, wherein a plurality of actual text contours and sample text contours that have been determined to have a correspondence are pre-selected to calculate a fit degree, the calculated fit degree average value is determined as the standard fit degree value, and a fit contrast threshold n0=c×nc is set, where 0.5 < c < 0.9.
Specifically, in the invention, the dictionary database and the exclusive database matched with the first target image are determined based on the average fitting parameter, the fitting parameter is represented by the maximum fitting degree of the text outline in the first target image and the sample data in the dictionary database and the exclusive database, the fitting degree of the text outline and the dictionary database and the exclusive database is represented, in the actual situation, if the average fitting parameter of each text outline in the first target image and the sample data in the dictionary database and the exclusive database is larger, the fitting degree of the first target image and the dictionary database and the exclusive database is higher, and if the average fitting parameter is larger than the preset fitting contrast threshold, the matching of the first target image and the dictionary database and the exclusive database can be judged, so that the matching of the first target image and the dictionary database and the exclusive database can be reliably determined based on the fitting parameter, the corresponding text outline recognition mode is adopted for different matching results of the first target image and the dictionary database and the exclusive database, and the recognition efficiency of the dictionary outline in the second target image acquired in the subsequent sliding period is improved.
In particular, in said step S3, a number of dictionary databases are determined which are screened out, wherein,
determining the order of average fitting parameters of the first target image and each dictionary database, and screening a plurality of dictionary databases with preset number z0 one by one in descending order, wherein z0 is more than or equal to 3 and less than or equal to 5.
Specifically, in this embodiment, the preset number z0 should be within a reasonable interval, so as to avoid that the number is too large or too small, and the text content represented by each text outline determined under the second preset condition is inaccurate, and the value of the preset number z0 can be selected from the intervals [3,5] by a person skilled in the art, and the interval unit is one.
Specifically, in the step S3, an optimal dictionary database and an optimal proprietary database matched with the first target image are determined, wherein,
determining the sequence of average fitting parameters of the first target image and the matched dictionary database, and determining the dictionary database corresponding to the maximum average fitting parameter as an optimal dictionary database;
and determining the sequence of the average fitting parameters of the first target image and the matched proprietary database, and determining the proprietary database corresponding to the maximum average fitting parameter as the optimal proprietary database.
Specifically, in the step S3, the text content represented by the text outline is determined, wherein,
calculating the fitting degree of the text outline and sample data in a dictionary database or/and a proprietary database, acquiring the sequence of the fitting degrees, determining sample data corresponding to the maximum fitting degree, and determining text content associated with the sample data as text content represented by the text outline.
Specifically, in the step S4, whether to construct a dedicated database is determined based on the recognition rate, wherein,
comparing the recognition rate V with a preset rate comparison threshold V0, wherein V0 is less than or equal to 30/s,
judging and constructing a dedicated database under the preset rate comparison condition;
the preset rate comparison condition is that the recognition rate is smaller than the preset rate comparison threshold, and the recognition rate is the ratio of the number of character outlines to the time required for completing recognition of all the character outlines.
Specifically, in the invention, whether to construct the exclusive database is judged based on the recognition rate of completing the recognition of all the character outlines, in the practical situation, if the fitting degree of each character outline with the dictionary database and sample data in the exclusive database is smaller, the recognition rate of each character outline is lower by fitting and recognizing each character outline with the dictionary database and sample data in the exclusive database, which can cause longer time to complete the recognition of all the character outlines, reduce the efficiency of the dictionary pen in recognizing the character outlines, newly construct the exclusive database for the special character outlines with lower recognition rate, further perfect the exclusive database in the dictionary pen, and then fit the character outlines closer to the character outlines with the sample data in the established exclusive database, thereby improving the character recognition efficiency and effect of the dictionary pen.
In particular, in said step S4, a proprietary database is constructed, wherein,
the step of constructing the exclusive database comprises the steps of newly constructing the exclusive database, extracting text outlines in the first target image and the second target image, establishing association relations between the text outlines and corresponding text contents, and storing the association relations in the newly constructed exclusive database.
Thus far, the technical solution of the present invention has been described in connection with the preferred embodiments shown in the drawings, but it is easily understood by those skilled in the art that the scope of protection of the present invention is not limited to these specific embodiments. Equivalent modifications and substitutions for related technical features may be made by those skilled in the art without departing from the principles of the present invention, and such modifications and substitutions will be within the scope of the present invention.

Claims (10)

1. An OCR character recognition method applied to a dictionary pen, comprising:
step S1, acquiring a first target image acquired in an initial sliding time period in a single sliding process of a dictionary pen, wherein the initial sliding time period is the time length which is elapsed by a preset sliding time of an initial sliding point in the single sliding process of the dictionary pen;
step S2, preprocessing is carried out based on the first target image, wherein the preprocessing comprises the steps of obtaining an average brightness value in the first target image, judging whether to adjust the exposure intensity of an exposure unit on a dictionary pen based on the average brightness value, obtaining fitting parameters of each text outline, a plurality of dictionary databases and a plurality of exclusive databases, and determining the dictionary databases and the exclusive databases matched with the first target image based on the average fitting parameters, wherein the average brightness value is the average value of the brightness of each pixel point in the first target image;
step S3, based on the matching result of the first target image, the dictionary database and the exclusive database determined in the step S2, determining the recognition mode of the character outline in the second target image acquired in the subsequent sliding period in the single sliding process of the dictionary pen, including,
under a first preset condition, fitting each text outline with sample data of an optimal dictionary database matched with the first target image, and judging text content represented by each text outline;
under a second preset condition, fitting each text outline with sample data in a plurality of screened dictionary databases, and judging text content represented by each text outline;
under a third preset condition, fitting each text outline with sample data in an optimal exclusive database matched with the first target image, and judging text content represented by each text outline;
the first preset condition is that the first target image is matched with any dictionary database;
the second preset condition is that the first target image is not matched with each dictionary database and each exclusive database;
the third preset condition is that the first target image is not matched with each dictionary database, and the first target image is matched with any proprietary database;
and S4, acquiring the recognition rate of completing all character outline recognition in the step S3, and judging whether to construct a proprietary database based on the recognition rate.
2. The OCR word recognition method applied to a dictionary pen according to claim 1, wherein in the step S2, it is determined whether to adjust the exposure intensity of an exposure unit on the dictionary pen based on the magnitude of the average brightness value, wherein,
comparing the average brightness value with a preset first brightness comparison threshold value and a preset second brightness comparison threshold value,
judging that the exposure intensity of an exposure unit on the dictionary pen needs to be adjusted under the first brightness comparison result or the second brightness comparison result;
the first brightness comparison result is that the average brightness value is smaller than the preset first brightness comparison threshold value, and the second brightness comparison result is that the average brightness value is larger than or equal to the preset second brightness comparison threshold value.
3. The OCR character recognition method applied to a dictionary pen according to claim 2, wherein in the step S2, an exposure intensity of the exposure unit is adjusted according to the comparison result, wherein,
under a first brightness condition, increasing the exposure intensity of the exposure unit by a preset exposure intensity adjustment parameter;
under the second brightness condition, the exposure intensity of the exposure unit is reduced, and the reduction is a preset exposure intensity adjustment parameter;
the first brightness condition is that the comparison result is a first brightness comparison result, and the second brightness condition is that the comparison result is a second brightness comparison result.
4. The method for recognizing OCR characters applied to a dictionary pen according to claim 1, wherein in the step S2, fitting parameters of the character outline to a dictionary database and a proprietary database are determined,
comparing the text outline with sample data in the dictionary database or the exclusive database, determining the maximum fitting degree of a plurality of fitting degrees of the text outline and the sample data, determining the maximum fitting degree as the fitting parameter of the text outline and the dictionary database or the exclusive database, wherein the dictionary databases store sample data belonging to different font types, and the sample data is the text outline stored in the dictionary database or the exclusive database.
5. The method for recognizing OCR characters applied to a dictionary pen according to claim 4, wherein in the step S2, it is determined whether the first target image is matched with the dictionary database or a dedicated database based on average fitting parameters, wherein,
the average fitting parameter is the average value of the fitting parameter of each text outline of the first target image and a single dictionary database or a single exclusive database, the average fitting parameter is compared with a preset fitting comparison threshold value,
if the comparison result meets a preset fitting condition, judging that the first target image is matched with the dictionary database or the exclusive database;
the preset fitting condition is that the average fitting parameter is greater than or equal to the preset fitting comparison threshold value.
6. The OCR word recognition method applied to a dictionary pen as recited in claim 1, wherein in the step S3, a plurality of dictionary databases are determined, wherein,
and determining the order of average fitting parameters of the first target image and each dictionary database, and screening a plurality of dictionary databases of preset quantity one by one in descending order.
7. The method for recognizing OCR characters applied to a dictionary pen according to claim 1, wherein in the step S3, an optimal dictionary database and an optimal exclusive database matched with the first target image are determined, wherein,
determining the sequence of average fitting parameters of the first target image and the matched dictionary database, and determining the dictionary database corresponding to the maximum average fitting parameter as an optimal dictionary database;
and determining the sequence of the average fitting parameters of the first target image and the matched proprietary database, and determining the proprietary database corresponding to the maximum average fitting parameter as the optimal proprietary database.
8. The OCR word recognition method applied to a dictionary pen as recited in claim 1, wherein in the step S3, a word content represented by a word outline is determined, wherein,
calculating the fitting degree of the text outline and sample data in a dictionary database or/and a proprietary database, acquiring the sequence of the fitting degrees, determining sample data corresponding to the maximum fitting degree, and determining text content associated with the sample data as text content represented by the text outline.
9. The OCR word recognition method applied to a dictionary pen according to claim 1, wherein in step S4, it is determined whether to construct a dedicated database based on the recognition rate, wherein,
comparing the identification rate with a preset rate comparison threshold,
judging and constructing a dedicated database under the preset rate comparison condition;
the preset rate comparison condition is that the recognition rate is smaller than the preset rate comparison threshold, and the recognition rate is the ratio of the number of character outlines to the time required for completing recognition of all the character outlines.
10. The method for recognizing OCR characters applied to a dictionary pen according to claim 9, wherein, in the step S4, a dedicated database is constructed, wherein,
the step of constructing the exclusive database comprises the steps of newly constructing the exclusive database, extracting text outlines in the first target image and the second target image, establishing association relations between the text outlines and corresponding text contents, and storing the association relations in the newly constructed exclusive database.
CN202310800506.XA 2023-07-03 2023-07-03 OCR character recognition method applied to dictionary pen Pending CN116758551A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310800506.XA CN116758551A (en) 2023-07-03 2023-07-03 OCR character recognition method applied to dictionary pen

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310800506.XA CN116758551A (en) 2023-07-03 2023-07-03 OCR character recognition method applied to dictionary pen

Publications (1)

Publication Number Publication Date
CN116758551A true CN116758551A (en) 2023-09-15

Family

ID=87955788

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310800506.XA Pending CN116758551A (en) 2023-07-03 2023-07-03 OCR character recognition method applied to dictionary pen

Country Status (1)

Country Link
CN (1) CN116758551A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103942552A (en) * 2014-02-11 2014-07-23 北京大学 Character image vectorization method and system based on framework instruction
CN105468732A (en) * 2015-11-23 2016-04-06 中国科学院信息工程研究所 Image keyword inspecting method and device
CN111782772A (en) * 2020-07-24 2020-10-16 平安银行股份有限公司 Text automatic generation method, device, equipment and medium based on OCR technology
DE102019132518A1 (en) * 2019-11-29 2021-06-02 Schreiner Group Gmbh & Co. Kg Method for testing a grid-like printed and / or designed surface of an object and object
CN113033540A (en) * 2021-04-14 2021-06-25 易视腾科技股份有限公司 Contour fitting and correcting method for scene characters, electronic device and storage medium
CN114189634A (en) * 2022-01-26 2022-03-15 阿里巴巴达摩院(杭州)科技有限公司 Image acquisition method, electronic device and computer storage medium
CN114727027A (en) * 2022-03-09 2022-07-08 浙江华诺康科技有限公司 Exposure parameter adjusting method and device, computer equipment and storage medium
CN116049461A (en) * 2023-03-29 2023-05-02 北京思想天下教育科技有限公司 Question conversion system based on big data cloud platform

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103942552A (en) * 2014-02-11 2014-07-23 北京大学 Character image vectorization method and system based on framework instruction
CN105468732A (en) * 2015-11-23 2016-04-06 中国科学院信息工程研究所 Image keyword inspecting method and device
DE102019132518A1 (en) * 2019-11-29 2021-06-02 Schreiner Group Gmbh & Co. Kg Method for testing a grid-like printed and / or designed surface of an object and object
CN111782772A (en) * 2020-07-24 2020-10-16 平安银行股份有限公司 Text automatic generation method, device, equipment and medium based on OCR technology
CN113033540A (en) * 2021-04-14 2021-06-25 易视腾科技股份有限公司 Contour fitting and correcting method for scene characters, electronic device and storage medium
CN114189634A (en) * 2022-01-26 2022-03-15 阿里巴巴达摩院(杭州)科技有限公司 Image acquisition method, electronic device and computer storage medium
CN114727027A (en) * 2022-03-09 2022-07-08 浙江华诺康科技有限公司 Exposure parameter adjusting method and device, computer equipment and storage medium
CN116049461A (en) * 2023-03-29 2023-05-02 北京思想天下教育科技有限公司 Question conversion system based on big data cloud platform

Similar Documents

Publication Publication Date Title
CN110728225B (en) High-speed face searching method for attendance checking
CN1237474C (en) Iris identification system and method and computer readable storage medium stored therein computer executable instructions to implement iris identification method
CN107292307B (en) Automatic identification method and system for inverted Chinese character verification code
US11893831B2 (en) Identity information processing method and device based on fundus image
JP2003506767A (en) Apparatus and method for matching scanned images
EP1495437B1 (en) Robust face registration via multiple face prototypes synthesis
JP2991779B2 (en) Character recognition method and device
CN111985465A (en) Text recognition method, device, equipment and storage medium
CN114445879A (en) High-precision face recognition method and face recognition equipment
CN114140696A (en) Commodity identification system optimization method, commodity identification system optimization device, commodity identification equipment and storage medium
CN108573219A (en) A kind of eyelid key point accurate positioning method based on depth convolutional neural networks
US20080075378A1 (en) Method and apparatus for informing user of image recognition error in imaging system
JP2003281539A (en) Facial component searching device and facial component searching method
CN116758551A (en) OCR character recognition method applied to dictionary pen
CN113723410B (en) Digital identification method and device for nixie tube
CN113239932A (en) Tesseract-OCR-based identification method for air velocity scale in PFD (flight display device)
JP2002163637A (en) Device and method for examining image
JPH11306325A (en) Method and device for object detection
Huang et al. Scene character detection and recognition based on multiple hypotheses framework
KR100893086B1 (en) Method for detecting face robust to illumination change
CN116580402B (en) Text recognition method and device for dictionary pen
CN111242047A (en) Image processing method and apparatus, electronic device, and computer-readable storage medium
JP2003216935A (en) Face extracting device and method, and storage medium with those stored therein
CN111259960A (en) SVM incremental learning algorithm name based on PCA and self-adaptive Hash retention set
CN1235319A (en) Process and equipment for recognition of pattern on item presented

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