Learning accompanying method, device, robot and medium based on text corner detection

By performing information fusion of brightness and contrast adjustment, edge detection and depth detection in the learning accompanying scene, combined with geometric constraint adjustment, the problems of low accuracy and high cost of corner point detection in the existing technology are solved, and the control of student homework texts is realized. Accurate and economical detection of locations.

CN117745826BActive Publication Date: 2024-09-06WUHAN SIMSHINE INTELLIGENT TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202311775598.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-21
Publication Date
2024-09-06
Estimated Expiration
2043-12-21

AI Technical Summary

Technical Problem

In the existing technology, the accuracy of detecting the corner positions around the student's homework text is low and the cost is high, making it difficult to achieve low-cost and accurate corner detection in the learning accompanying scene.

Method used

A method based on text corner detection is adopted to adjust brightness and contrast by obtaining real-time video data, use structured forest algorithm for edge detection, and combine it with monocular depth detection for information fusion, and perform geometric constraint adjustment to determine the vertex position of the work text. .

Benefits of technology

It improves the accuracy and reliability of the text position of students' homework, reduces the detection cost, simulates the human eye perception mechanism, enhances the visual quality of the image, effectively extracts edge information, eliminates background interference, and improves the accuracy of vertex positions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117745826B
    Figure CN117745826B
Patent Text Reader

Abstract

The present invention relates to the field of learning accompaniment technology, solves the problems of low accuracy and high cost in detecting the corner points around homework text in the prior art, and provides a learning accompaniment method, device, robot and medium based on text corner point detection. The method comprises: acquiring multiple frames of images in a student learning accompaniment scene; adjusting the brightness and contrast of each of the images, and outputting a target image; using a structured forest algorithm to perform edge detection on the target image, and outputting an edge detection image; performing monocular depth detection on the target image, and outputting a monocular depth image; performing information fusion on the edge detection image and the monocular depth image, and outputting a preliminary vertex position; performing geometric constraint adjustment on the preliminary vertex position, and outputting the target vertex position as the vertex position of the student homework text. The present invention improves the accuracy and reliability of detection and positioning of student homework texts, and reduces detection costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of learning and accompanying technology, and in particular to a learning and accompanying method, device, robot and medium based on text corner point detection. Background Art

[0002] In real-life learning accompaniment, student assignments usually have four vertices. By accurately detecting the four vertices of student assignments, several important functions can be achieved: for example, first, in terms of assignment edge cropping, by obtaining the precise edge range, accurate cropping of the assignment area is achieved, which provides accurate input for subsequent image processing and analysis; second, in terms of automatic document recognition, detecting the four vertices of the assignment can automatically identify the area of ​​the document, which is particularly critical when processing a large number of student assignments and can improve processing efficiency; in addition, the image correction function can correct the angle and tilt of the assignment by detecting the four vertices, so that the assignment image is on a standard plane, which is easier to process and analyze later; in terms of improving compatibility, students use different devices to shoot or scan assignments. By detecting the four vertices, it is more compatible and can adapt to assignment images of different formats and angles; finally, accurately detecting the four vertices of the assignment rectangle helps reduce errors caused by inaccurate interception or image distortion, which is crucial for subsequent assignment evaluation and processing. Overall, the process of detecting the vertices of student assignments improves the accuracy and efficiency of automated processing, making it more convenient for students to submit assignments, and providing a reliable basis for academic evaluation and data analysis. At present, the detection of the four vertices of student assignments mainly relies on computer vision and image processing technology. Common methods include edge detection algorithms, corner detection algorithms, Hough transform, deep learning methods and image preprocessing. However, these methods have some technical problems when dealing with different lighting, background noise, occlusion and other situations, such as accuracy being affected, corner detection failure or error, and difficulty in adjusting Hough transform parameters. Solving these problems requires comprehensive consideration of factors such as image characteristics, algorithm robustness, parameter settings, and balancing the real-time and scalability of the algorithm in practical applications. It may be necessary to combine or adjust different technologies to meet the needs of specific scenarios.

[0003] Existing Chinese patent CN110108231A discloses a method and storage medium for measuring the three-dimensional size of a large-body box based on corner point detection, the method comprising: using the color image information obtained by the RGB camera to find the possible positions of the endpoints of the rectangular box on the image, and then effectively using the depth image information and its internal parameters obtained by the depth camera to quickly, efficiently and accurately obtain the three-dimensional size information of the rectangular box by combining the color image information and the depth image information; performing data preprocessing and grayscale processing on the color image CSO to obtain a grayscale image GS3, and performing edge extraction and binarization processing to obtain a grayscale image GS5; however, first of all, the depth camera used in the above patent is expensive and is not suitable for low-cost actual scenarios such as learning and accompanying, and in actual applications, ensuring the information synchronization of the RGB camera and the depth camera involves the collaborative work of hardware and software, and it is necessary to ensure that the two types of images match in time and space. The matching technology is difficult, resulting in low accuracy of the final corner point detection.

[0004] Therefore, how to detect the corner points around the homework text in a low-cost and accurate manner in the learning and accompanying scenario is an urgent problem to be solved. Summary of the invention

[0005] In view of this, the present invention provides a learning and accompanying method, device, robot and medium based on text corner point detection, so as to solve the problems of low accuracy and high cost in detecting the corner points around the work text in the prior art.

[0006] The technical solution adopted by the present invention is:

[0007] In a first aspect, the present invention provides a learning and accompanying method based on text corner point detection, the method comprising:

[0008] S1: Acquire real-time video data in a student learning and accompanying scenario, and decompose the real-time video data into multiple frames of images;

[0009] S2: performing brightness adjustment and contrast adjustment on each of the images, and outputting the adjusted target image;

[0010] S3: using a structured forest algorithm to perform edge detection on the target image and output an edge detection image;

