A camera occlusion detection method, device, terminal and readable storage medium

CN122597809APending Publication Date: 2026-08-18GUANGDONG CHENGYI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611027882.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-10
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0009]本发明的目的是提供一种摄像头遮挡检测方法、装置、终端及可读存储介质,旨在解决因用户操作疏忽或遗忘,导致摄像头遮挡板状态与设备工作模式不匹配,进而引发隐私泄露风险或设备功能失效的问题

Benefits of technology

[0043] This invention detects whether a user has forgotten to turn the camera cover on or off, and outputs a prompt message accordingly. This prompts the user to perform the correct operation in a timely manner, avoiding a decline in user experience due to abnormal camera cover status. This not only protects privacy and security but also ensures the normal use of the device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122597809A_ABST
    Figure CN122597809A_ABST
Patent Text Reader

Abstract

This invention relates to the field of image recognition technology, and discloses a camera occlusion detection method, device, terminal, and readable storage medium. The camera occlusion detection method includes: acquiring a detection image; determining the brightness information of each pixel in the detection image; determining the occlusion result of the camera based on the brightness information; and outputting a prompt message based on the occlusion result. This invention, by detecting the occlusion of a user's camera, can promptly detect whether the user has forgotten to turn the camera shutter on or off, thus protecting privacy and ensuring the normal operation of the device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0002] This invention relates to the field of image recognition technology, and in particular to a method, apparatus, terminal, and readable storage medium for detecting camera occlusion. Background Technology

[0004] With the development of image recognition technology, more and more range hood products are beginning to integrate camera modules. By collecting image data in real time during the cooking process, they can identify information such as the concentration of smoke in the pot, the state of the ingredients, the temperature of the stove, and cooking actions. Based on the collected visual information, they use deep learning models to make inference decisions and automatically adjust the air volume and switch working modes based on the inference results, thereby achieving intelligent and precise smoke control.

[0005] In practical applications, these smart range hoods typically rely on network connectivity to enable functions such as cloud-based model inference, data transmission, and remote algorithm updates. By connecting to a cloud platform, the device can leverage high-performance deep learning models to improve smoke recognition accuracy and support continuous iterative optimization of model parameters to cope with complex and ever-changing cooking environments. However, the existence of network connectivity also raises concerns about privacy and security, specifically the risk of the camera being remotely and illegally activated or silently collecting images in the background.

[0006] To alleviate users' privacy concerns, existing solutions typically involve adding a movable cover to the front of the camera, allowing users to manually cover the camera when not using the range hood. This design allows users to manually slide or toggle the cover in front of the camera lens when not cooking or using the camera, thus physically cutting off the path of external light and ensuring that no image information can be captured by the sensor, thereby preventing potential privacy leaks. The cover effectively enhances the security of the device and user trust.

[0007] However, in actual use, users often forget to remove or open the cover before use due to operating habits or negligence, causing the camera to fail to capture images properly. This, in turn, affects the normal triggering of smoke recognition and automatic control functions. Furthermore, after use, users often forget to close the cover or fail to fully return it to its original position, reducing privacy protection. These situations diminish the protective value of the cover design itself and reduce the user experience. Summary of the Invention

[0009] The purpose of this invention is to provide a camera occlusion detection method, device, terminal, and readable storage medium, aiming to solve the problem that the camera occlusion plate state does not match the device's working mode due to user negligence or forgetfulness, thereby causing privacy leakage risks or device malfunction.

[0010] The technical solution adopted by this invention to solve the technical problem is as follows:

[0011] This invention provides a camera occlusion detection method, the camera occlusion detection method comprising:

[0012] Acquire a detection image and determine the brightness information of each pixel in the detection image;

[0013] Based on the brightness information provided, the occlusion result of the camera is determined;

[0014] Based on the occlusion result, output a prompt message.

[0015] Optionally, determining the camera occlusion result based on each of the brightness information includes:

[0016] The average brightness of the detected image is determined based on the brightness information provided.

[0017] A brightness threshold is determined based on the average brightness of the detected image;

[0018] The occlusion result of the camera is determined based on the brightness of each pixel and the brightness threshold.

[0019] Optionally, determining the brightness threshold based on the average brightness of the detected image includes:

[0020] The average brightness and the set reference brightness are weighted and summed to obtain the brightness threshold.

[0021] Optionally, determining the occlusion result of the camera based on the brightness of each pixel and the brightness threshold includes:

[0022] Determine whether the brightness of each pixel is less than the brightness threshold, and identify pixels with brightness less than the brightness threshold as occluded pixels;

[0023] The occlusion result is determined based on the occluded pixels.

[0024] Optionally, determining the occlusion result based on the occluded pixels includes:

[0025] Determine the proportion of occluded pixels as the dark ratio;

[0026] If the dark ratio is greater than the first set ratio, it is determined that the camera is completely blocked;

[0027] If the dark ratio is less than or equal to the first set ratio and greater than or equal to the second set ratio, then it is determined that the camera part is blocked.

[0028] If the dark ratio is less than the second set ratio, then the camera is determined not to be obstructed.

[0029] Optionally, if it is determined that the camera is completely obstructed, the following further steps are also taken:

[0030] Determine if the average brightness is greater than the set average threshold.

[0031] If the average brightness is greater than the set average threshold, it is determined that the image is not blocked.

[0032] If the average brightness is less than or equal to the set average threshold, it is judged as complete occlusion.

[0033] Optionally, the step of determining the occlusion result based on the occluded pixels further includes:

[0034] The shape of the obscured pixel is determined based on the obscured pixel.

[0035] The occluded pixels are optimized based on the occluded shape.

[0036] Furthermore, to achieve the above objectives, the present invention also provides a camera occlusion detection device, the camera occlusion detection device comprising:

[0037] A brightness extraction module is used to acquire a detection image and determine the brightness information of each pixel in the detection image.

[0038] An occlusion detection module is used to determine the occlusion result of the camera based on the brightness information provided.

[0039] The prompt output module is used to output prompt information based on the occlusion result.

[0040] In addition, to achieve the above objectives, the present invention also provides a terminal, the terminal comprising: a memory, a processor, and a camera occlusion detection program stored in the memory and executable on the processor, wherein when the camera occlusion detection program is executed by the processor, the terminal controls the terminal to implement the steps of the camera occlusion detection method described above.

[0041] In addition, to achieve the above objectives, the present invention also provides a readable storage medium storing a camera occlusion detection program, which, when executed by a processor, implements the steps of the camera occlusion detection method described above.

[0042] The present invention, by employing the above technical solution, has the following effects:

[0043] This invention detects whether a user has forgotten to turn the camera cover on or off, and outputs a prompt message accordingly. This prompts the user to perform the correct operation in a timely manner, avoiding a decline in user experience due to abnormal camera cover status. This not only protects privacy and security but also ensures the normal use of the device. Attached Figure Description

[0045] Figure 1 This is a flowchart of the steps of a camera occlusion detection method in a preferred embodiment of the present invention;

[0046] Figure 2 This is a schematic diagram of the structure of a camera occlusion detection device in a preferred embodiment of the present invention;

[0047] Figure 3 This is a schematic diagram of the operating environment of a preferred embodiment of the terminal of the present invention. Detailed Implementation

[0049] To make the objectives, technical solutions, and advantages of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only for explaining the invention and are not intended to limit the invention. It should also be noted that, for ease of description, only the parts relevant to this application are shown in the drawings, not all of them. Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe operations (or steps) as sequential processes, many of these operations can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but may also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0050] Example 1

[0051] This invention is applied to range hoods to promptly alert users to operate the camera's cover, preventing potential privacy leaks. It is worth noting that the technical solution of this invention is not limited to range hoods, but is applicable to various home appliances that integrate camera modules, such as security cameras, smart refrigerators, and computers, to detect whether the camera's field of view is physically obstructed, thereby ensuring user privacy and the normal operation of the device.

