A subject identification mapping method, system, storage medium and device

By calculating character similarity and solving sparse matrices, the problem of low question recognition accuracy caused by photo deformation is solved, and accurate positioning and OCR recognition of questions in teaching supplementary books or test papers are achieved.

CN115457584BActive Publication Date: 2025-10-24JIANGXI RUANYUN TECH CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211014234.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-23
Publication Date
2025-10-24
Estimated Expiration
2042-08-23

AI Technical Summary

Technical Problem

In the existing technology, factors such as the distortion of the shooting angle and distance, surface deformation, tilt, and interference from students' handwriting lead to a decrease in the accuracy of question recognition.

Method used

By obtaining the initial image and the mapped image, calculating the character similarity, establishing a multi-dimensional sparse matrix, solving the position matching set, and determining the rectangular position information of the question in the initial image.

Benefits of technology

The accuracy of question recognition is improved, and the rectangular position and content position of the question in teaching supplementary books or test papers can be accurately located, enhancing the effect of OCR text recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115457584B_ABST
    Figure CN115457584B_ABST
Patent Text Reader

Abstract

The application provides a title recognition mapping method, system, storage medium and equipment, which comprises the following steps: obtaining an initial image recording text content information and title rectangular position information, and a mapping image; performing character similarity calculation on each text line in the mapping image and all text lines in the initial image; obtaining a multi-dimensional sparse matrix, solving the sparse matrix to obtain a position matching set of each text line in the mapping image and all text lines in the initial image; converting the title information in the position matching set to obtain a content corresponding set of several titles in the initial image and several text lines in the mapping image; and calculating the rectangular position information corresponding to the several titles in the initial image in the mapping image according to the content corresponding set of the several titles in the initial image and the several text lines in the mapping image. The application can determine the title position in the picture through text content matching.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, in particular to a question recognition mapping method, system, storage medium and equipment. BACKGROUND

[0002] In the education stage, there is a need to collect the homework of the teaching aids by taking pictures, and then recognize the student's answer results through automatic correction technology or recognize the teacher's correction traces.

[0003] However, in the prior art, when the angle and distance deformation, curved surface deformation, inclination, and student handwriting interference of the photographing occur, the recognition accuracy is easily reduced, and therefore the question recognition efficiency in the prior art needs to be improved. SUMMARY

[0004] Therefore, the present application aims to provide a question recognition mapping method, system, storage medium and equipment, which can solve the technical problem of the prior art that the recognition accuracy is easily reduced when the angle and distance deformation, curved surface deformation, inclination, and student handwriting interference of the photographing occur.

[0005] The first aspect of the present application provides a question recognition mapping method, which comprises:

[0006] obtaining an initial image recording text content information and question rectangular position information, and a mapping image;

[0007] performing character similarity calculation on each text line in the mapping image and all text lines in the initial image;

[0008] based on the calculation result of the character similarity calculation, obtaining a multi-dimensional sparse matrix, and solving the sparse matrix to obtain a position matching set of each text line in the mapping image and all text lines in the initial image;

[0009] according to the question information in the position matching set, converting to obtain a content corresponding set of a plurality of questions in the initial image and a plurality of text lines in the mapping image;

[0010] according to the content corresponding set of a plurality of questions in the initial image and a plurality of text lines in the mapping image, calculating the rectangular position information corresponding to the plurality of questions in the initial image in the mapping image.

[0011] According to one aspect of the above technical solution, in the step of obtaining an initial image recording text content information and question rectangular position information, and performing recognition on the initial image to obtain a mapping image:

[0012] the initial image is O, and the length and width are recorded as , the initial image has M questions , each question stores the text content information and question rectangular position information:

[0013] wherein the question rectangular position information: , and is the position of the upper left corner of the rectangle, is the length of the rectangle, is the height of the rectangle;

[0014] text content information: the initial image has T rows of content , row content is in the format , wherein is a string, is coordinate system information, is question association information.

[0015] According to one aspect of the above technical solution, the step of performing character similarity calculation between each text row in the mapping image and all text rows in the initial image includes:

[0016] performing character similarity calculation between each row in the K rows of text rows in the mapping image P and the T rows of content in the initial image O;

[0017] The Levenshtein distance of two strings a, b is denoted as :

[0018]

[0019] wherein represents the length of a, b, the function represents the string after removing the first character of string a, the function represents the string after removing the first character of string b, the larger the value, the less a, b match, the value is 0, and the two strings are completely equal;

