Control method of camera device, computer device, and storage medium
By acquiring the trigger image and determining the target brightness of the fill light, the problem of unstable brightness after switching camera modes was solved, achieving rapid brightness stabilization and improving image quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-19
- Publication Date
- 2026-04-10
AI Technical Summary
When switching modes, especially from infrared mode to visible light mode, the brightness of the camera image becomes unstable, resulting in poor image quality.
By acquiring the trigger image captured by the camera device, it is determined whether the mode change conditions are met. Based on the brightness of the fill light in the first mode and the brightness correspondence between the two modes, the target brightness of the fill light in the second mode is determined, thereby controlling the fill light to work at the target brightness and quickly stabilizing the image brightness.
It achieves rapid and stable image brightness during mode switching, improves brightness stability during mode switching, and ensures image quality.
Smart Images

Figure CN116546317B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of camera shooting, in particular to a camera shooting device control method, a computer device and a storage medium. BACKGROUND
[0002] With the development of the times, camera shooting devices are increasingly used in various fields. In some application scenarios, multi-mode camera shooting devices can be used for shooting.
[0003] For example, in the field of monitoring, in the visible light mode, the picture details of the shot image are clearer. In the infrared mode, the problem of low night illumination and unclear monitoring picture can be solved, but the picture details of the shot image are difficult to distinguish.
[0004] In some cases, it may be necessary to switch the mode of the camera shooting device. For example, when using a camera shooting device in infrared mode at night, if an abnormal situation is detected in the monitoring picture, it is necessary to switch to visible light mode to shoot the abnormal situation more clearly. Because the mode switching cannot be coordinated quickly, the brightness of the shot picture after switching is unstable, resulting in poor image quality. SUMMARY
[0005] The technical problem solved by the present application is to provide a camera shooting device control method, a computer device and a storage medium, which can improve the stability of picture brightness during mode switching.
[0006] To solve the above problems, the first aspect of the present application provides a camera shooting device control method, which comprises: acquiring a trigger image collected by a camera shooting device; in response to the trigger image meeting a mode change condition, switching a first mode of the camera shooting device to a second mode, and determining a target brightness of a second light compensation lamp in the second mode based on the brightness of a first light compensation lamp in the first mode and the brightness correspondence relationship between the light compensation lamps in the two modes; controlling the second light compensation lamp to work at the target brightness; wherein one of the first mode and the second mode is infrared mode, and the other is visible light mode, the light compensation lamp in the infrared mode is an infrared light compensation lamp, and the light compensation lamp in the visible light mode is a visible light light compensation lamp.
[0007] To solve the above problems, the second aspect of the present application provides a computer device, which comprises a memory and a processor coupled to each other. The memory stores program data, and the processor is configured to execute the program data to implement any step of the above-mentioned camera shooting device control method.
[0008] To solve the above problems, the third aspect of the present application provides a computer readable storage medium, which stores program data capable of being executed by a processor, and the program data is used to implement any step of the above-mentioned camera shooting device control method.
[0009] The above scheme, by acquiring the trigger image collected by the camera equipment, in response to the trigger image meeting the mode changing condition, switching the first mode of the camera equipment to the second mode, and determining the target brightness of the second light compensation lamp in the second mode based on the brightness of the first light compensation lamp in the first mode and the brightness corresponding relationship between the light compensation lamps in the two modes, the target brightness of the other light compensation lamp after mode changing can be quickly determined through the conversion relationship, so that the second light compensation lamp works at the target brightness, and the second light compensation lamp can immediately make up the brightness difference caused by the switching of the first light compensation lamp, so that the brightness is stable in a short time of mode switching, and the stability of the picture brightness during mode switching is improved. BRIEF DESCRIPTION OF DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor. Among them:
[0011] Figure 1 is a flowchart of the first embodiment of the control method of the camera equipment of the present application;
[0012] Figure 2 is a flowchart of the second embodiment of the control method of the camera equipment of the present application;
[0013] Figure 3 is a flowchart of the third embodiment of the control method of the camera equipment of the present application;
[0014] Figure 4 is a flowchart of the fourth embodiment of the control method of the camera equipment of the present application;
[0015] Figure 5 is a flowchart of the fifth embodiment of the control method of the camera equipment of the present application;
[0016] Figure 6 is a flowchart of the sixth embodiment of the control method of the camera equipment of the present application;
[0017] Figure 7 is a flowchart of the seventh embodiment of the control method of the camera equipment of the present application;
[0018] Figure 8 is a flowchart of the eighth embodiment of the control method of the camera equipment of the present application;
[0019] Figure 9 is a structural schematic diagram of an embodiment of the control device of the camera equipment of the present application;
[0020] Figure 10 is a structural schematic diagram of an embodiment of a computer device of the present application.
[0021] Figure 11 is a structural schematic diagram of an embodiment of a computer readable storage medium of the present application. DETAILED DESCRIPTION
[0022] The technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.
[0023] The terms "first", "second" in the present application are only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include at least one of the features. In the description of the present application, the meaning of "multiple" is at least two, for example, two, three, etc., unless otherwise specifically limited. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but can optionally include steps or units not listed, or can optionally include other steps or units inherent to the process, method, product or device.
[0024] In the present application, referring to "embodiments" means that the specific features, structures or properties described in conjunction with the embodiments can be included in at least one embodiment of the present application. The phrase appears at various places in the specification does not necessarily refer to the same embodiment, nor is it mutually exclusive or alternative to other embodiments. Those skilled in the art explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.
[0025] The term "and / or" herein is only a description of the association relationship between the associated objects, which means that there can be three relationships, for example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. In addition, the character " / " in this paper generally represents that the front and rear associated objects are a "or" relationship. In addition, "multiple" in this paper means two or more than two. In addition, the term "at least one" in this paper means any one of the multiple or any combination of at least two of the multiple, for example, including at least one of A, B and C can mean including any one or more elements selected from the set consisting of A, B and C.
[0026] The present application provides the following embodiments, which are specifically described below.
[0027] Please refer to Figure 1 , Figure 1 is a flowchart of a first embodiment of a control method of the camera device. The method can include the following steps:
[0028] S11: Obtain a trigger image collected by the camera device.
[0029] The trigger image is obtained by photographing a target area using the camera device.
[0030] Optionally, the trigger image can be an image of a target video, wherein the target video can be obtained by photographing the target area using the camera device. The specific content of the target area is not limited, and a person skilled in the art can set it according to actual needs. For example, the target area can be, but is not limited to, any one or more of a shopping mall, a store, an entrance / exit of a certain area, a street place, a road, a hospital, a station, a waiting room, an airport, etc.; the target video can include one or more images.
[0031] Optionally, the camera device can include multiple modes, such as an infrared mode and a visible light mode. The fill light in the infrared mode is an infrared fill light, a black and white filter is used in the infrared mode, and the image captured is in black and white. The mode can be used at night. The fill light in the visible light mode is a visible light fill light, a color filter is used in the visible light mode, and the image captured is in color. The mode can be used during the day. The present application does not limit the mode of the camera device.
[0032] The image collected by the camera device is analyzed to determine whether an abnormal situation occurs in the target area, so as to determine whether the image meets the mode change condition. The mode change condition can include an abnormal situation occurring in the target area. The abnormal situation can be the appearance of a moving target or an abnormal target in the target area, etc. The target can be a person, a vehicle, an animal, an article, etc. The target can be a target of interest in an application scenario. In actual application, the specific target object can be determined according to actual needs, and the present application does not limit it.
[0033] The abnormal situation can be a target intrusion image, a trigger alert, etc. It can also include other abnormal situations, which can be understood as abnormal situations that require mode switching. The present application does not limit the abnormal situation.
[0034] In the above manner, it can be determined whether the trigger image meets the mode change condition. When it is determined that the image meets the mode change condition, the mode of the camera device is changed in response to the trigger image meeting the mode change condition.
[0035] S12: in response to the trigger image meeting the mode change condition, switching the first mode of the camera device to the second mode, and determining the target brightness of the second fill light in the second mode based on the brightness of the first fill light in the first mode and the brightness correspondence relationship between the fill lights in the two modes.
[0036] Optionally, the current mode of the camera device is the first mode, the first mode is an infrared mode or a visible light mode, and the mode changes to the second mode.
[0037] In response to the trigger image meeting the mode change condition, the first mode of the camera device is switched to the second mode, wherein one of the first mode and the second mode is an infrared mode, and the other is a visible light mode.
[0038] Optionally, the mode change can include an abnormal trigger change and / or an abnormal end change. The abnormal trigger change is a change in mode after the camera device detects an abnormality in the image it captures, i.e., a change from a normal situation to an abnormal situation, which can be understood as a mode change when an abnormality is triggered. The abnormal end change is a change in mode after the camera device detects the end of an abnormal situation, i.e., a change from an abnormal situation to a normal situation, which can be understood as a mode change when the abnormality ends.
[0039] The present application takes a human as an example for illustration, the abnormal trigger change is like using an infrared mode at night, when no abnormal situation or target intrusion is detected, the camera device works in the infrared mode, when a target intrusion is detected, it works in the visible light mode for a short time, which can alert the intruder, and at the same time can more accurately identify the characteristics of the intruder. The abnormal end change is like detecting the termination or end of an abnormal situation, the intruder has left the target area or the monitoring image screen, the mode can be changed again to change the visible light mode to the infrared mode to continue monitoring in the night situation.
[0040] After switching the first mode of the camera device to the second mode, the target brightness of the second fill light in the second mode is determined based on the brightness of the first fill light in the first mode and the brightness correspondence relationship between the fill lights in the two modes.
[0041] The brightness correspondence relationship between the fill lights in the two modes includes a conversion relationship between the duty cycles of the two fill lights, which can be represented by a conversion correspondence table of the duty cycles of the two fill lights.
[0042] Specifically, the duty cycle of the first fill light when the first reference image is collected can be obtained, wherein the duty cycle can represent the brightness of the fill light, and the first reference image is the trigger image or the next frame image of the trigger image. When the mode change is an abnormal trigger change, the first reference image is the trigger image; when the mode change is an abnormal end change, the first reference image is the previous frame image of the trigger image.
[0043] The target brightness of the second light filling lamp is determined based on the duty cycle of the first light filling lamp and the conversion relationship. In the case that the first light filling lamp is an infrared light filling lamp and the second light filling lamp is a visible light filling lamp, the duty cycle of the first light filling lamp and the conversion relationship can be expressed by the following formula:
[0044] LEDPWM = IRPWM * ChangeLedRation[IRPWM] (1)
[0045] In the above formula (1), LEDPWM represents the duty cycle of the visible light filling lamp, IRPWM represents the duty cycle of the infrared light filling lamp, and ChangeLedRation[IRPWM] is the conversion relationship of the duty cycles of the infrared light filling lamp and the visible light filling lamp. The conversion relationship can be expressed by a conversion relationship correspondence table, in which the corresponding coefficients are related to IRPWM.
[0046] In the case that the first light filling lamp is a visible light filling lamp and the second light filling lamp is an infrared light filling lamp, the duty cycle of the first light filling lamp and the conversion relationship can be expressed by the following formula:
[0047] IRPWM = LEDPWM * ChangeIrRation[LEDPWM] (2)
[0048] In the above formula (2), IRPWM represents the duty cycle of the infrared light filling lamp, LEDPWM represents the duty cycle of the visible light filling lamp, and ChangeIrRation[LEDPWM] is the conversion relationship of the duty cycles of the visible light filling lamp and the infrared light filling lamp. The conversion relationship can be expressed by a conversion relationship correspondence table, in which the corresponding coefficients are related to LEDPWM.
[0049] Through the conversion relationship between the first light filling lamp and the second light filling lamp, the target brightness of the second light filling lamp, i.e., the duty cycle of the second light filling lamp, can be determined.
[0050] In some cases, when the duty cycle of the second light filling lamp is 0 or lower than the duty cycle threshold of the second light filling lamp at the starting brightness, the target brightness of the second light filling lamp can be determined to be off. In addition, the target brightness of the second light filling lamp can also be determined to be on.
[0051] S13: controlling the second light filling lamp to work at the target brightness.
[0052] Thus, the camera device controls the second light filling lamp to work at the target brightness.
[0053] Optionally, the first fill light can be turned off, the filter can be switched, the second fill light can be turned on, and the second fill light can be controlled to work at the target brightness.
[0054] In this embodiment, by acquiring the trigger image collected by the camera device, the first mode of the camera device is switched to the second mode in response to the trigger image meeting the mode changing condition, and the target brightness of the second fill light in the second mode is determined based on the brightness of the first fill light in the first mode and the brightness correspondence relationship between the fill lights in the two modes. The target brightness of the other fill light after the mode change can be quickly determined through the conversion relationship, so that the second fill light can immediately make up for the brightness difference caused by the switching of the first fill light, the brightness is stable in a short time of mode switching, and the stability of the picture brightness during mode switching is improved.
[0055] Please refer to Figure 2 , Figure 2 is a flowchart of a second embodiment of a control method of the camera device. The method can include the following steps:
[0056] S21: in response to the duty cycle of the first fill light being greater than the first threshold, the step of determining the target brightness of the second fill light based on the duty cycle of the first fill light and the conversion relationship is performed.
[0057] In some embodiments, the steps of this embodiment can be steps before the above-mentioned step S13 or step S12.
[0058] After acquiring the duty cycle of the first fill light when collecting the first reference image, it is judged whether the duty cycle of the first fill light is greater than the first threshold. The first reference image is the trigger image or the next frame image of the trigger image.
[0059] When it is judged that the duty cycle of the first fill light is greater than the first threshold, in response to the duty cycle of the first fill light being greater than the first threshold, the step S12 is performed, that is, the step of determining the target brightness of the second fill light based on the duty cycle of the first fill light and the conversion relationship is performed.
[0060] Optionally, the first threshold can be 0, or other constant values, which are not limited by the present application.
[0061] S22: in response to the duty cycle of the first fill light being equal to or less than the first threshold, the current relevant exposure factor corresponding to the current image is acquired, and the target brightness of the second fill light is determined.
[0062] When it is judged that the duty cycle of the first fill light is equal to or less than the first threshold, in response to the duty cycle of the first fill light being equal to or less than the first threshold, the current relevant exposure factor corresponding to the current image is acquired, and the target brightness of the second fill light is determined.
[0063] The relevant exposure factors include at least one of a gain value, a shutter value, and ambient brightness.
[0064] Optionally, the target brightness of the second light supplement lamp can be represented as being turned on or turned off.
[0065] For the steps S21-S22 described above in the embodiment, the following two examples are used as an example, and the first threshold is 0.
[0066] The first case: the mode change is an abnormal trigger change, and the first light supplement lamp is an infrared light supplement lamp, and the second light supplement lamp is a visible light supplement lamp. The duty cycle (IRPWM) of the infrared light supplement lamp of the first reference image is obtained, wherein the first reference image is the trigger image.
[0067] (1) When the duty cycle (IRPWM) of the infrared light supplement lamp is equal to 0, it can be expressed that the scene picture monitored by the camera device is relatively bright at this time, and the infrared light supplement lamp of the camera device has not been turned on. At this time, the trigger is abnormal, and the current relevant exposure factor corresponding to the current image is obtained to determine the target brightness of the second light supplement lamp, that is, the visible light supplement lamp can be automatically run. During the abnormal period (such as the warning period), it is determined whether the visible light supplement lamp needs to be turned on according to the running result of the visible light supplement lamp algorithm, such as sudden light-off and the like.
[0068] (2) When the duty cycle (IRPWM) of the infrared light supplement lamp is greater than 0, it can be expressed that the scene picture monitored by the camera device is relatively dark at this time, and the infrared light supplement lamp of the camera device has been turned on for light supplement. If the mode is switched at this time due to the trigger of the abnormality, the target brightness of the second light supplement lamp is determined based on the duty cycle of the first light supplement lamp and the conversion relationship. That is, the infrared light supplement lamp can be turned off, and the filter is switched to a color filter to make the image color. The target brightness of the second light supplement lamp to be turned on is determined based on the duty cycle of the first light supplement lamp and the conversion relationship, so that the visible light supplement lamp can immediately make up for the brightness difference caused by the turning off of the infrared light supplement lamp.
[0069] The second case: the mode change is an abnormal end change, and the first light supplement lamp is a visible light supplement lamp, and the second light supplement lamp is an infrared light supplement lamp. The duty cycle (LEDPWM) of the visible light supplement lamp of the first reference image is obtained, wherein the first reference image is the image of the previous frame of the trigger image, which can be expressed as the image at the time before the abnormal end.
[0070] (1) When the duty cycle of the visible light fill light (LEDPWM) is equal to 0, it indicates that the ambient brightness is relatively high at this time, and the visible light fill light does not need to be turned on, so the image is not immediately turned black and white and the infrared fill light is not turned on when the abnormality ends. Only the current relevant exposure factor corresponding to the current image needs to be obtained to determine the target brightness of the second fill light. For example, the infrared fill light algorithm is run, and if it is judged that the ambient brightness gradually becomes dark and meets the infrared fill light opening condition, the filter is switched and the infrared fill light is turned on. Otherwise, the color filter state is maintained.
[0071] (2) When the duty cycle of the visible light fill light (LEDPWM) is greater than 0, it indicates that the ambient brightness monitored by the camera device at the previous moment before the abnormality ends is relatively low, and the visible light fill light has been turned on for light compensation. Therefore, when the camera device ends the abnormality, the target brightness of the second fill light is determined based on the duty cycle of the first fill light and the conversion relationship. That is, the filter is switched to a black and white filter to make the image black and white, the visible light fill light is turned off, and the duty cycle IRPWM (i.e. target brightness) required for the infrared fill light to be turned on is obtained and the infrared fill light is turned on.
[0072] In this embodiment, the target brightness of the second fill light after mode switching can be determined through various situations of the duty cycle of the first fill light, which can reduce the impact of the brightness difference after mode switching and adapt to mode switching in various scenes, thereby improving the stability of the picture brightness before and after mode switching.
[0073] In some embodiments, in the step of obtaining the current relevant exposure factor corresponding to the current image and determining the target brightness of the second fill light, the steps of the third or fourth embodiments described below can be performed based on the first reference image.
[0074] In some embodiments, the mode change is an abnormality trigger change, and after the first mode is switched to the second mode, the steps of the third embodiment described below can be performed based on the images collected during the abnormality period.
[0075] In some embodiments, the mode change is an abnormality end change, and after the abnormality ends, the steps of the fourth embodiment described below can be performed based on the collected images.
[0076] Please refer to Figure 3 , Figure 3 is a flowchart of a third embodiment of a control method of the camera device. The method can include the following steps:
[0077] S31: Obtain a relevant exposure factor when the second reference image is collected; wherein the second reference image is an image collected after the first reference image; and the relevant exposure factor includes at least one of a gain value, a shutter value, and an ambient brightness.
[0078] In the embodiment, the first light supplement lamp is an infrared light supplement lamp, and the second light supplement lamp is a visible light supplement lamp.
[0079] The second reference image is an image acquired after the first reference image, and the first reference image is a trigger image or a next frame image of the trigger image. That is, the second reference image can represent an image acquired during an anomaly, and the embodiment is described by taking the first reference image as the trigger image as an example.
[0080] Optionally, the related exposure factors when the second reference image is acquired can be acquired, and the related exposure factors include at least one of a gain value, a shutter value, and an ambient brightness, and in addition, other related exposure factors such as an aperture can also be included.
[0081] Therefore, whether the related exposure factors of the second reference image meet the first opening condition or the first closing condition can be used to determine the target brightness of the second light supplement lamp, and in the embodiment, the target brightness can represent an opening, an opening target brightness, or a closing.
[0082] In some embodiments, when the related exposure factors of the second reference image meet the first opening condition, the following step S32 is performed.
[0083] In some embodiments, when the related exposure factors of the second reference image meet the first closing condition, the following step S33 is performed.
[0084] S32: In response to the related exposure factors of the second reference image meeting the first opening condition, the target brightness of the second light supplement lamp is determined as the first brightness, wherein the first opening condition includes that a first preset ratio relationship between the gain value and the ambient brightness is greater than a first opening threshold.
[0085] The first preset ratio relationship can be a ratio relationship between the gain value and a preset proportionality coefficient multiplied by the product of the ambient brightness. The first opening threshold can be a ratio of the visible light supplement lamp opening threshold to the target brightness.
[0086] In some embodiments, the first opening condition can be represented as:
[0087] Gain_cru* Gain_rationA / Ev_cru>LED_OpenThr / Ev_target (3)
[0088] In the formula (3), Gain_cru represents a gain value, Ev_cru represents an ambient brightness, Gain_rationA can represent a preset ratio coefficient, which can be a ratio coefficient related to the gain, and LED_OpenThr / Ev_target represents a first opening threshold, in which LED_OpenThr is a visible light light supplement opening threshold, and Ev_target is a target brightness.
[0089] When the related exposure factors of the second reference image satisfy the first opening condition, the target brightness of the second light supplement lamp can be determined as the first brightness in response to the related exposure factors of the second reference image satisfying the first opening condition, in which the first brightness is the target brightness of turning on the second light supplement lamp or turning on the second light supplement lamp.
[0090] S33: In response to the related exposure factors of the second reference image satisfying the first closing condition, the target brightness of the second light supplement lamp is determined as the second brightness, in which the first closing condition includes that a second preset ratio relationship of the gain value, the shutter value, and the ambient brightness is less than a first closing threshold.
[0091] The second preset ratio relationship can be a ratio relationship of a product of the gain value, the shutter value, and a preset constant to the ambient brightness.
[0092] In some embodiments, the first closing condition can be represented as:
[0093] Gain_cru * Shut_cru *A / Ev_cru < LED_OffThr (4)
[0094] In the formula (4), Gain_cru represents a gain value, Shut_cru represents a shutter value, Ev_cru represents an ambient brightness, and LED_OffThr represents a first closing threshold.
[0095] When the related exposure factors of the second reference image satisfy the first closing condition, the target brightness of the second light supplement lamp can be determined as the second brightness in response to the related exposure factors of the second reference image satisfying the first closing condition, in which the second brightness can be a brightness of 0 or the second light supplement lamp is turned off.
[0096] In some embodiments, since the ambient brightness monitored by the camera device is variable, the above-mentioned visible light light supplement automatic operation algorithm (steps S31 to S33) can be run during an abnormal period. If the current environment becomes brighter, the visible light light supplement lamp can be turned off, and if the current environment is maintained in a darker or darker state, the visible light light supplement lamp can be turned on for light supplement.
[0097] In this embodiment, the visible light fill light is turned on to fill light when the first opening condition of the visible light fill light is met, and the visible light fill light is turned off to fill light when the first closing condition of the visible light fill light is met. Until the next abnormal state changes or the trigger mode changes, the brightness of the second fill light can be changed to adapt to changes in environmental brightness, and the brightness stability of the picture of the camera equipment can be improved.
[0098] Please refer to Figure 4 , Figure 4 is a flowchart of a fourth embodiment of a control method of the camera equipment. The method can include the following steps:
[0099] S41: acquiring related exposure factors when the second reference image is collected; wherein the second reference image is an image collected after the first reference image; the related exposure factors include at least one of a gain value, a shutter value, and an environmental brightness.
[0100] In this embodiment, the first fill light is a visible light fill light, and the second fill light is an infrared fill light.
[0101] The second reference image is an image collected after the first reference image, and the first reference image is the trigger image or the last frame image of the trigger image. In this embodiment, the first reference image is taken as an example to illustrate.
[0102] The related exposure factors when the second reference image is collected can be acquired, and the related exposure factors include at least one of a gain value, a shutter value, and an environmental brightness. In addition, other related exposure factors such as aperture can also be included.
[0103] In some embodiments, it is determined whether the related exposure factors of the second reference image meet the second opening condition. If the second opening condition is met, the frame number of the second reference image that meets the second opening condition is counted. The frame number of the second reference image that meets the second opening condition can be the frame number of the second reference image in a period of time, or the frame number of the continuous second reference image.
[0104] The second opening condition includes at least one of a gain value greater than a gain threshold, a shutter value greater than a shutter threshold, and an environmental brightness value less than an environmental brightness threshold. The second opening condition can be expressed as:
[0105]
[0106] In the above formula (5), Gain_cru represents the gain value, Gain_c2bThr represents the gain threshold; Shut_cru represents the shutter value, Shut_c2bThr represents the shutter threshold; Ev_cru represents the environmental brightness value, and Ev_c2bThr represents the environmental brightness threshold.
[0107] If the relevant exposure factors of the second reference image satisfy the second opening condition and reach a first preset frame number, step S42 is performed.
[0108] In some embodiments, it is determined whether the relevant exposure factors of the second reference image satisfy a second closing condition, and if the second closing condition is satisfied, the frame number of the second reference image satisfying the second closing condition is counted. The frame number of the second reference image satisfying the second closing condition can be the frame number of the second reference image in a period of time, or can be the frame number of the continuous second reference image.
[0109] The second closing condition includes at least one of a third preset ratio relationship between the gain value and the shutter value being less than a second closing threshold value, and the ambient brightness value being greater than or equal to an ambient brightness threshold value.
[0110] The third preset ratio relationship can be a product relationship between the gain value and the shutter value and a preset numerical value, and the second closing condition can be expressed as:
[0111] Gain_cru*Shut_cru*B / C < IR_OffThr
[0112] Ev_cru > Ev_c2bThr (6)
[0113] In the above formula (6), Gain_cru represents the gain value, Shut_cru represents the shutter value, Ev_cru represents the ambient brightness value, Ev_c2bThr represents the ambient brightness threshold value, and B / C represents the preset numerical value. The preset numerical value can be represented by a numerical value or a numerical relationship of multiple numerical values, which is not limited in the present application.
[0114] If the relevant exposure factors of the second reference image satisfy the second closing condition and reach a second preset frame number, step S43 is performed.
[0115] In some embodiments, the first preset frame number can be the same as the second preset frame number, or the first preset frame number can be different from the second preset frame number, which is not limited in the present application.
[0116] S42: In response to the relevant exposure factors of the second reference image satisfying the second opening condition and reaching the first preset frame number, the target brightness of the second light compensation lamp is determined as the third brightness.
[0117] The second opening condition includes at least one of the gain value being greater than a gain threshold value, the shutter value being greater than a shutter threshold value, and the ambient brightness value being less than an ambient brightness threshold value.
[0118] If the related exposure factor of the second reference image meets the second opening condition and reaches the first preset frame number, the target brightness of the second fill light can be determined as a third brightness in response to the related exposure factor of the second reference image meeting the second opening condition and reaching the first preset frame number. The third brightness can be represented as opening the second fill light or opening the second fill light at the target brightness.
[0119] In some embodiments, after determining the target brightness of the second fill light as the third brightness, the second fill light can be controlled to work at the third brightness. This process can be represented as switching the filter, converting the color filter to the black-and-white filter, and opening the second fill light to work at the third brightness.
[0120] S43: In response to the related exposure factor of the second reference image meeting the second closing condition and reaching the second preset frame number, the target brightness of the second fill light is determined as a fourth brightness.
[0121] The second closing condition includes at least one of a third preset ratio relationship between the gain value and the shutter value being less than a second closing threshold value and the ambient brightness value being greater than or equal to an ambient brightness threshold value.
[0122] If the related exposure factor of the second reference image meets the second closing condition and reaches the second preset frame number, the target brightness of the second fill light can be determined as a fourth brightness in response to the related exposure factor of the second reference image meeting the second closing condition and reaching the second preset frame number. The fourth brightness can be represented as the target brightness being 0 or the second fill light being closed.
[0123] In some embodiments, after determining the target brightness of the second fill light as the fourth brightness, the second fill light can be controlled to work at the fourth brightness. This process can be represented as switching the filter, converting the black-and-white filter to the color filter, and closing the second fill light.
[0124] In the above manner, if the camera device does not trigger the exception again, the above steps S41 to S43 can be run all the time. The steps S41 to S43 can also be an ICR switching algorithm (double filter switcher) to determine whether the camera device needs to convert the black-and-white filter or the color filter until the above exception triggering change is triggered again. The camera device becomes the visible light mode again, and the exception ends after the change. The camera device becomes the infrared mode again, and the above process is executed again.
[0125] The above scheme can adapt to changes in the ambient brightness and other conditions to change the target brightness of the second fill light, and can improve the brightness stability of the picture of the camera device.
[0126] In some embodiments, the brightness of the camera device can also be adjusted. The process can refer to the following embodiments.
[0127] Please refer to Figure 5 , Figure 5 is a flowchart of a fifth embodiment of the control method of the image pickup device. The method can include the following steps:
[0128] S51: Determine whether the ambient brightness corresponding to the current image meets the exposure adjustment condition.
[0129] The exposure adjustment condition includes whether the brightness difference between the ambient brightness and the preset brightness value is less than a first preset difference, and whether a third preset frame number is reached.
[0130] In some embodiments, the steps S51 to S53 of this embodiment can be performed after the first mode of the image pickup device is switched to the second mode in the above step S12.
[0131] In response to not meeting the exposure adjustment condition, the following step S52 is performed.
[0132] In response to meeting the exposure adjustment condition, the following step S53 is performed.
[0133] S52: Determine the target exposure parameter of the second fill light corresponding to the current image using the brightness difference between the ambient brightness corresponding to the current image and the preset brightness value, the target exposure parameter including at least one of a target gain value, a target shutter value, and a duty cycle of the second fill light.
[0134] After each frame of image is captured, the ambient brightness corresponding to each frame of image can be obtained, i.e., the ambient brightness when each frame of image is captured, so as to calculate the brightness difference between the ambient brightness corresponding to each frame of image and the preset brightness value, and to determine the target exposure parameter of the second fill light corresponding to each frame of image using the brightness difference. Taking the current image as an example, the target exposure parameter of the second fill light corresponding to the current image is determined using the brightness difference between the ambient brightness corresponding to the current image and the preset brightness value, so as to work with the target exposure parameter.
[0135] S53: Record or update the target exposure parameter of the current second fill light, the target exposure parameter including at least one of a target gain value, a target shutter value, and a duty cycle of the second fill light.
[0136] After the above steps, the target exposure parameter can also be used as the reference exposure parameter of the second fill light corresponding to the current image. The target exposure parameter of the above second fill light can be used as the reference exposure parameter, and the reference exposure parameter of the second fill light is recorded and updated as the target exposure parameter.
[0137] In the above manner, the ambient brightness can be adjusted to adapt to the brightness of the image pickup device.
[0138] In addition, in the above manner, the reference exposure parameter of the current trigger mode change can be obtained, so that when the next trigger mode change is performed, the exposure parameter can be determined based on the reference exposure parameter of the current trigger mode change.
[0139] Please refer to Figure 6 , Figure 6 is a flowchart of a sixth embodiment of a control method of the image pickup device. The method can include the following steps:
[0140] S61: In response to the captured image meeting the mode change condition, the first mode of the image pickup device is switched to the second mode again, and the captured image is an image captured after the trigger image.
[0141] After the mode change is the abnormal end change, the image after the trigger image of the trigger abnormal end change is captured, that is, the captured image is obtained.
[0142] The captured image can be analyzed to determine whether the captured image meets the mode change request. The mode change request can be an abnormal trigger change, and then can be an abnormal end change. The process can refer to the specific embodiments of the above embodiments, and the present application does not limit this.
[0143] When the captured image meets the mode change condition, the mode change is triggered again, and then the first mode of the image pickup device is switched to the second mode again and the subsequent steps.
[0144] S62: Obtain the reference exposure parameter of the second light supplement lamp corresponding to the captured image.
[0145] The reference exposure parameter of the second light supplement lamp corresponding to the captured image can be the target exposure parameter recorded when the mode is switched last time when the mode change condition is met, such as the target exposure parameter when the abnormal trigger change is performed, or the target exposure parameter when the abnormal end change is performed.
[0146] The reference exposure parameter of the second light supplement lamp corresponding to the captured image is obtained. When the second light supplement lamp is a visible light supplement lamp, the gain value and shutter value of the reference exposure parameter can be recorded as LED_gain and LED_shut respectively. When the second light supplement lamp is an infrared light supplement lamp, the gain value and shutter value of the reference exposure parameter can be recorded as IR_gain and IR_shut respectively. The following is described by taking the second light supplement lamp as a visible light supplement lamp as an example.
[0147] S63: Determine whether the difference between the reference exposure parameter of the second light supplement lamp and the preset exposure threshold is less than the preset difference value.
[0148] The reference exposure parameter can be at least one of a reference gain value and a reference shutter value, and the preset exposure threshold can include at least one of a preset gain value and a preset shutter value.
[0149] It can be determined whether a first difference between the reference gain value and the preset gain value is less than a preset difference value, and / or whether a second difference between the reference shutter value and the preset shutter value is less than the preset difference value.
[0150] If the first difference is less than the preset difference value and / or the second difference is less than the preset difference value, step S64 is performed. Otherwise, step S65 is performed.
[0151] S64: The reference exposure parameter is used as a target exposure parameter of the second light for the next frame of the image.
[0152] In response to the difference being less than the preset difference value, the reference gain value and the reference shutter value are used as the target exposure parameter of the second light for the image, or as the target exposure parameter of the second light for the next frame of the image.
[0153] The next frame of the image is the first frame of the image after the mode change, so that the gain value and the shutter value of the first frame of the image when the mode is changed again can be used as the gain value and the shutter value of the last frame or the last mode change.
[0154] S65: The preset proportion of the reference exposure parameter and the preset exposure threshold is used as the target exposure parameter of the second light for the next frame of the image.
[0155] In response to the difference being not less than the preset difference value, the preset proportion of the reference gain value and the preset gain value, and the preset proportion of the reference shutter value and the preset shutter value are used as the target exposure parameter of the second light for the image, or as the target exposure parameter of the second light for the next frame of the image.
[0156] The preset proportion can be 1 / 2, so that the difference between the first frame of the image when the mode is changed again and the gain value and the shutter value of the last mode change is not too large, that is, the difference between the environment brightness and the preset brightness value is not too large.
[0157] In some embodiments, for the subsequent frames of the image, the exposure parameter of the second light corresponding to each frame of the image is adjusted according to the brightness difference between the environment brightness Ev_cru and the preset brightness value Ev_tar, until the brightness difference is less than a preset brightness difference value Ev_Thr, and the exposure parameter of the second light is updated.
[0158] In this embodiment, the shutter value and gain value under the stable brightness before the anomaly are recorded and used as the initial exposure parameters when the anomaly ends next time; the shutter value and gain value under the stable brightness during the anomaly triggering are recorded and used as the initial exposure parameters when the anomaly triggers next time, which can improve the picture stability of mode switching.
[0159] For the above embodiments, the following is described in two embodiments.
[0160] Please refer to Figure 7 , Figure 7 is a flowchart of the seventh embodiment of the control method of the camera device.
[0161] After the camera is running, the state of object intrusion triggering anomaly and object leaving stopping anomaly in the image picture of the target area is monitored in real time. When no anomaly is triggered, the infrared mode is used, and when the anomaly is triggered, the visible light mode is switched.
[0162] If the anomaly is triggered in the visible light mode, it is calculated according to the visible light fill light running algorithm (see the third embodiment) whether the visible light fill light needs to be turned on in the current environment. If the anomaly is triggered in the infrared mode, the visible light fill light is immediately turned on, and the scheme of the above embodiments of the present application is executed, so that the picture can be quickly and smoothly switched.
[0163] When the anomaly ends, if the visible light fill light corresponding to the previous moment (or the previous image) when the anomaly ends is in the off state, the visible light mode, i.e., the color state, is maintained, and it is calculated according to the infrared fill light running algorithm (see the fourth embodiment) whether the infrared fill light needs to be turned on in the current environment. If the visible light fill light corresponding to the previous moment (or the previous image) when the anomaly ends is in the on state, the scheme of the above embodiments of the present application is executed, so that the picture can be quickly and smoothly switched.
[0164] This embodiment takes the currently used first mode as the infrared mode as an example, wherein the first fill light is the infrared fill light, and the second mode is the visible light fill light mode, and the second fill light is the visible light fill light.
[0165] First, after the camera device is running, the IR_gain, IR_shut of the infrared fill light, and the duty cycle IRPWM of the infrared fill light, i.e., the brightness, are recorded.
[0166] And according to the difference between the real-time environmental brightness value and the preset brightness value, the target LED_gain, LED_shut value of the visible light fill light or the target IR_gain, IR_shut value of the infrared fill light corresponding to each frame of image is calculated and recorded in real time, i.e., recorded as the reference exposure parameters.
[0167] An image currently captured by the camera is obtained, and it is determined whether the image currently captured satisfies a mode change condition, i.e., whether the image currently captured triggers an exception. The mode change includes an exception triggering change or an exception ending change.
[0168] When it is determined that the image currently captured triggers an exception, the exception triggering change is determined, and it is further determined whether the image currently captured is a first frame image after the exception triggering change. When the image currently captured is the first frame image, the infrared light compensation lamp is turned off, and the filter is switched to switch the black-and-white filter to the color filter, so that the image is converted to color. Then, the target brightness of the visible light compensation lamp, i.e., the duty cycle LEDPWM, is calculated based on the duty cycle IRPWM of the infrared light compensation lamp and the brightness corresponding relationship between the duty cycle IRPWM of the infrared light compensation lamp and the duty cycle LEDPWM of the visible light compensation lamp. The target brightness of the visible light compensation lamp or the target brightness of the visible light compensation lamp when the visible light compensation lamp is turned on can be determined according to the duty cycle LEDPWM of the visible light compensation lamp, so as to control the visible light compensation lamp to work at the target brightness. Then, the initial exposure parameters LED_gain and LED_shut can be set.
[0169] When the image currently captured is not the first frame image, it is determined whether the visible light compensation lamp is currently turned on. When the visible light compensation lamp is currently turned on, it is determined whether the current related exposure factors satisfy a first closing condition. When the current related exposure factors satisfy the first closing condition, the visible light compensation lamp is turned off. When the current related exposure factors do not satisfy the first closing condition, it is further determined whether the brightness difference between the current ambient brightness Y_cru and the preset brightness value Y_tag is less than a preset brightness difference Y_thr. The number of frames in which the brightness difference is less than the preset brightness difference Y_thr is counted. When the number of frames in which the brightness difference is less than the preset brightness difference Y_thr reaches N frames (N is an integer greater than 1), the exposure parameters corresponding to the current image, such as the current gain value, the current shutter value, and the duty cycle of the current visible light compensation lamp, are recorded, so that the above processing is continued based on the next frame image. When the brightness difference is not less than the preset brightness difference Y_thr or the number of frames does not reach N frames, the current gain value, the current shutter value, and the duty cycle of the current visible light compensation lamp can be adjusted according to the current ambient brightness, and the exposure parameters corresponding to the current image and the subsequent steps are recorded.
[0170] When the visible light compensation lamp is not currently turned on, it is determined whether the current related exposure factors satisfy a first opening condition. When the current related exposure factors satisfy the first opening condition, the visible light compensation lamp is turned on. Otherwise, the step of determining whether the brightness difference between the current ambient brightness Y_cru and the preset brightness value Y_tag is less than the preset brightness difference Y_thr and the subsequent steps are further performed.
[0171] If the current image does not satisfy the abnormal end condition, that is, the current image does not trigger an abnormality, the abnormal end change is performed in response to the abnormal end condition being satisfied. Then, it is determined whether the first frame image after the abnormal end change is determined. If the first frame image is determined, the filter is switched to switch the color filter to the black-and-white filter, so that the image is converted to black and white, the visible light fill light is turned off, and the target brightness (that is, the duty cycle IRPWM) of the infrared fill light is calculated according to the brightness corresponding relationship between the duty cycle IRPWM of the infrared fill light and the duty cycle LEDPWM of the visible light fill light. The duty cycle IRPWM of the infrared fill light can be determined according to the target brightness of the infrared fill light, and the target brightness of the infrared fill light is determined whether the infrared fill light needs to be turned on or turned on. The infrared fill light is controlled to work at the target brightness. Then, the initialization exposure parameters IR_gain and IR_shut can also be set.
[0172] If the first frame image is not determined, it is determined whether the current infrared fill light is turned on. In response to the current visible light fill light being turned on, it is determined whether the current relevant exposure factor satisfies the second closing condition. If the second closing condition is satisfied, the infrared fill light is turned off. Alternatively, in response to the current infrared fill light not being turned on, it is determined whether the current relevant exposure factor satisfies the second opening condition. If the second opening condition is satisfied, the current infrared fill light is turned on. In the case where the second opening condition or the second closing condition is not satisfied, it is further determined whether the brightness difference between the current ambient brightness Y_cru and the preset brightness value Y_tag is less than the preset brightness difference Y_thr, and the number of frames in which the brightness difference is less than the preset brightness difference Y_thr is counted. In response to the number of frames in which the brightness difference is less than the preset brightness difference Y_thr reaching N frames (N is an integer greater than 1), the exposure parameters corresponding to the current image are recorded, such as the current gain value, the current shutter value, and the duty cycle of the current visible light fill light, so that the above processing and subsequent steps are continued based on the next frame image.
[0173] The specific implementation of this embodiment can refer to the implementation process of the above-mentioned embodiments, which will not be described here.
[0174] Please refer to Figure 8 , Figure 8 is a flowchart of the eighth embodiment of the control method of the camera device.
[0175] First, the camera device is initialized after running LED_gain, LED_shut, and the target LED_gain and LED_shut values of the visible light fill light or the target IR_gain and IR_shut values of the infrared fill light corresponding to each frame image are calculated and recorded in real time according to the difference between the real-time ambient brightness value and the preset brightness value, that is, the reference exposure parameters.
[0176] The difference from the above embodiment is that if the current image is the first frame image of the abnormal trigger change or the first frame image of the abnormal end change, it is judged whether the first difference value between the reference gain value and the preset gain value is less than the preset difference value, and whether the second difference value between the reference shutter value and the preset shutter value is less than the preset difference value.
[0177] If both are less than the preset difference value, the target exposure parameter corresponding to the first frame image can continue to use the above-mentioned reference gain value and reference shutter value, otherwise use the values of (LED_gain+Gain_cru) / 2 and (LED_shut+Shut_cru) / 2, to avoid the difference between the environment brightness being too large due to the long interval between two trigger abnormalities,
[0178] Then, the difference (Ev_cru-Ev_tar) between the environment brightness and the preset brightness value can be calculated. When the difference is greater than the preset brightness difference Ev_Thr, it is considered that the current brightness has not been adjusted, and the shutter value and the gain value need to be continuously adjusted until the difference between the environment brightness and the preset brightness value is less than the preset brightness difference Ev_Thr (|Ev_cru-Ev_tar|<Ev_Thr).
[0179] Then, the values of LED_gain and LED_shut are updated. If the brightness changes again during the abnormality, the values of LED_gain and LED_shut are adjusted and recorded again, so that the gain value and the shutter value can always meet the current environment brightness. When the current abnormality ends and the abnormality is triggered again, the last recorded values of LED_gain and LED_shut are directly used, so that the environment brightness can be directly adjusted to the target value in one step when the abnormality is triggered, thereby improving the product performance.
[0180] Similarly, when the abnormality is not triggered or the abnormality ends, the IR_gain and IR_shut can also be recorded in real time, so that the next time the abnormality ends, the gain value IR_gain and the shutter value IR_shut are directly used to make the brightness of the camera device directly adjust to the target value in one step.
[0181] The specific implementation of this embodiment can refer to the implementation process of the above-mentioned embodiment, which will not be described here.
[0182] For the above-mentioned embodiment, the application also provides a control device of a camera device. Please refer to Figure 9 , Figure 9 is a structural schematic diagram of an embodiment of the control device of the camera device of the application.
[0183] The control device 70 of the camera device comprises an acquisition module 71, a switching module 72 and a control module 73, wherein the acquisition module 71, the switching module 72 and the control module 73 are connected with each other.
[0184] The acquisition module 71 is configured to acquire a trigger image collected by the camera device.
[0185] The switching module 72 is configured to, in response to the trigger image satisfying a mode changing condition, switch a first mode of the camera device to a second mode, and determine a target brightness of a second fill light in the second mode based on a brightness of the first fill light in the first mode and a brightness corresponding relationship between the fill lights in the two modes.
[0186] The first mode and the second mode are one of an infrared mode and a visible light mode, the fill light in the infrared mode is an infrared fill light, and the fill light in the visible light mode is a visible light fill light.
[0187] The control module 73 is configured to control the second fill light to work at the target brightness.
[0188] The specific implementation of the embodiment can refer to the implementation process of the above-mentioned embodiment, which will not be described here.
[0189] For the above-mentioned embodiment, the present application provides a computer device, please refer to Figure 10 , Figure 10 is a structural schematic diagram of an embodiment of the computer device of the present application. The computer device 80 includes a memory 81 and a processor 82, wherein the memory 81 and the processor 82 are coupled to each other, the memory 81 stores program data, and the processor 82 is configured to execute the program data to realize the steps of any embodiment of the control method of the camera device described above.
[0190] In the embodiment, the processor 82 can also be referred to as a CPU (Central Processing Unit, central processing unit). The processor 82 can be an integrated circuit chip with signal processing capability. The processor 82 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. The general-purpose processor can be a microprocessor or the processor 82 can also be any conventional processor.
[0191] For the method of the above-mentioned embodiment, it can be realized in the form of a computer program, so the present application provides a computer readable storage medium, please refer to Figure 11 , Figure 11 is a structural schematic diagram of an embodiment of the computer readable storage medium of the present application. The computer readable storage medium 90 stores program data 91 capable of being executed by the processor, and the program data 91 can be executed by the processor to realize the steps of any embodiment of the control method of the camera device described above.
[0192] The computer readable storage medium 90 of the embodiment can be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc., which can store program data 91, or can also be a server storing the program data 91, which can send the stored program data 91 to other devices for running, or can also run the stored program data 91.
[0193] In several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic, for example, the division of the modules or units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or components shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.
[0194] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, i.e., they can be located in one place or distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the present embodiment.
[0195] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0196] If the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium, which is a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part of the prior art that makes a contribution or the whole or part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes a plurality of instructions for making an electronic device (which can be a personal computer, a server or a network device, etc.) or a processor execute all or part of the steps of the method of each embodiment of the present application.
[0197] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be realized by general computing devices, which can be centralized on a single computing device or distributed on a network composed of multiple computing devices, and optionally, they can be realized by program codes executable by computing devices, so as to be stored in computer readable storage medium and executed by computing devices, or they can be respectively manufactured into individual integrated circuit modules, or multiple modules or steps among them can be manufactured into a single integrated circuit module to realize. Thus, the present application is not limited to any specific combination of hardware and software.
[0198] The above description is only an embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation using the content of the specification and drawings, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A control method of an image pickup apparatus, characterized by, The method comprises: acquiring a trigger image collected by a camera device; in response to the trigger image meeting a mode change condition, switching a first mode of the camera device to a second mode, and determining a target brightness of a second fill light in the second mode based on a brightness of a first fill light in the first mode and a brightness correspondence between fill lights in the two modes; controlling the second fill light to work at the target brightness; wherein one of the first mode and the second mode is an infrared mode, and the other is a visible light mode, the fill light in the infrared mode is an infrared fill light, and the fill light in the visible light mode is a visible light fill light. The brightness correspondence between the fill lights in the two modes includes a conversion relationship between the duty cycles of the two fill lights, and the determination of the target brightness of the second fill light in the second mode based on the brightness of the first fill light in the first mode and the brightness correspondence between the fill lights in the two modes comprises: acquiring the duty cycle of the first fill light when the first reference image is collected, wherein the first reference image is the trigger image or the last frame of the trigger image; in response to the duty cycle of the first fill light being greater than a first threshold value, indicating that the first fill light in the first mode is turned on, determining the target brightness of the second fill light based on the duty cycle of the first fill light and the conversion relationship; in response to the duty cycle of the first fill light being equal to or less than the first threshold value, indicating that the first fill light in the first mode is not turned on, then acquiring a current relevant exposure factor corresponding to a current image, and determining the target brightness of the second fill light; in response to the collected image meeting the mode change condition, switching the first mode of the camera device to the second mode again, the collected image being an image collected after the trigger image; acquiring a reference exposure parameter of the second fill light corresponding to the collected image; determining whether a difference between the reference exposure parameter of the second fill light and a preset exposure threshold value is less than a preset difference value; wherein the reference exposure parameter includes at least one of a reference gain value and a reference shutter value, and the preset exposure threshold value includes at least one of a preset gain value and a preset shutter value; in response to the difference being less than the preset difference value, taking the reference exposure parameter as a target exposure parameter of the second fill light corresponding to a next frame of image of the collected image; or in response to the difference being not less than the preset difference value, taking a preset proportion of the reference exposure parameter and the preset exposure threshold value as the target exposure parameter of the second fill light corresponding to the next frame of image of the collected image.
2. The method of claim 1, wherein the relevant exposure factor includes at least one of a gain value, a shutter value, and an ambient brightness.
3. The method of claim 1, wherein, The second fill light is a visible light fill light; the method further comprises: acquiring a relevant exposure factor when a second reference image is collected; wherein the second reference image is an image collected after the first reference image, and the first reference image is the trigger image; and the relevant exposure factor includes at least one of a gain value, a shutter value, and an ambient brightness. In response to the second reference image satisfying a first opening condition, the target brightness of the second fill light is determined as a first brightness, wherein the first opening condition comprises that a first preset ratio relationship between the gain value and the ambient brightness is greater than a first opening threshold; or, In response to the second reference image satisfying a first closing condition, the target brightness of the second fill light is determined as a second brightness, wherein the first closing condition comprises that a second preset ratio relationship among the gain value, the shutter value and the ambient brightness is less than a first closing threshold.
4. The method of claim 1, wherein, The second fill light is an infrared fill light; the method further comprises: obtaining related exposure factors when the second reference image is collected; wherein the second reference image is an image collected after the first reference image, and the first reference image is a previous frame of the trigger image; the related exposure factors comprise at least one of the gain value, the shutter value and the ambient brightness; In response to the second reference image satisfying a second opening condition and reaching a first preset frame number, the target brightness of the second fill light is determined as a third brightness, wherein the second opening condition comprises at least one of the gain value being greater than a gain threshold, the shutter value being greater than a shutter threshold, and the ambient brightness value being less than an ambient brightness threshold; or, In response to the second reference image satisfying a second closing condition and reaching a second preset frame number, the target brightness of the second fill light is determined as a fourth brightness, wherein the second closing condition comprises at least one of a third preset ratio relationship between the gain value and the shutter value being less than a second closing threshold, and the ambient brightness value being greater than or equal to the ambient brightness threshold.
5. The method of claim 1, wherein, After the first mode of the camera device is switched to the second mode, the method further comprises: determining whether the ambient brightness corresponding to the current image satisfies an exposure adjustment condition, wherein the exposure adjustment condition comprises whether a brightness difference between the ambient brightness and a preset brightness value is less than a first preset difference value and reaches a third preset frame number; in response to not satisfying the exposure adjustment condition, determining a target exposure parameter of the second fill light corresponding to the current image by using a brightness difference between the ambient brightness corresponding to the current image and the preset brightness value, wherein the target exposure parameter comprises at least one of a target gain value, a target shutter value, and a duty cycle of the second fill light; in response to satisfying the exposure adjustment condition, updating the target exposure parameter corresponding to the second fill light, wherein the target exposure parameter comprises at least one of the target gain value, the target shutter value, and the duty cycle of the second fill light; using the target exposure parameter as a reference exposure parameter of the second fill light corresponding to the current image.
6. A computer device, comprising: The memory and the processor are coupled to each other, the memory stores program data, and the processor executes the program data to implement the steps of the method of any one of claims 1 to 5.
7. A computer readable storage medium characterized by The memory stores program data executable by the processor, and the program data is used to implement the steps of the method of any one of claims 1 to 5.
Citation Information
Patent Citations
Exposure method and device and camera equipment
CN110351490A
Image quality control method and device of dual-light camera, medium and equipment
CN114125293A