Ambient illumination sensing method, vehicle light control method, intelligent device, and medium

By acquiring camera images and configuration information from smart devices, calculating light intensity using a fitting function, and combining the field of view and weights of multiple cameras, the problem of light sensors failing to accurately reflect scene brightness is solved. This enables accurate perception of ambient illuminance and precise control of vehicle lights, improving driving safety and experience.

CN119550987BActive Publication Date: 2026-04-10安徽蔚来智驾科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
安徽蔚来智驾科技有限公司
Filing Date
2024-11-22
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing light sensors cannot accurately reflect the brightness of the scene as seen by the human eye, resulting in inaccurate control of vehicle headlights and affecting the driving experience.

Method used

By acquiring camera images and configuration information from smart devices, the system calculates light intensity using a fitting function, and combines the field of view and weights of multiple cameras to accurately obtain ambient illuminance and control the vehicle's headlight status.

Benefits of technology

It achieves accurate perception of ambient light, improves the driving safety and experience for vehicle drivers, and makes the headlight control more in line with actual needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119550987B_ABST
    Figure CN119550987B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of image processing, and particularly provides an environment illumination perception method, a vehicle lamp control method, an intelligent device and a medium, and aims to solve the problem of accurately obtaining environment illumination. To achieve the purpose, the method provided by the application comprises the following steps: obtaining an environment image collected by a camera on an intelligent device and camera configuration information, and obtaining pixel values of each pixel point in the environment image; obtaining a fitting function, the fitting function being used for representing the corresponding relationship between the pixel value of the pixel point in the image and the configuration information and the 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 input quantities of the fitting function, and obtaining the illumination intensity corresponding to each pixel point through the fitting function; and obtaining the environment illumination of an environment where the intelligent device is located according to the illumination intensity. Through the above method, the environment illumination can truly reflect the scene brightness seen by the human eye, and the accuracy of the environment illumination is significantly improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, in particular to an environment illumination perception method, a vehicle lamp control method, an intelligent device and a medium. BACKGROUND

[0002] A vehicle is provided with front lamps on both sides of the head, which can be turned on for illumination when the light is dim, helping the vehicle to travel safely. Some vehicles have an automatic vehicle lamp control function, and a light sensor is usually arranged on the vehicle. The function detects the environment illumination of the environment where the vehicle is located by using the light sensor, and automatically controls the front lamp to be turned on if the environment illumination is low. However, the existing light sensor is limited by resolution and detection accuracy, and cannot truly reflect the scene brightness seen by the human eye. It is possible that the light sensor detects that the environment illumination is high, but the scene seen by the human eye is already relatively dark, and the front lamp needs to be turned on for illumination. However, the front lamp is not automatically turned on because the light sensor detects that the environment illumination is high, which affects the user's driving experience.

[0003] Correspondingly, there is a need in the art for a new technical solution to solve the above problems. SUMMARY

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

[0005] In a first aspect, an environment illumination perception method is provided, the method comprising:

[0006] obtaining an environment image collected by a camera on an intelligent device and camera configuration information, the environment image being an image of an environment where the intelligent device is located, and the camera configuration information being configuration information when the camera collects the environment image;

[0007] obtaining pixel values of each pixel point in the environment image;

[0008] obtaining a fitting function, the fitting function being used to represent a corresponding relationship between the pixel values of the pixel points in the image and the camera configuration information and the light intensity when the camera collects the image;

[0009] taking the pixel values of the pixel points and the camera configuration information as input quantities of the fitting function, and obtaining the light intensity corresponding to each pixel point by the fitting function;

[0010] obtaining the environment illumination of the environment where the intelligent device is located according to the light intensity.

[0011] In one technical solution of the above environment illumination perception method, the camera configuration information includes the exposure time and the gain of the camera.

[0012] In one of the above technical solutions of the environment illumination perception method, the intelligent device is a vehicle, and the environment illumination of the environment where the intelligent device is located is obtained according to the light intensity, including:

[0013] A first field of view range of the driver of the vehicle is determined according to the height of the vehicle;

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

[0015] In one of the above technical solutions of the environment illumination perception method, the intelligent device is provided with a plurality of cameras, and the environment illumination of the first field of view range is obtained according to the light intensity corresponding to the pixel points, including:

[0016] The first field of view range is divided into a plurality of sub-ranges;

[0017] For each camera, target pixel points in the environment image collected by the camera and located in a target sub-range are obtained, the target sub-range is a sub-range in the plurality of sub-ranges covered by the second field of view range of the camera, and the environment illumination of the target sub-range is obtained according to the light intensity corresponding to the target pixel points, and the environment illumination is taken as an initial environment illumination of the target sub-range;

