Children's picture book image recognition method, device, equipment and storage medium
By performing grayscale processing and feature matching on images taken from picture books, the problem of slow running speed of the neural network algorithm is solved, faster image recognition is achieved, and the user experience is improved.
Patent Information
- Application Number
- CN202011345248.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-25
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2040-11-25
AI Technical Summary
Neural network algorithms occupy a large amount of resources in image recognition, which prolongs the calculation time and affects the user experience.
By receiving images taken from picture books and performing grayscale processing, image features are extracted, and feature matching is performed in the preset standard page database to generate comparison results and mark standard images to achieve rapid image recognition.
It improves the speed of image recognition, reduces the usage of computing resources, and improves the user experience.
Smart Images

Figure CN112487929B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image recognition, and in particular to a method, device, equipment and storage medium for children's picture book image recognition. Background Art
[0002] There are many picture book recognition algorithms on the market, with various artificial intelligence algorithms, and their applicability in different scenarios and application ranges is also different. For neural network algorithms, although the recognition accuracy of neural network algorithms is very high, neural network algorithms occupy more resources. In many cases, due to the large model of the neural network, the calculation time is prolonged and the program response time is long. If the computer calculation response time is too long, it will lead to a poor user experience, and in order to improve the user experience. When the amount of calculation is certain, the calculation rate needs to be increased, so a faster method than the existing image recognition is needed. Summary of the invention
[0003] The main purpose of the present invention is to solve the technical problem that the neural network recognition algorithm runs slowly.
[0004] A first aspect of the present invention provides an image recognition method for children's picture books, the image recognition method for children's picture books comprising:
[0005] Receiving a picture book captured image sent from a preset data collection address, and performing grayscale processing on the picture book captured image to obtain a picture book grayscale image;
[0006] Extracting image features of the picture book grayscale image, and performing feature matching processing in a preset standard page database according to the image features to obtain a page standard image corresponding to the picture book grayscale image;
[0007] Extracting answer box data from the grayscale image of the picture book according to the image features, comparing the answer box data with the standard image of the page, and generating a comparison result;
[0008] According to the comparison result, the answer box in the standard image of the page is marked to generate a marked standard image;
[0009] The marked standard image is sent to the data collection address.
[0010] Optionally, in a first implementation manner of the first aspect of the present invention, extracting image features of the picture book grayscale image, and performing feature matching processing in a preset standard page database according to the image features to obtain a page standard image corresponding to the picture book grayscale image includes:
[0011] According to a preset marking radius parameter, grab N pairs of phase pixel points corresponding to each pixel point in the grayscale image of the picture book on the marking radius parameter, where N is a positive integer;
[0012] Reading the grayscale values corresponding to the N pairs of phase pixel points, and obtaining a set of contour pixel points in the grayscale image of the picture book based on the difference between the N pairs of grayscale values;
[0013] The outline pixel point set is analyzed to obtain pixel arrangement features, and a page standard image corresponding to the pixel arrangement features is captured from a preset standard page database according to a preset feature matching algorithm.
[0014] Optionally, in a second implementation of the first aspect of the present invention, the reading the grayscale values corresponding to the N pairs of phase pixel points, and obtaining the contour pixel point set in the grayscale image of the picture book based on the difference between the N pairs of grayscale values includes:
[0015] Reading the grayscale values corresponding to the N pairs of phase pixel points, calculating the differences between the N pairs of grayscale values, and obtaining N grayscale differences;
[0016] Counting the number of the N grayscale differences that exceed a preset difference determination threshold to obtain a difference value;
[0017] Determine whether the difference value exceeds a preset marking threshold;
[0018] If it exceeds, mark the pixel point corresponding to the difference value, and cyclically determine each pixel point in the grayscale image of the picture book;
[0019] Combine all marked pixels to get the contour pixel set.
[0020] Optionally, in a third implementation of the first aspect of the present invention, analyzing the contour pixel point set to obtain a pixel arrangement feature includes:
[0021] Generate a circumscribed circle corresponding to the contour pixel point set according to the longest diameter measurement, wherein the circumscribed circle has a corresponding center P;
[0022] Performing contour connection processing on the contour pixel point set to generate a minimum connection graph, and calculating a uniform centroid T corresponding to the minimum connection graph according to the minimum connection graph;
[0023] Determining a transformation angle of the contour pixel point set according to the circle center P and the uniform mass center T;
[0024] According to the transformation angle and a preset feature extraction algorithm, feature extraction is performed on the contour pixel point set to obtain the pixel arrangement feature.
[0025] Optionally, in a fourth implementation of the first aspect of the present invention, the extracting features of the contour pixel point set according to the transformation angle and a preset feature extraction algorithm to obtain the pixel arrangement feature includes:
[0026] According to the transformation angle, the contour pixel point set is subjected to rotation restoration processing to obtain a basic contour pixel point set;
[0027] According to the preset image capture framework, M pairs of pixel analysis points are selected in the basic contour pixel point set, and the gray value size relationship of each pixel analysis point is determined in turn;
[0028] The pixel arrangement feature is generated according to the magnitude relationship of the grayscale value corresponding to each pixel point.
[0029] Optionally, in a fifth implementation of the first aspect of the present invention, extracting answer box data in the grayscale image of the picture book according to the image features, comparing the answer box data with the page standard image, and generating a comparison result includes:
[0030] According to the image features, the pixel features in the positioning frame corresponding to the grayscale image of the picture book are captured to generate answer frame data;
[0031] Each answer box data is compared and analyzed with the answer box corresponding to the standard image of the page in turn to generate a result string.
[0032] Optionally, in a sixth implementation of the first aspect of the present invention, marking the answer box in the standard image of the page according to the comparison result to generate the marked standard image includes:
[0033] Reading characters in the result string to determine whether the characters correspond to successful comparison results;
[0034] If yes, then mark the answer box in the standard image of the page corresponding to the character as a first type of character box;
[0035] If not, the character is marked as a second type of character box in the answer box in the standard image of the page corresponding to the character;
[0036] According to the markings of the first category of character boxes and the second category of character boxes, the answer boxes in the standard image of the page are classified and marked to generate a marked standard image.
[0037] A second aspect of the present invention provides an image recognition device for children's picture books, comprising:
[0038] A receiving module, used for receiving a picture book captured image sent by a preset data collection address, and performing grayscale processing on the picture book captured image to obtain a picture book grayscale image;
[0039] A matching module, used for extracting image features of the picture book grayscale image, and performing feature matching processing in a preset standard page database according to the image features to obtain a page standard image corresponding to the picture book grayscale image;
[0040] An extraction module, used to extract the answer box data in the grayscale image of the picture book according to the image features, compare the answer box data with the page standard image, and generate a comparison result;
[0041] A marking module, used for marking the answer box in the page standard image according to the comparison result to generate a marked standard image;
[0042] A sending module is used to send the marked standard image to the data collection address.
[0043] A third aspect of the present invention provides an image recognition device for children's picture books, comprising: a memory and at least one processor, wherein instructions are stored in the memory, and the memory and the at least one processor are interconnected via lines; the at least one processor calls the instructions in the memory so that the image recognition device for children's picture books executes the above-mentioned image recognition method for children's picture books.
[0044] A fourth aspect of the present invention provides a computer-readable storage medium, in which instructions are stored, and when the computer-readable storage medium is run on a computer, the computer executes the above-mentioned children's picture book image recognition method. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 It is a schematic diagram of a first embodiment of the method for image recognition of children's picture books in an embodiment of the present invention;
[0046] Figure 2 Schematic diagram of a second embodiment of the method for image recognition of children's picture books in an embodiment of the present invention;
[0047] Figure 3 Schematic diagram of a third embodiment of the method for image recognition of children's picture books in an embodiment of the present invention;
[0048] Figure 4 A schematic diagram of an embodiment of an image recognition device for children's picture books according to an embodiment of the present invention;
[0049] Figure 5 It is a schematic diagram of another embodiment of the image recognition device for children's picture books in an embodiment of the present invention;
[0050] Figure 6 Schematic diagram of an embodiment of a device for image recognition of children's picture books in an embodiment of the present invention. DETAILED DESCRIPTION
[0051] Embodiments of the present invention provide a method, device, equipment and storage medium for children's picture book image recognition.
[0052] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0053] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 The first embodiment of the image recognition method for children's picture books in the embodiment of the present invention includes:
[0054] 101. Receive a picture book captured image sent from a preset data collection address, and perform grayscale processing on the picture book captured image to obtain a picture book grayscale image;
[0055] In this embodiment, the picture book image is an actual photographed image, and the color of the image is changed to R=G=B, where R is a red pixel, G is a green pixel, and B is a blue pixel. After grayscale processing, a picture book grayscale image is obtained. The following types of processing are all based on the picture book grayscale image.
[0056] 102. Extract image features of the grayscale image of the picture book, and perform feature matching processing in a preset standard page database according to the image features to obtain a page standard image corresponding to the grayscale image of the picture book;
[0057] In this embodiment, a pixel point is compared with the surrounding pixels with a distance R. There are 16 pixels around the pixel point, and the pixels on the diagonal line are taken as a pair, for a total of 8 pairs of pixels. When the absolute value of the difference between the grayscale values of the two points is greater than the threshold t, the two points are considered to be different. When the number of 8 pairs of pixels greater than the threshold t is 5 pairs, it is considered to be a contour point. After all the contour points in the grayscale image of the picture book are queried, all contour points are extracted and combined into a contour map. With the key point P as the center of the circle and d as the radius of the circle, a feature matching radius is generated, and the contour points are connected to generate a closed figure. Among them, M 00 、M01 、M 10 It is a statistical calculation of all coordinates of a closed figure. QX and QY are the coordinates of the centroid of the closed figure. A coordinate system is established with P and Q as axes to extract graphic features. Four pairs of points of a fixed frame are selected, P1(A, B), P2(A, B), P3(A, B), and P4(A, B) to judge the grayscale between two points at different corresponding locations. If the grayscale of A is greater than the grayscale of B, the feature is determined to be 1. If the grayscale of A is less than or equal to the grayscale of B, the feature is determined to be 0. The sizes of P1(A, B), P2(A, B), P3(A, B), and P4(A, B) are judged in turn, and finally an image feature of 0011 is obtained. In fact, the frame points can be obtained up to N. After the features are obtained, the feature character string is arranged and matched with the standard image pre-taken in the standard page database, and the page standard image with the correct string match is marked.
[0058] 103. Extract the answer box data in the grayscale image of the picture book according to the image features, compare the answer box data with the page standard image, and generate a comparison result;
[0059] In this embodiment, the feature area pre-determined in the grayscale image is also used to compare the string features of the data in the answer box in an overall matching manner to generate two results: matching and mismatching.
[0060] 104. According to the comparison result, the answer box in the standard image of the page is marked to generate a marked standard image;
[0061] In this embodiment, the matching and non-matching frames in each frame of the page standard image are marked with different marks. When marking, it can be displayed according to a preset label sequence, or the marked content can be displayed in a limited display range operated by a human, and the unconfirmed marked range is not marked.
[0062] 105. Send the marked standard image to the data collection address.
[0063] In this embodiment, the standard image with the correct and incorrect answers marked is sent to the mobile phone terminal, or to the IP address where the captured image of the picture book is sent.
[0064] In an embodiment of the present invention, the grayscale value data of pixels around each pixel is calculated to obtain the pixel extraction feature value of the contour, and the error caused by rotation is eliminated based on the center of mass of the contour and the minimum inscribed circle to complete page matching in the standard database, thereby achieving faster image recognition.
[0065] See also Figure 2 The second embodiment of the image recognition method of children's picture books in the embodiment of the present invention includes:
[0066] 201. Receive a picture book captured image sent from a preset data collection address, and perform grayscale processing on the picture book captured image to obtain a picture book grayscale image;
[0067] The method embodiment described in this embodiment is similar to the first embodiment. You can refer to the corresponding process in the aforementioned method embodiment, which will not be described again.
[0068] 202. According to a preset marking radius parameter, capture N pairs of phase pixel points corresponding to each pixel point in the grayscale image of the picture book on the marking radius parameter, where N is a positive integer;
[0069] In this embodiment, the marking radius parameter is 2.5 pixels in length. Therefore, for each pixel in the grayscale image of the picture book, all pixels on a circle with a length of 2.5 pixels form a 1-to-1 diagonal correspondence, and there are N pairs of pixels in total.
[0070] 203. Read the grayscale values corresponding to N pairs of phase pixel points, calculate the differences between the N pairs of grayscale values, and obtain N grayscale differences;
[0071] In this embodiment, the grayscale values between the three pairs of pixels corresponding to the diagonal lines are (12, 112), (50, 150), and (41, 201), and the pixel difference values of these three pairs are 100, 100, and 160. Similarly, the difference between N pairs of grayscale values can be calculated to obtain N grayscale difference values.
[0072] 204. Count the number of N grayscale differences that exceed a preset difference determination threshold to obtain a difference value;
[0073] In this embodiment, the exceeding judgment threshold among 100, 100, and 160 is 140, and exceeding the judgment threshold is recorded as 1, and not exceeding is recorded as 0, so 2 exceeding judgment thresholds are obtained.
[0074] 205. Determine whether the difference value exceeds a preset marking threshold;
[0075] In this embodiment, the marking threshold is 1, and if it is 2, it exceeds the marking threshold. In practice, if N is 1200, it is judged that the difference determination threshold is exceeded by 900, and the marking threshold is 690, which still exceeds the marking threshold.
[0076] 206. If it exceeds, mark the pixel corresponding to the difference value, and cyclically determine each pixel in the grayscale image of the picture book;
[0077] In this embodiment, if the marking threshold value 690 is exceeded, the pixel point is determined to be a component of a contour point, and all contour points of all grayscale images are acquired cyclically.
[0078] 207. Combine all marked pixels to obtain a contour pixel set;
[0079] In this embodiment, the marked pixel points in the picture book grayscale image all constitute a contour pixel point set, and the contour of the entire picture book grayscale image is extracted.
[0080] 208. Generate a circumscribed circle corresponding to the contour pixel point set according to the longest diameter measurement, wherein the circumscribed circle has a corresponding center P;
[0081] In this embodiment, the distances between all the pixels of the contour pixel point set can be calculated to obtain the longest distance, and the circumscribed circle of the contour pixel point set is generated according to the longest distance.
[0082] 209. Perform contour connection processing on the contour pixel point set to generate a minimum connection graph, and calculate the uniform centroid T corresponding to the minimum connection graph according to the minimum connection graph;
[0083] In this embodiment, the contour points are connected to each other to form a closed cluster, and a minimum connection graph is calculated. Among them, M00, M01, and M10 are the statistical calculations of all coordinates of the closed figure, QX and QY are the coordinates of the centroid of the closed figure, and a coordinate system is established with P and Q as axes to calculate the uniform centroid T.
[0084] 210. Determine the transformation angle of the contour pixel point set according to the circle center P and the uniform mass center T;
[0085] In this embodiment, a transformation angle line is obtained by connecting the circle center P and the uniform mass center T. The transformation angle line is compared with the reference line of the standard page to obtain the transformation angle of the contour pixel point set.
[0086] 211. Performing rotation and restoration processing on the contour pixel point set according to the transformation angle to obtain a basic contour pixel point set;
[0087] In this embodiment, the transformation angle is 50 degrees clockwise, and then restored to 50 degrees counterclockwise to obtain a basic contour pixel point set.
[0088] 212. According to the preset image capture framework, select M pairs of pixel analysis points from the basic contour pixel point set, and determine the gray value size relationship of each pixel analysis point in turn;
[0089] In this embodiment, the image capture framework is a capture relationship, and four pairs of points of a fixed frame are captured in each specified range of the image. P1 (A, B), P2 (A, B), P3 (A, B), and P4 (A, B) judge the grayscale size between two points in different corresponding locations. If the grayscale of A is greater than the grayscale of B, the feature is determined to be 1. If the grayscale of A is less than or equal to the grayscale of B, the feature is determined to be 0, and the sizes of P1 (A, B), P2 (A, B), P3 (A, B), and P4 (A, B) are judged in turn.
[0090] 213. Generate pixel arrangement features according to the gray value size relationship corresponding to each pixel point;
[0091] In this embodiment, the sizes of P1 (A, B), P2 (A, B), P3 (A, B), and P4 (A, B) obtain the image feature of 0011. In fact, the frame points can be obtained up to N. After the features are obtained, the feature character string arrangement is matched with the standard image pre-taken in the standard page database, and the character string is matched with the correct page standard image mark.
[0092] 214. According to a preset feature matching algorithm, a page standard image corresponding to the pixel arrangement feature is captured from a preset standard page database;
[0093] 215. Extract the answer box data in the grayscale image of the picture book according to the image features, compare the answer box data with the page standard image, and generate a comparison result;
[0094] 216. According to the comparison result, the answer box in the page standard image is marked to generate a marked standard image;
[0095] 217. Send the marked standard image to the data collection address.
[0096] The method embodiments described in 214-217 are similar to the first embodiment. You can refer to the corresponding processes in the aforementioned method embodiments and will not repeat them here.
[0097] In an embodiment of the present invention, the grayscale value data of pixels around each pixel is calculated to obtain the pixel extraction feature value of the contour, and the error caused by rotation is eliminated based on the center of mass of the contour and the minimum inscribed circle to complete page matching in the standard database, thereby achieving faster image recognition.
[0098] See also Figure 3 The second embodiment of the image recognition method of children's picture books in the embodiment of the present invention includes:
[0099] 301. Receive a picture book captured image sent from a preset data collection address, and perform grayscale processing on the picture book captured image to obtain a picture book grayscale image;
[0100] 302. Extract image features of the grayscale image of the picture book, and perform feature matching processing in a preset standard page database according to the image features to obtain a page standard image corresponding to the grayscale image of the picture book;
[0101] The method embodiment described in 301-302 is similar to the first embodiment. You can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0102] 303. According to the image features, the pixel features in the positioning frame corresponding to the grayscale image of the picture book are captured to generate answer frame data;
[0103] In this embodiment, the position of the answer box is pre-existing, so the answer box data corresponding to the image features are directly extracted according to the predetermined position.
[0104] 304. Compare and analyze each answer box data with the answer box corresponding to the standard image of the page in turn to generate a result string;
[0105] In this embodiment, there are 8 answer boxes in total. After comparing them in sequence, the results of {correct, correct, wrong, wrong, correct, correct, correct, wrong, correct} are obtained. Correct corresponds to 1 and wrong corresponds to 0. The generated result string is 11001101.
[0106] 305. Read the characters in the result string and determine whether the characters correspond to the successful comparison result;
[0107] In this embodiment, the 11001101 character string is used to read the content sequentially.
[0108] 306. If yes, mark the answer box in the standard image of the page corresponding to the character as a first type of character box;
[0109] In this embodiment, the fifth character string is 1, and the fifth numbered answer box is marked as a first-category character box.
[0110] 307. If not, mark the answer box in the standard image of the page corresponding to the character as a second type of character box;
[0111] In this embodiment, the fourth character string is 0, and the fourth numbered answer box is marked as a second-type character box.
[0112] 308. Classify and mark the answer boxes in the page standard image according to the marks of the first type of character boxes and the second type of character boxes, and generate a marked standard image;
[0113] In this embodiment, after the string 11001101 is read, all character boxes are marked, and the first type of character boxes are marked as green boxes and the second type of character boxes are marked as red boxes, to generate a marking standard image. Alternatively, only the first type of character boxes can be marked as green ticks, and the second type of character boxes are not processed.
[0114] 309. Send the marked standard image to the data collection address.
[0115] The method embodiment described in this embodiment is similar to the first embodiment. You can refer to the corresponding process in the aforementioned method embodiment, which will not be described again.
[0116] In an embodiment of the present invention, the grayscale value data of pixels around each pixel is calculated to obtain the pixel extraction feature value of the contour, and the error caused by rotation is eliminated based on the center of mass of the contour and the minimum inscribed circle to complete page matching in the standard database, thereby achieving faster image recognition.
[0117] The above describes the image recognition method of the children's picture book in the embodiment of the present invention. The following describes the image recognition device of the children's picture book in the embodiment of the present invention. Figure 4 , an embodiment of the image recognition device for children's picture books in an embodiment of the present invention includes:
[0118] The receiving module 401 is used to receive the picture book captured image sent by the preset data collection address, and grayscale the picture book captured image to obtain a picture book grayscale image;
[0119] A matching module 402 is used to extract image features of the picture book grayscale image, and perform feature matching processing in a preset standard page database according to the image features to obtain a page standard image corresponding to the picture book grayscale image;
[0120] The extraction module 403 is used to extract the answer box data in the grayscale image of the picture book according to the image features, compare the answer box data with the page standard image, and generate a comparison result;
[0121] A marking module 404 is used to mark the answer box in the page standard image according to the comparison result to generate a marked standard image;
[0122] The sending module 405 is used to send the marked standard image to the data collection address.
[0123] In an embodiment of the present invention, the grayscale value data of pixels around each pixel is calculated to obtain the pixel extraction feature value of the contour, and the error caused by rotation is eliminated based on the center of mass of the contour and the minimum inscribed circle to complete page matching in the standard database, thereby achieving faster image recognition.
[0124] See also Figure 5 Another embodiment of the image recognition device for children's picture books in the embodiment of the present invention includes:
[0125] The receiving module 401 is used to receive the picture book captured image sent by the preset data collection address, and grayscale the picture book captured image to obtain a picture book grayscale image;
[0126] A matching module 402 is used to extract image features of the picture book grayscale image, and perform feature matching processing in a preset standard page database according to the image features to obtain a page standard image corresponding to the picture book grayscale image;
[0127] The extraction module 403 is used to extract the answer box data in the grayscale image of the picture book according to the image features, compare the answer box data with the page standard image, and generate a comparison result;
[0128] A marking module 404 is used to mark the answer box in the page standard image according to the comparison result to generate a marked standard image;
[0129] The sending module 405 is used to send the marked standard image to the data collection address.
[0130] Wherein, the receiving module 402 includes:
[0131] The capture unit 4021 is used to capture N pairs of phase pixel points corresponding to each pixel point in the grayscale image of the picture book on the preset marking radius parameter, wherein N is a positive integer;
[0132] The difference analysis unit 4022 is used to read the grayscale values corresponding to the N pairs of phase pixel points, and obtain the contour pixel point set in the grayscale image of the picture book based on the difference between the N pairs of grayscale values;
[0133] The matching unit 4023 is used to analyze the outline pixel point set to obtain pixel arrangement features, and to capture a page standard image corresponding to the pixel arrangement features from a preset standard page database according to a preset feature matching algorithm.
[0134] The difference analysis unit 4022 is specifically used for:
[0135] Reading the grayscale values corresponding to the N pairs of phase pixel points, calculating the differences between the N pairs of grayscale values, and obtaining N grayscale differences;
[0136] Counting the number of the N grayscale differences that exceed a preset difference determination threshold to obtain a difference value;
[0137] Determine whether the difference value exceeds a preset marking threshold;
[0138] If it exceeds, mark the pixel point corresponding to the difference value, and cyclically determine each pixel point in the grayscale image of the picture book;
[0139] Combine all marked pixels to get the contour pixel set.
[0140] The matching unit 4023 is specifically used for:
[0141] Generate a circumscribed circle corresponding to the contour pixel point set according to the longest diameter measurement, wherein the circumscribed circle has a corresponding center P;
[0142] Performing contour connection processing on the contour pixel point set to generate a minimum connection graph, and calculating a uniform centroid T corresponding to the minimum connection graph according to the minimum connection graph;
[0143] Determining a transformation angle of the contour pixel point set according to the circle center P and the uniform mass center T;
[0144] According to the transformation angle and a preset feature extraction algorithm, feature extraction is performed on the contour pixel point set to obtain the pixel arrangement feature.
[0145] The matching unit 4023 may also be specifically used for:
[0146] According to the transformation angle, the contour pixel point set is subjected to rotation restoration processing to obtain a basic contour pixel point set;
[0147] According to the preset image capture framework, M pairs of pixel analysis points are selected in the basic contour pixel point set, and the gray value size relationship of each pixel analysis point is determined in turn;
[0148] The pixel arrangement feature is generated according to the magnitude relationship of the grayscale value corresponding to each pixel point.
[0149] The extraction module 403 is specifically used for:
[0150] According to the image features, the pixel features in the positioning frame corresponding to the grayscale image of the picture book are captured to generate answer frame data;
[0151] Each answer box data is compared and analyzed with the answer box corresponding to the standard image of the page in turn to generate a result string.
[0152] The marking module 404 is specifically used for:
[0153] Reading characters in the result string to determine whether the characters correspond to successful comparison results;
[0154] If yes, then mark the answer box in the standard image of the page corresponding to the character as a first type of character box;
[0155] If not, the character is marked as a second type of character box in the answer box in the standard image of the page corresponding to the character;
[0156] According to the markings of the first category of character boxes and the second category of character boxes, the answer boxes in the standard image of the page are classified and marked to generate a marked standard image.
[0157] In an embodiment of the present invention, the grayscale value data of pixels around each pixel is calculated to obtain the pixel extraction feature value of the contour, and the error caused by rotation is eliminated based on the center of mass of the contour and the minimum inscribed circle to complete page matching in the standard database, thereby achieving faster image recognition.
[0158] above Figure 4 and Figure 5 The image recognition device for children's picture books in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The image recognition device for children's picture books in the embodiment of the present invention is described in detail from the perspective of hardware processing.
[0159] Figure 6 6 is a schematic diagram of the structure of an image recognition device for children's picture books provided in an embodiment of the present invention. The image recognition device 600 for children's picture books may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 610 (for example, one or more processors) and a memory 620, and one or more storage media 630 (for example, one or more mass storage devices) storing application programs 533 or data 632. Among them, the memory 620 and the storage medium 630 can be short-term storage or permanent storage. The program stored in the storage medium 630 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the image recognition device 600 for children's picture books. Furthermore, the processor 610 may be configured to communicate with the storage medium 630 to execute a series of instruction operations in the storage medium 630 on the image recognition device 600 for children's picture books.
[0160] The image recognition device based on children's picture books 600 may also include one or more power supplies 640, one or more wired or wireless network interfaces 650, one or more input and output interfaces 660, and / or one or more operating systems 631, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. It will be appreciated by those skilled in the art that Figure 6The structure of the children's picture book image recognition device shown does not constitute a limitation on the children's picture book-based image recognition device, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0161] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the children's picture book image recognition method.
[0162] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, device, or unit can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.
[0163] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or 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, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0164] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for image recognition of children's picture books, characterized in that: Includes steps: Receiving a picture book captured image sent from a preset data collection address, and performing grayscale processing on the picture book captured image to obtain a picture book grayscale image; Extracting image features of the picture book grayscale image, and performing feature matching processing in a preset standard page database according to the image features to obtain a page standard image corresponding to the picture book grayscale image; Extracting answer box data from the grayscale image of the picture book according to the image features, comparing the answer box data with the standard image of the page, and generating a comparison result; According to the comparison result, the answer box in the standard image of the page is marked to generate a marked standard image; Sending the marked standard image to the data collection address; The step of extracting image features of the picture book grayscale image and performing feature matching processing in a preset standard page database according to the image features to obtain a page standard image corresponding to the picture book grayscale image includes: According to a preset marking radius parameter, grab N pairs of phase pixel points corresponding to each pixel point in the grayscale image of the picture book on the marking radius parameter, where N is a positive integer; Reading the grayscale values corresponding to the N pairs of phase pixel points, and obtaining a set of contour pixel points in the grayscale image of the picture book based on the difference between the N pairs of grayscale values; Analyze the outline pixel point set to obtain pixel arrangement features, and capture a page standard image corresponding to the pixel arrangement features from a preset standard page database according to a preset feature matching algorithm; The step of reading the grayscale values corresponding to the N pairs of phase pixels and obtaining the contour pixel set in the grayscale image of the picture book based on the difference between the N pairs of grayscale values includes: Reading the grayscale values corresponding to the N pairs of phase pixel points, calculating the differences between the N pairs of grayscale values, and obtaining N grayscale differences; Counting the number of the N grayscale differences that exceed a preset difference determination threshold to obtain a difference value; Determine whether the difference value exceeds a preset marking threshold; If it exceeds, mark the pixel point corresponding to the difference value, and cyclically determine each pixel point in the grayscale image of the picture book; Combine all marked pixels to obtain a set of contour pixels; The step of analyzing the contour pixel point set to obtain pixel arrangement features includes: Generate a circumscribed circle corresponding to the contour pixel point set according to the longest diameter measurement, wherein the circumscribed circle has a corresponding center P; Performing contour connection processing on the contour pixel point set to generate a minimum connection graph, and calculating a uniform centroid T corresponding to the minimum connection graph according to the minimum connection graph; Determining a transformation angle of the contour pixel point set according to the circle center P and the uniform mass center T; According to the transformation angle and a preset feature extraction algorithm, feature extraction is performed on the contour pixel point set to obtain the pixel arrangement feature.
2. The image recognition method for children's picture books according to claim 1, characterized in that: The extracting features of the contour pixel set according to the transformation angle and the preset feature extraction algorithm to obtain the pixel arrangement features comprises: According to the transformation angle, the contour pixel point set is subjected to rotation restoration processing to obtain a basic contour pixel point set; According to the preset image capture framework, M pairs of pixel analysis points are selected in the basic contour pixel point set, and the gray value size relationship of each pixel analysis point is determined in turn; The pixel arrangement feature is generated according to the magnitude relationship of the grayscale value corresponding to each pixel point.
3. The image recognition method for children's picture books according to claim 1, characterized in that: The extracting the answer box data in the grayscale image of the picture book according to the image features, comparing the answer box data with the page standard image, and generating a comparison result includes: According to the image features, the pixel features in the positioning frame corresponding to the grayscale image of the picture book are captured to generate answer frame data; Each answer box data is compared and analyzed with the answer box corresponding to the standard image of the page in turn to generate a result string.
4. The image recognition method for children's picture books according to claim 3, characterized in that: The step of marking the answer box in the standard image of the page according to the comparison result to generate the marked standard image comprises: Reading characters in the result string to determine whether the characters correspond to successful comparison results; If yes, then mark the answer box in the standard image of the page corresponding to the character as a first type of character box; If not, the character is marked as a second type of character box in the answer box in the standard image of the page corresponding to the character; According to the markings of the first category of character boxes and the second category of character boxes, the answer boxes in the standard image of the page are classified and marked to generate a marked standard image.
5. An image recognition device for children's picture books, characterized in that: The image recognition device for children's picture books comprises: A receiving module, used for receiving a picture book captured image sent by a preset data collection address, and performing grayscale processing on the picture book captured image to obtain a picture book grayscale image; A matching module, used for extracting image features of the picture book grayscale image, and performing feature matching processing in a preset standard page database according to the image features to obtain a page standard image corresponding to the picture book grayscale image; An extraction module, used to extract the answer box data in the grayscale image of the picture book according to the image features, compare the answer box data with the page standard image, and generate a comparison result; A marking module, used for marking the answer box in the page standard image according to the comparison result to generate a marked standard image; A sending module, used for sending the marked standard image to the data collection address; Wherein, the receiving module comprises: A capture unit, used for the difference analysis unit, is used to capture N pairs of phase pixel points corresponding to each pixel point in the grayscale image of the picture book on the marker radius parameter according to a preset marker radius parameter, wherein N is a positive integer; A difference analysis unit, configured to read the grayscale values corresponding to the N pairs of phase pixel points, and obtain a set of contour pixel points in the grayscale image of the picture book based on the differences between the N pairs of grayscale values; A matching unit, configured to analyze the outline pixel point set to obtain a pixel arrangement feature, and to capture a page standard image corresponding to the pixel arrangement feature from a preset standard page database according to a preset feature matching algorithm; Wherein, the difference analysis unit is further specifically used for: Reading the grayscale values corresponding to the N pairs of phase pixel points, calculating the differences between the N pairs of grayscale values, and obtaining N grayscale differences; Counting the number of the N grayscale differences that exceed a preset difference determination threshold to obtain a difference value; Determine whether the difference value exceeds a preset marking threshold; If it exceeds, mark the pixel point corresponding to the difference value, and cyclically determine each pixel point in the grayscale image of the picture book; Combine all marked pixels to obtain a set of contour pixels; Wherein, the matching unit is further specifically used for: Generate a circumscribed circle corresponding to the contour pixel point set according to the longest diameter measurement, wherein the circumscribed circle has a corresponding center P; Performing contour connection processing on the contour pixel point set to generate a minimum connection graph, and calculating a uniform centroid T corresponding to the minimum connection graph according to the minimum connection graph; Determining a transformation angle of the contour pixel point set according to the circle center P and the uniform mass center T; According to the transformation angle and a preset feature extraction algorithm, feature extraction is performed on the contour pixel point set to obtain the pixel arrangement feature.
6. An image recognition device for children's picture books, characterized in that: The image recognition device for children's picture books comprises: a memory and at least one processor, the memory stores instructions, and the memory and the at least one processor are interconnected via a line; The at least one processor calls the instructions in the memory so that the image recognition device for children's picture books executes the image recognition method for children's picture books according to any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the image recognition method for children's picture books according to any one of claims 1 to 4 is implemented.
