Scene judgment method and device, and electronic device

By acquiring light intake and environmental parameters, the monitoring equipment can refine the outdoor scene division and automatically switch image processing strategies, solving the problem of inaccurate scene judgment and achieving optimal image presentation in multiple scenes.

CN112183346BActive Publication Date: 2024-11-08ZHEJIANG DAHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011043222.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-28
Publication Date
2024-11-08
Estimated Expiration
2040-09-28

AI Technical Summary

Technical Problem

In existing technologies, monitoring equipment struggles to perform more detailed scene segmentation and scene switching tracking when processing outdoor scenes, resulting in image processing strategies that cannot adapt to the needs of different scenarios.

Method used

By acquiring the light intake parameter value and the environmental parameter change value, the shooting scene of the target camera device is determined, and the scene switching is tracked according to the environmental parameter change value, so as to realize the detailed division and automatic switching of the outdoor scene.

Benefits of technology

It enables automatic switching of the best image processing strategy in various scenarios, ensuring that the monitoring equipment presents the best video image effect in different scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112183346B_ABST
    Figure CN112183346B_ABST
Patent Text Reader

Abstract

The present invention provides a scene judgment method and device, and an electronic device, wherein the method includes: determining the shooting scene of a target camera device according to an incoming light amount parameter value, wherein the shooting scene divides the target camera device according to a preset scene, and the incoming light amount parameter value includes information for scene division; tracking the switching of the shooting scene of the target camera device according to an environmental parameter change value, wherein the target camera device performs shooting scene switching processing according to the environmental parameter change value. Through the present invention, the problem of being unable to perform more detailed division of outdoor scenes and scene switching tracking during scene judgment is solved, thereby achieving the effect of selecting the best image processing strategy according to the current scene in a targeted manner, and enabling the monitoring device to automatically switch in various scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing, and in particular to a scene determination method and device, and an electronic device. Background Art

[0002] When the image processing module of the monitoring equipment processes the collected video images, a single image processing strategy is often difficult to adapt to various complex scenes. Therefore, for video images of different scenes, in order to optimize the image information such as clarity and color, different image processing strategies need to be adopted.

[0003] Usually, shooting scenes are divided into indoor or outdoor without more detailed division. At the same time, it is difficult to continuously monitor the switching status of shooting scenes.

[0004] In the related art, there is currently no effective solution to the problem that outdoor scenes cannot be divided into more detailed parts and scene switching cannot be tracked during scene judgment. Summary of the invention

[0005] The embodiments of the present invention provide a scene judgment method and device, and an electronic device to at least solve the problem in the related art that outdoor scenes cannot be divided more finely and scene switching cannot be tracked during scene judgment.

[0006] According to one embodiment of the present invention, a scene judgment method is provided, comprising: determining a shooting scene of a target camera device according to an incoming light amount parameter value, wherein the shooting scene divides the target camera device according to preset scenes, and the incoming light amount parameter value includes information for scene division; tracking switching of the shooting scene of the target camera device according to an environmental parameter change value, wherein the target camera device performs shooting scene switching processing according to the environmental parameter change value.

[0007] According to another embodiment of the present invention, a scene judgment device is provided, including: a determination module, used to determine the shooting scene of the target camera device according to the light input parameter value, wherein the shooting scene divides the target camera device according to preset scenes, and the light input parameter value includes information for scene division; a tracking module, used to track the switching of the shooting scene of the target camera device according to the environmental parameter change value, wherein the target camera device performs shooting scene switching processing according to the environmental parameter change value.

[0008] According to yet another embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0009] Through the present invention, since the shooting scene of the target camera device is determined according to the parameter value of the incoming light amount, the target camera device can be divided according to the preset scene according to the shooting scene. At the same time, the switching of the shooting scene of the target camera device is tracked according to the environmental parameter change value, so that the target camera device performs the shooting scene switching processing according to the environmental parameter change value. Therefore, the problem of being unable to make a more detailed division of outdoor scenes and track scene switching during scene judgment can be solved, and the best image processing strategy can be selected according to the current scene in a targeted manner, so that the monitoring device can automatically switch in various scenes. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0011] Figure 1 is a flow chart of a scene determination method according to an optional embodiment of the present invention;