[0020] Definition:

[0021]

[0022] that is, when is larger, the similarity of the two strings is higher, the two strings are completely equal, and the value is 1, if , then the two strings lack similarity.

[0023] According to one aspect of the above technical solution, based on the calculation results of the character similarity calculation, a multi-dimensional sparse matrix is ​​obtained, and the step of solving the sparse matrix to obtain a set of position matches between each text line in the mapped image and all text lines in the initial image specifically includes:

[0024] By performing character similarity test on each of the K lines of text in the mapped image P and the T lines of content in the initial image O Calculate and get -dimensional sparse matrix:

[0025]

[0026] Solve the sparse matrix to obtain a position matching set containing N elements, where K lines of text in the mapped image P correspond to T lines of content in the image O. , each match in the position matching set represents a matching combination of a line of text in the mapped image and a line of text in the initial image. The position matching set X satisfies the following conditions:

[0027] .

[0028] According to one aspect of the above technical solution, the step of converting, based on the topic information in the position matching set, to obtain a set of content correspondences between a plurality of topics in the initial image and a plurality of text lines in the mapped image specifically includes:

[0029] According to the collection middle The topic information, among which, represents a text line in the initial image 0, which is converted into a set of content correspondences between the M questions in the initial image O and the K lines of content in the mapped image P;

[0030] Among them, any question q has g elements corresponding to the set , the elements of the content correspondence set are a certain text line in the mapped image and a certain text line in the corresponding initial image.

[0031] According to one aspect of the above technical solution, the step of calculating the rectangular position information corresponding to the plurality of questions in the initial image in the mapped image based on the set of content correspondences between the plurality of questions in the initial image and the plurality of text lines in the mapped image specifically includes:

[0032] Calculate the rectangular position information corresponding to the plurality of questions in the initial image in the mapped image according to the content corresponding set of each question in the M questions in the initial image O;

[0033] For any one question q, if the corresponding set of its content is not empty, then the calculation process of the rectangular position information of the question q in the mapping image P includes:

[0034] Let the height ratio of the initial image O and the question q in the mapping image P be

[0035]

[0036] Calculate the size ratio of the initial image O and the mapping image P in the question area;

[0037] Then the calculation formula of the rectangular position of the question q in the mapping image P is:

[0038]

[0039] In the formula, y is the vertical coordinate of the upper left corner of the content information, h is the height of the content information, is the average value function;

[0040]

[0041] In the formula, is the rectangular height of the question q in the initial image O, is the height of the question q in the mapping image after calculation;

[0042]

[0043] In the formula, x is the vertical coordinate of the upper left corner of the content information, w is the height of the content information;

[0044]

[0045] In the formula, is the rectangular length of the question q in the initial image O, is the rectangular length of the question q in the mapping image;

[0046] Thus, the rectangular position information of the β questions with non-empty corresponding sets in the M questions of the initial image O in the mapping image P is obtained.

[0047] According to one aspect of the above technical solution, the method further includes:

[0048] The calculation process of the rectangular position information of the question with interference factors includes:

[0049] Let One question in the β questions is The rectangular information of the question in the initial image O is When Determine a question from the questions The question closest to the ordinate The rectangular information in the initial image O is The rectangular information in the mapping image P is Then the question The calculation process of the rectangular position information in the mapping image P is:

[0050]

[0051] In the formula, The height ratio of the question

[0052]

[0053]

[0054]

[0055] At this point, the rectangular position information of the M questions in the initial image O is completely mapped into the mapping image P.

[0056] The second aspect of the application provides a question recognition mapping system, which comprises:

[0057] An image acquisition unit is configured to acquire an initial image recording text content information and question rectangular position information, and a mapping image;

[0058] A first calculation unit is configured to perform character similarity calculation on each text line in the mapping image and all text lines in the initial image;

[0059] A second calculation unit is configured to obtain a multi-dimensional sparse matrix based on the calculation results of the character similarity calculation, and solve the sparse matrix to obtain a position matching set of each text line in the mapping image and all text lines in the initial image;

[0060] A third calculation unit is configured to convert the question information in the position matching set to obtain a content corresponding set of several questions in the initial image and several text lines in the mapping image;

[0061] A fourth calculation unit is configured to calculate the rectangular position information corresponding to the several questions in the initial image in the mapping image based on the content corresponding set of the several questions in the initial image and the several text lines in the mapping image.

