Test paper image acquisition method, device, camera, storage medium and product

By using the panoramic image recognition model and close-up adjustment value calculation method in the test paper image acquisition system, the automatic acquisition of test paper images is achieved, solving the problem of low acquisition efficiency in the existing technology, and improving the acquisition success rate and reliability.

CN118942092BActive Publication Date: 2025-04-29VALUEHD CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411428299.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2025-04-29
Estimated Expiration
2044-10-14

AI Technical Summary

Technical Problem

In the prior art, a large amount of labor and time costs are required when collecting test paper images, resulting in a significant reduction in the efficiency of test paper image acquisition.

Method used

By acquiring the panoramic image, input it to the preset test paper image recognition model, obtain the test paper image position and optimal acquisition path, calculate the close-up adjustment value, and control the close-up acquisition test paper image.

Benefits of technology

Automatically collecting test paper images is realized, which improves the acquisition success rate and efficiency, and significantly improves the reliability of test paper images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118942092B_ABST
    Figure CN118942092B_ABST
Patent Text Reader

Abstract

The present application discloses a test paper image acquisition method, device, camera, storage medium and product, which relates to the field of computer technology, and discloses a test paper image acquisition method, including: obtaining a panoramic image, inputting the panoramic image into a preset test paper image recognition model, obtaining all test paper image positions and optimal acquisition paths in the panoramic image, wherein the test paper image recognition model is obtained by training a preset to-be-trained model with panoramic image samples, test paper image position samples and optimal acquisition path samples; based on all the test paper image positions, calculating a close-up adjustment value corresponding to each of the test paper image positions; based on all the close-up adjustment values ​​and the optimal acquisition path, controlling the close-up to acquire all the test paper images. The present application uses the test paper image acquisition model to acquire test paper images from the panoramic image, and controls the close-up to acquire the test paper images, thereby significantly improving the test paper image acquisition efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image acquisition technology, and in particular to a test paper image acquisition method, device, camera, storage medium and product. Background Art

[0002] In recent years, with the continuous development of artificial intelligence technology and the evolution of educational concepts, various smart classroom applications have emerged in an endless stream. Among them, automatically collecting test paper images through cameras has become an important smart classroom application scenario.

[0003] In the prior art, when collecting test paper image information, it is necessary to use a camera to independently shoot each test paper image. When the number of test paper images to be collected is large, independently shooting the test paper images requires a lot of manpower and time costs, resulting in a significant reduction in the efficiency of test paper image collection.

[0004] Therefore, how to improve the acquisition efficiency of test paper image acquisition is an urgent problem to be solved.

[0005] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0006] The main purpose of this application is to provide a test paper image acquisition method, device, camera, storage medium and product, aiming to solve the technical problem of low acquisition efficiency of test paper image acquisition.

[0007] To achieve the above purpose, the present application proposes a test paper image acquisition method, the method comprising:

[0008] Acquire a panoramic image, input the panoramic image into a preset test paper image recognition model, and obtain all test paper image positions and optimal acquisition paths in the panoramic image, wherein the test paper image recognition model is obtained by training a preset to-be-trained model with panoramic image samples, test paper image position samples, and optimal acquisition path samples;

[0009] Based on all the test paper image positions, a close-up adjustment value corresponding to each test paper image position is calculated;

[0010] Based on all the close-up adjustment values ​​and the optimal acquisition path, the close-up camera is controlled to acquire all the test paper images.

[0011] In one embodiment, the step of calculating the close-up adjustment value corresponding to each of the test paper image positions based on all of the test paper image positions comprises:

[0012] Obtain the test paper panoramic image area corresponding to each test paper image position;

[0013] Based on the panoramic image area of ​​the test paper, a corresponding close-up focus multiple is calculated;

[0014] Based on the close-up focus magnification, query a preset curve model to obtain a corresponding optical axis offset;

[0015] Based on the position of the test paper image, a preset surface model is queried to obtain a corresponding surface lookup table value;

[0016] Adding the surface lookup table value, the optical axis offset and a preset optical axis parallelism error to calculate a close-up lens movement value;

[0017] The close-up focus magnification and the close-up movement value of each test paper image position are combined to obtain a corresponding close-up adjustment value.

[0018] In one embodiment, before the step of acquiring the panoramic image, the step further includes:

[0019] Obtain panoramic image samples, test paper image position samples and optimal acquisition path samples;

[0020] The panoramic image sample is recognized by using a preset first model to be trained to obtain a test paper image recognition result;

[0021] Based on the test paper image recognition result, determining all target test paper image positions;

[0022] Calculating the recognition losses of all the target test paper image positions and the test paper image position samples to obtain a first loss value;

[0023] If the first loss value does not meet the preset first loss standard, return to the step of identifying the panoramic image sample through the preset model to be trained to obtain the test paper image recognition result, and stop training until the first loss value meets the first loss standard to obtain a test paper recognition model that meets the first loss standard;