[0012] Figure 2 is a structural block diagram of a scene determination device according to an optional embodiment of the present invention;

[0013] Figure 3 is a structural block diagram of a scene determination device according to an optional embodiment of the present invention;

[0014] Figure 4 is a flow chart of obtaining effective spectrum information according to an embodiment of the present invention;

[0015] Figure 5 is a flowchart of initial scene judgment according to an optional embodiment of the present invention;

[0016] Figure 6 is a flow chart of scene change information monitoring according to the present invention;

[0017] Figure 7 It is a flowchart of a scene judgment method according to an optional embodiment of the present invention. DETAILED DESCRIPTION

[0018] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.

[0019] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0020] Example 1

[0021] The method embodiment provided in the first embodiment of the present application can be executed in a monitoring device or a similar shooting device. Taking the operation on the monitoring device as an example, for video images of different scenes, different image processing strategies are often adopted to optimize the image information such as clarity and color. The effective spectral information is obtained by the amount of light input obtained by switching the filter slices on multiple filter devices, and then the current shooting scene is judged in combination with the spectral characteristics under different scenes, and the switching information of the shooting scene is continuously tracked through the changes in the ambient brightness and RGB color statistical data. When processing the collected video images, the image processing module of the monitoring device is mainly divided into an initial scene judgment module and a scene switching tracking module. Among them, the initial scene judgment module is divided into an effective spectral information acquisition module and a scene judgment module, and the scene switching tracking module is divided into a brightness and color change information tracking module and a scene switching judgment module.

[0022] In this embodiment, a scene determination method running on the above monitoring device is provided. Figure 1 is a flow chart of scene judgment according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0023] Step S102, determining a shooting scene of the target camera device according to the incoming light amount parameter value, wherein the shooting scene divides the target camera device according to preset scenes, and the incoming light amount parameter value includes information for performing scene division;

[0024] It should be noted that the parameter value of the amount of light input is derived from the acquisition of effective spectral information, mainly including: infrared spectrum light input, ultraviolet light input and full-wavelength light input, etc., which are not specifically limited in this application.

[0025] Step S104: tracking the switching of the shooting scene of the target camera device according to the environmental parameter change value, wherein the target camera device performs shooting scene switching processing according to the environmental parameter change value.

[0026] It should be noted that the target camera device will perform a switching process operation of the shooting scene according to the environmental parameter change value. The environmental parameter change value mainly includes: an environmental brightness parameter change value and an environmental color parameter change value.

[0027] Through the above steps, since the shooting scene of the target camera device is determined according to the parameter value of the incoming light amount, the target camera device can be divided according to the preset scene according to the shooting scene. At the same time, the switching of the shooting scene of the target camera device is tracked according to the environmental parameter change value, so that the target camera device performs the shooting scene switching processing according to the environmental parameter change value. Therefore, the problem of being unable to make a more detailed division of outdoor scenes and track scene switching during scene judgment can be solved, so that the best image processing strategy can be selected according to the current scene in a targeted manner, so that the monitoring device can automatically switch in various scenes.

[0028] By acquiring information about the current shooting scene, the best image processing strategy can be selected in a targeted manner according to the current shooting scene, so that the monitoring device can automatically present the best video image effect in various scenes without manual switching.

[0029] Optionally, the execution entity of the above steps can be local or in the cloud, but is not limited thereto.

[0030] Preferably, the scene determination method further comprises: before the target camera device is started, acquiring the light input amount parameter value by switching the light filtering device.

[0031] Further, the light intake parameter value is obtained by switching the filter device, including: switching the filter device to a first filter to obtain a first light intake parameter value; switching the filter device to a second filter to obtain a second light intake parameter value; switching the filter device to a third filter to obtain a third light intake parameter value; determining a fourth light intake parameter value through the first light intake parameter value, the second light intake parameter value, and the third light intake parameter value; determining a shooting scene of a target camera device according to the light intake parameter value, including: determining that the initial shooting scene of the target camera device is a first scene according to a first light intake component parameter value and a second light intake component parameter value in the light intake parameter value, wherein the light intake parameter value includes: a first light intake component parameter value and a second light intake component parameter value, wherein the first light intake component parameter value is determined by the first light intake parameter value and the third light intake parameter value, and the second light intake component parameter value is determined by the first light intake parameter value and the fourth light intake parameter value.