[0062] ​The third aspect of the present application provides a computer readable storage medium, which stores computer instructions, and the instructions are executed by a processor to implement the steps of the method in the above technical solution.

[0063] The fourth aspect of the present application provides a computer device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the method in the above technical solution when executing the program.

[0064] Compared with the prior art, the title recognition mapping method, system, storage medium and device provided by the present application have the beneficial effects that:

[0065] The title recognition mapping method provided by the present application calculates the character similarity between the initial image and the mapping image, obtains a multi-dimensional sparse matrix according to the calculation result, solves the sparse matrix to obtain a position matching set of the initial image and the mapping image, determines a content corresponding set of the initial image and the mapping image according to the position matching set, and finally calculates the rectangular position information of the several titles in the initial image in the mapping image, so as to complete image mapping. Therefore, under the premise of marking the rectangular position of the title in the teaching aid book or the test paper, the position information of the content in the title, and the OCR character recognition in advance, the title position in the picture can be determined through line text content matching. BRIEF DESCRIPTION OF DRAWINGS

[0066] Figure 1 The figure is a flowchart of the title recognition mapping method in the first embodiment of the present application.

[0067] Figure 2 The figure is a structure block diagram of the title recognition mapping system in the third embodiment of the present application.

[0068] The following specific embodiments will further illustrate the present application in combination with the above-mentioned drawings. DETAILED DESCRIPTION

[0069] In order to facilitate the understanding of the present application, the present application will be described more fully below with reference to the related drawings. The drawings show several embodiments of the present application. However, the present application can be realized in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive.

[0070] Embodiment One

[0071] Please refer to Figure 1 The first embodiment of the present application provides a title recognition mapping method, which comprises steps S10-S50:

[0072] Step S10, obtaining an initial image recording text content information and title rectangular position information, and a mapping image.

[0073] The initial image shown in the embodiment is a task original picture marked in advance, denoted as initial image O, and the length and width are denoted as There are M titles The set is sorted from top to bottom according to the coordinate system, and each title stores text content information and title rectangular position information;

[0074] The title rectangular position information is: , and is the position of the upper left corner of the rectangle, is the length of the rectangle, is the height of the rectangle;

[0075] The text content information: there are T rows of content in the initial image The row content is in the format of , wherein is a string, is coordinate system information, is title association information.

[0076] The mapping image shown in the embodiment is obtained by shooting, denoted as mapping image P, and the length and width are denoted as There are K rows of content information , The content format is .

[0077] Step S20, performing character similarity calculation on each text row in the mapping image and all text rows in the initial image.

[0078] The character similarity calculation on each text row in the mapping image and all text rows in the initial image adopts Levenshtein distance algorithm. The Levenshtein distance of two strings a and b is denoted as :

[0079]

[0080] wherein represents the length of a and b, the function represents the string after removing the first character of string a, the function represents the string after removing the first character of string b, The larger the value, the less likely a and b strings are to match (assuming a and b strings are not empty, as our set does not store empty strings). A value of 0 means that the two strings are exactly equal.

[0081] In order to more intuitively compare the similarity of two strings, define

[0082]

[0083] Right now The larger the value, the higher the similarity between the two strings. If the two strings are completely equal, the value is 1. , then the two strings are considered to have no similarity (that is, they cannot be the same line of content).

[0084] Step S30 , obtaining a multi-dimensional sparse matrix based on the calculation result of the character similarity calculation, and solving the sparse matrix to obtain a position matching set between each text line in the mapped image and all text lines in the initial image.

[0085] By performing character similarity calculation on each line of text in the K lines of the mapped image P and the T lines of content in the initial image O Calculated and obtained a -dimensional sparse matrix:

[0086] ;

[0087] Solving this matrix, the goal is to find a set of N matching positions between K rows in the set mapping image P and T rows in the initial image O , each match in the position matching set represents a matching combination of a line of text in the mapped image and a line of text in the initial image, and the position matching set X satisfies the following conditions:

[0088]

[0089] because The matrix dimensions are generally small, and most matrix elements are 0. Only two-dimensional loops are needed to get the final solution: position matching set .

[0090] Step S40 : converting, based on the topic information in the position matching set, a content correspondence set of a plurality of topics in the initial image and a plurality of text lines in the mapped image.

[0091] Specifically, matching sets based on position middle The topic information, among which, The representative of a text line in the initial image 0, the conversion of the initial image O M-way question and the corresponding set of K-line content of the mapping image P; that is, a question q, the corresponding set of content has g elements (The set may be empty), the element of the content corresponding set is a text line in the mapping image and a text line in the initial image corresponding to it.

