A method, device and computer equipment for detecting that a camera is obstructed

By performing noise reduction processing on camera images and calculating the luminance variance, the problem of low accuracy in camera occlusion detection in existing technologies has been solved, achieving higher accuracy in occlusion detection.

CN115423764BActive Publication Date: 2026-04-21HAINA CLOUD IOT TECH CO LTD +2
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HAINA CLOUD IOT TECH CO LTD
Filing Date
2022-08-29
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing technologies have low accuracy in detecting whether a camera is obstructed.

Method used

Denoising is performed on each frame of the image set to be detected. The luminance variance of the denoised image is calculated and compared with a preset threshold. If the denoised images for a consecutive preset number of frames are all occluded images, then the detection camera is occluded.

Benefits of technology

It improves the accuracy of detecting camera obstructions, avoids the influence of noise points, and ensures the accuracy of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115423764B_ABST
    Figure CN115423764B_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, and computer device for detecting camera obstruction, belonging to the field of security monitoring technology. The method includes: denoising each frame of a set of images to be detected to obtain a denoised image; calculating the variance of the brightness of each denoised image frame; determining whether the denoised image is an obstructed image based on a comparison of the variance value with a preset threshold; and detecting camera obstruction if a preset number of consecutive denoised images are all obstructed. This invention detects the denoised image after denoising processing, avoiding the problem of reduced detection accuracy due to noise points in the image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of security monitoring technology, specifically, it relates to a method, apparatus and computer equipment for detecting when a camera is obstructed. Background Technology

[0002] As smart video becomes increasingly prevalent in daily life, it is used to monitor public areas such as elevators and airports to ensure the safety of users and property. Especially when riding elevators, dangerous items such as electric vehicles are not allowed inside. However, some passengers still try to avoid monitoring by covering the elevator cameras, which can easily lead to disasters such as fires.

[0003] To avoid this situation, existing technologies typically perform simple grayscale conversion on the image captured by the camera and then directly calculate the image's sharpness. The determination of whether the camera is obstructed is based on the image sharpness result. However, this processing and detection method still suffers from false alarms and low detection accuracy.

[0004] In view of this, the present invention is proposed. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to overcome the shortcomings of the prior art and provide a method and apparatus for detecting whether a camera is blocked, so as to solve the problem of low detection accuracy in the prior art when detecting whether a camera is blocked.

[0006] To solve the above-mentioned technical problems, the basic concept of the technical solution adopted by the present invention is as follows:

[0007] In a first aspect, the present invention provides a method for detecting that a camera is obstructed, comprising:

[0008] Denoising is performed on each frame of the image to be detected in the image set to obtain a denoised image;

[0009] For each frame of the denoised image, calculate the variance of the brightness of the denoised image;

[0010] The denoised image is determined to be an occluded image based on the comparison between the variance value and the preset threshold.

[0011] If all the denoised images for a consecutive preset number of frames are occluded images, then the camera is detected to be occluded.

[0012] Optionally, before denoising each frame of the image to be detected in the image set to obtain the denoised image, the method further includes:

[0013] Each frame of the image to be detected is converted to grayscale to obtain a grayscale image to be detected;

[0014] For each frame of grayscale image to be detected, a Gaussian high-pass filter is used to filter pixels with gradual brightness changes in that frame of grayscale image to obtain the outer contour region.

[0015] Optionally, the step of denoising each frame of the image to be detected in the image set to obtain a denoised image includes:

[0016] Perform Fourier transformation on the outer contour region of each grayscale image to be detected to obtain the first transformed image;

[0017] For each frame of the first image, noise points in the first image of each frame are denoised to obtain the second image;

[0018] For each frame of the second image, an inverse Fourier transform is performed on each frame of the second image to obtain the denoised image.

[0019] Optionally, calculating the variance of the brightness of the denoised image for each frame includes:

[0020] For each frame of denoised image, the variance value is calculated based on the brightness value of each pixel in the denoised image and the mean brightness value of the denoised image.