[0024] The preset second model to be trained is trained by using the optimal acquisition path samples to obtain a trained path optimization model;

[0025] The test paper recognition model is combined with the path optimization model to obtain a test paper image recognition model.

[0026] In one embodiment, the step of training the preset second model to be trained by using the optimal acquisition path sample to obtain a trained path optimization model further includes:

[0027] Numbering each target test paper image position, performing acquisition path planning for all target test paper image positions through a preset second to-be-trained model, and obtaining a target path planning;

[0028] Calculating the recognition loss of the target path planning and the optimal collection path sample to obtain a second loss value;

[0029] If the second loss value does not meet the preset second loss standard, then return to number each target test paper image position, and use the preset second model to be trained to perform acquisition path planning for all target test paper image positions to obtain the target path planning steps. The training is stopped until the second loss value meets the second loss standard to obtain a path optimization model that meets the second loss standard.

[0030] In one embodiment, before the step of acquiring the panoramic image, the step further includes:

[0031] Determine the target panoramic image according to the preset shooting height;

[0032] Determining the panoramic coordinates and the corresponding close-up angle of the target panoramic image;

[0033] Establishing a surface model of the current shooting height according to the panoramic coordinates and the close-up angle;

[0034] Calibrate the optical axis for different zoom values ​​of the close-up image, fit the deviation angles of the different zoom values, and obtain a corresponding curve model;

[0035] The panoramic lens and the close-up lens are calibrated to be parallel to each other in optical axis centers, and an optical axis parallelism error is obtained.

[0036] In one embodiment, after the step of controlling the close-up lens to capture all the test paper images based on all the close-up lens adjustment values ​​and the optimal capture path, the step further includes:

[0037] Get the historical collection images of the previous round;

[0038] Perform pixel sampling comparison between the test paper image and the historical collection image;

[0039] If there are large areas of pixels that are identical between the test paper image and the historically collected image, a reminder message indicating that the test paper has not been turned over is sent.

[0040] In addition, to achieve the above-mentioned purpose, the present application also proposes a test paper image acquisition device, the test paper image acquisition device comprising:

[0041] A recognition module is used to obtain a panoramic image, input the panoramic image into a preset test paper image recognition model, and obtain all test paper image positions and optimal acquisition paths in the panoramic image, wherein the test paper image recognition model is obtained by training a preset to-be-trained model with panoramic image samples, test paper image position samples, and optimal acquisition path samples;

[0042] A calculation module, configured to calculate, based on all the test paper image positions, a close-up adjustment value corresponding to each of the test paper image positions;

[0043] A control module is used to control the close-up camera to capture all test paper images based on all the close-up camera adjustment values ​​and the optimal capture path.

[0044] In addition, to achieve the above-mentioned purpose, the present application also proposes a camera, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the test paper image acquisition method described above.

[0045] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the test paper image acquisition method described above are implemented.

[0046] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the test paper image acquisition method described above.

[0047] One or more technical solutions proposed in this application have at least the following technical effects:

[0048] Compared with the related art, in which a camera is required to independently shoot each test paper image when collecting test paper image information, and when a large number of test paper images need to be collected, independently shooting the test paper images requires a lot of manpower and time costs, resulting in a significant reduction in the efficiency of test paper image collection, the present application obtains a panoramic image, inputs the panoramic image into a preset test paper image recognition model, and obtains all the test paper image positions and the optimal collection path in the panoramic image, wherein the test paper image recognition model is obtained by training a preset model to be trained with panoramic image samples, test paper image position samples and optimal collection path samples; based on all the test paper image positions, a close-up adjustment value corresponding to each of the test paper image positions is calculated; based on all the close-up adjustment values ​​and the optimal collection path, the close-up camera is controlled to collect all the test paper images. It can be understood that the present application uses panoramic image samples, test paper image position samples and optimal acquisition path samples to train the preset model to be trained, and uses the trained test paper image acquisition model to perform test paper image acquisition on the panoramic image, obtain the test paper image position and the optimal acquisition path, calculate the corresponding close-up adjustment value, and then control the close-up camera to acquire all test paper images, thereby realizing automatic acquisition of test paper images, and by calculating the close-up adjustment value, the success rate of test paper image acquisition is improved, thereby improving the test paper image acquisition efficiency and achieving a significant improvement in the reliability of test paper image acquisition. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0050] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0051] Figure 1 A schematic diagram of the process flow provided for the first embodiment of the test paper image acquisition method of the present application;

[0052] Figure 2 Schematic diagram of the test paper under different lenses provided in the first embodiment of the test paper image acquisition method of the present application;

[0053] Figure 3 A brief flowchart of the first embodiment of the test paper image acquisition method of the present application is provided;

[0054] Figure 4 This is a schematic diagram of the module structure of the test paper image acquisition device according to an embodiment of the present application;

[0055] Figure 5 A schematic diagram of the camera structure of the hardware operating environment involved in the test paper image acquisition method in the embodiment of the present application.

