CN111783765B - Method and device for recognizing image characters and electronic equipment - Google Patents

Method and device for recognizing image characters and electronic equipment Download PDF

Info

Publication number
CN111783765B
CN111783765B CN202010660567.7A CN202010660567A CN111783765B CN 111783765 B CN111783765 B CN 111783765B CN 202010660567 A CN202010660567 A CN 202010660567A CN 111783765 B CN111783765 B CN 111783765B
Authority
CN
China
Prior art keywords
matrix
identified
feature
similarity
feature points
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
Application number
CN202010660567.7A
Other languages
Chinese (zh)
Other versions
CN111783765A (en
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.)
Shanghai Qiyu Information Technology Co ltd
Original Assignee
Shanghai Qiyu Information 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 Shanghai Qiyu Information Technology Co ltd filed Critical Shanghai Qiyu Information Technology Co ltd
Priority to CN202010660567.7A priority Critical patent/CN111783765B/en
Publication of CN111783765A publication Critical patent/CN111783765A/en
Application granted granted Critical
Publication of CN111783765B publication Critical patent/CN111783765B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/22Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the specification provides a method for recognizing image characters, which comprises the steps of converting image information to be recognized into a matrix to be recognized, obtaining a plurality of reference matrixes generated by reference characters, distributing feature areas in the reference matrixes for feature points in the matrix to be recognized according to position distribution, wherein the feature areas are provided with a plurality of feature points, calculating the similarity between the feature points in the matrix to be recognized and the feature areas corresponding to the feature points, summing the similarity of each point to obtain the similarity between the matrix to be recognized and the reference matrixes, and determining characters in the image to be recognized according to character information corresponding to a target reference matrix with the highest similarity. The feature points in the matrix to be identified can be corresponding to the plurality of feature points in the reference matrix, so that the feature points are not limited by one-to-one correspondence, and the feature points can be still identified under the condition of different lengths and widths of the image to be identified and the reference character by calculating the similarity of the feature points and the feature areas with the plurality of feature points, so that the applicability is improved.

Description

