Environment illumination sensing method, vehicle lamp control method, intelligent equipment and medium

By using the camera to acquire environmental images on smart devices and using the fitting function to obtain lighting intensity, the problem that existing lighting sensors cannot truly reflect the brightness of the scene is solved, and accurate perception of environmental illumination and the effectiveness of automatic control of the headlights are achieved.

CN119550987AActive Publication Date: 2025-03-04安徽蔚来智驾科技有限公司
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
CN202411679739.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-22
Publication Date
2025-03-04
Estimated Expiration
2044-11-22

AI Technical Summary

Technical Problem

Existing light sensors cannot truly reflect the brightness of the scene seen by the human eye, resulting in the headlights not being turned on in time when the ambient illuminance is high but the scene is dark, affecting the driving experience.

Method used

By obtaining the environmental image and camera configuration information collected by the camera on the smart device, the fitting function is used to represent the correspondence between the pixel value and the light intensity, and thus accurately obtain the ambient illuminance.

Benefits of technology

It realizes a true reflection of the ambient illumination, ensures that the automatic control of the headlights is more in line with the actual needs of the driver, and improves driving safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119550987A_ABST
    Figure CN119550987A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, particularly provides an environment illumination sensing method, a vehicle lamp control method, intelligent equipment and a medium, and aims to solve the problem of accurately acquiring environment illumination. In order to achieve the purpose, the method provided by the invention comprises the steps of obtaining an environment image and camera configuration information collected by a camera on the intelligent equipment, and obtaining a pixel value of each pixel point in the environment image; obtaining a fitting function, wherein the fitting function is used for representing a corresponding relation between a pixel value of a pixel point in the image and configuration information and illumination intensity when the camera collects the image; taking the pixel value of each pixel point in the environment image and the camera configuration information as the input quantity of a fitting function, and obtaining the illumination intensity corresponding to each pixel point through the fitting function; and obtaining the environment illumination of the environment where the intelligent device is located according to the illumination intensity. According to the method, the environment illumination can truly reflect the scene brightness seen by human eyes, and the accuracy of the environment illumination is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an ambient illumination perception method, a vehicle light control method, an intelligent device and a medium. Background Art

[0002] There are headlights on both sides of the vehicle's head. When the light is dim, the headlights can be turned on for lighting, which helps the vehicle drive safely. Some vehicles have an automatic light control function. The vehicle is usually equipped with a light sensor. This function uses the light sensor to detect the ambient illumination of the vehicle's environment. If the ambient illumination is low, the headlights are automatically controlled to turn on. However, the existing light sensors are limited by resolution and detection accuracy, and cannot truly reflect the brightness of the scene seen by the human eye. It is possible that the light sensor detects that the ambient illumination is high, but the scene seen by the human eye is already relatively dark, and the headlights need to be turned on for lighting. However, because the light sensor detects that the ambient illumination is high, the headlights are not automatically turned on, affecting the user's driving experience.

[0003] Accordingly, the art needs a new technical solution to solve the above problems. Summary of the invention

[0004] In order to overcome the above-mentioned defects, the present application is proposed to solve or at least partially solve the technical problem of how to accurately obtain the ambient illumination.

[0005] In a first aspect, a method for sensing ambient illumination is provided, the method comprising:

[0006] Acquire an environment image and camera configuration information captured by a camera on a smart device, wherein the environment image is an image of the environment where the smart device is located, and the camera configuration information is configuration information when the camera captures the environment image;

[0007] Obtaining a pixel value of each pixel in the environment image;

[0008] Obtaining a fitting function, wherein the fitting function is used to represent a corresponding relationship between a pixel value of a pixel point in an image and configuration information and light intensity when a camera acquires the image;

[0009] Using the pixel value of each pixel point and the camera configuration information as input quantities of the fitting function, and obtaining the light intensity corresponding to each pixel point through the fitting function;

[0010] The ambient illumination of the environment where the smart device is located is obtained according to the light intensity.

[0011] In a technical solution of the above-mentioned ambient illumination perception method, the camera configuration information includes the exposure time and gain of the camera.

[0012] In a technical solution of the above-mentioned ambient illumination perception method, the smart device is a vehicle, and obtaining the ambient illumination of the environment where the smart device is located according to the light intensity includes:

[0013] Determining a first visual field of the driver of the vehicle according to the height of the vehicle;

[0014] Pixel points in the environment image that are within the first field of view are obtained, and the environment illumination of the first field of view is obtained according to the light intensity corresponding to the pixel points.

[0015] In a technical solution of the above-mentioned ambient illumination perception method, the smart device is provided with a plurality of cameras, and the step of obtaining the ambient illumination of the first field of view according to the light intensity corresponding to the pixel point includes:

[0016] Dividing the first visual field into a plurality of sub-ranges;

[0017] For each camera, a target pixel point located in a target sub-range in an environment image captured by the camera is obtained, where the target sub-range is a sub-range covered by the second field of view of the camera among the multiple sub-ranges, and an ambient illumination of the target sub-range is obtained according to the light intensity corresponding to the target pixel point, and the ambient illumination is used as an initial ambient illumination of the target sub-range;

[0018] For each sub-range, if the initial ambient illuminance of the sub-range is one, the initial ambient illuminance is used as the final ambient illuminance; if the initial ambient illuminance of the sub-range is multiple, the first average of the multiple initial ambient illuminances is used as the final ambient illuminance;

[0019] The ambient illumination of the first field of view is acquired according to the final ambient illumination of all sub-ranges.