[0056] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0057] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0058] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0059] The main solution of the embodiment of the present application is: obtain a panoramic image, input the panoramic image into a preset test paper image recognition model, and obtain all test paper image positions and optimal acquisition paths in the panoramic image, wherein the test paper image recognition model is obtained by training a preset to-be-trained model with panoramic image samples, test paper image position samples, and optimal acquisition path samples;

[0060] Based on all the test paper image positions, a close-up adjustment value corresponding to each test paper image position is calculated;

[0061] Based on all the close-up adjustment values ​​and the optimal acquisition path, the close-up camera is controlled to acquire all the test paper images.

[0062] In this embodiment, the present application uses the test paper image acquisition device as the execution body. For the convenience of description, it is specifically described below as "device".

[0063] Since the existing technology requires using a camera to independently shoot each test paper image when collecting test paper image information, when the number of test paper images that need to be collected is large, independently shooting the test paper images requires a lot of manpower and time costs, resulting in a significant reduction in the efficiency of test paper image collection.

[0064] The present application provides a solution, which adopts the method of acquiring a panoramic image, inputting the panoramic image into a preset test paper image recognition model, obtaining all test paper image positions and optimal acquisition paths in the panoramic image, wherein the test paper image recognition model is obtained by training a preset model to be trained using panoramic image samples, test paper image position samples and optimal acquisition path samples; based on all the test paper image positions, a close-up adjustment value corresponding to each test paper image position is calculated; based on all the close-up adjustment values ​​and the optimal acquisition path, a close-up is controlled to acquire all test paper images. It can be understood that the present application adopts panoramic image samples, test paper image position samples and optimal acquisition path samples to train the preset model to be trained, and the test paper image acquisition model completed by the training is used to acquire the test paper image of the panoramic image, obtain the test paper image position and the optimal acquisition path, calculate the corresponding close-up adjustment value, and then control the close-up to acquire all test paper images, so as to realize automatic acquisition of test paper images, and by calculating the close-up adjustment value, the success rate of test paper image acquisition is improved, and then the efficiency of test paper image acquisition is improved, so as to realize a significant improvement in the reliability of test paper image acquisition.

[0065] Based on this, the present application embodiment provides a test paper image acquisition method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the test paper image acquisition method of the present application.

[0066] In this embodiment, the test paper image acquisition method includes steps S10 to S30:

[0067] Step S10, obtaining a panoramic image, inputting the panoramic image into a preset test paper image recognition model, and obtaining all test paper image positions and optimal acquisition paths in the panoramic image, wherein the test paper image recognition model is obtained by training a preset to-be-trained model with panoramic image samples, test paper image position samples, and optimal acquisition path samples;

[0068] It should be noted that the panoramic image is a wide-angle image containing multiple test papers, which is captured by a panoramic camera. The image covers the entire scene and contains all the test papers that need to be collected. The test paper image recognition model is a pre-trained machine learning model that is specifically used to identify the position of the test paper image and provide the best collection path planning. The panoramic image sample is sample data for training the model, and the test paper image position sample is sample data that marks the position of the test paper in the panoramic image to help the model learn how to locate the test paper. The optimal collection path sample is the sample data that contains the best path information for collecting test paper images. The test paper image position is the specific location information of each test paper in the panoramic image. The optimal collection path refers to the most effective path for the lens to move when the system collects test paper images.

[0069] Exemplarily, by acquiring a panoramic image and inputting it into a preset test paper image recognition model, the positions of all test papers in the panoramic image and the optimal acquisition path are obtained. Through the trained model, the preset model to be trained is trained according to the panoramic image samples, the test paper image position samples and the optimal acquisition path samples, thereby achieving efficient and accurate test paper image acquisition.

[0070] For example, in a smart classroom, the invigilator needs to efficiently collect test images of all students after the exam. To achieve this goal, a binocular camera system can be used to automate this process. Specifically, a panoramic image of the classroom is first obtained through a binocular camera. Next, the panoramic image is input into a preset test paper image recognition model. This model is obtained by training a model to be trained with a large amount of training data (including panoramic image samples, test paper image position samples, and optimal acquisition path samples). The model can analyze the feature points in the image, identify the position of the test paper, and calculate the optimal acquisition path to ensure that the lens can move quickly and accurately to the position of each test paper.

[0071] Step S20, based on all the test paper image positions, calculating a close-up adjustment value corresponding to each test paper image position;

[0072] It should be noted that the close-up adjustment values ​​are used to adjust the focus, aperture, exposure and other parameters of the camera in order to capture a clear image of the test paper. These adjustment values ​​are calculated based on the position of the test paper in the panoramic image.

[0073] For example, after obtaining the test paper image position and the optimal acquisition path, the device will further calculate the close-up adjustment value corresponding to each test paper image position. These adjustment values ​​include the focus magnification, optical axis offset, focus magnification and movement value of the lens, etc., to ensure that the lens can be accurately adjusted to the best state to capture clear test paper images.