[0021] Optionally, determining whether a denoised image is an occluded image based on a comparison between the variance value and a preset threshold for each frame of the denoised image includes:

[0022] For each frame of denoised image, if the comparison result is that the variance value is less than or equal to the preset threshold, then the denoised image is determined to be an occluded image.

[0023] For each frame of denoised image, if the variance value of the comparison result is greater than the preset threshold, then the denoised image is determined to be an unoccluded image.

[0024] Optionally, before performing grayscale conversion on each frame of the image to be detected to obtain a grayscale image to be detected, the following steps are included:

[0025] Determine whether there are passengers in the image to be detected;

[0026] If a passenger is present in the image to be detected, then the image to be detected is converted to grayscale.

[0027] If there are no passengers in the image to be detected, then the grayscale conversion of the image to be detected is stopped.

[0028] Secondly, the present invention provides a device for detecting that a camera is obstructed, comprising:

[0029] The denoising module is used to denoise each frame of the image to be detected in the image set to obtain a denoised image;

[0030] The calculation module is used to calculate the variance of the brightness of the denoised image for each frame of the denoised image.

[0031] The first judgment module is used to determine whether the denoised image is an occluded image based on the comparison result between the variance value and the preset threshold.

[0032] The determination module is used to detect that the camera is obstructed if all the denoised images for a consecutive preset number of frames are obstructed images.

[0033] Optionally, the device further includes:

[0034] The grayscale conversion unit is used to perform grayscale conversion on each frame of the image to be detected to obtain a grayscale image to be detected.

[0035] The filtering unit is used to filter pixels with gradual brightness changes in each frame of grayscale image to be detected using a Gaussian high-pass filter to obtain the outer contour region.

[0036] Optionally, the device further includes:

[0037] The first conversion unit is used to perform Fourier transformation on the outer contour region of each grayscale image to be detected to obtain the converted first image;

[0038] The noise reduction processing unit is used to perform noise reduction processing on the noise points in each frame of the first image to obtain the second image.

[0039] The second conversion unit is used to perform an inverse Fourier transform on each frame of the second image to obtain the denoised image.

[0040] Optionally, the device further includes:

[0041] The calculation unit is used to calculate the variance value for each frame of the denoised image based on the brightness value of each pixel in the denoised image and the mean brightness value of the denoised image.

[0042] Optionally, the device further includes:

[0043] The first determining unit is configured to determine that the denoised image is an occluded image if the comparison result is that the variance value is less than or equal to the preset threshold for each frame of the denoised image.

[0044] The second determining unit is used to determine that the denoised image is an unoccluded image if the variance value is greater than the preset threshold for each frame of the denoised image.

[0045] Optionally, the device further includes:

[0046] The first judgment unit is used to determine whether there is a passenger in the image to be detected;

[0047] The first processing unit is configured to perform grayscale conversion on the image to be detected if a passenger is present in the image to be detected.

[0048] The second processing unit is used to stop performing grayscale conversion on the image to be detected if there are no passengers in the image to be detected.

[0049] Thirdly, the present invention also provides a computer device, including: a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor communicates with the memory via the bus, and the processor executes the machine-readable instructions to implement any of the methods for detecting that a camera is obstructed in the first aspect.

[0050] This invention provides a method, apparatus, and computer device for detecting camera occlusion. The method includes: denoising each frame of a set of images to be detected to obtain a denoised image; calculating the variance of the brightness of each denoised image frame; determining whether the denoised image is an occluded image based on a comparison of the variance value with a preset threshold; and detecting camera occlusion if a consecutive preset number of denoised images are all occluded images. This invention detects occlusion by using denoised images after denoising processing, avoiding the problem of reduced detection accuracy due to noise points in the image.

[0051] The specific embodiments of the present invention will now be described in further detail with reference to the accompanying drawings. Attached Figure Description

[0052] The accompanying drawings, as part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments and descriptions of the invention are used to explain the invention, but do not constitute an undue limitation of the invention. Obviously, the drawings described below are merely some embodiments, and those skilled in the art can obtain other drawings based on these drawings without creative effort. In the drawings:

[0053] Figure 1 This is a schematic diagram of the first step of a method for detecting camera obstruction provided by the present invention;

[0054] Figure 2 This is a schematic diagram of the second process of a method for detecting camera obstruction provided by the present invention;

[0055] Figure 3 This is a schematic diagram of the third process of a method for detecting camera obstruction provided by the present invention;

[0056] Figure 4 This is a schematic diagram of the structure of a device for detecting when a camera is obstructed, provided by the present invention.

[0057] Figure 5 This is a schematic diagram of the structure of a computer device provided by the present invention.

[0058] It should be noted that these accompanying drawings and textual descriptions are not intended to limit the scope of the invention in any way, but rather to illustrate the concept of the invention to those skilled in the art by referring to specific embodiments. Detailed Implementation

[0059] To enable those skilled in the art to better understand the present application, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0060] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0061] like Figure 1 As shown, this invention provides a method for detecting camera obstruction, comprising:

[0062] S101, Denoise each frame of the image to be detected in the image set to be detected to obtain a denoised image;

[0063] S102, For each frame of denoised image, calculate the variance of the brightness of the denoised image;

[0064] S103, determine whether the denoised image is an occluded image based on the comparison result between the variance value and the preset threshold;

[0065] S104: If all the denoised images for a consecutive preset number of frames are occluded images, then the camera is detected to be occluded.

[0066] The principle applied in this invention when determining whether a camera is obstructed based on the image to be detected is that when an autofocus camera is too close to the lens, the lens fails to autofocus, resulting in small changes in image brightness and many pixels with roughly the same brightness. Areas with large changes in brightness, such as complete edges, are usually lost, making the image blurry. In contrast, an unobstructed image will retain complete edges, details, and other information.

[0067] Based on the above principle, the denoised image in step S101 is the image obtained by extracting the outer contour region of the image to be detected and denoising the noise points in the outer contour region.

[0068] like Figure 2 The diagram shown is a second flowchart of a method for detecting camera obstruction provided by the present invention. Before step S101, the method further includes:

[0069] Step S1011: Perform grayscale conversion on each frame of the image to be detected to obtain a grayscale image to be detected;

[0070] Step S1012: For each frame of grayscale image to be detected, use a Gaussian high-pass filter to filter pixels with gradual brightness changes in the frame of grayscale image to obtain the outer contour region.

[0071] In step S1011, since the workload of processing the color image to be detected is large, in order to reduce the workload, each frame of the image to be detected is converted to grayscale, and the three-channel color image to be detected is converted to grayscale image to be detected.

[0072] In step S1012 above, a Gaussian high-pass filter is used to filter each frame of grayscale image to be detected. Pixels in areas with gentle brightness changes in each frame of grayscale image to be detected are filtered out, while pixels in areas with obvious brightness changes are retained. That is, the outer contour region composed of the edges and details of each frame of grayscale image to be detected is obtained.

[0073] After obtaining the outer contour region of the image to be detected, in order to understand more details how to denoise each frame of the image to be detected in the image set to obtain a denoised image, S101 includes:

[0074] Step S1013: Perform Fourier transformation on the outer contour region of each grayscale image to be detected to obtain the transformed first image;

[0075] Step S1014: For each frame of the first image, noise points in each frame of the first image are denoised to obtain the second image;

[0076] Step S1015: For each frame of the second image, perform an inverse Fourier transform on each frame of the second image to obtain the denoised image.

[0077] In step S1013 above, Fourier transformation is performed on the outer contour region of each grayscale image to be detected to convert the spatial domain information into the frequency domain information, thereby obtaining the first image after transformation.

[0078] In step S1014 above, the frequency domain information in each frame of the first image is filtered to remove noise points in the first image, thus obtaining the second image.

[0079] In step S1015 above, an inverse Fourier transform is performed on each frame of the second image to convert the format of the second image to the format before the denoising process, thus obtaining a denoised image.