[0018] For each sub-range, if the initial environment illumination of the sub-range is one, the initial environment illumination is taken as a final environment illumination; if the initial environment illumination of the sub-range is a plurality, a first average of the plurality of initial environment illuminations is taken as a final environment illumination;

[0019] The environment illumination of the first field of view range is obtained according to the final environment illuminations of all the sub-ranges.

[0020] In one of the above technical solutions of the environment illumination perception method, the environment illumination of the target sub-range is obtained according to the light intensity corresponding to the target pixel points, including:

[0021] A second average of the light intensities corresponding to all the target pixel points is obtained;

[0022] The deviation between the light intensity corresponding to the target pixel point and the second average is obtained, and the weight of the target pixel point is determined according to the deviation;

[0023] The effective light intensity corresponding to the target pixel point is obtained according to the product of the light intensity corresponding to the target pixel point and the weight;

[0024] According to the effective light intensity corresponding to each target pixel point in the target sub-range, the ambient illuminance of the target sub-range is obtained.

[0025] In one of the technical solutions of the ambient illuminance perception method, the weight of the target pixel point is determined according to the deviation, and the method comprises:

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

[0027] In one of the technical solutions of the ambient illuminance perception method, the ambient illuminance of the first field of view range is obtained according to the final ambient illuminance of all sub-ranges, and the method comprises:

[0028] A third mean value of the final ambient illuminance of all sub-ranges is obtained.

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

[0030] In one of the technical solutions of the ambient illuminance perception method, the first field of view range is divided into a plurality of sub-ranges, and the method comprises:

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

[0032] In a second aspect, a vehicle lamp control method is provided, and the method comprises:

[0033] The ambient illuminance of the environment where the intelligent device is located is obtained by using the ambient illuminance perception method provided in the first aspect, the intelligent device is a vehicle, the vehicle is provided with a camera and a vehicle lamp, and the vehicle lamp comprises a headlamp.

[0034] The state of the vehicle lamp is controlled according to the ambient illuminance.

[0035] In a third aspect, an intelligent device is provided, which comprises at least one processor, and a memory connected with the at least one processor in communication; wherein the memory stores a computer program, and the computer program is executed by the at least one processor to implement the method according to any one of the technical solutions in the first aspect or the second aspect.

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

[0037] Scheme 1. An ambient illuminance perception method, characterized in that the method comprises:

[0038] obtain an environment image and camera configuration information, the environment image being an image of an environment where the intelligent device is located, the camera configuration information being configuration information when the camera collects the environment image;

[0039] obtain pixel values of each pixel point in the environment image;

[0040] obtain a fitting function, the fitting function being used to represent a corresponding relationship between a pixel value of a pixel point in an image and configuration information and an illumination intensity when the camera collects the image;

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

[0042] obtain an ambient illuminance of the environment where the intelligent device is located according to the illumination intensity.

[0043] Scheme 2. The method according to scheme 1, characterized in that the camera configuration information includes an exposure time and a gain of the camera.

[0044] Scheme 3. The method according to scheme 1, characterized in that the intelligent device is a vehicle, and the obtaining of the ambient illuminance of the environment where the intelligent device is located according to the illumination intensity comprises:

[0045] determining a first field of view range of a driver of the vehicle according to the height of the vehicle;

[0046] obtaining pixel points in the environment image within the first field of view range, and obtaining an ambient illuminance of the first field of view range according to the illumination intensity corresponding to the pixel points.

[0047] Scheme 4. The method according to scheme 3, characterized in that the intelligent device is provided with a plurality of cameras, and the obtaining of the ambient illuminance of the first field of view range according to the illumination intensity corresponding to the pixel points comprises:

[0048] dividing the first field of view range into a plurality of sub-ranges;

[0049] for each camera, obtaining target pixel points in an environment image collected by the camera and located in a target sub-range, the target sub-range being a sub-range in the plurality of sub-ranges that is covered by a second field of view range of the camera, and obtaining an ambient illuminance of the target sub-range according to the illumination intensity corresponding to the target pixel points, and the ambient illuminance being an initial ambient illuminance 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 taken as the final ambient illuminance; if the initial ambient illuminance of the sub-range is multiple, the first mean value of the multiple initial ambient illuminances is taken as the final ambient illuminance;

[0051] According to the final ambient illuminance of all sub-ranges, the ambient illuminance of the first field of view range is obtained.

[0052] Scheme 5. The method according to scheme 4, characterized in that, the ambient illuminance of the target sub-range is obtained according to the light intensity corresponding to the target pixel point, comprising:

[0053] The second mean value of the light intensity corresponding to all target pixel points is obtained.