Method and device for recognizing image characters and electronic equipment
Technical Field
The present disclosure relates to the field of computers, and in particular, to a method and an apparatus for recognizing image characters, and an electronic device.
Background
In order to obtain character information in an image, a method for identifying characters (such as letters, numbers, characters and the like) in the image is generated in the industry, and most common methods at present are to match an image to be identified with a reference image, wherein the reference image can be regarded as a character dictionary, different characters are arranged in different reference images, and thus, the characters in the reference image with the highest similarity are the characters identified from the image to be identified.
The principle is that each pixel point (or characteristic point) in the image to be identified corresponds to each pixel point in the image of the reference character one by one, and the similarity between the images is calculated by utilizing the similarity between the points.
This method can only be used for character recognition under normal conditions, and cannot be directly applied under special conditions, so that a method with strong applicability is necessary to recognize characters in an image.
Disclosure of Invention
The embodiment of the specification provides a method, a device and electronic equipment for recognizing image characters, which are used for improving the applicability of recognizing the image characters.
The embodiment of the specification provides a method for identifying image characters, which comprises the following steps:
acquiring image information to be identified generated in a browser and converting the image information to be identified into a matrix to be identified;
acquiring a plurality of reference matrixes generated by reference characters, and distributing characteristic areas in the reference matrixes for each characteristic point in the matrix to be identified according to the position distribution of the characteristic point in the matrix to be identified, wherein the characteristic areas are provided with a plurality of characteristic points;
calculating the similarity between the feature points in the matrix to be identified and the feature areas corresponding to the feature points;
summing the similarity between each characteristic point in the matrix to be identified and the corresponding characteristic region to obtain the similarity between the matrix to be identified and the reference matrix;
and determining a target reference matrix with highest similarity with the image to be identified, and determining characters in the image to be identified according to character information corresponding to the target reference matrix.
Optionally, the calculating the similarity between the feature points in the matrix to be identified and the feature areas corresponding to the feature points includes:
and calculating the similarity between the feature points in the matrix to be identified and each feature point in the corresponding feature region, summing and normalizing to obtain the similarity between the feature points in the matrix to be identified and the corresponding feature region.
Optionally, the calculating the similarity between the feature points in the matrix to be identified and each feature point in the feature region corresponding to the feature points includes:
and determining the similarity between the feature points according to whether the feature values of the feature points are the same.
Optionally, the determining the similarity between the feature points according to whether the feature values of the feature points are the same includes:
if the feature values of the two feature points are the same, the similarity between the feature points is 1, and if the feature values of the two feature points are different, the similarity between the feature points is 0.
Optionally, the reference matrix is different in size from the matrix to be identified;
the allocating the feature area in the reference matrix for each feature point in the matrix to be identified according to the position distribution of the feature point in the matrix to be identified comprises the following steps:
and selecting the characteristic areas in the reference matrix in the same sequence according to the sequence of the positions of the characteristic points in the matrix to be identified from left to right and from top to bottom.
Optionally, the acquiring and converting the image information to be identified generated in the browser into the matrix to be identified includes:
obtaining lattice color data extracted by a browser graphic container;
and judging whether the color value of each point in the dot matrix is larger than a threshold value, and generating a matrix to be identified, wherein the value of the characteristic point is 0 or 1 according to a judging result.
Optionally, the obtaining lattice color data extracted by the browser graphic container includes:
a graphic container is created, dot matrix color data extracted from the video being played.
Optionally, the determining the target reference matrix with the highest similarity with the image to be identified includes:
and traversing the reference matrixes, and calculating the similarity between each reference matrix and the image to be identified.
The embodiment of the specification also provides a device for identifying image characters, which comprises:
the image acquisition module acquires the image information to be identified generated in the browser and converts the image information to be identified into a matrix to be identified;
the characteristic distribution module is used for obtaining a plurality of reference matrixes generated by reference characters, and distributing characteristic areas in the reference matrixes for each characteristic point in the matrix to be identified according to the position distribution of the characteristic point in the matrix to be identified, wherein the characteristic areas are provided with a plurality of characteristic points;
the similarity module is used for calculating the similarity between the feature points in the matrix to be identified and the feature areas corresponding to the feature points;
summing the similarity between each characteristic point in the matrix to be identified and the corresponding characteristic region to obtain the similarity between the matrix to be identified and the reference matrix;
and determining a target reference matrix with highest similarity with the image to be identified, and determining characters in the image to be identified according to character information corresponding to the target reference matrix.
Optionally, the calculating the similarity between the feature points in the matrix to be identified and the feature areas corresponding to the feature points includes:
and calculating the similarity between the feature points in the matrix to be identified and each feature point in the corresponding feature region, summing and normalizing to obtain the similarity between the feature points in the matrix to be identified and the corresponding feature region.
Optionally, the calculating the similarity between the feature points in the matrix to be identified and each feature point in the feature region corresponding to the feature points includes:
and determining the similarity between the feature points according to whether the feature values of the feature points are the same.
Optionally, the determining the similarity between the feature points according to whether the feature values of the feature points are the same includes:
if the feature values of the two feature points are the same, the similarity between the feature points is 1, and if the feature values of the two feature points are different, the similarity between the feature points is 0.
Optionally, the reference matrix is different in size from the matrix to be identified;
the allocating the feature area in the reference matrix for each feature point in the matrix to be identified according to the position distribution of the feature point in the matrix to be identified comprises the following steps:
and selecting the characteristic areas in the reference matrix in the same sequence according to the sequence of the positions of the characteristic points in the matrix to be identified from left to right and from top to bottom.
Optionally, the acquiring and converting the image information to be identified generated in the browser into the matrix to be identified includes:
obtaining lattice color data extracted by a browser graphic container;
and judging whether the color value of each point in the dot matrix is larger than a threshold value, and generating a matrix to be identified, wherein the value of the characteristic point is 0 or 1 according to a judging result.
Optionally, the obtaining lattice color data extracted by the browser graphic container includes:
a graphic container is created, dot matrix color data extracted from the video being played.
Optionally, the determining the target reference matrix with the highest similarity with the image to be identified includes:
and traversing the reference matrixes, and calculating the similarity between each reference matrix and the image to be identified.
The embodiment of the specification also provides an electronic device, wherein the electronic device comprises:
a processor; the method comprises the steps of,
a memory storing computer executable instructions that, when executed, cause the processor to perform any of the methods described above.
The present description also provides a computer-readable storage medium storing one or more programs that, when executed by a processor, implement any of the methods described above.
According to the various technical schemes provided by the embodiment of the specification, the image information to be identified is converted into the matrix to be identified, a plurality of reference matrixes generated by reference characters are obtained, the characteristic areas in the reference matrixes are distributed for all characteristic points in the matrix to be identified according to position distribution, the characteristic areas are provided with a plurality of characteristic points, the similarity between the characteristic points in the matrix to be identified and the characteristic areas corresponding to the characteristic points is calculated, the similarity between the characteristic points and the reference matrixes is obtained by summing the similarity between the characteristic points, and the characters in the image to be identified are determined according to the character information corresponding to the target reference matrix with the highest similarity. The feature points in the matrix to be recognized can correspond to the feature points in the reference matrix, so that the feature points are not limited by one-to-one correspondence, and character recognition can be still performed under the condition that the length and the width of the image to be recognized are different from those of the reference character by calculating the similarity of the feature points and the feature areas with the feature points, and the applicability is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute an undue limitation to the application. In the drawings:
fig. 1 is a schematic diagram of a method for recognizing characters of an image according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of an apparatus for recognizing image characters according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of a computer readable medium according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present invention will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments can be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these exemplary embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the invention to those skilled in the art. The same reference numerals in the drawings denote the same or similar elements, components or portions, and thus a repetitive description thereof will be omitted.
The features, structures, characteristics or other details described in a particular embodiment do not exclude that may be combined in one or more other embodiments in a suitable manner, without departing from the technical idea of the invention.
In the description of specific embodiments, features, structures, characteristics, or other details described in the present invention are provided to enable one skilled in the art to fully understand the embodiments. However, it is not excluded that one skilled in the art may practice the present invention without one or more of the specific features, structures, characteristics, or other details.
The flow diagrams depicted in the figures are exemplary only, and do not necessarily include all of the elements and operations/steps, nor must they be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the order of actual execution may be changed according to actual situations.
The block diagrams depicted in the figures are merely functional entities and do not necessarily correspond to physically separate entities. That is, the functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The term "and/or" and/or "includes all combinations of any one or more of the associated listed items.
Fig. 1 is a schematic diagram of a method for identifying image characters according to an embodiment of the present disclosure, where the method may include:
s101: and acquiring the image information to be identified generated in the browser and converting the image information to be identified into a matrix to be identified.
Each pixel point in the image reflects the information of the image, so that each pixel point is a feature point, and by using the information in the pixel points, a matrix describing the image can be generated, and the distribution position of each feature value in the matrix can reflect the feature of the image.
Considering that there are various scenes in which characters appear, in one scene, when a user uses a browser, particularly when a video is played by using the browser, since character information in the video is represented in the form of an image, coding of the characters is not stored in the video, and characters in the video are actually a display effect of an element, so that flexibility is greatly improved if the characters in the video played in the browser can be identified.
The image information to be identified can have brightness and color information therein, and we can generate a 01 matrix by using at least one of the brightness and the color information.
In this way, the image information to be identified can be stored in a matrix form and operated.
Thus, in the embodiment of the present specification, the capturing and converting the image information to be recognized generated in the browser into the matrix to be recognized may include:
obtaining lattice color data extracted by a browser graphic container;
and judging whether the color value of each point in the dot matrix is larger than a threshold value, and generating a matrix to be identified, wherein the value of the characteristic point is 0 or 1 according to a judging result.
In this embodiment of the present disclosure, the obtaining lattice color data extracted by the browser graphic container may include:
a graphic container is created, dot matrix color data extracted from the video being played.
S102: and acquiring a plurality of reference matrixes generated by the reference characters, and distributing characteristic areas in the reference matrixes for each characteristic point in the matrix to be identified according to the position distribution of the characteristic point in the matrix to be identified, wherein the characteristic areas are provided with a plurality of characteristic points.
In the embodiment of the present specification, the reference matrix is different from the matrix to be identified in size;
the allocating the feature area in the reference matrix for each feature point in the matrix to be identified according to the position distribution of the feature point in the matrix to be identified may include:
and selecting the characteristic areas in the reference matrix in the same sequence according to the sequence of the positions of the characteristic points in the matrix to be identified from left to right and from top to bottom.
Thus, the feature points in each reference matrix correspond to the feature points in the matrix to be identified, and each feature point in the matrix to be identified corresponds to a plurality of feature points in the same feature region in the reference matrix.
By dividing the feature areas, each feature point in the matrix to be identified corresponds to the feature area of the reference matrix one by one, so that subsequent image similarity calculation can be performed.
S103: and calculating the similarity between the feature points in the matrix to be identified and the feature areas corresponding to the feature points.
The similarity between the feature points and the feature areas can be calculated approximately by using the similarity between the feature points, for example, the similarity between the feature points in the matrix to be identified and the feature areas corresponding to the feature points is averaged, and the average value is used as the similarity between the feature points in the matrix to be identified and the feature areas corresponding to the feature points.
Therefore, in the embodiment of the present disclosure, the calculating the similarity between the feature points in the matrix to be identified and the feature areas corresponding to the feature points may include:
and calculating the similarity between the feature points in the matrix to be identified and each feature point in the corresponding feature region, summing and normalizing to obtain the similarity between the feature points in the matrix to be identified and the corresponding feature region.
In this embodiment of the present disclosure, the calculating the similarity between the feature point in the matrix to be identified and each feature point in the feature area corresponding to the feature point may include:
and determining the similarity between the feature points according to whether the feature values of the feature points are the same.
In the embodiment of the present specification, the determining the similarity between the feature points according to whether the feature values of the feature points are the same may include:
if the feature values of the two feature points are the same, the similarity between the feature points is 1, and if the feature values of the two feature points are different, the similarity between the feature points is 0.
S104: and summing the similarity between each characteristic point in the matrix to be identified and the corresponding characteristic region to obtain the similarity between the matrix to be identified and the reference matrix.
Because each feature point in the matrix to be identified corresponds to the feature area in the reference matrix one by one, the similarity between the feature point and the feature area is summed to obtain the similarity between the image to be identified and the reference image, so that the reference character image is determined to be closest to the image to be identified.
S105: and determining a target reference matrix with highest similarity with the image to be identified, and determining characters in the image to be identified according to character information corresponding to the target reference matrix.
The method comprises the steps of converting image information to be recognized into a matrix to be recognized, obtaining a plurality of reference matrixes generated by reference characters, distributing feature areas in the reference matrixes for each feature point in the matrix to be recognized according to position distribution, calculating the similarity between the feature points in the matrix to be recognized and the feature areas corresponding to the feature points, summing the similarity of each point to obtain the similarity between the matrix to be recognized and the reference matrixes, and determining characters in the image to be recognized according to character information corresponding to a target reference matrix with highest similarity. The feature points in the matrix to be recognized can correspond to the feature points in the reference matrix, so that the feature points are not limited by one-to-one correspondence, and character recognition can be still performed under the condition that the length and the width of the image to be recognized are different from those of the reference character by calculating the similarity of the feature points and the feature areas with the feature points, and the applicability is improved.
Specifically, the determining the target reference matrix with the highest similarity to the image to be identified may include:
and traversing the reference matrixes, and calculating the similarity between each reference matrix and the image to be identified.
Fig. 2 is a schematic structural diagram of an apparatus for recognizing image characters according to an embodiment of the present disclosure, where the apparatus may include:
the image acquisition module 201 acquires image information to be identified generated in the browser and converts the image information to be identified into a matrix to be identified;
the feature distribution module 202 obtains a plurality of reference matrixes generated by reference characters, and distributes feature areas in the reference matrixes for each feature point in the matrix to be identified according to the position distribution of the feature point in the matrix to be identified, wherein the feature areas are provided with a plurality of feature points;
the similarity module 203 calculates the similarity between the feature points in the matrix to be identified and the feature areas corresponding to the feature points;
summing the similarity between each characteristic point in the matrix to be identified and the corresponding characteristic region to obtain the similarity between the matrix to be identified and the reference matrix;
and determining a target reference matrix with highest similarity with the image to be identified, and determining characters in the image to be identified according to character information corresponding to the target reference matrix.
In this embodiment of the present disclosure, the calculating a similarity between the feature points in the matrix to be identified and the feature areas corresponding to the feature points includes:
and calculating the similarity between the feature points in the matrix to be identified and each feature point in the corresponding feature region, summing and normalizing to obtain the similarity between the feature points in the matrix to be identified and the corresponding feature region.
In this embodiment of the present disclosure, the calculating the similarity between the feature point in the matrix to be identified and each feature point in the feature area corresponding to the feature point includes:
and determining the similarity between the feature points according to whether the feature values of the feature points are the same.
In an embodiment of the present disclosure, the determining the similarity between feature points according to whether feature values of the feature points are the same includes:
if the feature values of the two feature points are the same, the similarity between the feature points is 1, and if the feature values of the two feature points are different, the similarity between the feature points is 0.
In the embodiment of the present specification, the reference matrix is different from the matrix to be identified in size;
the allocating the feature area in the reference matrix for each feature point in the matrix to be identified according to the position distribution of the feature point in the matrix to be identified comprises the following steps:
and selecting the characteristic areas in the reference matrix in the same sequence according to the sequence of the positions of the characteristic points in the matrix to be identified from left to right and from top to bottom.
In this embodiment of the present disclosure, the capturing and converting image information to be recognized generated in a browser into a matrix to be recognized includes:
obtaining lattice color data extracted by a browser graphic container;
and judging whether the color value of each point in the dot matrix is larger than a threshold value, and generating a matrix to be identified, wherein the value of the characteristic point is 0 or 1 according to a judging result.
In this embodiment of the present disclosure, the obtaining lattice color data extracted by the browser graphic container includes:
a graphic container is created, dot matrix color data extracted from the video being played.
In this embodiment of the present disclosure, the determining the target reference matrix with the highest similarity to the image to be identified includes:
and traversing the reference matrixes, and calculating the similarity between each reference matrix and the image to be identified.
The device obtains a plurality of reference matrixes generated by reference characters by converting image information to be recognized into the matrix to be recognized, distributes characteristic areas in the reference matrix for each characteristic point in the matrix to be recognized according to position distribution, calculates the similarity between the characteristic points in the matrix to be recognized and the characteristic areas corresponding to the characteristic points, sums the similarity of each point to obtain the similarity between the matrix to be recognized and the reference matrix, and determines characters in the image to be recognized according to character information corresponding to a target reference matrix with highest similarity. The feature points in the matrix to be recognized can correspond to the feature points in the reference matrix, so that the feature points are not limited by one-to-one correspondence, and character recognition can be still performed under the condition that the length and the width of the image to be recognized are different from those of the reference character by calculating the similarity of the feature points and the feature areas with the feature points, and the applicability is improved.
Based on the same inventive concept, the embodiments of the present specification also provide an electronic device.
The following describes an embodiment of an electronic device according to the present invention, which may be regarded as a specific physical implementation of the above-described embodiment of the method and apparatus according to the present invention. Details described in relation to the embodiments of the electronic device of the present invention should be considered as additions to the embodiments of the method or apparatus described above; for details not disclosed in the embodiments of the electronic device of the present invention, reference may be made to the above-described method or apparatus embodiments.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. An electronic device 300 according to this embodiment of the present invention is described below with reference to fig. 3. The electronic device 300 shown in fig. 3 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 3, the electronic device 300 is embodied in the form of a general purpose computing device. Components of electronic device 300 may include, but are not limited to: at least one processing unit 310, at least one memory unit 320, a bus 330 connecting the different system components (including the memory unit 320 and the processing unit 310), a display unit 340, and the like.
Wherein the storage unit stores program code that is executable by the processing unit 310 such that the processing unit 310 performs the steps according to various exemplary embodiments of the invention described in the above processing method section of the present specification. For example, the processing unit 310 may perform the steps shown in fig. 1.
The memory unit 320 may include readable media in the form of volatile memory units, such as Random Access Memory (RAM) 3201 and/or cache memory 3202, and may further include Read Only Memory (ROM) 3203.
The storage unit 320 may also include a program/utility 3204 having a set (at least one) of program modules 3205, such program modules 3205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 330 may be one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 300 may also communicate with one or more external devices 400 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 300, and/or any device (e.g., router, modem, etc.) that enables the electronic device 300 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 350. Also, electronic device 300 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 360. The network adapter 360 may communicate with other modules of the electronic device 300 via the bus 330. It should be appreciated that although not shown in fig. 3, other hardware and/or software modules may be used in connection with electronic device 300, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the exemplary embodiments described herein may be implemented in software, or may be implemented in software in combination with necessary hardware. Thus, the technical solution according to the embodiments of the present invention may be embodied in the form of a software product, which may be stored in a computer readable storage medium (may be a CD-ROM, a usb disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, or a network device, etc.) to perform the above-mentioned method according to the present invention. The computer program, when executed by a data processing device, enables the computer readable medium to carry out the above-described method of the present invention, namely: such as the method shown in fig. 1.
Fig. 4 is a schematic diagram of a computer readable medium according to an embodiment of the present disclosure.
A computer program implementing the method shown in fig. 1 may be stored on one or more computer readable media. The computer readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable storage medium may also be any readable medium that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
In summary, the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that some or all of the functionality of some or all of the components in accordance with embodiments of the present invention may be implemented in practice using a general purpose data processing device such as a microprocessor or Digital Signal Processor (DSP). The present invention can also be implemented as an apparatus or device program (e.g., a computer program and a computer program product) for performing a portion or all of the methods described herein. Such a program embodying the present invention may be stored on a computer readable medium, or may have the form of one or more signals. Such signals may be downloaded from an internet website, provided on a carrier signal, or provided in any other form.
The above-described specific embodiments further describe the objects, technical solutions and advantageous effects of the present invention in detail, and it should be understood that the present invention is not inherently related to any particular computer, virtual device or electronic apparatus, and various general-purpose devices may also implement the present invention. The foregoing description of the embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, alternatives, and improvements that fall within the spirit and scope of the invention.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (18)

