Camera device control method based on shooting environment, device and readable storage medium

CN122934059APending Publication Date: 2026-10-16ZHEJIANG DAHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610821268.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-08
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

这种方式需要在摄像设备上设置两个位置分别用于安装光敏传感器和雨量传感器,产生结构设计复杂且成本增加的问题

Benefits of technology

[0015] The camera device control method based on the shooting environment of this application obtains the mixed light intensity and the second infrared light intensity of the current shooting environment from a distance sensor. The mixed light intensity includes the total light intensity of the mixture of visible light and infrared light and the first infrared light intensity. Based on the mixed light intensity, a target shooting mode of the camera device is determined. In response to a difference between the target shooting mode and the current shooting mode of the camera device, the current shooting mode is switched to the target shooting mode. And/or, based on the second infrared light intensity, a target control mode for the lens wiper is determined, and the lens wiper is controlled to execute the target control mode. The lens wiper is mounted on the camera device. This solution enables shooting mode switching and wiper control of the camera device using only a distance sensor, reducing the structural complexity and space occupied by the camera device, and solving the high cost and complexity associated with traditional separate designs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122934059A_ABST
    Figure CN122934059A_ABST
Patent Text Reader

Abstract

The application discloses a camera equipment control method based on a shooting environment, equipment and a readable storage medium. The method comprises the following steps: acquiring a mixed light intensity and a second infrared light intensity in a current shooting environment from a light distance sensor, wherein the mixed light intensity comprises a total light intensity of mixed visible light and infrared light and a first infrared light intensity; determining a target shooting mode of the camera equipment according to the mixed light intensity; in response to the target shooting mode being different from a current shooting mode of the camera equipment, switching the current shooting mode to the target shooting mode; and / or determining a target control mode of a lens wiper according to the second infrared light intensity, and controlling the lens wiper to execute the target control mode, wherein the lens wiper is arranged on the camera equipment. Thus, the high cost and high complexity caused by the traditional separate design are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of camera equipment technology, and in particular to a camera equipment control method, electronic device, and computer-readable storage medium based on the shooting environment. Background Technology

[0002] In current camera equipment, especially network cameras, light-sensing technology for visible light intensity and rain sensing has become widely required. Visible light intensity sensing allows for control of the camera's day / night mode switching to better adapt to the current environment, while rain sensing can control the camera to periodically clear rainwater to prevent it from obstructing the viewfinder.

[0003] Current camera devices typically design their light and rain sensors separately. This approach requires two separate locations on the camera device for mounting the light and rain sensors, resulting in complex structural designs and increased costs. Summary of the Invention

[0004] The main technical problem addressed by this application is to provide a camera equipment control method, electronic device, and computer-readable storage medium based on the shooting environment, which can reduce the structural complexity of the camera equipment.

[0005] To solve the above-mentioned technical problems, one technical solution adopted in this application is: providing a camera device control method based on the shooting environment, wherein the camera device includes a light distance sensor, and the camera device control method based on the shooting environment includes: acquiring the mixed light intensity and a second infrared light intensity of the current shooting environment from the light distance sensor, wherein the mixed light intensity includes the total light intensity of the mixture of visible light and infrared light and a first infrared light intensity; determining the target shooting mode of the camera device according to the mixed light intensity, and switching the current shooting mode to the target shooting mode in response to the target shooting mode being different from the current shooting mode of the camera device; determining the target control mode of the lens wiper according to the second infrared light intensity, and controlling the lens wiper to execute the target control mode, wherein the lens wiper is disposed on the camera device.

[0006] In some embodiments, the step of determining the target shooting mode of the camera device based on the mixed light intensity includes: using the first infrared light intensity to perform infrared filtering on the total light intensity to obtain the visible light intensity in the current shooting environment; and determining the target shooting mode of the camera device based on the relationship between the visible light intensity and a preset brightness threshold.

[0007] In some embodiments, the step of using the first infrared light intensity to perform infrared filtering on the total light intensity to obtain the visible light intensity in the current shooting environment includes: determining the visible light information in the current shooting environment based on the difference between the total light intensity and the first infrared light intensity; distinguishing light sources in the visible light information in the current shooting environment to obtain at least one light source intensity value; and performing weighted statistical processing on each light source intensity value using a preset weight value to obtain the visible light intensity in the current shooting environment.

[0008] In some embodiments, the step of determining the target shooting mode of the camera device based on the relationship between the visible light intensity and a preset brightness threshold includes: determining the target shooting mode of the camera device as a daytime mode in response to the visible light intensity being greater than the preset brightness threshold; and determining the target shooting mode of the camera device as a nighttime mode in response to the visible light intensity being less than or equal to the preset brightness threshold.

[0009] In some embodiments, the step of determining the target control mode of the lens wiper based on the second infrared light intensity and controlling the lens wiper to execute the target control mode includes: in response to the difference between the second infrared light intensity and the first preset infrared light intensity being greater than a preset rainfall threshold, obtaining the rate of change of infrared intensity in the current shooting environment; determining the amount of rainfall in the current shooting environment based on the rate of change of infrared intensity; and determining the target control mode of the lens wiper based on the amount of rainfall in the current shooting environment.