[0052] Please refer to Figure 1 Embodiment 1 of the present invention is a camera occlusion detection method, which includes the following steps:

[0053] S1. Acquire the detection image and determine the brightness information of each pixel in the detection image.

[0054] Specifically, in this embodiment, the original image data is first read from the image sensor of the camera, and the image data of the camera is encoded to convert the image data of the camera into a data format suitable for parsing and storage.

[0055] It is worth noting that color encoding format is a crucial part of computer vision and image processing. Different color encoding formats have different characteristics in terms of color representation, storage efficiency, and processing speed, and their consumption of computing and storage resources varies significantly.

[0056] In this embodiment, in order to improve processing efficiency and reduce storage resource consumption, and to achieve a balance in recognition clarity, the NV12 format is adopted as the image data parsing and processing format. The image data of the camera is converted into NV12 format image data, and the NV12 format image data is used as the detection image for parsing.

[0057] The NV12 used in this embodiment is a common encoding format in the YUV color space. It is a storage format based on the YUV420 sampling method. YUV (YCbCr) is a pixel format that represents the luminance parameter Y and the chrominance parameters U / V separately. It stores the luminance information (i.e., the Y component) and chrominance information (i.e., the U and V components) of the image separately. It is mainly used to optimize the transmission of color video signals. Y (luminance) has full resolution, while UV (chrominance) is stored in a 2x2 sub-sampling manner. U (blue projection Cb) represents the difference between the blue channel and the luminance, and is mainly used to describe the hue and saturation of the image, helping to determine the type and depth of colors in the image. V (red projection Cr) represents the difference between the red channel and the luminance, and its function is similar to U. It is mainly used to describe the color information of the image.

[0058] During each scan, only one chroma component (U or V) is scanned, and the Y component is sampled at a 2:1 ratio. For example, in the first scan, Y and U are sampled at a 2:1 ratio, then in the second scan, Y and V are sampled at a 2:1 ratio. For each chroma component, its horizontal and vertical sampling ratios are both 2:1 compared to the Y component.

[0059] For an image of size W*H, the luminance Y and chrominance UV are stored separately. The luminance Y plane has W*H data points, while U and V are stored alternately. U has W*H / 4 data points, and V also has W*H / 4 data points. The UV plane has a total of W*H / 2 data points.

[0060] This makes the brightness of NV12 format images easy to read. When extracting the brightness information of each pixel, this invention does not need to perform any complex color space conversion calculations. It only needs to read the Y-plane data according to a fixed memory address offset. This feature makes the brightness information extraction process computationally very low, which is very suitable for embedded systems or terminal devices with high real-time requirements. In addition, NV12 format images can achieve a good balance between resolution and storage space, which can obtain a good model output when inputting into the model later.

[0061] In this embodiment, the Y component of each pixel is extracted by reading NV12 format image data to obtain the brightness of each pixel.

[0062] S2. Determine the occlusion result of the camera based on the brightness information provided.

[0063] This invention transforms the extracted pixel brightness data into a specific occlusion state conclusion through mathematical statistics and logical discrimination rules. Specifically, it includes the following steps:

[0064] S21. Determine the average brightness of the detected image based on the brightness information provided.

[0065] Specifically, in this embodiment, the brightness information of each pixel is statistically summed, and then the average value of the brightness information of each pixel is calculated to obtain the average brightness of the pixels in the entire detection image. The average brightness objectively reflects the ambient light intensity perceived by the camera at the current moment. In a sunny kitchen during the day, the average brightness value will generally be higher, while in a nighttime environment where lighting is used to provide a light source, the average brightness value will be lower. Therefore, by calculating the average brightness of the detection image, this invention can obtain the brightness information of the external environment and make targeted adjustments.