[0054] The deviation between the light intensity corresponding to the target pixel point and the second mean value is obtained, and the weight of the target pixel point is determined according to the deviation.

[0055] The effective light intensity corresponding to the target pixel point is obtained according to the product of the light intensity corresponding to the target pixel point and the weight.

[0056] The ambient illuminance 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] Scheme 6. The method according to scheme 5, characterized in that, the weight of the target pixel point is determined according to the deviation, comprising:

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

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

[0060] Scheme 7. The method according to scheme 4, characterized in that, the ambient illuminance of the first field of view range is obtained according to the final ambient illuminance of all sub-ranges, comprising:

[0061] The third mean value of the final ambient illuminance of all sub-ranges is obtained.

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

[0063] Scheme 8. The method according to scheme 4, characterized in that, the first field of view range is divided into multiple sub-ranges, comprising:

[0064] The first field of view range is uniformly divided into multiple sub-ranges.

[0065] Scheme 9. A vehicle lamp control method, the method comprising:

[0066] The ambient illuminance of the environment in which the intelligent device is located is obtained by using the ambient illuminance sensing method in any one of schemes 1 to 8, the intelligent device is a vehicle, the vehicle is provided with a camera and a vehicle lamp, and the vehicle lamp includes a headlamp.

[0067] The state of the vehicle lamp is controlled according to the ambient illuminance.

[0068] Scheme 10. An intelligent device, comprising:

[0069] at least one processor;

[0070] and a memory in communication connection with the at least one processor;

[0071] wherein the memory stores a computer program, and the computer program is executed by the at least one processor to implement the ambient illuminance sensing method in any one of schemes 1 to 8 or the vehicle lamp control method in scheme 9.

[0072] Scheme 11. A computer readable storage medium, wherein a plurality of program codes are stored, the program codes being adapted to be loaded and run by a processor to execute the ambient illuminance sensing method in any one of schemes 1 to 8 or the vehicle lamp control method in scheme 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 one technical solution of the ambient illuminance sensing method provided in the present application, the environment image collected by the camera on the intelligent device and the camera configuration information are obtained, the environment image is an image of the environment in which the intelligent device is located, and the camera configuration information is configuration information when the camera collects the environment image; the pixel value of each pixel point in the environment image is obtained; a fitting function is obtained, the fitting function is used to represent the corresponding relationship between the pixel value of the pixel point in the image and the configuration information and the illumination intensity when the camera collects the image; the pixel value of each pixel point in the environment image and the camera configuration information are taken as the input quantity of the fitting function, and the illumination intensity corresponding to each pixel point is obtained through the fitting function; and the ambient illuminance of the environment in which the intelligent device is located is obtained according to the illumination intensity.

[0075] The environment illumination of the environment where the smart device is located can be perceived by the camera-acquired environment image according to the above embodiment. Since the brightness of the environment presented by the environment image can truly reflect the brightness of the scene seen by the human eye, the environment illumination can also truly reflect the brightness of the scene seen by the human eye, overcoming the defect that the detection result cannot truly reflect the brightness of the scene seen by the human eye when the prior art uses the light sensor to detect the environment illumination. In addition, the above embodiment can accurately obtain the light intensity corresponding to each pixel point in the environment image by using the correspondence between the pixel value, the configuration information when the camera acquires the image, and the light intensity, thereby improving the accuracy of the environment illumination.

[0076] In one technical solution of the vehicle lamp control method provided in the present application, the environment illumination of the environment where the smart device is located can be obtained by using the above environment illumination perception method. The smart device is a vehicle, and the vehicle is provided with a camera and a vehicle lamp, and the vehicle lamp includes a headlamp. The state of the vehicle lamp is controlled according to the environment illumination. The environment illumination obtained by using the above environment illumination perception method can truly reflect the brightness of the scene seen by the human eye, and based on this, the control of the opening or closing of the vehicle lamp can also be more in line with the actual needs of the driver of the vehicle, thereby improving the safety of the driver when driving the vehicle. BRIEF DESCRIPTION OF DRAWINGS

[0077] The disclosure of the present application will become more apparent from the following description in conjunction with the accompanying drawings. It is readily understood by those skilled in the art that the drawings are merely intended to illustrate the present application and are not intended to limit the scope of protection of the present application. Among them:

[0078] Figure 1 is a main step flow diagram of an environment illumination perception method according to one embodiment of the present application;

[0079] Figure 2 is a main step flow diagram of obtaining the environment illumination of the environment where the smart device is located according to the light intensity corresponding to the pixel point according to one embodiment of the present application;

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

[0081] Figure 4 is a main step flow diagram of a vehicle lamp control method according to one embodiment of the present application Figure 1 ;