[0010] In some embodiments, the step of determining the rainfall under the current shooting environment based on the infrared intensity change rate includes: determining whether the infrared intensity change rate satisfies the rainfall change pattern; if so, obtaining the rainfall corresponding to the infrared intensity change rate from a preset mapping relationship, wherein the preset mapping relationship includes a correspondence between a preset infrared intensity change rate and a preset rainfall.

[0011] In some embodiments, the step of determining the target control mode of the lens wiper based on the rainfall in the current shooting environment includes: in response to the rainfall in the current shooting environment being greater than a first rainfall threshold and less than a second rainfall threshold, determining the control mode corresponding to a first preset speed as the target control mode of the lens wiper; and in response to the rainfall in the current shooting environment being greater than or equal to the second rainfall threshold, determining the control mode corresponding to a second preset speed as the target control mode of the lens wiper.

[0012] In some embodiments, after determining the target control mode of the lens wiper based on the rainfall in the current shooting environment, the method further includes: after turning on the lens wiper, acquiring a third infrared light intensity; and in response to the third infrared light intensity being greater than a second preset infrared light intensity, confirming that the lens wiper is in front of the distance sensor.

[0013] To solve the above-mentioned technical problems, another technical solution adopted in this application is: to provide an electronic device, including a memory and a processor, wherein the memory stores program instructions, and the processor retrieves the program instructions from the memory to execute the above-mentioned camera device control method based on the shooting environment.

[0014] To solve the above-mentioned technical problems, another technical solution adopted in this application is: to provide a computer-readable storage medium including program data, which, when executed by a processor, is used to implement the above-mentioned camera device control method based on the shooting environment.

[0015] The camera device control method based on the shooting environment of this application obtains the mixed light intensity and the second infrared light intensity of the current shooting environment from a distance sensor. The mixed light intensity includes the total light intensity of the mixture of visible light and infrared light and the first infrared light intensity. Based on the mixed light intensity, a target shooting mode of the camera device is determined. In response to a difference between the target shooting mode and the current shooting mode of the camera device, the current shooting mode is switched to the target shooting mode. And / or, based on the second infrared light intensity, a target control mode for the lens wiper is determined, and the lens wiper is controlled to execute the target control mode. The lens wiper is mounted on the camera device. This solution enables shooting mode switching and wiper control of the camera device using only a distance sensor, reducing the structural complexity and space occupied by the camera device, and solving the high cost and complexity associated with traditional separate designs. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly described below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort, wherein: Figure 1 This is a schematic diagram of an exemplary embodiment of a conventional camera device; Figure 2 This is a schematic flowchart of an exemplary embodiment of the camera device control method shown in this application; Figure 3 This is a schematic diagram of the appearance of an exemplary embodiment of the optical distance sensor shown in this application; Figure 4 This is a schematic diagram of an exemplary embodiment of the photosensitive unit shown in this application; Figure 5 This is a schematic diagram of an exemplary embodiment of the distance sensing unit shown in this application; Figure 6 This is a schematic diagram of a framework of an exemplary embodiment of the camera equipment control system shown in this application; Figure 7 This is a schematic diagram of the framework of an exemplary embodiment of the optical distance sensor shown in this application; Figure 8 This is a schematic flowchart of another exemplary embodiment of the camera device control method shown in this application; Figure 9 This is a schematic diagram of an exemplary embodiment of the camera equipment control device shown in this application; Figure 10 This is a schematic diagram of the structure of an embodiment of the electronic device provided in this application; Figure 11 This is a schematic diagram of an embodiment of the computer-readable storage medium provided in this application. Detailed Implementation

[0017] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It is understood that the specific embodiments described herein are only for explaining this application and not for limiting it. Furthermore, it should be noted that, for ease of description, only the parts related to this application are shown in the accompanying drawings, not all structures. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0018] First, it should be noted that you should refer to [the relevant information]. Figure 1 , Figure 1 This is a schematic diagram of an exemplary embodiment of a conventional camera device. In conventional camera devices, the photosensor and the rain sensor are designed separately, requiring two openings in the camera device to house the photosensor and the rain sensor, which increases the cost of opening the structure and the space required for device placement. At the same time, the separate placement of the two functions in the hardware components results in a larger number of required circuit components, and the software processing logic is complex and time-consuming, which correspondingly increases the power consumption of the entire device.

[0019] Based on this, embodiments of this application propose a camera device control method, electronic device, and computer-readable storage medium based on the shooting environment. Mode switching and wiper control are achieved through an integrated optical distance sensor, resulting in lower structural complexity and cost compared to a separate design. The camera device control method based on the shooting environment is hereinafter referred to as the camera device control method. For details, please refer to... Figure 2 , Figure 2 This is a schematic flowchart of an exemplary embodiment of the camera device control method shown in this application.

[0020] The executing entity of the camera equipment control method can be a terminal device, a server, or other processing device. The terminal device can be a user equipment (UE), computer, mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PDA), handheld device, computing device, in-vehicle device, wearable device, etc. The executing entity of the camera equipment control method can also be a camera equipment control device. In some possible implementations, the camera equipment control method can be implemented by a processor calling computer-readable instructions stored in memory. Specifically, the camera equipment control method of this embodiment includes the following steps: S210: Obtain the mixed light intensity and the second infrared light intensity of the current shooting environment from the light distance sensor. The mixed light intensity includes the total light intensity of the mixture of visible light and infrared light and the first infrared light intensity.