[0066] S22. Determine the brightness threshold based on the average brightness of the detected image.

[0067] Specifically, in this embodiment, a predetermined reference brightness is set. The brightness threshold is calculated by adding the average brightness and the set reference brightness. The brightness threshold is used to distinguish between unobstructed images and obstructed images in subsequent execution.

[0068] Understandably, if a fixed brightness threshold is used, it will be greatly affected by ambient light. If the ambient light is dim, even without obstruction, the light intensity captured by the camera will be lower, making it easier to misjudge pixels as obstructed pixels, resulting in an inaccurate judgment of the obstruction ratio. Based on the same principle, if the ambient light is bright, even with obstruction, the light diffraction effect caused by the wave nature of light will result in a higher light intensity captured by the camera for the obstructed part, making it easy to misjudge obstructed pixels as unobstructed, resulting in an inaccurate judgment of the obstruction ratio. Both of these situations will cause misjudgment of the obstruction ratio, thus affecting subsequent output prompts.

[0069] If the average brightness is used as the brightness threshold, it is greatly affected by the light, especially under extreme lighting conditions, such as when the light is directly shining due to reflection or other factors. In such cases, the brightness of some areas may be too high due to light spots, resulting in an inaccurate judgment of the occlusion ratio. Therefore, in this embodiment, the brightness threshold is obtained by adding the average brightness and the set reference brightness to improve the accuracy of the judgment of the occlusion ratio.

[0070] Among them, the average brightness reflects the overall illumination level of the current detection image in the real environment and has strong environmental adaptability; while the reference brightness, as a preset reference constant, represents the ideal brightness reference of the camera under unobstructed and standard lighting conditions, providing a stable physical anchor point for discrimination. The obtained brightness threshold can be dynamically adjusted with changes in ambient light, avoiding systematic misjudgments caused by excessively dark or bright environments when using a fixed threshold, and it does not completely depend on the average brightness of the image, thus avoiding the problem of the threshold deviating from the reasonable range under extreme lighting conditions.

[0071] However, simply adding the average brightness and the reference brightness directly will result in a brightness threshold that is greater than the brightness of each pixel in the detection image when there is no occlusion. This is because the brightness of all pixels in the entire detection image is the same as the brightness of a single pixel when there is no occlusion.

[0072] Similarly, in the case of complete occlusion, the brightness of all pixels in the entire detection image is the occluded brightness. Therefore, the average brightness of the entire image and the brightness of a single pixel are the same, which is the occluded brightness. The occluded brightness is added to the reference brightness, and the resulting brightness threshold will be greater than the brightness of each pixel in the detection image.

[0073] Therefore, simply adding the average brightness and the reference brightness together will not produce a brightness threshold that can distinguish between unobstructed and completely obstructed conditions.

[0074] Therefore, in an optional embodiment, the brightness threshold is obtained by weighted summation of average brightness and reference brightness. Specifically, in this embodiment, through simulation experiments on kitchen lighting environment and common blinds, the brightness threshold is calculated using a weight value of 0.6*average brightness + 0.4*reference brightness. Under this weight, average brightness has a higher weight value, ensuring that the brightness threshold can closely follow the dynamic changes of ambient light and avoid the decrease in the judgment ability of the present invention due to environmental changes. The reference brightness has a lower weight than average brightness, but the deviation is small, which ensures that the reference brightness has a certain correction ability and prevents the brightness threshold from deviating from a reasonable discrimination range under extreme lighting conditions.

[0075] In summary, this invention calculates the brightness threshold by weighted summation of average brightness and reference brightness, effectively balancing the combined influence of dynamic ambient lighting conditions and fixed physical references on occlusion discrimination. By setting reasonable weight ratios, the brightness threshold is constrained within a reasonable numerical range. Under normal imaging conditions without occlusion, the brightness of the vast majority of pixels in the image is significantly higher than this threshold, and the dark ratio is extremely low, resulting in an unoccluded state. Under conditions of complete occlusion, the brightness of the vast majority of pixels in the image is significantly lower than this threshold, thus effectively distinguishing between the two states of complete occlusion and unocclusion.

