Anti-dazzling function starting method, device and equipment, storage medium and vehicle
By acquiring the rear image collected by the rearview camera, determining the overall and local image brightness, and automatically determining whether the anti-glare function of the rearview mirror is turned on, the problem of difficulty in accurately enabling the anti-glare function in the prior art is solved, and the efficient and safe anti-glare function is enabled.
Patent Information
- Application Number
- CN202311370201.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-20
- Publication Date
- 2025-04-22
AI Technical Summary
In the case of using existing equipment in the prior art, it is difficult to accurately enable the anti-glare function based on the actual environment. The additional light sensor needs to be installed separately for each rearview mirror, and the light intensity perception threshold of the light sensor is single, so it is impossible to specifically judge the ambient light intensity.
By acquiring the rear image captured by the rearview camera, determine the overall image brightness and the target local image brightness, and determine whether the anti-glare function of the rearview mirror is turned on. This method uses the image information collected by the rearview camera, combines the preset rearview mirror area to automatically determine whether there is an overly bright light source, and then accurately activate the anti-glare function.
The precise automatic activation of anti-glare functions based on the actual environment is realized, which improves driving safety, avoids driver distraction and manual opening problems, and avoids limitations on vehicle device layout and styling.
Smart Images

Figure CN119858502A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of vehicle technology, and in particular to a method, device, equipment, storage medium and vehicle for activating an anti-glare function. Background Art
[0002] At present, with the development of vehicle technology, more and more vehicles are equipped with anti-glare rearview mirrors. The anti-glare rearview mirror can turn on the anti-glare function when encountering strong light or other vehicles turning on the high beam, thereby reducing the intensity of light reflected from the rearview mirror to the driver's eyes, avoiding the driver being dazzled by the strong light reflected by the rearview mirror, and improving the safety of driving the vehicle.
[0003] In the related technology, one method is that the driver needs to manually turn on the anti-glare function of the rearview mirror after feeling the strong light, but this will cause the driver to be distracted while driving, and it takes a long time to manually turn on the anti-glare function; another method is that an additional light sensor needs to be installed near the rearview mirror, and the electrical signal generated by the light sensor when receiving light is used to control the automatic opening and closing of the anti-glare function, but this method requires the installation of a corresponding light sensor for each rearview mirror (such as the left and right exterior rearview mirrors outside the car and the central interior rearview mirror inside the car), and the light sensor has a relatively simple perception threshold for light intensity, and cannot be combined with the ambient light intensity for specific judgment. Therefore, how to enable the anti-glare function more accurately in combination with the actual environment while using the existing equipment of the vehicle has become an urgent problem to be solved. Summary of the invention
[0004] In order to solve the above technical problems, the present disclosure provides a method, device, equipment, storage medium and vehicle for activating an anti-glare function.
[0005] In a first aspect, the present disclosure provides a method for activating an anti-glare function, the method comprising:
[0006] Acquire a rear image captured by a rear-view camera of a target vehicle;
[0007] determining an overall image brightness of the rear image;
[0008] Identifying a target local image with the largest image brightness in the rear image, and determining the image brightness of the target local image as the target local image brightness; wherein the target local image is within a preset rearview mirror area of the rear image;
[0009] According to the overall image brightness and the target local image brightness, it is determined whether to turn on the anti-glare function of the rearview mirror of the target vehicle; wherein the rearview mirror corresponds to the preset rearview mirror area.
[0010] In a second aspect, the present disclosure provides an opening device with an anti-glare function, the device comprising:
[0011] A rear image acquisition module is used to acquire a rear image captured by a rear-view camera of a target vehicle;
[0012] An overall image brightness recognition module, used to determine the overall image brightness of the rear image;
[0013] a target local image brightness determination module, used to identify a target local image with the largest image brightness in the rear image, and determine the image brightness of the target local image as the target local image brightness; wherein the target local image is within a preset rearview mirror area of the rear image;
[0014] The anti-glare function activation judgment module is used to judge whether to activate the anti-glare function of the rearview mirror of the target vehicle according to the overall image brightness and the target local image brightness; wherein the rearview mirror corresponds to the preset rearview mirror area.
[0015] In a third aspect, an embodiment of the present disclosure further provides an electronic device, including:
[0016] processor;
[0017] A memory for storing executable instructions;
[0018] The processor is used to read executable instructions from the memory and execute the executable instructions to implement the method for activating the anti-glare function of the first aspect.
[0019] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, wherein the storage medium stores a computer program. When the computer program is executed by a processor, the processor implements the method for activating the anti-glare function of the first aspect.
[0020] In a fifth aspect, an embodiment of the present disclosure further provides a vehicle, comprising at least one of the following: the above-mentioned anti-glare function activation device; the above-mentioned electronic device; and the above-mentioned computer-readable storage medium.
[0021] The technical solution provided by the embodiment of the present disclosure has the following advantages over the prior art: the method, device, equipment and storage medium for activating the anti-glare function of the embodiment of the present disclosure obtains the rear image captured by the rearview camera of the target vehicle; determines the overall image brightness of the rear image; identifies the target local image with the largest image brightness in the rear image, and determines the image brightness of the target local image as the target local image brightness; wherein the target local image is in the preset rearview mirror area of the rear image; according to the overall image brightness and the target local image brightness, determines whether to activate the anti-glare function of the rearview mirror of the target vehicle; wherein the rearview mirror corresponds to the preset rearview mirror area. With the above technical solution, the rearview camera captures the rear image, the overall image brightness of the rear image represents the average brightness of the actual environment behind the vehicle, and the target local image brightness corresponding to the rear image in the preset rearview mirror area represents the local brightest value of the image that can be seen by the rearview mirror, and then the overall image brightness and the target local image brightness can represent whether a light source that is too bright relative to the overall actual environment is seen in the rearview mirror, and determines whether to activate the anti-glare function. Therefore, based on the information collected by the rearview camera, an existing sensor in the vehicle, the brightness conditions of the actual environment in which the vehicle is located are recorded, and the anti-glare function is accurately and automatically activated based on the actual environment, thereby improving the user's driving safety. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0024] Figure 1 A schematic diagram of a flow chart of a method for activating an anti-glare function provided in an embodiment of the present disclosure;
[0025] Figure 2 A schematic diagram of a preset rearview mirror area provided in an embodiment of the present disclosure;
[0026] Figure 3 A schematic flow chart of another method for activating the anti-glare function provided in an embodiment of the present disclosure;
[0027] Figure 4 A schematic diagram of a domain controller of a target vehicle provided in an embodiment of the present disclosure;
[0028] Figure 5A schematic diagram of the structure of an opening device for an anti-glare function provided in an embodiment of the present disclosure;
[0029] Figure 6 A schematic diagram of the hardware circuit structure of a device for activating an anti-glare function provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0031] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0032] At present, with the development of vehicle technology, more and more vehicles are equipped with anti-glare rearview mirrors. The anti-glare rearview mirror can turn on the anti-glare function when encountering strong light or other vehicles turning on the high beam, thereby reducing the intensity of light reflected from the rearview mirror to the driver's eyes, avoiding the driver being dazzled by the strong light reflected by the rearview mirror, and improving the safety of driving the vehicle.
[0033] In the related art, the driver is required to manually turn on the anti-glare function of the rearview mirror after feeling the strong light, but this will cause the driver to be distracted while driving, and it takes a long time to manually turn on the anti-glare function.
[0034] Alternatively, an additional light sensor is installed near the rearview mirror, and the electrical signal generated by the light sensor when receiving light is used to control the automatic opening and closing of the anti-glare function. However, this method requires the installation of a corresponding light sensor for each rearview mirror (such as the left and right exterior rearview mirrors outside the car and a central interior rearview mirror inside the car), and the light sensor has a relatively simple perception threshold for light intensity, and cannot be combined with the ambient light intensity for specific judgment. In addition, in order to ensure that external light can enter the light sensor, it is necessary to avoid the obstruction of the light path of the light sensor by the components in the vehicle. As a result, the shape of multiple parts such as the front window and rear window of the vehicle, as well as the arrangement of components inside the vehicle are restricted.
[0035] Therefore, how to enable the anti-glare function more accurately in combination with the actual environmental conditions while utilizing the existing equipment of the vehicle and avoiding restrictions on the device layout and shape of the entire vehicle has become an urgent problem to be solved.
[0036] In order to solve the above problems, the embodiments of the present disclosure provide a method, device, equipment, storage medium and vehicle for activating an anti-glare function.
[0037] Figure 1 The present invention provides a flowchart of a method for activating an anti-glare function, which can be performed by an anti-glare function activation device, wherein the device can be implemented by software and / or hardware, and can generally be integrated in an electronic device, and the anti-glare function activation device and / or electronic device can be configured in a first vehicle. Figure 1 As shown, the method includes:
[0038] Step 101, obtaining a rear image captured by a rearview camera of a target vehicle.
[0039] The target vehicle may be a moving vehicle, and optionally, the target vehicle may be a vehicle in a forward gear, that is, the target vehicle is in a forward gear. This embodiment does not limit the energy supply type of the target vehicle, for example, the energy supply type of the target vehicle may be pure electric power or hybrid power, etc. This embodiment does not limit the type of the target vehicle, for example, the type of the target vehicle may be a sport utility vehicle (SUV) or a sedan, etc.
[0040] The rear-view camera may be a camera facing the rear of the target vehicle. The present embodiment does not limit the arrangement position of the rear-view camera. For example, the rear-view camera may be arranged at the rear part of the target vehicle, or the rear-view camera may be arranged inside the target vehicle. In an optional implementation, the rear-view camera may be a camera used to capture the rear image of the target vehicle in the image system. For example, the rear-view camera may be a camera facing the rear of the vehicle in an Around View Monitor (AVM) system; or, the rear-view camera may be a camera facing the rear of the vehicle in an Advanced Driver Assistance System (ADAS). It is understandable that since the observation distance of the camera in the Advanced Driver Assistance System is far, it can observe light at a far distance, thereby improving the accuracy of the final determination of whether to turn on the anti-glare function. The rear image may be an image captured by the rear-view camera. The present embodiment does not limit the format of the rear image. For example, the format of the rear image may be a raw image file (RAW).
[0041] In the disclosed embodiment, during the driving process of the target vehicle, the rear view camera collects the rear image of the rear of the target vehicle in real time, and the device for activating the anti-glare function obtains the rear image.
[0042] Step 102, determining the overall image brightness of the rear image.
[0043] The image brightness may be the brightness of the image, and the image brightness may be the brightness presented by the image. The overall image brightness may be the overall image brightness of the rear image.
[0044] In this embodiment, the device for turning on the anti-glare function can use the entire rear image as the calculation area to calculate the overall image brightness of the rear image. Alternatively, the anti-glare function can directly read the overall image brightness of the rear image.
[0045] Step 103 , identifying a target local image with the maximum image brightness in the rear image, and determining the image brightness of the target local image as the target local image brightness; wherein the target local image is within a preset rearview mirror area of the rear image.
[0046] The target local image may be a local image with the largest image brightness among the multiple local images divided by the rear image. Alternatively, the target local image may be a local image determined by performing maximum image brightness recognition on the rear image. The target local image brightness may be the image brightness of the target local image, and the target local image brightness may be understood as the maximum value of the image brightness in the local area of the rear image.
[0047] The preset rearview mirror area may be different areas that can be observed through different rearview mirrors in the rear image. The preset rearview mirror area may correspond to the rearview mirror of the target vehicle. For example, the rearview mirror may include an interior rearview mirror located inside the vehicle and an exterior rearview mirror located outside the vehicle, wherein the exterior rearview mirror includes a left exterior rearview mirror and a right exterior rearview mirror. The left exterior rearview mirror may be an exterior rearview mirror located on the left side of the vehicle, and the right exterior rearview mirror may be an exterior rearview mirror located on the right side of the vehicle.
[0048] If the preset rearview mirror area is the preset interior rearview mirror area, the rearview mirror is an interior rearview mirror; if the preset rearview mirror area is the preset left exterior rearview mirror area, the rearview mirror is a left exterior rearview mirror; if the preset rearview mirror area is the preset right exterior rearview mirror area, the rearview mirror is a right exterior rearview mirror.
[0049] Among them, the preset interior rearview mirror area can be the image area in the rear image that can be observed through the interior rearview mirror; the preset left exterior rearview mirror area can be the image area in the rear image that can be observed through the left exterior rearview mirror; the preset right exterior rearview mirror area can be the image area in the rear image that can be observed through the right exterior rearview mirror. Figure 2 A schematic diagram of a preset rearview mirror area provided in an embodiment of the present disclosure, such as Figure 2As shown, area 201 in the rear image 200 is a preset left exterior rearview mirror area, area 202 is a preset interior rearview mirror area, and area 203 is a preset right exterior rearview mirror area.
[0050] In the embodiment of the present disclosure, there are many methods for determining the target partial image, which are not limited in this embodiment. Examples are as follows:
[0051] In an optional implementation, the target local image in the rear image may be determined based on a grid division method.
[0052] Specifically, identifying the target local image with the largest image brightness in the rear image includes:
[0053] Step a1, grid-dividing the rear image according to a preset number of rows and a preset number of columns to obtain a plurality of candidate partial images within a preset rearview mirror area.
[0054] The preset number of rows may be the number of rows obtained after the rear image is divided, which may be a positive integer M. This embodiment does not limit the preset number of rows, which may be set according to user requirements or the recognition sensitivity of image brightness. The preset number of columns may be the number of columns obtained after the rear image is divided, which may be a positive integer N. This embodiment does not limit the preset number of columns, which may be set according to user requirements or the recognition sensitivity of image brightness. The candidate partial image may be a partial image located in the rearview mirror area among the multiple partial images obtained by dividing the rear image.
[0055] In this embodiment, the device for activating the anti-glare function may include an image signal processing (ISP) unit, through which the entire rear image can be grid-divided according to a preset number of rows and a preset number of columns to obtain multiple local images. Further, the local images located in the preset rearview mirror area are determined as multiple candidate local images.
[0056] Alternatively, the device for activating the anti-glare function may first capture the rear image according to the rearview mirror area to obtain a captured image, and then divide the captured image into grids according to a preset number of rows and columns through an image signal processing unit to obtain a candidate local image.
[0057] Step a2, determining the brightness of multiple local images corresponding to the multiple candidate local images, and determining the candidate local image corresponding to the maximum brightness among the multiple local images as the target local image.
[0058] The local image brightness may be the image brightness of the local image.
[0059] In this embodiment, the device for activating the anti-glare function can use each candidate partial image as a calculation area, calculate the partial image brightness of each candidate partial image, and obtain multiple partial image brightnesses, and determine the maximum value among the multiple partial image brightnesses, and determine the candidate partial image corresponding to the maximum value as the target partial image.
[0060] In the above scheme, based on the grid division of the rear image, the location of the local image can be determined while determining the local image, which provides a basis for the subsequent determination of the candidate local image in the preset rearview mirror area. In addition, the scheme has a small demand for computing power and can determine the target local image more quickly.
[0061] In another optional implementation, the target partial image in the rear image may be determined based on an image processing method. Specifically, identifying the target partial image with the highest image brightness in the rear image includes:
[0062] Step b1, performing grayscale processing and Gaussian processing on the rear image to obtain a processed image.
[0063] Among them, grayscale processing can be a processing method for converting an image from color to grayscale, and this embodiment does not limit the specific method of grayscale processing. Gaussian processing is also called Gaussian blur processing. Through this Gaussian processing, the noise in the image can be reduced and the level of detail can be reduced, thereby avoiding the influence of noise with high image brightness on the final target local image. The processed image can be an image obtained by performing image processing on the rear image.
[0064] In this embodiment, the device for turning on the anti-glare function can perform grayscale processing and Gaussian processing on the rear image to obtain a processed image that has completed grayscale processing and noise reduction.
[0065] Step b2, determining the portion of the processed image located in the preset rearview mirror area as the intermediate image, and determining the target pixel points in the intermediate image whose image brightness is greater than a preset image brightness threshold.
[0066] The preset image brightness may be a preset maximum value that will not cause dazzle to the user. The preset image brightness may be set according to user needs, etc., and is not limited in this embodiment.
[0067] In this embodiment, after determining the processed image, the processed image is clipped according to the preset rearview mirror area, and the clipped portion of the image is determined as the intermediate image. For each pixel in the intermediate image, the image brightness of the pixel is determined, and it is determined whether the image brightness is greater than a preset image brightness threshold. If so, the pixel is determined as a target pixel.
[0068] Step b3, determining the sampling position of the preset sampling frame in the rear image according to the position of the target pixel point, and sampling the rear image using the preset sampling frame according to the sampling position to obtain the target partial image.
[0069] The preset sampling frame may be a frame preset to sample the rear image to obtain the target partial image. The present embodiment does not limit the size of the sampling frame. The size of the sampling frame may be set according to user requirements or the recognition sensitivity of the image brightness. The present embodiment does not limit the shape of the sampling frame. For example, the sampling frame may be a rectangle or a circle. The sampling position may be the position of the preset sampling frame when the preset sampling frame samples the rear image.
[0070] In this embodiment, after determining the target pixel point, the device for enabling the anti-glare function determines the position of each target pixel point, performs clustering processing on the position of the target pixel point, and determines the center point of the clustering result as the sampling position of the preset sampling frame. The preset sampling frame is sampled at the sampling position of the rear image to obtain a target partial image.
[0071] In the above solution, the partial image located in the preset rearview mirror area can be used as a whole to identify the target local image, and the target local image finally determined can more accurately represent the local image with the maximum image brightness.
[0072] Step 104, judging whether to turn on the anti-glare function of the rearview mirror of the target vehicle according to the overall image brightness and the target local image brightness; wherein the rearview mirror corresponds to a preset rearview mirror area.
[0073] Among them, the anti-glare function can prevent the light reflected by the rearview mirror from being too strong, thereby avoiding dazzle for the user.
[0074] In the disclosed embodiment, the overall image brightness represents the overall image brightness of the rear image, and the target local image brightness represents the maximum value of the local image brightness of the rear image. Based on the overall image brightness and the target local image brightness, it is possible to determine whether there is a local image whose image brightness is prominent compared to the overall image, that is, it is possible to determine whether there is a local environment whose ambient brightness is prominent compared to the overall environment. Further, it is determined whether to turn on the anti-glare function of the rearview mirror of the target vehicle.
[0075] It can be understood that if the preset rearview mirror area is the preset interior rearview mirror area, it is ultimately determined whether the anti-glare function of the interior rearview mirror is turned on; if the preset rearview mirror area is the preset left exterior rearview mirror area, it is ultimately determined whether the anti-glare function of the left exterior rearview mirror is turned on; if the preset rearview mirror area is the preset right exterior rearview mirror area, it is ultimately determined whether the anti-glare function of the right exterior rearview mirror is turned on.
[0076] In some embodiments of the present disclosure, whether to turn on the anti-glare function can be determined based on the direct relationship between the overall image brightness and the target local image brightness. Specifically, judging whether to turn on the anti-glare function of the rearview mirror of the target vehicle based on the overall image brightness and the target local image brightness includes:
[0077] The image brightness difference between the overall image brightness and the target local image brightness is determined; if the image brightness difference is greater than a preset image brightness difference threshold, the anti-glare function is turned on.
[0078] The image brightness difference may be the difference between the target local image brightness and the overall image brightness. The preset image brightness difference threshold may be a preset maximum image brightness difference value without the anti-glare function turned on. The preset image brightness difference threshold may be set according to the application scenario and is not limited in this embodiment.
[0079] In this embodiment, the difference between the brightness of the target local image and the brightness of the overall image is calculated to obtain the image brightness difference. It is determined whether the image brightness difference is greater than the image brightness difference threshold. If so, it means that the image brightness of the partial image in the rear image is greatly different from the image brightness of the overall image, which is likely to cause dazzle to the user, and the anti-dazzle function of the corresponding rearview mirror is turned on. Otherwise, it means that the image brightness of the partial image in the rear image is less different from the image brightness of the overall image, and the possibility of causing dazzle to the user is small, and the anti-dazzle function of the corresponding rearview mirror is not turned on.
[0080] In the above solution, whether to turn on the anti-glare function is directly determined based on the difference between the image brightnesses, the amount of calculation is small, and the anti-glare function can be turned on in a relatively timely manner.
[0081] The method for activating the anti-glare function provided in the embodiment of the present disclosure comprises the following steps: acquiring a rear image captured by a rear-view camera of a target vehicle; determining the overall image brightness of the rear image; identifying a target local image with the highest image brightness in the rear image, and determining the image brightness of the target local image as the target local image brightness; wherein the target local image is within a preset rear-view mirror area of the rear image; judging whether to activate the anti-glare function of the rear-view mirror of the target vehicle according to the overall image brightness and the target local image brightness; wherein the rear-view mirror corresponds to the preset rear-view mirror area. In the embodiment of the present disclosure, the rear-view camera captures a rear image, and the overall image brightness of the rear image represents the average brightness of the actual environment behind the vehicle, and the target local image brightness corresponding to the rear image within the preset rear-view mirror area represents the local brightest value of the image that can be seen by the rear-view mirror, and further, the overall image brightness and the target local image brightness can represent whether a light source that is too bright relative to the overall actual environment is seen in the rear-view mirror, and judge whether to activate the anti-glare function. Therefore, based on the information collected by the rearview camera, an existing sensor in the vehicle, the brightness conditions of the actual environment in which the vehicle is located are recorded, and the anti-glare function is accurately and automatically activated based on the actual environment, thereby improving the user's driving safety.
[0082] In addition, compared with the method of manually turning on the anti-glare function, the method of determining whether to turn on the anti-glare function based on the light sensor avoids the driver's driving distraction and can turn on the anti-glare function in a relatively timely manner. The rear-view camera can be an existing camera of the vehicle. Since it avoids setting up an additional photosensitive sensor for the anti-glare function, it is not necessary to avoid blocking the light path of the photosensitive sensor, thereby removing the restrictions on the device layout and styling design of the vehicle.
[0083] Figure 3 A flow chart of another method for activating the anti-glare function provided in an embodiment of the present disclosure is shown in FIG. Figure 3 As shown, judging whether to turn on the anti-glare function of the rearview mirror of the target vehicle according to the overall image brightness and the target local image brightness includes:
[0084] Step 301, converting the overall image brightness to obtain the comprehensive environment brightness of the environment where the target vehicle is located.
[0085] The ambient brightness may be the brightness of the environment, and the ambient brightness may be the brightness obtained by conversion based on the image brightness. The ambient brightness may be illumination, and the present embodiment does not limit the unit of the ambient brightness, for example, the unit of the ambient brightness may be lux. The comprehensive ambient brightness may be the ambient brightness corresponding to the overall image brightness, and the comprehensive ambient brightness may be the overall brightness representing the environment in which the target vehicle is located.
[0086] In this embodiment, after determining the overall image brightness, the overall image brightness is converted into the comprehensive environment brightness. There are many methods for converting the overall image brightness into the comprehensive environment brightness, which are not limited in this embodiment, and the examples are as follows:
[0087] In an optional implementation, the shooting process of the rear image can be determined according to the camera parameters of the rear image, and the shooting inverse process of the shooting process can be determined, and the overall image brightness can be restored to the comprehensive environment brightness based on the shooting inverse process.
[0088] In another optional implementation, the overall image brightness is converted to obtain the comprehensive ambient brightness of the environment in which the target vehicle is located, including:
[0089] Determine the camera parameters of the rear image, input the rear image into a preset coefficient adjustment relationship, and obtain an adjustment value corresponding to the rear image; wherein the camera parameters include: at least one of: an exposure parameter, a gain coefficient, and a gamma coefficient; adjust the overall image brightness according to the adjustment value to obtain a comprehensive environmental brightness.
[0090] The camera parameters may be parameters of the rear view camera when shooting rear images. The exposure parameters include but are not limited to: any one of an exposure coefficient and an exposure mode. The exposure coefficient may be a quantity representing the amount of exposure. The exposure mode may be a quantity representing the type of exposure, and the exposure mode includes but is not limited to: long and short exposure, and multi-frame synthesis. The gain coefficient is also called image gain. The gamma coefficient is also called gamma transformation coefficient.
[0091] The preset coefficient adjustment relationship may be a correspondence relationship between a pre-calibrated camera parameter and an adjustment value. The adjustment value may be a conversion value for adjusting the image brightness to the ambient brightness.
[0092] In the disclosed embodiment, a rear-view camera is used in advance to shoot the ambient brightness using different camera parameters to obtain a corresponding captured image, and the image brightness of the captured image is determined. The ambient brightness is divided by the image brightness of the captured image to obtain an adjustment value. The adjustment value corresponding to the different camera parameters is determined. The corresponding relationship between the calibration camera coefficient and the corresponding adjustment is fitted to obtain a preset coefficient adjustment relationship. Furthermore, after determining the rear image, the preset coefficient adjustment relationship is queried according to the camera parameters of the rear image to obtain the adjustment value corresponding to the rear image. The adjustment value is multiplied by the overall image brightness to obtain the comprehensive ambient brightness.
[0093] Step 302: convert the target local image brightness to obtain the unit environment brightness.
[0094] The unit environment brightness may be the environment brightness corresponding to the target local image brightness, and the unit environment brightness may represent the brightest brightness of a local area of the environment where the target vehicle is located.
[0095] In this embodiment, after determining the target local image brightness, the target local image brightness is converted into the unit environment brightness. There are many methods for converting the target local image brightness into the unit environment brightness, which are not limited in this embodiment, and examples are described as follows:
[0096] In an optional implementation, the shooting process of the rear image can be determined according to the camera parameters of the rear image, and the shooting inverse process of the shooting process can be determined, and the overall image brightness can be restored to the comprehensive environment brightness based on the shooting inverse process.
[0097] In another optional implementation, converting the target local image brightness to obtain the unit environment brightness includes:
[0098] Determine the camera parameters of the rear image, input the rear image into a preset coefficient adjustment relationship, and obtain an adjustment value corresponding to the rear image; wherein the camera parameters include: at least one of: an exposure parameter, a gain coefficient, and a gamma coefficient; adjust the brightness of the target local image according to the adjustment value to obtain the unit environment brightness.
[0099] Step 303, judging whether to turn on the anti-glare function of the rearview mirror of the target vehicle according to the comprehensive environment brightness and the unit environment brightness.
[0100] In this embodiment, the ambient brightness difference between the comprehensive ambient brightness and the unit ambient brightness is determined; if the ambient brightness difference is greater than a preset ambient brightness difference threshold, the anti-glare function is turned on.
[0101] The ambient brightness difference may be the difference between the unit ambient brightness and the comprehensive ambient brightness. The preset ambient brightness difference threshold may be a preset maximum ambient brightness difference without the anti-glare function turned on. The preset ambient brightness difference threshold may be set according to the application scenario and is not limited in this embodiment.
[0102] In this embodiment, the difference between the unit ambient brightness and the comprehensive ambient brightness is calculated to obtain the ambient brightness difference. It is determined whether the ambient brightness difference is greater than the ambient brightness difference threshold. If so, it means that the ambient brightness of part of the environment observable through the rearview mirror is significantly different from that of the entire environment, which may easily cause dazzle to the user, and thus the anti-dazzle function of the corresponding rearview mirror is turned on. Otherwise, it means that the ambient brightness of part of the environment observable through the rearview mirror is slightly different from that of the entire environment, and the possibility of causing dazzle to the user is relatively small, and thus the anti-dazzle function of the corresponding rearview mirror is not turned on.
[0103] In the above scheme, the overall image brightness and the target local image brightness in the image dimension are respectively restored to the comprehensive ambient brightness and the unit ambient brightness in the real environment dimension, and then whether to turn on the anti-glare function is determined based on the comprehensive ambient brightness and the unit ambient brightness in the real environment dimension, so that the turning on of the anti-glare function is more in line with the actual environment of the vehicle and the turning on of the anti-glare function is more accurate.
[0104] In some embodiments of the present disclosure, judging whether to turn on the anti-glare function of the rearview mirror of the target vehicle according to the comprehensive environment brightness and the unit environment brightness includes:
[0105] If the comprehensive ambient brightness is within the preset ambient brightness range, it is determined whether to turn on the anti-glare function of the rearview mirror of the target vehicle based on the comprehensive ambient brightness and the unit ambient brightness.
[0106] The preset environment brightness range may be a preset range of comprehensive environment brightness for determining whether to turn on the anti-glare function, and the preset environment brightness range may be set according to user needs, application scenarios, etc., and is not limited in this embodiment.
[0107] In this embodiment, after determining the comprehensive environment brightness, it is determined whether the comprehensive environment brightness is within the preset environment brightness range. If so, it means that it is necessary to determine whether to turn on the anti-glare function based on the comprehensive environment brightness. If the comprehensive environment brightness is not within the preset environment brightness range, it means that it is not necessary to turn on the anti-glare function based on the comprehensive environment brightness, and therefore it is not necessary to determine whether to turn on the anti-glare function.
[0108] In the above scheme, a preset ambient brightness range is set to avoid the large difference between the comprehensive ambient brightness and the unit ambient brightness due to the target vehicle's environment being too dark and the comprehensive ambient brightness being low, resulting in the anti-glare function being frequently activated, affecting the user's normal observation through the rearview mirror.
[0109] Next, a specific example is used to further illustrate the method for enabling the anti-glare function in the embodiment of the present disclosure. In this embodiment, the method for enabling the anti-glare function can be implemented based on three domain controllers. Figure 4 A schematic diagram of a domain controller of a target vehicle provided in an embodiment of the present disclosure, such as Figure 4 As shown, the domain controller of the target vehicle includes: an intelligent driving domain controller, a cockpit domain controller, and a vehicle control domain controller. The device for turning on the anti-glare function provided in the embodiment of the present disclosure may include the above three domain controllers.
[0110] In this embodiment, the intelligent driving domain controller obtains the rear image captured by the rearview camera, determines the overall image brightness of the rear image, and converts the overall image brightness into a comprehensive environment brightness. The rear image is gridded by image signal processing to obtain multiple local images. The candidate local images in the preset rearview mirror area are determined among the multiple local images, the local image brightness of each candidate local image is determined, and the maximum value of the local image brightness is determined to obtain the target local image brightness, and the target local image brightness is converted into a unit environment brightness. The intelligent driving domain controller sends the comprehensive environment brightness and the unit environment brightness to the cockpit domain controller, and the cockpit domain controller forwards the comprehensive environment brightness and the unit environment brightness to the vehicle control domain controller, and sends the gear position identification of the vehicle to the vehicle control domain controller.
[0111] The vehicle domain controller determines whether the comprehensive environment brightness is within the preset environment brightness range. If so, the vehicle control domain controller further determines whether the gear position mark is a forward gear mark, and whether the difference between the unit environment brightness and the comprehensive environment brightness is greater than the preset environment brightness threshold. If the gear position mark is a forward gear mark, and the difference between the unit environment brightness and the comprehensive environment brightness is greater than the preset environment brightness threshold, it is determined to turn on the anti-glare function.
[0112] In the above solution, the anti-glare function of the rearview mirror is automatically turned on based on the architecture of three domain controllers, without introducing other additional photosensors, and without limiting the shape of vehicle parts such as the tailgate and rear window to avoid affecting the light path of the photosensors. The anti-glare function is avoided when the ambient brightness is low, which improves the safety of users driving vehicles.
[0113] Figure 5 A schematic structural diagram of an opening device with an anti-glare function provided in an embodiment of the present disclosure is shown.
[0114] In some embodiments of the present disclosure, Figure 5 The anti-glare function activation device shown can be executed by an electronic device or a server. The electronic device can include but is not limited to a mobile terminal such as a vehicle-mounted terminal, and a fixed terminal such as a vehicle domain controller. The server can be a server cluster or a cloud server.
[0115] like Figure 5 As shown, the anti-glare function activation device 500 may include: a rear image acquisition module 501, an overall image brightness recognition module 502, a target local image brightness determination module 503, and an anti-glare function activation judgment module 504.
[0116] The rear image acquisition module 501 is used to acquire the rear image captured by the rear view camera of the target vehicle;
[0117] An overall image brightness recognition module 502, used to determine the overall image brightness of the rear image;
[0118] A target local image brightness determination module 503 is used to identify a target local image with the largest image brightness in the rear image, and determine the image brightness of the target local image as the target local image brightness; wherein the target local image is within a preset rearview mirror area of the rear image;
[0119] The anti-glare function activation judgment module 504 is used to determine whether to activate the anti-glare function of the rearview mirror of the target vehicle according to the overall image brightness and the target local image brightness; wherein the rearview mirror corresponds to the preset rearview mirror area.
[0120] Optionally, if the preset rearview mirror area is a preset interior rearview mirror area, the rearview mirror is an interior rearview mirror; if the preset rearview mirror area is a preset left exterior rearview mirror area, the rearview mirror is a left exterior rearview mirror; if the preset rearview mirror area is a preset right exterior rearview mirror area, the rearview mirror is a right exterior rearview mirror.
[0121] Optionally, the target local image brightness determination module 503 is used to:
[0122] Dividing the rear image into grids according to a preset number of rows and a preset number of columns to obtain a plurality of candidate partial images within the preset rearview mirror area;
[0123] The brightness of multiple local images corresponding to the multiple candidate local images is determined, and the candidate local image corresponding to the maximum brightness among the multiple local images is determined as the target local image.
[0124] Optionally, the target local image brightness determination module 503 is used to:
[0125] Performing grayscale processing and Gaussian processing on the rear image to obtain a processed image;
[0126] Determine a portion of the processed image located in the preset rearview mirror area as an intermediate image, and determine a target pixel point in the intermediate image whose image brightness is greater than a preset image brightness threshold;
[0127] The sampling position of a preset sampling frame in the rear image is determined according to the position of the target pixel point, and the rear image is sampled using the preset sampling frame according to the sampling position to obtain the target partial image.
[0128] Optionally, the anti-glare function activation determination module 504 is used to:
[0129] Determine an image brightness difference between the overall image brightness and the target local image brightness;
[0130] If the image brightness difference is greater than a preset image brightness difference threshold, the anti-glare function is turned on.
[0131] Optionally, the anti-glare function activation determination module 504 includes:
[0132] A first conversion unit, used for converting the overall image brightness to obtain the comprehensive environment brightness of the environment where the target vehicle is located;
[0133] A second conversion unit, used for converting the target local image brightness to obtain a unit environment brightness;
[0134] The judgment unit is used to judge whether to turn on the anti-glare function of the rearview mirror of the target vehicle according to the comprehensive environment brightness and the unit environment brightness.
[0135] Optionally, the first conversion unit is used to:
[0136] Determine the camera parameters of the rear image, input the rear image into a preset coefficient adjustment relationship, and obtain an adjustment value corresponding to the rear image; wherein the camera parameters include: at least one of an exposure parameter, a gain coefficient, and a gamma coefficient;
[0137] The overall image brightness is adjusted according to the adjustment value to obtain the comprehensive environment brightness.
[0138] Optionally, the judging unit is configured to:
[0139] If the comprehensive ambient brightness is within a preset ambient brightness range, it is determined whether to turn on the anti-glare function of the rearview mirror of the target vehicle based on the comprehensive ambient brightness and the unit ambient brightness.
[0140] The device for activating the anti-glare function provided in the embodiments of the present disclosure can execute the method for activating the anti-glare function provided in any embodiment of the present disclosure, and has functional modules and beneficial effects corresponding to the execution method.
[0141] Figure 6 A schematic diagram of the hardware circuit structure of a device for activating an anti-glare function provided by an embodiment of the present disclosure is shown.
[0142] like Figure 6 As shown, the anti-glare function activation device 600 may include a controller 601 and a memory 602 storing computer program instructions.
[0143] Specifically, the controller 601 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0144] The memory 602 may include a large capacity memory for information or instructions. By way of example and not limitation, the memory 602 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 602 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 602 may be inside or outside the integrated gateway device. In a particular embodiment, the memory 602 is a non-volatile solid-state memory. In a particular embodiment, the memory 602 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (Electrically Erasable Programmable ROM, EEPROM), an electrically rewritable ROM (EAROM) or a flash memory, or a combination of two or more of these.
[0145] The controller 601 reads and executes the computer program instructions stored in the memory 602 to perform the steps of the method for activating the anti-glare function provided in the embodiment of the present disclosure.
[0146] In one example, the anti-glare function activation device 600 may further include a transceiver 603 and a bus 604. Figure 6 As shown, the controller 601, the memory 602 and the transceiver 603 are connected via a bus 604 and communicate with each other.
[0147] The bus 604 includes hardware, software, or both. For example, but not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 604 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.
[0148] The following is an embodiment of a computer-readable storage medium provided in an embodiment of the present disclosure. The computer-readable storage medium and the method for activating the anti-glare function in the above-mentioned embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the computer-readable storage medium, reference can be made to the embodiment of the method for activating the anti-glare function in the above-mentioned embodiments.
[0149] This embodiment provides a storage medium containing computer executable instructions. When the computer executable instructions are executed by a computer processor, they are used to execute a method for activating an anti-glare function.
[0150] Of course, the computer executable instructions of a storage medium containing computer executable instructions provided in an embodiment of the present disclosure are not limited to the above method operations, and can also execute related operations in the method for activating the anti-glare function provided in any embodiment of the present disclosure.
[0151] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present disclosure can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present disclosure can be essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer cloud platform (which can be a personal computer, a server, or a network cloud platform, etc.) to execute the method for turning on the anti-glare function provided by each embodiment of the present disclosure.
[0152] The disclosed embodiment also provides a vehicle, comprising at least one of the following: the above-mentioned anti-glare function activation device; the above-mentioned electronic device; and the above-mentioned computer-readable storage medium.
[0153] Note that the above are only preferred embodiments of the present disclosure and the technical principles used. Those skilled in the art will understand that the present disclosure is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present disclosure. Therefore, although the present disclosure is described in more detail through the above embodiments, the present disclosure is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present disclosure, and the scope of the present disclosure is determined by the scope of the appended claims.
Claims
1. A method for activating an anti-glare function, characterized in that: include: Acquire a rear image captured by a rear-view camera of a target vehicle; determining an overall image brightness of the rear image; Identifying a target local image with the largest image brightness in the rear image, and determining the image brightness of the target local image as the target local image brightness; wherein the target local image is within a preset rearview mirror area of the rear image; According to the overall image brightness and the target local image brightness, it is determined whether to turn on the anti-glare function of the rearview mirror of the target vehicle; wherein the rearview mirror corresponds to the preset rearview mirror area.
2. The method according to claim 1, characterized in that If the preset rearview mirror area is a preset interior rearview mirror area, the rearview mirror is an interior rearview mirror; if the preset rearview mirror area is a preset left exterior rearview mirror area, the rearview mirror is a left exterior rearview mirror; if the preset rearview mirror area is a preset right exterior rearview mirror area, the rearview mirror is a right exterior rearview mirror.
3. The method according to claim 1, characterized in that The step of identifying the target local image with the maximum image brightness in the rear image comprises: Dividing the rear image into grids according to a preset number of rows and a preset number of columns to obtain a plurality of candidate partial images within the preset rearview mirror area; The brightness of multiple local images corresponding to the multiple candidate local images is determined, and the candidate local image corresponding to the maximum brightness among the multiple local images is determined as the target local image.
4. The method according to claim 1, characterized in that: The step of identifying the target local image with the maximum image brightness in the rear image comprises: Performing grayscale processing and Gaussian processing on the rear image to obtain a processed image; Determine a portion of the processed image located in the preset rearview mirror area as an intermediate image, and determine a target pixel point in the intermediate image whose image brightness is greater than a preset image brightness threshold; The sampling position of a preset sampling frame in the rear image is determined according to the position of the target pixel point, and the rear image is sampled using the preset sampling frame according to the sampling position to obtain the target partial image.
5. The method according to claim 1, characterized in that The step of judging whether to turn on the anti-glare function of the rearview mirror of the target vehicle according to the overall image brightness and the target local image brightness includes: Determine an image brightness difference between the overall image brightness and the target local image brightness; If the image brightness difference is greater than a preset image brightness difference threshold, the anti-glare function is turned on.
6. The method according to claim 1, characterized in that The step of judging whether to turn on the anti-glare function of the rearview mirror of the target vehicle according to the overall image brightness and the target local image brightness includes: Converting the overall image brightness to obtain the comprehensive ambient brightness of the environment in which the target vehicle is located; Converting the target local image brightness to obtain unit environment brightness; According to the comprehensive environment brightness and the unit environment brightness, it is determined whether to turn on the anti-glare function of the rearview mirror of the target vehicle.
7. The method according to claim 6, characterized in that The step of converting the overall image brightness to obtain the comprehensive environment brightness of the environment where the target vehicle is located includes: Determine the camera parameters of the rear image, input the rear image into a preset coefficient adjustment relationship, and obtain an adjustment value corresponding to the rear image; wherein the camera parameters include: at least one of an exposure parameter, a gain coefficient, and a gamma coefficient; The overall image brightness is adjusted according to the adjustment value to obtain the comprehensive environment brightness.
8. The method according to claim 6, characterized in that The step of judging whether to turn on the anti-glare function of the rearview mirror of the target vehicle according to the comprehensive environment brightness and the unit environment brightness includes: If the comprehensive ambient brightness is within a preset ambient brightness range, it is determined whether to turn on the anti-glare function of the rearview mirror of the target vehicle based on the comprehensive ambient brightness and the unit ambient brightness.
9. An opening device with anti-glare function, characterized in that: include: A rear image acquisition module is used to acquire a rear image captured by a rear-view camera of a target vehicle; An overall image brightness recognition module, used to determine the overall image brightness of the rear image; a target local image brightness determination module, used to identify a target local image with the largest image brightness in the rear image, and determine the image brightness of the target local image as the target local image brightness; wherein the target local image is within a preset rearview mirror area of the rear image; The anti-glare function activation judgment module is used to judge whether to activate the anti-glare function of the rearview mirror of the target vehicle according to the overall image brightness and the target local image brightness; wherein the rearview mirror corresponds to the preset rearview mirror area.
10. An electronic device, characterized in that: The electronic device comprises: Processor and memory; The processor is used to execute the steps of the method according to any one of claims 1 to 8 by calling the program or instruction stored in the memory.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program or instruction, and the program or instruction enables a computer to execute the steps of the method according to any one of claims 1 to 8.
12. A vehicle, characterized in that: Include at least one of the following: The opening device of the anti-glare function as described in claim 9; The electronic device as claimed in claim 10; The computer readable storage medium of claim 11.
Citation Information
Cited By
Control method of rearview mirror, electronic equipment and vehicle
CN120716588A
Method for controlling a rearview mirror, electronic device and vehicle
CN120716588B