[0082] Figure 5 is a main step flow diagram of a vehicle lamp control method according to one embodiment of the present application Figure 2 ;

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

[0084] Reference signs:

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

[0086] Some embodiments of the present application will be described below with reference to the accompanying drawings. Those skilled in the art will 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 the present application, the "processor" can include hardware, software or a combination of both. The processor can be a central processor, 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 can be implemented in a software manner, a hardware manner or a combination of both. The computer-readable storage medium includes any suitable medium that can store program codes, such as a magnetic disk, a hard disk, an optical disk, a flash memory, a read-only memory, a random access memory and the like.

[0088] The related user personal information that can be involved in the embodiments of the present application is strictly in accordance with the requirements of laws and regulations, follows the principles of legality, legitimacy and necessity, is based on the reasonable purpose of the business scene, and processes the personal information of the user that is actively provided by the user in the process of using the product / service or generated due to the use of the product / service, and authorized by the user.

[0089] The user personal information processed by the present application will be different due to the specific product / service scene, and the specific scene of the user using the product / service should be used as the reference, which can involve the user's account information, device information, driving information, vehicle information or other related information. The present application will treat the user's personal information and its processing with high diligence and obligation.

[0090] The present application attaches great importance to the security of user personal information, and has taken security protection measures in accordance with industry standards, which are reasonable and feasible to protect the user's information and prevent unauthorized access, public disclosure, use, modification, damage or loss of personal information.

[0091] The embodiments of the ambient illuminance perception method provided by the present application will be described below.

[0092] Referring to the accompanying Figure 1 , Figure 1 is a main step flow schematic diagram of an ambient illuminance perception method according to an embodiment of the present application. As shown in Figure 1 , the ambient illuminance perception method in the embodiments of the present application mainly includes the following steps S101 to S105.

[0093] Step S101: Obtain the environment image captured by the camera on the intelligent device and the camera configuration information. The intelligent device can include a driving device, a smart car, a robot, and the like.

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

[0095] The camera configuration information is configuration information when the camera captures the environment image. The configuration information can be understood as a value of the camera parameter. Before using the camera to capture the image, the value of the camera parameter is set first, and then the image is captured. When the image is captured under the same illumination, the value of the camera parameter is different, and the pixel value of the pixel point at the same position in the image is also different, that is, the value of the camera parameter will affect the size of the pixel value. In some embodiments, the configuration information can include the camera exposure time and the gain. 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 can include at least one of an analog gain and a digital gain. The analog gain is a gain for amplifying an analog signal, and the digital gain is a gain for amplifying a digital signal.

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

[0097] Step S103: Obtain a fitting function, which is used to represent the corresponding relationship between the pixel value of the pixel point in the image and the configuration information and the illumination when the camera captures the image.

[0098] When the image is captured under different illuminations, the pixel value of the pixel point at the same position in the image is also different, that is, the size of the illumination will affect the size of the pixel value. Specifically, the greater the illumination, the greater the image brightness, and the greater the pixel value of the pixel point in the image, and vice versa, the smaller the image brightness, and the smaller the pixel value of the pixel point in the image.

[0099] According to the foregoing step S101, the configuration information when the camera captures the image will also affect the size of the pixel value, that is, the pixel value is affected by the illumination and the camera configuration information, and the fitting function represents the corresponding relationship between the illumination, the camera configuration information and the pixel value, without considering the illumination and the camera configuration information as a whole. In this way, the influence of the illumination on the pixel value can be accurately reflected, so that the illumination when the image is captured can be accurately obtained in the case that the camera configuration information and the pixel value are known.

[0100] In the embodiment, the same scene can be imaged by the camera under different light intensities to obtain scene images, and the camera configuration information is different when different scene images are captured. Then, the scene information of each scene image is obtained, and the scene information includes the light intensity when the scene image is captured, the pixel value of each pixel point in the scene image, and the camera configuration information when the scene image is captured. Finally, the scene information of all scene images is fitted with the light intensity as the dependent variable and the pixel value and the camera configuration information as the independent variable to obtain the fitting function. In some embodiments, the scene information can be fitted with a polynomial to obtain the fitting function. It should be noted that the fitting function is fitted in advance, and when the fitting function is needed, the pre-fitted fitting function can be directly called without obtaining the fitting function by the above method.

[0101] Step S104: The pixel value and the camera configuration information of each pixel point in the environment image are taken as the input of the fitting function, and the light intensity corresponding to each pixel point is obtained by the fitting function.