[0020] In a technical solution of the above-mentioned ambient illumination perception method, obtaining the ambient illumination of the target sub-range according to the light intensity corresponding to the target pixel point includes:

[0021] Obtain the second mean value of the light intensity corresponding to all target pixels;

[0022] Obtaining a deviation between the light intensity corresponding to the target pixel and the second mean value, and determining a weight of the target pixel according to the deviation;

[0023] Obtaining an effective light intensity corresponding to the target pixel point according to the product of the light intensity corresponding to the target pixel point and the weight;

[0024] The ambient illumination of the target sub-range is obtained according to the effective light intensity corresponding to each target pixel point in the target sub-range.

[0025] In a technical solution of the above-mentioned ambient illumination perception method, determining the weight of the target pixel point according to the deviation includes:

[0026] If the deviation is greater than or equal to the deviation threshold, the weight of the target pixel is 0; if the deviation is less than the deviation threshold, the weight of the target pixel is 1.

[0027] In a technical solution of the above-mentioned ambient illumination perception method, acquiring the ambient illumination of the first field of view according to the final ambient illumination of all sub-ranges includes:

[0028] Obtaining the third average of the final ambient illumination of all sub-ranges;

[0029] The ambient illumination of the first field of view is obtained according to the third mean value.

[0030] In a technical solution of the above-mentioned ambient illumination perception method, dividing the first field of view into a plurality of sub-ranges includes:

[0031] The first visual field range is evenly divided into a plurality of sub-ranges.

[0032] In a second aspect, a vehicle light control method is provided, the method comprising:

[0033] The ambient illumination perception method provided in the first aspect is used to obtain the ambient illumination of the environment where the smart device is located, wherein the smart device is a vehicle, and the vehicle is provided with a camera and a headlight, and the headlight includes a headlight;

[0034] The state of the vehicle light is controlled according to the ambient illumination.

[0035] In a third aspect, a smart device is provided, comprising at least one processor; and a memory communicatively connected to the at least one processor; wherein a computer program is stored in the memory, and when the computer program is executed by the at least one processor, the method described in any one of the technical solutions provided in the first aspect or the second aspect is implemented.

[0036] In a fourth aspect, a computer-readable storage medium is provided, wherein a plurality of program codes are stored in the computer-readable storage medium, wherein the program codes are suitable for being loaded and run by a processor to execute the method described in any one of the technical solutions provided in the first aspect or the second aspect.

[0037] Solution 1. A method for sensing ambient illumination, characterized in that the method comprises:

[0038] Acquire an environment image and camera configuration information captured by a camera on a smart device, wherein the environment image is an image of the environment where the smart device is located, and the camera configuration information is configuration information when the camera captures the environment image;

[0039] Obtaining a pixel value of each pixel in the environment image;

[0040] Obtaining a fitting function, wherein the fitting function is used to represent a corresponding relationship between a pixel value of a pixel point in an image and configuration information and light intensity when a camera acquires the image;

[0041] Using the pixel value of each pixel point and the camera configuration information as input quantities of the fitting function, and obtaining the light intensity corresponding to each pixel point through the fitting function;

[0042] The ambient illumination of the environment where the smart device is located is obtained according to the light intensity.

[0043] Solution 2. The method according to Solution 1 is characterized in that the camera configuration information includes the exposure time and gain of the camera.

[0044] Solution 3. The method according to Solution 1 is characterized in that the smart device is a vehicle, and obtaining the ambient illumination of the environment where the smart device is located according to the light intensity includes:

[0045] Determining a first visual field of the driver of the vehicle according to the height of the vehicle;

[0046] Pixel points in the environment image that are within the first field of view are obtained, and the environment illumination of the first field of view is obtained according to the light intensity corresponding to the pixel points.

[0047] Solution 4. The method according to Solution 3 is characterized in that the smart device is provided with a plurality of cameras, and the step of obtaining the ambient illumination of the first field of view according to the light intensity corresponding to the pixel point comprises:

[0048] Dividing the first visual field into a plurality of sub-ranges;

[0049] For each camera, a target pixel point located in a target sub-range in an environment image captured by the camera is obtained, where the target sub-range is a sub-range covered by the second field of view of the camera among the multiple sub-ranges, and an ambient illumination of the target sub-range is obtained according to the light intensity corresponding to the target pixel point, and the ambient illumination is used as an initial ambient illumination of the target sub-range;

[0050] For each sub-range, if the initial ambient illuminance of the sub-range is one, the initial ambient illuminance is used as the final ambient illuminance; if the initial ambient illuminance of the sub-range is multiple, the first average of the multiple initial ambient illuminances is used as the final ambient illuminance;

[0051] The ambient illumination of the first field of view is acquired according to the final ambient illumination of all sub-ranges.

[0052] Solution 5. The method according to Solution 4 is characterized in that the step of obtaining the ambient illumination of the target sub-range according to the illumination intensity corresponding to the target pixel point comprises:

[0053] Obtain the second mean value of the light intensity corresponding to all target pixels;

[0054] Obtaining a deviation between the light intensity corresponding to the target pixel and the second mean value, and determining a weight of the target pixel according to the deviation;

[0055] Obtaining an effective light intensity corresponding to the target pixel point according to the product of the light intensity corresponding to the target pixel point and the weight;

[0056] The ambient illumination of the target sub-range is obtained according to the effective light intensity corresponding to each target pixel point in the target sub-range.

[0057] Solution 6. The method according to Solution 5 is characterized in that determining the weight of the target pixel point according to the deviation comprises:

[0058] If the deviation is greater than or equal to the deviation threshold, the weight of the target pixel is 0;

[0059] If the deviation is less than the deviation threshold, the weight of the target pixel is 1.

[0060] Solution 7. The method according to Solution 4 is characterized in that obtaining the ambient illumination of the first field of view range according to the final ambient illumination of all sub-ranges comprises:

[0061] Obtaining the third average of the final ambient illumination of all sub-ranges;

[0062] The ambient illumination of the first field of view is obtained according to the third mean value.

[0063] Solution 8. The method according to Solution 4 is characterized in that the step of dividing the first field of view into a plurality of sub-ranges comprises:

[0064] The first visual field range is evenly divided into a plurality of sub-ranges.

[0065] Solution 9. A vehicle light control method, characterized in that the method comprises:

[0066] The ambient illumination perception method described in any one of schemes 1 to 8 is adopted to obtain the ambient illumination of the environment where the smart device is located, wherein the smart device is a vehicle, and the vehicle is provided with a camera and a headlight, and the headlight includes a headlight;

[0067] The state of the vehicle light is controlled according to the ambient illumination.

[0068] Solution 10. A smart device, comprising:

[0069] at least one processor;

[0070] and, a memory communicatively coupled to the at least one processor;

[0071] Wherein, a computer program is stored in the memory, and when the computer program is executed by the at least one processor, the ambient illumination perception method described in any one of Schemes 1 to 8, or the vehicle light control method described in Scheme 9 is implemented.

[0072] Solution 11. A computer-readable storage medium storing a plurality of program codes, characterized in that the program codes are suitable for being loaded and run by a processor to execute the ambient illumination perception method described in any one of Solutions 1 to 8, or the vehicle light control method described in Solution 9.

[0073] The above one or more technical solutions of the present application have at least one or more of the following beneficial effects:

[0074] In a technical solution for implementing the ambient illumination perception method provided in the present application, an ambient image and camera configuration information captured by a camera on a smart device can be obtained, where the ambient image is an image of the environment where the smart device is located, and the camera configuration information is the configuration information when the camera captures the ambient image; the pixel value of each pixel in the ambient image is obtained; a fitting function is obtained, where the fitting function is used to represent the correspondence between the pixel value of the pixel in the image and the configuration information and light intensity when the camera captures the image; the pixel value of each pixel in the ambient image and the camera configuration information are used as input quantities of the fitting function, and the light intensity corresponding to each pixel is obtained through the fitting function; and based on the light intensity, the ambient illumination of the environment where the smart device is located is obtained.

[0075] The above implementation scheme can use the environmental image captured by the camera to perceive the environmental illumination of the environment where the smart device is located. Since the environmental brightness presented by the environmental image can truly reflect the scene brightness seen by the human eye, the environmental illumination can also truly reflect the scene brightness seen by the human eye, overcoming the defect of the prior art that when using a light sensor to detect environmental illumination, the detection result cannot truly reflect the scene brightness seen by the human eye. In addition, the above implementation scheme can use the correspondence between pixel values, configuration information when the camera captures images, and light intensity to accurately obtain the light intensity corresponding to each pixel in the environmental image, thereby improving the accuracy of the environmental illumination.

[0076] In a technical solution for implementing the vehicle light control method provided by the present application, the above-mentioned environmental illumination perception method can be used to obtain the environmental illumination of the environment where the smart device is located, the smart device is a vehicle, the vehicle is provided with a camera and vehicle lights, and the vehicle lights include headlights; the state of the vehicle lights is controlled according to the environmental illumination. The environmental illumination obtained by the above-mentioned environmental illumination perception method can truly reflect the brightness of the scene seen by the human eye, and based on this, the control of turning the vehicle lights on or off can also better meet the actual needs of the vehicle driver, thereby improving the safety of the driver when driving the vehicle. BRIEF DESCRIPTION OF THE DRAWINGS

[0077] The disclosure of the present application will become easier to understand with reference to the accompanying drawings. It is easy for those skilled in the art to understand that these drawings are only for illustrative purposes and are not intended to limit the scope of protection of the present application. Among them:

[0078] Figure 1 is a flow chart of main steps of an ambient illumination perception method according to an embodiment of the present application;

[0079] Figure 2 This is a flow chart of the main steps of obtaining the ambient illumination of the environment where the smart device is located according to the light intensity corresponding to the pixel point according to an embodiment of the present application;

[0080] Figure 3 is a schematic diagram of a first field of view, a sub-range, and a second field of view of a camera of a vehicle driver according to an embodiment of the present application;

[0081] Figure 4 This is a schematic diagram of the main steps of a vehicle light control method according to an embodiment of the present application. Figure 1 ;

[0082] Figure 5 This is a schematic diagram of the main steps of a vehicle light control method according to an embodiment of the present application. Figure 2 ;

[0083] Figure 6It is a schematic diagram of the main structure of a smart device according to an embodiment of the present application.

[0084] Reference numerals:

[0085] 11: memory; 12: processor. DETAILED DESCRIPTION

[0086] Some embodiments of the present application are described below with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are only used to explain the technical principles of the present application and are not intended to limit the protection scope of the present application.

[0087] In the description of this application, "processor" may include hardware, software or a combination of the two. The processor may be a central processing unit, a microprocessor, an image processor, a digital signal processor or any other suitable processor. The processor has data and / or signal processing functions. The processor may be implemented in software, hardware or a combination of the two. Computer-readable storage media include any suitable medium that can store program code, such as a disk, a hard disk, an optical disk, a flash memory, a read-only memory, a random access memory, etc.