[0011] S4: Performing monocular depth detection on the target image and outputting a monocular depth image;

[0012] S5: fusing the edge detection image and the monocular depth image, and outputting preliminary vertex positions corresponding to the student's homework text according to the fusion result;

[0013] S6: Perform geometric constraint adjustment on the preliminary vertex position, and output the adjusted target vertex position as the vertex position of the student homework text.

[0014] Preferably, the S2 includes:

[0015] S21: preprocessing each of the images, and outputting a grayscale image after the preprocessing;

[0016] S22: adjusting the brightness component and the contrast component in the grayscale image respectively, and outputting the adjusted brightness component and the adjusted contrast component;

[0017] S23: Outputting the target image according to the adjusted brightness component and the adjusted contrast component in combination with the color information of the image before preprocessing.

[0018] Preferably, S3 includes:

[0019] S31: Acquire multiple frames of training images and corresponding edge images in a student learning and accompanying scene;

[0020] S32: acquiring a target image block in the training image and a plurality of target pixel points in the target image block according to the training image;

[0021] S33: determining a pixel contrast feature between each target pixel and adjacent pixels according to each target pixel;

[0022] S34: acquiring a structured edge response of each target pixel point according to the pixel contrast feature;

[0023] S35: Perform non-maximum suppression on each target pixel point, determine the edge direction of each target pixel point, and complete random forest training;

[0024] S36: Input the target image into the trained random forest model to perform multi-scale edge detection, and output the edge detection image.

[0025] Preferably, the S5 includes:

[0026] S51: performing gradient calculation on the monocular depth image to extract a region image having a depth gradient higher than a preset depth gradient threshold;

[0027] S52: fusing the region image and the edge detection image pixel by pixel to obtain a fused binary image;

[0028] S53: performing Hough transform on the binary image to obtain initial edge segments;

[0029] S54: performing secondary screening on the initial edge line segments, and outputting the screened target line segments;

[0030] S55: Connecting the target line segments according to the target line segments, and outputting the intersection positions between the target line segments as the preliminary vertex positions.

[0031] Preferably, the S54 includes:

[0032] S541: Obtaining a preset line segment length threshold and an expected edge direction;

[0033] S542: Compare the line segment length of the initial edge line segment with the line segment length threshold, and output corresponding qualified line segments that are greater than the line segment length threshold;

[0034] S543: Obtain a preset angle threshold, compare the angle between the direction of the qualified line segment and the expected edge direction with the angle threshold, and output the corresponding line segment whose angle is smaller than the angle threshold as the target line segment.

[0035] Preferably, the S6 includes:

[0036] S61: extracting geometric features between the preliminary vertices according to the preliminary vertex positions, and outputting key feature information;

[0037] S62: According to the key feature information and the preset standard feature information corresponding to the student homework text, the preliminary vertex positions are adjusted and verified, and the vertex positions of the student homework text are output.

[0038] Preferably, the S62 includes:

[0039] S621: Acquire the key feature information, wherein the key feature information at least includes: the length of the diagonal line, the target angle between the diagonal line and the horizontal line, the distance between the edge line segment and the vertex, the length of the opposite side and the internal angle;

[0040] S622: Pre-screening preliminary vertices according to the diagonal length and the target angle, and outputting first candidate vertices that meet preset diagonal features after pre-screening;

[0041] S623: Perform supplementary screening on the first candidate vertex based on the least square method and the distance between the edge segment and the vertex, and output the screened second candidate vertex;

[0042] S624: Verify the second candidate vertex according to the length of the opposite side and the internal angle, and use the position of the vertex that succeeds in the verification as the target vertex position.

[0043] In a second aspect, the present invention provides a learning accompanying device based on text corner point detection, the device comprising:

[0044] An image acquisition module is used to acquire real-time video data in a student learning and accompanying scenario, and decompose the real-time video data into multiple frames of images;

[0045] A preprocessing module, used to adjust the brightness and contrast of each of the images, and output an adjusted target image;

[0046] An edge detection module, used to perform edge detection on the target image using a structured forest algorithm and output an edge detection image;

[0047] A depth detection module, used to perform monocular depth detection on the target image and output a monocular depth image;

[0048] An information fusion module is used to fuse the edge detection image and the monocular depth image, and output the preliminary vertex position corresponding to the student's homework text according to the fusion result;

[0049] The geometric constraint adjustment module is used to perform geometric constraint adjustment on the preliminary vertex position and output the adjusted target vertex position as the vertex position of the student's homework text.

[0050] In a third aspect, an embodiment of the present invention further provides a learning companion robot, comprising: at least one processor, at least one memory, and computer program instructions stored in the memory, which, when executed by the processor, implement the method of the first aspect in the above-mentioned embodiment.

[0051] In a fourth aspect, an embodiment of the present invention further provides a storage medium on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the method of the first aspect in the above-mentioned embodiment is implemented.

[0052] In summary, the beneficial effects of the present invention are as follows:

[0053] The present invention provides a learning care method, device, robot and medium based on text corner point detection. The method includes: acquiring real-time video data in a student learning care scenario, and decomposing the real-time video data into multiple frames of images; performing brightness adjustment and contrast adjustment on each of the images, and outputting an adjusted target image; using a structured forest algorithm to perform edge detection on the target image, and outputting an edge detection image; performing monocular depth detection on the target image, and outputting a monocular depth image; performing information fusion on the edge detection image and the monocular depth image, and outputting a preliminary vertex position corresponding to a student homework text based on the fusion result; performing geometric constraint adjustment on the preliminary vertex position, and outputting the adjusted target vertex position as the vertex position of the student homework text. The present invention simulates the perception mechanism of the human eye by adjusting the brightness and contrast of the image, so that the output target image is more in line with the visual experience of the human eye, which is helpful to improve the visual quality of the image and make the subsequent processing more accurate; the structured forest algorithm is used for edge detection to effectively extract edge information in the image, especially for the edges of target areas such as student homework texts, which is helpful for subsequent depth detection and accurate positioning of vertex positions; the depth image is obtained by using monocular depth detection, which is helpful to understand the distance information of objects in the scene and reduce the detection cost. In the student learning scene, the depth information can help to better understand and analyze the learning materials, and also help the subsequent text detection and adjustment of the vertex position; by fusing the edge detection image and the monocular depth image, the advantages of both are comprehensively utilized to improve the ability to distinguish the position of the student homework text, the depth information is helpful to eliminate background interference, and the text area can be more accurately positioned in combination with the edge information; the geometric constraint adjustment is performed on the preliminary vertex position to better conform to the rectangular structure and improve the accuracy of the final vertex position, which provides a more reliable basis for subsequent text analysis and understanding. In general, the present invention improves the accuracy and reliability of detection and positioning of student homework texts through multi-stage image processing and information fusion, combined with multiple technical means such as brightness adjustment, contrast adjustment, edge detection, depth detection and geometric constraint adjustment. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the technical solution of the embodiment of the present invention, the drawings required for use in the embodiment of the present invention will be briefly introduced below. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work, and these are all within the protection scope of the present invention.

[0055] Figure 1 It is a schematic diagram of the overall working process of the learning accompanying method based on text corner point detection in Example 1 of the present invention;

[0056] Figure 2It is a schematic diagram of a process of adjusting the brightness and contrast of each of the images in Embodiment 1 of the present invention;

[0057] Figure 3 Schematic diagram of the process of edge detection on the target image in Embodiment 1 of the present invention;

[0058] Figure 4 This is a schematic diagram of a process for fusing information of the edge detection image and the monocular depth image in Embodiment 1 of the present invention;

[0059] Figure 5 is a schematic diagram of a process of performing secondary screening on the initial edge segments in Embodiment 1 of the present invention;

[0060] Figure 6 It is a schematic diagram of a process of adjusting the geometric constraints of the preliminary vertex positions in Embodiment 1 of the present invention;

[0061] Figure 7 Schematic diagram of the process of adjusting and verifying the preliminary vertex position in Embodiment 1 of the present invention;

[0062] Figure 8 It is a structural block diagram of a learning accompanying device based on text corner point detection in Example 2 of the present invention;

[0063] Fig. 9 This is a schematic diagram of the structure of the learning accompanying robot in Example 3 of the present invention. DETAILED DESCRIPTION

[0064] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly and completely described in conjunction with the drawings in the embodiment of the present invention. It should be noted that, in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. In the description of the present invention, it should be understood that the orientation or position relationship indicated by the terms "center", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc. is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such a process, method, article or device. In the absence of further restrictions, the elements defined by the phrase "comprising..." do not exclude the existence of other identical elements in the process, method, article or device comprising the elements. If there is no conflict, the embodiments of the present invention and the various features in the embodiments can be combined with each other, all within the protection scope of the present invention.

[0065] Example 1

[0066] See also Figure 1 Embodiment 1 of the present invention discloses a learning and accompanying method based on text corner point detection, the method comprising:

[0067] S1: Acquire real-time video data in a student learning and accompanying scenario, and decompose the real-time video data into multiple frames of images;

[0068] Specifically, real-time video data in the student learning escort scenario is obtained through video equipment including cameras or other video collectors, including continuous video signals of the student learning environment; the obtained real-time video data is decomposed into multiple frames of images, and the continuous video data is divided into a series of still image frames to form an image sequence, each frame representing a static picture of the video data at a specific time point; the continuous video data is split into discrete images to provide static image data for subsequent processing steps, which helps to conduct more detailed analysis and processing of the scene at each moment.

[0069] S2: performing brightness adjustment and contrast adjustment on each of the images, and outputting the adjusted target image;

[0070] In one embodiment, see Figure 2 , said S2 comprises:

[0071] S21: preprocessing each of the images, and outputting a grayscale image after the preprocessing;

[0072] Specifically, each image is first preprocessed. The goal of preprocessing is to simplify the image and convert it into a form that is easier to handle. Preprocessing includes converting the color image into a grayscale image, that is, removing the color information and retaining only the brightness information, which is helpful for subsequent brightness and contrast adjustments.

[0073] S22: adjusting the brightness component and the contrast component in the grayscale image respectively, and outputting the adjusted brightness component and the adjusted contrast component;

[0074] Specifically, using Retinex theory, the overall brightness level is enhanced or weakened by adjusting the brightness component of the grayscale image. The brightness adjustment is achieved in the following ways: by applying the Gamma function to adjust the grayscale mapping of the image to change the overall brightness of the image; by adjusting the contrast component of the image to increase or decrease the grayscale difference between different areas in the image, the contrast adjustment is achieved in the following ways: by redistributing the distribution of the image grayscale level, the contrast of different brightness levels in the image is enhanced or weakened.

[0075] S23: Outputting the target image according to the adjusted brightness component and the adjusted contrast component in combination with the color information of the image before preprocessing.

[0076] Specifically, the adjusted brightness component and contrast component are combined with the color information of the image before preprocessing to generate a final target image, ensuring that the adjusted image is optimized in brightness and contrast while retaining the original color information to meet the needs of human eye perception, wherein the original color information includes red, green, and blue channel information, and the combination method includes at least a linear combination method.

[0077] S3: using a structured forest algorithm to perform edge detection on the target image and output an edge detection image;

[0078] In one embodiment, see Figure 3 , said S3 comprises:

[0079] S31: Acquire multiple frames of training images and corresponding edge images in a student learning and accompanying scene;