[0102] In the fitting function, the independent variable is 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, so the pixel value and the camera configuration information are taken as the input of the fitting function, that is, the pixel value and the camera configuration information are substituted into the independent variable 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 illuminance of the environment where the intelligent device is located is obtained. Specifically, the light intensity corresponding to the pixel point can be taken as the ambient illuminance of the environment, and in some embodiments, the average value of the light intensity corresponding to all pixel points can be obtained, and this average value can be taken as the ambient illuminance.

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

[0105] The embodiment of the ambient illuminance sensing method will be described below.

[0106] In some embodiments of the above step S105, the intelligent device is a vehicle, and in order to accurately obtain the ambient illuminance in the field of view of the vehicle driver and ensure the safety of the driver driving the vehicle, the ambient illuminance in the field of view of the driver can be obtained by Figure 2The following steps S1051 to S1052 are shown. The ambient illuminance is obtained.

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

[0108] The first field of view range is the range of the front of the vehicle viewed by the eyes of the driver, i.e., the first field of view range is the field of view range of a human being, which includes a horizontal field of view range and a vertical field of view range. The horizontal field of view range is usually a range of 0 to 180°. The height of the eyes of the driver in the vehicle can be estimated according to the height of the vehicle. The vertical field of view range can be obtained according to the height of the eyes. In some embodiments, the vertical field of view range includes a first angle vertically upward and a second angle vertically downward. After the height of the eyes of the driver is determined, the range of the first angle vertically upward from the height of the eyes and the range of the second angle vertically downward from the height of the eyes are obtained. The two ranges together constitute the vertical field of view range of the driver. For example, the first angle is 60° and the second angle is 75°.

[0109] In some embodiments, when the height of the eyes of the driver in the vehicle is estimated according to the height of the vehicle, a difference between the height of the vehicle and a preset height deviation can be obtained, and the difference is taken as the height of the eyes of the driver. A person skilled in the art can obtain the height of the vehicle in the full load and empty load conditions, respectively, and obtain the average of the two heights as a preset parameter of the height of the vehicle for estimating the first field of view range. The preset height deviation can represent the deviation between the roof and the eyes of the driver. When the value of the preset height deviation is set, a person skilled in the art can obtain a large number of deviations between the eyes and the roof of the driver in the vehicle, and then obtain the average of all the deviations, which is set as the value of the preset height deviation.

[0110] Step S1052: obtaining the pixel points in the first field of view range in the environment image, and obtaining the ambient illuminance of the first field of view range according to the light intensity corresponding to the pixel points.

[0111] Specifically, the average of the light intensity corresponding to all the pixel points in the first field of view range can be obtained, and the average is taken as the ambient illuminance of the first field of view range.

[0112] Based on the method described in steps S1051 to S1052, the ambient illuminance in the field of view of the driver of the vehicle can be accurately obtained, which is more consistent with the real feeling of the driver to the ambient brightness. The vehicle is controlled (such as the opening or closing of the headlamp) based on the ambient illuminance, which is more conducive to the safety of the driver driving the vehicle.

[0113] The embodiments of the method for perceiving the ambient illuminance will be described below.

[0114] In some embodiments of step S1052 above, the smart device is still a vehicle, but the vehicle is equipped with multiple cameras, such as cameras at the front and sides of the vehicle. In this case, the ambient light level within the driver's first field of vision can be obtained through steps 11 to 14 below.

[0115] Step 11: Divide the first field of view into multiple sub-fields.

[0116] The first field of view can be understood as the ROI (Region of Interest), and the sub-fields can be understood as partitions of the ROI, i.e., ROI partitions. In some implementations, the first field of view can be evenly divided into multiple sub-fields.

[0117] See appendix Figure 3 The vehicle is equipped with three cameras. Figure 3 In the context of cameras 1, 2, and 3, the first field of view is represented by a rectangle, which is then evenly divided into multiple sub-fields.

[0118] Step 12: For each camera, acquire the target pixel points located within 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. Obtain the environmental illuminance of the target sub-range according to the light intensity corresponding to the target pixel points, and use the environmental illuminance as an initial environmental illuminance for the target sub-range.

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

[0120] For a sub-range, if the second field of view of one camera covers the sub-range, then an initial ambient illuminance can be obtained using the environmental image captured by that camera; if the second field of view of multiple cameras covers the sub-range, then an initial ambient illuminance can be obtained using the environmental image captured by each camera, resulting in multiple initial ambient illuminances. In some implementations, 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 appendix again Figure 3 If the second field of view of camera 1 and camera 2 overlap, then their second field of view may cover the same sub-range. Based on the environmental images captured by camera 1 and camera 2, an initial ambient illuminance can be obtained for this sub-range. Finally, this sub-range will have two initial ambient illuminances.

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