[0032] During specific execution, before the target camera device is started, the current filter of the filtering device is switched to a fully transparent filter to obtain the amount of light entering at all wavelengths; the current filter is switched to a bandpass filter that transmits visible light to obtain the amount of visible light entering; the current filter is switched to a cutoff filter that only transmits infrared light to obtain the amount of infrared light entering; the difference between the amount of light entering at all wavelengths, the amount of visible light entering, and the amount of infrared light entering is calculated to obtain the amount of ultraviolet light entering.

[0033] like Figure 4 As shown, it is a flowchart of spectrum effective information acquisition in the embodiment of the present application. The effective information in the spectrum that can be applied to indoor / outdoor, outdoor sunny / non-sunny, outdoor morning (and evening) / noon / night scene judgment includes: the component of infrared low beam in the current scene to the incoming light of all wavelengths of light, and the component of ultraviolet low beam in the current scene to the incoming light of all wavelengths of light.

[0034] like Figure 4 As shown, the following steps are included:

[0035] Step S400, start.

[0036] Step S402, switching the filter to a fully transparent filter.

[0037] Step S404, adjusting the exposure time and gain according to the picture brightness, and fixing the current exposure time and gain.

[0038] Step S406, counting the brightness values ​​I_all of all pixels in the current picture.

[0039] Step S408, switching the filter to a bandpass filter that transmits visible light.

[0040] Step S410, counting the brightness values ​​I_visible of all pixels in the current picture.

[0041] Step S412, switching the filter to an infrared-transmitting cutoff filter.

[0042] Step S414, counting the brightness values ​​I_infrared of all pixels in the current picture.

[0043] Step S416, calculating the ultraviolet light amount I_ultraviolet according to the total light amount I_all, the visible light amount I_visible and the infrared light amount I_infrared.

[0044] Step S418, calculating the infrared light component I_infrared / I_all and the ultraviolet light component I_ultraviolet / I_all.

[0045] Step S420, end.

[0046] In order to subdivide the shooting scene, the shooting scene of the target camera device is determined according to the incoming light parameter value, including: determining that the current shooting scene of the target camera device is an outdoor sunny scene according to the first incoming light component parameter value in the incoming light parameter value.

[0047] In specific implementation, the spectrum effective information acquisition module obtains the light input amount I_all of all wavelengths, the infrared light input amount component I_infrared / I_all, and the ultraviolet light input amount component I_ultraviolet / I_all. If the current scene is an outdoor scene, and the infrared light input brightness component I_infrared / I_all is greater than the infrared component threshold T_infrared, then the current scene is an outdoor sunny scene, otherwise it is an outdoor non-sunny scene.

[0048] In order to subdivide the shooting scene, the shooting scene of the target camera device is determined according to the incoming light parameter value, including: generating a corresponding outdoor time judgment threshold according to the clear parameter value, wherein the clear parameter value is determined according to the first incoming light component value in the incoming light parameter value; when the ambient brightness parameter value is less than the first outdoor time judgment threshold in the outdoor time judgment threshold, determining that the current shooting scene is outdoor night, wherein the ambient brightness parameter value; when the ambient brightness parameter value is greater than the second outdoor time judgment threshold in the outdoor time judgment threshold, determining that the current shooting scene is outdoor noon; when the ambient brightness parameter value is less than the second outdoor time judgment threshold in the outdoor time judgment threshold, determining that the current shooting scene is outdoor morning or evening.

[0049] When implementing it, Figure 5 As shown, the spectrum effective information acquisition module obtains the light amount of all wavelengths I_all, the infrared light amount component I_infrared / I_all, and the ultraviolet light amount component I_ultraviolet / I_all. In addition to the judgment of sunny / unsunny days, the clearness index index_infrared is generated according to the size of the infrared light brightness component I_infrared / I_all to meet more scene judgment requirements. Different clearness index index_infrared has different outdoor time judgment thresholds T_lightness.