[0074] Based on the first embodiment of the present application, on this basis, step S20 also includes:

[0075] Obtain the test paper panoramic image area corresponding to each test paper image position;

[0076] Based on the panoramic image area of ​​the test paper, a corresponding close-up focus multiple is calculated;

[0077] Based on the close-up focus magnification, query a preset curve model to obtain a corresponding optical axis offset;

[0078] Based on the position of the test paper image, a preset surface model is queried to obtain a corresponding surface lookup table value;

[0079] Adding the surface lookup table value, the optical axis offset and a preset optical axis parallelism error to calculate a close-up lens movement value;

[0080] The close-up focus magnification and the close-up movement value of each test paper image position are combined to obtain a corresponding close-up adjustment value.

[0081] It should be noted that the test paper panoramic image area is the area occupied by each test paper in the panoramic image. This area information can help the device understand the proportion and position of the test paper in the image for subsequent processing. The close-up focus multiple refers to the magnification that the lens needs to adjust when shooting a close-up image. According to the area of ​​the test paper in the panoramic image, an appropriate focus multiple can be calculated to ensure that the captured test paper image is clear and rich in details. The optical axis offset refers to the offset of the lens optical axis relative to the ideal position. The preset curve model is a mathematical model used to describe the relationship between the focus multiple and the optical axis offset. By querying this model, the offset that the lens optical axis needs to be adjusted under a specific focus multiple can be obtained. The surface lookup table value is a value obtained by querying the preset surface model according to the position of the test paper in the panoramic image. The close-up movement value refers to the distance that the lens needs to move in the horizontal or vertical direction. The movement value is obtained by adding the surface lookup table value, the optical axis offset and the optical axis parallelism error, and is used to ensure that the lens can accurately align with the test paper. The close-up adjustment value is the lens adjustment parameter finally obtained, including the focus multiple and the movement value. These parameters are combined together to guide the lens to automatically adjust to the best state to take a clear test paper image.

[0082] Exemplarily, in a smart classroom, the device queries a preset curve model based on the close-up focus magnification to obtain the corresponding optical axis offset. The curve model is a mathematical model used to describe the relationship between the lens focus magnification and the optical axis offset. Through this model, the device can accurately calculate the distance the lens needs to move to ensure the clarity and accuracy of the image. At the same time, the device queries a preset surface model based on the test paper image position to obtain the corresponding surface lookup table value. The surface model is a mathematical model used to describe the relationship between the position of the test paper in space and the movement of the lens. Through this model, the device can accurately calculate the direction and distance the lens needs to move to ensure the integrity and accuracy of the image. Finally, the device adds the surface lookup table value, the optical axis offset and the preset optical axis parallelism error to calculate the close-up movement value. This movement value contains all the necessary adjustment information and can be used to guide the precise movement of the lens. Combining the close-up focus magnification and the close-up movement value of each test paper image position, the device obtains the corresponding close-up adjustment value. These adjustment values ​​can be used to automatically adjust the focus and position of the camera, thereby achieving accurate shooting and analysis of the test paper. In this way, the device can significantly improve the efficiency and accuracy of test collection and analysis in smart classrooms.

[0083] Step S30, based on all the close-up lens adjustment values ​​and the optimal acquisition path, controlling the close-up lens to acquire all the test paper images.

[0084] It should be noted that the close-up camera is a camera capable of taking high-definition test paper images, with adjustable focal length and other parameters.

[0085] For example, finally, the device automatically controls the close-up camera to sequentially capture images of all test papers based on the calculated close-up adjustment value and optimal acquisition path. This process not only improves acquisition efficiency, but also significantly reduces human operation errors, ensuring that each test paper image can be accurately captured and recorded. In this way, the smart classroom can achieve efficient and accurate test paper image acquisition, significantly improving the efficiency and accuracy of examination management.

[0086] Based on the first embodiment of the present application, on this basis, before step S10, the test paper image acquisition method further includes:

[0087] Obtain panoramic image samples, test paper image position samples and optimal acquisition path samples;

[0088] The panoramic image sample is recognized by using a preset first model to be trained to obtain a test paper image recognition result;

[0089] Based on the test paper image recognition result, determining all target test paper image positions;

[0090] Calculating the recognition losses of all the target test paper image positions and the test paper image position samples to obtain a first loss value;

[0091] If the first loss value does not meet the preset first loss standard, return to the step of identifying the panoramic image sample through the preset model to be trained to obtain the test paper image recognition result, and stop training until the first loss value meets the first loss standard to obtain a test paper recognition model that meets the first loss standard;

[0092] The preset second model to be trained is trained by using the optimal acquisition path samples to obtain a trained path optimization model;

[0093] The test paper recognition model is combined with the path optimization model to obtain a test paper image recognition model.