[0123] Step 13: For each sub-range, if the initial ambient illuminance of the sub-range is one, the initial ambient illuminance is taken 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 taken as the final ambient illuminance.

[0124] When the initial ambient illuminance of the sub-range is one, the initial ambient illuminance is taken as the final ambient illuminance of the sub-range; when the initial ambient illuminance of the sub-range is multiple, the average (i.e. the first average) of the initial ambient illuminances is obtained, and the average is taken as the final ambient illuminance of the sub-range. Since each initial ambient illuminance is obtained from the environment image collected by a different camera, the average is equivalent to the fusion of the ambient illuminances obtained by multiple cameras, and the average can more accurately reflect the ambient illuminance of the sub-range.

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

[0126] Specifically, a weighted average (hereinafter described as the third average) of the final ambient illuminances of all sub-ranges can be obtained, and the ambient illuminance of the first field of view is obtained according to the third average. For example, the third average is taken as the ambient illuminance of the first field of view.

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

[0128] ​When setting the weight of the sub-range, the distance between the sub-range and the driving position of the vehicle can be considered. The smaller the distance, the more likely the sub-range is in front of the driver of the vehicle, and the greater the influence of the ambient illuminance of the sub-range on the driver of the vehicle, so a larger weight can be set for the sub-range; otherwise, a smaller weight can be set for the 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 weight of each sub-range can be 1 / N.

[0129] Based on the method described in steps 11-14 above, in the case where multiple cameras are provided on the vehicle, the ambient illuminance of the entire first field of view can be obtained as much as possible by using multiple cameras, and the fusion processing of the results of multiple cameras is achieved by obtaining the first mean value and the third mean value, which can significantly improve the accuracy of the ambient illuminance.

[0130] In one embodiment of step 12 above, the ambient illuminance of the target sub-range can be obtained according to the light intensity corresponding to the target pixel points by steps 121-124 as follows.

[0131] Step 121: Obtain the second mean value of the light intensity corresponding to all target pixel points.

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

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

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

[0135] If the target pixel point has a low degree of trustworthiness, a low weight can be set for the target pixel point. If the target pixel point has a high degree of trustworthiness, a high weight can be set for the target pixel point. That is, the weight can represent the degree of trustworthiness of the target pixel point corresponding to the light intensity. The deviation between the light intensity corresponding to the target pixel point and the second average value can represent the degree of trustworthiness of the target pixel point, and thus the weight can be set according to the size of the deviation. If the deviation is large, a low weight can be set, and if the deviation is small, a large weight can be set.

[0136] In some embodiments, the weight of the target pixel point can be determined according to the deviation by the following method: if the deviation is greater than or equal to the deviation threshold, it indicates that the deviation is large, and thus the weight of the target pixel point is set to 0; if the deviation is less than the deviation threshold, it indicates that the deviation is small, and thus the weight of the target pixel point is set to 1.

[0137] When setting the value of the deviation threshold, the person skilled in the art can use a camera to collect an environment image in an environment with both natural light sources and non-natural light sources (such as light), and obtain the light intensity corresponding to each pixel point in the environment image by the method described in the foregoing steps S101 to S104, calculate the average value of the light intensity corresponding to all pixel points, and take this average value as the first light intensity. In addition, the light region in the environment image can be identified by a computer device, and then the light intensity corresponding to each pixel point in the light region is obtained, the average value of the light intensity corresponding to all pixel points is calculated, and this average value is taken as the second light intensity, and the difference between the first light intensity and the second light intensity is obtained. By the above method, a large number of environment images can be obtained, and each environment image can obtain a difference value, and finally the average value of all difference values is obtained, and the value of the deviation threshold is set according to the average value. For example, the average value can be taken 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 illuminance of the target sub-range according to the effective light 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 pixel points in the target sub-range can be obtained, and the ambient illuminance of the target sub-range is obtained according to the average value. For example, the average value can be taken as the ambient illuminance of the target sub-range.

[0141] Based on the method described in the foregoing steps 121 to 124, the interference of the non-natural light source on the ambient illuminance can be reduced, and the accuracy of the ambient illuminance can be improved.

[0142] The following describes an embodiment of a vehicle lamp control method provided by the present application.

[0143] Referring to the accompanying Figure 4 , Figure 4 is a main step flow diagram of a vehicle lamp control method according to an embodiment of the present application. As shown in Figure 4 , the ambient illuminance sensing method in the embodiment of the present application mainly includes the following steps S201 to S202.

[0144] Step S201: An ambient illuminance sensing method is used to obtain the ambient illuminance of the environment in which the intelligent device is located.