[0050] like Figure 5 As shown, if the current scene is an outdoor scene, the current ambient brightness I is calculated according to the amount of light I_all of all wavelengths, the exposure time exposetime, and the gain gain. If I is less than the brightness threshold T_lightness1, the current scene is outdoor at night; otherwise, I_all is compared with T_lightness2. If I_all is greater than Tlightness2, the current scene is outdoor at noon; otherwise, the current scene is outdoor in the morning (evening).

[0051] like Figure 5As shown, in addition to the above classification, the shooting scene of the target camera device can also be determined according to the incoming light parameter value, including: determining whether the current shooting scene of the target camera device is an indoor scene or an outdoor scene according to the second incoming light component parameter value in the incoming light parameter value.

[0052] The spectrum effective information acquisition module obtains the light input amount I_all of all wavelengths, the infrared light input amount component I_infrared / I_all, and the ultraviolet light input amount component I_ultraviolet / I_all. If the ultraviolet light input amount component I_ultraviolet / I_all is less than the ultraviolet component threshold T_ultraviolet, the current scene is an indoor scene, otherwise it is an outdoor scene.

[0053] like Figure 5 The flowchart of the initial scene judgment is shown, which includes the following steps:

[0054] In step S500 , the incoming light amount I_all of all wavelengths, the incoming infrared light amount component I_infrared / I_all, and the incoming ultraviolet light amount component I_ultraviolet / I_all are known.

[0055] Step S502, I_ultraviolet / I_all>T_ultraviolet.

[0056] Step S503: If not, the current scene is an indoor scene.

[0057] Step S504: if the current scene is an outdoor scene.

[0058] Step S506, I_infrared / I_all>T_infrared.

[0059] Step S508: if the current scene is an outdoor sunny scene.

[0060] Step S510: If not, the current scene is not an outdoor sunny scene.

[0061] Step S512, calculating the clearness index index_infrared.

[0062] Step S514, obtaining T_lightness.

[0063] Step S516, I>T_lightness1. If not, it is an outdoor night scene.

[0064] Step S518, I>T_lightness2. If yes, it is an outdoor noon scene, otherwise it is an outdoor morning (evening) scene.

[0065] In order to track the shooting scene, the switching of the shooting scene of the target camera device is tracked according to the environmental parameter change value, including: when a first environmental parameter change value among the environmental parameter change values ​​of a preset period is greater than a brightness change threshold, determining that the current shooting scene of the target camera device has switched according to the first environmental parameter change value; when a first environmental parameter change value among the environmental parameter change values ​​of the preset period is not greater than the brightness change threshold and a second environmental parameter change value among the environmental parameter change values ​​of the preset period is greater than a color change threshold, determining that the current shooting scene of the target camera device has switched according to the first environmental parameter change value and the second environmental parameter change value; when it is determined that the current shooting scene of the target camera device has switched, acquiring the second scene after the switch.

[0066] When implementing it, Figure 6 As shown, in the process of judging the scene switching information, if the brightness change value I_change of the current cycle is greater than the brightness change threshold T, it is judged that the current scene may switch; if the brightness change value I_change of the current cycle is not greater than the brightness change threshold T_ichange, and the color change value C_change in the current cycle is greater than the color change threshold T_cchange, it is judged that the current scene may switch. If it is judged that the current scene may switch, return to the initial scene judgment process to obtain the scene information after switching. The scene information after switching refers to the information in the spectrum that can be applied to indoor / outdoor, outdoor sunny / non-sunny, outdoor morning (and evening) / noon / night scene judgment.

[0067] It should be noted that the current ambient brightness value I_cur is obtained according to the current exposure time, gain and brightness statistics in the Raw data of the target camera device. Every N frames of image are regarded as a cycle, and the ambient brightness value is counted once within the cycle. If the current cycle is the i-th cycle, the brightness change value I_change within the current cycle is |I_i-I_(i-1)|.

[0068] It should be noted that the statistical values ​​of R values, G values ​​and B values ​​in the Raw data of the target camera device are calculated, and every N frames of images are regarded as a cycle. The statistical values ​​of R, G and B are counted respectively within the cycle. If the current cycle is the i-th cycle, the color change value C_change within the current cycle is |R_i-R_(i-1)|+|G_i-G_(i-1)|+|B_i-B_(i-1)|.