[0080] In step S102 above, for each frame of denoised image, the variance value of the brightness of the denoised image is calculated, specifically including:

[0081] Step S1021: For each frame of denoised image, calculate the variance value based on the brightness value of each pixel in the denoised image and the mean brightness value of the denoised image.

[0082] Specifically, the average brightness of the denoised image is obtained by adding up the brightness values ​​of each pixel in the denoised image, and then the variance of the brightness of the denoised image is calculated based on the brightness values ​​of each pixel in the denoised image and the average brightness.

[0083] If the denoised image has 3 pixels: pixel a, pixel b, and pixel c, the mean brightness x of the denoised image is calculated based on the brightness values ​​a1 of pixel a, b1 of pixel b, and c1 of pixel c. Then, the variance y of the brightness of the denoised image is obtained based on the brightness values ​​a1 of pixel a, b1 of pixel b, c1 of pixel c, and the mean brightness x.

[0084] In step S103 above, for each frame of denoised image, the variance of the brightness of the frame of denoised image is compared with a preset threshold to obtain the comparison result of the frame of denoised image, and it is determined whether the frame of denoised image is an occluded image based on the comparison result.

[0085] To understand this in more detail, step S103, which involves determining whether a denoised image is an occluded image based on the comparison between the variance value and a preset threshold for each denoised image frame, includes:

[0086] Step S1031: For each frame of denoised image, if the comparison result is that the variance value is less than or equal to the preset threshold, then the denoised image is determined to be an occluded image.

[0087] Step S1032: For each frame of denoised image, if the comparison result is that the variance value is greater than the preset threshold, then the denoised image is determined to be an unoccluded image.

[0088] In step S1031 above, for each frame of denoised image, if the variance of the brightness of the denoised image is less than or equal to a preset threshold, then the denoised image of that frame is determined to be an occluded image.

[0089] Specifically, taking denoised image a as an example, if the variance of the brightness of denoised image a is y1, and the preset threshold is n, where the preset threshold is obtained by averaging the brightness of a large number of unoccluded images, if the comparison result is that y1 is less than or equal to the preset threshold n, then it is determined that the denoised image a of that frame is an occluded image.

[0090] In step S1032 above, for each frame of denoised image, if the comparison result of the frame of denoised image is that the variance value of the brightness of the denoised image is greater than a preset threshold, then the frame of denoised image is determined to be an unoccluded image.

[0091] Specifically, taking denoised image a as an example, if the variance of the brightness of denoised image a is y1 and the preset threshold is n, if the comparison result is that y1 is greater than the preset threshold n, then it is determined that the denoised image of this frame is an unoccluded image.

[0092] To ensure the accuracy of the verification, the camera must be continuously obstructed in order to detect camera obstruction.

[0093] In step S104 above, if the denoised image a is considered to be an occluded image, and the denoised images of the next n consecutive frames after the denoised image a are all considered to be occluded images, then the camera is detected to be occluded.

[0094] After confirming that the camera is obstructed, a feedback message containing the obstruction should be generated and transmitted to the control device in a timely manner. Upon receiving the feedback message, the control device should keep the elevator in the open state and generate a voice alarm in a timely manner to remind passengers to stop obstructing the camera. This can also largely prevent passengers from deliberately obstructing the camera and prevent passengers from bringing dangerous items such as electric vehicles into the elevator.

[0095] Since obstruction incidents in elevators typically occur when passengers intentionally block cameras to bring dangerous items like electric bikes into the elevator or to avoid surveillance, it's crucial to verify the presence of passengers before processing the image to determine if the camera is obstructed. Therefore, before converting each frame of the image to grayscale to obtain a grayscale image, the process should begin as follows: Figure 3 As shown, step S1011 further includes:

[0096] Step S10111: Determine whether there are passengers in the image to be detected;

[0097] Step S10112: If there are passengers in the image to be detected, then the image to be detected is converted to grayscale.

