Intelligent identification method, device, electronic device and storage medium for objective question position
Through the combination of edge detection and text recognition model, cutting and superposition technology, the traditional objective question recognition method cannot identify the problem of structural changes or low print quality, achieving high accuracy objective question position recognition, reducing labor costs.
Patent Information
- Application Number
- CN202411304016.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-09-19
AI Technical Summary
The traditional objective question recognition method cannot identify the fuzzy and missing caused by the change in the answer sheet structure or the low printing quality of the test paper, resulting in the inability to identify the layout structure information of the objective question, and the accuracy rate is low, which increases labor costs.
By obtaining the recognition box in the image of the objective question area to be identified, the option height and width are determined, and the edge detection and text recognition model are used to merge and segment, cut into sliced images, and superimpose them by normalized correlation coefficients to redetermine the option height again. and width, precisely locate the title number and option position.
A correction rate of more than 92% is achieved, which reduces detection missing, avoids identification failures caused by structural changes and low print quality, and reduces labor costs.
Smart Images

Figure CN118823816B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence, and in particular to an intelligent recognition method, device, electronic device and storage medium for objective question positions. Background Art
[0002] In order to reduce the intensity of marking and the error rate, answer sheets are usually used for marking during exams. When recognizing objective question images in answer sheets, traditional objective question recognition methods usually use a pre-trained deep learning model to identify the position of objective questions. The position of objective questions specifically refers to the position of each question number in the objective question and the position of each option corresponding to each question number.
[0003] However, since the deep learning model is trained based on training data, the traditional objective question recognition method can only recognize objective question images that are consistent with the objective question positions in the training data. Once the objective question structure in the answer sheet changes, the objective question positions cannot be recognized. Summary of the invention
[0004] In view of this, the purpose of this application is to provide an intelligent recognition method, device, electronic device and storage medium for the position of objective questions, which can fully obtain the positions of all options and question numbers, reduce the detection omissions caused by other detection methods, and avoid the inability to recognize the objective question layout structure information due to fuzzy omissions caused by changes in the objective question structure and low test paper printing quality. The accuracy rate is over 92%, effectively reducing labor costs.
[0005] In a first aspect, an embodiment of the present application provides a method for intelligently identifying objective question layout information, the method comprising:
[0006] Obtaining an identification frame of the objective question in the image of the objective question area to be identified;
[0007] Determine the option height and option width of the objective question area to be identified according to the height and width values of all identification frames;
[0008] Determine the splitting coordinates between all rows and columns according to the numerical relationship between the horizontal distance between the center points of each row of identification boxes and the width of the option, and the numerical relationship between the vertical distance between the center points of each column of identification boxes and the height of the option;
[0009] The objective question area image is cut according to the segmentation coordinates to obtain multiple slice images, and the corresponding pixel points in the slice images are superimposed according to the normalized correlation coefficient, and the option height and option width are re-determined according to the superimposed images;
[0010] According to the recognition situation of the slice image and the re-determined option height and option width, the position of each question number and the option position of each question number in the objective question area to be recognized are obtained.
[0011] In a possible implementation, the identification frame is obtained by the following steps:
[0012] The objective question area to be identified is detected by an edge detection algorithm to obtain a first edge recognition frame, and the first edge recognition frames whose horizontal distance is less than a preset value are merged to obtain a merged recognition frame; and the objective question area to be identified is detected by a text recognition model to obtain a text recognition frame;
[0013] According to the merged recognition frame, the objective question area to be recognized is detected again by using an edge detection algorithm to obtain a second edge recognition frame;
[0014] The second edge recognition frame and the text recognition frame are merged to obtain a recognition frame.
[0015] In a possible implementation, merging first edge identification frames whose horizontal distance is less than a preset value to obtain a merged identification frame includes:
[0016] Determine a first edge recognition frame whose ratio of height value to width value is greater than a preset height-to-width ratio as a target edge recognition frame;
[0017] If there is a black first edge identification frame, the minimum horizontal distance between the black first edge identification frame and other first edge identification frames is determined as the target expansion distance; otherwise, the preset expansion distance is determined as the target expansion distance;
[0018] Calculating the distance between the target edge identification frame and the first adjacent edge identification frame, and determining the mode corresponding to the distance;
[0019] The left and right sides of the target edge recognition frame are laterally expanded by a pre-target extension distance, and the lateral distance between the target edge recognition frame and the adjacent first edge recognition frame is less than the majority;
[0020] The edge recognition frames with overlapping areas are merged to obtain a merged recognition frame.
[0021] In a possible implementation, the objective question area to be identified is detected again by an edge detection algorithm according to the merged identification frame to obtain a second edge identification frame, including:
[0022] Binarization is performed on the objective question area to be identified to increase the brightness of the pixels in the merged identification frame, thereby obtaining an image of the objective question area to be identified;
[0023] The image of the objective question area to be identified is detected again by using the edge detection algorithm to obtain the middle edge identification frame;
[0024] The middle edge identification frame whose width-to-height ratio is greater than the preset aspect ratio is segmented to obtain a second edge identification frame.
[0025] In a possible implementation, segmenting the middle edge identification frame whose width-to-height ratio is greater than a preset aspect ratio to obtain a second edge identification frame includes:
[0026] Performing vertical projection on the partial image corresponding to the middle edge recognition frame whose width to height ratio is greater than a preset aspect ratio to obtain a vertical projection image;
[0027] The position of the lowest pixel value in the vertical projection image is determined as the position to be segmented;
[0028] The middle edge recognition frame whose width-to-height ratio is greater than a preset aspect ratio is segmented based on the position to be segmented in the image of the objective question area to be identified, to obtain a second edge recognition frame.
[0029] In a possible implementation, the segmentation coordinates between all rows and columns are determined according to the numerical relationship between the horizontal distance between the center points of each row of identification boxes and the width of the option, and the numerical relationship between the vertical distance between the center points of each column of identification boxes and the height of the option, including:
[0030] Determine the splitting coordinates between all rows according to the numerical relationship between the horizontal distance between the center points of each row of identification boxes in the identification box and the option width;
[0031] The division coordinates between all columns are determined according to the numerical relationship between the longitudinal distance between the center points of each column of identification boxes in the identification box and the option height.
[0032] In a possible implementation, determining the segmentation coordinates between all rows according to the numerical relationship between the horizontal distance between the center points of each row of identification boxes and the option width includes:
[0033] For each recognition frame in each row, calculate the horizontal distance between the center point of the recognition frame and other recognition frames in the row;
[0034] Determining whether the identification frame is a first target identification frame according to a difference between a horizontal distance of a center point corresponding to the identification frame and a width of an option;
[0035] The minimum vertical coordinate among the vertical coordinates of all the pixels in all the first target recognition frames of the row is determined as the segmentation coordinate.
[0036] In a possible implementation, determining the split coordinates between all columns according to the numerical relationship between the longitudinal distance between the center points of each column of identification boxes and the height of the option includes:
[0037] For each recognition frame in each column, calculate the longitudinal distance between the center point of the recognition frame and other recognition frames in the column;
[0038] Determine whether the identification frame is a second target identification frame according to the difference between the longitudinal distance of the center point corresponding to the identification frame and the option height;
[0039] The maximum horizontal coordinate among the horizontal coordinates of all the pixel points in all the second target recognition frames of the column is determined as the segmentation coordinate.
[0040] In a possible implementation, corresponding pixel points in the slice image are superimposed according to the normalized correlation coefficient, including:
[0041] Through the normalized correlation coefficient between each pixel in the template image and each pixel in the i-th other slice image, the pixels in other slice images that correspond to each pixel in the template image are determined; the initial value of the template image is the first slice image; the initial value of i is 2;
[0042] The pixel values of the corresponding pixels in the i-th other slice image and the template image are superimposed to obtain the latest template image; i=i+1, and jump to the step to continue executing through the normalized correlation coefficient of each pixel in the template image and each pixel in the i-th other slice image, until the last slice image; and the final template image is determined as the superimposed image.
[0043] In a second aspect, an embodiment of the present application further provides an intelligent device for identifying the position of an objective question, the device comprising:
[0044] An acquisition module, used to acquire an identification frame of an objective question in an image of an objective question region to be identified;
[0045] A determination module, used to determine the option height and option width of the objective question area to be identified according to the height values and width values of all identification frames;
[0046] The determination module is further used to determine the segmentation coordinates between all rows and columns according to the numerical relationship between the horizontal distance between the center points of each row of identification boxes and the width of the option, and the numerical relationship between the vertical distance between the center points of each column of identification boxes and the height of the option;
[0047] A superposition determination module is used to cut the objective question area image according to the segmentation coordinates to obtain multiple slice images, and to superimpose corresponding pixel points in the slice images according to the normalized correlation coefficient, and to re-determine the option height and the option width according to the superimposed images;
[0048] The determination module is also used to obtain the position of each question number and the option position of each question number in the objective question area to be identified according to the identification status of the slice image and the re-determined option height and option width.
[0049] In a possible implementation, the acquisition module is specifically used to detect the objective question area to be identified through an edge detection algorithm to obtain a first edge recognition frame, merge the first edge recognition frames whose horizontal distance is less than a preset value to obtain a merged recognition frame; and detect the objective question area to be identified through a text recognition model to obtain a text recognition frame; detect the objective question area to be identified again through an edge detection algorithm based on the merged recognition frame to obtain a second edge recognition frame; merge the second edge recognition frame and the text recognition frame to obtain a recognition frame.
[0050] In a possible implementation, the acquisition module is further used to:
[0051] Determine a first edge recognition frame whose ratio of height value to width value is greater than a preset height-to-width ratio as a target edge recognition frame;
[0052] If there is a black first edge identification frame, the minimum horizontal distance between the black first edge identification frame and other first edge identification frames is determined as the target expansion distance; otherwise, the preset expansion distance is determined as the target expansion distance;
[0053] Calculating the distance between the target edge identification frame and the first adjacent edge identification frame, and determining the mode corresponding to the distance;
[0054] The left and right sides of the target edge recognition frame are laterally expanded by a pre-target extension distance, and the lateral distance between the target edge recognition frame and the adjacent first edge recognition frame is less than the majority;
[0055] The edge recognition frames with overlapping areas are merged to obtain a merged recognition frame.
[0056] In a possible implementation, the acquisition module is further used to:
[0057] Binarization is performed on the objective question area to be identified to increase the brightness of the pixels in the merged identification frame, thereby obtaining an image of the objective question area to be identified;
[0058] The image of the objective question area to be identified is detected again by using the edge detection algorithm to obtain the middle edge identification frame;
[0059] The middle edge identification frame whose width-to-height ratio is greater than the preset aspect ratio is segmented to obtain a second edge identification frame.
[0060] In a possible implementation, the acquisition module is further used to:
[0061] Performing vertical projection on the partial image corresponding to the middle edge recognition frame whose width to height ratio is greater than a preset aspect ratio to obtain a vertical projection image;
[0062] The position of the lowest pixel value in the vertical projection image is determined as the position to be segmented;
[0063] The middle edge recognition frame whose width-to-height ratio is greater than a preset aspect ratio is segmented based on the position to be segmented in the image of the objective question area to be identified, to obtain a second edge recognition frame.
[0064] In one possible implementation, the determination module is specifically used to determine the split coordinates between all rows based on the numerical relationship between the horizontal distance between the center points of each row of identification boxes in the identification box and the option width; and to determine the split coordinates between all columns based on the numerical relationship between the vertical distance between the center points of each column of identification boxes in the identification box and the option height.
[0065] In a possible implementation, the determination module is specifically used to calculate, for each identification box in each row, a horizontal distance between the center point of the identification box and other identification boxes in the row; determine whether the identification box is a first target identification box based on a difference between the horizontal distance of the center point corresponding to the identification box and the option width; and determine the minimum vertical coordinate among the vertical coordinates of all pixel points in all first target identification boxes in the row as the segmentation coordinate.
[0066] In a possible implementation, the determination module is specifically used to calculate, for each identification box in each column, a longitudinal distance between the center points of the identification box and other identification boxes in the column; determine whether the identification box is a second target identification box based on a difference between the longitudinal distance of the center points corresponding to the identification box and the option height; and determine the maximum horizontal coordinate among the horizontal coordinates of all pixel points in all second target identification boxes in the column as the segmentation coordinate.
[0067] In a possible implementation, the overlay determination module is specifically used to determine the pixels in other slice images that correspond to the pixels in the template image respectively through the normalized correlation coefficients between each pixel in the template image and each pixel in the i-th other slice image; the initial value of the template image is the first slice image; the initial value of i is 2; the pixel values of the corresponding pixels in the i-th other slice image and the template image are superimposed to obtain the latest template image; i=i+1, and jump to the step of continuing to execute through the normalized correlation coefficients between each pixel in the template image and each pixel in the i-th other slice image until the last slice image; and the final template image is determined as the superimposed image.
[0068] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the storage medium communicate via the bus, and the processor executes the machine-readable instructions to perform the steps of the intelligent identification method for the location of objective questions as described in any one of the first aspects.
[0069] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the intelligent identification method for the location of objective questions as described in any one of the first aspects are executed.
[0070] The embodiment of the present application provides an intelligent recognition method, device, electronic device and storage medium for the position of objective questions, including: obtaining the recognition frame of the objective question in the image of the objective question area to be recognized; determining the option height and option width of the objective question area to be recognized according to the height value and width value of all recognition frames; determining the segmentation coordinates between all rows and columns according to the numerical relationship between the horizontal distance of the center point between each row of recognition frames and the option width, and the numerical relationship between the vertical distance of the center point between each column of recognition frames and the option height; cutting the objective question area image according to the segmentation coordinates to obtain multiple slice images, and superimposing the corresponding pixel points in the slice image according to the normalized correlation coefficient, and re-determining the option height and option width according to the superimposed image; obtaining the position of each question number in the objective question area to be recognized and the option position of each question number according to the recognition situation of the slice image and the re-determined option height and option width. The present application can completely obtain the information of all options and question numbers, reduce the detection loss caused by other detection methods, and avoid the fuzzy loss caused by the change of objective question structure and the low printing quality of the test paper, which leads to the inability to recognize the objective question layout structure information, and the accuracy rate is more than 92%, which effectively reduces the labor cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0072] Figure 1 A schematic diagram showing a flow chart of an intelligent identification method for objective question layout information provided by an embodiment of the present application;
[0073] Figure 2 A schematic diagram of a first edge recognition frame provided in an embodiment of the present application is shown;
[0074] Figure 3 A schematic diagram of a text recognition frame provided in an embodiment of the present application is shown;
[0075] Figure 4 A schematic diagram of an image of an objective question region to be identified obtained after binarization provided by an embodiment of the present application is shown;
[0076] Figure 5A schematic diagram of a vertical projection image provided by an embodiment of the present application is shown;
[0077] Figure 6 A schematic diagram showing the structure of an intelligent device for identifying the position of an objective question provided in an embodiment of the present application is shown;
[0078] Figure 7 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0079] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0080] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0081] In order to enable those skilled in the art to use the content of this application, the following implementation is provided in conjunction with the specific application scenario "artificial intelligence field". For those skilled in the art, the general principles defined herein can be applied to other embodiments and application scenarios without departing from the spirit and scope of this application. Although this application is mainly described around the "artificial intelligence field", it should be understood that this is only an exemplary embodiment.
[0082] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0083] The following is a detailed description of an intelligent identification method for objective question layout information provided in an embodiment of the present application.
[0084] Reference Figure 1 As shown, it is a flowchart of an intelligent identification method of objective question layout information provided by an embodiment of the present application. The exemplary steps of the embodiment of the present application are described below:
[0085] S101, obtaining an identification frame of an objective question in an image of an objective question region to be identified.
[0086] In the implementation manner of the present application, the objective question area is the area for filling in the multiple-choice questions in the answer sheet. The objective question area is divided between adjacent rows whose center points are greater than a preset distance to obtain at least one answer sheet area to be identified.
[0087] Specifically, the identification frame of the objective question in the image of the objective question area to be identified is obtained through the following steps:
[0088] Step 1: Detect the objective question area to be identified by an edge detection algorithm to obtain a first edge recognition frame, merge the first edge recognition frames whose horizontal distance is less than a preset value to obtain a merged recognition frame; and detect the objective question area to be identified by a text recognition model to obtain a text recognition frame.
[0089] In an implementation manner of the present application, when the options in the answer sheet are in the form of "[option number]", the "[", "option number" and "]" in the same option may correspond to different first edge identification boxes. Therefore, it is necessary to merge multiple first edge identification boxes of the same option to improve the recognition accuracy; the preset value refers to the distance between adjacent options in the same row. In order to avoid merging different options into one identification box, it is necessary to limit the merged first edge identification box, that is, the first edge identification boxes whose horizontal distance is less than the preset value are merged.
[0090] The edge detection algorithm may be any algorithm that can perform edge detection on the objective question area to be identified. Figure 2 The figure is a schematic diagram of the first edge recognition frame provided in the embodiment of the present application; the text recognition model is trained based on the image of the objective question area to be recognized and the corresponding text recognition frame label. The text recognition model can be any deep learning model that can annotate the text in the image. Figure 3 Shown is a schematic diagram of a text recognition box provided in an embodiment of the present application.
[0091] Furthermore, the first edge recognition frames whose horizontal distance is less than a preset value are merged to obtain a merged recognition frame through the following steps:
[0092] (1) A first edge recognition frame whose ratio of height to width is greater than a preset height-to-width ratio is determined as a target edge recognition frame.
[0093] In the implementation manner of the present application, when the "[", "option label" and "]" in the same option may correspond to different first edge identification frames, the "[" and "]" are mainly expanded horizontally, and the first edge identification frames of "[" and "]" must have the characteristic that the height value is greater than the width value. Therefore, the first edge identification frame whose ratio of height value to width value is greater than the preset aspect ratio is determined as the target edge identification frame.
[0094] (2) If there is a black first edge identification frame, the minimum horizontal distance between the black first edge identification frame and other first edge identification frames is determined as the target expansion distance; otherwise, the preset expansion distance is determined as the target expansion distance.
[0095] In the implementation of the present application, the positions of the options that students have filled in are generally all black. In order to prevent multiple options from being merged into one identification frame, the first edge identification frame based on the filled options can well determine the expansion distance. Therefore, if there is a black first edge identification frame, the minimum horizontal distance between the black first edge identification frame and other first edge identification frames is determined as the target expansion distance; otherwise, the preset expansion distance is determined as the target expansion distance.
[0096] (3) Calculate the distance between the target edge recognition frame and its adjacent first edge recognition frame, and determine the mode corresponding to the distance.
[0097] In the implementation manner of the present application, the mode corresponding to the distance is used to represent the distance between options in the same row.
[0098] (4) The left and right sides of the target edge recognition frame are laterally expanded by a target extension distance, and the lateral distance between the target edge recognition frame and the adjacent first edge recognition frame is less than the majority.
[0099] In the implementation manner of the present application, in order to further avoid merging multiple options into one identification frame, the lateral distance between the target edge identification frame to be expanded and the adjacent first edge identification frame is also limited, thereby improving the accuracy of the merging.
[0100] (5) Merge the edge recognition frames with overlapping areas to obtain a merged recognition frame.
[0101] In the implementation manner of the present application, the expanded recognition frames may overlap, so the edge recognition frames with overlapping areas are merged to obtain a merged recognition frame.
[0102] Step 2: Based on the merged recognition frame, the objective question area to be recognized is detected again by an edge detection algorithm to obtain a second edge recognition frame.
[0103] In the implementation manner of the present application, in order to further improve the detection accuracy of the edges of the option items and the edges of the question numbers, the objective question area to be identified is detected again by an edge detection algorithm based on the merged identification frame to obtain a second edge identification frame.
[0104] The following steps are performed to detect the objective question area to be identified again using an edge detection algorithm according to the merged identification frame to obtain a second edge identification frame, including:
[0105] (1) Binarize the objective question area to be identified to increase the brightness of the pixels in the merged identification frame and obtain an image of the objective question area to be identified.
[0106] In the implementation mode of the present application, the pixel value of the pixel point in the merged identification frame is determined to be 255, and the pixel value of other pixel points is determined to be 0, so as to increase the brightness of the pixel points in the merged identification frame, improve the contrast between the pixel points in the merged identification frame and the pixel points outside the merged identification frame, and thus improve the accuracy of subsequent edge detection. Figure 4 , which is a schematic diagram of the image of the objective question area to be identified obtained after binarization provided in an embodiment of the present application.
[0107] (2) Use the edge detection algorithm to detect the image of the objective question area again and obtain the middle edge recognition frame.
[0108] Optionally, if there is a middle edge identification frame whose corresponding position is black in the image of the objective question area to be identified, the mode of the height of the black middle edge identification frame is determined as the first mode, and the mode of the width of the black middle edge identification frame is determined as the second mode; if there is no middle edge identification frame whose corresponding position is black in the image of the objective question area to be identified, the mode of the heights of all the middle edge identification frames is determined as the first mode, and the mode of the widths of all the middle edge identification frames is determined as the second mode; the middle edge identification frames whose height difference with the first mode is greater than a preset height difference are removed; and the middle edge identification frames whose width difference with the second mode is greater than a preset width difference are removed.
[0109] (3) Segment the middle edge recognition frame whose width-to-height ratio is greater than the preset aspect ratio to obtain a second edge recognition frame.
[0110] In the implementation of the present application, although the first edge identification frame is limited when it is merged, there may still be a situation where multiple options are connected together, so it is necessary to segment such intermediate edge identification frames. The width of such intermediate edge identification frames is obviously greater than the height, so the intermediate edge identification frames whose ratio of width to height is greater than the preset aspect ratio are segmented.
[0111] Specifically, the middle edge recognition frame whose width-to-height ratio is greater than the preset aspect ratio is segmented to obtain the second edge recognition frame through the following steps, including:
[0112] a. Perform vertical projection on the local image corresponding to the middle edge recognition frame whose width-to-height ratio is greater than the preset aspect ratio to obtain a vertical projection image.
[0113] In the implementation manner of the present application, based on the sliding window whose width is the second mode determined above, the local image corresponding to the middle edge identification frame whose width to height ratio is greater than the preset aspect ratio is vertically projected to obtain a numerical projection image. Figure 5 , which is a schematic diagram of a vertical projection image provided in an embodiment of the present application.
[0114] b. Determine the position of the lowest pixel value in the vertical projection image as the position to be segmented.
[0115] c. Segment the middle edge recognition frame whose width-to-height ratio is greater than a preset aspect ratio based on the position to be segmented in the image of the objective question area to be identified, to obtain a second edge recognition frame.
[0116] Step 3: Merge the second edge recognition frame and the text recognition frame to obtain a recognition frame.
[0117] In the implementation manner of the present application, the second edge recognition frame and the text recognition frame are merged by using the NMS technology for removing redundant detection frames to obtain a final recognition frame.
[0118] Among them, NMS merging is a technology used to remove redundant detection frames in target detection, also known as non-maximum suppression. In target detection tasks, due to the characteristics of the algorithm, multiple detection frames may be generated for the same target, and these detection frames may overlap in position and size. NMS merging sets an overlap threshold (such as IoU threshold). When the overlap between detection frames exceeds this threshold, the detection frame with the highest confidence is retained, and other overlapping detection frames are suppressed, thereby achieving the purpose of removing redundancy. This technology helps to improve the accuracy and efficiency of target detection.
[0119] S102: Determine the option height and option width of the objective question area to be identified according to the height values and width values of all identification frames.
[0120] In the implementation manner of the present application, the mode of the height in the recognition frame is determined as the option height of the objective question area to be recognized; the mode of the width in the recognition frame is determined as the option height of the objective question area to be recognized.
[0121] S103, determining the splitting coordinates between all rows and columns according to the numerical relationship between the horizontal distance between the center points of each row of identification boxes and the option width, and the numerical relationship between the vertical distance between the center points of each column of identification boxes and the option height.
[0122] In the embodiments of the present application, the division coordinates between all rows refer to the coordinates of the division lines between adjacent rows, and the division coordinates between all columns refer to the coordinates of the division lines between adjacent columns.
[0123] Among them, the vertical coordinates of the pixels in the recognition frames of the same row should be exactly the same, but because the recognition frames may not be accurate, only some of the pixels in the recognition frames of the same row may have the same vertical coordinates. Therefore, the recognition frames with pixels with the same vertical coordinate values are the recognition frames of the same row.
[0124] The horizontal coordinates of the pixels in the recognition frames of the same column should be exactly the same. However, since the recognition frames may be inaccurate, only some of the pixels in the recognition frames of the same column may have the same horizontal coordinates. Therefore, the recognition frames with pixels with the same horizontal coordinate values are the recognition frames of the same column.
[0125] Specifically, the split coordinates between all rows are determined based on the numerical relationship between the horizontal distance between the center points of adjacent identification boxes in each row of the identification box and the option width; the split coordinates between all columns are determined based on the numerical relationship between the vertical distance between the center points of adjacent identification boxes in each column of the identification box and the option height.
[0126] Furthermore, according to the numerical relationship between the horizontal distance between the center points of each row of adjacent identification boxes in the identification box and the option width, the segmentation coordinates between all rows are determined, including:
[0127] Step 1: For each recognition frame in each row, calculate the horizontal distance between the center point of the recognition frame and the adjacent recognition frame.
[0128] In the implementation manner of the present application, the difference between the horizontal coordinate of the center point of the recognition frame and the horizontal coordinate of the center point of the recognition frame adjacent to it in the row is determined as the horizontal distance between the center points of the recognition frame and the adjacent recognition frame.
[0129] Step 2: judging whether the recognition frame is the first target recognition frame according to the difference between the horizontal distance of the center point corresponding to the recognition frame and the option width.
[0130] In the implementation of the present application, in order to further determine whether the identification box is in the row, it is necessary to determine whether the identification box is the first target identification box. Since the horizontal distance of the center point corresponding to the identification box should be infinitely close to the option width, if the difference between the horizontal distance of the center point corresponding to the identification box and the option width is less than the first target preset difference, the identification box is the first target identification box.
[0131] Step 3: Determine the minimum vertical coordinate among the vertical coordinates of all the pixels in all the first target recognition frames of the row as the segmentation coordinate.
[0132] In an embodiment of the present application, the minimum ordinate among the ordinates of all pixels in all first target recognition frames of the row is the ordinate of the dividing line between the row and the next row, that is, the dividing coordinate between the row and the next row.
[0133] Further, according to the numerical relationship between the longitudinal distance between the center points of adjacent identification boxes in each column of the identification box and the option height, the segmentation coordinates between all the columns are determined, including:
[0134] Step 1: For each recognition frame in each column, calculate the longitudinal distance between the center point of the recognition frame and the adjacent recognition frame.
[0135] In the implementation manner of the present application, the difference between the longitudinal coordinate of the center point of the recognition frame and the longitudinal coordinate of the center point of the recognition frame adjacent to it in the column is determined as the longitudinal distance of the center point between the recognition frame and the adjacent recognition frame.
[0136] Step 2: Determine whether the identification frame is a second target identification frame based on the difference between the longitudinal distance of the center point corresponding to the identification frame and the option height.
[0137] In the implementation of the present application, in order to further determine whether the identification box is in the column, it is necessary to determine whether the identification box is the second target identification box. Since the longitudinal distance of the center point corresponding to the identification box should be infinitely close to the option height, if the difference between the longitudinal distance of the center point corresponding to the identification box and the option height is less than the second target preset difference, the identification box is the second target identification box.
[0138] Step 3: determine the maximum horizontal coordinate among the horizontal coordinates of all the pixels in all the second target recognition frames of the column as the segmentation coordinate.
[0139] In an embodiment of the present application, the maximum horizontal coordinate among the horizontal coordinates of all pixels in all second target recognition frames of the column is the horizontal coordinate of the dividing line between the column and the next column, that is, the dividing coordinate between the column and the next column.
[0140] S104, cutting the objective question area image according to the segmentation coordinates to obtain a plurality of slice images, superimposing corresponding pixel points in the slice images according to the normalized correlation coefficient, and re-determining the option height and option width according to the superimposed images.
[0141] In the embodiment of the present application, the image of the objective question area is cut at the position corresponding to the segmentation coordinate to obtain multiple slice images. And the corresponding pixel points in the slice images are superimposed according to the normalized correlation coefficient, including:
[0142] Step 1: Determine the pixels in other slice images that correspond to the pixels in the template image through the normalized correlation coefficients between each pixel in the template image and each pixel in the i-th other slice image; the initial value of the template image is the first slice image; the initial value of i is 2.
[0143] Specifically, the normalized correlation coefficient between each pixel in the template image and each pixel in the i-th other slice image is calculated by the following normalized correlation coefficient formula:
[0144] ;
[0145] in, is the pixel between the template image and the i-th slice image The normalized correlation coefficient of is the pixel point on the template image The pixel value of is the average value of the pixel value on the template image, is the pixel value of the corresponding pixel of the i-th other slice image and the template image, It is the average pixel value of the current matching area on other slice images.
[0146] Step 2: Based on the normalized correlation coefficient, the pixel values of the corresponding pixels in the i-th other slice image and the template image are superimposed to obtain the latest template image; i=i+1, and jump to step 1 and continue to execute through the normalized correlation coefficient of each pixel in the template image and each pixel in the i-th other slice image until the last slice image; and the final template image is determined as the superimposed image.
[0147] Specifically, the latest template image is obtained by superimposing the pixel values of the corresponding pixel points in the i-th other slice image and the template image using the following formula:
[0148] ;
[0149] in, For the latest template image, is the corresponding position of the maximum value of the normalized correlation in the i-th other slice image, This is the template image before updating. and is the preset coefficient, .
[0150] Furthermore, the option height and option width are re-determined based on the superimposed image, including: for options whose option numbers are enclosed in brackets "[" and "]", the height and width of the box consisting of three consecutive black areas and with the largest proportion of black pixels in the final template image after binarization are determined as the height and width of the option.
[0151] Furthermore, re-determining the option height and option width based on the superimposed image also includes: for options whose option labels are framed by square boxes, determining the height and width of the rectangular area in the final template image after binarization as the height and width of the option.
[0152] S105 , obtaining the position of each question number and the option position of each question number in the objective question area to be identified according to the recognition status of the slice image and the re-determined option height and option width.
[0153] In an implementation manner of the present application, if the first row in the slice image is all numbers, the layout of the objective question area to be identified is vertical layout; if the first column in the slice image is all numbers, the layout of the objective question area to be identified is horizontal layout; based on the layout situation, option height, and option width, the wrong question numbers and options in the image of the objective question area to be identified are corrected to obtain the position of each question number in the objective question area to be identified and the option position of each question number.
[0154] The embodiment of the present application provides an intelligent recognition method for the position of an objective question, including: obtaining an identification frame of an objective question in an image of an objective question region to be recognized; determining the option height and option width of the objective question region to be recognized according to the height and width values of all identification frames; determining the segmentation coordinates between all rows and columns according to the numerical relationship between the horizontal distance of the center point between each row of identification frames and the option width, and the numerical relationship between the vertical distance of the center point between each column of identification frames and the option height; cutting the image of the objective question region according to the segmentation coordinates to obtain multiple slice images, and superimposing the corresponding pixel points in the slice image according to the normalized correlation coefficient, and re-determining the option height and option width according to the superimposed image; obtaining the position of each question number in the objective question region to be recognized and the option position of each question number according to the recognition situation of the slice image and the re-determined option height and option width. The present application can completely obtain the information of all options and question numbers, reduce the detection loss caused by other detection methods, and avoid the fuzzy loss caused by the change of the objective question structure and the low printing quality of the test paper, which leads to the inability to recognize the objective question layout structure information, and the accuracy rate is more than 92%, which effectively reduces the labor cost.
[0155] Based on the same inventive concept, an intelligent identification device for objective question positions corresponding to the intelligent identification method for objective question positions is also provided in the embodiments of the present application. Since the principle of solving the problem by the device in the embodiments of the present application is similar to the intelligent identification method for objective question positions in the embodiments of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0156] Reference Figure 6 FIG. 1 is a schematic diagram of an intelligent device for identifying the position of an objective question provided by an embodiment of the present application. The intelligent device for identifying the position of an objective question includes:
[0157] An acquisition module 601 is used to acquire an identification frame of an objective question in an image of an objective question region to be identified;
[0158] A determination module 602 is used to determine the option height and option width of the objective question area to be identified according to the height values and width values of all identification boxes;
[0159] The determination module 602 is further used to determine the segmentation coordinates between all rows and columns according to the numerical relationship between the horizontal distance between the center points of each row of identification boxes and the width of the option, and the numerical relationship between the vertical distance between the center points of each column of identification boxes and the height of the option;
[0160] The superposition determination module 603 is used to cut the objective question area image according to the segmentation coordinates to obtain multiple slice images, and to superimpose corresponding pixel points in the slice images according to the normalized correlation coefficient, and to re-determine the option height and the option width according to the superimposed images;
[0161] The determination module 602 is further used to obtain the position of each question number and the option position of each question number in the objective question area to be identified according to the identification status of the slice image and the re-determined option height and option width.
[0162] In a possible implementation, the acquisition module 601 is specifically used to detect the objective question area to be identified through an edge detection algorithm to obtain a first edge recognition frame, merge the first edge recognition frames whose horizontal distance is less than a preset value to obtain a merged recognition frame; and detect the objective question area to be identified through a text recognition model to obtain a text recognition frame; detect the objective question area to be identified again through an edge detection algorithm based on the merged recognition frame to obtain a second edge recognition frame; merge the second edge recognition frame and the text recognition frame to obtain a recognition frame.
[0163] In a possible implementation, the acquisition module 601 is further configured to:
[0164] Determine a first edge recognition frame whose ratio of height value to width value is greater than a preset height-to-width ratio as a target edge recognition frame;
[0165] If there is a black first edge identification frame, the minimum horizontal distance between the black first edge identification frame and other first edge identification frames is determined as the target expansion distance; otherwise, the preset expansion distance is determined as the target expansion distance;
[0166] Calculating the distance between the target edge identification frame and the first adjacent edge identification frame, and determining the mode corresponding to the distance;
[0167] The left and right sides of the target edge recognition frame are laterally expanded by a pre-target extension distance, and the lateral distance between the target edge recognition frame and the adjacent first edge recognition frame is less than the majority;
[0168] The edge recognition frames with overlapping areas are merged to obtain a merged recognition frame.
[0169] In a possible implementation, the acquisition module 601 is further configured to:
[0170] Binarization is performed on the objective question area to be identified to increase the brightness of the pixels in the merged identification frame, thereby obtaining an image of the objective question area to be identified;
[0171] The image of the objective question area to be identified is detected again by using the edge detection algorithm to obtain the middle edge identification frame;
[0172] The middle edge identification frame whose width-to-height ratio is greater than the preset aspect ratio is segmented to obtain a second edge identification frame.
[0173] In a possible implementation, the acquisition module 601 is further configured to:
[0174] Performing vertical projection on the partial image corresponding to the middle edge recognition frame whose width to height ratio is greater than a preset aspect ratio to obtain a vertical projection image;
[0175] The position of the lowest pixel value in the vertical projection image is determined as the position to be segmented;
[0176] The middle edge recognition frame whose width-to-height ratio is greater than a preset aspect ratio is segmented based on the position to be segmented in the image of the objective question area to be identified, to obtain a second edge recognition frame.
[0177] In one possible implementation, the determination module 602 is specifically used to determine the split coordinates between all rows based on the numerical relationship between the horizontal distance between the center points of each row of identification boxes in the identification box and the option width; and to determine the split coordinates between all columns based on the numerical relationship between the vertical distance between the center points of each column of identification boxes in the identification box and the option height.
[0178] In a possible implementation, the determination module 602 is specifically used to calculate, for each identification box in each row, the horizontal distance between the center point of the identification box and other identification boxes in the row; determine whether the identification box is the first target identification box based on the difference between the horizontal distance of the center point corresponding to the identification box and the option width; and determine the minimum vertical coordinate among the vertical coordinates of all pixel points in all first target identification boxes in the row as the segmentation coordinate.
[0179] In a possible implementation, the determination module 602 is specifically used to calculate, for each identification box in each column, a longitudinal distance between the center points of the identification box and other identification boxes in the column; determine whether the identification box is a second target identification box based on a difference between the longitudinal distance of the center points corresponding to the identification box and the option height; and determine the maximum horizontal coordinate among the horizontal coordinates of all pixel points in all second target identification boxes in the column as the segmentation coordinate.
[0180] In a possible implementation, the overlay determination module 603 is specifically used to determine the pixels in other slice images that correspond to the pixels in the template image respectively through the normalized correlation coefficients between each pixel in the template image and each pixel in the i-th other slice image; the initial value of the template image is the first slice image; the initial value of i is 2; the pixel values of the corresponding pixels in the i-th other slice image and the template image are superimposed to obtain the latest template image; i=i+1, and jump to the step of continuing to execute through the normalized correlation coefficients between each pixel in the template image and each pixel in the i-th other slice image until the last slice image; and the final template image is determined as the superimposed image.
[0181] The embodiment of the present application provides an intelligent recognition device for the position of an objective question, including: an acquisition module 601, used to acquire an identification frame of an objective question in an image of an objective question area to be identified; a determination module 602, used to determine the option height and option width of the objective question area to be identified according to the height values and width values of all identification frames; the determination module 602 is also used to determine the segmentation coordinates between all rows and columns according to the numerical relationship between the horizontal distance between the center points of each row of identification frames and the option width, and the numerical relationship between the vertical distance between the center points of each column of identification frames and the option height; an overlay determination module 603, used to cut the image of the objective question area according to the segmentation coordinates to obtain multiple slice images, and overlay corresponding pixel points in the slice images according to the normalized correlation coefficient, and re-determine the option height and the option width according to the overlay image; the determination module 602 is also used to obtain the position of each question number and the option position of each question number in the objective question area to be identified according to the recognition status of the slice image and the re-determined option height and option width. This application can fully obtain information on all options and question numbers, reduce detection omissions caused by other detection methods, and avoid the inability to identify objective question layout structure information due to fuzzy omissions caused by changes in the objective question structure and low test paper printing quality. The accuracy rate is over 92%, effectively reducing labor costs.
[0182] like Figure 7 As shown, an electronic device 700 provided in an embodiment of the present application includes: a processor 701, a memory 702 and a bus, the memory 702 stores machine-readable instructions executable by the processor 701, when the electronic device is running, the processor 701 and the memory 702 communicate through the bus, the processor 701 executes the machine-readable instructions to perform the steps of the intelligent identification method of the objective question location as mentioned above.
[0183] Specifically, the memory 702 and the processor 701 can be general-purpose memories and processors, which are not specifically limited here. When the processor 701 runs the computer program stored in the memory 702, the intelligent identification method of the objective question location can be executed.
[0184] Corresponding to the above-mentioned intelligent identification method for the location of objective questions, an embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned intelligent identification method for the location of objective questions are executed.
[0185] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0186] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0187] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0188] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the information processing method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.
[0189] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. An intelligent method for identifying the position of an objective question, characterized in that: The method comprises: Obtaining an identification frame of the objective question in the image of the objective question area to be identified; Determine the option height and option width of the objective question area to be identified according to the height values and width values of all identification frames; Determine the splitting coordinates between all rows and columns according to the numerical relationship between the horizontal distance between the center points of each row of identification boxes and the width of the option, and the numerical relationship between the vertical distance between the center points of each column of identification boxes and the height of the option; The objective question area image is cut according to the segmentation coordinates to obtain a plurality of slice images, and corresponding pixel points in the slice images are superimposed according to the normalized correlation coefficient, and the option height and the option width are re-determined according to the superimposed images; According to the recognition status of the slice image and the re-determined option height and option width, the position of each question number and the option position of each question number in the objective question area to be recognized are obtained; The recognition frame is obtained by the following steps: detecting the objective question area to be recognized by an edge detection algorithm to obtain a first edge recognition frame, merging the first edge recognition frames whose horizontal distance is less than a preset value to obtain a merged recognition frame; detecting the objective question area to be recognized by a text recognition model to obtain a text recognition frame; detecting the objective question area to be recognized again by an edge detection algorithm according to the merged recognition frame to obtain a second edge recognition frame; merging the second edge recognition frame and the text recognition frame to obtain the recognition frame; The merging of first edge recognition frames whose lateral distance is less than a preset value to obtain a merged recognition frame includes: determining a first edge recognition frame whose ratio of height value to width value is greater than a preset aspect ratio as a target edge recognition frame; if there is a black first edge recognition frame, determining the minimum lateral distance between the black first edge recognition frame and other first edge recognition frames as a target expansion distance; otherwise, determining the preset expansion distance as the target expansion distance; calculating the distance between the target edge recognition frame and its adjacent first edge recognition frames, and determining the mode corresponding to the distance; horizontally expanding the left and right sides of the target edge recognition frame by the target expansion distance, wherein the lateral distance between the target edge recognition frame and the adjacent first edge recognition frame is less than the mode; merging edge recognition frames with overlapping areas to obtain the merged recognition frame; The step of detecting the objective question area to be identified again by an edge detection algorithm according to the merged identification frame to obtain a second edge identification frame includes: performing binarization processing on the objective question area to be identified to increase the brightness of the pixels in the merged identification frame to obtain an image of the objective question area to be identified; detecting the image of the objective question area to be identified again by an edge detection algorithm to obtain an intermediate edge identification frame; and segmenting the intermediate edge identification frame whose ratio of width to height is greater than a preset aspect ratio to obtain a second edge identification frame; The segmenting of the middle edge recognition frame whose width-to-height ratio is greater than the preset aspect ratio to obtain the second edge recognition frame includes: vertically projecting the local image corresponding to the middle edge recognition frame whose width-to-height ratio is greater than the preset aspect ratio to obtain the vertically projected image; determining the position of the lowest point of the pixel value in the vertically projected image as the position to be segmented; segmenting the middle edge recognition frame whose width-to-height ratio is greater than the preset aspect ratio based on the position to be segmented in the image of the objective question area to be identified to obtain the second edge recognition frame; The determining of the segmentation coordinates between all rows and columns according to the numerical relationship between the horizontal distance between the center points of each row of identification frames in the identification frame and the width of the option, and the numerical relationship between the vertical distance between the center points of each column of identification frames in the identification frame and the height of the option, comprises: determining the segmentation coordinates between all rows according to the numerical relationship between the horizontal distance between the center points of each row of identification frames in the identification frame and the width of the option; determining the segmentation coordinates between all columns according to the numerical relationship between the vertical distance between the center points of each column of identification frames in the identification frame and the height of the option; The determining of the segmentation coordinates between all rows according to the numerical relationship between the horizontal distance of the center points between the identification frames in each row of the identification frames and the width of the option includes: for each identification frame in each row, calculating the horizontal distance of the center points between the identification frame and other identification frames in the row; judging whether the identification frame is a first target identification frame according to the difference between the horizontal distance of the center points corresponding to the identification frame and the width of the option; and determining the smallest vertical coordinate among the vertical coordinates of all pixel points in all first target identification frames in the row as the segmentation coordinate; The method determines the segmentation coordinates between all columns according to the numerical relationship between the longitudinal distance of the center points between each column of identification frames in the identification frame and the height of the option, including: for each identification frame in each column, calculating the longitudinal distance of the center points between the identification frame and other identification frames in the column; judging whether the identification frame is a second target identification frame according to the difference between the longitudinal distance of the center points corresponding to the identification frame and the height of the option; and determining the maximum horizontal coordinate among the horizontal coordinates of all pixel points in all the second target identification frames in the column as the segmentation coordinate.
2. The intelligent identification method of objective question position according to claim 1, characterized in that: The step of superimposing corresponding pixel points in the slice image according to the normalized correlation coefficient includes: Determine the pixel points in the other slice images that correspond to the pixel points in the template image respectively by the normalized correlation coefficient between each pixel point in the template image and each pixel point in the i-th other slice image; the initial value of the template image is the first slice image; the initial value of i is 2; The pixel values of the corresponding pixels in the i-th other slice image and the template image are superimposed to obtain the latest template image; i=i+1, and jump to the step of continuing to execute through the normalized correlation coefficient of each pixel in the template image and each pixel in the i-th other slice image, until the last slice image; and the final template image is determined as the superimposed image.
3. An intelligent device for identifying the position of an objective question, characterized in that: The device comprises: An acquisition module, used to acquire an identification frame of an objective question in an image of an objective question region to be identified; A determination module, used to determine the option height and option width of the objective question area to be identified according to the height values and width values of all identification frames; The determination module is further used to determine the segmentation coordinates between all rows and columns according to the numerical relationship between the horizontal distance between the center points of each row of identification boxes and the width of the option, and the numerical relationship between the vertical distance between the center points of each column of identification boxes and the height of the option; A superposition determination module, used for cutting the objective question area image according to the segmentation coordinates to obtain a plurality of slice images, superimposing corresponding pixel points in the slice images according to the normalized correlation coefficient, and re-determining the option height and the option width according to the superimposed images; The determination module is further used to obtain the position of each question number and the option position of each question number in the objective question area to be identified according to the identification status of the slice image, the segmentation coordinates, and the re-determined option height and option width; The acquisition module is specifically used to detect the objective question area to be identified by an edge detection algorithm to obtain a first edge recognition frame, merge the first edge recognition frames whose horizontal distance is less than a preset value to obtain a merged recognition frame; detect the objective question area to be identified by a text recognition model to obtain a text recognition frame; detect the objective question area to be identified again by an edge detection algorithm according to the merged recognition frame to obtain a second edge recognition frame; merge the second edge recognition frame and the text recognition frame to obtain the recognition frame; The acquisition module is further used to: determine a first edge identification frame whose ratio of height value to width value is greater than a preset height-to-width ratio as a target edge identification frame; if there is a black first edge identification frame, determine the minimum horizontal distance between the black first edge identification frame and other first edge identification frames as the target expansion distance; otherwise, determine the preset expansion distance as the target expansion distance; calculate the distance between the target edge identification frame and its adjacent first edge identification frames, and determine the mode corresponding to the distance; horizontally expand the left and right sides of the target edge identification frame by the target expansion distance, and the horizontal distance between the target edge identification frame and the adjacent first edge identification frame is less than the mode; merge the edge identification frames with overlapping areas to obtain the merged identification frame; The acquisition module is further used to: perform binarization processing on the objective question area to be identified to increase the brightness of the pixels in the combined identification frame to obtain an image of the objective question area to be identified; perform detection on the image of the objective question area to be identified again by an edge detection algorithm to obtain an intermediate edge identification frame; and segment the intermediate edge identification frame whose width-to-height ratio is greater than a preset aspect ratio to obtain a second edge identification frame; The acquisition module is further used to: vertically project the local image corresponding to the middle edge recognition frame whose ratio of width to height is greater than the preset aspect ratio to obtain a vertical projection image; determine the position of the lowest point of the pixel value in the vertical projection image as the position to be segmented; and segment the middle edge recognition frame whose ratio of width to height is greater than the preset aspect ratio based on the position to be segmented in the image of the objective question area to be identified to obtain a second edge recognition frame; The determination module is specifically used to determine the segmentation coordinates between all rows according to the numerical relationship between the horizontal distance between the center points of each row of identification frames in the identification frame and the width of the option; and to determine the segmentation coordinates between all columns according to the numerical relationship between the vertical distance between the center points of each column of identification frames in the identification frame and the height of the option; The determination module is specifically configured to calculate, for each recognition frame in each row, a horizontal distance between the center points of the recognition frame and other recognition frames in the row; determine whether the recognition frame is a first target recognition frame according to a difference between the horizontal distance between the center points of the recognition frame and the option width; and determine the smallest vertical coordinate among the vertical coordinates of all pixel points in all first target recognition frames in the row as a segmentation coordinate; The determination module is specifically used to calculate, for each identification box in each column, a longitudinal distance between the center points of the identification box and other identification boxes in the column; determine whether the identification box is a second target identification box based on a difference between the longitudinal distance of the center points corresponding to the identification box and the option height; and determine the maximum horizontal coordinate among the horizontal coordinates of all pixel points in all second target identification boxes in the column as the segmentation coordinate.
4. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the method for intelligently identifying the location of an objective question as described in claim 1 or 2.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the intelligent identification method of the objective question position as claimed in claim 1 or 2 are executed.