[0069] In order to track the shooting scene, the switching of the shooting scene of the target camera device is tracked according to the environmental parameter change value, including: when a first environmental parameter change value in the environmental parameter change value of a preset period is not greater than a brightness change threshold and a second environmental parameter change value in the environmental parameter change value of the preset period is not greater than a color change threshold, determining that the current shooting scene of the target camera device has not switched according to the first environmental parameter change value and the second environmental parameter change value; and when the shooting scene has not switched, updating the first environmental parameter change value and the second environmental parameter change value of the preset period.

[0070] When implementing it, Figure 6 As shown, if the brightness change value I_change in the current cycle is not greater than the brightness change threshold value T_ichange, and the color change value C_change in the current cycle is not greater than the color change threshold value T_cchange, it is determined that the current scene has not been switched. If it is determined that the current scene may be switched, the initial scene judgment process is returned to obtain the scene information after the switch.

[0071] It should be noted that the current ambient brightness value I_cur is obtained according to the current exposure time, gain and brightness statistics in the Raw data of the target camera device. Every N frames of image are regarded as a cycle, and the ambient brightness value is counted once within the cycle. If the current cycle is the i-th cycle, the brightness change value I_change within the current cycle is |I_i-I_(i-1)|.

[0072] It should be noted that the statistical values ​​of R values, G values ​​and B values ​​in the Raw data of the target camera device are calculated, and every N frames of images are regarded as a cycle. The statistical values ​​of R, G and B are counted respectively within the cycle. If the current cycle is the i-th cycle, the color change value C_change within the current cycle is |R_i-R_(i-1)|+|G_i-G_(i-1)|+|B_i-B_(i-1)|.

[0073] like Figure 6 The flowchart of scene change information monitoring in an embodiment of the present application is shown, including:

[0074] Step S600, counting the ambient brightness value I and color statistics R, G, B of the current cycle.

[0075] Step S602: Check whether the current cycle is finished. If not, return to step S600.

[0076] Step S604, calculating the ambient brightness change value I_change.

[0077] Step S606, I_change>T_ichange. If yes, proceed to step S608, if not, proceed to step S616.

[0078] Step S608, calculating the color statistics information change value C_change.

[0079] Step S610, I_change>T_ichange.

[0080] Step S612: the scene is not switched.

[0081] Step S614, updating the ambient brightness value I and the color statistics R, G, B of the current cycle, and proceeding to step S620.

[0082] Step S616, the scene may switch.

[0083] Step S618, returning to the initial scene determination module.

[0084] Step S620, ambient brightness value I and color statistics of the previous cycle.

[0085] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0086] Example 2

[0087] In this embodiment, a scene judgment device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0088] Figure 2 is a structural block diagram of a scene determination device according to an embodiment of the present invention. Figure 2As shown, the device includes: a determination module 30, used to determine the shooting scene of the target camera device according to the light input parameter value, wherein the shooting scene divides the target camera device according to preset scenes, and the light input parameter value includes information for scene division; a tracking module 32, used to track the switching of the shooting scene of the target camera device according to the environmental parameter change value, wherein the target camera device performs shooting scene switching processing according to the environmental parameter change value.

[0089] It should be noted that in the determination module 30, the parameter value of the incoming light amount is derived from the acquisition of effective spectral information, mainly including: infrared spectrum incoming light amount, ultraviolet light amount and full wavelength incoming light amount, etc., which are not specifically limited in the present application.

[0090] It should be noted that in the tracking module 32, the target camera device will perform a switching process operation of the shooting scene according to the environmental parameter change value. The environmental parameter change value mainly includes: an environmental brightness parameter change value and an environmental color parameter change value.

[0091] Through the above module, since the shooting scene of the target camera device is determined according to the parameter value of the incoming light amount, the target camera device can be divided according to the preset scene according to the shooting scene. At the same time, the switching of the shooting scene of the target camera device is tracked according to the environmental parameter change value, so that the target camera device performs the shooting scene switching processing according to the environmental parameter change value. Therefore, the problem of being unable to make a more detailed division of outdoor scenes and scene switching tracking during scene judgment can be solved, so that the best image processing strategy can be selected according to the current scene in a targeted manner, so that the monitoring device can automatically switch in various scenes.