[0094] It is understandable that the device will identify the panoramic image samples and obtain the test paper image recognition results through the preset first model to be trained. Although this model has not been fully trained, it has already possessed preliminary recognition capabilities. The recognition results contain the location information of each test paper in the examination room. Then, based on these recognition results, the device will determine all the target test paper image positions. These target positions are the positions that the device believes need to be further optimized and adjusted to ensure that the image of each test paper can be accurately captured. In order to evaluate the performance of the model, the device will calculate the recognition loss between all target test paper image positions and the preset test paper image position samples to obtain a first loss value. This loss value reflects the difference between the model recognition result and the real test paper position sample, and is used to determine whether the model has reached the preset training standard. If the first loss value does not meet the preset first loss standard, the device will return to the step of identifying the panoramic image samples through the preset model to be trained, and continue training and optimization. This process will be repeated until the first loss value meets the first loss standard and the training is stopped, and finally a test paper recognition model that meets the first loss standard is obtained. At the same time, the device will also use the optimal acquisition path sample to train the preset second model to be trained to obtain a trained path optimization model. This model can find the most efficient and accurate lens movement path to achieve efficient test paper image acquisition. Finally, the test paper recognition model is combined with the path optimization model to obtain the test paper image recognition model. This comprehensive model can not only accurately identify the test paper position, but also optimize the lens movement path, thereby significantly improving acquisition efficiency and accuracy.

[0095] In a feasible implementation manner, after the step of training the preset second to-be-trained model by using the optimal acquisition path sample to obtain a trained path optimization model, the step further includes:

[0096] Numbering each target test paper image position, performing acquisition path planning for all target test paper image positions through a preset second to-be-trained model, and obtaining a target path planning;

[0097] Calculating the recognition loss of the target path planning and the optimal collection path sample to obtain a second loss value;

[0098] If the second loss value does not meet the preset second loss standard, then return to number each target test paper image position, and use the preset second model to be trained to perform acquisition path planning for all target test paper image positions to obtain the target path planning steps. The training is stopped until the second loss value meets the second loss standard to obtain a path optimization model that meets the second loss standard.

[0099] It can be understood that the device first numbers each target test paper image position, which is equivalent to assigning a unique identifier to each question or answer area on the test paper. Then, the device uses a preset second model to be trained to plan the acquisition path for all target test paper image positions. Next, the device calculates the recognition loss of the target path planning and the optimal acquisition path sample to obtain a second loss value. The recognition loss refers to the difference between the path predicted by the device's model and the optimal path. The smaller the difference, the better the model performance of the device. If the calculated second loss value does not meet the preset second loss standard, the device needs to renumber each target test paper image position, and again use the preset second model to plan the acquisition path for all target test paper image positions to obtain a new target path plan. This process will continue until the second loss value meets the second loss standard and the training is stopped, and a path optimization model that meets the second loss standard is finally obtained.

[0100] Based on the first embodiment of the present application, on this basis, before step S10, the test paper image acquisition method further includes:

[0101] Determine the target panoramic image according to the preset shooting height;

[0102] Determining the panoramic coordinates and the corresponding close-up angle of the target panoramic image;

[0103] Establishing a surface model of the current shooting height according to the panoramic coordinates and the close-up angle;

[0104] Calibrate the optical axis for different zoom values ​​of the close-up image, fit the deviation angles of the different zoom values, and obtain a corresponding curve model;

[0105] The panoramic lens and the close-up lens are calibrated to be parallel to each other in optical axis centers, and an optical axis parallelism error is obtained.

[0106] It can be understood that first, the device determines the target panoramic image according to the preset shooting height. This step is similar to setting an optimal shooting position and angle for the camera so that the camera can capture the complete image of the entire test paper. Next, the device determines the panoramic coordinates and the corresponding close-up angle of the target panoramic image. This is equivalent to assigning a unique identifier to each question or answer area on the test paper and determining the angle that the camera needs to adjust when shooting these areas. Then, the device establishes a surface model of the current shooting height according to the panoramic coordinates and the close-up angle. This surface model can help the device understand the image distortion captured by the camera at different angles and heights, so as to make corresponding corrections. In order to further improve the accuracy of image acquisition, the device calibrates the optical axis for different zoom values ​​of the close-up camera, fits the deviation angle of the different zoom values, and obtains the corresponding curve model. This process is similar to calibrating the zoom function of the camera to ensure that the camera can accurately capture the details of the test paper at different zoom multiples. Finally, the device calibrates the optical axis center parallelism of the panoramic lens and the close-up camera to obtain the optical axis parallelism error. This step is to ensure that the optical axis centers of the panoramic lens and the close-up camera remain parallel, thereby reducing the error when the image is superimposed. Through the above steps, the device can ensure that the camera in the smart classroom can efficiently and accurately capture the test paper image and provide high-quality input data.

[0107] Based on the first embodiment of the present application, on this basis, after step S30, the test paper image acquisition method further includes:

[0108] Get the historical collection images of the previous round;

[0109] Perform pixel sampling comparison between the test paper image and the historical collection image;