[0021] A light distance sensor is a sensor that integrates photosensitivity and distance measurement functions. It is mounted on a camera device, which can be a video capture device or an image capture device. (See also...) Figure 3 , Figure 3 This is a schematic diagram of an exemplary embodiment of the optical distance sensor shown in this application. The optical distance sensor includes a light-sensing unit and a distance-sensing unit disposed in the same aperture. The optical distance sensor also includes an infrared light-emitting unit, which emits infrared light to allow the distance-sensing unit to sense the intensity of the reflected infrared light. It should be noted that conventional camera devices also have a separate infrared light-emitting unit. Therefore, in this embodiment, the cost of opening the aperture is not increased due to the infrared light-emitting unit. By placing the light-sensing unit and the distance-sensing unit in the same aperture, the cost of opening the aperture is reduced compared to the separate design used in conventional camera devices.

[0022] The current shooting environment refers to the environment in which the camera equipment is located. To ensure the shooting quality of the camera equipment, it is necessary to adapt the camera equipment to the current shooting environment to obtain higher quality captured images or videos. For example, the parameters of the camera equipment can be adjusted based on the detected brightness, weather, and other information of the current shooting environment, and data can be collected using the adjusted parameters. For instance, the shooting mode of the camera equipment can be adjusted based on the visible light intensity of the current shooting environment, and the lens wiper of the camera equipment can be adjusted based on the weather conditions of the current shooting environment.

[0023] Mixed light refers to electromagnetic waves encompassing multiple wavelengths. Exemplarily, mixed light may include, but is not limited to, visible light and infrared light, and the intensity of the mixed light includes the total intensity of the mixture of visible and infrared light and the intensity of a first infrared light. Visible light refers to electromagnetic waves perceptible to the naked eye in the current shooting environment. Visible light intensity refers to the intensity of the visible light wavelength band in the current shooting environment. In some embodiments, the intensity of the mixed light in the current shooting environment can be acquired using multiple photosensitive elements. In other embodiments, the intensity of the mixed light in the current shooting environment can also be acquired using a single multi-band sensitive element.

[0024] Infrared light refers to an electromagnetic wave that is imperceptible to the naked eye in the current shooting environment. The wavelength of infrared light is generally about 620-750nm. The second infrared light intensity refers to the intensity of the infrared light band in the current shooting environment. For example, the second infrared light intensity in the current shooting environment can be obtained using an infrared photosensitive element.

[0025] The light sensor includes a light sensing unit and a distance sensing unit. The light sensing unit detects the intensity of mixed light in the current shooting environment, and the distance sensing unit detects the intensity of second infrared light in the current shooting environment.

[0026] S220: Determines the target shooting mode of the camera device based on the mixed light intensity, and switches the current shooting mode to the target shooting mode in response to the difference between the target shooting mode and the current shooting mode of the camera device.

[0027] A target shooting mode refers to a mode adapted by the camera device to the current shooting environment. In some embodiments, the shooting mode of the camera device can be adaptively adjusted according to the mixed light intensity of the current shooting environment. In other embodiments, the shooting mode of the camera device can be adaptively adjusted according to the mixed light intensity of the current shooting environment and the shooting time. The shooting modes of the camera device may include a daytime mode and a nighttime mode. The shooting modes of the camera device may also include a daytime mode, an evening mode, and a nighttime mode.

[0028] The current shooting mode refers to the shooting mode that the camera device is currently in. For example, the current shooting mode of the camera device can be determined based on its parameters. The parameters of the camera device differ under different shooting modes. When the current shooting mode differs from the target shooting mode, the current shooting mode of the camera device is switched to the target shooting mode; when the current shooting mode and the target shooting mode are the same, the current shooting mode of the camera device remains unchanged.

[0029] S230: Determine the target control mode of the lens wiper based on the intensity of the second infrared light, and control the lens wiper to execute the target control mode. The lens wiper is set on the camera device.

[0030] Lens wipers are used to clear the front area of ​​a camera device to prevent rain from obscuring the image and causing blurry results. For example, see [link to relevant documentation]. Figure 1 The lens wiper is mounted on the camera device and can swing back and forth on the front panel to clear rainwater from the area. It should be noted that... Figure 1 This is just an example of one position for the lens wiper; in actual applications, the position of the lens wiper can be adjusted according to actual needs.

[0031] The target control mode refers to the oscillation pattern of the lens wiper in the front area. For example, the target control mode of the lens wiper can be determined by detecting the intensity of a second infrared light. The target control mode may include, but is not limited to, the speed and oscillation amplitude of the lens wiper. After determining the target control mode of the lens wiper, the lens wiper is controlled to perform water removal according to the corresponding target control mode.

[0032] In some embodiments, the mixed light intensity and the second infrared light intensity in the current shooting environment can be obtained from the light distance sensor. The mixed light intensity includes the total light intensity of the mixture of visible light and infrared light and the first infrared light intensity. The target shooting mode of the camera device is determined based on the mixed light intensity. In response to the target shooting mode being different from the current shooting mode of the camera device, the current shooting mode is switched to the target shooting mode.