[0145] The intelligent device is a vehicle, the vehicle is provided with a camera and vehicle lamps, the vehicle lamps include headlamps, and the ambient illuminance sensing method can be the ambient illuminance sensing method described in the foregoing method embodiments. The number of cameras can be one or more. When the camera is one, the camera can be a forward-facing camera. When the camera is multiple, the camera can include a forward-facing camera, a camera arranged on each side of the vehicle body, etc.

[0146] Step S202: The state of the vehicle lamps is controlled according to the ambient illuminance.

[0147] Specifically, if the ambient illuminance is relatively low, it indicates that the light is relatively dark for the driver of the vehicle, and at this time the vehicle lamps can be turned on. If the ambient illuminance is relatively high, it indicates that the light is relatively bright for the driver of the vehicle, and at this time the vehicle lamps can be turned off.

[0148] For example, when the ambient illuminance is relatively low, the headlamps are turned on to illuminate the environment in front of the vehicle, so that the driver of the vehicle can see the environment in front of the vehicle and drive safely. For another example, the tail lamps of the vehicle are turned on, which helps the driver of a rear vehicle (a vehicle located behind the current vehicle) to clearly see the position of the current vehicle, so as to control the distance between the current vehicle and the rear vehicle and improve the safety of driving. Similarly, when the ambient illuminance is relatively high, the headlamps or tail lamps of the vehicle can be turned off.

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

[0150] In the methods described in steps S201 to S202 above, the ambient illuminance can accurately reflect the brightness of the scene as seen by the human eye. Based on this, controlling the vehicle lights to turn on or off can better meet the actual needs of the driver and improve the driver's safety while driving.

[0151] The following is in conjunction with the appendix Figure 5 The embodiments of the vehicle lighting control method provided in this application will be described below. Figure 5 As shown, the vehicle is equipped with three cameras. Figure 5 Camera 1, Camera 2, and Camera 3 are used. Camera 2 is a forward-facing camera located at the front of the vehicle. Camera 1 and Camera 3 are located on the 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: Illuminance statistics.

[0153] Specifically, using the method described in steps 11 to 12 of the aforementioned environmental illumination perception method embodiment, the initial environmental illumination of the target sub-range covered by the second field of view of each camera 1 to camera 3 is obtained.

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

[0155] Specifically, the environmental illuminance within the first field of view is obtained by using the method described in steps 13 to 14 of the aforementioned environmental illuminance perception method embodiment.

[0156] Step S303: Determine ambient illuminance.

[0157] Specifically, the method described in step S202 of the aforementioned vehicle light control method is used to control the vehicle's headlights to turn on or off.

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

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

[0160] Those skilled in the art can understand that all or part of the processes in the method of the above-mentioned embodiment can also be completed by a computer program instructing related hardware, and the computer program can be stored in a computer readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned various method embodiments can be implemented. The computer program includes computer program code, which can be in the form of source code, object code, executable files or some intermediate forms, etc. The computer readable storage medium can include any entity or device, medium, U disk, mobile hard disk, magnetic 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 the computer readable storage medium according to the present application, the computer readable storage medium can be configured to store a program for executing the ambient illuminance perception method or the vehicle lamp control method of the above-mentioned method embodiments, which can be loaded and run by the processor to implement the ambient illuminance perception method or the vehicle lamp control method. For the convenience of description, only the parts related to the embodiments of the present application are shown, and the specific technical details not disclosed are referred to the method part of the embodiments of the present application. The computer readable storage medium can be a storage device formed by various electronic devices, and optionally, the computer readable storage medium in the embodiments of the present application is a non-transitory computer readable storage medium.

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

[0164] In an embodiment of the smart device according to the present application, the smart device can include at least one processor; and a memory connected in communication with the at least one processor; wherein the memory has stored therein a computer program, which, when executed by the at least one processor, implements the method of any one of the above-mentioned embodiments. For the convenience of description, only the parts related to the embodiments of the present application are shown, and the specific technical details not disclosed are referred to the method part of the embodiments of the present application. Figure 6 , Figure 6 The memory 11 and the processor 12 are connected in communication through a bus, as shown exemplarily in the figure.

[0165] In some embodiments of the present application, the smart device can further include at least one sensor for sensing information. The sensor is connected in communication with any type of processor mentioned in the present application. Optionally, the smart device can further include an autonomous driving system for guiding the smart device to drive by itself or assisting driving. The processor is connected in communication with the sensor and / or the autonomous driving system for completing the method of any one of the above-mentioned embodiments.

[0166] So far, the technical solution of the present application has been described in combination with one embodiment shown in the 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. Those skilled in the art can make equivalent changes or replacements to the related technical features without departing from the principles of the present application, and the technical solutions after the changes or replacements will all fall within the protection scope of the present application.