[0092] Step S50, according to the content corresponding set of several questions in the initial image and several text lines in the mapping image, the corresponding rectangular position information of several questions in the initial image in the mapping image is calculated.

[0093] Specifically, according to the content corresponding set of each question in the M-way question of the initial image O, the corresponding rectangular position information of several questions in the initial image in the mapping image is calculated.

[0094] For any question q, if the content corresponding set is not empty, then the rectangular position information calculation process of the question q in the mapping image P includes:

[0095] Let the height ratio of the initial image O and the question q of the mapping image P be

[0096]

[0097] The size ratio of the initial image O and the mapping image P in the question area is calculated;

[0098] Then the rectangular position calculation formula of the question q in the mapping image P is:

[0099]

[0100] In the formula, y is the left upper corner of the content information, h is the height of the content information, The average value function;

[0101]

[0102] In the formula, The rectangular height of the question q in the initial image O, The height of the question q in the mapping image after calculation;

[0103]

[0104] In the formula, x is the left upper corner of the content information, w is the height of the content information;

[0105]

[0106] In the formula, is the rectangular length of the question q in the original image O, is the rectangular length of the question q in the mapping image P;

[0107] At this point, the β-way question corresponding to the non-empty content set in the M-way question of the initial image O is obtained by solving the rectangular position information of the corresponding question in the mapping image P.

[0108] Compared with the prior art, the question recognition mapping method shown in the embodiment has the beneficial effects that:

[0109] The question recognition mapping method shown in the embodiment calculates the character similarity between the initial image and the mapping image, obtains a multi-dimensional sparse matrix according to the calculation result, solves the sparse matrix to obtain the position matching set of the initial image and the mapping image, determines the content corresponding set of the initial image and the mapping image according to the position matching set, and finally calculates the rectangular position information of the questions in the initial image in the mapping image, so as to complete the image mapping. Therefore, under the premise of marking the rectangular position of the questions in the teaching aid books or test papers, the position information of the content in the questions, and the OCR character recognition, the embodiment can determine the position of the questions in the picture through line content matching.

[0110] Embodiment Two

[0111] The second embodiment of the application provides a question recognition mapping method, in which:

[0112] In the step of obtaining an initial image recording text content information and question rectangular position information, and recognizing the initial image to obtain a mapping image:

[0113] The initial image is O, and the length and width are The initial image has M-way questions Each question stores text content information and question rectangular position information:

[0114] Among them, the question rectangular position information: , and is the position of the upper left corner of the rectangle, is the rectangular length, is the rectangular height;

[0115] Text content information: the initial image has T rows of content The row content is in the format of , wherein is a string, is coordinate system information, Associate information with the topic.

[0116] In this embodiment, the step of calculating character similarity between each text line in the mapped image and all text lines in the initial image specifically includes:

[0117] Compare each of the K lines of text in the mapped image P with the T lines of content in the initial image O. Perform character similarity calculation;

[0118] The Levenshtein distance between two strings a and b is denoted as :

[0119]

[0120] in Represents the length of a,b, The larger the value, the less the a and b strings match. If the value is 0, the two strings are completely equal;

[0121] definition:

[0122]

[0123] That is The larger the value, the higher the similarity between the two strings. If the two strings are completely equal, the value is 1. , then the two strings lack similarity.

[0124] In this embodiment, based on the calculation results of the character similarity calculation, a multi-dimensional sparse matrix is ​​obtained, and the step of solving the sparse matrix to obtain a set of position matches between each text line in the mapped image and all text lines in the initial image specifically includes:

[0125] By performing character similarity test on each of the K lines of text in the mapped image P and the T lines of content in the initial image O Calculate and get -dimensional sparse matrix:

[0126]

[0127] Solve the sparse matrix to obtain a position matching set containing N elements, where K lines of text in the mapped image P correspond to T lines of content in the image O. , the position matching set X satisfies the following conditions:

[0128] .

[0129] In the embodiment, the step of converting the initial image to obtain the content corresponding set of the questions in the initial image and the content of the text lines in the mapping image according to the question information in the position matching set comprises the following steps.

[0130] According to the question information in the set , the content corresponding set of the M questions in the initial image O and the K rows of content in the mapping image P is obtained.

[0131] Wherein, for any question q, the content corresponding set of g elements .