[0092] By acquiring information about the current shooting scene, the best image processing strategy can be selected in a targeted manner according to the current shooting scene, so that the monitoring device can automatically present the best video image effect in various scenes without manual switching.

[0093] Figure 3 is a structural block diagram of a scene determination device according to an optional embodiment of the present invention. Figure 3 As shown, the device also includes:

[0094] The acquisition module 34 is used to acquire the light input amount parameter value by switching the light filtering device before the target camera device is started.

[0095] The determination module 30 is used to obtain the light input parameter value by switching the filter device, including: switching the filter device to a first filter to obtain a first light input parameter value; switching the filter device to a second filter to obtain a second light input parameter value; switching the filter device to a third filter to obtain a third light input parameter value; determining a fourth light input parameter value through the first light input parameter value, the second light input parameter value, and the third light input parameter value;

[0096] The determination module 30 is used to determine that the initial shooting scene of the target camera device is the first scene based on the first light incoming amount component parameter value and the second light incoming amount component parameter value in the light incoming amount parameter value, wherein the light incoming amount parameter value includes: a first light incoming amount component parameter value and a second light incoming amount component parameter value, the first light incoming amount component parameter value is determined by the first light incoming amount parameter value and the third light incoming amount parameter value, and the second light incoming amount component parameter value is determined by the first light incoming amount parameter value and the fourth light incoming amount parameter value.

[0097] During specific execution, before the target camera device is started, the current filter of the filtering device is switched to a fully transparent filter to obtain the amount of light entering at all wavelengths; the current filter is switched to a bandpass filter that transmits visible light to obtain the amount of visible light entering; the current filter is switched to a cutoff filter that only transmits infrared light to obtain the amount of infrared light entering; the difference between the amount of light entering at all wavelengths, the amount of visible light entering, and the amount of infrared light entering is calculated to obtain the amount of ultraviolet light entering.

[0098] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0099] In order to better understand the above scene judgment method process, the above technical solution is explained below in combination with a preferred embodiment, but it is not used to limit the technical solution of the embodiment of the present invention.

[0100] The preferred embodiment of the present invention can obtain information about the current shooting scene and selectively select the best image processing strategy according to the current shooting scene, so that the monitoring device can automatically present the best video image effect in various scenes without manual switching.

[0101] like Figure 7 The figure is a schematic flow chart of the scene judgment method according to an embodiment of the present application.

[0102] Step S700, start.

[0103] Step S702, fixing the exposure time and gain, and obtaining the amount of all light input I_all, the amount of visible light input I_visible, the amount of infrared light input I_infrared, and the amount of ultraviolet light input I_ultraviolet by switching the filters.

[0104] By switching the current filter of the filtering device to a fully transparent filter, the amount of light entering I_all of all wavelengths can be obtained; by switching the current filter to a bandpass filter that transmits visible light, the amount of light entering I_visible of visible light can be obtained; by switching the current filter to a cutoff filter that only transmits infrared light, the amount of infrared light entering I_infrared can be obtained; by taking the difference between the amount of light entering of all wavelengths, the amount of visible light, and the amount of infrared light entering, the amount of ultraviolet light entering I_ultraviolet can be obtained.

[0105] Step S704 , calculating the visible light input component I_visible / I_all, the infrared light input component I_infrared / I_all, and the ultraviolet light input component I_ultraviolet / I_all.

[0106] Step S706, judging whether the current location is indoors or outdoors according to I_ultraviolet / I_all.

[0107] In specific implementation, the spectrum effective information acquisition module obtains the light input amount I_all of all wavelengths, the infrared light input amount component I_infrared / I_all, and the ultraviolet light input amount component I_ultraviolet / I_all. If the current scene is an outdoor scene, and the infrared light input brightness component I_infrared / I_all is greater than the infrared component threshold T_infrared, then the current scene is an outdoor sunny scene, otherwise it is an outdoor non-sunny scene.

[0108] Step S708: If the current location is outdoors, determine whether the current location is sunny or not according to I_infrared / I_all, and obtain the clearness index.

