Night vision mode control method and system based on cat eye camera, and terminal
By setting the brightness threshold and judging the proportion of the human form in the image, the problem of repeated switching of the night vision mode of the cat eye camera to ensure that users can clearly see the outside of the door at night.
Patent Information
- Application Number
- CN202411511030.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-01-28
AI Technical Summary
In night vision mode, the Maoyan camera is close to the human body and the brightness value collected by the sensor continues to change, resulting in repeated switching of night vision mode, so that users cannot clearly see the environment outside the door.
By setting up the brightness threshold of the night vision mode and color mode switching, and obtaining the human form in the image when the cat's eye camera is in the night vision mode, if the ratio of the human form is greater than the default threshold, the night vision mode is maintained.
Effectively solve the problem of repeated switching of night vision mode caused by personnel approaching to ensure that users can clearly see the outside of the door at night.
Smart Images

Figure CN119383461A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a night vision mode control method, system, terminal and computer-readable storage medium based on a cat's eye camera. Background Art
[0002] Cat's eye cameras are becoming increasingly popular in smart door locks. Through cat's eye cameras, you can see the situation outside the door, ensuring the user's home safety to the greatest extent. At night, cat's eye cameras cannot see the outdoor environment clearly, and you need to turn on the infrared fill light and switch to night vision mode to shoot, so that you can see the environment outside the door clearly. The switching of night vision is based on the ambient brightness. When the brightness is lower than a certain value, you need to turn on the infrared light for fill light, and the camera switches to black and white night vision state.
[0003] In certain specific scenarios, when the night vision is turned on, due to the human body approaching the door lock, the light emitted by the infrared fill light is reflected back by the human body and superimposed on the human body's own infrared characteristics, causing the brightness value collected by the sensor to increase significantly, and the cat's eye camera reaches the threshold for turning off night vision, and the infrared fill light is turned off; after the infrared fill light is turned off, the brightness value is low again to the threshold for turning on night vision, and the cycle oscillates back and forth, causing the cat's eye camera screen to switch between light and dark repeatedly, making it impossible for the user to see the environment outside the door clearly.
[0004] Therefore, the prior art still needs to be improved and developed. Summary of the invention
[0005] The main purpose of the present invention is to provide a night vision mode control method, system, terminal and computer-readable storage medium based on a cat's eye camera, aiming to solve the problem in the prior art that when the cat's eye camera is in night vision mode, due to the human body approaching the door lock, the brightness value collected by the sensor keeps changing, thereby causing the night vision mode of the cat's eye camera to keep switching, the brightness of the picture switches repeatedly, and the user cannot see the environment outside the door clearly.
[0006] To achieve the above object, the present invention provides a night vision mode control method based on a cat's eye camera, and the night vision mode control method based on a cat's eye camera comprises the following steps:
[0007] Setting a mode switching threshold, wherein the mode switching threshold comprises a first brightness threshold for switching from night vision mode to color mode;
[0008] Acquire the current state mode and the current brightness value. If the current state mode is the night vision mode and the current brightness value is greater than the first brightness threshold, acquire the current image captured by the cat's eye camera;
[0009] The proportion of human figures in the current image is obtained, and if the proportion of human figures is greater than a preset proportion threshold, the night vision mode is maintained.
[0010] Optionally, the night vision mode control method based on the cat's eye camera, wherein the obtaining of the current state mode and the current brightness value, if the current state mode is the night vision mode and the current brightness value is greater than the first brightness threshold, then obtaining the current image captured by the cat's eye camera, specifically includes:
[0011] Acquire a current state mode and a current brightness value, and if the current state mode is the night vision mode, compare the current brightness value with the first brightness threshold;
[0012] If the current brightness value is greater than the first brightness threshold, the current image captured by the cat's eye camera is obtained.
[0013] Optionally, in the night vision mode control method based on a cat's eye camera, the mode switching threshold further includes a second brightness threshold for switching from the color mode to the night vision mode, wherein the first brightness threshold is greater than the second brightness threshold;
[0014] The method of obtaining the current state mode and the current brightness value further includes:
[0015] If the current state mode is the color mode and the current brightness value is less than the second brightness threshold, the infrared fill light is turned on and the color mode is switched to the night vision mode.
[0016] Optionally, the method for controlling the night vision mode based on a cat's eye camera, wherein the step of obtaining the proportion of human figures in the current image and maintaining the night vision mode if the proportion of human figures is greater than a preset proportion threshold, specifically includes:
[0017] Determine whether there is a human figure in the current image, and if so, calculate the proportion of the human figure in the current image by a preset AI algorithm;
[0018] A preset proportion threshold is determined, and the human figure proportion is compared with the preset proportion threshold. If the human figure proportion is greater than the preset proportion threshold, the night vision mode is maintained.
[0019] Optionally, the night vision mode control method based on a cat's eye camera, wherein the step of calculating the proportion of human figures in the current image by a preset AI algorithm specifically includes:
[0020] Obtaining a rectangular frame corresponding to the outer contour of the human figure in the current image through the preset AI algorithm, and calculating the rectangular area corresponding to the rectangular frame;
[0021] The ratio of the rectangular area to the current image is calculated to obtain the human figure proportion.
[0022] Optionally, the method for controlling the night vision mode based on a cat's eye camera, wherein the step of judging whether there is a human figure in the current image further comprises:
[0023] If there is no human figure in the current image, the night vision mode is maintained.
[0024] Optionally, the method for controlling the night vision mode based on a cat's eye camera, wherein the step of obtaining the proportion of human figures in the current image further includes:
[0025] If the human figure ratio is less than or equal to the preset ratio threshold, the infrared fill light is turned off and the night vision mode is switched to the color mode.
[0026] In addition, to achieve the above-mentioned purpose, the present invention further provides a night vision mode control system based on a cat's eye camera, wherein the night vision mode control system based on a cat's eye camera comprises:
[0027] A mode switching threshold setting module, used to set a mode switching threshold, wherein the mode switching threshold includes a first brightness threshold for switching from a night vision mode to a color mode;
[0028] A brightness value comparison module, used to obtain a current state mode and a current brightness value, and if the current state mode is the night vision mode and the current brightness value is greater than the first brightness threshold, obtain a current image captured by the cat's eye camera;
[0029] The night vision mode maintaining module is used to obtain the proportion of human figures in the current image, and if the proportion of human figures is greater than a preset proportion threshold, maintain the night vision mode.
[0030] In addition, to achieve the above-mentioned purpose, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and a night vision mode control program based on a cat's eye camera stored on the memory and runnable on the processor, and when the night vision mode control program based on the cat's eye camera is executed by the processor, the steps of the night vision mode control method based on the cat's eye camera as described above are implemented.
[0031] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a night vision mode control program based on a cat's eye camera, and when the night vision mode control program based on a cat's eye camera is executed by a processor, the steps of the night vision mode control method based on a cat's eye camera as described above are implemented.
[0032] In the present invention, a mode switching threshold is set, wherein the mode switching threshold includes a first brightness threshold for switching from night vision mode to color mode; the current state mode and the current brightness value are obtained, and if the current state mode is the night vision mode and the current brightness value is greater than the first brightness threshold, the current image captured by the cat's eye camera is obtained; the proportion of human figures in the current image is obtained, and if the proportion of human figures is greater than a preset proportion threshold, the night vision mode is maintained. The present invention sets a brightness threshold for switching between night vision mode and color mode, and judges the proportion of human figures in the image when the cat's eye camera is in night vision mode and reaches the switching brightness threshold, which can effectively solve the problem of repeated switching of night vision mode due to the approach of people, and effectively ensures that users can see the environment outside the door clearly through the cat's eye camera at night. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 It is a flow chart of a preferred embodiment of the night vision mode control method based on a cat's eye camera of the present invention;
[0034] Figure 2 It is a flowchart of a specific implementation process of a preferred embodiment of the night vision mode control method based on a cat's eye camera of the present invention;
[0035] Figure 3 It is a structural diagram of a preferred embodiment of the night vision mode control system based on a cat's eye camera of the present invention;
[0036] Figure 4 It is a structural diagram of a preferred embodiment of the terminal of the present invention. DETAILED DESCRIPTION
[0037] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0038] Cat's eye cameras are becoming increasingly popular in smart door locks. Through cat's eye cameras, you can see the situation outside the door, ensuring the user's home safety to the greatest extent. At night, cat's eye cameras cannot see the outdoor environment clearly, and you need to turn on the infrared fill light and switch to night vision mode to shoot, so that you can see the environment outside the door clearly. The switching of night vision is based on the ambient brightness. When the brightness is lower than a certain value, you need to turn on the infrared light for fill light, and the camera switches to black and white night vision state.
[0039] In certain specific scenarios, when the night vision is turned on, due to the human body approaching the door lock, the light emitted by the infrared fill light is reflected back by the human body and superimposed on the human body's own infrared characteristics, causing the brightness value collected by the sensor to increase significantly, and the cat's eye camera reaches the threshold for turning off night vision, and the infrared fill light is turned off; after the infrared fill light is turned off, the brightness value is low again to the threshold for turning on night vision, and the cycle oscillates back and forth, causing the cat's eye camera screen to switch between light and dark repeatedly.
[0040] To solve the above problems, the current methods include the following two: 1. Increase the brightness threshold for switching from night vision on to off, but this will cause the night vision mode to be used in some low light conditions, because the night vision output image is black and white, while the non-night vision is in color, which will affect the user experience. 2. Add an additional radar sensor to determine the distance between people. If the user is close, the night vision will not be switched. This requires the use of relatively expensive radar sensors, which increases the cost.
[0041] To solve the above problems, the present invention proposes a night vision mode control method based on a cat's eye camera, in which the reflection of the infrared fill light is inferred by the proportion of the human figure in the cat's eye camera, which serves as a supplementary basis for the night vision switching of the cat's eye camera. This solves the problem of repeated switching of the night vision mode of the cat's eye camera of the smart door lock due to the reflection of the infrared fill light by the human body when a person approaches the smart door lock.
[0042] The night vision mode control method based on the cat's eye camera described in the preferred embodiment of the present invention is as follows: Figure 1 and Figure 2 As shown, the night vision mode control method based on the cat's eye camera includes the following steps:
[0043] Step S10: setting a mode switching threshold, wherein the mode switching threshold includes a first brightness threshold for switching from the night vision mode to the color mode and a second brightness threshold for switching from the color mode to the night vision mode.
[0044] Since the main way for smart cameras to determine whether the environment is daytime or night is to read the brightness value of the photosensitive sensor and determine whether mode switching is required based on the brightness value, there is a problem that the night vision mode is constantly switched due to the increase in brightness value caused by the user approaching. Therefore, the present invention needs to combine the brightness threshold of mode switching and the user approach recognition in the night vision mode to improve the accuracy of the cat's eye camera in judging the switching between color mode and night vision mode.
[0045] The present invention first sets a mode switching hysteresis threshold (i.e., the mode switching threshold in the present invention), that is, the threshold for the color mode to enter the night vision mode (the night vision mode can also be said to be a black and white mode, because the picture seen is black and white) and the threshold for the night vision mode to enter the color mode are separate. According to the data collected in the laboratory, the present invention sets the threshold for the night vision mode to enter the color mode to 11.6Lux (i.e., the first brightness threshold in the present invention), and the threshold for the color mode to enter the night vision mode to 2.7Lux (i.e., the second brightness threshold in the present invention). After such setting, repeated mode switching in most cases can be avoided.
[0046] Among them, the photosensitive sensor is used to collect the brightness of the external environment and transmit the external environment brightness to the processor of the smart door lock. The processor is used to control the color mode to switch to the night vision mode when the external environment brightness is less than a preset brightness threshold (i.e., the second brightness threshold in the present invention), and turn on the infrared fill light at the same time. When the external environment brightness is greater than the preset brightness threshold (i.e., the first brightness threshold in the present invention), the processor controls the night vision mode to switch to the color mode and turns off the infrared fill light at the same time.
[0047] The first brightness threshold and the second brightness threshold can be set according to actual needs, and the shooting mode of the camera can be automatically controlled according to the ambient brightness, so that the captured image can be ensured to be clear in different environments and has strong environmental adaptability.
[0048] The setting process of the first brightness threshold and the second brightness threshold is as follows: in a low-light environment, the human body is 3 meters away from the cat-eye camera, and the light is gradually reduced to see the details of the face clearly, and the threshold for the color mode to enter the night vision mode is calibrated (that is, the second brightness threshold in the present invention); on this basis, the light is increased or decreased by 1Lux, and the threshold for the night vision mode to enter the color mode is appropriately increased. Multiple measurements will not oscillate back and forth, and the threshold for the night vision mode to enter the color mode (that is, the first brightness threshold in the present invention) is obtained.
[0049] Step S20, obtaining a current state mode and a current brightness value. If the current state mode is the night vision mode and the current brightness value is greater than the first brightness threshold, obtaining a current image captured by the cat's eye camera.
[0050] like Figure 2 As shown, in the present invention, the cat's eye camera is set to obtain the current brightness value in real time, and judge whether the current brightness value meets the current state mode, so as to judge whether to switch the current state mode. For example, if the current state mode is the color mode, and the current brightness value is less than the second brightness threshold, the mode switching will be judged, so that the color mode is switched to the night vision mode. After the switching is completed, the switching result will be judged. If the switching is not successful, the switching process needs to be repeated until the infrared fill light is turned on and the cat's eye camera is in the night vision mode.
[0051] The present invention is arranged to add a technical process of identifying the current image collected by the cat's eye camera when the cat's eye camera collects a brightness value and determines that the night vision mode needs to be switched to the color mode.
[0052] In the night vision mode, there may be a situation where the detected brightness increases due to the approach of a human body, but the actual brightness is not generated by the external ambient light, which easily causes the night vision mode to switch. Therefore, the present invention sets a detection of the image in the night vision mode, and judges whether the brightness increase is caused by the approach of a human body by the proportion of the human figure in the image, so as to set the night vision mode where the brightness increase caused by the approach of a human body is not switched, which effectively ensures that the environment outside the cat's eye camera can be clearly seen when a human body approaches in the night vision mode.
[0053] There are two ways to collect brightness values from cat-eye cameras: the first is a photosensitive sensor, and the second is calculated based on the collected image through brightness detection software.
[0054] Specifically, the current state mode and the current brightness value are obtained. If the current state mode is the night vision mode, the current brightness value is compared with the first brightness threshold; if the current brightness value is greater than the first brightness threshold, the current image captured by the cat's eye camera is obtained.
[0055] The present invention is configured to detect brightness in the night vision mode. When the first brightness threshold is exceeded, switching is generally required. However, in order to avoid the brightness increase being caused by the approach of a human body, it is necessary to increase the judgment on the brightness increase caused by the approach of a human body, and the judgment method is to analyze the images captured by the cat's eye camera.
[0056] Furthermore, if the current state mode is the color mode and the current brightness value is less than the second brightness threshold, the infrared fill light is turned on and the color mode is switched to the night vision mode.
[0057] If the cat-eye camera is currently in color mode, read the current brightness value fed back by the photosensor every 100 milliseconds, compare the current brightness value with the second brightness threshold, and if the brightness value is less than the second brightness threshold, switch and turn on the fill light, otherwise maintain the color mode without switching.
[0058] Step S30, obtaining the proportion of human figures in the current image, and if the proportion of human figures is greater than a preset proportion threshold, maintaining the night vision mode.
[0059] When the cat-eye camera is in use, the brightness value of the environment in which the camera is located is read regularly, and the first brightness threshold or the second brightness threshold is compared to automatically switch to color mode or night vision mode. When the camera is in normal use, the built-in light sensor of the camera will continuously feedback the brightness value of the current environment in which the camera is located. The built-in system of the camera will read the brightness value fed back by the light sensor every 100 milliseconds and switch the mode according to the brightness value.
[0060] Furthermore, after the fill light is turned on in the night vision mode, the reflection of the user in the environment around the cat's eye camera can easily lead to a high ambient brightness value. Therefore, the present invention increases the collection of images in the environment around the cat's eye camera and calculates the proportion of the human figure in the image to the image area, so as to determine whether the increase in brightness value is caused by the user approaching, thereby reducing the problem of reduced accuracy of night vision mode switching due to scene differences. At the same time, the proportion of human figures in the camera image can also indirectly infer the influence of the distance of personnel on the reflection of the infrared fill light.
[0061] In view of the above situation, the present invention provides that when in night vision mode and it is determined that a person is too close to the smart door lock, the cat's eye camera of the smart door lock will remain in the night vision mode.
[0062] Specifically, determine whether there is a human figure in the current image. If so, obtain the rectangular box corresponding to the outer contour of the human figure in the current image through the preset AI algorithm, and calculate the rectangular area corresponding to the rectangular box; calculate the ratio of the rectangular area to the current image to obtain the proportion of the human figure; determine a preset proportion threshold, and compare the human figure proportion with the preset proportion threshold. If the human figure proportion is greater than the preset proportion threshold, maintain the night vision mode.
[0063] like Figure 2 As shown, the present invention uses an AI algorithm to determine whether there is a human figure in the camera picture (using the AI algorithm to extract whether there are human features in the image, wherein the AI algorithm in the present invention preferably adopts a convolutional neural network model). If it is determined that a human figure exists and the proportion of the human figure in the cat-eye camera picture exceeds 60% (that is, the preset proportion threshold in the present invention, preferably set to 60%), it can be determined that the person is too close to the camera. At this time, the night vision mode is maintained without switching.
[0064] The calculation process for the proportion of a human figure in the cat's eye camera image is as follows: a rectangular frame is drawn based on the outer contour of the human figure, and the area of the rectangular frame is calculated. This area is divided by the image area to obtain the proportion of the human figure in the image.
[0065] Furthermore, if the human figure proportion is less than or equal to the preset proportion threshold, the infrared fill light is turned off and the night vision mode is switched to the color mode.
[0066] Furthermore, if there is no human figure in the current image, the night vision mode is maintained.
[0067] like Figure 2 As shown, if the current cat-eye camera is in night vision mode and there is no human figure in the current image, the current brightness value fed back by the photosensitive sensor is read once every 100 milliseconds, and the current brightness value is compared with the first brightness threshold. If the brightness value is greater than the first brightness threshold, it is switched and the fill light is turned off, otherwise the night vision mode is maintained without switching.
[0068] In summary, the present invention sets a brightness threshold for switching between night vision mode and color mode, and judges the proportion of human figures in the image when the cat's eye camera is in night vision mode and reaches the switching brightness threshold. This effectively solves the problem of repeated switching of night vision mode when a person approaches the smart door lock. At the same time, it also ensures that the user can clearly see the stability of the external environment conditions of the cat's eye camera in the night vision mode.
[0069] Furthermore, if Figure 3 As shown, based on the above-mentioned night vision mode control method based on a cat's eye camera, the present invention also provides a night vision mode control system based on a cat's eye camera, wherein the night vision mode control system based on a cat's eye camera includes:
[0070] A mode switching threshold setting module 51 is used to set a mode switching threshold, wherein the mode switching threshold includes a first brightness threshold for switching from a night vision mode to a color mode;
[0071] A brightness value comparison module 52 is used to obtain a current state mode and a current brightness value, and if the current state mode is the night vision mode and the current brightness value is greater than the first brightness threshold, a current image captured by the cat's eye camera is obtained;
[0072] The night vision mode maintaining module 53 is used to obtain the proportion of human figures in the current image, and if the proportion of human figures is greater than a preset proportion threshold, maintain the night vision mode.
[0073] Furthermore, if Figure 4 As shown, based on the above-mentioned night vision mode control method and system based on the cat's eye camera, the present invention also provides a terminal accordingly, and the terminal includes a processor 10, a memory 20 and a display 30. Figure 4 Only some components of the terminal are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0074] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory of the terminal. In other embodiments, the memory 20 may also be an external storage device of the terminal, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the terminal. Further, the memory 20 may also include both an internal storage unit of the terminal and an external storage device. The memory 20 is used to store application software and various types of data installed on the terminal, such as the program code of the installation terminal. The memory 20 may also be used to temporarily store data that has been output or is to be output. In one embodiment, a night vision mode control program 40 based on a cat's eye camera is stored on the memory 20, and the night vision mode control program 40 based on a cat's eye camera can be executed by the processor 10, thereby realizing the night vision mode control method based on a cat's eye camera in the present application.
[0075] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run the program code or process data stored in the memory 20, such as executing the night vision mode control method based on the cat's eye camera.
[0076] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 30 is used to display information on the terminal and to display a visual user interface. The components 10-30 of the terminal communicate with each other via a system bus.
[0077] In one embodiment, when the processor 10 executes the night vision mode control program 40 based on the cat's eye camera in the memory 20, the following steps are implemented:
[0078] Setting a mode switching threshold, wherein the mode switching threshold comprises a first brightness threshold for switching from night vision mode to color mode;
[0079] Acquire the current state mode and the current brightness value. If the current state mode is the night vision mode and the current brightness value is greater than the first brightness threshold, acquire the current image captured by the cat's eye camera;
[0080] The proportion of human figures in the current image is obtained, and if the proportion of human figures is greater than a preset proportion threshold, the night vision mode is maintained.
[0081] The acquiring of the current state mode and the current brightness value, if the current state mode is the night vision mode and the current brightness value is greater than the first brightness threshold, then acquiring the current image captured by the cat's eye camera, specifically includes:
[0082] Acquire a current state mode and a current brightness value, and if the current state mode is the night vision mode, compare the current brightness value with the first brightness threshold;
[0083] If the current brightness value is greater than the first brightness threshold, the current image captured by the cat's eye camera is obtained.
[0084] Wherein, the mode switching threshold also includes a second brightness threshold for switching from the color mode to the night vision mode, wherein the first brightness threshold is greater than the second brightness threshold;
[0085] The method of obtaining the current state mode and the current brightness value further includes:
[0086] If the current state mode is the color mode and the current brightness value is less than the second brightness threshold, the infrared fill light is turned on and the color mode is switched to the night vision mode.
[0087] The acquiring the proportion of human figures in the current image and maintaining the night vision mode if the proportion of human figures is greater than a preset proportion threshold specifically includes:
[0088] Determine whether there is a human figure in the current image, and if so, calculate the proportion of the human figure in the current image by a preset AI algorithm;
[0089] A preset proportion threshold is determined, and the human figure proportion is compared with the preset proportion threshold. If the human figure proportion is greater than the preset proportion threshold, the night vision mode is maintained.
[0090] The step of calculating the proportion of human figures in the current image by using a preset AI algorithm specifically includes:
[0091] Obtaining a rectangular frame corresponding to the outer contour of the human figure in the current image through the preset AI algorithm, and calculating the rectangular area corresponding to the rectangular frame;
[0092] The ratio of the rectangular area to the current image is calculated to obtain the human figure proportion.
[0093] Wherein, the step of determining whether there is a human figure in the current image further includes:
[0094] If there is no human figure in the current image, the night vision mode is maintained.
[0095] The step of obtaining the proportion of human figures in the current image further includes:
[0096] If the human figure ratio is less than or equal to the preset ratio threshold, the infrared fill light is turned off and the night vision mode is switched to the color mode.
[0097] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a night vision mode control program based on a cat's eye camera, and when the night vision mode control program based on a cat's eye camera is executed by a processor, the steps of the night vision mode control method based on a cat's eye camera as described above are implemented.
[0098] In summary, the present invention provides a night vision mode control method based on a cat's eye camera and related equipment, the method comprising: setting a mode switching threshold, wherein the mode switching threshold comprises a first brightness threshold for switching the night vision mode to the color mode; obtaining the current state mode and the current brightness value, if the current state mode is the night vision mode and the current brightness value is greater than the first brightness threshold, then obtaining the current image captured by the cat's eye camera; obtaining the proportion of human figures in the current image, if the proportion of human figures is greater than a preset proportion threshold, then maintaining the night vision mode. The present invention sets a brightness threshold for switching between the night vision mode and the color mode, and judges the proportion of human figures in the image when the cat's eye camera is in the night vision mode and reaches the switching brightness threshold, which can effectively solve the problem of repeated switching of the night vision mode due to the approach of people, and effectively ensures that the user can see the environment outside the door clearly through the cat's eye camera at night.
[0099] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or terminal including the element.
[0100] Of course, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the program can be stored in a computer-readable storage medium that can be read by a computer, and the program can include the processes of the above-mentioned method embodiments when executed. The computer-readable storage medium can be a memory, a disk, an optical disk, etc.
[0101] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A night vision mode control method based on a cat's eye camera, characterized in that: The night vision mode control method based on the cat's eye camera includes: Setting a mode switching threshold, wherein the mode switching threshold comprises a first brightness threshold for switching from night vision mode to color mode; Acquire the current state mode and the current brightness value. If the current state mode is the night vision mode and the current brightness value is greater than the first brightness threshold, acquire the current image captured by the cat's eye camera; The proportion of human figures in the current image is obtained, and if the proportion of human figures is greater than a preset proportion threshold, the night vision mode is maintained.
2. The night vision mode control method based on the cat's eye camera according to claim 1, characterized in that: The obtaining of the current state mode and the current brightness value, if the current state mode is the night vision mode and the current brightness value is greater than the first brightness threshold, obtaining the current image captured by the cat's eye camera, specifically includes: Acquire a current state mode and a current brightness value, and if the current state mode is the night vision mode, compare the current brightness value with the first brightness threshold; If the current brightness value is greater than the first brightness threshold, the current image captured by the cat's eye camera is obtained.
3. The night vision mode control method based on the cat's eye camera according to claim 1 or 2, characterized in that: The mode switching threshold also includes a second brightness threshold for switching from the color mode to the night vision mode, wherein the first brightness threshold is greater than the second brightness threshold; The method of obtaining the current state mode and the current brightness value further includes: If the current state mode is the color mode and the current brightness value is less than the second brightness threshold, the infrared fill light is turned on and the color mode is switched to the night vision mode.
4. The night vision mode control method based on the cat's eye camera according to claim 1, characterized in that: The acquiring the proportion of human figures in the current image, and maintaining the night vision mode if the proportion of human figures is greater than a preset proportion threshold, specifically includes: Determine whether there is a human figure in the current image, and if so, calculate the proportion of the human figure in the current image by a preset AI algorithm; A preset proportion threshold is determined, and the human figure proportion is compared with the preset proportion threshold. If the human figure proportion is greater than the preset proportion threshold, the night vision mode is maintained.
5. The night vision mode control method based on the cat's eye camera according to claim 4 is characterized in that: The calculating the proportion of human figures in the current image by using a preset AI algorithm specifically includes: Obtaining a rectangular frame corresponding to the outer contour of the human figure in the current image through the preset AI algorithm, and calculating the rectangular area corresponding to the rectangular frame; The ratio of the rectangular area to the current image is calculated to obtain the human figure proportion.
6. The night vision mode control method based on the cat's eye camera according to claim 4, characterized in that: The step of determining whether there is a human figure in the current image further includes: If there is no human figure in the current image, the night vision mode is maintained.
7. The night vision mode control method based on the cat's eye camera according to claim 1, characterized in that: The step of obtaining the proportion of human figures in the current image further includes: If the human figure ratio is less than or equal to the preset ratio threshold, the infrared fill light is turned off and the night vision mode is switched to the color mode.
8. A night vision mode control system based on a cat's eye camera, characterized in that: The night vision mode control system based on the cat's eye camera includes: A mode switching threshold setting module, used to set a mode switching threshold, wherein the mode switching threshold includes a first brightness threshold for switching from a night vision mode to a color mode; A brightness value comparison module, used to obtain a current state mode and a current brightness value, and if the current state mode is the night vision mode and the current brightness value is greater than the first brightness threshold, obtain a current image captured by the cat's eye camera; The night vision mode maintaining module is used to obtain the proportion of human figures in the current image, and if the proportion of human figures is greater than a preset proportion threshold, maintain the night vision mode.
9. A terminal, characterized in that: The terminal includes: a memory, a processor, and a night vision mode control program based on a cat's eye camera stored in the memory and executable on the processor. When the night vision mode control program based on a cat's eye camera is executed by the processor, the steps of the night vision mode control method based on a cat's eye camera as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a night vision mode control program based on a cat's eye camera. When the night vision mode control program based on a cat's eye camera is executed by a processor, the steps of the night vision mode control method based on a cat's eye camera as described in any one of claims 1 to 7 are implemented.