[0033] In other embodiments, the mixed light intensity and the second infrared light intensity of the current shooting environment can be obtained from the optical distance sensor. The mixed light intensity includes the total light intensity of the mixture of visible light and infrared light and the first infrared light intensity. The target control mode of the lens wiper is determined according to the second infrared light intensity, and the lens wiper is controlled to execute the target control mode. The lens wiper is set on the camera device.

[0034] In other embodiments, the mixed light intensity and the second infrared light intensity of the current shooting environment can be obtained from the optical distance sensor. The mixed light intensity includes the total light intensity of the mixture of visible light and infrared light and the first infrared light intensity. The target shooting mode of the camera device is determined based on the mixed light intensity. In response to the target shooting mode being different from the current shooting mode of the camera device, the current shooting mode is switched to the target shooting mode. The target control mode of the lens wiper is determined based on the second infrared light intensity. The lens wiper is controlled to execute the target control mode. The lens wiper is disposed on the camera device.

[0035] Specifically, users can set whether to adjust the current shooting mode of the camera and the target control mode of the lens wiper according to their actual needs. When the user needs to adjust the current shooting mode of the camera, the camera control device will obtain the mixed light intensity from the light distance sensor; when the user needs to adjust the lens wiper of the camera, the camera control device will obtain the second infrared light intensity from the light distance sensor.

[0036] As can be seen, the camera device control method based on the shooting environment in this application embodiment obtains the mixed light intensity and the second infrared light intensity of the current shooting environment from the optical distance sensor. The mixed light intensity includes the total light intensity of the mixture of visible light and infrared light and the first infrared light intensity. Based on the mixed light intensity, the target shooting mode of the camera device is determined. In response to the target shooting mode being different from the current shooting mode of the camera device, the current shooting mode is switched to the target shooting mode. And / or, based on the second infrared light intensity, the target control mode of the lens wiper is determined, and the lens wiper is controlled to execute the target control mode. The lens wiper is mounted on the camera device. The above solution enables the switching of the shooting mode and the control of the wiper of the camera device with only one optical distance sensor, reducing the structural complexity and space occupied by the camera device, and solving the high cost and high complexity caused by traditional separate designs.

[0037] In some embodiments, the process of S220 described above may include: using the first infrared light intensity to filter out infrared interference from the total light intensity to obtain the visible light intensity under the current shooting environment; and determining the target shooting mode of the camera device based on the relationship between the visible light intensity and a preset brightness threshold. This eliminates interference from infrared light through two photosensitive elements, improving the accuracy of visible light.

[0038] The light sensing unit may include a visible infrared photosensitive element and an infrared photosensitive element. The mixed light intensity obtained from the light distance sensor includes the total light intensity detected by the visible infrared photosensitive element and the first infrared light intensity detected by the infrared photosensitive element.

[0039] Total light intensity is data obtained by the visible-infrared photosensitive element from the current shooting environment. A visible-infrared photosensitive element is a component sensitive to both visible and infrared light. First infrared light intensity is data obtained by the infrared photosensitive element from the current shooting environment. An infrared photosensitive element is a component sensitive to infrared light. Both the visible-infrared and infrared photosensitive elements can be photodiodes. The structure of the photosensitive unit can be as follows: Figure 4 As shown, the two photodiodes are a visible infrared photosensitive element and an infrared photosensitive element, respectively. The first and second original sensing values ​​measured by the visible infrared photosensitive element and the infrared photosensitive element are processed by an amplifier circuit, an analog-to-digital converter (ADC) circuit, and a digital processing module (IIC Interface) to obtain the total light intensity and the first infrared light intensity.

[0040] To obtain a purer visible light intensity and reduce infrared interference, the total light intensity detected by the visible-infrared photosensitive element can be filtered out using the first infrared light intensity detected by the infrared photosensitive element to obtain the final visible light intensity. For example, the difference between the total light intensity and the first infrared light intensity can be determined as the visible light intensity under the current shooting environment. Alternatively, the ratio between the total light intensity and the first infrared light intensity can be determined as the visible light intensity under the current shooting environment.

[0041] In some embodiments, the camera control device can acquire the visible light intensity in the current shooting environment through a visible light-sensitive element. In other embodiments, the camera can also capture an image of the current shooting environment, and the visible light intensity can be obtained by performing brightness analysis on the image. In still other embodiments, visible light can also distinguish electromagnetic waves emitted by different light sources. Specifically, the visible light information in the current shooting environment is determined based on the difference between the total light intensity and the first infrared light intensity; the visible light information in the current shooting environment is then used to distinguish light sources, obtaining at least one light source intensity value; and the intensity values ​​of each light source are weighted and statistically processed using preset weight values ​​to obtain the visible light intensity in the current shooting environment. Therefore, calculating the visible light intensity using the intensity values ​​of different light sources can improve the accuracy of the visible light intensity calculation.

[0042] Visible light information refers to visible light-related information detected by the photosensitive unit. For example, after acquiring the total light intensity and the first infrared light intensity, the camera device control device can determine the difference between the total light intensity and the first infrared light intensity as the visible light information in the current shooting environment.