[0109] In addition to the judgment of sunny / unsunny days, the clearness index index_infrared is generated according to the size of the infrared light component I_infrared / I_all to meet more scene judgment requirements. For different clearness index index_infrared, there are different outdoor time judgment thresholds T_lightness.

[0110] Step S710: If the current time is outdoors, determine whether the current time is morning (evening), noon or night based on I_all.

[0111] If the current scene is an outdoor scene, the current ambient brightness I is calculated based on the amount of light of all wavelengths I_all, the exposure time exposetime, and the gain gain. If I is less than the brightness threshold T_lightness1, the current scene is outdoor at night; otherwise, I_all is compared with T_lightness2. If I_all is greater than Tlightness2, the current scene is outdoor at noon; otherwise, the current scene is outdoor in the morning (evening).

[0112] Step S712, updating scene brightness and RGB statistical information and RGB statistical information.

[0113] The current ambient brightness value I_cur is obtained according to the current exposure time, gain and the brightness statistics in the Raw data of the target camera device. Every N frames of image is regarded as a cycle, and the ambient brightness value is counted once in the cycle. If the current cycle is the i-th cycle, the brightness change value I_change in the current cycle is |I_i-I_(i-1)|. Step S714, the current scene brightness is obtained in real time, and the brightness and RGB statistical information changes are calculated.

[0114] Calculate the statistical values ​​of R, G and B in the Raw data of the target camera device. Take every N frames of image as a cycle, and count the statistical values ​​of R, G and B respectively within the cycle. If the current cycle is the i-th cycle, the color change value C_change within the current cycle is |R_i-R_(i-1)|+|G_i-G_(i-1)|+|B_i-B_(i-1)|.

[0115] Step S716, judging whether the scene is switched according to the brightness change information and the RGB statistical information.

[0116] If the brightness change value I_change of the current cycle is greater than the brightness change threshold T, it is judged that the current scene may switch; if the brightness change value I_change of the current cycle is not greater than the brightness change threshold T_ichange, and the color change value C_change in the current cycle is greater than the color change threshold T_cchange, it is judged that the current scene may switch.

[0117] If the brightness change value I_change in the current cycle is not greater than the brightness change threshold T_ichange, and the color change value C_change in the current cycle is not greater than the color change threshold T_cchange, it is determined that the current scene has not been switched.

[0118] Step S718: whether the scene is switched.

[0119] Otherwise, return to step S712; if yes, return to step S702.

[0120] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0121] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0122] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0123] S1, determining a shooting scene of a target camera device according to an incoming light amount parameter value, wherein the shooting scene divides the target camera device according to preset scenes, and the incoming light amount parameter value includes information for performing scene division;

[0124] S2, tracking the switching of the shooting scene of the target camera device according to the environmental parameter change value, wherein the target camera device performs shooting scene switching processing according to the environmental parameter change value.

[0125] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0126] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0127] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A scene judgment method, It is characterized in that include: Determine a shooting scene of a target camera device according to an incoming light amount parameter value, wherein the shooting scene divides the target camera device according to preset scenes, and the incoming light amount parameter value includes information for performing scene division; Tracking the switching of the shooting scene of the target camera device according to the environmental parameter change value, wherein the target camera device performs shooting scene switching processing according to the environmental parameter change value, and the environmental parameter change value includes an environmental brightness parameter change value and an environmental color parameter change value; Among them, determining the shooting scene of the target camera device according to the incoming light amount parameter value includes: determining that the current shooting scene of the target camera device is an outdoor sunny scene according to the first incoming light amount component parameter value in the incoming light amount parameter value, the first incoming light amount component parameter value is the infrared incoming light amount component, and the infrared incoming light amount component is the ratio of the infrared incoming light amount to the total incoming light amount.

2. The method according to claim 1, It is characterized in that Also includes: Before the target camera device is started, the light input amount parameter value is obtained by switching the filter device.