[0088] The relevant user personal information that may be involved in the various embodiments of this application is strictly in accordance with the requirements of laws and regulations, following the principles of legality, legitimacy and necessity, based on the reasonable purposes of business scenarios, to process the personal information that users actively provide during the use of products / services or generated due to the use of products / services, as well as the personal information obtained with the user's authorization.

[0089] The user personal information processed by this application will vary depending on the specific product / service scenario, and shall be based on the specific scenario in which the user uses the product / service, and may involve the user's account information, device information, driving information, vehicle information or other related information. This application will treat the user's personal information and its processing with a high degree of diligence.

[0090] This application attaches great importance to the security of user personal information and has taken reasonable and feasible security protection measures that meet industry standards to protect user information and prevent personal information from being accessed, disclosed, used, modified, damaged or lost without authorization.

[0091] The following is a description of an embodiment of the ambient illumination perception method provided in the present application.

[0092] See attached Figure 1 , Figure 1 FIG. 1 is a flow chart of the main steps of the ambient illumination perception method according to an embodiment of the present application. Figure 1 As shown, the ambient illumination perception method in the embodiment of the present application mainly includes the following steps S101 to S105.

[0093] Step S101: Acquire the environment image and camera configuration information collected by the camera on the smart device. The smart device may include driving devices, smart cars, robots and other devices.

[0094] The camera is set outside the smart device, and the environment image is an image of the environment where the smart device is located captured by the camera.

[0095] The camera configuration information is the configuration information when the camera collects the environment image. The configuration information can be understood as the value of the camera parameter. Before using the camera to collect the image, the value of the camera parameter must be set before collecting the image. When collecting images under the same illumination intensity (illumination), the values ​​of the camera parameters are different, and the pixel values ​​of the pixels at the same position in the image will also be different, that is, the values ​​of the camera parameters will affect the size of the pixel value. In some embodiments, the configuration information may include the camera exposure time (time of exposure) and gain. Among them, the greater the camera exposure time, the greater the image brightness, and the greater the pixel value; the greater the gain, the greater the image brightness, and the greater the pixel value. The gain may include at least one of an analog gain and a digital gain. The analog gain is the gain for amplifying the analog signal, and the digital gain is the gain for amplifying the digital signal.

[0096] Step S102: Obtain the pixel value of each pixel in the environment image.

[0097] Step S103: obtaining a fitting function, where the fitting function is used to represent the corresponding relationship between the pixel value of a pixel point in the image and the configuration information and light intensity when the camera acquires the image.

[0098] When collecting images under different light intensities, the pixel values ​​of pixels at the same position in the image are also different, that is, the size of the light intensity will affect the size of the pixel value. Specifically, the greater the light intensity, the greater the image brightness, and the greater the pixel value of the pixel in the image. Conversely, the smaller the image brightness, the smaller the pixel value of the pixel in the image.

[0099] According to the aforementioned step S101, it can be known that the configuration information of the camera when acquiring an image will also affect the size of the pixel value, that is, the pixel value is affected by both the light intensity and the camera configuration information, and the fitting function represents the correspondence between the light intensity, the camera configuration information and the pixel value, and does not regard the light intensity and the camera configuration information as a whole. In this way, the influence of the light intensity on the pixel value can be accurately reflected, so that when the camera configuration information and the pixel value are known, the light intensity when the image is acquired can be accurately obtained.

[0100] In this embodiment, a camera can be used to capture images of the same scene under different light intensities to obtain scene images, and the camera configuration information when capturing different scene images is different. Then, the scene information of each scene image is obtained, and the scene information includes the light intensity when capturing the scene image, the pixel value of each pixel in the scene image, and the camera configuration information when capturing the scene image. Finally, with the light intensity as the dependent variable and the pixel value and the camera configuration information as the independent variables, a function is fitted to the scene information of all scene images to obtain a fitting function. In some embodiments, a polynomial fitting can be performed on the scene information to obtain a fitting function. It should be noted that the fitting function is pre-fitted, and when the fitting function needs to be used, there is no need to first obtain the fitting function in the above manner, and the pre-fitted fitting function can be directly called.

[0101] Step S104: taking the pixel value of each pixel point in the environment image and the camera configuration information as input quantities of the fitting function, and obtaining the light intensity corresponding to each pixel point through the fitting function.

[0102] In the fitting function, the independent variables are the pixel value and the camera configuration information, and the dependent variable is the light intensity. The independent variable is also the input of the fitting function. Therefore, the pixel value and the camera configuration information are used as the input of the fitting function, that is, the pixel value and the camera configuration information are substituted into the independent variables in the fitting function to obtain the value of the dependent variable, that is, the light intensity.

[0103] Step S105: According to the light intensity, the ambient illumination of the environment where the smart device is located is obtained. Specifically, the light intensity corresponding to the pixel point can be used as the ambient illumination of the environment. In some embodiments, the average value of the light intensity corresponding to all pixels can be obtained and used as the ambient illumination.

[0104] The ambient brightness presented by the ambient image can truly reflect the scene brightness seen by the human eye. Therefore, the ambient illumination obtained through the above steps S101 to S105 can also truly reflect the scene brightness seen by the human eye, overcoming the defect that the detection result of the prior art cannot truly reflect the scene brightness seen by the human eye when the ambient illumination is detected by the light sensor. In addition, the light intensity corresponding to each pixel in the ambient image can be obtained conveniently and accurately by using the fitting function, thereby improving the convenience and accuracy of the ambient illumination.