[0043] The light source intensity value is the intensity value corresponding to each monochromatic light. The visible light information in the current shooting environment is differentiated by light source to obtain the light source intensity value of at least one light source. In some embodiments, a spectrometer can be used to differentiate visible light information by light source to obtain the light source intensity value of each light source. In other embodiments, an ambient light sensor (ALS) can also be used to differentiate light sources to obtain the light source intensity value of each light source. For example, different light sources may include, but are not limited to, at least one of the following: Cool White Fluorescent (CWF), Ultraluminate 30 (U30), Triphosphor Lamp 84 (TL84), Daylight 6500K (D65), Illuminant A (A), and Horizontal Daylight (HZ).

[0044] The preset weight values ​​can be determined empirically for each light source, or based on weight values ​​determined during preliminary debugging. The intensity values ​​of each light source are weighted and statistically processed using the preset weight values ​​to obtain the visible light intensity under the current shooting environment. In some embodiments, the intensity values ​​of each light source can be weighted and summed using the preset weight values ​​to obtain the visible light intensity under the current shooting environment. In other embodiments, the intensity values ​​of each light source can be weighted using the preset weight values ​​to obtain weighted light source intensity values; the product of these weighted light source intensity values ​​is then calculated to obtain the visible light intensity under the current shooting environment.

[0045] The camera control device can determine the target shooting mode of the camera based on the relationship between visible light intensity and a preset brightness threshold. Specifically, in response to a visible light intensity greater than the preset brightness threshold, the target shooting mode of the camera is determined to be a daytime mode; in response to a visible light intensity less than or equal to the preset brightness threshold, the target shooting mode of the camera is determined to be a nighttime mode.

[0046] In other embodiments, the preset brightness threshold may further include a first preset brightness sub-threshold and a second preset brightness sub-threshold, wherein the first preset brightness sub-threshold is greater than the second preset brightness sub-threshold. When the visible light intensity is greater than the first preset brightness sub-threshold, the target shooting mode of the camera device is determined to be daytime mode; when the visible light intensity is less than or equal to the first preset brightness sub-threshold and greater than the second preset brightness sub-threshold, the target shooting mode of the camera device is determined to be evening mode; and when the visible light intensity is less than or equal to the second preset brightness sub-threshold, the target shooting mode of the camera device is determined to be nighttime mode.

[0047] Furthermore, S230 above determines the target control mode of the lens wiper based on the second infrared light intensity. The process of controlling the lens wiper to execute the target control mode includes: in response to the difference between the second infrared light intensity and the first preset infrared light intensity being greater than a preset rainfall threshold, obtaining the rate of change of infrared intensity in the current shooting environment; determining the rainfall in the current shooting environment based on the rate of change of infrared intensity; and determining the target control mode of the lens wiper based on the rainfall in the current shooting environment. Thus, the lens wiper can be quickly controlled based on the rate of change of infrared intensity, reducing the judgment time.

[0048] The second infrared light intensity refers to the light intensity value detected by the distance sensing unit in the optical distance sensor. The structure of the distance sensing unit can be found in [reference needed]. Figure 5 The distance sensing unit includes two infrared diodes, a distance integration module, an analog-to-digital converter (ADC), and a digital processing module (IIC Interface). This embodiment uses two infrared diodes to reduce interference from other infrared light bands. Specifically, one infrared diode can be configured to be sensitive to infrared light bands other than those emitted by the infrared emitting unit, while the other is sensitive to all infrared light bands. The difference between the two can then be used to obtain a relatively accurate second infrared light intensity. In other embodiments, the distance sensing unit may include only one infrared diode sensitive to the infrared light band emitted by the infrared emitting unit to sense infrared light. The distance sensing unit operates as follows: the infrared emitting unit (IRLED) emits infrared light of a fixed wavelength in pulses. When an obstacle blocks the light, the infrared light is reflected back and received by the two infrared diodes (e.g., CH0 and CH1). The received infrared signal is processed by the distance integration module, the ADC, and the digital processing module to obtain the second infrared light intensity. After the camera control device acquires the second infrared light intensity in real time, it stores the intensity in a data register for subsequent calculation of the infrared intensity change rate.

[0049] The first preset infrared light intensity refers to a predetermined infrared light intensity. For example, infrared signals can be collected in an unobstructed environment to obtain the infrared light intensity in that environment, and this intensity can be determined as the first preset infrared light intensity. An unobstructed environment can be rainless weather. When infrared light encounters an obstacle, it is reflected back to the optical distance sensor. The stronger the received infrared light intensity, the closer the obstacle is to the optical distance sensor; the weaker the intensity, the farther away the obstacle is. Therefore, the presence of rainfall can be determined by the infrared reflection intensity. When the difference between the second infrared light intensity and the first preset infrared light intensity is greater than a preset rainfall threshold, it is determined that the current shooting environment is rainy and that it is raining.

[0050] The rate of change of infrared intensity refers to the speed at which the intensity of second infrared light changes over a certain period of time. In some embodiments, the number of changes in the intensity of second infrared light over a period of time can be calculated, and the ratio between the number of changes in the intensity of second infrared light and the length of time can be determined as the rate of change of infrared intensity. In other embodiments, the total amount of change in the intensity of second infrared light over a period of time can also be calculated, and the ratio between the total amount of change in the intensity of second infrared light and the length of time can be determined as the rate of change of infrared intensity. Here, a period of time can be the time interval between a certain point in history and the current point in time.