[0080] Specifically, multiple frames of training images are obtained from the learning accompanying scene, and each training image has a corresponding edge image, which provides real edge information for training the model.

[0081] S32: acquiring a target image block in the training image and a plurality of target pixel points in the target image block according to the training image;

[0082] Specifically, in each training image, a target image block containing the edge of the student's homework text is selected, and a plurality of target pixel points are sampled from the selected target image block, and these target pixel points are used for subsequent feature calculations.

[0083] S33: determining a pixel contrast feature between each target pixel and adjacent pixels according to each target pixel;

[0084] Specifically, the pixel contrast feature is calculated for each target pixel and its adjacent pixels. The feature is used to describe the grayscale change in the target area. The calculation formula is: f(x)=|I(x+p)-I(xp)|, where I(x+p) represents the grayscale value of the pixel x+p, I(xp) represents the grayscale value of the pixel x+p, and p represents a point in the 8-neighborhood around the pixel x.

[0085] S34: acquiring a structured edge response of each target pixel point according to the pixel contrast feature;

[0086] Specifically, using the pixel contrast feature, the obtained f(x) value reflects the grayscale change between the target pixel and its adjacent pixels. The structured edge response considers weighted summation of the pixel contrast features in different directions to capture richer structural information. The pixel contrast features are combined according to the weights in different directions using methods such as structured filtering. The calculation of the structured edge response aims to highlight the structured edge information in the target area. For student homework texts, it helps to extract the features of the text edge.

[0087] S35: Perform non-maximum suppression on each target pixel point, determine the edge direction of each target pixel point, and complete random forest training;

[0088] Specifically, for the calculated structured edge response, a non-maximum suppression (NMS) operation is applied to retain the edge direction with the maximum response. At each pixel point, the direction with the maximum structured edge response is selected as the main edge direction of the point. For each target pixel point, the training of the structured edge response is completed.

[0089] S36: Input the target image into the trained random forest model to perform multi-scale edge detection, and output the edge detection image.

[0090] Specifically, the target image is input into the trained random forest to perform edge detection at multiple scales, and the prediction results of multiple decision trees are fused using an ensemble learning method to obtain a final edge detection image.

[0091] S4: Performing monocular depth detection on the target image and outputting a monocular depth image;

[0092] Specifically, the monocular depth calculation module is a model or algorithm for estimating scene depth information from a single image. Here, the calculation module used is the MobileDepth model, which is a lightweight deep learning model suitable for mobile devices and is specially designed for monocular depth estimation tasks. The MobileDepth model is based on a deep learning architecture, such as a convolutional neural network (CNN), and is trained to predict the depth information of a scene from a monocular image. After training with a large number of deep image data sets, it learns depth information such as the size and distance of objects in the image. The target image is input into the MobileDepth model, and the depth image of the corresponding scene is obtained through the forward propagation of the model. Each pixel value in the depth image represents the distance from the corresponding point in the image to the camera, forming the depth information of the scene. By obtaining the monocular depth map of the target image, information about the distance of objects in the image is provided, which is important for the subsequent information fusion step, because the combination of depth information can more accurately understand and locate the position of the student's homework text.

[0093] S5: fusing the edge detection image and the monocular depth image, and outputting preliminary vertex positions corresponding to the student's homework text according to the fusion result;

[0094] In one embodiment, see Figure 4 , the S5 comprises:

[0095] S51: performing gradient calculation on the monocular depth image to extract a region image having a depth gradient higher than a preset depth gradient threshold;

[0096] Specifically, the gradient of the monocular depth map is calculated to obtain the rate of change of the depth of each pixel. The direction and intensity of the depth change are obtained by calculating the gradient of each pixel in the depth map. A depth gradient threshold is preset to filter out areas with significant depth changes above the preset depth gradient threshold, which correspond to the edges of the assignment text.

[0097] S52: fusing the region image and the edge detection image pixel by pixel to obtain a fused binary image;

[0098] Specifically, we obtain the edge detection image obtained by the structured forest algorithm, and fuse the edge feature map with the depth gradient salient area pixel by pixel to ensure that only the points that are significant in both the edge feature map and the depth gradient map are considered as potential edges of the homework text. This step helps to reduce false detections and only retains areas where both depth and edge information are significant.

[0099] S53: performing Hough transform on the binary image to obtain initial edge segments;

[0100] Specifically, the fused image is binarized to obtain a binary image, and the Hough transform is applied to extract the line segments representing the edges of the job. The Hough transform can identify straight lines in the image, which is used here to detect the edge segments of the job text.

[0101] S54: performing secondary screening on the initial edge line segments, and outputting the screened target line segments;

[0102] In one embodiment, see Figure 5 , the S54 comprises:

[0103] S541: Obtaining a preset line segment length threshold and an expected edge direction;

[0104] Specifically, a preset line segment length threshold and an expected edge direction are obtained; for example, the line segment length threshold is obtained from system parameters as 10 pixels, and the expected edge direction is the horizontal direction.

[0105] S542: Compare the line segment length of the initial edge line segment with the line segment length threshold, and output corresponding qualified line segments that are greater than the line segment length threshold;

[0106] Specifically, the segment length of the initial edge segment is compared with the segment length threshold. Assuming that one of the initially extracted edge segments is 15 pixels long and the other is 8 pixels long, after comparing with the preset segment length threshold, the output is a segment with a length greater than 10 pixels, that is, a segment with a length of 15 pixels.

[0107] S543: Obtain a preset angle threshold, compare the angle between the direction of the qualified line segment and the expected edge direction with the angle threshold, and output the corresponding line segment whose angle is smaller than the angle threshold as the target line segment.