[0098] Step S10113: If there are no passengers in the image to be detected, then stop the grayscale conversion of the image to be detected.

[0099] In step S10111, the images to be detected are multiple frames of images obtained by processing the video captured by the camera inside the elevator car.

[0100] Specifically, multiple frames of images to be detected are input into a pre-trained object detection model to detect whether passengers are present in the images.

[0101] The object detection model primarily utilizes a lightweight deep learning object detection network, which is trained through the following steps:

[0102] Obtain training samples of the image to be detected; the training samples of the image to be detected contain multiple training samples, and the training sample set includes training images and coordinate information of passengers marked in the training images;

[0103] For each training sample, the training images in the training sample are used as positive samples and input into the target detection model to be trained. The coordinate information of the passengers marked in the training sample images is used as standard samples and input into the target detection model to be trained.

[0104] In the above steps, the present invention also sets up a database that stores training samples for training the target detection model. Multiple training samples together form a set of training samples of images to be detected. When training the target detection model, the training images are input into the image recognition model to be trained. The target detection model to be trained will output a recognition result of the estimated passenger coordinate information. The recognition result is compared with the coordinate information marked in the training images of the training samples. If the comparison result is large, the target detection model to be trained needs to be adjusted. If the comparison result is small, it means that the training accuracy of the target detection model to be trained is getting higher and higher. When the comparison result reaches the preset requirement, that is, the difference is less than a certain threshold, such as 2%, the training of the target detection model to be trained ends.

[0105] The lightweight deep learning object detection network YOLOv5S selected in this invention has few parameters, runs fast, has high detection accuracy, and has low hardware requirements, making it easy to integrate into a camera.

[0106] In step S10112, if the output of the target detection model is that there are passengers in the image to be detected, it indicates that the camera may be blocked. Therefore, the subsequent frames of images to be detected are detected to determine whether the camera is blocked.

[0107] In step S10113, if there are no passengers in the image to be detected, then there is no situation where the camera is blocked. Therefore, it is not necessary to verify the image to be detected, nor is it necessary to perform grayscale conversion or other processing on the image to be detected.

[0108] like Figure 4 As shown, this invention provides a device for detecting camera obstruction, comprising: a noise reduction processing module 401, a calculation module 402, a first judgment module 403, and a determination module 404. Specifically:

[0109] The denoising processing module 401 is used to perform denoising processing on each frame of the image to be detected in the image set to obtain a denoised image;

[0110] The calculation module 402 is used to calculate the variance of the brightness of the denoised image for each frame of the denoised image.

[0111] The first judgment module 403 is used to determine whether the denoised image is an occluded image based on the comparison result between the variance value and the preset threshold.

[0112] The determination module 404 is used to detect that the camera is blocked if all the denoised images for a consecutive preset number of frames are blocked images.

[0113] Optionally, the device further includes:

[0114] The grayscale conversion unit is used to perform grayscale conversion on each frame of the image to be detected to obtain a grayscale image to be detected.

[0115] The filtering unit is used to filter pixels with gradual brightness changes in each frame of grayscale image to be detected using a Gaussian high-pass filter to obtain the outer contour region.

[0116] Optionally, the device further includes:

[0117] The first conversion unit is used to perform Fourier transformation on the outer contour region of each grayscale image to be detected to obtain the converted first image;

[0118] The noise reduction processing unit is used to perform noise reduction processing on the noise points in each frame of the first image to obtain the second image.

[0119] The second conversion unit is used to perform an inverse Fourier transform on each frame of the second image to obtain the denoised image.

[0120] Optionally, the device further includes:

[0121] The calculation unit is used to calculate the variance value for each frame of the denoised image based on the brightness value of each pixel in the denoised image and the mean brightness value of the denoised image.

[0122] Optionally, the device further includes:

[0123] The first determining unit is configured to determine that the denoised image is an occluded image if the comparison result is that the variance value is less than or equal to the preset threshold for each frame of the denoised image.