[0110] If there are large areas of pixels that are identical between the test paper image and the historically collected image, a reminder message indicating that the test paper has not been turned over is sent.

[0111] It can be understood that, first, the device obtains the historical acquisition images of the previous round. This step is to ensure that the camera can efficiently and accurately acquire test paper images and provide high-quality input data. Next, the device performs pixel sampling comparison on the test paper image and the historical acquisition image. This is equivalent to assigning a unique identifier to each question or answer area on the test paper, and determining the angle that the camera needs to adjust when shooting these areas. If there is a large area of ​​pixels that are the same as the historical acquisition image, a reminder message that the test paper has not been turned over is sent. This step is to ensure that the optical axis centers of the panoramic lens and the close-up lens remain parallel, thereby reducing errors when images are superimposed.

[0112] For example, in order to help understand the implementation process of the test paper image acquisition method obtained by combining this embodiment with the above embodiments, please refer to Figure 3 , Figure 3 A brief flow chart of a test paper image acquisition method is provided, specifically:

[0113] The process of collecting test paper images by the smart classroom camera is as follows: First, the model identifies the positions of all the papers on the table under the panoramic lens and numbers them. Figure 2 . Next, an optimal path is obtained according to the optimal path algorithm. Then, the papers are collected one by one according to the optimal path. During the collection process, the zoom factor is calculated according to the size of the paper in the panoramic view, and the offset is obtained. After that, the adjustment value of the pan / tilt movement of the paper in the close-up is calculated. Finally, the close-up shot of the paper is taken and uploaded to the host computer for text recognition. If all the collection is completed, the whole process ends.

[0114] It can be understood that the present application uses panoramic image samples, test paper image position samples and optimal acquisition path samples to train the preset model to be trained, and uses the trained test paper image acquisition model to perform test paper image acquisition on the panoramic image, obtain the test paper image position and the optimal acquisition path, calculate the corresponding close-up adjustment value, and then control the close-up camera to acquire all test paper images, thereby realizing automatic acquisition of test paper images, and by calculating the close-up adjustment value, the success rate of test paper image acquisition is improved, thereby improving the test paper image acquisition efficiency and achieving a significant improvement in the reliability of test paper image acquisition.

[0115] This application also provides a test paper image acquisition device, please refer to Figure 4 , the test paper image acquisition device comprises:

[0116] The recognition module 10 is used to obtain a panoramic image, input the panoramic image into a preset test paper image recognition model, and obtain all test paper image positions and optimal acquisition paths in the panoramic image, wherein the test paper image recognition model is obtained by training a preset to-be-trained model with panoramic image samples, test paper image position samples, and optimal acquisition path samples;

[0117] A calculation module 20, configured to calculate a close-up adjustment value corresponding to each of the test paper image positions based on all of the test paper image positions;

[0118] The control module 30 is used to control the close-up camera to capture all the test paper images based on all the close-up camera adjustment values ​​and the optimal capture path.

[0119] And / or, the calculation module 20 includes:

[0120] The first acquisition module is used to acquire the test paper panoramic image area corresponding to each test paper image position;

[0121] A first calculation module, configured to calculate a corresponding close-up focus multiple based on the panoramic image area of ​​the test paper;

[0122] A first query module is used to query a preset curve model based on the close-up focus magnification to obtain a corresponding optical axis offset;

[0123] A second query module is used to query a preset surface model based on the position of the test paper image to obtain a corresponding surface lookup table value;

[0124] A second calculation module is used to add the surface table lookup value, the optical axis offset and a preset optical axis parallelism error to calculate a close-up movement value;

[0125] The first combination module is used to combine the close-up focus magnification and the close-up movement value of each test paper image position to obtain a corresponding close-up adjustment value.

[0126] And / or, the test paper image acquisition device comprises:

[0127] The third acquisition module is used to obtain panoramic image samples, test paper image position samples and optimal acquisition path samples;

[0128] A first recognition module, used to recognize the panoramic image sample by using a preset first model to be trained to obtain a test paper image recognition result;

[0129] A first determination module, used to determine the positions of all target test paper images based on the test paper image recognition result;

[0130] A third calculation module is used to calculate the recognition loss of all the target test paper image positions and the test paper image position samples to obtain a first loss value;

[0131] A first loop module, configured to return to the step of identifying the panoramic image sample through a preset model to be trained to obtain a test paper image recognition result if the first loss value does not meet a preset first loss standard, and stop training until the first loss value meets the first loss standard to obtain a test paper recognition model that meets the first loss standard;

[0132] A first training module is used to train a preset second to-be-trained model using the optimal acquisition path samples to obtain a trained path optimization model;

[0133] The second combination module is used to combine the test paper recognition model with the path optimization model to obtain a test paper image recognition model.

[0134] And / or, the first training module includes:

[0135] The first numbering module is used to number each target test paper image position, and perform acquisition path planning for all target test paper image positions through a preset second to-be-trained model to obtain a target path planning;