[0076] S23. Determine the occlusion result of the camera based on the brightness of each pixel and the brightness threshold.

[0077] Specifically, in this embodiment, the brightness of each pixel is determined to be less than the brightness threshold based on the brightness threshold. Pixels with brightness less than the brightness threshold are regarded as occluded pixels, and the proportion of occluded pixels among all pixels is calculated as the dark ratio.

[0078] If the dark area ratio is greater than the first preset ratio, the camera is determined to be completely blocked; if the dark area ratio is less than or equal to the first preset ratio but greater than or equal to the second preset ratio, the camera is determined to be partially blocked; if the dark area ratio is less than the second preset ratio, the camera is determined to be unblocked. For example, the first preset ratio can be 90%, and the second preset ratio can be 70%. The specific ratio can be set according to factors such as the camera's usage environment and the shape of the obstruction plate, and this invention does not limit this.

[0079] It is worth noting that, since simply adding the average brightness and the reference brightness directly cannot distinguish between unobstructed and completely obstructed situations, in an optional embodiment, if the conclusion is that the image is completely obstructed, or if the obstruction ratio is greater than a first set ratio or a third set ratio, the average brightness can be judged based on the average brightness of the detected image. If the average brightness is greater than the set average threshold, it is judged as unobstructed; if the average brightness is less than or equal to the set average threshold, it is judged as completely obstructed.

[0080] In an optional embodiment, before calculating the dark ratio based on pixels with brightness less than a threshold, the present invention also obtains the occlusion shape composed of pixels with brightness less than a threshold, and filters and completes the pixels based on the occlusion shape composed of pixels with brightness less than a threshold.

[0081] Specifically, areas of obstruction that are far from the main body can be filtered out. These are usually caused by dirt or other interfering factors, rather than by the obstruction plate itself. Therefore, such obstruction should not be considered as areas obstructed by the obstruction plate.

[0082] As for the main body, we determine its shape. Usually, the obstruction caused by the masking plate in the camera area is square or arc-shaped. This is determined by the shape of the masking plate or the shape of the openings on the masking plate. Therefore, for the obstruction shape composed of pixels with brightness less than the threshold, the missing square or circular parts can be filled to alleviate the possibility of inaccurate judgment of edge obstruction caused by diffraction effects and other factors.

[0083] In an optional embodiment, a template file is stored containing the masking area that the masking plate should correctly create. The template file can be compared with the masking shape composed of pixels with brightness less than a threshold, and the mismatched parts can be filled or filtered out in a targeted manner.

[0084] In another alternative embodiment, the occlusion shape composed of pixels with brightness less than a threshold can be input into the image model, and the image model can process the occlusion shape composed of pixels with brightness less than the threshold to fill the missing parts and filter out interference factors.

[0085] Optionally, if a template file is stored, the shape of the template file and the occlusion shape composed of pixels with brightness less than the threshold can be input into the image model. The image model can then process the occlusion shape composed of pixels with brightness less than the threshold. Due to the assistance of the template file, the accuracy of the image model processing can be improved.

[0086] S3. Based on the occlusion result, output a prompt message.

[0087] Specifically, when the user adjusts the range hood's working mode to "not working," if the detection result shows that it is not blocked, a prompt message can be proactively output to remind the user to reset the baffle. This ensures that the camera is in a reliable physical shielded state when the device is not in use, thereby preventing the camera from being remotely activated to silently collect user images and eliminating the potential risk of privacy leakage at the source.

[0088] When a user turns on the range hood, if the obstruction is detected as completely blocked, a prompt can be issued in a timely manner to guide the user to properly remove the obstruction, ensuring the normal start-up of the camera image acquisition function, ensuring that functions such as smoke recognition and automatic control are not affected, and avoiding a decline in user experience due to abnormal baffle status.