[0105] The following is a description of an embodiment of the ambient illumination perception method.

[0106] In some implementations of the above step S105, the smart device is a vehicle. In order to accurately obtain the ambient illumination within the driver's field of view and ensure the driver's driving safety, the smart device can be used to Figure 2The following steps S1051 to S1052 are shown to obtain the ambient illumination.

[0107] Step S1051: Determine a first field of view of the vehicle driver according to the height of the vehicle.

[0108] The first field of view is the range in front of the vehicle that the driver sees with his eyes, that is, the first field of view is the field of view of humans. The field of view of humans includes the range in the horizontal direction and the range in the vertical direction. The field of view in the horizontal direction is usually in the range of 0 to 180°. The eye height of the driver in the vehicle can be estimated according to the height of the vehicle, and the field of view in the vertical direction can be obtained according to the eye height. In some embodiments, the field of view in the vertical direction includes a first angle vertically upward and a second angle vertically downward. After determining the eye height of the driver, the range of the first angle vertically upward from the eye height and the range of the second angle vertically downward from the eye height are obtained. These two ranges together constitute the field of view of the driver in the vertical direction. For example, the first angle is 60° and the second angle is 75°.

[0109] In some embodiments, when estimating the eye height of the driver in the vehicle based on the height of the vehicle, the difference between the height of the vehicle and the preset height deviation can be obtained, and the difference is used as the eye height of the driver. Those skilled in the art can obtain the height of the vehicle when it is fully loaded and unloaded, respectively, and obtain the average of the two heights as a preset parameter for estimating the height of the vehicle when the first range of vision is used. The preset height deviation can represent the deviation between the roof and the driver's eyes. When setting the value of the preset height deviation, those skilled in the art can obtain the deviation between the eyes and the roof of a large number of different drivers when they are in the car, and then obtain the average of all deviations, and set this average as the value of the preset height deviation.

[0110] Step S1052: Obtain pixel points in the environment image that are within the first field of view, and obtain the environment illumination of the first field of view according to the light intensity corresponding to the pixel points.

[0111] Specifically, an average value of the light intensities corresponding to all the pixels within the first field of view may be obtained, and the average value may be used as the ambient illumination of the first field of view.

[0112] Based on the method described in steps S1051 to S1052 above, the ambient illumination within the field of view of the vehicle driver can be accurately obtained, which is more in line with the driver's actual perception of the ambient brightness. Controlling the vehicle based on the ambient illumination (such as controlling the headlights to turn on or off) is more conducive to the safety of the driver driving the vehicle.

[0113] The following is a description of an embodiment of the ambient illumination perception method.

[0114] In some implementations of the above step S1052, the smart device is still a vehicle, but the vehicle is provided with multiple cameras, such as cameras on the front and both sides of the vehicle body. In this case, the ambient illumination within the first field of view of the driver can be obtained through the following steps 11 to 14.

[0115] Step 11: Divide the first viewing range into multiple sub-ranges.

[0116] The first field of view range can be understood as a ROI (Region of Interest) area, and the sub-range can be understood as a partition of the ROI area, that is, a ROI partition. In some embodiments, the first field of view range can be evenly divided into multiple sub-ranges.