[0108] Specifically, the angle threshold is set to 20 degrees, and the angle between the direction of the qualified line segment and the expected edge direction is compared with the angle threshold: for the screened line segments with qualified length, the angle between each line segment and the horizontal direction is calculated. Assuming that the calculated angle between the first line segment and the horizontal direction is 15 degrees and the second line segment is 25 degrees, after comparing with the preset angle threshold of 20 degrees, the line segment with an angle less than 20 degrees is output, that is, the first line segment. After screening the line segment length and angle, the qualified target line segment is obtained, which provides a reliable input for the subsequent vertex calculation.

[0109] S55: Connecting the target line segments according to the target line segments, and outputting the intersection positions between the target line segments as the preliminary vertex positions.

[0110] Specifically, the extracted edge segments are obtained, and the intersection points between the segments are calculated. These intersection points are considered as preliminary vertices of the job text. This step provides preliminary vertex positions for subsequent geometric constraint adjustment.

[0111] S6: Perform geometric constraint adjustment on the preliminary vertex position, and output the adjusted target vertex position as the vertex position of the student homework text.

[0112] Specifically, geometric constraints are adjusted on the preliminary vertex set obtained through Hough transform, and the adjusted target vertex positions are output to improve the accuracy and consistency of the vertex positions of student homework texts.

[0113] In one embodiment, see Figure 6 , the S6 comprises:

[0114] S61: extracting geometric features between the preliminary vertices according to the preliminary vertex positions, and outputting key feature information;

[0115] Specifically, the geometric features between the vertices, such as edge length and angle, are calculated using the initially detected vertex set. For each pair of vertices, the distance between them can be calculated as the edge length, as well as the angle between the two edges. The extracted key feature information is output, including at least the length and angle of each edge.

[0116] S62: According to the key feature information and the preset standard feature information corresponding to the student homework text, the preliminary vertex positions are adjusted and verified, and the vertex positions of the student homework text are output.

[0117] Specifically, key feature information and preset standard feature information of student homework text are used for adjustment and verification. For each vertex, its position is adjusted according to the standard feature information so that the extracted geometric features are closer to the standard features, and the verified and adjusted vertex positions of the student homework text are output. This position is more in line with the expected geometric features, thereby improving the accuracy of the entire system in the position of the student homework text.

[0118] In one embodiment, see Figure 7 , the S62 comprises:

[0119] S621: Acquire the key feature information, wherein the key feature information at least includes: the length of the diagonal line, the target angle between the diagonal line and the horizontal line, the distance between the edge line segment and the vertex, the length of the opposite side and the internal angle;

[0120] S622: Pre-screening preliminary vertices according to the diagonal length and the target angle, and outputting first candidate vertices that meet preset diagonal features after pre-screening;

[0121] Specifically, for each detected intersection point, the angle between the two diagonal lines formed by the point and other points and the horizontal line is calculated, and different diagonal lines are obtained by combining them in pairs, and the length of the diagonal lines is calculated: for each set of diagonal lines, its length, that is, the distance between the intersection points, is calculated, and preset thresholds are set, including the angle threshold θ threshold and the minimum diagonal length threshold d min , maximum diagonal length threshold d max . Eliminate those vertex pairs that obviously do not conform to the diagonal relationship of the rectangle, and retain the intersection points that meet the following conditions:

[0122] θ thrshold <|θ AB -θ CD |<180°-θ thrshold

[0123] d min <||AB||<dmax and dmin<||CD||<d max

[0124] Among them, AB and CD are diagonal lines, θAB and θCD are the angles between these two line segments and the horizontal line, and ||AB|| is the length of line segment AB.

[0125] S623: Perform supplementary screening on the first candidate vertex based on the least square method and the distance between the edge segment and the vertex, and output the screened second candidate vertex;

[0126] Specifically, for the first candidate vertex after screening, key feature information is extracted through geometric knowledge, including the distance from the edge segment to each vertex. The least squares method is used to establish the objective function, that is, the square of the sum of the distances from the edge segment to each vertex as the error to be minimized. Through the iterative optimization process, the position of each vertex is gradually adjusted to reduce the value of the objective function, so that the distance between the edge segment and the vertex is more in line with the requirements of the least squares method, that is, it satisfies:

[0127]

[0128] Among them, Vi is the position of the vertex, Pj is the point on the jth edge segment, ||Vi-Pj|| is the Euclidean distance from the point to the vertex, and the second candidate vertex after screening is output. Through the optimization of the least squares method, the position of the vertex is accurately adjusted to minimize the distance between the edge segment and the vertex, which helps to further improve the geometric accuracy of the detected rectangle and ensure that the final vertex position is more consistent with the actual shape of the job text.

[0129] S624: Verify the second candidate vertex according to the length of the opposite side and the internal angle, and use the position of the vertex that succeeds in the verification as the target vertex position.

[0130] Specifically, the distance between the optimized second candidate vertex pairs is checked to ensure the consistency of the distance of the opposite edges. The distance ratio factor α is pre-set, and for the opposite edges AB and CD formed by connecting any second candidate vertices, the length ratio is checked to see whether it satisfies the following relationship:

[0131]

[0132] If it is not satisfied, readjust the vertex position to make the ratio of opposite side length close to 1;

[0133] The optimized vertex set is then angle-checked. Since the student assignment text is approximately rectangular, the four internal angles are checked to see if they are close to 90°.

[0134] 90°-δ<∠ABC<90°+δ for all angles ABC

[0135] Among them, δ is the allowable preset angle deviation. If the actual angle deviates too much from 90°, the vertices need to be readjusted to make them closer to the real rectangular vertices. Through the consistency check of the distance between vertices and the consistency check of the angle, it is ensured that the side length ratio and angle formed by the optimized vertex set are close to the actual shape of the ideal job text, thereby improving the geometric accuracy of the detection.

[0136] Example 2

[0137] See also Figure 8 Embodiment 2 of the present invention further provides a learning accompanying device based on text corner point detection, the device comprising:

[0138] An image acquisition module is used to acquire real-time video data in a student learning and accompanying scenario, and decompose the real-time video data into multiple frames of images;

[0139] A preprocessing module, used to adjust the brightness and contrast of each of the images, and output an adjusted target image;

[0140] In one embodiment, the preprocessing module includes:

[0141] An image grayscale processing submodule, used for preprocessing each of the images and outputting a grayscale image after preprocessing;

[0142] The brightness component and contrast component adjustment submodule is used to adjust the brightness component and contrast component in the grayscale image respectively, and output the adjusted brightness component and the adjusted contrast component;

[0143] The target image acquisition submodule is used to output the target image according to the adjusted brightness component and the adjusted contrast component in combination with the color information of the image before preprocessing.

[0144] An edge detection module, used to perform edge detection on the target image using a structured forest algorithm and output an edge detection image;

[0145] In one embodiment, the edge detection module includes:

[0146] The training image and edge image acquisition submodule is used to acquire multiple frames of training images and corresponding edge images in the student learning and accompanying scene;

[0147] A target pixel point acquisition submodule is used to acquire a target image block in the training image and a plurality of target pixel points in the target image block according to the training image;

[0148] A pixel contrast feature determination submodule, used to determine the pixel contrast feature between each target pixel and adjacent pixels based on each target pixel;

[0149] A structured edge response acquisition submodule, used to acquire the structured edge response of each target pixel point according to the pixel contrast feature;

[0150] The non-maximum suppression submodule is used to perform non-maximum suppression on each target pixel, determine the edge direction of each target pixel, and complete random forest training;

[0151] The multi-scale edge detection module is used to input the target image into the trained random forest model to perform multi-scale edge detection and output the edge detection image.

[0152] A depth detection module, used to perform monocular depth detection on the target image and output a monocular depth image;

[0153] An information fusion module is used to fuse the edge detection image and the monocular depth image, and output the preliminary vertex position corresponding to the student's homework text according to the fusion result;

[0154] In one embodiment, the information fusion module includes:

[0155] A gradient calculation submodule, used to perform gradient calculation on the monocular depth image and extract a region image having a depth gradient higher than a preset depth gradient threshold;

[0156] An image fusion submodule, used for fusing the regional image and the edge detection image pixel by pixel to obtain a fused binary image;

[0157] A Hough transform submodule, used for performing a Hough transform on the binary image to obtain an initial edge segment;

[0158] A secondary screening submodule, used for performing secondary screening on the initial edge line segments and outputting the screened target line segments;

[0159] In one embodiment, the secondary screening submodule includes:

[0160] A line segment length threshold and expected edge direction acquisition unit, used to acquire a preset line segment length threshold and expected edge direction;

[0161] A qualified line segment determination unit, used for comparing the line segment length of the initial edge line segment with the line segment length threshold, and outputting a corresponding qualified line segment greater than the line segment length threshold;

[0162] The target line segment acquisition unit is used to obtain a preset angle threshold, compare the angle between the direction of the qualified line segment and the expected edge direction with the angle threshold, and output the corresponding line segment with an angle less than the angle threshold as the target line segment.

[0163] The preliminary vertex position acquisition submodule is used to connect the target line segments according to the target line segments, and output the intersection positions between the target line segments as the preliminary vertex positions.

[0164] The geometric constraint adjustment module is used to perform geometric constraint adjustment on the preliminary vertex position and output the adjusted target vertex position as the vertex position of the student's homework text.

[0165] In one embodiment, the geometric constraint adjustment module includes:

[0166] A feature extraction submodule, used to extract geometric features between preliminary vertices according to the preliminary vertex positions, and output key feature information;

[0167] The preliminary vertex position adjustment and verification submodule is used to adjust and verify the preliminary vertex position according to the key feature information and the preset standard feature information corresponding to the student homework text, and output the vertex position of the student homework text.

[0168] In one embodiment, the preliminary vertex position adjustment check submodule includes:

[0169] A key feature information acquisition unit, used to acquire the key feature information, wherein the key feature information at least includes: the length of a diagonal line, a target angle between a diagonal line and a horizontal line, a distance between an edge line segment and a vertex, a length of opposite sides, and an internal angle;

[0170] A pre-screening unit, configured to pre-screen preliminary vertices according to the diagonal length and the target angle, and output a first candidate vertex that meets a preset diagonal feature after pre-screening;

[0171] A supplementary screening unit, used to supplement the first candidate vertex according to the least square method and the distance between the edge segment and the vertex, and output the screened second candidate vertex;

[0172] The second candidate vertex verification unit is used to verify the second candidate vertex according to the opposite side length and the internal angle, and use the vertex position that succeeds in the verification as the target vertex position.

[0173] Specifically, a learning accompaniment device based on text corner detection provided by an embodiment of the present invention is adopted, and the device includes: an image acquisition module, used to acquire real-time video data in a student learning accompaniment scenario, and decompose the real-time video data into multiple frames of images; a preprocessing module, used to adjust the brightness and contrast of each of the images, and output an adjusted target image; an edge detection module, used to perform edge detection on the target image using a structured forest algorithm, and output an edge detection image; a depth detection module, used to perform monocular depth detection on the target image, and output a monocular depth image; an information fusion module, used to perform information fusion on the edge detection image and the monocular depth image, and output a preliminary vertex position corresponding to the student homework text based on the fusion result; a geometric constraint adjustment module, used to perform geometric constraint adjustment on the preliminary vertex position, and output the adjusted target vertex position as the vertex position of the student homework text. The device simulates the perception mechanism of the human eye by adjusting the brightness and contrast of the image, so that the output target image is more in line with the visual experience of the human eye, which helps to improve the visual quality of the image and make the subsequent processing more accurate; the structured forest algorithm is used for edge detection to effectively extract the edge information in the image, especially for the edges of target areas such as student homework text, which is helpful for subsequent depth detection and accurate positioning of vertex positions; the depth image is obtained by monocular depth detection, which is helpful to understand the distance information of objects in the scene and reduce the detection cost. In the student learning scene, the depth information can help to better understand and analyze the learning materials, and also help the subsequent text detection and adjustment of the vertex position; by fusing the edge detection image and the monocular depth image, the advantages of both are comprehensively utilized to improve the ability to distinguish the position of the student homework text, the depth information helps to eliminate background interference, and the text area can be more accurately located in combination with the edge information; the geometric constraint adjustment of the preliminary vertex position is performed to better conform to the rectangular structure and improve the accuracy of the final vertex position, which provides a more reliable basis for subsequent text analysis and understanding. In general, this device improves the accuracy and reliability of detection and positioning of student homework texts through multi-stage image processing and information fusion, combined with multiple technical means such as brightness adjustment, contrast adjustment, edge detection, depth detection and geometric constraint adjustment.