Claims

1. A method of ambient illuminance perception, the method comprising: The method comprises: obtaining an environment image collected by a camera on a smart device and camera configuration information, the environment image being an image of an environment in which the smart device is located, and the camera configuration information being configuration information when the camera collects the environment image; obtaining pixel values of each pixel point in the environment image; obtaining a fitting function, the fitting function being used to represent a corresponding relationship between a pixel value of a pixel point in an image and configuration information and an illumination intensity when the camera collects the image; taking the pixel value of each pixel point and the camera configuration information as input quantities of the fitting function, and obtaining the illumination intensity corresponding to each pixel point through the fitting function; obtaining an ambient illuminance of the environment in which the smart device is located according to the illumination intensity; wherein the smart device is a vehicle, and the obtaining of the ambient illuminance of the environment in which the smart device is located according to the illumination intensity comprises: determining a first field of view range of a driver of the vehicle according to a height of the vehicle; obtaining pixel points in the environment image that are located in the first field of view range, and obtaining an ambient illuminance of the first field of view range according to the illumination intensity corresponding to the pixel points.

2. The method of claim 1, wherein: the camera configuration information comprises an exposure time and a gain of the camera.

3. The method of claim 1, wherein, The smart device is provided with a plurality of cameras, and the obtaining of the ambient illuminance of the first field of view range according to the illumination intensity corresponding to the pixel points comprises: dividing the first field of view range into a plurality of sub-ranges; for each camera, obtaining target pixel points in an environment image collected by the camera that are located in a target sub-range, the target sub-range being a sub-range in the plurality of sub-ranges that is covered by a second field of view range of the camera, and obtaining an ambient illuminance of the target sub-range according to the illumination intensity corresponding to the target pixel points, and the ambient illuminance being an initial ambient illuminance of the target sub-range; for each sub-range, if the initial ambient illuminance of the sub-range is one, taking the initial ambient illuminance as a final ambient illuminance; if the initial ambient illuminance of the sub-range is a plurality, taking a first average of the plurality of initial ambient illuminances as a final ambient illuminance; obtaining the ambient illuminance of the first field of view range according to the final ambient illuminances of all the sub-ranges.

4. The method of claim 3, wherein, The obtaining of the ambient illuminance of the target sub-range according to the illumination intensity corresponding to the target pixel points comprises: obtaining a second average of the illumination intensities corresponding to all the target pixel points; obtaining a deviation between the illumination intensity corresponding to the target pixel point and the second average, and determining a weight of the target pixel point according to the deviation; obtaining an effective illumination intensity corresponding to the target pixel point according to a product of the illumination intensity corresponding to the target pixel point and the weight; obtaining the ambient illuminance of the target sub-range according to the effective illumination intensities corresponding to the target pixel points in the target sub-range.

5. The method of claim 4, wherein, The determination of the weight of the target pixel point according to the deviation comprises: if the deviation is greater than or equal to a deviation threshold, the weight of the target pixel point is 0; if the deviation is less than the deviation threshold, the weight of the target pixel point is 1.

6. The method of claim 3, wherein, The final ambient illuminance of all sub-ranges is obtained according to the final ambient illuminance of all sub-ranges, and the ambient illuminance of the first field of view range is obtained, comprising: A third average value of the final ambient illuminance of all sub-ranges is obtained; The ambient illuminance of the first field of view range is obtained according to the third average value.

7. The method of claim 3, wherein, The first field of view range is divided into a plurality of sub-ranges, comprising: The first field of view range is uniformly divided into a plurality of sub-ranges.

8. A vehicle lamp control method characterized by, The method comprises: An ambient illuminance of an environment where a smart device is located is obtained by using the ambient illuminance sensing method in any one of claims 1 to 7, the smart device is a vehicle, and the vehicle is provided with a camera and a vehicle lamp, and the vehicle lamp comprises a headlamp; The state of the vehicle lamp is controlled according to the ambient illuminance.

9. A smart device, comprising: Comprise: At least one processor; And a memory in communication connection with the at least one processor; Wherein the memory has a computer program stored therein, and the computer program is executed by the at least one processor to realize the ambient illuminance sensing method in any one of claims 1 to 7 or the vehicle lamp control method in claim 8.

10. A computer readable storage medium having stored therein a plurality of program codes, characterized in that, The program code is adapted to be loaded and run by the processor to execute the ambient illuminance sensing method in any one of claims 1 to 7 or the vehicle lamp control method in claim 8.

Citation Information

Patent Citations

  • Method and device for detecting ambient light illuminance in vehicle

    CN117073834A

  • Illuminating light switching method, device and equipment and storage medium

    CN118238719A