[0089] Furthermore, if the user has operated the baffle but has not operated it properly, the user may mistakenly believe that the system has misjudged it. Therefore, in this embodiment, in addition to the fully occluded state and the unoccluded state, a partially occluded state is also provided. After the user's operation state changes, if a partially occluded state is detected, a prompt message indicating that the operation was not completed can be output to avoid the user misunderstanding that it is a misjudgment. Optionally, the current occlusion area can also be output through a progress bar or the shape of the occlusion to better prompt the user.

[0090] This invention automates the detection of whether a user's camera is obstructed by a cover, and outputs corresponding prompts accordingly. This mechanism effectively solves the problem that users may forget to open the cover before using a range hood with a camera due to operating habits or negligence, or fail to fully close the cover after use.

[0091] Example 2

[0092] Please see Figure 2 Based on the above method, the present invention also provides a camera occlusion detection device, the camera occlusion detection device comprising:

[0093] Brightness extraction module 51 is used to acquire the detection image and determine the brightness information of each pixel in the detection image;

[0094] The occlusion detection module 52 is used to determine the occlusion result of the camera based on the brightness information.

[0095] The prompt output module 53 is used to output prompt information based on the occlusion result.

[0096] Optionally, determining the camera occlusion result based on each of the brightness information includes:

[0097] The average brightness of the detected image is determined based on the brightness information provided.

[0098] A brightness threshold is determined based on the average brightness of the detected image;

[0099] The occlusion result of the camera is determined based on the brightness of each pixel and the brightness threshold.

[0100] Optionally, determining the brightness threshold based on the average brightness of the detected image includes:

[0101] The average brightness and the set reference brightness are weighted and summed to obtain the brightness threshold.

[0102] Optionally, determining the occlusion result of the camera based on the brightness of each pixel and the brightness threshold includes:

[0103] Determine whether the brightness of each pixel is less than the brightness threshold, and identify pixels with brightness less than the brightness threshold as occluded pixels;

[0104] The occlusion result is determined based on the occluded pixels.

[0105] Optionally, determining the occlusion result based on the occluded pixels includes:

[0106] Determine the proportion of occluded pixels as the dark ratio;

[0107] If the dark ratio is greater than the first set ratio, it is determined that the camera is completely blocked;

[0108] If the dark ratio is less than or equal to the first set ratio and greater than or equal to the second set ratio, then it is determined that the camera part is blocked.

[0109] If the dark ratio is less than the second set ratio, then the camera is determined not to be obstructed.

[0110] Optionally, if it is determined that the camera is completely obstructed, the following further steps are also taken:

[0111] Determine if the average brightness is greater than the set average threshold.

[0112] If the average brightness is greater than the set average threshold, it is determined that the image is not blocked.

[0113] If the average brightness is less than or equal to the set average threshold, it is judged as complete occlusion.

[0114] Optionally, the step of determining the occlusion result based on the occluded pixels further includes:

[0115] The shape of the obscured pixel is determined based on the obscured pixel.

[0116] The occluded pixels are optimized based on the occluded shape.

[0117] Example 3

[0118] Please see Figure 3 Based on the above method, the present invention also provides a terminal, which includes a processor 10, a memory 20, and a display 30. However, it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.

[0119] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard drive or memory. In other embodiments, the memory 20 may be an external storage device of the terminal, such as a plug-in hard drive, smart media card (SMC), secure digital card (SD), flash card, etc. Further, the memory 20 may include both internal and external storage devices. The memory 20 is used to store application software and various types of data installed on the terminal, such as the program code installed on the terminal. The memory 20 can also be used to temporarily store data that has been output or will be output. In one embodiment, the memory 20 stores a camera occlusion detection program 40, which can be executed by the processor 10 to realize the terminal of this application.

[0120] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor, or other data processing chip, used to run program code stored in the memory 20 or process data, such as executing related programs of the camera occlusion detection method.

