Vehicle rearview mirror control method and device, vehicle and computer readable storage medium
By analyzing the lighting information of the scene in which the vehicle is located, controlling the rearview mirror to turn on the anti-glare function, solving the problem of false triggering in the prior art, and improving the function opening accuracy and driving safety.
Patent Information
- Application Number
- CN202411391533.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-04-08
AI Technical Summary
The anti-glare function of the existing vehicle rearview mirror is easily triggered by mistake when entering special scenes such as tunnels, resulting in low opening accuracy.
By obtaining the scene image of the vehicle's scene, analyzing the ambient lighting information, if the light intensity difference is greater than or equal to the preset threshold or the target frequency is greater than the preset threshold, the rearview mirror will be controlled to turn on the anti-glare function.
It improves the accuracy of turning on the anti-glare function of the rearview mirror, avoids accidental triggering in special scenarios, and enhances driving safety.
Smart Images

Figure CN119773634A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle control technology, and in particular to a vehicle rearview mirror control method, device, vehicle and computer-readable storage medium. Background Art
[0002] Strong light from behind the vehicle can be reflected by the rearview mirror and cause a dazzling effect on the driver. Therefore, the rearview mirror of the vehicle needs to have an anti-glare function.
[0003] However, existing vehicles need to activate the rearview mirror anti-glare function based on data collected by the vehicle's light sensor. The light sensor is prone to mistakenly trigger the rearview mirror anti-glare function when entering special scenarios such as tunnels, which results in low accuracy in activating the rearview mirror anti-glare function. Summary of the invention
[0004] The embodiment of the present application provides a vehicle rearview mirror control method, which can improve the accuracy of activating the anti-glare function of the rearview mirror to solve the above-mentioned technical problems.
[0005] In order to achieve the above object, according to a first aspect of the present application, a vehicle rearview mirror control method is provided, the control method comprising:
[0006] Acquire a scene image of a scene in which the vehicle is located, and acquire ambient lighting information based on the scene image;
[0007] When the ambient lighting information meets the first condition, the rearview mirror is controlled to turn on an anti-glare function.
[0008] Optionally, the scene image includes a front scene image and a rear scene image of the vehicle, and the ambient lighting information includes a light intensity difference obtained based on the front scene image and the rear scene image.
[0009] Optionally, the first condition includes: the light intensity difference is greater than or equal to a preset light intensity difference threshold.
[0010] Optionally, the scene image includes multiple front scene images and multiple rear scene images, the ambient lighting information includes the front light intensity obtained according to the multiple front scene images and the rear light intensity obtained according to the multiple rear scene images, and the light intensity difference is the difference between the front light intensity and the rear light intensity.
[0011] Optionally, the scene image includes at least one image group, the ambient lighting information includes light intensity differences corresponding to at least one image group, and one of the image groups includes the front scene image and the rear scene image with the same timestamp.
[0012] Optionally, the first condition also includes: the ratio between the number of target image groups in the scene image and the total number of image groups is greater than a preset ratio threshold, and the target image group is an image group whose corresponding light intensity difference in the scene image is greater than or equal to a preset light intensity difference threshold.
[0013] Optionally, the step of determining the preset light intensity difference threshold and / or the preset ratio threshold comprises:
[0014] Acquiring the appearance parameters of the vehicle;
[0015] The shape parameters are input into a pre-created neural network to determine the preset light intensity difference threshold and / or the preset frequency threshold.
[0016] Optionally, the step of inputting the shape parameters into a pre-created neural network and determining the preset light intensity difference threshold and / or the preset frequency threshold comprises:
[0017] Obtaining a reference light intensity difference threshold and a reference frequency threshold during vehicle operation;
[0018] The preset light intensity difference threshold is optimized based on the reference light intensity difference threshold, and the preset frequency threshold is optimized based on the reference frequency threshold.
[0019] Optionally, controlling the rearview mirror to enable an anti-glare function includes:
[0020] Determine the target anti-glare color according to the light intensity difference and a preset mapping relationship; the preset mapping relationship is a mapping relationship between the light intensity difference and the anti-glare color;
[0021] The lens color of the rearview mirror is controlled to change to the target anti-glare color.
[0022] According to the second aspect of the present application, an embodiment of the present application also provides an electronic device, including a processor, the processor is connected to a memory, and a computer program is stored in the memory; the processor is used to read the computer program stored in the memory and execute it to execute the steps of any vehicle rearview mirror control method provided in the embodiment of the present application.
[0023] According to the third aspect of the present application, an embodiment of the present application also provides a vehicle, including a display device and an electronic device.
[0024] According to the fourth aspect of the present application, an embodiment of the present application also provides a computer-readable storage medium, which stores multiple computer programs. The computer programs are suitable for loading by a processor to execute the steps of any vehicle rearview mirror control method provided in the embodiment of the present application.
[0025] According to the fifth aspect of the present application, an embodiment of the present application also provides a computer program product, including a computer program or a computer program, which, when executed by a processor, implements the steps of any vehicle rearview mirror control method provided in the embodiment of the present application.
[0026] The vehicle rearview mirror control method of the embodiment of the present application obtains a scene image of the scene in which the vehicle is located, and obtains ambient lighting information based on the scene image; when the ambient lighting information meets a first condition, the rearview mirror is controlled to turn on the anti-glare function. The ambient lighting information is determined by the scene image of the scene in which the vehicle is located, and then when the ambient lighting information meets the first condition, the rearview mirror is controlled to turn on the anti-glare function, so as to avoid the rearview mirror anti-glare function being easily triggered by mistake when entering a tunnel or other special scene, and improve the accuracy of turning on the rearview mirror anti-glare function.
[0027] Other features and advantages of the present application will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application, and those skilled in the art can obtain other drawings based on these drawings without creative work.
[0029] In order to more completely understand the present application and its beneficial effects, the following description will be given in conjunction with the accompanying drawings.
[0030] Figure 1 It is a flowchart of a first embodiment of a vehicle rearview mirror control method provided by the present application;
[0031] Figure 2 It is a flow chart of a second embodiment of the vehicle rearview mirror control method provided by the present application;
[0032] Figure 3 It is a schematic flow chart of a third embodiment of a vehicle rearview mirror control method provided by the present application;
[0033] Figure 4 is a flowchart of a fourth embodiment of a vehicle rearview mirror control method provided by the present application;
[0034] Figure 5 It is a schematic diagram of the structure of the vehicle provided in the embodiment of the present application. DETAILED DESCRIPTION
[0035] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0036] Embodiments of the present application provide a vehicle rearview mirror control method, device, vehicle, and computer-readable storage medium.
[0037] The vehicle rearview mirror control method provided in the embodiment of the present application can be applied to a vehicle, which may be a fuel vehicle, a plug-in hybrid vehicle, or a new energy vehicle, etc., and the present disclosure does not make any specific limitations on this.
[0038] The following is a detailed description of the embodiments in conjunction with the accompanying drawings. It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments. Although the logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in an order different from that shown in the accompanying drawings.
[0039] Please refer to Figure 1 , a first embodiment of the vehicle rearview mirror control method is proposed, and the vehicle rearview mirror control method of the first embodiment comprises the following steps:
[0040] Step 101, obtaining a scene image of a scene in which a vehicle is located, and obtaining ambient lighting information based on the scene image;
[0041] In this step, the vehicle includes a camera and a rearview mirror. During the driving process of the vehicle, the vehicle obtains a scene image of the scene in which the vehicle is located through the camera, and analyzes the scene image to obtain the ambient lighting information. The camera can be, for example, a driving recorder, a reversing image, a panoramic image, etc. The vehicle collects the ambient image of the scene in which the vehicle is located through the camera, and then processes the ambient image to determine the ambient lighting information around the vehicle.
[0042] It should be noted that compared with the ambient lighting information collection method based on light sensors, the ambient image around the vehicle is collected through the vehicle's existing image acquisition equipment, and then the ambient image is processed to determine the ambient lighting information around the vehicle. It has the advantages of low cost, rich information collection, stable image information collection and non-destructive equipment. It can provide more detailed and comprehensive ambient lighting information. By analyzing the image, real-time ambient lighting information can be obtained, and it can better adapt to complex scenes and dynamically changing lighting conditions.
[0043] Step 102: When the ambient lighting information meets a first condition, control the rearview mirror to enable an anti-glare function.
[0044] In this step, after the vehicle obtains the ambient lighting information around the vehicle, if the ambient lighting information meets the first condition, the rearview mirror is controlled to start the anti-glare function, so as to avoid the strong light behind the vehicle being reflected by the rearview mirror and causing glare to the driver. Optionally, the vehicle determines the light intensity difference between the front light intensity and the rear light intensity according to the ambient lighting information, and when the light intensity difference is greater than a preset light intensity difference threshold, the rearview mirror is controlled to start the anti-glare function. Optionally, the existing image acquisition device of the vehicle acquires scene images in front and behind the vehicle, and then determines whether the light intensity difference between the front light intensity and the rear light intensity is greater than a preset light intensity difference threshold according to the scene image. When the light intensity difference is greater than the preset light intensity difference threshold, the number of scene images with a light intensity difference greater than the preset light intensity difference threshold in all scene images and the total number of all scene images are counted, and when the ratio of the number to the total number is greater than the preset threshold, the rearview mirror is controlled to start the anti-glare function.
[0045] Preferably, the vehicle adopts the second method to control the rearview mirror to turn on the anti-glare function, which can avoid the anti-glare function of the rearview mirror being mistakenly triggered for a short moment when the vehicle enters a special environment.
[0046] The vehicle of this embodiment obtains a scene image of the scene in which the vehicle is located through the shooting device, and obtains ambient lighting information based on the scene image; when the ambient lighting information meets the first condition, the rearview mirror is controlled to turn on the anti-glare function. The ambient lighting information is determined through the scene image of the scene in which the vehicle is located, and then when the ambient lighting information meets the first condition, the rearview mirror is controlled to turn on the anti-glare function, so as to avoid the rearview mirror anti-glare function being easily triggered by mistake when entering special scenes such as tunnels, and improve the accuracy of turning on the rearview mirror anti-glare function.
[0047] refer to Figure 2 , a second embodiment of the present application is proposed, the difference between the second embodiment and the first embodiment is that, when the ambient lighting information meets the first condition, the rearview mirror is controlled to turn on the anti-glare function, including:
[0048] Step 201, when the light intensity difference is greater than or equal to a preset light intensity difference threshold, control the rearview mirror to turn on the anti-glare function.
[0049] In this step, the vehicle obtains a scene image of the scene in which the vehicle is located through a camera, and obtains ambient lighting information based on the scene image, wherein the scene image includes a front scene image and a rear scene image of the vehicle, and the ambient lighting information includes a light intensity difference obtained according to the front scene image and the rear scene image. The vehicle compares the light intensity difference with a preset light intensity difference threshold, and when the light intensity difference is greater than or equal to the preset light intensity difference threshold, it is determined that the ambient lighting information meets the first condition, and then the rearview mirror is controlled to turn on the anti-glare function.
[0050] Specifically, the ambient lighting information includes the lighting intensity of the scene in front of the vehicle and the lighting intensity of the scene behind the vehicle; the vehicle obtains the lighting intensity of the scene in front and the lighting intensity of the scene behind the vehicle, and calculates the difference between the lighting intensity of the scene in front and the lighting intensity of the scene behind the vehicle to obtain the light intensity difference between the scene in front of the vehicle and the scene behind the vehicle. The vehicle compares the light intensity difference between the scene in front of the vehicle and the scene behind the vehicle with a preset light intensity difference threshold, and if the light intensity difference is greater than or equal to the preset light intensity difference threshold, the rearview mirror is controlled to turn on the anti-glare function.
[0051] It should be noted that the vehicle collects scene images of the front scene and the rear scene through the existing shooting device, and then performs image conversion on the collected scene images of the front scene and the rear scene respectively, and uses the grayscale conversion method to homogenize the pictures under different lighting environments, and convert them into a forward image grayscale matrix corresponding to the scene image of the front scene and a backward image grayscale matrix corresponding to the scene image of the rear scene; the vehicle performs segmentation processing on the forward image grayscale matrix and the backward image grayscale matrix respectively, and at the same time, the forward local grayscale features and the backward local grayscale features obtained by the segmentation processing are respectively screened, and the forward grayscale maximum value and the backward grayscale maximum value are output; the vehicle determines the light intensity of the scene in front of the vehicle according to the mapping relationship between the forward grayscale maximum value and the preset grayscale value and the light intensity, and determines the light intensity of the scene behind the vehicle according to the mapping relationship between the backward grayscale maximum value and the preset grayscale value and the light intensity.
[0052] The vehicle of this embodiment controls the rearview mirror to turn on the anti-glare function when it is determined that the light intensity difference between the scene in front of the vehicle and the scene behind the vehicle is greater than or equal to a preset light intensity difference threshold. This can improve the efficiency of turning on the anti-glare function of the rearview mirror, avoid rearview mirror anti-glare, and improve driving safety.
[0053] refer to Figure 3, a third embodiment of the present application is proposed. The difference between the third embodiment and the first embodiment and the second embodiment is that the scene image includes multiple front scene images and multiple rear scene images, the ambient lighting information includes the front light intensity obtained according to the multiple front scene images and the rear light intensity obtained according to the multiple rear scene images, and the light intensity difference is the difference between the front light intensity and the rear light intensity.
[0054] Specifically, the vehicle further compares the light intensity difference between the front scene image and the rear scene image of the vehicle with the preset light intensity difference threshold. If the light intensity difference is greater than or equal to the preset light intensity difference threshold, the vehicle continues to capture the front scene image and the rear scene image through the shooting device, and determines whether the continuously captured front scene image and the rear scene image meet the first condition. If they do, the rearview mirror is controlled to turn on the anti-glare function. The first condition also includes: the ratio between the number of target image groups in the scene image and the total number of image groups is greater than the preset ratio threshold, and the target image group is the image group whose corresponding light intensity difference in the scene image is greater than or equal to the preset light intensity difference threshold.
[0055] Specifically, the steps include:
[0056] Step 301, dividing the images with the same time stamp among the plurality of front scene images and the plurality of rear scene images into the same image group;
[0057] In this step, after the vehicle determines that the first light intensity difference is greater than a preset light intensity difference threshold, the scene images of the scene in which the vehicle is located collected include multiple front scene images and multiple rear scene images, and the vehicle divides the images with the same timestamps in the multiple front scene images and the multiple rear scene images into the same image group.
[0058] It should be noted that in order to ensure the timeliness of turning on the anti-glare function, when the vehicle determines that the first light intensity difference is greater than the preset light intensity difference threshold, the vehicle continues to collect scene images of the scene in which the vehicle is located for a shorter period of time. For example, the time length is 0.2 seconds, 0.5 seconds, etc., which is not limited here; when the time length is 0.2 seconds, the frame rate of the existing image acquisition device is 60 frames, then the vehicle will collect 12 frames of vehicle forward scene images and 12 frames of vehicle rearward scene images; the vehicle divides images with the same timestamp into the same image group, and obtains 12 image groups.
[0059] Step 302: Control the rearview mirror to enable an anti-glare function according to the light intensity difference corresponding to the image group.
[0060] In this step, the vehicle analyzes all image groups and the light intensity differences corresponding to the image groups, and when the analysis result meets the preset conditions, controls the rearview mirror to turn on the anti-glare function. The scene image includes at least one group of image groups, the ambient lighting information includes the light intensity differences corresponding to at least one group of image groups, and one group of image groups includes the front scene image and the rear scene image with the same timestamp.
[0061] Optionally, the vehicle arbitrarily selects at least two image groups from all image groups for analysis, calculates the average light intensity difference based on the light intensity difference corresponding to each selected image group, and compares the average light intensity difference with a preset light intensity difference threshold; if the average light intensity difference is greater than the preset light intensity difference threshold, the rearview mirror is controlled to turn on the anti-glare function; if the average light intensity difference is not greater than the preset light intensity difference threshold, the rearview mirror is not controlled to turn on the anti-glare function.
[0062] Optionally, the vehicle analyzes all image groups to determine the light intensity difference corresponding to each image group; then the light intensity difference corresponding to each image group is analyzed, and when the analysis result meets the preset conditions, the rearview mirror is controlled to turn on the anti-glare function; when the analysis result does not meet the preset conditions, the rearview mirror is not controlled to turn on the anti-glare function.
[0063] Specifically, step 302 includes:
[0064] Step 3021: for each of the image groups, if there is a target image group whose light intensity difference is greater than a preset light intensity difference threshold, control the rearview mirror to turn on the anti-glare function.
[0065] In this step, the vehicle obtains the light intensity difference corresponding to each image group. The vehicle compares the light intensity difference corresponding to each image group with the preset light intensity difference threshold, and determines the image group with a light intensity difference greater than the preset light intensity difference threshold as the target image group; when it is determined that there is a target image group with a light intensity difference greater than the preset light intensity difference threshold, the rearview mirror is controlled to turn on the anti-glare function; when it is determined that there is no target image group with a light intensity difference greater than the preset light intensity difference threshold, the rearview mirror is not controlled to turn on the anti-glare function.
[0066] Optionally, the vehicle counts the number of target image groups and compares the number with a preset number threshold. If the number is greater than the preset number threshold, the rearview mirror is controlled to turn on the anti-glare function. If the number is not greater than the preset number threshold, the rearview mirror is not controlled to turn on the anti-glare function.
[0067] Optionally, the vehicle counts the number of target image groups and the total number of image groups, and determines whether to control the rearview mirror to turn on the anti-glare function according to the number of target light intensity differences and the total number of image groups.
[0068] Specifically, step 3021 includes:
[0069] Step 30211, if there are target image groups whose light intensity difference is greater than a preset light intensity difference threshold, then counting the number of the target image groups;
[0070] In this step, when the vehicle determines that there are target image groups with a light intensity difference greater than a preset light intensity difference threshold, the number of target image groups and the total number of image groups are counted; it can be understood that the number of target image groups is the number of image groups corresponding to the light intensity difference greater than the preset light intensity difference threshold.
[0071] Step 30212, calculating the ratio between the number and the total number of the image groups, and determining the target frequency;
[0072] In this step, the vehicle calculates the ratio between the number of target light intensity differences and the total number of image groups to determine the target frequency. The target frequency is used to characterize the probability of the image group corresponding to the target light intensity difference being greater than the preset light intensity difference threshold.
[0073] Step 30213: If the target frequency is greater than a preset frequency threshold, the rearview mirror is controlled to turn on an anti-glare function.
[0074] In this step, the vehicle compares the target frequency with the preset frequency threshold. If the target frequency is greater than the preset frequency threshold, the rearview mirror is controlled to turn on the anti-glare function; if the target frequency is not greater than the preset frequency threshold, the rearview mirror is not controlled to turn on the anti-glare function.
[0075] Specifically, the process before step 3021 includes:
[0076] Step 3021a, obtaining a front scene image and a rear scene image corresponding to the image group;
[0077] Step 3021b, determining the ambient light intensity in front of the vehicle based on the front scene image, and determining the ambient light intensity in the rear of the vehicle based on the rear scene image;
[0078] Step 3021c: Determine the target light intensity difference corresponding to the image group based on the ambient light intensity in front of the vehicle and the ambient light intensity behind the vehicle.
[0079] In steps 3021a to 3021c, for each image group, the vehicle obtains the front scene image and the rear scene image corresponding to the image group, performs image conversion on the collected front scene image and the rear scene image, and homogenizes the images under different lighting environments through a grayscale conversion method to convert them into a front scene image grayscale matrix and a rear scene image grayscale matrix; the vehicle segmentation processes the front scene image grayscale matrix and the rear scene image grayscale matrix respectively, and simultaneously screens the local grayscale features of the front image and the local grayscale features of the rear image obtained by the segmentation process respectively, and outputs the maximum grayscale value of the front image and the maximum grayscale value of the rear image; the vehicle determines the ambient light intensity in front of the vehicle based on the mapping relationship between the maximum grayscale value of the front image and the preset grayscale value and the light intensity, and determines the ambient light intensity behind the vehicle based on the mapping relationship between the maximum grayscale value of the rear image and the preset grayscale value and the light intensity, and then determines the light intensity difference corresponding to the image group.
[0080] Further, controlling the rearview mirror to enable an anti-glare function includes:
[0081] Step a, determining a target anti-glare color according to the mapping relationship between the light intensity difference and a preset light intensity difference and the anti-glare color;
[0082] Step b, controlling the lens color of the rearview mirror to change to the target anti-glare color.
[0083] In step a to step b, when the vehicle confirms that the light intensity difference between the front scene image and the rear scene image collected for the first time is greater than the preset light intensity difference threshold, and determines that the target frequency of the image group corresponding to the light intensity difference greater than the preset light intensity difference threshold in all the image groups collected subsequently is greater than the preset frequency threshold, the target anti-glare color is determined according to the mapping relationship between the light intensity difference and the preset light intensity difference and the anti-glare color, and the lens color of the rearview mirror is controlled to change to the target anti-glare color, so that the rearview mirror turns on the anti-glare function to avoid the strong light behind the vehicle being reflected by the rearview mirror and causing a dazzling effect on the driver. Specifically, the larger the target light intensity difference, the higher the anti-glare level, and the darker the target anti-glare color of the rearview mirror.
[0084] When the vehicle of this embodiment determines that the light intensity difference between the light intensity in front of the vehicle and the light intensity behind the vehicle is greater than the preset light intensity difference threshold, the existing image acquisition device continues to acquire scene images in front of and behind the vehicle, analyzes the scene images in front of and behind the vehicle, and determines the target frequency of the image group with a light intensity difference greater than the preset light intensity difference threshold. If the target frequency is greater than the preset frequency threshold, the rearview mirror is controlled to turn on the anti-glare function; if the target frequency is not greater than the preset frequency threshold, the rearview mirror is not controlled to turn on the anti-glare function. This avoids the situation where the anti-glare function of the rearview mirror is mistakenly triggered in a short moment when the vehicle enters a special environment, improves the accuracy of turning on the anti-glare function of the rearview mirror, and improves driving safety.
[0085] refer to Figure 4 , a fourth embodiment of the present application is proposed. The difference between the fourth embodiment and the first embodiment and the third embodiment is that the step of determining the preset light intensity difference threshold and / or the preset frequency threshold includes:
[0086] Step c, obtaining the appearance parameters of the vehicle;
[0087] In this step, the vehicle obtains the vehicle's appearance parameters, where the appearance parameters include the vehicle's length, width, height, and the position of the rearview mirror.
[0088] Step d: inputting the shape parameters into a pre-created neural network to determine the preset light intensity difference threshold and / or the preset frequency threshold.
[0089] In this step, the vehicle inputs shape parameters such as length, width, height and position of rearview mirrors into a pre-created neural network, and the preset light intensity difference threshold and / or preset frequency threshold are determined through the output of the neural network.
[0090] It should be noted that the neural network training process is as follows: input the [N*6] experience matrix, which represents the [length, width, height, rearview mirror position, light intensity difference threshold, frequency threshold] data of N groups of different vehicles. These data are obtained from previous or empirical real vehicles. The experience matrix is input into the neural network as the initial database, and all connection weights and thresholds are randomly initialized. The [N*6] experience matrix is split into [x k ,y k ], where x k is an N*4 matrix, y k is an N*2 matrix, x k and k are training input data and training output data respectively, where x k The multi-order matrix input information of vehicle length, width, height, and rearview mirror position, y k It is the second-order matrix output information of the light intensity difference threshold and the frequency threshold; based on the activation function: Calculate the target output of the experience matrix of [N*6], where is the target output, f() is the activation function; calculate the output layer neuron gradient term, where, g j is the output layer neuron gradient term, is the target output, Output information of the second-order matrix of the light intensity difference threshold and the frequency threshold in the experience matrix; calculate the gradient term of the hidden layer neurons, where, e h is the gradient term of the hidden layer neurons, b his the bias vector, is a constant, Γ is the threshold, W hj is the weight matrix of the network, g j is the gradient term of the output layer neurons; update the link weight W hj and V ih and the threshold θ j and γ h , where W hj =W hj +ηg j b h , V ih =V ih +ηe h x i ,θ j =θ j -ηg j , γ h =γ h -ηe h ;Will and The difference is compared with the preset threshold ε. If the difference is less than the preset threshold, the training is completed. If the difference is not less than the preset threshold, the above training steps are repeated until the training is completed.
[0091] Further, after step d, the method further comprises:
[0092] Step e, obtaining a reference light intensity difference threshold and a reference frequency threshold during vehicle operation;
[0093] Step f: optimizing the preset light intensity difference threshold based on the reference light intensity difference threshold, and optimizing the preset frequency threshold based on the reference frequency threshold.
[0094] In steps e to f, the vehicle obtains feedback information from the user regarding turning on the anti-glare function during vehicle operation, extracts the environmental conditions in which the user believes the anti-glare state should not be turned on from the feedback information, finds the corresponding ambient lighting parameters, and then determines the reference light intensity difference threshold and reference frequency threshold of the vehicle during operation based on the corresponding ambient lighting parameters, optimizes the preset light intensity difference threshold based on the reference light intensity difference threshold, and optimizes the preset frequency threshold based on the reference frequency threshold.
[0095] The vehicle of this embodiment inputs the appearance parameters into a pre-created neural network to determine the preset light intensity difference threshold and / or the preset frequency threshold, thereby simplifying the process and cost of actual vehicle adjustment of the threshold; at the same time, the preset light intensity difference threshold and the preset frequency threshold are optimized based on the reference light intensity difference threshold and the reference frequency threshold during vehicle operation, which can further make the threshold more in line with actual usage, further avoid the false triggering of the anti-glare function of the rearview mirror for a brief moment when the vehicle enters a special environment, improve the accuracy of turning on the anti-glare function of the rearview mirror, and at the same time improve driving safety.
[0096] Accordingly, the embodiment of the present application also provides a vehicle, such as Figure 5 As shown, Figure 5 A schematic diagram of the structure of a vehicle provided in an embodiment of the present application. The vehicle 1100 includes a processor 1101 having one or more processing cores, a memory 1102 having one or more computer-readable storage media, and a computer program stored in the memory 1102 and executable on the processor. The processor 1101 is electrically connected to the memory 1102. It will be understood by those skilled in the art that the vehicle structure shown in the figure does not constitute a limitation on the vehicle, and may include more or fewer components than shown, or combine certain components, or arrange the components differently.
[0097] The processor 1101 is the control center of the vehicle 1100, and uses various interfaces and lines to connect various parts of the entire vehicle 1100. By running or loading software programs and / or units stored in the memory 1102, and calling data stored in the memory 1102, it executes various functions of the vehicle 1100 and processes data, thereby monitoring the vehicle 1100 as a whole. The processor 1101 can be a processor CPU, a graphics processor GPU, a network processor (Network Processor, NP), etc., and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application.
[0098] In an embodiment of the present application, the processor 1101 in the vehicle 1100 will load the computer program corresponding to the process of one or more applications into the memory 1102 according to the following steps, and the processor 1101 will run the application stored in the memory 1102 to execute the vehicle rearview mirror control method.
[0099] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0100] Optional, such as Figure 5As shown, the vehicle 1100 further includes: a touch screen 1103, a radio frequency circuit 1104, an audio circuit 1105, an input unit 1106, and a power supply 1107. The processor 1101 is electrically connected to the touch screen 1103, the radio frequency circuit 1104, the audio circuit 1105, the input unit 1106, and the power supply 1107, respectively. Those skilled in the art will appreciate that Figure 5 The vehicle structure shown in the figure does not constitute a limitation on the vehicle, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0101] The touch display screen 1103 can be used to display a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface. The touch display screen 1103 may include a display panel and a touch panel. Among them, the display panel can be used to display information input by the user or information provided to the user and various graphical user interfaces of the vehicle, which can be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel can be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light-emitting diode (OLED, Organic Light-Emitting Diode) and the like. The touch panel can be used to collect the user's touch operation on or near it (such as the user uses any suitable object or accessory such as a finger, a stylus, etc. on the touch panel or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute the corresponding program. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 1101, and can receive the command sent by the processor 1101 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 1101 to determine the type of touch event, and then the processor 1101 provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 1103 to realize the input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize the input and output functions. That is, the touch display screen 1103 can also be used as a part of the input unit 1106 to realize the input function.
[0102] The RF circuit 1104 may be used to send and receive RF signals to establish wireless communication with network devices or other vehicles through wireless communication, and to send and receive signals with network devices or other vehicles.
[0103] The audio circuit 1105 can be used to provide an audio interface between the user and the vehicle through a speaker and a microphone. The audio circuit 1105 can transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 1105 and converted into audio data, and then the audio data is output to the processor 1101 for processing, and then sent to another vehicle through the radio frequency circuit 1104, or the audio data is output to the memory 1102 for further processing. The audio circuit 1105 may also include an earphone jack to provide communication between an external headset and the vehicle.
[0104] The input unit 1106 may be used to receive input numbers, character information or user feature information (such as fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0105] The power supply 1107 is used to supply power to various components of the vehicle 1100. Optionally, the power supply 1107 can be logically connected to the processor 1101 through a power management device, so that the power management device can manage charging, discharging, and power consumption. The power supply 1107 can also include one or more DC or AC power supplies, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0106] although Figure 5 Not shown, the vehicle 1100 may also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.
[0107] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0108] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by a computer program, or by controlling related hardware through a computer program. The computer program may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0109] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0110] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0111] The embodiments, implementation methods and related technical features of the present application can be combined and replaced with each other without conflict.
[0112] The above are only preferred embodiments of the present application and do not constitute any form of limitation to the present application. Although the descriptions of various embodiments in the embodiments of the present application have different focuses, for parts not described in detail in a certain embodiment, reference can be made to the relevant embodiments of other embodiments. However, any modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present application without departing from the content of the technical solution of the present application are still within the scope of the technical solution of the present application.
Claims
1. A vehicle rearview mirror control method, characterized in that: The control method comprises: Acquire a scene image of a scene in which the vehicle is located, and acquire ambient lighting information based on the scene image; When the ambient lighting information meets the first condition, the rearview mirror is controlled to turn on an anti-glare function.
2. The vehicle rearview mirror control method according to claim 1, characterized in that: The scene image includes a front scene image and a rear scene image of the vehicle, and the ambient lighting information includes a light intensity difference obtained according to the front scene image and the rear scene image.
3. The vehicle rearview mirror control method according to claim 2, characterized in that: The first condition includes: the light intensity difference is greater than or equal to a preset light intensity difference threshold.
4. The method according to claim 3, characterized in that The scene image includes multiple front scene images and multiple rear scene images, the ambient lighting information includes the front light intensity obtained according to the multiple front scene images and the rear light intensity obtained according to the multiple rear scene images, and the light intensity difference is the difference between the front light intensity and the rear light intensity.
5. The method according to claim 3, characterized in that: The scene images include at least one image group, the ambient lighting information includes light intensity differences corresponding to at least one image group, and one of the image groups includes the front scene image and the rear scene image with the same timestamp.
6. The method according to claim 5, characterized in that The first condition also includes: the ratio between the number of target image groups in the scene image and the total number of image groups is greater than a preset ratio threshold, and the target image group is an image group whose corresponding light intensity difference in the scene image is greater than or equal to a preset light intensity difference threshold.
7. The vehicle rearview mirror control method according to claim 6, characterized in that: The step of determining the preset light intensity difference threshold and / or the preset ratio threshold comprises: Acquiring the appearance parameters of the vehicle; The shape parameters are input into a pre-created neural network to determine the preset light intensity difference threshold and / or the preset frequency threshold.
8. The vehicle rearview mirror control method according to claim 7, characterized in that: After inputting the shape parameters into a pre-created neural network and determining the preset light intensity difference threshold and / or the preset frequency threshold, the method further comprises: Obtaining a reference light intensity difference threshold and a reference frequency threshold during vehicle operation; The preset light intensity difference threshold is optimized based on the reference light intensity difference threshold, and the preset frequency threshold is optimized based on the reference frequency threshold.
9. The vehicle rearview mirror control method according to any one of claims 1 to 8, characterized in that: The controlling the rearview mirror to start the anti-glare function includes: Determine the target anti-glare color according to the light intensity difference and a preset mapping relationship; the preset mapping relationship is a mapping relationship between the light intensity difference and the anti-glare color; The lens color of the rearview mirror is controlled to change to the target anti-glare color.
10. An electronic device, characterized in that: The method comprises a processor connected to a memory on which a computer program is stored; the processor is used to read and execute the computer program stored in the memory, so that the method according to any one of claims 1 to 9 is executed.
11. A vehicle, characterized in that: The electronic device comprises a display apparatus and the electronic device according to claim 10.
12. A computer-readable storage medium, characterized in that: Computer executable instructions are stored, and the computer executable instructions are used to make a computer execute the method according to any one of claims 1 to 9.