[0136] A fourth calculation module, used to calculate the recognition loss of the target path planning and the optimal collection path sample to obtain a second loss value;

[0137] The second loop module is used to return to number each target test paper image position if the second loss value does not meet the preset second loss standard, and to perform acquisition path planning for all target test paper image positions through the preset second model to be trained to obtain the target path planning steps, and to stop training after the second loss value meets the second loss standard to obtain a path optimization model that meets the second loss standard.

[0138] And / or, the test paper image acquisition device comprises:

[0139] A second determination module is used to determine a target panoramic image according to a preset shooting height;

[0140] A third determination module, used to determine the panoramic coordinates and the corresponding close-up angle of the target panoramic image;

[0141] A first calibration module, used to establish a surface model of a current shooting height according to the panoramic coordinates and the close-up angle;

[0142] A second calibration module is used to calibrate the optical axis for different zoom values ​​of the close-up image, and to fit the deviation angles of the different zoom values ​​to obtain a corresponding curve model;

[0143] The third calibration module is used to calibrate the optical axis centers of the panoramic lens and the close-up lens in parallel to obtain an optical axis parallelism error.

[0144] And / or, the test paper image acquisition device comprises:

[0145] The fourth acquisition module is used to acquire the historical acquisition images of the previous round;

[0146] A first comparison module, used for performing pixel sampling comparison between the test paper image and the historical collection image;

[0147] The first reminder module is used to send a reminder message that the test paper has not been turned over if there is a large area of ​​pixels that are the same as the historically collected image.

[0148] The test paper image acquisition device provided by the present application adopts the test paper image acquisition method in the above embodiment, which can solve the technical problem of low acquisition efficiency of test paper image acquisition. Compared with the prior art, the beneficial effects of the test paper image acquisition device provided by the present application are the same as the beneficial effects of the test paper image acquisition method provided by the above embodiment, and other technical features in the test paper image acquisition device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0149] The present application provides a camera, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the test paper image acquisition method in the above-mentioned embodiment one.

[0150] Reference below Figure 5 , which shows a schematic diagram of the structure of a camera suitable for implementing the embodiment of the present application. The camera in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, tablet computers, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The camera shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0151] like Figure 5As shown, the camera may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for camera operation are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the camera to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a camera with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0152] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0153] The camera provided by the present application adopts the test paper image acquisition method in the above embodiment, which can solve the technical problem of low acquisition efficiency of test paper image acquisition. Compared with the prior art, the beneficial effects of the camera provided by the present application are the same as the beneficial effects of the test paper image acquisition method provided by the above embodiment, and other technical features in the camera are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0154] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0155] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0156] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the test paper image acquisition method in the above-mentioned embodiment.

[0157] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.

[0158] The computer-readable storage medium may be included in the camera; or may exist independently without being installed in the camera.

[0159] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the camera, the camera: obtains historical purchase types and corresponding historical purchase amounts; based on a preset test paper image acquisition model, performs test paper image acquisition on the historical purchase types and the historical purchase amounts to obtain test paper image acquisition results, wherein the test paper image acquisition model is obtained by training a preset model to be trained using purchase history samples and corresponding real purchase labels.

[0160] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0161] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0162] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0163] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned test paper image acquisition method, and can solve the technical problem of low acquisition efficiency of test paper image acquisition. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the test paper image acquisition method provided in the above-mentioned embodiment, and will not be described in detail here.

[0164] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned test paper image acquisition method when executed by a processor.

[0165] The computer program product provided by the present application can solve the technical problem of low acquisition efficiency of test paper image acquisition. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the test paper image acquisition method provided by the above embodiment, which will not be repeated here.

[0166] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A test paper image acquisition method, characterized in that: The method includes: Obtain panoramic image samples, test paper image position samples and optimal acquisition path samples; The panoramic image sample is recognized by using a preset first model to be trained to obtain a test paper image recognition result; Based on the test paper image recognition result, determining all target test paper image positions; Calculating the recognition losses of all the target test paper image positions and the test paper image position samples to obtain a first loss value; If the first loss value does not meet the preset first loss standard, return to the step of identifying the panoramic image sample through the preset model to be trained to obtain the test paper image recognition result, and stop training until the first loss value meets the first loss standard to obtain a test paper recognition model that meets the first loss standard; The preset second model to be trained is trained by using the optimal acquisition path samples to obtain a trained path optimization model; Numbering each target test paper image position, performing acquisition path planning for all target test paper image positions through a preset second to-be-trained model, and obtaining a target path planning; Calculating the recognition loss of the target path planning and the optimal collection path sample to obtain a second loss value; If the second loss value does not meet the preset second loss standard, then return to number each target test paper image position, perform acquisition path planning for all target test paper image positions through the preset second model to be trained, and obtain the target path planning step, until the second loss value meets the second loss standard, stop training, and obtain a path optimization model that meets the second loss standard; Combining the test paper recognition model with the path optimization model to obtain a test paper image recognition model; Acquire a panoramic image, input the panoramic image into a preset test paper image recognition model, and obtain all test paper image positions and optimal acquisition paths in the panoramic image, wherein the test paper image recognition model is obtained by training a preset to-be-trained model with panoramic image samples, test paper image position samples, and optimal acquisition path samples; Obtain the test paper panoramic image area corresponding to each test paper image position; Based on the panoramic image area of ​​the test paper, a corresponding close-up focus multiple is calculated; Based on the close-up focus magnification, query a preset curve model to obtain a corresponding optical axis offset; Based on the position of the test paper image, a preset surface model is queried to obtain a corresponding surface lookup table value; Adding the surface lookup table value, the optical axis offset and a preset optical axis parallelism error to calculate a close-up lens movement value; Combining the close-up focus magnification and the close-up movement value of each test paper image position to obtain a corresponding close-up adjustment value; Based on all the close-up adjustment values ​​and the optimal acquisition path, the close-up camera is controlled to acquire all the test paper images.