1. A method of recognizing characters of an image, comprising:
acquiring image information to be identified generated in a browser and converting the image information to be identified into a matrix to be identified, wherein the image information to be identified comprises character information in a video when the video is played by using the browser;
acquiring a plurality of reference matrixes generated by reference characters, and distributing a characteristic area in the reference matrix for each characteristic point in the matrix to be identified according to the position distribution of the characteristic points in the matrix to be identified, wherein the characteristic area is provided with a plurality of characteristic points, so that the characteristic points in each reference matrix correspond to the characteristic points in the matrix to be identified, and each characteristic point in the matrix to be identified corresponds to a plurality of characteristic points in the same characteristic area in the reference matrix;
calculating the similarity between the feature points in the matrix to be identified and the feature areas corresponding to the feature points;
summing the similarity between each characteristic point in the matrix to be identified and the corresponding characteristic region to obtain the similarity between the matrix to be identified and the reference matrix;
and determining a target reference matrix with highest similarity with the image to be identified, and determining characters in the image to be identified according to character information corresponding to the target reference matrix.
2. The method according to claim 1, wherein the calculating the similarity between the feature points in the matrix to be identified and the feature areas corresponding to the feature points includes:
and calculating the similarity between the feature points in the matrix to be identified and each feature point in the corresponding feature region, summing and normalizing to obtain the similarity between the feature points in the matrix to be identified and the corresponding feature region.
3. The method according to claim 2, wherein the calculating the similarity between the feature points in the matrix to be identified and the feature points in the feature region corresponding to the feature points includes:
and determining the similarity between the feature points according to whether the feature values of the feature points are the same.
4. A method according to claim 3, wherein said determining the similarity between the feature points according to whether the feature values of the feature points are the same comprises:
if the feature values of the two feature points are the same, the similarity between the feature points is 1, and if the feature values of the two feature points are different, the similarity between the feature points is 0.
5. The method according to claim 1, characterized in that the reference matrix is of a different size than the matrix to be identified;
the allocating the feature area in the reference matrix for each feature point in the matrix to be identified according to the position distribution of the feature point in the matrix to be identified comprises the following steps:
and selecting the characteristic areas in the reference matrix in the same sequence according to the sequence of the positions of the characteristic points in the matrix to be identified from left to right and from top to bottom.
6. The method according to claim 1, wherein the acquiring and converting the image information to be recognized generated in the browser into the matrix to be recognized includes:
obtaining lattice color data extracted by a browser graphic container;
and judging whether the color value of each point in the dot matrix is larger than a threshold value, and generating a matrix to be identified, wherein the value of the characteristic point is 0 or 1 according to a judging result.
7. The method of claim 6, wherein the obtaining the lattice color data extracted by the browser graphic container comprises:
a graphic container is created, dot matrix color data extracted from the video being played.
8. The method of claim 1, wherein the determining the target reference matrix having the highest similarity to the image to be identified comprises:
and traversing the reference matrixes, and calculating the similarity between each reference matrix and the image to be identified.
9. An apparatus for recognizing characters of an image, comprising:
the image acquisition module acquires image information to be identified generated in a browser and converts the image information to be identified into a matrix to be identified, wherein the image information to be identified contains character information in a video when the video is played by using the browser;
the characteristic distribution module is used for obtaining a plurality of reference matrixes generated by reference characters, distributing characteristic areas in the reference matrixes for the characteristic points in the matrixes to be identified according to the position distribution of the characteristic points in the matrixes to be identified, wherein the characteristic areas are provided with a plurality of characteristic points, so that the characteristic points in each reference matrix correspond to the characteristic points in the matrixes to be identified, and each characteristic point in the matrixes to be identified corresponds to a plurality of characteristic points in the same characteristic area in the matrixes to be identified;
the similarity module is used for calculating the similarity between the feature points in the matrix to be identified and the feature areas corresponding to the feature points;
summing the similarity between each characteristic point in the matrix to be identified and the corresponding characteristic region to obtain the similarity between the matrix to be identified and the reference matrix;
and determining a target reference matrix with highest similarity with the image to be identified, and determining characters in the image to be identified according to character information corresponding to the target reference matrix.
10. The apparatus of claim 9, wherein the calculating the similarity between the feature points in the matrix to be identified and the feature regions corresponding thereto comprises:
and calculating the similarity between the feature points in the matrix to be identified and each feature point in the corresponding feature region, summing and normalizing to obtain the similarity between the feature points in the matrix to be identified and the corresponding feature region.
11. The apparatus of claim 10, wherein the calculating the similarity between the feature points in the matrix to be identified and the feature points in the corresponding feature region includes:
and determining the similarity between the feature points according to whether the feature values of the feature points are the same.
12. The apparatus of claim 11, wherein the determining the similarity between the feature points according to whether the feature values of the feature points are the same comprises:
if the feature values of the two feature points are the same, the similarity between the feature points is 1, and if the feature values of the two feature points are different, the similarity between the feature points is 0.
13. The apparatus of claim 9, wherein the reference matrix is of a different size than the matrix to be identified;
the allocating the feature area in the reference matrix for each feature point in the matrix to be identified according to the position distribution of the feature point in the matrix to be identified comprises the following steps:
and selecting the characteristic areas in the reference matrix in the same sequence according to the sequence of the positions of the characteristic points in the matrix to be identified from left to right and from top to bottom.
14. The apparatus of claim 9, wherein the capturing and converting the image information to be recognized generated in the browser into the matrix to be recognized comprises:
obtaining lattice color data extracted by a browser graphic container;
and judging whether the color value of each point in the dot matrix is larger than a threshold value, and generating a matrix to be identified, wherein the value of the characteristic point is 0 or 1 according to a judging result.
15. The apparatus of claim 14, the obtaining lattice color data extracted by the browser graphic container, comprising:
a graphic container is created, dot matrix color data extracted from the video being played.
16. The apparatus of claim 9, wherein the determining the target reference matrix having the highest similarity to the image to be identified comprises:
and traversing the reference matrixes, and calculating the similarity between each reference matrix and the image to be identified.
17. An electronic device, wherein the electronic device comprises:
a processor; the method comprises the steps of,
a memory storing computer executable instructions that, when executed, cause the processor to perform the method of any of claims 1-8.
18. A computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement the method of any of claims 1-8.
CN202010660567.7A 2020-07-10 2020-07-10 Method and device for recognizing image characters and electronic equipment Active CN111783765B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010660567.7A CN111783765B (en) 2020-07-10 2020-07-10 Method and device for recognizing image characters and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010660567.7A CN111783765B (en) 2020-07-10 2020-07-10 Method and device for recognizing image characters and electronic equipment