[0132] According to the content corresponding set of the questions in the initial image and the content of the text lines in the mapping image, the step of calculating the rectangular position information of the questions in the initial image corresponding to the mapping image comprises the following steps.

[0133] According to the content corresponding set of each question in the M questions in the initial image O, the rectangular position information of the questions in the initial image corresponding to the mapping image is calculated.

[0134] For any question q, if the content corresponding set is not empty, the calculation process of the rectangular position information of the question q in the mapping image P comprises the following steps.

[0135] Let the height ratio of the initial image O and the mapping image P of the question q be

[0136]

[0137] The size ratio of the initial image O and the mapping image P of the question area is calculated.

[0138] The calculation formula of the rectangular position of the question q in the mapping image P is as follows:

[0139]

[0140] In the formula, y is the left upper corner vertical coordinate of the content information, and h is the height of the content information.

[0141]

[0142] In the formula, is the rectangular height of the question q in the initial image O.

[0143]

[0144] In the formula, x is the left upper corner vertical coordinate of the content information, and w is the height of the content information. ​

[0145]

[0146] In the formula, is the length of the rectangle of the question q in the original picture O;

[0147] At this point, the β-way question corresponding to the non-empty content set in the M-way question of the initial image O is solved to obtain the rectangular position information in the mapping image P.

[0148] In this embodiment, the method further comprises:

[0149] Rectangular position information is calculated for the question with interference factors, and the calculation process includes:

[0150] Let One of the M-way questions is , and the rectangular information in the initial image O is , and Among the M-way questions, determine a question closest to the question q in the vertical coordinate , and the rectangular information in the initial image O is , and the rectangular information in the mapping image P is , then the question The calculation process of the rectangular position information in the mapping image P is:

[0151]

[0152] In the formula, is the height ratio of the question ;

[0153]

[0154]

[0155]

[0156] At this point, the rectangular position information of the M-way question in the initial image O is completely mapped into the mapping image P.

[0157] Embodiment three

[0158] Referring to Figure 2 , the third embodiment of the present application provides a question recognition mapping system, which comprises:

[0159] An image acquisition module 10 is configured to acquire an initial image recording text content information and question rectangular position information, and a mapping image.

[0160] The initial image shown in the embodiment is a work original picture that has been labeled in advance, denoted as initial image O, and the length and width are denoted as There are M questions The set is sorted from top to bottom according to the coordinate system, and each question stores text content information and question rectangular position information;

[0161] Among them, the question rectangular position information: , and is the position of the upper left corner of the rectangle, is the length of the rectangle, is the height of the rectangle;

[0162] Text content information: there are T rows of content in the initial image Row content is in the format , where is a string, is coordinate system information, is question association information.

[0163] The mapping image shown in the embodiment is obtained by taking a picture, denoted as mapping image P, and the length and width are denoted as There are K rows of content information , The content format is .

[0164] The first calculation module 20 is configured to calculate the character similarity between each text row in the mapping image and all text rows in the initial image.

[0165] Among them, the character similarity calculation between each text row in the mapping image and all text rows in the initial image adopts the Levenshtein distance algorithm. The Levenshtein distance between two strings a and b is denoted as :

[0166]

[0167] Among them represents the length of a and b, the larger the value, the less matched a and b strings are (provided that a and b strings cannot be empty, and our set does not store the case where the string is empty), the value is 0, which means that the two strings are completely equal.

[0168] In order to more intuitively compare the similarity of two strings, define

[0169]

[0170] Right now The larger the value, the higher the similarity between the two strings. If the two strings are completely equal, the value is 1. , then the two strings are considered to have no similarity (that is, they cannot be the same line of content).

[0171] The second calculation module 30 is used to obtain a multi-dimensional sparse matrix based on the calculation result of the character similarity calculation, and solve the sparse matrix to obtain a position matching set between each text line in the mapped image and all text lines in the initial image.

[0172] By performing character similarity calculation on each line of text in the K lines of the mapped image P and the T lines of content in the initial image O Calculated and obtained a -dimensional sparse matrix:

[0173] ;

[0174] Solving this matrix, the goal is to find a set of N matching positions between K rows in the set mapping image P and T rows in the initial image O , and the position matching set X satisfies the following conditions:

[0175]

[0176] because The matrix dimensions are generally small, and most matrix elements are 0. Only two-dimensional loops are needed to get the final solution: position matching set .