[0121] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light Emitting Diode) touchscreen, etc. The display 30 is used to display information on the terminal and to display a visual user interface.

[0122] In one embodiment, when the processor 10 executes a camera occlusion detection program 40 in the memory 20, it implements the steps of a camera occlusion detection method as described above.

[0123] Example 4

[0124] This embodiment provides a storage medium that stores a camera occlusion detection program. When the camera occlusion detection program is executed by a processor, it implements the steps of a camera occlusion detection method as described above.

[0125] In summary, this invention automates the detection of the obstruction status of the user's camera, accurately identifying whether the camera is blocked by a baffle and outputting corresponding prompts accordingly. This mechanism effectively solves the problem that users may forget to open the baffle before use or fail to fully close it after use when using a range hood with a camera due to operating habits or negligence.

[0126] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal that includes that element.

[0127] Of course, those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.). The program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The storage medium can be a memory, magnetic disk, optical disk, etc.

[0128] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.

Claims

1. A method for detecting camera occlusion, characterized in that, The camera occlusion detection method includes: acquiring a detection image and determining the brightness information of each pixel in the detection image; determining the occlusion result of the camera based on the brightness information; and outputting a prompt message based on the occlusion result.

2. The camera occlusion detection method according to claim 1, characterized in that, The step of determining the occlusion result of the camera based on the brightness information includes: determining the average brightness of the detected image based on the brightness information; determining a brightness threshold based on the average brightness of the detected image; and determining the occlusion result of the camera based on the brightness of each pixel and the brightness threshold.

3. The camera occlusion detection method according to claim 2, characterized in that, Determining the brightness threshold based on the average brightness of the detected image includes: weighting and summing the average brightness and a set reference brightness to obtain the brightness threshold.

4. The camera occlusion detection method according to claim 2, characterized in that, The step of determining the occlusion result of the camera based on the brightness of each pixel and the brightness threshold includes: determining whether the brightness of each pixel is less than the brightness threshold, and taking the pixels with brightness less than the brightness threshold as occluded pixels; and determining the occlusion result based on the occluded pixels.

5. The camera occlusion detection method according to claim 4, characterized in that, The step of determining the occlusion result based on the occluded pixels includes: determining the proportion of occluded pixels as the dark ratio; if the dark ratio is greater than a first preset ratio, then it is determined that the camera is completely occluded; if the dark ratio is less than or equal to the first preset ratio but greater than or equal to a second preset ratio, then it is determined that the camera is partially occluded; if the dark ratio is less than the second preset ratio, then it is determined that the camera is not occluded.

6. The camera occlusion detection method according to claim 5, characterized in that, If the camera is determined to be completely blocked, the following steps are also taken: determine whether the average brightness is greater than the set average threshold; if the average brightness is greater than the set average threshold, it is determined that the camera is not blocked; if the average brightness is less than or equal to the set average threshold, it is determined that the camera is completely blocked.

7. The camera occlusion detection method according to claim 4, characterized in that, The step of determining the occlusion result based on the occluded pixels further includes: determining the occlusion shape based on the occluded pixels; and optimizing the occluded pixels based on the occlusion shape.

8. A camera occlusion detection device, characterized in that, The camera occlusion detection device includes: a brightness extraction module for acquiring a detection image and determining the brightness information of each pixel in the detection image; an occlusion detection module for determining the occlusion result of the camera based on the brightness information; and a prompt output module for outputting prompt information based on the occlusion result.

9. A terminal, characterized in that, The terminal includes: a memory, a processor, and a camera occlusion detection program stored in the memory and executable on the processor. When the camera occlusion detection program is executed by the processor, it controls the terminal to implement the steps of the camera occlusion detection method as described in any one of claims 1-7.

10. A readable storage medium, characterized in that, The readable storage medium stores a camera occlusion detection program, which, when executed by a processor, implements the steps of a camera occlusion detection method as described in any one of claims 1-7.