2. The method according to claim 1, characterized in that The step of obtaining a panoramic image also includes: Determine the target panoramic image according to the preset shooting height; Determining the panoramic coordinates and the corresponding close-up angle of the target panoramic image; Establishing a surface model of the current shooting height according to the panoramic coordinates and the close-up angle; Calibrate the optical axis for different zoom values ​​of the close-up image, fit the deviation angles of the different zoom values, and obtain a corresponding curve model; The panoramic lens and the close-up lens are calibrated to be parallel to each other in optical axis centers, and an optical axis parallelism error is obtained.

3. The method according to claim 1, characterized in that After the step of controlling the close-up lens to capture all the test paper images based on all the close-up lens adjustment values ​​and the optimal capture path, the following step further comprises: Get the historical collection images of the previous round; Perform pixel sampling comparison between the test paper image and the historical collection image; If there are large areas of pixels that are identical between the test paper image and the historically collected image, a reminder message indicating that the test paper has not been turned over is sent.

4. A test paper image acquisition device, characterized in that: The device comprises: The third acquisition module is used to obtain panoramic image samples, test paper image position samples and optimal acquisition path samples; A first recognition module, used to recognize the panoramic image sample by using a preset first model to be trained to obtain a test paper image recognition result; A first determination module, used to determine the positions of all target test paper images based on the test paper image recognition result; A third calculation module is used to calculate the recognition loss of all the target test paper image positions and the test paper image position samples to obtain a first loss value; A first loop module, configured to return to the step of identifying the panoramic image sample through a preset model to be trained to obtain a test paper image recognition result if the first loss value does not meet a preset first loss standard, and stop training until the first loss value meets the first loss standard to obtain a test paper recognition model that meets the first loss standard; The first numbering module is used to number each target test paper image position, and perform acquisition path planning for all target test paper image positions through a preset second to-be-trained model to obtain a target path planning; A fourth calculation module, used to calculate the recognition loss of the target path planning and the optimal collection path sample to obtain a second loss value; A second loop module is used for returning to number each target test paper image position if the second loss value does not meet the preset second loss standard, performing acquisition path planning for all target test paper image positions through a preset second model to be trained, and obtaining a target path planning step, until the second loss value meets the second loss standard and stops training, and obtains a path optimization model that meets the second loss standard; A second combination module is used to combine the test paper recognition model with the path optimization model to obtain a test paper image recognition model; A recognition module is used to obtain a panoramic image, input the panoramic image into a preset test paper image recognition model, and obtain all test paper image positions and optimal acquisition paths in the panoramic image, wherein the test paper image recognition model is obtained by training a preset to-be-trained model with panoramic image samples, test paper image position samples, and optimal acquisition path samples; The first acquisition module is used to acquire the test paper panoramic image area corresponding to each test paper image position; A first calculation module, configured to calculate a corresponding close-up focus multiple based on the panoramic image area of ​​the test paper; A first query module is used to query a preset curve model based on the close-up focus magnification to obtain a corresponding optical axis offset; A second query module is used to query a preset surface model based on the position of the test paper image to obtain a corresponding surface lookup table value; A second calculation module is used to add the surface table lookup value, the optical axis offset and a preset optical axis parallelism error to calculate a close-up movement value; A first combining module, used for combining the close-up focus magnification and the close-up movement value of each test paper image position to obtain a corresponding close-up adjustment value; A control module is used to control the close-up camera to capture all test paper images based on all the close-up camera adjustment values ​​and the optimal capture path.

5. A camera, characterized in that: The camera comprises: a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the test paper image acquisition method as described in any one of claims 1 to 3.

6. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the test paper image acquisition method according to any one of claims 1 to 3 are implemented.

7. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the test paper image acquisition method according to any one of claims 1 to 3 are implemented.

Citation Information

Patent Citations

  • Lens switching method, device and equipment and computer readable storage medium

    CN111131713A