[0177] The third calculation module 40 is configured to convert, based on the topic information in the position matching set, a set of content correspondences between a plurality of topics in the initial image and a plurality of text lines in the mapped image.

[0178] Specifically, matching sets based on position middle We can convert the M questions of the initial image O into the corresponding set of K rows of the mapped image P; that is, a question q has a corresponding set of g elements. (The set may be empty).

[0179] The fourth calculation module 50 is configured to calculate the rectangular position information corresponding to the plurality of questions in the initial image in the mapped image according to a set of correspondences between the plurality of questions in the initial image and the plurality of text lines in the mapped image.

[0180] Specifically, according to the content corresponding set of each question in the M questions of the initial image O, the rectangular position information of the questions in the initial image in the mapping image is calculated;

[0181] For any question q, if the content corresponding set is not empty, then the rectangular position information calculation process of the question q in the mapping image P includes:

[0182] Let the height ratio of the initial image O and the question q in the mapping image P be

[0183]

[0184] The size ratio of the initial image O and the mapping image P of the question area is calculated;

[0185] Then the rectangular position calculation formula of the question q in the mapping image P is:

[0186]

[0187] In the formula, y is the upper left vertical coordinate of the content information, and h is the height of the content information;

[0188]

[0189] In the formula, is the rectangular height of the question q in the initial image O;

[0190]

[0191] In the formula, x is the upper left vertical coordinate of the content information, and w is the height of the content information;

[0192]

[0193] In the formula, is the rectangular length of the question q in the initial image O;

[0194] Thus, the rectangular position information of the β questions with non-empty content corresponding set in the M questions of the initial image O in the mapping image P is obtained.

[0195] Compared with the prior art, the question recognition mapping method shown in the embodiment has the beneficial effects that:

[0196] The subject mapping recognition system shown in the embodiment calculates the character similarity between the initial image and the mapping image, obtains a multi-dimensional sparse matrix according to the calculation result, solves the sparse matrix to obtain a position matching set of the initial image and the mapping image, determines a content corresponding set of the initial image and the mapping image according to the position matching set, and finally calculates the rectangular position information of several subjects in the initial image in the mapping image, so as to complete image mapping. Therefore, under the premise of marking the rectangular position of the subjects in the teaching aid books or test papers, the position information of the content in the subjects, and the OCR character recognition in advance, the subject position in the picture can be determined through line content matching.

[0197] Embodiment four

[0198] The fourth embodiment of the present application provides a computer readable storage medium, which stores computer instructions, and the instructions are executed by a processor to realize the steps of the method described in the above embodiments.

[0199] Embodiment five

[0200] The fifth embodiment of the present application provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the program to realize the steps of the method described in the above embodiments.

[0201] The above embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it should not be understood as a limitation on the patent scope of the present application. It should be noted that, for those skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which are all within the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.

Claims

1. A subject identification mapping method, characterized by, The method comprises: Obtaining an initial image recording text content information and title rectangular position information, and a mapping image; Carrying out character similarity calculation on each text line in the mapping image and all text lines in the initial image; Based on the calculation result of the character similarity calculation, a multi-dimensional sparse matrix is obtained, and the sparse matrix is solved to obtain a position matching set of each text line in the mapping image and all text lines in the initial image; According to the title information in the position matching set, a content corresponding set of several titles in the initial image and several text lines in the mapping image is converted and obtained; According to the content corresponding set of several titles in the initial image and several text lines in the mapping image, the rectangular position information corresponding to the several titles in the initial image in the mapping image is calculated; Wherein, based on the calculation result of the character similarity calculation, a multi-dimensional sparse matrix is obtained, and the sparse matrix is solved to obtain a position matching set of each text line in the mapping image and all text lines in the initial image, which specifically comprises: by character similarity between each of the K rows of text lines in the mapped image P and the T rows of content in the initial image O calculating, obtaining a sparse matrix of dimension solving the sparse matrix to obtain a position matching set of K rows of literal rows in the mapping image P and T rows of content in the picture O and containing N elements each matching in the position matching set represents a matching combination of a row of literal in the mapping image and a row of literal in the initial image, and the position matching set X satisfies the following conditions: Wherein, according to the title information in the position matching set, a content corresponding set of several titles in the initial image and several text lines in the mapping image is converted and obtained, which specifically comprises: According to the set In the title information, wherein, Represent a line of text in the initial image 0, and the content of the content corresponding set of M-channel title of the initial image O and the K-row content of the mapping image P is obtained by conversion. Wherein, any one question q, the content corresponding set of g elements The element of the content corresponding set is a certain text line in the mapping image and a certain text line in the initial image corresponding thereto.