Publications (2)

Publication Number Publication Date
CN111783765A CN111783765A (en) 2020-10-16
CN111783765B true CN111783765B (en) 2024-03-22

Family

ID=72767040

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010660567.7A Active CN111783765B (en) 2020-07-10 2020-07-10 Method and device for recognizing image characters and electronic equipment

Country Status (1)

Country Link
CN (1) CN111783765B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115690803A (en) * 2022-10-31 2023-02-03 中电金信软件(上海)有限公司 Digital image recognition method and device, electronic equipment and readable storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0431986A (en) * 1990-05-28 1992-02-04 Sharp Corp Character recognizing method
JP2011257896A (en) * 2010-06-08 2011-12-22 Nidec Sankyo Corp Character recognition method and character recognition apparatus
CN104318573A (en) * 2014-10-31 2015-01-28 广州超音速自动化科技有限公司 Label defect detecting method
CN105139042A (en) * 2015-09-08 2015-12-09 携程计算机技术(上海)有限公司 Image identification method and system
CN108830275A (en) * 2018-05-07 2018-11-16 广东省电信规划设计院有限公司 Dot character, the recognition methods of dot matrix digit and device
CN109543770A (en) * 2018-11-30 2019-03-29 合肥泰禾光电科技股份有限公司 Dot character recognition methods and device
CN110348501A (en) * 2019-07-01 2019-10-18 深圳市道尔智控科技股份有限公司 A kind of realization parking lot license plate Similarity Match Method
CN110569850A (en) * 2019-08-20 2019-12-13 北京旷视科技有限公司 character recognition template matching method and device and text recognition equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101226596B (en) * 2007-01-15 2012-02-01 夏普株式会社 Document image processing apparatus and document image processing process

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0431986A (en) * 1990-05-28 1992-02-04 Sharp Corp Character recognizing method
JP2011257896A (en) * 2010-06-08 2011-12-22 Nidec Sankyo Corp Character recognition method and character recognition apparatus
CN104318573A (en) * 2014-10-31 2015-01-28 广州超音速自动化科技有限公司 Label defect detecting method
CN105139042A (en) * 2015-09-08 2015-12-09 携程计算机技术(上海)有限公司 Image identification method and system
CN108830275A (en) * 2018-05-07 2018-11-16 广东省电信规划设计院有限公司 Dot character, the recognition methods of dot matrix digit and device
CN109543770A (en) * 2018-11-30 2019-03-29 合肥泰禾光电科技股份有限公司 Dot character recognition methods and device
CN110348501A (en) * 2019-07-01 2019-10-18 深圳市道尔智控科技股份有限公司 A kind of realization parking lot license plate Similarity Match Method
CN110569850A (en) * 2019-08-20 2019-12-13 北京旷视科技有限公司 character recognition template matching method and device and text recognition equipment

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
On binary similarity measures for handwritten character recognition;Sung-Hyuk Cha 等;《Eighth International Conference on Document Analysis and Recognition》;1-5 *
基于彩色数字图像的车牌识别系统的设计与实现;苏泽;《中国优秀硕士学位论文全文数据库信息科技辑》;第I138-1128页第4.2.1节 *
基于特征匹配与CNN的浮动验证码识别研究;胡蝶;侯俊;何晨航;张磊;陈伟朋;;《软件导刊》;第19卷(第05期);37-41 *
王锋.车牌识别算法的研究.《中国优秀硕士学位论文全文数据库信息科技辑》.2015,第I138-289页第2.2.1节. *
车牌识别算法的研究;王锋;《中国优秀硕士学位论文全文数据库信息科技辑》;第I138-289页第2.2.1节 *