[0124] The second determining unit is used to determine that the denoised image is an unoccluded image if the variance value is greater than the preset threshold for each frame of the denoised image.

[0125] Optionally, the device may further include:

[0126] The first judgment unit is used to determine whether there is a passenger in the image to be detected;

[0127] The first processing unit is configured to perform grayscale conversion on the image to be detected if a passenger is present in the image to be detected.

[0128] The second processing unit is used to stop performing grayscale conversion on the image to be detected if there are no passengers in the image to be detected.

[0129] Corresponding to Figure 1 This invention provides a method for detecting camera obstruction, and also provides a computer device 80, such as... Figure 5 As shown, the device includes a memory 801, a processor 802, and a computer program stored in the memory 801 and executable on the processor 802, wherein the processor 802 executes the computer program to implement the steps of a method for detecting that a camera is obstructed.

[0130] Specifically, the aforementioned memory 801 and processor 802 can be general-purpose memory and processor, without specific limitations. When the processor 802 runs the computer program stored in the memory 801, it can execute the aforementioned method for detecting camera obstruction, solving the problem of low detection accuracy in existing technologies when detecting whether a camera is obstructed. First, each frame of the image to be detected in the image set is denoised to obtain a denoised image; for each denoised image, the variance of the brightness of the denoised image is calculated; based on the comparison result of the variance value and a preset threshold, it is determined whether the denoised image is an obstructed image; if all denoised images for a consecutive preset number of frames are obstructed images, then the camera is detected to be obstructed. This invention detects the denoised image after denoising processing, avoiding the problem of noise points in the image affecting the detection accuracy and reducing the detection accuracy.

[0131] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-described technical content to create equivalent embodiments without departing from the scope of the present invention. The implementation schemes in the above embodiments can also be further combined or replaced. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. A method for detecting obstructed cameras inside elevators, characterized in that, include: The video captured by the camera inside the elevator car is converted into multiple frames of images to be detected and input into a pre-trained target detection model to determine whether there are passengers in the images to be detected. If there are passengers in the image to be detected, perform grayscale conversion on each frame of the image to be detected to obtain a grayscale image to be detected; Denoising is performed on each frame of the image to be detected in the image set to obtain a denoised image; For each frame of denoised image, the variance value is calculated based on the brightness value of each pixel in the denoised image and the mean brightness value of the denoised image. The denoised image is determined to be an occluded image based on the comparison between the variance value and the preset threshold. If all the denoised images for a consecutive preset number of frames are occluded images, then the camera is determined to be occluded. The denoising process to obtain the denoised image includes: for each frame of grayscale image to be detected, using a Gaussian high-pass filter to filter pixels with smooth brightness changes in the frame of grayscale image to be detected, to obtain the outer contour region; Fourier transform is performed on the outer contour region of each grayscale image to be detected to convert the spatial domain information into the frequency domain information, thus obtaining the first image after transformation. The noise points in each frame of the first image are denoised to obtain the second image; the denoised image is obtained by performing an inverse Fourier transform on each frame of the second image.

2. The method for detecting an obstructed camera inside an elevator according to claim 1, characterized in that, The frequency domain information in each frame of the first image is filtered to remove noise points and obtain the second image. Perform an inverse Fourier transform on each frame of the second image to convert the format of the second image to the format before denoising, thus obtaining a denoised image.

3. The method for detecting obstruction of a camera inside an elevator according to claim 2, characterized in that, The average brightness of the denoised image is obtained by summing the brightness values ​​of each pixel in the denoised image. Then, the variance of the brightness of the denoised image is calculated based on the brightness values ​​of each pixel in the denoised image and the average brightness.

4. A method for detecting obstruction of a camera inside an elevator according to any one of claims 1-3, characterized in that, The step of converting the video captured by the camera inside the elevator car into multiple frames of images to be detected and inputting them into a pre-trained target detection model to determine whether there are passengers in the images to be detected includes: when the output of the target detection model is that there are passengers in the images to be detected, detecting the subsequent multiple frames of images to be detected to determine whether the camera is obstructed.