[0051] In some embodiments, obstacles such as birds may affect the optical distance sensor's perception, leading to misjudgments of rainfall. Therefore, when it is determined that the difference between the second infrared light intensity and the first preset infrared light intensity is greater than a preset rainfall threshold, rainfall verification can be further performed using the rate of change of infrared intensity to determine whether it is raining. Specifically, it is determined whether the rate of change of infrared intensity conforms to a rainfall change pattern; if so, the rainfall corresponding to the rate of change of infrared intensity is obtained from a preset mapping relationship, which includes the correspondence between a preset rate of change of infrared intensity and a preset rainfall amount. This improves the accuracy of rainfall judgment.

[0052] The rainfall variation pattern can be either that the rate of change of infrared intensity exceeds a preset rate of change over a period of time, or that the rate of change of infrared intensity at different time points over a period of time exhibits a relatively uniform and regular variation. When the rate of change of infrared intensity meets the rainfall variation pattern, it is confirmed that rainfall is currently occurring; the corresponding rainfall amount is obtained by traversing a preset mapping relationship based on the rate of change of infrared intensity. In other embodiments, there is a positive correlation between the rate of change of infrared intensity and rainfall amount. This positive correlation can be constructed using linear or nonlinear functions, and then the rainfall amount corresponding to the rate of change of infrared intensity can be obtained through this positive correlation.

[0053] Rainfall refers to the amount of precipitation in the current shooting environment. For example, the rainfall in the current shooting environment can be determined by the rate of change of infrared intensity. The faster the rate of change of infrared intensity, the greater the rainfall in the current shooting environment, and the slower the rate of change of infrared intensity, the less rainfall in the current shooting environment.

[0054] After determining the rainfall in the current shooting environment, a target control mode for the lens wiper is determined based on the rainfall. In some embodiments, the target control mode includes on and off. When the rainfall is greater than a preset rainfall threshold, the target control mode for the lens wiper is determined to be on; when the rainfall is less than or equal to the preset rainfall threshold, the target control mode for the lens wiper is determined to be off. In other embodiments, the target control mode includes control modes corresponding to different speeds, where speed refers to the oscillation speed of the lens wiper. In response to the rainfall in the current shooting environment being greater than a first rainfall threshold and less than a second rainfall threshold, the control mode corresponding to the first preset speed is determined as the target control mode for the lens wiper; in response to the rainfall in the current shooting environment being greater than or equal to the second rainfall threshold, the control mode corresponding to the second preset speed is determined as the target control mode for the lens wiper. This better removes rainwater from the lens and prevents blurry images caused by rain obstruction.

[0055] The first and second rainfall thresholds can be set empirically. When the rainfall in the current shooting environment is less than or equal to the first rainfall threshold, it means the rainfall has virtually no impact on the camera's recording, and the lens wiper does not need to be activated. When the rainfall in the current shooting environment is greater than the first rainfall threshold but less than the second rainfall threshold, the lens wiper speed is controlled at a first preset speed. When the rainfall in the current shooting environment is greater than or equal to the second rainfall threshold, the lens wiper speed is controlled at a second preset speed. The second preset speed is greater than the first preset speed.

[0056] After activating the lens wiper, its position can be confirmed by position sensing. Traditional lens wiper position detection uses optocoupler circuits and optocoupler baffles. The optocoupler circuit determines the motor's rotation position to confirm the lens wiper's location, requiring dedicated space in the camera device and incurring hardware and software costs. Therefore, this embodiment proposes a method based on infrared light intensity to determine the lens wiper position. After activating the lens wiper, a third infrared light intensity is acquired; if the third infrared light intensity is greater than a second preset infrared light intensity, the lens wiper is confirmed to be in front of the proximity sensor.

[0057] The third infrared light intensity refers to the infrared light intensity obtained after the lens wiper is turned on. The second preset infrared light intensity can be obtained from actual measurements, that is, the infrared light intensity when there is an obstruction on the front of the proximity sensor. The second preset infrared light intensity is greater than the first preset infrared light intensity. When the third infrared light intensity is greater than the second preset infrared light intensity, it indicates that there is an obstruction on the front of the proximity sensor, and the lens wiper is running at this time. Therefore, it can be determined that the lens wiper has moved to the front of the proximity sensor.

[0058] It should be noted that after the lens wiper is turned on, the camera equipment control device will continue to detect the amount of rain in the current shooting environment in order to determine whether to adjust the target control mode of the lens wiper.

