CN111259888A - Image-based information comparison method and device and computer-readable storage medium - Google Patents

Image-based information comparison method and device and computer-readable storage medium Download PDF

Info

Publication number
CN111259888A
CN111259888A CN202010041070.7A CN202010041070A CN111259888A CN 111259888 A CN111259888 A CN 111259888A CN 202010041070 A CN202010041070 A CN 202010041070A CN 111259888 A CN111259888 A CN 111259888A
Authority
CN
China
Prior art keywords
image
image set
compared
character
square
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.)
Granted
Application number
CN202010041070.7A
Other languages
Chinese (zh)
Other versions
CN111259888B (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.)
Ping An International Smart City Technology Co Ltd
Original Assignee
Ping An International Smart City 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 Ping An International Smart City Technology Co Ltd filed Critical Ping An International Smart City Technology Co Ltd
Priority to CN202010041070.7A priority Critical patent/CN111259888B/en
Publication of CN111259888A publication Critical patent/CN111259888A/en
Priority to PCT/CN2020/099066 priority patent/WO2021143058A1/en
Application granted granted Critical
Publication of CN111259888B publication Critical patent/CN111259888B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/24Aligning, centring, orientation detection or correction of the image
    • G06V10/243Aligning, centring, orientation detection or correction of the image by compensating for image skew or non-uniform image deformations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/751Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Multimedia (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Character Input (AREA)

Abstract

The invention relates to an artificial intelligence technology, and discloses an information comparison method based on image processing, which comprises the following steps: receiving an image set to be compared, performing inclination correction operation and image block cutting operation on the image set to be compared to obtain an image block set, performing image classification on the image block set, performing type identification on the image block set subjected to image classification according to an optical character identification technology to obtain a multi-type image set, extracting a standard information image set corresponding to the image set to be compared from the database, and comparing the multi-type image set with the standard information image set to obtain an information comparison result of the image set to be compared. The invention also provides an information comparison device based on image processing and a computer readable storage medium. The invention can realize more accurate information comparison function based on image processing.

Description

Image-based information comparison method and device and computer-readable storage medium
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to an information comparison method and device based on image processing and a computer readable storage medium.
Background
At present, the information acquisition of the image is manually completed or a small part of the information acquisition is read by using a machine, the machine reading still needs manual cooperation, for example, an examinee writes a selected question answer in a specific answer sheet, then the machine adopts a matching algorithm to match the answers in the answer sheet, and because the matching technologies do not relate to image processing, the intelligent degree is not high, and the situation of recognition error is easy to occur in the recognition process, namely, the recognition accuracy is not high.
Disclosure of Invention
The invention provides an information comparison method and device based on image processing and a computer readable storage medium, and mainly aims to solve the problems that the intelligent degree of image information acquisition is not high, and identification errors are easy to occur in the identification process.
In order to achieve the above object, the present invention provides an information comparison method based on image processing, which includes:
receiving an image set to be compared, and performing inclination correction operation and image square cutting operation on the image set to be compared to obtain an image square set;
carrying out image classification on the image square set, and carrying out type identification on the image square set subjected to image classification according to an optical character recognition technology to obtain a multi-type image set;
and extracting a standard information image set corresponding to the image set to be compared from the database, and comparing the multi-type image set with the standard information image set to obtain an information comparison result of the image set to be compared.
Optionally, the performing a tilt correction operation and an image square cutting operation on the image set to be compared to obtain an image square set includes:
constructing a plane coordinate system, projecting the images in the image set to be compared according to the plane coordinate system, and dividing the images in the image set to be compared according to the scales of the plane coordinate system to obtain a plurality of matrix blocks;
sequentially calculating barycentric coordinates of the plurality of matrix blocks;
adjusting the inclination angles of the plurality of operation matrix blocks according to a pre-constructed linear equation and the barycentric coordinate to finish the inclination correction operation;
mapping the image set to be compared after the inclination correction operation is completed in the plane coordinate system;
according to the preset number of squares, dividing the squares in the horizontal direction and the vertical direction of the image set to be compared to obtain a plurality of image squares;
and judging whether characters exist in the image square blocks according to an optical detection technology, and reserving the image square blocks with the characters to obtain the image square block set.
Optionally, the linear equation is:
Y=a+bX
Y=c+dX
wherein, b is tg δ,
Figure BDA0002367851010000021
a and c are arbitrary constants, δ is an inclination angle corresponding to the barycentric coordinate, and (X, Y) represent coordinates in the planar coordinate system.
Optionally, the image classifying the image square block set includes:
performing character cutting on the data of the image square set to obtain a multi-character image set;
extracting character features in the multi-character image set;
and carrying out template matching on the character features and a pre-constructed feature template library to finish the image classification.
Optionally, the extracting, from the database, a standard information image set corresponding to the image set to be compared, and comparing the multi-type image set with the standard information image set includes:
the pre-constructed projection coordinate system is used for segmenting the multi-type image set according to lines to obtain a multi-line image set;
identifying a first character at the beginning of each multi-line image set using the optical character recognition technique;
if the first character is a numeric character, the first character is reserved, if the first character is not a numeric character, the first character is removed until the recognition is completed, and all the numeric characters are collected to obtain a question mark set;
extracting a standard information image set which is the same as the question number set from an answer storage area of the database according to the question number set;
and comparing the standard information image set with the multi-type images according to the optical character recognition technology.
In addition, in order to achieve the above object, the present invention further provides an information comparing device based on image processing, the device including a memory and a processor, the memory storing therein an information comparing program based on image processing executable on the processor, the information comparing program based on image processing, when executed by the processor, implementing the steps of:
receiving an image set to be compared, and performing inclination correction operation and image square cutting operation on the image set to be compared to obtain an image square set;
carrying out image classification on the image square set, and carrying out type identification on the image square set subjected to image classification according to an optical character recognition technology to obtain a multi-type image set;
and extracting a standard information image set corresponding to the image set to be compared from the database, and comparing the multi-type image set with the standard information image set to obtain an information comparison result of the image set to be compared.
Optionally, the performing a tilt correction operation and an image square cutting operation on the image set to be compared to obtain an image square set includes:
constructing a plane coordinate system, projecting the images in the image set to be compared according to the plane coordinate system, and dividing the images in the image set to be compared according to the scales of the plane coordinate system to obtain a plurality of matrix blocks;
sequentially calculating barycentric coordinates of the plurality of matrix blocks;
adjusting the inclination angles of the plurality of operation matrix blocks according to a pre-constructed linear equation and the barycentric coordinate to finish the inclination correction operation;
mapping the image set to be compared after the inclination correction operation is completed in the plane coordinate system;
according to the preset number of squares, dividing the squares in the horizontal direction and the vertical direction of the image set to be compared to obtain a plurality of image squares;
and judging whether characters exist in the image square blocks according to an optical detection technology, and reserving the image square blocks with the characters to obtain the image square block set.
Optionally, the linear equation is:
Y=a+bX
Y=c+dX
wherein, b is tg δ,
Figure BDA0002367851010000031
a and c are arbitrary constants, δ is an inclination angle corresponding to the barycentric coordinate, and (X, Y) represent coordinates in the planar coordinate system.
Optionally, the image classifying the image square block set includes:
performing character cutting on the data of the image square set to obtain a multi-character image set;
extracting character features in the multi-character image set;
and carrying out template matching on the character features and a pre-constructed feature template library to finish the image classification.
In addition, to achieve the above object, the present invention also provides a computer readable storage medium, on which an information comparison program based on image processing is stored, the information comparison program based on image processing being executable by one or more processors to implement the steps of the information comparison method based on image processing as described above.
According to the invention, the image set is divided into a plurality of small squares through the inclination correction operation and the image square cutting operation, so that the recognition accuracy of subsequent template matching and optical character recognition is improved on the premise of reducing the subsequent calculation pressure, and meanwhile, the intellectualization degree of image information acquisition is further improved through template matching and optical character recognition and comparison operation. Therefore, the information comparison method and device based on image processing and the computer readable storage medium provided by the invention can achieve the purpose of image information acquisition.
Drawings
Fig. 1 is a schematic flowchart of an information comparison method based on image processing according to an embodiment of the present invention;
fig. 2 is a schematic diagram of an internal structure of an information comparison apparatus based on image processing according to an embodiment of the present invention;
fig. 3 is a block diagram illustrating an information comparison program based on image processing in an information comparison device based on image processing according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides an information comparison method based on image processing. Fig. 1 is a schematic flow chart of an information comparison method based on image processing according to an embodiment of the present invention. The method may be performed by an apparatus, which may be implemented by software and/or hardware.
In this embodiment, the information comparison method based on image processing includes:
s1, receiving an image set to be compared, and performing inclination correction operation and image square cutting operation on the image set to be compared to obtain an image square set.
Currently, a relatively large field related to image information acquisition is intelligent job correction, so the correction request includes the number and date of the job, such as a correction request of 2019, 9 and 20 for the user, and a correction request of a third job.
Further, the serial number and date of the job are in one-to-one correspondence with the jobs stored in the pre-constructed database, for example, in a certain high, middle and high three simulation test, the three (1) to three (9) high classes are divided into 1-9 job serial numbers according to the class serial numbers, and if the user wants to modify the jobs of the three (6) high classes, the user only needs to input the job serial numbers and the job dates of the three (6) high classes.
Preferably, the image sets to be compared are in the form of image scanning versions, such as three (6) shifts high full-scale simulation test text test paper, which are all uniformly collected and placed in the pre-constructed database.
Since the image set to be compared is generally obtained by image scanning, and image scanning may cause a certain tilt of the obtained image, the tilt correction operation and the image block cutting operation are performed on the image set to be compared first.
In detail, the performing a tilt correction operation and an image square cutting operation on the image set to be compared to obtain an image square set includes: and constructing a plane coordinate system, projecting the images in the image set to be compared according to the plane coordinate system, dividing the images in the image set to be compared according to the scales of the plane coordinate system to obtain a plurality of matrix blocks, sequentially calculating barycentric coordinates of the matrix blocks, and adjusting the inclination angles of the operation matrix blocks according to a pre-constructed linear equation and the barycentric coordinates to finish the inclination correction operation.
Further, the equation of the straight line is:
Y=a+bX
Y=c+dX
wherein, b is tg δ,
Figure BDA0002367851010000051
a, c are arbitrary constants, δ is an inclination angle from the barycentric coordinate, and (X, Y) represent coordinates in the plane coordinate system, and the barycentric coordinate is (P)i,Pi). The barycentric coordinate X is equal to PiThe value of Y is obtained by being substituted into the above linear equation and is then compared with PiAnd adjusting the inclination angle delta to finish the inclination correction operation.
Since the image of the whole block is too large, which has a great influence on the identification and calculation pressure of the subsequent model, it is necessary to perform an image block cutting operation on the image set to be compared. The image square cutting operation comprises: mapping the image set to be compared, which is subjected to the inclination correction operation, in the plane coordinate system, dividing blocks in the horizontal direction and the vertical direction of the image set to be compared according to the number of preset blocks to obtain a plurality of image blocks, judging whether characters exist in the image blocks according to an optical detection technology, and reserving the image blocks with the characters to obtain the image block set.
The optical detection technology can judge whether characters exist in each square block or not based on an optical character recognition principle or a refractive index change principle, if some square blocks do not have characters, the square blocks are blank area square blocks, the correction effect on subsequent intelligent operation is not great, and the correction effect can be directly removed. The principle of refractive index change is to emit light rays with the same incident angle in each picture block, and determine whether the deviation of the refraction angle is greater than a threshold value, thereby determining whether characters exist in the block.
Specifically, the image square block set is represented by the following method:
DDL(I,n,B1((X1,Y1),(L1,W1),Attri),B2((X2,Y2),(L2,W2),Attri,…,Bn((Xn,Yn),(Ln,Wn),Attri))
wherein I is the serial number of each square in the image square set, n is the total number of the image square set, and XiPosition information in a horizontal direction for each square in the image square set; y isiFor each block in the set of image blocks, LiIs the length of the square; wiIs the width of the square; the Attri represents the attribute of the square, when the Attri is 0, it represents that there is a character in the square, and when the Attri is 1, it represents that there is no character in the square.
And S2, carrying out image classification on the image square set, and carrying out type recognition on the image square set after image classification according to an optical character recognition technology to obtain a multi-type image set.
Preferably, the set of image tiles can be subject to disciplinary classification based on a disciplinary recognition model of optical character recognition technology (OCR technology). If the image square set contains different disciplines (such as Chinese, mathematics, English and the like), the discipline recognition model is used for discipline classification, and the image square set can be divided into a Chinese discipline operation set, a mathematical discipline operation set, an English discipline operation set and other discipline operation sets.
In detail, the S2 includes: and performing character cutting on the data of the image square set to obtain a multi-character image set, extracting character features in the multi-character image set, and performing template matching on the character features and a pre-constructed feature template library to obtain a subject operation set.
Further, the character cutting is to divide the character images in the image square set by line units to obtain a plurality of groups of multi-character image sets by line units. The extraction method of the character features and the character cutting can be completed based on the optical character recognition technology (OCR technology). The template matching may be based on a K-nearest neighbor algorithm.
For example, in homework correction, the question types may include choice questions, blank filling questions, judgment questions, calculation questions, etc., but the answer forms corresponding to different question types are different, for example, the choice questions are A, B, C, D written answers, and the judgment questions are right or wrong, so it is necessary to identify the type.
Preferably, the set of image tiles is also type-recognized based on a type recognition model of optical character recognition technology (OCR technology). The whole topic type identification process is the same as the above S3, and finally, topic type job image sets based on different disciplines are obtained, such as a choice topic job image set and a reading understanding job image set under a Chinese subject job set, a choice topic job image set, a calculation topic job image set and a choice topic job image set and a judgment topic job image set under a mathematic subject job set.
S3, extracting a standard information image set corresponding to the image set to be compared from the database, and comparing the multi-type image set with the standard information image set to obtain an information comparison result of the image set to be compared.
In detail, the extracting of the standard information image set corresponding to the multi-type image set from the answer storage area of the database includes: and identifying the question numbers of the multi-type image sets according to an image identification technology to obtain a question number set, and extracting the standard information image set which is the same as the question number set from a pre-constructed database according to the question number set.
In detail, the identifying the question numbers of the multi-type image set according to the image identification technology to obtain a question number set comprises: and a pre-constructed projection coordinate system is used for segmenting the multi-type image set according to lines to obtain a multi-line image set, the optical character recognition technology is used for recognizing the first character at the beginning in each multi-line image set, if the first character is a digital character, the first character is reserved, if the first character is not a digital character, the first character is removed until the recognition is completed, and all digital characters are collected to obtain a question mark set.
In a preferred embodiment of the present invention, if the characters of the standard information image set having the question-selecting job image set with the question number 4 corresponding to the question 4 under the language subject job set are matched, if the question-selecting job image set with the question 4 is selected as C, the standard information image set with the question 4 is also selected as C, the matching is successful, and if the question-selecting job image set with the question 4 is selected as B, the standard information image set with the question 4 is selected as C, the matching is unsuccessful.
The inventive method described above may preferably be based on a GPU, which is an image processor, a microprocessor dedicated to image operations on personal computers, workstations and some mobile devices. There are many types of GPUs, such as: tetam, RTX, and the like. The speed of the student homework correction can be accelerated through the GPU.
The invention also provides an information comparison device based on image processing. Fig. 2 is a schematic diagram illustrating an internal structure of an information comparison apparatus based on image processing according to an embodiment of the present invention.
In this embodiment, the information comparing apparatus 1 based on image processing may be a PC (personal computer), or a terminal device such as a smart phone, a tablet computer, and a mobile computer, or may be a server. The information comparison device 1 based on image processing at least comprises a memory 11, a processor 12, a communication bus 13 and a network interface 14.
The memory 11 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 11 may be an internal storage unit of the image processing based information comparing apparatus 1 in some embodiments, for example, a hard disk of the image processing based information comparing apparatus 1. The memory 11 may also be an external storage device of the image processing-based information comparing apparatus 1 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a flash Card (FlashCard), and the like provided on the image processing-based information comparing apparatus 1. Further, the memory 11 may also include both an internal storage unit of the information comparing apparatus 1 based on image processing and an external storage device. The memory 11 may be used not only to store application software installed in the image processing-based information collating apparatus 1 and various types of data, such as a code of the image processing-based information collating program 01, but also to temporarily store data that has been output or is to be output.
Processor 12, which in some embodiments may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor or other data Processing chip, is configured to execute program codes stored in memory 11 or process data, such as executing image-Processing-based information comparison program 01.
The communication bus 13 is used to realize connection communication between these components.
The network interface 14 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), typically used to establish a communication link between the apparatus 1 and other electronic devices.
Optionally, the apparatus 1 may further comprise a user interface, which may comprise a Display (Display), an input unit such as a Keyboard (Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or a display unit, is suitable for displaying information processed in the image processing-based information comparison apparatus 1 and for displaying a visualized user interface.
Fig. 2 shows only the image processing-based information comparing apparatus 1 having the components 11 to 14 and the image processing-based information comparing program 01, and it will be understood by those skilled in the art that the structure shown in fig. 1 does not constitute a limitation of the image processing-based information comparing apparatus 1, and may include fewer or more components than those shown, or combine some components, or different arrangement of components.
In the embodiment of the apparatus 1 shown in fig. 2, the memory 11 stores an information comparison program 01 based on image processing; the processor 12 implements the following steps when executing the image processing-based information matching program 01 stored in the memory 11:
the method comprises the steps of firstly, receiving an image set to be compared, and carrying out inclination correction operation and image square cutting operation on the image set to be compared to obtain an image square set.
Currently, a relatively large field related to image information acquisition is intelligent job correction, so the correction request includes the number and date of the job, such as a correction request of 2019, 9 and 20 for the user, and a correction request of a third job.
Further, the serial number and date of the job are in one-to-one correspondence with the jobs stored in the pre-constructed database, for example, in a certain high, middle and high three simulation test, the three (1) to three (9) high classes are divided into 1-9 job serial numbers according to the class serial numbers, and if the user wants to modify the jobs of the three (6) high classes, the user only needs to input the job serial numbers and the job dates of the three (6) high classes.
Preferably, the image sets to be compared are in the form of image scanning versions, such as three (6) shifts high full-scale simulation test text test paper, which are all uniformly collected and placed in the pre-constructed database.
Since the image set to be compared is generally obtained by image scanning, and image scanning may cause a certain tilt of the obtained image, the tilt correction operation and the image block cutting operation are performed on the image set to be compared first.
In detail, the performing a tilt correction operation and an image square cutting operation on the image set to be compared to obtain an image square set includes: and constructing a plane coordinate system, projecting the images in the image set to be compared according to the plane coordinate system, dividing the images in the image set to be compared according to the scales of the plane coordinate system to obtain a plurality of matrix blocks, sequentially calculating barycentric coordinates of the matrix blocks, and adjusting the inclination angles of the operation matrix blocks according to a pre-constructed linear equation and the barycentric coordinates to finish the inclination correction operation.
Further, the equation of the straight line is:
Y=a+bX
Y=c+dX
wherein, b is tg δ,
Figure BDA0002367851010000101
a, c are arbitrary constants, δ is an inclination angle from the barycentric coordinate, and (X, Y) represent coordinates in the plane coordinate system, and the barycentric coordinate is (P)i,Pi). The barycentric coordinate X is equal to PiThe value of Y is obtained by being substituted into the above linear equation and is then compared with PiAnd adjusting the inclination angle delta to finish the inclination correction operation.
Since the image of the whole block is too large, which has a great influence on the identification and calculation pressure of the subsequent model, it is necessary to perform an image block cutting operation on the image set to be compared. The image square cutting operation comprises: mapping the image set to be compared, which is subjected to the inclination correction operation, in the plane coordinate system, dividing blocks in the horizontal direction and the vertical direction of the image set to be compared according to the number of preset blocks to obtain a plurality of image blocks, judging whether characters exist in the image blocks according to an optical detection technology, and reserving the image blocks with the characters to obtain the image block set.
The optical detection technology can judge whether characters exist in each square block or not based on an optical character recognition principle or a refractive index change principle, if some square blocks do not have characters, the square blocks are blank area square blocks, the correction effect on subsequent intelligent operation is not great, and the correction effect can be directly removed. The principle of refractive index change is to emit light rays with the same incident angle in each picture block, and determine whether the deviation of the refraction angle is greater than a threshold value, thereby determining whether characters exist in the block.
Specifically, the image square block set is represented by the following method:
DDL(I,n,B1((X1,Y1),(L1,W1),Attri),B2((X2,Y2),(L2,W2),Attri,…,Bn((Xn,Yn),(Ln,Wn),Attri))
wherein I is the serial number of each square in the image square set, n is the total number of the image square set, and XiPosition information in a horizontal direction for each square in the image square set; y isiFor each block in the set of image blocks, LiIs the length of the square; wiIs the width of the square; the Attri represents the attribute of the square, when the Attri is 0, it represents that there is a character in the square, and when the Attri is 1, it represents that there is no character in the square.
And secondly, carrying out image classification on the image block set, and carrying out type recognition on the image block set subjected to image classification according to an optical character recognition technology to obtain a multi-type image set.
Preferably, the set of image tiles can be subject to disciplinary classification based on a disciplinary recognition model of optical character recognition technology (OCR technology). If the image square set contains different disciplines (such as Chinese, mathematics, English and the like), the discipline recognition model is used for discipline classification, and the image square set can be divided into a Chinese discipline operation set, a mathematical discipline operation set, an English discipline operation set and other discipline operation sets.
In detail, the second step includes: and performing character cutting on the data of the image square set to obtain a multi-character image set, extracting character features in the multi-character image set, and performing template matching on the character features and a pre-constructed feature template library to obtain a subject operation set.
Further, the character cutting is to divide the character images in the image square set by line units to obtain a plurality of groups of multi-character image sets by line units. The extraction method of the character features and the character cutting can be completed based on the optical character recognition technology (OCR technology). The template matching may be based on a K-nearest neighbor algorithm.
For example, in homework correction, the question types may include choice questions, blank filling questions, judgment questions, calculation questions, etc., but the answer forms corresponding to different question types are different, for example, the choice questions are A, B, C, D written answers, and the judgment questions are right or wrong, so it is necessary to identify the type.
Preferably, the set of image tiles is also type-recognized based on a type recognition model of optical character recognition technology (OCR technology). The whole topic type identification process is the same as the above S3, and finally, topic type job image sets based on different disciplines are obtained, such as a choice topic job image set and a reading understanding job image set under a Chinese subject job set, a choice topic job image set, a calculation topic job image set and a choice topic job image set and a judgment topic job image set under a mathematic subject job set.
And step three, extracting a standard information image set corresponding to the image set to be compared from the database, and comparing the multi-type image set with the standard information image set to obtain an information comparison result of the image set to be compared.
In detail, the extracting of the standard information image set corresponding to the multi-type image set from the answer storage area of the database includes: and identifying the question numbers of the multi-type image sets according to an image identification technology to obtain a question number set, and extracting the standard information image set which is the same as the question number set from a pre-constructed database according to the question number set.
In detail, the identifying the question numbers of the multi-type image set according to the image identification technology to obtain a question number set comprises: and a pre-constructed projection coordinate system is used for segmenting the multi-type image set according to lines to obtain a multi-line image set, the optical character recognition technology is used for recognizing the first character at the beginning in each multi-line image set, if the first character is a digital character, the first character is reserved, if the first character is not a digital character, the first character is removed until the recognition is completed, and all digital characters are collected to obtain a question mark set.
In a preferred embodiment of the present invention, if the characters of the standard information image set having the question-selecting job image set with the question number 4 corresponding to the question 4 under the language subject job set are matched, if the question-selecting job image set with the question 4 is selected as C, the standard information image set with the question 4 is also selected as C, the matching is successful, and if the question-selecting job image set with the question 4 is selected as B, the standard information image set with the question 4 is selected as C, the matching is unsuccessful.
The inventive method described above may preferably be based on a GPU, which is an image processor, a microprocessor dedicated to image operations on personal computers, workstations and some mobile devices. There are many types of GPUs, such as: tetam, RTX, and the like. The speed of the student homework correction can be accelerated through the GPU.
Alternatively, in other embodiments, the information comparison program based on image processing may be further divided into one or more modules, and the one or more modules are stored in the memory 11 and executed by one or more processors (in this embodiment, the processor 12) to implement the present invention.
For example, referring to fig. 3, a schematic diagram of program modules of an image processing-based information comparison program in an embodiment of the image processing-based information comparison apparatus according to the present invention is shown, in this embodiment, the image processing-based information comparison program may be divided into a data receiving and block dividing module 10, a classification module 20, a type identification module 30, and an information result output module 40, which exemplarily:
the data receiving and sorting module 10 is configured to: receiving an image set to be compared, and performing inclination correction operation and image square cutting operation on the image set to be compared to obtain an image square set.
The classification module 20 is configured to: and carrying out image classification on the image square block set to obtain a classified image square block set.
The type identification module 30 is configured to: and according to an optical character recognition technology, carrying out type recognition on the image block set after the image classification to obtain a multi-type image set.
The job correction result output module 40 is configured to: and extracting a standard information image set corresponding to the image set to be compared from the database, and comparing the multi-type image set with the standard information image set to obtain an information comparison result of the image set to be compared.
The functions or operation steps implemented by the program modules such as the data receiving and block cutting module 10, the classification module 20, the type identification module 30, and the information result output module 40 are substantially the same as those of the above embodiments, and are not described herein again.
Furthermore, an embodiment of the present invention further provides a computer-readable storage medium, where an information comparison program based on image processing is stored, and the information comparison program based on image processing is executable by one or more processors to implement the following operations:
receiving an image set to be compared, and performing inclination correction operation and image square cutting operation on the image set to be compared to obtain an image square set.
And carrying out image classification on the image square block set to obtain a classified image square block set.
And according to an optical character recognition technology, carrying out type recognition on the image block set after the image classification to obtain a multi-type image set.
And extracting a standard information image set corresponding to the image set to be compared from the database, and comparing the multi-type image set with the standard information image set to obtain an information comparison result of the image set to be compared.
It should be noted that the above-mentioned numbers of the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments. And the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. An information comparison method based on image processing is characterized in that the method comprises the following steps:
receiving an image set to be compared, and performing inclination correction operation and image square cutting operation on the image set to be compared to obtain an image square set;
carrying out image classification on the image square set, and carrying out type identification on the image square set subjected to image classification according to an optical character recognition technology to obtain a multi-type image set;
and extracting a standard information image set corresponding to the image set to be compared from the database, and comparing the multi-type image set with the standard information image set to obtain an information comparison result of the image set to be compared.
2. The method as claimed in claim 1, wherein the performing the tilt correction operation and the image block cutting operation on the image set to be compared to obtain an image block set comprises:
constructing a plane coordinate system, projecting the images in the image set to be compared according to the plane coordinate system, and dividing the images in the image set to be compared according to the scales of the plane coordinate system to obtain a plurality of matrix blocks;
sequentially calculating barycentric coordinates of the plurality of matrix blocks;
adjusting the inclination angles of the plurality of operation matrix blocks according to a pre-constructed linear equation and the barycentric coordinate to finish the inclination correction operation;
mapping the image set to be compared after the inclination correction operation is completed in the plane coordinate system;
according to the preset number of squares, dividing the squares in the horizontal direction and the vertical direction of the image set to be compared to obtain a plurality of image squares;
and judging whether characters exist in the image square blocks according to an optical detection technology, and reserving the image square blocks with the characters to obtain the image square block set.
3. The image processing-based information comparison method according to claim 2, wherein the linear equation is:
Y=a+bX
Y=c+dX
wherein, b is tg δ,
Figure FDA0002367849000000011
a and c are arbitrary constants, δ is an inclination angle corresponding to the barycentric coordinate, and (X, Y) represent coordinates in the planar coordinate system.
4. The method for comparing information based on image processing as claimed in claim 1, wherein said classifying the image block set comprises:
performing character cutting on the data of the image square set to obtain a multi-character image set;
extracting character features in the multi-character image set;
and carrying out template matching on the character features and a pre-constructed feature template library to finish the image classification.
5. The method according to any one of claims 1 to 4, wherein the extracting a standard information image set corresponding to the image set to be compared from the database, comparing the multi-type image set and the standard information image set, comprises:
the pre-constructed projection coordinate system is used for segmenting the multi-type image set according to lines to obtain a multi-line image set;
identifying a first character at the beginning of each multi-line image set using the optical character recognition technique;
if the first character is a numeric character, the first character is reserved, if the first character is not a numeric character, the first character is removed until the recognition is completed, and all the numeric characters are collected to obtain a question mark set;
extracting a standard information image set which is the same as the question number set from an answer storage area of the database according to the question number set;
and comparing the standard information image set with the multi-type images according to the optical character recognition technology.
6. An information comparison device based on image processing, comprising a memory and a processor, wherein the memory stores an information comparison program based on image processing, which can run on the processor, and when the information comparison program based on image processing is executed by the processor, the following steps are implemented:
receiving an image set to be compared, and performing inclination correction operation and image square cutting operation on the image set to be compared to obtain an image square set;
carrying out image classification on the image square set, and carrying out type identification on the image square set subjected to image classification according to an optical character recognition technology to obtain a multi-type image set;
and extracting a standard information image set corresponding to the image set to be compared from the database, and comparing the multi-type image set with the standard information image set to obtain an information comparison result of the image set to be compared.
7. The image-processing-based information matching device of claim 6, wherein the performing the tilt correction operation and the image block cutting operation on the image set to be matched to obtain an image block set comprises:
constructing a plane coordinate system, projecting the images in the image set to be compared according to the plane coordinate system, and dividing the images in the image set to be compared according to the scales of the plane coordinate system to obtain a plurality of matrix blocks;
sequentially calculating barycentric coordinates of the plurality of matrix blocks;
adjusting the inclination angles of the plurality of operation matrix blocks according to a pre-constructed linear equation and the barycentric coordinate to finish the inclination correction operation;
mapping the image set to be compared after the inclination correction operation is completed in the plane coordinate system;
according to the preset number of squares, dividing the squares in the horizontal direction and the vertical direction of the image set to be compared to obtain a plurality of image squares;
and judging whether characters exist in the image square blocks according to an optical detection technology, and reserving the image square blocks with the characters to obtain the image square block set.
8. The image-processing-based information comparing device according to claim 7, wherein the linear equation is:
Y=a+bX
Y=c+dX
wherein, b is tg δ,
Figure FDA0002367849000000031
a and c are arbitrary constants, δ is an inclination angle corresponding to the barycentric coordinate, and (X, Y) represent coordinates in the planar coordinate system.
9. The apparatus according to claim 6, wherein the image classification of the image square set comprises:
performing character cutting on the data of the image square set to obtain a multi-character image set;
extracting character features in the multi-character image set;
and carrying out template matching on the character features and a pre-constructed feature template library to finish the image classification.
10. A computer-readable storage medium, wherein an image processing-based information comparison program is stored on the computer-readable storage medium, and the image processing-based information comparison program can be executed by one or more processors to implement the steps of the image processing-based information comparison method according to any one of claims 1 to 5.
CN202010041070.7A 2020-01-15 2020-01-15 Image-based information comparison method, device and computer-readable storage medium Active CN111259888B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010041070.7A CN111259888B (en) 2020-01-15 2020-01-15 Image-based information comparison method, device and computer-readable storage medium
PCT/CN2020/099066 WO2021143058A1 (en) 2020-01-15 2020-06-30 Image-based information comparison method, apparatus, electronic device, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010041070.7A CN111259888B (en) 2020-01-15 2020-01-15 Image-based information comparison method, device and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN111259888A true CN111259888A (en) 2020-06-09
CN111259888B CN111259888B (en) 2024-07-05

Family

ID=70954047

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010041070.7A Active CN111259888B (en) 2020-01-15 2020-01-15 Image-based information comparison method, device and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN111259888B (en)
WO (1) WO2021143058A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021143058A1 (en) * 2020-01-15 2021-07-22 平安国际智慧城市科技股份有限公司 Image-based information comparison method, apparatus, electronic device, and computer-readable storage medium
CN113920526A (en) * 2021-09-30 2022-01-11 广东新裕信息科技有限公司 Test paper image processing method, electronic device and storage medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113702398B (en) * 2021-08-25 2024-02-20 北京美立刻医疗器械有限公司 Automatic quality inspection method and device for bracket-free appliance based on visual identification technology
CN118260846B (en) * 2024-05-29 2024-08-06 江西方堂设计工程有限公司 Digital decoration design method and system based on artificial intelligence

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101378444A (en) * 2007-08-30 2009-03-04 精工爱普生株式会社 Image processing device, image processing method, and image processing program
CN103177235A (en) * 2013-04-18 2013-06-26 河海大学常州校区 Chinese-sensible code recognition device and Chinese-sensible code recognition method under complicated background
CN105761219A (en) * 2016-02-03 2016-07-13 北京云江科技有限公司 Inclination correction method and system of text image
CN106372613A (en) * 2016-09-13 2017-02-01 广州视睿电子科技有限公司 Statistical method and device for paper test paper
CN108171297A (en) * 2018-01-24 2018-06-15 谢德刚 A kind of answer card identification method and device
CN109685059A (en) * 2018-11-06 2019-04-26 平安科技(深圳)有限公司 Character image mask method, device and computer readable storage medium
CN110110581A (en) * 2019-03-14 2019-08-09 杭州笔声智能科技有限公司 A kind of paper based on artificial intelligence corrects method and system
CN110288755A (en) * 2019-05-21 2019-09-27 平安银行股份有限公司 The invoice method of inspection, server and storage medium based on text identification
CN110443269A (en) * 2019-06-17 2019-11-12 平安信托有限责任公司 A kind of document comparison method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017013719A1 (en) * 2015-07-17 2017-01-26 楽天株式会社 Character recognition device, character recognition method, and character recognition program
CN107798321B (en) * 2017-12-04 2021-03-02 海南云江科技有限公司 Test paper analysis method and computing device
CN110348400B (en) * 2019-07-15 2022-04-19 京东方科技集团股份有限公司 Score obtaining method and device and electronic equipment
CN110647885B (en) * 2019-09-17 2022-10-28 广州光大教育软件科技股份有限公司 Test paper splitting method, device, equipment and medium based on picture identification
CN111259888B (en) * 2020-01-15 2024-07-05 平安国际智慧城市科技股份有限公司 Image-based information comparison method, device and computer-readable storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101378444A (en) * 2007-08-30 2009-03-04 精工爱普生株式会社 Image processing device, image processing method, and image processing program
CN103177235A (en) * 2013-04-18 2013-06-26 河海大学常州校区 Chinese-sensible code recognition device and Chinese-sensible code recognition method under complicated background
CN105761219A (en) * 2016-02-03 2016-07-13 北京云江科技有限公司 Inclination correction method and system of text image
CN106372613A (en) * 2016-09-13 2017-02-01 广州视睿电子科技有限公司 Statistical method and device for paper test paper
CN108171297A (en) * 2018-01-24 2018-06-15 谢德刚 A kind of answer card identification method and device
CN109685059A (en) * 2018-11-06 2019-04-26 平安科技(深圳)有限公司 Character image mask method, device and computer readable storage medium
CN110110581A (en) * 2019-03-14 2019-08-09 杭州笔声智能科技有限公司 A kind of paper based on artificial intelligence corrects method and system
CN110288755A (en) * 2019-05-21 2019-09-27 平安银行股份有限公司 The invoice method of inspection, server and storage medium based on text identification
CN110443269A (en) * 2019-06-17 2019-11-12 平安信托有限责任公司 A kind of document comparison method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021143058A1 (en) * 2020-01-15 2021-07-22 平安国际智慧城市科技股份有限公司 Image-based information comparison method, apparatus, electronic device, and computer-readable storage medium
CN113920526A (en) * 2021-09-30 2022-01-11 广东新裕信息科技有限公司 Test paper image processing method, electronic device and storage medium

Also Published As

Publication number Publication date
WO2021143058A1 (en) 2021-07-22
CN111259888B (en) 2024-07-05

Similar Documents

Publication Publication Date Title
CN107766809B (en) Electronic device, bill information identification method, and computer-readable storage medium
CN111259888B (en) Image-based information comparison method, device and computer-readable storage medium
WO2019104879A1 (en) Information recognition method for form-type image, electronic device and readable storage medium
CN110866495A (en) Bill image recognition method, bill image recognition device, bill image recognition equipment, training method and storage medium
CN111695439A (en) Image structured data extraction method, electronic device and storage medium
CN111507330B (en) Problem recognition method and device, electronic equipment and storage medium
CN113486828B (en) Image processing method, device, equipment and storage medium
CN112699775A (en) Certificate identification method, device and equipment based on deep learning and storage medium
CN109685059B (en) Text image labeling method, text image labeling device and computer readable storage medium
CN112926421B (en) Image processing method and device, electronic equipment and storage medium
CN111611988A (en) Picture verification code identification method and device, electronic equipment and computer readable medium
CN112580503A (en) Operation correction method, device, equipment and storage medium
CN114005126A (en) Table reconstruction method and device, computer equipment and readable storage medium
CN116758786A (en) Handwriting evaluation method and device, computer equipment and medium
CN112132016A (en) Bill information extraction method and device and electronic equipment
CN114937270A (en) Ancient book word processing method, ancient book word processing device and computer readable storage medium
CN112801099A (en) Image processing method, device, terminal equipment and medium
US20120281919A1 (en) Method and system for text segmentation
CN110263310B (en) Data graph generation method and device and computer readable storage medium
CN112396057B (en) Character recognition method and device and electronic equipment
CN111783780B (en) Image processing method, device and computer readable storage medium
CN114241486A (en) Method for improving accuracy rate of identifying student information of test paper
TWM618756U (en) Image recognition system
CN118506393B (en) Method and system for realizing intelligent recognition of engineering drawing based on OCR technology
CN113128486B (en) Construction method and device of handwritten mathematical formula sample library and terminal 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