2. The title recognition mapping method of claim 1, wherein, In the step of obtaining an initial image recording text content information and title rectangular position information, and identifying the initial image to obtain a mapping image: The initial image is O, and the length and width are recorded as There are M questions in the initial image Each question Stores the text content information and question rectangular position information: Wherein, the title rectangle position information: , and is the position of the upper left corner of the rectangle, is the rectangle length, is the rectangle height; Text content information: T lines of content in the initial image , line content is formatted as wherein is a string, is coordinate system information, is topic association information.

3. The title recognition mapping method of claim 1, wherein, The step of carrying out character similarity calculation on each text line in the mapping image and all text lines in the initial image specifically comprises: performing a character similarity computation on each of the K rows of text lines in the map image P and the T rows of content in the initial image O performing a character similarity computation The Levenshtein distance of two strings a, b is denoted by : wherein represents the length of a, b, represents the string after removing the first character of a, represents the string after removing the first character of b, the larger the value, the more a, b do not match, the value is 0, the two strings are completely equal; Definition: That is, when The greater the value, the more similar the two strings are. If the two strings are identical, the value is 1. If then the two strings lack similarity.

4. The title recognition mapping method of claim 1, wherein, According to the content corresponding set of several titles in the initial image and several text lines in the mapping image, the rectangular position information corresponding to the several titles in the initial image in the mapping image is calculated, which specifically comprises: According to the content corresponding set of each title in the M titles of the initial image O, the rectangular position information corresponding to the several titles in the initial image in the mapping image P is calculated; For any title q, if its content corresponding set is not empty, then the rectangular position information calculation process of the title q in the mapping image P includes: Let the height ratio of the initial image O and the mapping image P of the title q be The size ratio of the initial image O and the mapping image P of the title area is calculated; Then the rectangular position calculation formula of the title q in the mapping image P is: where y is the top-left vertical coordinate of the content information, h is the height of the content information, is the average function; wherein is the height of the subject q in the initial image O, is the height of the subject q in the mapped image after the calculation; Wherein, x is the upper left vertical coordinate of the content information, and w is the height of the content information. wherein is the length of the rectangle of the subject q in the original picture O of the job, is the length of the rectangle of the mapped image subject q; Thus, the rectangular position information corresponding to the β titles with non-empty content corresponding set in the M titles of the initial image O in the mapping image P is solved.

5. The subject identification mapping method according to any one of claims 1 to 4, characterized in that, The method further comprises: Rectangular position information calculation is carried out on the title with interference factors, and the calculation process includes: Set One of the questions in the question set is , the rectangular information of which in the initial image O is , in One of the questions in the question set is determined as the question closest to the vertical coordinate , the rectangular information of which in the initial image O is , the rectangular information of which in the mapping image P is , then the question The calculation process of the rectangular position information of the question in the mapping image P is: In the formula, The height ratio is the subject of the title Thus, the rectangular position information of the M titles in the initial image O is completely mapped into the mapping image P.

6. A subject identification mapping system characterized by, The system is applied to the method of any one of claims 1-5, and the system comprises: An image acquisition unit is configured to acquire an initial image recording text content information and title rectangular position information, and a mapping image; A first calculation unit is configured to perform character similarity calculation on each text line in the mapping image and all text lines in the initial image; A second calculation unit is configured to obtain a multi-dimensional sparse matrix based on the calculation result of the character similarity calculation, and solve the sparse matrix to obtain a position matching set of each text line in the mapping image and all text lines in the initial image; A third calculation unit is configured to convert the title information in the position matching set to obtain a content corresponding set of several titles in the initial image and several text lines in the mapping image; A fourth calculation unit is configured to calculate the rectangular position information corresponding to the several titles in the initial image in the mapping image based on the content corresponding set of several titles in the initial image and several text lines in the mapping image.

7. A computer readable storage medium having stored thereon computer instructions, wherein, The instruction is executed by the processor to implement the steps of the method of any one of claims 1-5.

8. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to implement the steps of the method of any one of claims 1-5.

Citation Information

Patent Citations

  • Matching recognition method of exercise images and a terminal device thereof

    CN109492644A

  • Topic content identification method and device, readable storage medium and computer equipment

    CN110956173A