3. The method according to claim 2, It is characterized in that The method obtains the light-incoming amount parameter value by switching the light-filtering device, including: switching the light-filtering device to a first light-filter to obtain a first light-incoming amount parameter value; switching the light-filtering device to a second light-filter to obtain a second light-incoming amount parameter value; switching the light-filtering device to a third light-filter to obtain a third light-incoming amount parameter value; and determining a fourth light-incoming amount parameter value by using the first light-incoming amount parameter value, the second light-incoming amount parameter value, and the third light-incoming amount parameter value; Determining a shooting scene of a target camera device according to an incoming light amount parameter value, including: determining that the initial shooting scene of the target camera device is a first scene according to a first incoming light amount component parameter value and a second incoming light amount component parameter value in the incoming light amount parameter value, wherein the incoming light amount parameter value includes: a first incoming light amount component parameter value and a second incoming light amount component parameter value, the first incoming light amount component parameter value is determined by the first incoming light amount parameter value and the third incoming light amount parameter value, and the second incoming light amount component parameter value is determined by the first incoming light amount parameter value and the fourth incoming light amount parameter value.

4. The method according to claim 1, It is characterized in that Determine the shooting scene of the target camera device according to the light input parameter value, including: Generate a corresponding outdoor time determination threshold according to a clear parameter value, wherein the clear parameter value is determined according to a first light input component parameter value in the light input parameter value; When the ambient brightness parameter value is less than the first outdoor time judgment threshold value among the outdoor time judgment threshold values, determining that the current shooting scene is outdoor at night, wherein the ambient brightness parameter value is determined according to the amount of light entering the light of all wavelengths, the exposure time, and the gain; When the ambient brightness parameter value is greater than a second outdoor time determination threshold among the outdoor time determination thresholds, determining that the current shooting scene is outdoor noon; When the ambient brightness parameter value is less than the second outdoor time determination threshold among the outdoor time determination thresholds, it is determined that the current shooting scene is outdoor morning or evening.

5. The method according to claim 3, It is characterized in that Determine the shooting scene of the target camera device according to the light input parameter value, including: According to the second light incoming amount component parameter value in the light incoming amount parameter value, it is determined whether the current shooting scene of the target camera device is an indoor scene or an outdoor scene.

6. The method according to claim 1, It is characterized in that Tracking the switching of the shooting scene of the target camera device according to the change value of the environmental parameter includes: When a first environmental parameter change value among the environmental parameter change values ​​of a preset period is greater than a brightness change threshold, determining, according to the first environmental parameter change value, that a current shooting scene of the target camera device has been switched; When a first environmental parameter change value in the environmental parameter change values ​​of a preset period is not greater than a brightness change threshold and a second environmental parameter change value in the environmental parameter change values ​​of the preset period is greater than a color change threshold, determining that the current shooting scene of the target camera device has been switched according to the first environmental parameter change value and the second environmental parameter change value; When it is determined that the current shooting scene of the target camera device has been switched, a second scene after the switching is acquired.

7. The method according to claim 6, It is characterized in that Tracking the switching of the shooting scene of the target camera device according to the change value of the environmental parameter includes: When a first environmental parameter change value in the environmental parameter change values ​​of the preset period is not greater than a brightness change threshold and a second environmental parameter change value in the environmental parameter change values ​​of the preset period is not greater than a color change threshold, determining that the current shooting scene of the target camera device has not been switched according to the first environmental parameter change value and the second environmental parameter change value; When the shooting scene is not switched, the first environmental parameter change value and the second environmental parameter change value of a preset period are updated.

8. A scene determination device, It is characterized in that include: A determination module, configured to determine a shooting scene of a target camera device according to an incoming light amount parameter value, wherein the shooting scene divides the target camera device according to preset scenes, and the incoming light amount parameter value includes information for performing scene division; A tracking module, used for tracking the switching of the shooting scene of the target camera device according to the environmental parameter change value, wherein the target camera device performs shooting scene switching processing according to the environmental parameter change value, and the environmental parameter change value includes an environmental brightness parameter change value and an environmental color parameter change value; Among them, the determination module is also used to: determine that the current shooting scene of the target camera device is an outdoor sunny scene based on the first light input component parameter value in the light input parameter value, the first light input component parameter value is the infrared light input component, and the infrared light input component is the ratio of the infrared light input to the total light input.

9. An electronic device comprising a memory and a processor, It is characterized in that A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 7.