Also Published As

Publication number Publication date
CN111783765A (en) 2020-10-16

Similar Documents

Publication Publication Date Title
CN111090628B (en) Data processing method and device, storage medium and electronic equipment
US9912349B1 (en) Method and apparatus for processing floating point number matrix, an apparatus and computer-readable storage medium
CN110163205B (en) Image processing method, device, medium and computing equipment
US20200082208A1 (en) Image binarization using mean restrain
CN108171576B (en) Order processing method and device, electronic equipment and computer readable storage medium
CN111291882A (en) Model conversion method, device, equipment and computer storage medium
CN110222511A (en) The recognition methods of Malware family, device and electronic equipment
CN112001372B (en) Face recognition model generation and face recognition method, system, device and medium
CN111783765B (en) Method and device for recognizing image characters and electronic equipment
CN110807111A (en) Three-dimensional graph processing method and device, storage medium and electronic equipment
CN112883818A (en) Text image recognition method, system, device and storage medium
JP7324891B2 (en) Backbone network generation method, apparatus, electronic equipment, storage medium and computer program
CN110335070B (en) WIFI-based user group extension method and device and electronic equipment
CN115101069A (en) Voice control method, device, equipment, storage medium and program product
CN111783766B (en) Method and device for recognizing image characters step by step and electronic equipment
CN111783787B (en) Method and device for recognizing image characters and electronic equipment
CN112132015A (en) Detection method, device, medium and electronic equipment for illegal driving posture
CN110795424B (en) Characteristic engineering variable data request processing method and device and electronic equipment
CN113780294A (en) Text character segmentation method and device
CN109816536B (en) List deduplication method, device and computer equipment
CN113379592A (en) Method and device for processing sensitive area in picture and electronic equipment
CN110033406A (en) Method and apparatus for handling image
CN114996716B (en) Plug-in-based vulnerability processing method and device, computer equipment and storage medium
CN113657353B (en) Formula identification method and device, electronic equipment and storage medium
CN113591764A (en) Gesture recognition method and device, storage medium and electronic 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