Target pattern occlusion processing method and system based on variable focal wide-view camera
By deploying multiple variable focal length cameras in the classroom, a monitoring field of view network is constructed and a unified coordinate system is established. The best camera is intelligently selected, which solves the problems of occlusion and unstable image quality in the classroom monitoring system and achieves efficient and reliable image acquisition and automated processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG LEZHE DIGITAL INTELLIGENCE TECHNOLOGY CO LTD
- Filing Date
- 2025-10-14
- Publication Date
- 2026-06-19
AI Technical Summary
In existing classroom monitoring systems, fixed-view cameras are easily obstructed, multi-camera systems lack coordination, and image quality assessment lacks automation, resulting in low efficiency and unstable image availability.
The target image occlusion processing method based on variable focal width and field of view cameras constructs a monitoring field of view network by deploying multiple variable focal width and field of view camera devices, establishes a unified coordinate system, intelligently selects the best camera, introduces image quality assessment and dynamic re-shooting mechanism, and forms a closed-loop feedback system.
It achieves blind-spot-free monitoring, ensures successful first-time shooting, improves the automation and reliability of image acquisition, reduces repetitive manual operations, and improves image quality and acquisition efficiency.
Smart Images

Figure CN121304775B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of image occlusion processing, and in particular to a target image occlusion processing method and system based on a variable focal width angle camera. Background Technology
[0002] Image acquisition and processing technology plays an increasingly important role in modern education, especially in applications such as online exams, assignment submissions, and classroom behavior analysis, which require clear and accurate image capture of specific student desktops (such as test papers and workbooks). Traditional image acquisition methods typically rely on fixed surveillance cameras deployed in classrooms or handheld devices for manual shooting.
[0003] Currently, most common classroom monitoring systems use fixed-point deployed wide-angle cameras or PTZ cameras. Wide-angle cameras have a large field of view and can cover a wide area, but they suffer from severe edge distortion, insufficient resolution for distant targets, and cannot flexibly adjust the viewing angle to avoid obstructions. While PTZ cameras can rotate, their physical movement speed is slow, and they cannot simultaneously cover multiple areas, making it difficult to meet the need for rapid, concurrent image acquisition of multiple specific targets. When it is necessary to take a close-up shot of a specific student's desk, the above solutions are prone to partial or complete obstruction of the target due to other students' activities, desks and chairs, or poor shooting angles, rendering the acquired image unusable.
[0004] To address the occlusion problem, existing technologies employ multiple cameras. However, these solutions often simply increase coverage by adding more cameras, lacking collaborative management and intelligent scheduling of these multiple camera resources. Manual intervention is usually still required, such as operators manually selecting unobstructed camera angles or manually controlling the pan-tilt unit to avoid obstacles. This approach is inefficient, slow, and reliant on operator experience, making it difficult to achieve automated, real-time, and accurate image acquisition.
[0005] Furthermore, existing systems often lack the ability to automatically assess image quality. Whether a captured image is clear, complete, and usable usually requires manual post-capture inspection, and it is impossible to determine and trigger a re-capture mechanism in real time during the acquisition phase. This may result in the best opportunity for re-capture being missed (such as during an exam) when image quality problems (such as blurriness, occlusion, or distortion) are discovered, or additional manpower and time may be required for repeated acquisition.
[0006] Therefore, existing technologies suffer from problems such as occlusion due to fixed viewing angles and poor flexibility, inefficiency due to insufficient coordination of multi-camera systems, and unreliable image availability due to the lack of automated quality assessment and reshoot mechanisms. Summary of the Invention
[0007] To overcome the problems of limited viewing angle, easy occlusion, unstable image quality, and low efficiency of manual adjustment in existing technologies when acquiring images of specific desktop targets in complex environments such as classrooms, this application provides a target image occlusion processing method and system based on a variable focal width viewing angle camera.
[0008] The above-mentioned objective of this application is achieved through the following technical solution:
[0009] A target image occlusion processing method based on a variable focal width field of view camera, the method comprising the following steps:
[0010] Based on the distribution of student seats in the classroom, multiple variable focal width angle cameras are deployed to construct a monitoring field of view network for the monitoring area, and the initial position images of each camera are collected.
[0011] Based on the initial position image, feature information of all student desktops is identified and extracted. The relative spatial position relationship between each camera device is calculated based on the feature information, and a unified coordinate system is established to map each desktop into the coordinate system.
[0012] When it is necessary to photograph a specific target desktop, one or more candidate camera devices that can photograph the desktop are queried according to the coordinate system, and the optimal main camera device is determined from the candidate camera devices based on the preset image scoring rules.
[0013] The system acquires the original image captured by the main camera device, performs content analysis and image quality assessment on the original image to obtain an image quality score. If the image quality score meets the standard, the processed image is output; otherwise, a dynamic reshoot mechanism is triggered.
[0014] By adopting the above technical solution, multiple variable focal width and angle-of-view cameras are adaptively deployed in the classroom according to the student seating distribution, thereby constructing a blind-spot-free monitoring network for the classroom. This lays the hardware foundation for subsequent multi-view collaborative shooting. By acquiring initial images and establishing a unified coordinate system, the desktop in the physical space is digitally mapped to the camera's field of view, realizing global management of shooting resources. When shooting is required, the system can intelligently select the best angle from multiple candidate cameras, effectively avoiding obstructions and ensuring the success rate of the first shot. The introduced image quality assessment and dynamic reshoot mechanism constitute a closed-loop feedback system, ensuring that the final output image meets the predetermined standards in terms of content clarity, completeness, and usability. This greatly reduces repetitive manual operations caused by image quality issues and improves the automation and reliability of the entire image acquisition process.
[0015] In a preferred embodiment, this application can be further configured as follows: The deployment of multiple variable focal length cameras based on the student seating distribution within the classroom, constructing a monitoring field-of-view network for the monitored area, and acquiring initial position images of each camera device, specifically includes:
[0016] Based on the actual layout of the classroom and the row and column distribution of the students' desks, determine the installation location and number of camera devices to ensure that any desk is covered by the field of view of at least one camera device, forming a monitoring area;
[0017] For each camera device, an initial shooting angle and focal length are preset and defined as the initial position. The initial position images of all camera devices are then acquired.
[0018] Desktop target detection is performed based on the acquired initial position image. All desktop regions in the initial position image are identified, and the detected desktop regions are masked to obtain the processed initial position image.
[0019] By adopting the above technical solutions and deploying them specifically according to the classroom layout, the full coverage of the monitoring network is ensured from the source, eliminating blind spots in the shooting. Presetting the initial position and acquiring images provides a stable and consistent data source for subsequent feature extraction and coordinate system calibration. Desktop target detection and masking processing of the images effectively filter background interference, highlighting key targets (desktops), significantly improving the accuracy and efficiency of subsequent feature matching, and providing clean data input for accurately establishing spatial mapping relationships.
[0020] In a preferred embodiment, this application can be further configured as follows: The step of identifying and extracting feature information of all student desktops based on the initial position image, calculating the relative spatial position relationship between each camera device based on the feature information, and establishing a unified coordinate system to map each desktop into the coordinate system specifically includes:
[0021] The scale-invariant feature transform algorithm was used to extract feature points from the processed initial bit images of each camera device to obtain multiple sets of feature point description data.
[0022] The multiple sets of feature point description data are matched pairwise to find the corresponding feature points belonging to the same desktop in different images;
[0023] Based on the successfully matched feature point pairs, the homography matrix between adjacent camera device images is calculated, and the relative pose and distance between each camera device are derived.
[0024] Using a fixed corner point in the classroom as the origin, and combining the relative poses and distances between each camera device, a unified coordinate system is constructed. The field of view of each desktop and each camera device is then mapped into the coordinate system, forming a database of desktop-camera device mapping relationships.
[0025] By adopting the above technical solution and using scale-invariant feature extraction algorithms such as SIFT, stable and reliable feature points can be extracted under different perspectives and spatial levels. Through feature matching and homography matrix calculation, the spatial relative relationship between cameras can be solved with high precision. This is the core of realizing multi-view collaboration and intelligent angle selection. Constructing a unified coordinate system and forming a mapping relationship database is equivalent to creating a "digital twin" virtual monitoring space, enabling the system to globally and quantitatively perceive and schedule cameras and desktop targets in the physical space, providing crucial spatial information support for subsequent intelligent decision-making.
[0026] In a preferred embodiment, this application can be further configured as follows: the step of querying one or more candidate camera devices that can capture images of the desktop according to the coordinate system, and determining the optimal main camera device among the candidate camera devices based on a preset image scoring rule, specifically includes:
[0027] Based on the coordinate system, all candidate camera devices capable of capturing images of the target desktop are determined, and the proportion of the target desktop's image area in the images captured by each candidate camera device is calculated to form an image area score.
[0028] Calculate the Euclidean distance between the center point of the target desktop and the optical center of each candidate camera device in the coordinate system to form a distance score;
[0029] Based on the imaging area score and distance score, all candidate camera devices are weighted and ranked, and the camera device with the highest ranking is selected as the main camera device.
[0030] By adopting the above technical solution and querying based on a pre-established mapping database, it is possible to quickly and accurately locate all cameras that may cover the target, thereby improving decision-making efficiency. By comprehensively considering two key factors, namely imaging area (which directly affects the size and clarity of the target in the image) and shooting distance (which affects perspective distortion and image details), a weighted score is applied, making the selection decision of the main camera device more scientific and comprehensive. It can proactively select the theoretically best angle for imaging effect from multiple feasible options, thereby prioritizing the acquisition of high-quality original images, improving image quality from the source, and reducing the reliance on subsequent image enhancement or reshooting.
[0031] In a preferred embodiment, this application can be further configured as follows: acquiring the original image captured by the main camera device, performing content analysis and image quality assessment on the original image, and obtaining an image quality score, specifically includes:
[0032] The original image is subjected to paper target detection. If no paper is detected or the paper area accounts for too low a percentage of the image, the shooting is directly determined to be a failure.
[0033] When paper is detected in the original image, the detected paper area is segmented, its edge contour is extracted, and the concave features of the contour shape are obtained.
[0034] Human body part detection is performed on the original image to determine whether the paper edge is stuck to the human body part, and an adhesion feature is generated.
[0035] Calculate the sharpness of the text edges within the paper area and the number of detected characters, and generate paper text features based on the text edge sharpness and the number of characters;
[0036] An image quality score is generated based on the indentation features, adhesion features, and paper text features.
[0037] By adopting the above technical solution, a multi-dimensional and multi-level image quality assessment system was constructed. First, the presence of the target (paper) was quickly detected for initial screening. Then, a detailed assessment was conducted from three dimensions: physical morphology (indentation indicating folding or bending), occlusion (adhesion indicating human occlusion), and content quality (text sharpness and quantity indicating clarity and information integrity). This assessment method closely matches the core requirements for image quality in practical application scenarios, such as examinations and homework collection. It can comprehensively and accurately quantify the usability of images, providing an objective and reliable basis for decision-making on whether to trigger a re-shooting mechanism, and avoiding subjective misjudgment.
[0038] In a preferred embodiment, this application can be further configured such that the triggered dynamic replay mechanism specifically includes:
[0039] When the image quality score is lower than the qualified threshold, it is determined that the shooting effect is poor. The coordinate system is queried. If the target desktop is only mapped to one candidate camera device, the main camera device is controlled again to adjust the focus and angle for reshooting after a certain interval.
[0040] If the target desktop is mapped to multiple candidate camera devices in the coordinate system, the weighted and sorted candidate camera device group is invoked, and the second-best camera device is selected for reshooting.
[0041] Acquire newly captured images, compare the quality scores of the newly captured images with those of the original images, and select the image with the highest quality score as the output.
[0042] By adopting the above technical solution, differentiated reshooting plans are formulated based on available camera resources: parameter adjustments are attempted when using a single camera; when using multiple cameras, alternative perspectives are decisively switched, improving the success rate and efficiency of reshooting. Finally, through quality comparison, the optimal image is automatically selected for output, ensuring the reliability of the final result. The entire process requires no manual intervention, forming a complete automated closed loop of "shooting-evaluation-decision-reshooting-output," significantly improving the system's robustness and user experience.
[0043] In a preferred embodiment, this application can be further configured such that, prior to the output of the processed image, the target image occlusion processing method based on a variable focal width angle camera further includes:
[0044] High-quality images are obtained based on quality image scores. Paper outlines are extracted from the high-quality images. The perspective transformation matrix of the paper outlines is calculated. Perspective correction is performed on the paper areas in the selected high-quality images to obtain a distortion-free front view.
[0045] The text line direction of the front view is detected and rotated to make the text line horizontal.
[0046] The contrast and brightness of the front view are adjusted based on the adaptive histogram equalization algorithm to enhance the contrast between the paper background and the text area.
[0047] The processed front view is cropped into a standard document image containing only the target paper area and then output and stored in parallel.
[0048] By adopting the above technical solutions, a series of post-processing optimizations were performed on the qualified images, further improving the standardization and usability of the images. Perspective correction eliminated geometric distortions caused by the shooting angle, restoring the document to a front view. Horizontal rotation of text lines made the document content conform to reading habits, facilitating subsequent manual review or OCR recognition. Adaptive histogram equalization optimized the image contrast and enhanced the legibility of the text, especially under uneven lighting conditions. Finally, standardized document images were cropped and output, resulting in uniform output specifications, clean backgrounds, and prominent content, greatly meeting the requirements for input image quality in subsequent archiving, recognition, and review applications.
[0049] Secondly, the above-mentioned inventive objective of this application is achieved through the following technical solutions:
[0050] A target image occlusion processing system based on a variable focal width angle-of-view camera, the target image occlusion processing system based on a variable focal width angle-of-view camera includes:
[0051] The camera deployment module is used to deploy multiple variable focal width angle cameras based on the distribution of student seats in the classroom, construct a monitoring field of view network for the monitoring area, and acquire initial position images of each camera.
[0052] The coordinate system construction module is used to identify and extract feature information of all student desktops based on the initial position image, calculate the relative spatial position relationship between each camera device based on the feature information, and establish a unified coordinate system to map each desktop into the coordinate system.
[0053] The main camera device determination module is used to identify and extract feature information of all student desktops based on the initial position image, calculate the relative spatial position relationship between each camera device based on the feature information, and establish a unified coordinate system to map each desktop into the coordinate system.
[0054] The image quality assessment module is used to acquire the original image captured by the main camera device, perform content analysis and image quality assessment on the original image to obtain an image quality score. When the image quality score meets the standard, the processed image is output; otherwise, a dynamic reshoot mechanism is triggered.
[0055] By adopting the above technical solution, multiple variable focal width and angle-of-view cameras are adaptively deployed in the classroom according to the student seating distribution, thereby constructing a blind-spot-free monitoring network for the classroom. This lays the hardware foundation for subsequent multi-view collaborative shooting. By acquiring initial images and establishing a unified coordinate system, the desktop in the physical space is digitally mapped to the camera's field of view, realizing global management of shooting resources. When shooting is required, the system can intelligently select the best angle from multiple candidate cameras, effectively avoiding obstructions and ensuring the success rate of the first shot. The introduced image quality assessment and dynamic reshoot mechanism constitute a closed-loop feedback system, ensuring that the final output image meets the predetermined standards in terms of content clarity, completeness, and usability. This greatly reduces repetitive manual operations caused by image quality issues and improves the automation and reliability of the entire image acquisition process.
[0056] Thirdly, the above-mentioned objectives of this application are achieved through the following technical solutions:
[0057] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the target image occlusion processing method based on a variable focal width angle camera described above.
[0058] Fourthly, the above-mentioned objectives of this application are achieved through the following technical solutions:
[0059] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the target image occlusion processing method based on a variable focal width angle camera.
[0060] In summary, this application includes at least one of the following beneficial technical effects:
[0061] 1. Based on the student seating arrangement in the classroom, multiple variable focal width and viewing angle cameras are adaptively deployed to construct a blind-spot-free monitoring network for the classroom, laying the hardware foundation for subsequent multi-view collaborative shooting. By acquiring initial images and establishing a unified coordinate system, the desktop in the physical space is digitally mapped to the camera's field of view, realizing global management of shooting resources. When shooting is required, the system can intelligently select the best angle from multiple candidate cameras, effectively avoiding obstructions and ensuring the success rate of the first shot. The introduced image quality assessment and dynamic reshoot mechanism constitute a closed-loop feedback system, ensuring that the final output image meets the predetermined standards in terms of content clarity, completeness, and usability. This greatly reduces repetitive manual operations caused by image quality issues and improves the automation and reliability of the entire image acquisition process.
[0062] 2. Based on a pre-established mapping database, queries can quickly and accurately locate all cameras that may cover the target, improving decision-making efficiency. By comprehensively considering two key factors, imaging area (which directly affects the size and clarity of the target in the image) and shooting distance (which affects perspective distortion and image details), a weighted score is applied, making the selection of the main camera device more scientific and comprehensive. It can proactively select the theoretically best angle for imaging from multiple feasible options, thereby prioritizing the acquisition of high-quality original images, improving image quality from the source, and reducing the reliance on subsequent image enhancement or reshooting.
[0063] 3. By employing scale-invariant feature extraction algorithms such as SIFT, stable and reliable feature points can be extracted under different viewpoints and spatial levels. Through feature matching and homography matrix calculation, the spatial relative relationship between cameras can be solved with high precision. This is the core of realizing multi-view collaboration and intelligent angle selection. Constructing a unified coordinate system and forming a mapping relationship database is equivalent to creating a "digital twin" virtual monitoring space, enabling the system to globally and quantitatively perceive and schedule cameras and desktop targets in the physical space, providing crucial spatial information support for subsequent intelligent decision-making.
[0064] 4. Quickly detect the presence of the target (paper) for initial screening, and then conduct a detailed evaluation from three dimensions: physical morphology (indentation indicates folding or bending), occlusion (adhesion indicates human occlusion), and content quality (text sharpness and quantity indicate clarity and information integrity). This evaluation method closely matches the core requirements for image quality in actual application scenarios, such as exams and homework collection. It can comprehensively and accurately quantify the usability of the image, providing an objective and reliable basis for decision-making on whether to trigger the re-shooting mechanism, and avoiding subjective misjudgment. Attached Figure Description
[0065] Figure 1 This is a flowchart of a target image occlusion processing method based on a variable focal width angle camera in one embodiment of this application;
[0066] Figure 2 This is a flowchart illustrating the implementation of step S10 in a target image occlusion processing method based on a variable focal width angle camera in one embodiment of this application.
[0067] Figure 3 This is a flowchart illustrating the implementation of step S20 in a target image occlusion processing method based on a variable focal width angle camera in one embodiment of this application.
[0068] Figure 4 This is a flowchart illustrating the implementation of step S30 in a target image occlusion processing method based on a variable focal width angle camera in one embodiment of this application.
[0069] Figure 5 This is a flowchart illustrating the implementation of step S40 in a target image occlusion processing method based on a variable focal width angle camera in one embodiment of this application.
[0070] Figure 6 This is another implementation flowchart of step S40 in the target image occlusion processing method based on a variable focal width angle camera in one embodiment of this application;
[0071] Figure 7 This is another implementation flowchart of the target image occlusion processing method based on a variable focal width angle camera in one embodiment of this application;
[0072] Figure 8 This is a principle block diagram of a target image occlusion processing system based on a variable focal width angle camera in one embodiment of this application;
[0073] Figure 9 This is a schematic diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0074] The present application will be further described in detail below with reference to the accompanying drawings.
[0075] In one embodiment, such as Figure 1 As shown, this application discloses a target image occlusion processing method based on a variable focal width field-of-view camera, which specifically includes the following steps:
[0076] S10: Based on the distribution of student seats in the classroom, deploy multiple variable focal width angle cameras to construct a monitoring field of view network for the monitoring area and collect the initial position images of each camera.
[0077] Specifically, in a classroom environment, based on the actual arrangement of student seating, such as the number of rows and columns and spacing, multiple camera devices with zoom and wide-angle functions are reasonably deployed on the top or side walls of the classroom to ensure that each student's desk is covered by the field of view of at least one camera device, forming a monitoring area without blind spots, thereby forming a complete monitoring network.
[0078] Furthermore, based on an initial shooting angle and focal length preset for each camera device, i.e., an initial position, images are acquired as initial position images, providing a data foundation for subsequent coordinate system construction and desktop mapping.
[0079] S20: Based on the initial position image, identify and extract feature information of all student desktops, calculate the relative spatial position relationship between each camera device based on the feature information, establish a unified coordinate system, and map each desktop into the coordinate system.
[0080] Specifically, target detection and feature extraction algorithms are used to process the initial position image, identify all student desktop areas in the image, and extract desktop feature information, such as table corners, textures, and markings. Based on the desktop feature information, the relative poses and distance relationships between each camera device are derived through feature point matching and geometric transformation.
[0081] Furthermore, a unified spatial coordinate system is established with a fixed corner point in the classroom, such as the upper left corner of the classroom, as the origin. The spatial position of each desktop and the field of view of each camera device are mapped into this coordinate system, forming a database of desktop-camera device mapping relationships.
[0082] S30: When it is necessary to take pictures of a specific target desktop, query one or more candidate camera devices that can take pictures of the desktop according to the coordinate system, and determine the optimal main camera device among the candidate camera devices based on the preset image scoring rules.
[0083] Specifically, when the system receives a request to capture a target desktop, it queries all candidate camera devices that can cover the desktop based on the established coordinate system, scores the desktop image captured by each candidate camera device, and selects the camera device with the highest score as the main camera device according to the preset image scoring rules, thereby ensuring the optimal shooting angle and the best image quality.
[0084] S40: Acquire the original image captured by the main camera device, perform content analysis and image quality assessment on the original image to obtain an image quality score, and output the processed image when the image quality score meets the standard; otherwise, trigger the dynamic reshoot mechanism.
[0085] Specifically, the main camera device is controlled to capture images of the target desktop, obtain raw images, and perform in-depth content analysis on the images, including paper target detection, paper region instance segmentation, human body part detection, and text sharpness calculation, thereby evaluating image quality, such as whether it is clear, whether there is occlusion, and the degree of distortion, and forming an image quality score.
[0086] Furthermore, when the image quality score reaches the qualified threshold, the image is further processed, including perspective correction, rotation and enhancement, and the processed image is output. If the image quality score does not reach the qualified threshold, a dynamic re-capture mechanism is triggered until a qualified image is obtained.
[0087] In this embodiment, ...
[0088] In one embodiment, such as Figure 2 As shown, in step S10, multiple variable focal width angle cameras are deployed based on the student seating distribution in the classroom to construct a monitoring field of view network for the monitored area, and initial position images of each camera are acquired. Specifically, this includes:
[0089] S11: Based on the actual layout of the classroom and the row and column distribution of the students' desks, determine the installation location and number of camera devices to ensure that any desk is covered by the field of view of at least one camera device, forming a monitoring area.
[0090] Specifically, by measuring the classroom layout on-site or analyzing the design drawings, the specific row and column distribution and spacing of the students' desks are determined. Based on the field of view coverage requirements, such as avoiding obstruction and reducing distortion, the installation location, height, angle and number of camera devices are determined by using field of view simulation or geometric calculations to ensure no blind spots in monitoring and to form a comprehensive monitoring network.
[0091] S12: Preset an initial shooting angle and focal length for each camera device, define it as the initial position, and obtain the initial position images of all camera devices.
[0092] Specifically, a standard initial parameter is set for each camera device, such as adjusting the focal length to the widest angle and the angle to look down at the table, and an initial position image is acquired at this time. The initial position image is intended to provide a consistent data source for subsequent feature extraction and coordinate system construction.
[0093] S13: Based on the acquired initial position image, perform desktop target detection, identify all desktop regions in the initial position image, and perform masking on the detected desktop regions to obtain the processed initial position image.
[0094] Specifically, a deep learning object detection algorithm is used to identify the desktop region in the initial position image. The identified desktop region is then subjected to a binarization mask to highlight the desktop region in the image, filter out background interference, and facilitate subsequent feature extraction and matching.
[0095] In one embodiment, such as Figure 3 As shown, in step S20, which involves identifying and extracting feature information of all student desktops based on the initial position image, calculating the relative spatial position relationship between each camera device based on the feature information, and establishing a unified coordinate system, mapping each desktop to the coordinate system includes:
[0096] S21: The scale-invariant feature transformation algorithm is used to extract feature points from the processed initial bit images of each camera device to obtain multiple sets of feature point description data.
[0097] Specifically, the SIFT algorithm is used to perform feature point detection and descriptor extraction on the masked images captured by each camera device. The SIFT algorithm has scale invariance and rotation invariance, which can effectively extract stable feature points on the desktop and generate feature description vectors, forming multiple sets of feature point data such as table corners and specific desktop markings.
[0098] S22: Perform pairwise matching on the multiple sets of feature point description data to find the corresponding feature points belonging to the same desktop in different images.
[0099] Specifically, a feature matching algorithm is used to match different image feature point description data pairwise. By calculating the similarity between each group of feature points, matching feature point pairs are found, and mismatched feature points are identified through cross-validation to ensure the accuracy of feature point matching.
[0100] S23: Based on the successfully matched feature point pairs, calculate the homography matrix between adjacent camera device images, and deduce the relative pose and distance between each camera device.
[0101] Specifically, using successfully matched feature point pairs, the RANSAC algorithm is used to calculate the homography matrix between adjacent camera device images. By decomposing the homography matrix and combining it with the built-in parameters of the camera devices, the relative pose and distance relationship between the camera devices are derived, providing geometric constraints for coordinate system construction.
[0102] S24: Using a fixed corner point in the classroom as the origin, and combining the relative poses and distances between each camera device, a unified coordinate system is constructed, and the field of view of each desktop and each camera device is mapped into the coordinate system to form a database of desktop-camera device mapping relationships.
[0103] Specifically, a fixed corner point in the classroom is selected as the origin of the coordinate system. Combining the relative pose and distance relationship between the camera devices obtained in step S23, the corner coordinates of each desktop and the optical center coordinates of each camera device are transformed to a unified coordinate system through coordinate transformation. The field of view of each camera device is calculated, such as the projection of the visual cone in the coordinate system. A mapping relationship table between the desktop and the camera device is established and stored in the database for subsequent queries.
[0104] In one embodiment, such as Figure 4 As shown, in step S30, one or more candidate camera devices that can capture images of the desktop are queried according to the coordinate system, and the optimal main camera device is determined from the candidate camera devices based on preset image scoring rules. This specifically includes:
[0105] S31: Determine all candidate camera devices that can capture images of the target desktop based on the coordinate system, calculate the proportion of the target desktop's image area in the images captured by each candidate camera device, and form an image area score.
[0106] Specifically, using the established coordinate system, all camera devices covering the target desktop are quickly queried as candidates. For each candidate camera device, based on its internal parameters and pose, the proportion of the target desktop's projected area on the imaging plane of each candidate camera device to the total screen area is calculated as the imaging area score. The higher the proportion, the higher the score, indicating that the desktop is larger in the screen.
[0107] S32: Calculate the Euclidean distance between the center point of the target desktop and the optical center of each candidate camera device in the coordinate system to form a distance score.
[0108] Specifically, in the coordinate system, the Euclidean distance between the coordinates of the center point of the target desktop and the optical center coordinates of each candidate camera device is calculated as a distance score. The closer the distance, the closer the shooting distance, the better the potential image quality, and the higher the score.
[0109] S33: Based on the imaging area score and distance score, all candidate camera devices will be weighted and sorted, and the camera device with the highest ranking will be selected as the main camera device.
[0110] Specifically, the obtained imaging area score and distance score are normalized. Based on the set weight values, such as imaging area weight of 0.6 and distance weight of 0.4, the score of the image captured by each candidate camera device is calculated, sorted from highest to lowest score, and the camera device with the highest score is selected as the main camera device for shooting.
[0111] In one embodiment, such as Figure 5 As shown, in step S40, the original image captured by the main camera device is acquired, and content analysis and image quality assessment are performed on the original image to obtain an image quality score. Specifically, this includes:
[0112] S41: Perform paper target detection on the original image. If no paper is detected or the paper area accounts for too low a percentage of the image, the shooting is directly determined to have failed.
[0113] Specifically, target detection is used to detect paper in the original image captured by the main camera. If no corresponding paper area is detected, or if the area of the paper area is less than the threshold of the total image area, the paper is considered to be missing or too small, and the shooting is directly judged as a failure, triggering the reshoot mechanism.
[0114] S42: When paper is detected in the original image, the detected paper area is segmented, its edge contour is extracted, and the concave features of the contour shape are obtained.
[0115] Specifically, when paper is detected, the instance segmentation model is used to accurately segment the paper pixel region, extract the edge contour of the paper region, and analyze the degree of concavity of the contour shape, such as contour convex hull defect detection. If the concavity is too large, it may indicate that the paper is folded or occluded, which affects the image quality score as a concavity feature.
[0116] S43: Perform human body part detection on the original image, determine whether the paper edge is stuck to the human body part, and generate adhesion features.
[0117] Specifically, a human key point detection model is used to detect human body parts in the image, such as arms and hands, and to determine whether the paper edge contour overlaps or adheres to the pixels of the human body parts. If adhesion exists, it may obscure the content of the paper and is recorded as a negative feature, thus obtaining the adhesion feature.
[0118] S44: Calculate the sharpness of the text edges within the paper area and the number of detected characters, and generate paper text features based on the text edge sharpness and the number of characters.
[0119] Specifically, an edge sharpness algorithm is applied to the detected paper area to evaluate the clarity of the text within the paper area. At the same time, OCR is used to recognize and count the number of characters to form paper text features. The sharper the text edges and the more characters recognized, the higher the text feature score, which represents better image quality.
[0120] S45: Generate an image quality score based on the indentation features, adhesion features, and paper text features.
[0121] Specifically, features such as the degree of indentation, adhesion, text sharpness, and number of characters are assigned weights, and a weighted composite score is calculated as the image quality score. A passing threshold is set; if the score is higher than the threshold, the image quality is considered acceptable; otherwise, it is considered unacceptable.
[0122] In one embodiment, such as Figure 6 As shown, in step S40, the dynamic replay mechanism is triggered, which specifically includes:
[0123] S46: When the image quality score is lower than the qualified threshold, it is determined that the shooting effect is poor. The coordinate system is queried. If the target desktop is only mapped to one candidate camera device, the main camera device is controlled again to adjust the focal length and angle for reshooting after a certain interval.
[0124] Specifically, if the quality score is unsatisfactory and the mapping relationship shows that only one candidate camera device covers the target desktop, the system will wait for a short time (e.g., 2 seconds) and then control the same camera device to fine-tune the focus or shooting angle (e.g., slightly zoom in or adjust the tilt angle) to try to take a picture again to obtain a better image.
[0125] S47: If the target desktop is mapped to multiple candidate camera devices in the coordinate system, the weighted and sorted candidate camera device group is invoked, and the second-best camera device is selected for reshooting.
[0126] Specifically, if there are multiple candidate devices, the second-best device with the second-highest overall score after the main camera device is selected as the new shooting device according to the ranking result of step S30, and it is controlled to shoot to obtain images from different perspectives.
[0127] S48: Acquire a newly captured image, compare the quality score of the newly captured image with the original image, and select the image with the highest quality score after comparison as the output result.
[0128] Specifically, the same quality assessment process is applied to the newly captured images to obtain their quality scores. These scores are then compared to the original image scores, and the image with the highest score is selected as the final output, ensuring optimal output image quality.
[0129] In one embodiment, such as Figure 7As shown, before outputting the processed image, the target image occlusion processing method based on a variable focal width angle camera also includes:
[0130] S50: Obtain a high-quality image based on the quality image score, extract the paper outline based on the high-quality image, calculate the perspective transformation matrix of the paper outline, perform perspective correction on the paper area in the selected high-quality image, and obtain a distortion-free front view.
[0131] Specifically, the image with the highest quality score is selected, and the perspective transformation matrix is calculated using the precise outline points (such as the four corner points) of its paper area. This matrix is then applied to perform perspective correction on the paper area, converting the tilted and distorted view into a standard frontal rectangular view and eliminating perspective distortion.
[0132] S60: Detect the text line direction of the front view and rotate it so that the text line is in the horizontal direction.
[0133] Specifically, the text line angle is detected on the corrected front view, the tilt angle of the text line is calculated, and the image is rotated to make the text line horizontal, which facilitates reading and subsequent processing.
[0134] S70: Based on the adaptive histogram equalization algorithm, the contrast and brightness of the front view are adjusted to enhance the contrast between the paper background and the text area.
[0135] Specifically, an adaptive histogram equalization algorithm is applied to enhance the image contrast. This algorithm effectively improves local contrast, highlights the difference between text areas and the paper background, and enhances image clarity and readability.
[0136] S80: Crops the processed front view into a standard document image containing only the target paper area and outputs it in parallel.
[0137] Specifically, based on the precise bounding box of the paper area, the enhanced image is cropped to a standard-sized image containing only the target paper. The final processed standard document image is then output to the display interface and archived, completing the entire processing workflow.
[0138] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0139] In one embodiment, a target image occlusion processing system based on a variable focal length field-of-view camera is provided. This system corresponds one-to-one with the target image occlusion processing method based on a variable focal length field-of-view camera described in the above embodiments. For example... Figure 8As shown, the target image occlusion processing system based on a variable focal width angle camera includes a camera device deployment module, a coordinate system construction module, a main camera device determination module, and an image quality evaluation module. Detailed descriptions of each functional module are as follows:
[0140] The camera deployment module is used to deploy multiple variable focal width angle cameras based on the distribution of student seats in the classroom, construct a monitoring field of view network for the monitoring area, and acquire initial position images of each camera.
[0141] The coordinate system construction module is used to identify and extract feature information of all student desktops based on the initial position image, calculate the relative spatial position relationship between each camera device based on the feature information, and establish a unified coordinate system to map each desktop into the coordinate system.
[0142] The main camera device determination module is used to identify and extract feature information of all student desktops based on the initial position image, calculate the relative spatial position relationship between each camera device based on the feature information, and establish a unified coordinate system to map each desktop into the coordinate system.
[0143] The image quality assessment module is used to acquire the original image captured by the main camera device, perform content analysis and image quality assessment on the original image to obtain an image quality score. When the image quality score meets the standard, the processed image is output; otherwise, a dynamic reshoot mechanism is triggered.
[0144] Specific limitations regarding the target image occlusion processing system based on a variable focal length wide-angle camera can be found in the limitations of the target image occlusion processing method based on a variable focal length wide-angle camera mentioned above, and will not be repeated here. Each module in the aforementioned target image occlusion processing system based on a variable focal length wide-angle camera can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware or independently of the processor in an electronic device, or stored in software in the memory of the electronic device, so that the processor can call and execute the corresponding operations of each module.
[0145] In one embodiment, an electronic device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 9As shown, the electronic device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores monitoring data from multiple patients and diabetes analysis models. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a target image occlusion processing method based on a variable focal width angle camera.
[0146] In one embodiment, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0147] Based on the distribution of student seats in the classroom, multiple variable focal width angle cameras are deployed to construct a monitoring field of view network for the monitoring area, and the initial position images of each camera are collected.
[0148] Based on the initial position image, feature information of all student desktops is identified and extracted. The relative spatial position relationship between each camera device is calculated based on the feature information, and a unified coordinate system is established to map each desktop into the coordinate system.
[0149] When it is necessary to photograph a specific target desktop, one or more candidate camera devices that can photograph the desktop are queried according to the coordinate system, and the optimal main camera device is determined from the candidate camera devices based on the preset image scoring rules.
[0150] The system acquires the original image captured by the main camera device, performs content analysis and image quality assessment on the original image to obtain an image quality score. If the image quality score meets the standard, the processed image is output; otherwise, a dynamic reshoot mechanism is triggered.
[0151] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0152] Based on the distribution of student seats in the classroom, multiple variable focal width angle cameras are deployed to construct a monitoring field of view network for the monitoring area, and the initial position images of each camera are collected.
[0153] Based on the initial position image, feature information of all student desktops is identified and extracted. The relative spatial position relationship between each camera device is calculated based on the feature information, and a unified coordinate system is established to map each desktop into the coordinate system.
[0154] When it is necessary to photograph a specific target desktop, one or more candidate camera devices that can photograph the desktop are queried according to the coordinate system, and the optimal main camera device is determined from the candidate camera devices based on the preset image scoring rules.
[0155] The system acquires the original image captured by the main camera device, performs content analysis and image quality assessment on the original image to obtain an image quality score. If the image quality score meets the standard, the processed image is output; otherwise, a dynamic reshoot mechanism is triggered.
[0156] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0157] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0158] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A target graphic occlusion processing method based on a variable focal wide angle camera, characterized in that, The target image occlusion processing method based on a variable focal width angle camera includes the following steps: Based on the distribution of student seats in the classroom, multiple variable focal width angle cameras are deployed to construct a monitoring field of view network for the monitoring area, and the initial position images of each camera are collected. Based on the initial position image, feature information of all student desktops is identified and extracted. The relative spatial position relationship between each camera device is calculated based on the feature information, and a unified coordinate system is established to map each desktop into the coordinate system. When it is necessary to photograph a specific target desktop, one or more candidate camera devices that can photograph the desktop are queried according to the coordinate system, and the optimal main camera device is determined from the candidate camera devices based on the preset image scoring rules. The system acquires the original image captured by the main camera device, performs content analysis and image quality assessment on the original image to obtain an image quality score, and outputs the processed image when the image quality score meets the standard; otherwise, it triggers a dynamic reshoot mechanism. The process of acquiring the original image captured by the main camera device, performing content analysis and image quality assessment on the original image to obtain an image quality score specifically includes: The original image is subjected to paper target detection. If no paper is detected or the paper area accounts for too low a percentage of the image, the shooting is directly determined to be a failure. When paper is detected in the original image, the detected paper area is segmented, its edge contour is extracted, and the concave features of the contour shape are obtained. Human body part detection is performed on the original image to determine whether the paper edge is stuck to the human body part, and an adhesion feature is generated. Calculate the sharpness of the text edges within the paper area and the number of detected characters, and generate paper text features based on the text edge sharpness and the number of characters; An image quality score is generated based on the indentation features, adhesion features, and paper text features. 2.The target graphic occlusion processing method based on a variable focal wide-view camera according to claim 1, wherein, The method involves deploying multiple variable focal length cameras based on the student seating arrangement in the classroom to construct a monitoring field of view network for the monitored area, and acquiring initial position images of each camera. Specifically, this includes: Based on the actual layout of the classroom and the row and column distribution of the students' desks, determine the installation location and number of camera devices to ensure that any desk is covered by the field of view of at least one camera device, forming a monitoring area; For each camera device, an initial shooting angle and focal length are preset and defined as the initial position. The initial position images of all camera devices are then acquired. Desktop target detection is performed based on the acquired initial position image. All desktop regions in the initial position image are identified, and the detected desktop regions are masked to obtain the processed initial position image. 3.The target graphic occlusion processing method based on a variable focal wide-view camera according to claim 1, wherein, The process of identifying and extracting feature information from all student desktops based on the initial position image, calculating the relative spatial position relationships between each camera device based on the feature information, and establishing a unified coordinate system to map each desktop into the coordinate system specifically includes: The scale-invariant feature transform algorithm was used to extract feature points from the processed initial bit images of each camera device to obtain multiple sets of feature point description data. The multiple sets of feature point description data are matched pairwise to find the corresponding feature points belonging to the same desktop in different images; Based on the successfully matched feature point pairs, the homography matrix between adjacent camera device images is calculated, and the relative pose and distance between each camera device are derived. Using a fixed corner point in the classroom as the origin, and combining the relative poses and distances between each camera device, a unified coordinate system is constructed. The field of view of each desktop and each camera device is then mapped into the coordinate system, forming a database of desktop-camera device mapping relationships. 4.The target graphic occlusion processing method based on a variable focal wide-view camera according to claim 1, wherein, The step of querying one or more candidate camera devices that can capture images of the desktop according to the coordinate system, and determining the optimal main camera device from the candidate camera devices based on preset image scoring rules, specifically includes: Based on the coordinate system, all candidate camera devices capable of capturing images of the target desktop are determined, and the proportion of the target desktop's image area in the images captured by each candidate camera device is calculated to form an image area score. Calculate the Euclidean distance between the center point of the target desktop and the optical center of each candidate camera device in the coordinate system to form a distance score; Based on the imaging area score and distance score, all candidate camera devices are weighted and ranked, and the camera device with the highest ranking is selected as the main camera device. 5.The target pattern occlusion processing method based on a variable focal wide-view camera according to claim 1, wherein, The dynamic replay triggering mechanism specifically includes: When the image quality score is lower than the qualified threshold, it is determined that the shooting effect is poor. The coordinate system is queried. If the target desktop is only mapped to one candidate camera device, the main camera device is controlled again to adjust the focus and angle for reshooting after a certain interval. If the target desktop is mapped to multiple candidate camera devices in the coordinate system, the weighted and sorted candidate camera device group is invoked, and the second-best camera device is selected for reshooting. Acquire newly captured images, compare the quality scores of the newly captured images with those of the original images, and select the image with the highest quality score as the output. 6.The target pattern occlusion processing method based on a variable focal wide-view camera according to claim 1, wherein, Before outputting the processed image, the target image occlusion processing method based on a variable focal width angle camera further includes: High-quality images are obtained based on quality image scores. Paper outlines are extracted from the high-quality images. The perspective transformation matrix of the paper outlines is calculated. Perspective correction is performed on the paper areas in the selected high-quality images to obtain a distortion-free front view. The text line direction of the front view is detected and rotated to make the text line horizontal. The contrast and brightness of the front view are adjusted based on the adaptive histogram equalization algorithm to enhance the contrast between the paper background and the text area. The processed front view is cropped into a standard document image containing only the target paper area and then output and stored in parallel. 7.A target pattern occlusion processing system based on a variable focal wide angle camera, characterized in that, The target image occlusion processing system based on a variable focal width angle camera includes: The camera deployment module is used to deploy multiple variable focal width angle cameras based on the distribution of student seats in the classroom, construct a monitoring field of view network for the monitoring area, and acquire initial position images of each camera. The coordinate system construction module is used to identify and extract feature information of all student desktops based on the initial position image, calculate the relative spatial position relationship between each camera device based on the feature information, and establish a unified coordinate system to map each desktop into the coordinate system. The main camera device determination module is used to identify and extract feature information of all student desktops based on the initial position image, calculate the relative spatial position relationship between each camera device based on the feature information, and establish a unified coordinate system to map each desktop into the coordinate system. The image quality assessment module is used to acquire the original image captured by the main camera device, perform content analysis and image quality assessment on the original image, and perform paper target detection on the original image. If no paper is detected or the paper area accounts for too low a proportion, the shooting is directly judged as a failure. When paper is detected in the original image, the detected paper area is segmented, its edge contour is extracted, and the concave feature of the contour shape is obtained. The original image is used to detect human body parts, determine whether the paper edge is adhered to the human body part, generate adhesion features, calculate the sharpness of the text edge in the paper area and the number of detected characters, and generate paper text features based on the text edge sharpness and the number of characters. The image quality score is obtained according to the concave feature, adhesion feature and paper text feature. When the image quality score meets the standard, the processed image is output; otherwise, a dynamic reshoot mechanism is triggered.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the target image occlusion processing method based on a variable focal width angle camera as described in any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 8. When the computer program is executed by the processor, it implements the steps of the target image occlusion processing method based on a variable focal width angle camera as described in any one of claims 1 to 6.