[0059] To elaborate on the application of this application in the camera equipment control method, Figure 6 , Figure 7 The framework diagram shown is as follows: Figure 8 The flowchart shown below provides further explanation, as detailed below: like Figure 6 As shown, Figure 6 This is a schematic diagram of an exemplary embodiment of the camera equipment control system shown in this application. The camera equipment control system includes a distance sensor, a lens wiper, a dual filter switcher, and a main control chip. The distance sensor, the lens wiper, and the dual filter switcher are all connected to the main control chip. Figure 7 This is a schematic diagram of a framework of an exemplary embodiment of the optical distance sensor shown in this application. The optical distance sensor includes a light-sensing unit and a distance-sensing unit. The light-sensing unit includes a photodiode, and the distance-sensing unit includes an infrared diode. The photodiode and the infrared diode are respectively connected to an analog-to-digital conversion circuit and a digital processing module. The output module can be configured according to user needs. An infrared emitting unit is set separately to provide a stable light source.

[0060] See Figure 8 right Figure 6 , Figure 7 The execution process of each module is described below. The infrared emitting unit emits infrared light of a fixed wavelength. When it encounters an obstacle, the infrared light is reflected back. The reflected infrared light is received by the infrared diode in the distance sensing unit. The received infrared signal is converted into a second infrared light intensity by an analog-to-digital converter and sent to the main control chip via the digital processing module. The photodiode in the light sensing unit senses ambient light and converts the sensed light signal into light intensity, including total light intensity and first infrared light intensity, via an analog-to-digital converter. The total light intensity and first infrared light intensity are then sent to the main control chip via the digital processing module. It should be noted that the execution order of the light sensing unit and the distance sensing unit is not fixed; they can be executed simultaneously or in any order.

[0061] For lens wiper control, the main control chip determines whether the second infrared light intensity is greater than the first preset infrared light intensity, which can be a pre-set infrared light intensity for unobstructed conditions. If not, it indicates that the current shooting environment is rainless; if so, it indicates that the current shooting environment is rainy, and further assessment of the rainfall is needed. The chip calculates the rate of change of infrared intensity over a period of time. When the rate of change of infrared intensity is greater than the preset rate, the rainfall is confirmed as heavy rain; when the rate of change of infrared intensity is less than or equal to the preset rate, the rainfall is confirmed as light rain. The target control mode for the lens wiper is determined based on the rainfall; the heavier the rainfall, the faster the lens wiper. Additionally, the position of the lens wiper can be determined by the infrared light intensity. When the lens wiper moves to the position in front of the proximity sensor, the infrared light intensity increases. Therefore, after activating the lens wiper, infrared signals are continuously collected to obtain a third infrared light intensity. When the third infrared light intensity is greater than the second preset infrared light intensity, the lens wiper is confirmed to be in front of the proximity sensor. Afterward, when the lens wiper is outside the area in front of the proximity sensor, its position can be determined using information such as the speed and direction of the lens wiper.

[0062] For mode control of the camera equipment, infrared filtering is performed using the total light intensity and the first infrared light intensity to obtain the visible light intensity under the current shooting environment. When the visible light intensity is greater than the preset brightness threshold, the target shooting mode of the camera equipment is determined to be daytime mode, and the dual filter switcher is used to switch to the infrared filter used during the day. When the visible light intensity is less than or equal to the preset brightness threshold, the target shooting mode of the camera equipment is determined to be nighttime mode, and the dual filter switcher is used to switch to the infrared filter used at night.

[0063] Please see Figure 9 , Figure 9 This is a schematic diagram of an exemplary embodiment of the camera device control device shown in this application. The camera device control device 900 includes an acquisition module 910, a first determination module 920, and a second determination module 930. The acquisition module 910 is used to acquire the mixed light intensity and the second infrared light intensity of the current shooting environment from a light distance sensor. The mixed light intensity includes the total light intensity of the mixture of visible light and infrared light and the first infrared light intensity. The first determination module 920 is used to determine the target shooting mode of the camera device based on the mixed light intensity, and in response to the target shooting mode being different from the current shooting mode of the camera device, switches the current shooting mode to the target shooting mode. The second determination module 930 is used to determine the target control mode of the lens wiper based on the second infrared light intensity, and controls the lens wiper to execute the target control mode. The lens wiper is disposed on the camera device.

[0064] In the above scheme, the camera control device acquires the mixed light intensity and the second infrared light intensity of the current shooting environment from the optical distance sensor. The mixed light intensity includes the total light intensity of the mixture of visible and infrared light and the first infrared light intensity. Based on the mixed light intensity, the target shooting mode of the camera device is determined. In response to the target shooting mode being different from the current shooting mode of the camera device, the current shooting mode is switched to the target shooting mode. Based on the second infrared light intensity, the target control mode of the lens wiper is determined, and the lens wiper is controlled to execute the target control mode. The lens wiper is mounted on the camera device. This scheme achieves shooting mode switching and wiper control of the camera device with a single optical distance sensor, reducing the structural complexity and space occupation of the camera device, and solving the high cost and complexity caused by traditional separate designs.

[0065] The functions of each module can be found in the embodiment of the camera equipment control method, and will not be repeated here.

[0066] To implement the camera device control method of the above embodiments, this application proposes another electronic device, please refer to [link / reference needed]. Figure 10 , Figure 10 This is a schematic diagram of the structure of an embodiment of the electronic device provided in this application.

[0067] Electronic device 1000 includes memory 1010 and processor 1020, wherein memory 1010 and processor 1020 are coupled together.

[0068] The memory 1010 is used to store program data, and the processor 1020 is used to execute the program data to implement the camera device control method of the above embodiment.