[0174] Example 3

[0175] In addition, combined Figure 1 The learning and accompanying method based on text corner point detection described in Example 1 of the present invention can be implemented by a learning and accompanying robot. Fig. 9 A schematic diagram of the hardware structure of the learning and accompanying robot provided in Example 3 of the present invention is shown.

[0176] The learning companion robot may include a processor and a memory storing computer program instructions.

[0177] Specifically, the processor may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present invention.

[0178] The memory may include a large capacity memory for data or instructions. By way of example and not limitation, the memory may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory may include a removable or non-removable (or fixed) medium. Where appropriate, the memory may be inside or outside a data processing device. In a particular embodiment, the memory is a non-volatile solid-state memory. In a particular embodiment, the memory includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM) or a flash memory or a combination of two or more of these.

[0179] The processor implements any one of the learning and accompanying methods based on text corner point detection in the above embodiments by reading and executing computer program instructions stored in the memory.

[0180] In one example, the learning companion robot may further include a communication interface and a bus. Fig. 9 As shown, the processor, memory, and communication interface are connected via a bus and communicate with each other.

[0181] The communication interface is mainly used to implement communication between the modules, devices, units and / or equipment in the embodiments of the present invention.

[0182] The bus includes hardware, software or both, and the components of the learning accompanying robot are coupled to each other. For example, but not limitation, the bus may include an accelerated graphics port (AGP) or other graphics bus, an enhanced industrial standard architecture (EISA) bus, a front-side bus (FSB), a hypertransport (HT) interconnection, an industrial standard architecture (ISA) bus, an infinite bandwidth interconnection, a low pin count (LPC) bus, a memory bus, a microchannel architecture (MCA) bus, a peripheral component interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a serial advanced technology attachment (SATA) bus, a video electronics standard association local (VLB) bus or other suitable buses or a combination of two or more of these. In appropriate cases, the bus may include one or more buses. Although the embodiments of the present invention describe and illustrate specific buses, the present invention considers any suitable bus or interconnection.

[0183] Example 4

[0184] In addition, in combination with the learning and nursing method based on text corner point detection in the above embodiment 1, embodiment 4 of the present invention can also provide a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any one of the learning and nursing methods based on text corner point detection in the above embodiments is implemented.

[0185] In summary, the embodiments of the present invention provide a learning and accompanying method, device, robot and medium based on text corner point detection.

[0186] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.

[0187] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0188] It should also be noted that the exemplary embodiments mentioned in the present invention describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiments, or in a different order from the embodiments, or several steps can be performed simultaneously.

[0189] The above is only a specific implementation of the present invention. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the system, module and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. It should be understood that the protection scope of the present invention is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be covered within the protection scope of the present invention.

Claims

1. A learning and accompanying method based on text corner point detection, characterized in that: The method comprises: S1: Acquire real-time video data in a student learning and accompanying scenario, and decompose the real-time video data into multiple frames of images; S2: performing brightness adjustment and contrast adjustment on each of the images, and outputting the adjusted target image; S3: using a structured forest algorithm to perform edge detection on the target image and output an edge detection image; S4: Performing monocular depth detection on the target image and outputting a monocular depth image; S5: fusing the edge detection image and the monocular depth image, and outputting preliminary vertex positions corresponding to the student's homework text according to the fusion result; S6: performing geometric constraint adjustment on the preliminary vertex position, and outputting the adjusted target vertex position as the vertex position of the student homework text; The S3 includes: S31: Acquire multiple frames of training images and corresponding edge images in a student learning and accompanying scene; S32: acquiring a target image block in the training image and a plurality of target pixel points in the target image block according to the training image; S33: determining a pixel contrast feature between each target pixel and adjacent pixels according to each target pixel; S34: acquiring a structured edge response of each target pixel point according to the pixel contrast feature; S35: Perform non-maximum suppression on each target pixel point, determine the edge direction of each target pixel point, and complete random forest training; S36: Inputting the target image into the trained random forest model to perform multi-scale edge detection, and outputting the edge detection image; The S5 includes: S51: performing gradient calculation on the monocular depth image to extract a region image having a depth gradient higher than a preset depth gradient threshold; S52: fusing the region image and the edge detection image pixel by pixel to obtain a fused binary image; S53: performing Hough transform on the binary image to obtain initial edge segments; S54: performing secondary screening on the initial edge line segments, and outputting the screened target line segments; S55: Connecting the target line segments according to the target line segments, and outputting the intersection positions between the target line segments as the preliminary vertex positions; The S54 includes: S541: Obtaining a preset line segment length threshold and an expected edge direction; S542: Compare the line segment length of the initial edge line segment with the line segment length threshold, and output corresponding qualified line segments that are greater than the line segment length threshold; S543: Obtain a preset angle threshold, compare the angle between the direction of the qualified line segment and the expected edge direction with the angle threshold, and output a corresponding line segment whose angle is less than the angle threshold as the target line segment; The S6 includes: S61: extracting geometric features between the preliminary vertices according to the preliminary vertex positions, and outputting key feature information; S62: adjusting and verifying the preliminary vertex positions according to the key feature information and the preset standard feature information corresponding to the student homework text, and outputting the vertex positions of the student homework text; The S62 includes: S621: Acquire the key feature information, wherein the key feature information at least includes: the length of the diagonal line, the target angle between the diagonal line and the horizontal line, the distance between the edge line segment and the vertex, the length of the opposite side and the internal angle; S622: Pre-screening preliminary vertices according to the diagonal length and the target angle, and outputting first candidate vertices that meet preset diagonal features after pre-screening; S623: Perform supplementary screening on the first candidate vertex based on the least square method and the distance between the edge segment and the vertex, and output the screened second candidate vertex; S624: Verify the second candidate vertex according to the length of the opposite side and the internal angle, and use the position of the vertex that succeeds in the verification as the target vertex position.