5. A method for detecting obstruction of a camera inside an elevator according to claim 4, characterized in that, The step of determining whether a denoised image is an occluded image based on a comparison between the variance value and a preset threshold for each frame of the denoised image includes: For each frame of denoised image, if the comparison result is that the variance value is less than or equal to the preset threshold, then the denoised image is determined to be an occluded image. For each frame of denoised image, if the variance value of the comparison result is greater than the preset threshold, then the denoised image is determined to be an unoccluded image. If a denoised image is considered an occluded image, and all subsequent n consecutive denoised images are also considered occluded images, then the camera is detected to be occluded.

6. A method for detecting obstruction of a camera inside an elevator according to claim 2, characterized in that, Before performing grayscale conversion on each frame of the image to be detected to obtain a grayscale image to be detected, the method includes: if there are passengers in the image to be detected, then performing grayscale conversion on the image to be detected; If there are no passengers in the image to be detected, then stop the grayscale conversion of the image to be detected; The target detection model is trained through the following steps: obtaining training samples of images to be detected; the training samples of images to be detected contain multiple training samples, and the training sample set includes training images and coordinate information of passengers marked in the training images; for each training sample, the training images in the training samples are input as positive samples into the target detection model to be trained, and the coordinate information of passengers marked in the training images is input as standard samples into the target detection model to be trained, thereby training the target detection model to be trained.

7. A device for detecting obstructed cameras inside elevators, characterized in that, The method for detecting camera obstruction in an elevator according to any one of claims 1-6, the apparatus comprising: The judgment unit is used to determine whether there is a passenger in the image to be detected when the target detection model detects multiple frames of images to be detected; the denoising processing module performs denoising processing on each frame of the image to be detected in the image set to be detected when the judgment unit determines that there is a passenger to be detected, so as to obtain a denoised image. The calculation module is used to calculate the variance value for each frame of the denoised image based on the brightness value of each pixel in the denoised image and the mean brightness value of the denoised image. The first judgment module is used to determine whether the denoised image is an occluded image based on the comparison result between the variance value and the preset threshold. The determination module is used to detect that the camera is obstructed if all the denoised images for a consecutive preset number of frames are obstructed images.

8. The device for detecting obstruction of a camera inside an elevator according to claim 7, characterized in that, Also includes: The processing unit is configured to perform grayscale conversion on the image to be detected if a passenger is present in the image to be detected. The processing unit includes a first processing unit, used to perform grayscale conversion on the image to be detected if there is a passenger in the image to be detected; The second processing unit is used to stop performing grayscale conversion on the image to be detected if there are no passengers in the image to be detected. The target detection model is trained through the following steps: obtaining training samples of the image to be detected; the training samples of the image to be detected contain multiple training samples, and the training sample set includes training images and the coordinate information of passengers marked in the training images; For each training sample, the training images in the training sample are used as positive samples and input into the target detection model to be trained. The coordinate information of the passengers marked in the training sample images is used as standard samples and input into the target detection model to be trained.

9. A device for detecting obstruction of a camera inside an elevator according to claim 7 or 8, characterized in that, Also includes: The grayscale conversion unit is used to perform grayscale conversion on each frame of the image to be detected to obtain a grayscale image to be detected. The filtering unit is used to filter pixels with gradual brightness changes in each frame of grayscale image to be detected using a Gaussian high-pass filter to obtain the outer contour region. The grayscale conversion unit includes: The first conversion unit is used to perform Fourier transformation on the outer contour region of each grayscale image to be detected to obtain the converted first image; the denoising processing unit is used to perform denoising processing on the noise points in each frame of the first image to obtain the second image; the second conversion unit is used to perform inverse Fourier transformation on each frame of the second image to obtain the denoised image. The stop processing unit is used to stop performing grayscale conversion on the image to be detected if there are no passengers in the image to be detected.

10. A computer 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 method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Method and device for determining shielding condition of camera head

    CN102176244A