[0069] In this embodiment, the processor 1020 can also be referred to as a CPU (Central Processing Unit). The processor 1020 may be an integrated circuit chip with signal processing capabilities. The processor 1020 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 devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor, or the processor 1020 can be any conventional processor.

[0070] This application also provides a computer-readable storage medium, such as Figure 11As shown, the computer-readable storage medium 1100 is used to store program data 1110, which, when executed by a processor, is used to implement the camera device control method as described in the method embodiments of this application.

[0071] The methods involved in the camera device control method embodiments of this application, when implemented as software functional units and sold or used as independent products, can be stored in a device, such as a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0072] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

[0073] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus. The term "and / or" is merely a description of the association of related objects, indicating that three relationships can exist; for example, A and / or B can represent: A alone, A and B simultaneously, and B alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects are in an "or" relationship. Furthermore, "many" in this document means two or more. In addition, the term "at least one" in this document means any combination of at least two of any one or more of a plurality of elements, such as including at least one of A, B, and C, and may mean including any one or more elements selected from the set consisting of A, B, and C.

Claims

1. A camera device control method based on the shooting environment, characterized in that, The camera device includes a light distance sensor, and the camera device control method based on the shooting environment includes: The mixed light intensity and the second infrared light intensity under the current shooting environment are obtained from the optical distance sensor. The mixed light intensity includes the total light intensity of the mixture of visible light and infrared light and the first infrared light intensity. The target shooting mode of the camera device is determined based on the mixed light intensity; in response to a difference between the target shooting mode and the current shooting mode of the camera device, the current shooting mode is switched to the target shooting mode; and / or, The target control mode of the lens wiper is determined based on the second infrared light intensity, and the lens wiper is controlled to execute the target control mode. The lens wiper is mounted on the camera device.

2. The camera equipment control method based on the shooting environment according to claim 1, characterized in that, The step of determining the target shooting mode of the camera device based on the mixed light intensity includes: The total light intensity is infrared filtered out using the first infrared light intensity to obtain the visible light intensity under the current shooting environment; The target shooting mode of the camera device is determined based on the relationship between the visible light intensity and the preset brightness threshold.

3. The camera equipment control method based on the shooting environment according to claim 2, characterized in that, The step of using the first infrared light intensity to perform infrared filtering on the total light intensity to obtain the visible light intensity under the current shooting environment includes: The visible light information of the current shooting environment is determined based on the difference between the total light intensity and the first infrared light intensity; The visible light information under the current shooting environment is used to distinguish light sources and obtain at least one light source intensity value; The intensity of visible light under the current shooting environment is obtained by performing weighted statistical processing on the intensity values ​​of each light source using preset weight values.

4. The camera equipment control method based on shooting environment according to claim 2, characterized in that, The step of determining the target shooting mode of the camera device based on the relationship between the visible light intensity and the preset brightness threshold includes: In response to the visible light intensity being greater than the preset brightness threshold, the target shooting mode of the camera device is determined to be daytime mode; In response to the visible light intensity being less than or equal to the preset brightness threshold, the target shooting mode of the camera device is determined to be night mode.

5. The camera equipment control method based on the shooting environment according to claim 1, characterized in that, The step of determining the target control mode of the lens wiper based on the second infrared light intensity and controlling the lens wiper to execute the target control mode includes: In response to the difference between the second infrared light intensity and the first preset infrared light intensity being greater than a preset rainfall threshold, the rate of change of infrared intensity under the current shooting environment is obtained; The rainfall in the current shooting environment is determined based on the rate of change of infrared intensity; The target control mode of the lens wiper is determined based on the rainfall in the current shooting environment.

6. The camera equipment control method based on the shooting environment according to claim 5, characterized in that, The step of determining the rainfall under the current shooting environment based on the infrared intensity change rate includes: Determine whether the rate of change of infrared intensity conforms to the rainfall variation pattern; If so, the rainfall corresponding to the infrared intensity change rate is obtained from the preset mapping relationship, which includes the correspondence between the preset infrared intensity change rate and the preset rainfall.

7. The camera equipment control method based on shooting environment according to claim 5, characterized in that, The step of determining the target control mode of the lens wiper based on the rainfall in the current shooting environment includes: In response to the current shooting environment having rainfall greater than a first rainfall threshold and less than a second rainfall threshold, the control mode corresponding to the first preset speed is determined as the target control mode of the lens wiper. In response to the rainfall in the current shooting environment being greater than or equal to the second rainfall threshold, the control mode corresponding to the second preset speed is determined as the target control mode of the lens wiper.

8. The camera equipment control method based on the shooting environment according to claim 5, characterized in that, After the step of determining the target control mode of the lens wiper based on the rainfall in the current shooting environment, the method further includes: After turning on the lens wiper, the third infrared light intensity is obtained; In response to the third infrared light intensity being greater than the second preset infrared light intensity, it is confirmed that the lens wiper is in front of the light distance sensor.

9. An electronic device, characterized in that, include: A memory and a processor, wherein the memory stores program instructions, and the processor retrieves the program instructions from the memory to perform the method as claimed in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, include: The system stores program data, which, when executed by a processor, is used to implement the method as described in any one of claims 1-8.