2. The learning and accompanying method based on text corner point detection according to claim 1 is characterized in that: The S2 includes: S21: preprocessing each of the images, and outputting a grayscale image after the preprocessing; S22: adjusting the brightness component and the contrast component in the grayscale image respectively, and outputting the adjusted brightness component and the adjusted contrast component; S23: Outputting the target image according to the adjusted brightness component and the adjusted contrast component in combination with the color information of the image before preprocessing.

3. A learning and accompanying device based on text corner point detection, characterized in that: The device comprises: An image acquisition module is used to acquire real-time video data in a student learning and accompanying scenario, and decompose the real-time video data into multiple frames of images; A preprocessing module, used to adjust the brightness and contrast of each of the images, and output an adjusted target image; An edge detection module, used to perform edge detection on the target image using a structured forest algorithm and output an edge detection image; A depth detection module, used to perform monocular depth detection on the target image and output a monocular depth image; An information fusion module is used to fuse the edge detection image and the monocular depth image, and output the preliminary vertex position corresponding to the student's homework text according to the fusion result; A geometric constraint adjustment module, used for performing geometric constraint adjustment on the preliminary vertex position, and outputting the adjusted target vertex position as the vertex position of the student's homework text; The method of performing edge detection on the target image by using the structured forest algorithm and outputting the edge detection image comprises: Obtain multiple frames of training images and corresponding edge images in a student learning and accompanying scene; According to the training image, a target image block in the training image and a plurality of target pixel points in the target image block are obtained; Determine, based on each of the target pixels, a pixel contrast feature between each of the target pixels and adjacent pixels; According to the pixel contrast feature, obtaining a structured edge response of each target pixel; Perform non-maximum suppression on each target pixel, determine the edge direction of each target pixel, and complete random forest training; Inputting the target image into the trained random forest model to perform multi-scale edge detection, and outputting the edge detection image; The information fusion of the edge detection image and the monocular depth image and outputting the preliminary vertex position corresponding to the student homework text according to the fusion result comprises: Performing gradient calculation on the monocular depth image to extract a region image having a depth gradient higher than a preset depth gradient threshold; fusing the region image and the edge detection image pixel by pixel to obtain a fused binary image; Performing Hough transform on the binary image to obtain initial edge segments; Performing secondary screening on the initial edge line segments, and outputting the screened target line segments; According to the target line segment, connect each target line segment, and output the intersection position between each target line segment as the preliminary vertex position; The secondary screening of the initial edge line segments and outputting the screened target line segments comprises: Get the preset line segment length threshold and expected edge direction; Compare the line segment length of the initial edge line segment with the line segment length threshold, and output the corresponding qualified line segment that is greater than the line segment length threshold; Obtain a preset angle threshold, compare the angle between the direction of the qualified line segment and the expected edge direction with the angle threshold, and output a corresponding line segment whose angle is less than the angle threshold as the target line segment; The step of adjusting the geometric constraints of the preliminary vertex positions and outputting the adjusted target vertex positions as the vertex positions of the student's homework text comprises: Extracting geometric features between the preliminary vertices according to the preliminary vertex positions and outputting key feature information; According to the key feature information and the preset standard feature information corresponding to the student homework text, the preliminary vertex position is adjusted and verified, and the vertex position of the student homework text is output; The adjusting and verifying the preliminary vertex positions according to the key feature information and the preset standard feature information corresponding to the student homework text, and outputting the vertex positions of the student homework text comprises: Acquire the key feature information, wherein the key feature information includes at least: the length of the diagonal line, the target angle between the diagonal line and the horizontal line, the distance between the edge line segment and the vertex, the length of the opposite side and the internal angle; Pre-screening preliminary vertices according to the diagonal length and the target angle, and outputting first candidate vertices that meet preset diagonal features after pre-screening; According to the least square method, combined with the distance between the edge segment and the vertex, the first candidate vertex is supplementarily screened, and the screened second candidate vertex is output; The second candidate vertex is verified according to the length of the opposite side and the internal angle, and the position of the vertex that succeeds in the verification is used as the target vertex position.

4. A learning and nursing robot, characterized in that: include: At least one processor, at least one memory and computer program instructions stored in the memory, when the computer program instructions are executed by the processor, implement the method according to any one of claims 1-2.

5. A storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 2 is implemented.

Citation Information

Patent Citations

  • Corner detection-based rectangular box three-dimensional size measurement method and storage medium

    CN110108231A

  • Multi-bill mixed shot image correction method and system based on deep learning

    CN112633275A

  • Humanoid robot reading system and method

    CN117140542A

  • Fiducial marker design and detection for locating surgical instrument in images

    US20100168562A1