[0117] See attached Figure 3 The vehicle is equipped with three cameras ( Figure 3 In the example of camera 1, camera 2, and camera 3, the first field of view is exemplarily represented by a rectangle, and the first field of view is evenly divided into a plurality of sub-ranges.

[0118] Step 12: For each camera, obtain the target pixel point located in the target sub-range in the environmental image captured by the camera, the target sub-range is the sub-range covered by the second field of view of the camera among multiple sub-ranges, and obtain the ambient illumination of the target sub-range according to the light intensity corresponding to the target pixel point, and the ambient illumination is used as an initial ambient illumination of the target sub-range.

[0119] The second field of view is the range of scenes that the camera can capture when acquiring images.

[0120] For a sub-range, if the second field of view of a camera covers the sub-range, then an initial ambient illumination can be obtained using the ambient image captured by the camera; if the second fields of view of multiple cameras cover the sub-range, then an initial ambient illumination can be obtained using the ambient image captured by each camera, so there will be multiple initial ambient illuminations. In some embodiments, the sub-range being covered by the second field of view can be understood as the entire area of ​​the sub-range being within the second field of view.

[0121] See again the attached Figure 3 , the second fields of view of camera 1 and camera 2 overlap, so their second fields of view may cover the same sub-range. According to the environmental images captured by camera 1 and camera 2, an initial environmental illumination of this sub-range can be obtained respectively, and finally this sub-range will have two initial environmental illuminations.

[0122] In addition, the second field of view of a camera may not cover the entire first field of view of the vehicle driver, but the second field of view of multiple cameras combined can cover as much of the first field of view of the vehicle driver as possible, so that the ambient illumination obtained by using multiple cameras will be more accurate. Figure 3 As shown, camera 1, camera 2, and camera 3 cannot cover the entire first field of view individually, but the second fields of view of these three cameras combined can cover the entire first field of view.

[0123] Step 13: For each sub-range, if the initial ambient illumination of the sub-range is one, the initial ambient illumination is used as the final ambient illumination; if the initial ambient illumination of the sub-range is multiple, the first average of the multiple initial ambient illuminations is used as the final ambient illumination.

[0124] When there is only one initial ambient illumination of the sub-range, this initial ambient illumination is used as the final ambient illumination of the sub-range; when there are multiple initial ambient illuminations of the sub-range, the average value of these initial ambient illuminations (i.e., the first mean) is obtained, and this average value is used as the final ambient illumination of the sub-range. Since each initial ambient illumination is obtained from an ambient image captured by a different camera, this average value is equivalent to the fusion of the ambient illuminations obtained by multiple cameras, and this average value can more accurately reflect the ambient illumination of the sub-range.

[0125] Step 14: Obtain the ambient illumination of the first field of view according to the final ambient illumination of all sub-ranges.

[0126] Specifically, the weighted average value of the final ambient illumination of all sub-ranges (hereinafter referred to as the third mean value) may be obtained, and the ambient illumination of the first field of view range may be obtained according to the third mean value. For example, the third mean value may be used as the ambient illumination of the first field of view range.

[0127] When obtaining the weighted average, the weight of each sub-range can be obtained, and then the weight of each sub-range and the final ambient illuminance are weighted and calculated to obtain the weighted average. For example, if there are 4 sub-ranges, the final ambient illuminances of the 4 sub-ranges are lux1, lux2, lux3, and lux4, and the weights of the 4 sub-ranges are w1, w2, w3, and w4, respectively, the weighted average is Lux = lux1×w1+lux2×w2+lux3×w3+lux4×w4.

[0128] When setting the weight of a sub-range, it can be set according to the distance between the sub-range and the vehicle driving position. The smaller the distance, the more likely the sub-range is to be directly in front of the vehicle driver, and the greater the impact of the ambient illumination of this sub-range on the vehicle driver. Therefore, a larger weight can be set for this sub-range; otherwise, a smaller weight can be set for this sub-range. In some embodiments, the weights of all sub-ranges can also be the same. For example, if the number of sub-ranges is N, the weights of all sub-ranges can be 1 / N.

[0129] Based on the methods described in steps 11 to 14 above, when multiple cameras are installed on the vehicle, the multiple cameras can be used to obtain the ambient illumination of the entire first field of view as much as possible, and the fusion processing of the results of multiple cameras is achieved by obtaining the first mean and the third mean, which can significantly improve the accuracy of the ambient illumination.

[0130] In an implementation of the above step 12, the ambient illumination of the target sub-range can be obtained according to the light intensity corresponding to the target pixel point through the following steps 121 to 124.

[0131] Step 121: Obtain a second mean value of the illumination intensity corresponding to all target pixels.

[0132] For a target sub-range, all target pixel points located in the target sub-range are obtained, and then the light intensities corresponding to the pixel values ​​of all target pixel points are obtained, and the average values ​​of these light intensities are calculated to obtain a second mean value.

[0133] Step 122: Obtain the deviation between the illumination intensity corresponding to the target pixel and the second mean value, and determine the weight of the target pixel according to the deviation.

[0134] If the deviation of a target pixel is larger, it means that the difference between the light intensity corresponding to the target pixel and the ambient illumination of the entire target sub-range is larger, and the light intensity corresponding to the target pixel is less likely to be generated by a natural light source in the environment (such as the sun), that is, the credibility is lower; conversely, it means that the difference between the light intensity corresponding to the target pixel and the ambient illumination of the entire target sub-range is smaller, and the light intensity corresponding to the target pixel is more likely to be generated by a natural light source in the environment, that is, the credibility is higher.

[0135] If the credibility of a target pixel is low, a lower weight can be set for the target pixel; if the credibility of a target pixel is high, a higher weight can be set for the target pixel. In other words, the size of the weight can represent the credibility of the light intensity corresponding to a target pixel. The deviation between the light intensity corresponding to the target pixel and the second mean can represent the credibility of the target pixel. Therefore, the weight can be set according to the size of the deviation. If the deviation is relatively large, a lower weight can be set; if the deviation is relatively small, a larger weight can be set.

[0136] In some embodiments, the weight of the target pixel can be determined based on the deviation in the following manner: if the deviation is greater than or equal to the deviation threshold, it indicates that the deviation is relatively large, and therefore, the weight of the target pixel is set to 0; if the deviation is less than the deviation threshold, it indicates that the deviation is relatively small, and therefore, the weight of the target pixel is set to 1.

[0137] When setting the value of the deviation threshold, a person skilled in the art can use a camera to capture an environmental image in an environment with both natural light sources and non-natural light sources (such as lights), and obtain the light intensity corresponding to each pixel in the environmental image through the method described in the aforementioned steps S101 to S104, calculate the average value of the light intensity corresponding to all pixels, and use this average value as the first light intensity. In addition, a light area in the environmental image can be identified by a computer device, and then the light intensity corresponding to each pixel in the light area is obtained, and the average value of the light intensity corresponding to all pixels is calculated, and this average value is used as the second light intensity to obtain the difference between the first light intensity and the second light intensity. Through the above method, a large number of environmental images can be obtained, and a difference can be obtained using each environmental image, and finally the average value of all differences is obtained, and the value of the deviation threshold is set according to this average value. For example, this average value can be used as the value of the deviation threshold.

[0138] Step 123: Obtain the effective light intensity corresponding to the target pixel point according to the product of the light intensity corresponding to the target pixel point and the weight.

[0139] Step 124: Obtain the ambient illumination of the target sub-range according to the effective illumination intensity corresponding to each target pixel point in the target sub-range.

[0140] Specifically, the average value of the effective light intensity corresponding to all target pixels in the target sub-range may be obtained, and the ambient illumination of the target sub-range may be obtained based on the average value. For example, the average value is used as the ambient illumination of the target sub-range.

[0141] Based on the method described in steps 121 to 124 above, the interference of non-natural light sources on ambient illumination can be reduced, thereby improving the accuracy of ambient illumination.

[0142] The following is a description of an embodiment of the vehicle light control method provided in the present application.

[0143] See attached Figure 4 , Figure 4 FIG. 1 is a flow chart of the main steps of a vehicle light control method according to an embodiment of the present application. Figure 4 As shown, the ambient illumination perception method in the embodiment of the present application mainly includes the following steps S201 to S202.

[0144] Step S201: using an ambient illumination perception method to obtain the ambient illumination of the environment where the smart device is located.

[0145] The smart device is a vehicle, and the vehicle is provided with a camera and a headlight, and the headlight includes a headlight. The ambient illumination sensing method may be the ambient illumination sensing method described in the aforementioned method embodiment. The number of cameras may be one or more, and when there is one camera, the camera may be a forward-looking camera, and when there are multiple cameras, the camera may include a forward-looking camera, cameras provided on both sides of the vehicle body, and the like.

[0146] Step S202: Control the state of the vehicle lights according to the ambient illumination.

[0147] Specifically, if the ambient illumination is relatively low, it means that the light is relatively dim for the vehicle driver, and the headlights can be turned on at this time; if the ambient illumination is relatively high, it means that the light is relatively bright for the vehicle driver, and the headlights can be turned off at this time.

[0148] For example, when the ambient illumination is low, the headlights are turned on to illuminate the environment in front of the vehicle, so that the driver can see the environment in front clearly and drive safely; for another example, turning on the taillights at the rear of the vehicle helps the driver of the rear vehicle (the vehicle behind the current vehicle) to clearly see the position of the current vehicle, so as to control the distance between them and the current vehicle and improve driving safety. Similarly, when the ambient illumination is high, the headlights or taillights can be turned off.

[0149] In some embodiments, an illumination threshold may be set. If the ambient illumination is less than the illumination threshold, it indicates that the ambient illumination is relatively low and the headlights may be turned on. If the ambient illumination is greater than or equal to the illumination threshold, it indicates that the ambient illumination is relatively high and the headlights may be turned off. When setting the value of the illumination threshold, a person skilled in the art may obtain the ambient illumination when a large number of different drivers turn on the headlights, obtain the average value or maximum value of these ambient illuminations, and set the value of the illumination threshold according to the average value or maximum value. For example, the maximum value is set as the value of the illumination threshold.

[0150] In the method described in the above steps S201 to S202, the ambient illumination can truly reflect the brightness of the scene seen by the human eye. Based on this, controlling the turning on or off of the car lights can also better meet the actual needs of the vehicle driver, thereby improving the driver's safety when driving the vehicle.

[0151] The following is combined with Figure 5 , an embodiment of the vehicle light control method provided by the present application is described. Figure 5 As shown, the vehicle is equipped with three cameras ( Figure 5 Camera 1, camera 2, camera 3), camera 2 is a forward-looking camera arranged at the front of the vehicle, and camera 1 and camera 3 are arranged at both sides of the vehicle body respectively. In this embodiment, the headlights of the vehicle can be controlled through the following steps S301 to S303.

[0152] Step S301: Illumination statistics.

[0153] Specifically, the method described in steps 11 to 12 in the above-mentioned embodiment of the ambient illumination perception method is adopted to obtain the initial ambient illumination of the target sub-range covered by the second field of view of each camera for cameras 1 to 3 respectively.

[0154] Step S302: multi-view illumination fusion.

[0155] Specifically, the ambient illumination of the first field of view is acquired by adopting the method described in steps 13 to 14 in the aforementioned ambient illumination perception method embodiment.

[0156] Step S303: determine the ambient illumination.

[0157] Specifically, the method described in step S202 of the aforementioned vehicle light control method is adopted to control the vehicle headlights to be turned on or off.

[0158] Based on the method described in steps S301 to S303 above, the vehicle headlights can be accurately controlled to turn on or off, meeting the actual needs of the vehicle driver, and improving the vehicle driving safety and the driver's driving experience.

[0159] It should be pointed out that although the various steps in the above embodiments are described in a specific order, those skilled in the art can understand that in order to achieve the effect of the present application, different steps do not have to be executed in such an order. They can be executed simultaneously (in parallel) or in other orders. These adjusted schemes are equivalent to the technical schemes described in this application, and therefore will also fall within the scope of protection of this application.

[0160] It is understood by those skilled in the art that all or part of the processes in the method for implementing the above-mentioned embodiment of the present application can also be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device, medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory, random access memory, electrical carrier signal, telecommunication signal and software distribution medium, etc. that can carry the computer program code.

[0161] Another aspect of the present application also provides a computer-readable storage medium.

[0162] In an embodiment of a computer-readable storage medium according to the present application, the computer-readable storage medium may be configured to store a program for executing the ambient illumination perception method or the vehicle light control method of the above method embodiment, and the program may be loaded and run by a processor to implement the above ambient illumination perception method or the vehicle light control method. For ease of explanation, only the parts related to the embodiment of the present application are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present application. The computer-readable storage medium may be a storage device formed by various electronic devices. Optionally, the computer-readable storage medium in the embodiment of the present application is a non-temporary computer-readable storage medium.

[0163] Another aspect of the present application also provides a smart device.

[0164] In an embodiment of an intelligent device according to the present application, the intelligent device may include at least one processor; and a memory connected to the at least one processor in communication; wherein a computer program is stored in the memory, and when the computer program is executed by the at least one processor, the method described in any of the above embodiments is implemented. Figure 6 , Figure 6 FIG. 4 exemplarily shows that the memory 11 and the processor 12 are communicatively connected via a bus.

[0165] In some embodiments of the present application, the smart device may further include at least one sensor for sensing information. The sensor is communicatively connected to any type of processor mentioned in the present application. Optionally, the smart device may further include an autonomous driving system for guiding the smart device to drive itself or assist in driving. The processor communicates with the sensor and / or the autonomous driving system to complete the method described in any of the above embodiments.

[0166] So far, the technical solution of the present application has been described in conjunction with an embodiment shown in the accompanying drawings, but it is easy for those skilled in the art to understand that the protection scope of the present application is obviously not limited to these specific embodiments. Without departing from the principles of the present application, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present application.

Claims

1. A method for sensing ambient illumination, characterized in that: The method comprises: Acquire an environment image and camera configuration information captured by a camera on a smart device, wherein the environment image is an image of the environment where the smart device is located, and the camera configuration information is configuration information when the camera captures the environment image; Obtaining a pixel value of each pixel in the environment image; Obtaining a fitting function, wherein the fitting function is used to represent a corresponding relationship between a pixel value of a pixel point in an image and configuration information and light intensity when a camera acquires the image; Using the pixel value of each pixel point and the camera configuration information as input quantities of the fitting function, and obtaining the light intensity corresponding to each pixel point through the fitting function; The ambient illumination of the environment where the smart device is located is obtained according to the light intensity.

2. The method according to claim 1, characterized in that The camera configuration information includes the exposure time and gain of the camera.

3. The method according to claim 1, characterized in that The smart device is a vehicle, and obtaining the ambient illumination of an environment where the smart device is located according to the light intensity includes: Determining a first visual field of the driver of the vehicle according to the height of the vehicle; Pixel points in the environment image that are within the first field of view are obtained, and the environment illumination of the first field of view is obtained according to the light intensity corresponding to the pixel points.

4. The method according to claim 3, characterized in that The smart device is provided with a plurality of cameras, and acquiring the ambient illumination of the first field of view according to the light intensity corresponding to the pixel point includes: Dividing the first visual field into a plurality of sub-ranges; For each camera, a target pixel point located in a target sub-range in an environment image captured by the camera is obtained, where the target sub-range is a sub-range covered by the second field of view of the camera among the multiple sub-ranges, and an ambient illumination of the target sub-range is obtained according to the light intensity corresponding to the target pixel point, and the ambient illumination is used as an initial ambient illumination of the target sub-range; For each sub-range, if the initial ambient illuminance of the sub-range is one, the initial ambient illuminance is used as the final ambient illuminance; if the initial ambient illuminance of the sub-range is multiple, the first average of the multiple initial ambient illuminances is used as the final ambient illuminance; The ambient illumination of the first field of view is acquired according to the final ambient illumination of all sub-ranges.

5. The method according to claim 4, characterized in that The step of obtaining the ambient illumination of the target sub-range according to the illumination intensity corresponding to the target pixel point includes: Obtain the second mean value of the light intensity corresponding to all target pixels; Obtaining a deviation between the light intensity corresponding to the target pixel and the second mean value, and determining a weight of the target pixel according to the deviation; Obtaining an effective light intensity corresponding to the target pixel point according to the product of the light intensity corresponding to the target pixel point and the weight; The ambient illumination of the target sub-range is obtained according to the effective light intensity corresponding to each target pixel point in the target sub-range.

6. The method according to claim 5, characterized in that The step of determining the weight of the target pixel point according to the deviation comprises: If the deviation is greater than or equal to the deviation threshold, the weight of the target pixel is 0; If the deviation is less than the deviation threshold, the weight of the target pixel is 1.

7. The method according to claim 4, characterized in that The acquiring the ambient illumination of the first field of view according to the final ambient illumination of all sub-ranges includes: Obtaining the third average of the final ambient illumination of all sub-ranges; The ambient illumination of the first field of view is obtained according to the third mean value.

8. The method according to claim 4, characterized in that The step of dividing the first visual field into a plurality of sub-fields includes: The first visual field range is evenly divided into a plurality of sub-ranges.

9. A vehicle light control method, characterized in that: The method comprises: The ambient illumination perception method according to any one of claims 1 to 8 is used to obtain the ambient illumination of the environment where the smart device is located, wherein the smart device is a vehicle, and the vehicle is provided with a camera and a headlight, and the headlight includes a headlight; The state of the vehicle light is controlled according to the ambient illumination.

10. A smart device, characterized in that: include: at least one processor; and, a memory communicatively coupled to the at least one processor; Wherein, a computer program is stored in the memory, and when the computer program is executed by the at least one processor, the ambient illumination perception method described in any one of claims 1 to 8, or the vehicle light control method described in claim 9 is implemented.

Citation Information

Patent Citations

  • Zero-illuminance environment smoke monitoring method based on infrared video gray scale image

    CN105718881A

  • Power lighting intelligent control method and system

    CN115835459A

  • Camera imaging optimization method and system based on complex illumination environment

    CN116156333A

  • Aerial photography type road illumination uniformity inspection method and device

    CN117037007A

  • Method and device for detecting ambient light illuminance in vehicle

    CN117073834A