A vehicle control method, device, electronic equipment and vehicle

By acquiring images of the cab and vehicle environment, analyzing brightness values ​​and calculating differences, the light transmittance of the tinted area of ​​the windshield is automatically adjusted, solving the problem of driver glare under strong external light and improving driving safety.

CN119898170BActive Publication Date: 2025-12-16BEIJING CO WHEELS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311416022.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-27
Publication Date
2025-12-16
Estimated Expiration
2043-10-27

AI Technical Summary

Technical Problem

When drivers encounter strong external light, current technology requires manual operation of anti-glare devices, which is inconvenient and ineffective, affecting driving safety.

Method used

By acquiring images of the cab and vehicle environment, analyzing brightness values ​​and calculating differences, the transmittance of the chromatic area of ​​the windshield is automatically adjusted to reduce the intensity of strong light sources.

Benefits of technology

It automatically prevents glare without affecting the driver's vision, thus improving driving safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119898170B_ABST
    Figure CN119898170B_ABST
Patent Text Reader

Abstract

The application discloses a vehicle control method and device, electronic equipment and vehicle, and relates to the technical field of vehicles. The method comprises the following steps: acquiring a first image and a second image; acquiring an average brightness value of the first image and a region to be protected; dividing the second image into a plurality of image blocks and acquiring an average brightness value of each image block; calculating the difference between the average brightness value of each image block and the average brightness value of the first image to determine whether there is a strong light source image block in the plurality of image blocks; if there is a strong light source image block in the plurality of image blocks, acquiring a region to be colored of a windshield; and controlling the light transmittance of the region to be colored to change from a first light transmittance to a second light transmittance, wherein the second light transmittance is smaller than the first light transmittance. The application aims to solve the problem of glare caused by a strong light source, reduces the light transmittance of the region to be colored through the above method, weakens the light intensity of the strong light source through the windshield, and thus prevents glare and improves driving safety.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of vehicles, in particular to a vehicle control method and device, an electronic device and a vehicle. BACKGROUND

[0002] During driving, the driver often encounters the influence of external strong light, such as the light emitted by the high beam of the oncoming vehicle, the strong sunlight at sunrise or sunset, and even the light refracted or reflected by the surface of the building, the surface of the vehicle and the ground, which may become external strong light affecting the driver, and will have a glare effect on the driver, making the driver's vision blurred and color deviation. It will cause the driver to be unable to see the surrounding vehicle driving environment, thereby increasing the safety hazard.

[0003] In the prior art, the driver generally takes measures such as wearing sunglasses and using a sun visor to reduce the glare effect caused by external strong light; the prior art usually needs manual operation for anti-glare, and inconvenient operation will distract the driver, and the anti-glare effect is poor and is not conducive to driving safety. Therefore, how to automatically block external strong light for the driver without the need for the driver to make an operation and without affecting the driver's vision has become a problem to be solved. SUMMARY

[0004] The present application provides a vehicle control method, device, electronic device and vehicle to prevent glare and improve driving safety.

[0005] In a first aspect, an embodiment of the present application provides a vehicle control method, the method comprising:

[0006] obtaining a first image and a second image, the first image being an image obtained by image acquisition in a cab, and the second image being an image obtained by image acquisition of a vehicle driving environment;

[0007] obtaining an average brightness value of the first image and a to-be-protected area;

[0008] dividing the second image into a plurality of image blocks and obtaining an average brightness value of each image block;

[0009] calculating the difference between the average brightness value of each image block and the average brightness value of the first image to determine whether there is a strong light source image block in the plurality of image blocks;

[0010] if there is a strong light source image block in the plurality of image blocks, obtaining a to-be-tinted area of the windshield, the to-be-tinted area of the windshield being an area on the line corresponding to the strong light source image block among the plurality of areas of the windshield corresponding to the to-be-protected area;

[0011] Controlling the light transmittance of the to-be-tinted region to change from a first light transmittance to a second light transmittance, the second light transmittance being less than the first light transmittance.

[0012] In some embodiments, the obtaining the to-be-protected region comprises:

[0013] Performing human eye recognition on the first image to obtain a human eye position in the first image;

[0014] Determining a region within a preset range of the human eye position as the to-be-protected region.

[0015] In some embodiments, the calculating the difference between the average brightness value of each image block and the average brightness value of the first image to determine whether the plurality of image blocks includes a strong light source image block comprises:

[0016] Calculating the difference between the average brightness value of each image block and the average brightness value of the first image;

[0017] If the difference between the average brightness value of a first image block in the plurality of image blocks and the average brightness value of the first image is greater than a threshold difference value, determining the first image block as a strong light source image block.

[0018] In some embodiments, the obtaining the to-be-tinted region of the windshield comprises:

[0019] Obtaining a first position coordinate and a second position coordinate, the first position coordinate being a position coordinate of a position corresponding to the to-be-protected region in a world coordinate system, and the second position coordinate being a position coordinate of a position corresponding to the strong light source image block in the world coordinate system;

[0020] Respectively obtaining coordinate ranges of a plurality of regions of the windshield in the world coordinate system;

[0021] Obtaining a third position coordinate, the third position coordinate being a position coordinate of an intersection point of a line connecting the first position coordinate and the second position coordinate and the windshield;

[0022] Determining a region of the windshield corresponding to the coordinate range to which the third position coordinate belongs as the to-be-tinted region.

[0023] In some embodiments, the obtaining the first position coordinate and the second position coordinate comprises:

[0024] Obtaining a first pixel point coordinate and a second pixel point coordinate, the first pixel point coordinate being a coordinate of a pixel point corresponding to the to-be-protected region in a camera coordinate system, and the second pixel point coordinate being a coordinate of a pixel point corresponding to the strong light source image block in the camera coordinate system;

[0025] The first pixel point coordinate is converted into the first position coordinate through camera internal and external parameters, and the second pixel point coordinate is converted into the second position coordinate through the camera internal and external parameters.

[0026] In some embodiments, before the light transmittance of the to-be-tinted region is controlled to change from the first light transmittance to the second light transmittance, the method further includes:

[0027] According to a brightness difference value between the average brightness value of the strong light source image block and the average brightness value of the first image, and a preset corresponding relationship, the second light transmittance is obtained.

[0028] The preset corresponding relationship includes a corresponding relationship between a plurality of difference value ranges and light transmittances.

[0029] In some embodiments, the second light transmittance is greater than a preset light transmittance.

[0030] In a second aspect, the embodiments of the present application provide a vehicle control device, including:

[0031] The acquisition unit is configured to acquire a first image and a second image, the first image being an image acquired by image collection in a cab, and the second image being an image acquired by image collection of a vehicle driving environment.

[0032] The analysis unit is configured to acquire an average brightness value of the first image and a to-be-protected region.

[0033] The processing unit is configured to divide the second image into a plurality of image blocks, and acquire an average brightness value of each image block.

[0034] The calculation unit is configured to calculate a difference value between the average brightness value of each image block and the average brightness value of the first image to determine whether there is a strong light source image block in the plurality of image blocks.

[0035] The judgment unit is configured to, if there is a strong light source image block in the plurality of image blocks, acquire a to-be-tinted region of a windshield, the to-be-tinted region of the windshield being a region on a line corresponding to the strong light source image block and located at a position corresponding to the to-be-protected region among a plurality of regions of the windshield.

[0036] The control unit is configured to control the light transmittance of the to-be-tinted region to change from a first light transmittance to a second light transmittance, the second light transmittance being less than the first light transmittance.

[0037] In a third aspect, the embodiments of the present application provide an electronic device, including a memory and a processor, the memory being configured to store a computer program, and the processor being configured to, when executing the computer program, enable the electronic device to implement the vehicle control method according to any one of the first aspect.

[0038] In a fourth aspect, the embodiments of the present application provide a vehicle, comprising the vehicle control device according to the second aspect or the electronic device according to the third aspect.

[0039] The vehicle control method provided by the embodiments of the present application first acquires a first image and a second image; the first image is an image acquired by image collection in a cab, and the second image is an image acquired by image collection of a vehicle driving environment; then an average brightness value of the first image and a to-be-protected region are acquired from the first image, the second image is divided into a plurality of image blocks, and an average brightness value of each image block is acquired; whether there is a strong light source image block in the plurality of image blocks is determined by calculating a difference value between the average brightness value of each image block and the average brightness value of the first image; if there is a strong light source image block in the plurality of image blocks, a to-be-tinted region of the windshield is acquired, the to-be-tinted region of the windshield is a region on a line corresponding to the to-be-protected region and the strong light source image block among a plurality of regions of the windshield; finally, the light transmittance of the to-be-tinted region is controlled to change from a first light transmittance to a second light transmittance, and the second light transmittance is less than the first light transmittance. Since the embodiments of the present application first process the first image and the second image by the above method, the position corresponding to the to-be-protected region and the position corresponding to the strong light source image block are acquired, then the position corresponding to the to-be-protected region and the position corresponding to the strong light source image block are connected to acquire the to-be-tinted region of the windshield, and the light transmittance of the to-be-tinted region of the windshield is reduced to weaken the light intensity of the strong light source passing through the windshield, so as to realize the automatic anti-dazzling of the windshield, and further avoid the problem of dazzling caused by the direct irradiation of the strong light source to the human eye, thereby improving the driving safety of the vehicle. BRIEF DESCRIPTION OF DRAWINGS

[0040] The accompanying drawings, which are incorporated herein and constitute part of the specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments or the prior art description will be briefly introduced as follows, and obviously, other drawings can also be obtained by those of ordinary skill in the art without any creative labor.

[0042] Figure 1 is a flow diagram of an embodiment of the vehicle control method provided by the present application;

[0043] Figure 2 is a flow diagram of another embodiment of the vehicle control method provided by the present application;

[0044] Figure 3is a position schematic diagram of the first position coordinate, the second position coordinate and the third position coordinate provided by an embodiment of the present application;

[0045] Figure 4 is a schematic diagram of the windshield being divided into multiple regions provided by an embodiment of the present application;

[0046] Figure 5 is a structural schematic diagram of the vehicle control device provided by an embodiment of the present application;

[0047] Figure 6 is a structural schematic diagram of the electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0048] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to 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 the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0049] In the following description, specific details are set forth in connection with the present application, such as specific system structures, interfaces, techniques, and the like, in order to provide a thorough understanding of the present application. However, persons skilled in the art will understand that the present application can be practiced without employing these specific details.

[0050] The terms "first", "second", "third" in the present application are only for descriptive purpose, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features limited by "first", "second", "third" can explicitly or implicitly include at least one of the features. In the description of the present application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise explicitly and specifically limited. All directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present application are only used to explain the relative position relationship, movement condition, etc. between the components in a certain specific posture (as shown in the drawings), and if the specific posture changes, the directional indications also change accordingly. The terms "include" and "have" in the embodiments of the present application and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but can optionally include steps or units not listed, or can optionally include other steps or components inherent to the process, method, product or device.

[0051] Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are they necessarily mutually exclusive of one another. As will be apparent to those of ordinary skill in the art, embodiments described herein can be combinable with other embodiments.

[0052] The application will be described in detail below with reference to the accompanying drawings and embodiments.

[0053] The application provides an embodiment of a vehicle control method, referring to Figure 1 The vehicle control method provided by the embodiment includes the following steps:

[0054] S101, acquiring a first image and a second image.

[0055] In some embodiments, the implementation of the above step S101 (acquiring a first image and a second image) can include:

[0056] Acquiring a first image and a second image, the first image is an image acquired by image collection in the cab, and the second image is an image acquired by image collection of the vehicle driving environment.

[0057] That is, a rearview camera can be arranged behind the front windshield of the vehicle and face the cab of the vehicle, and the rearview camera can be used to collect images in the cab to acquire the first image. In addition, a wide-angle front camera can be arranged behind the front windshield of the vehicle and face the outside of the cab of the vehicle, and the wide-angle front camera can be used to collect images of the vehicle driving environment (such as the front of the vehicle) to acquire the second image.

[0058] It should be noted that the first image can include an image of the face area of the cab personnel (including the main driver seat personnel and / or the co-driver seat personnel), and the vehicle driving environment in the second image can include the external environment of the cab with a strong light source. In addition, the specific model and setting position of the sensor for collecting the first image and the second image are not limited, and any sensor that can collect the first image or the second image can be used.

[0059] S102, acquiring an average brightness value of the first image and a to-be-protected area.

[0060] The implementation of acquiring the average brightness value of the first image in the above step S102 can be acquired by using the existing method for acquiring the brightness value of the picture.

[0061] The implementation of acquiring the to-be-protected area of the first image in the above step S102 can include:

[0062] The first image is subjected to human eye recognition to obtain a human eye position in the first image; and a region in a preset range of the human eye position is determined as a region to be protected.

[0063] Specifically, the first image obtained by the rear-view camera can be transmitted to an image processor, the image processor obtains an average brightness value of the first image after receiving the first image; and the human eye position is identified by scanning the face in the first image, and a region in a preset range of the human eye position is determined as a region to be protected.

[0064] For example, the preset range of the human eye position can include only the two eyes of the person, or can include the face of the person.

[0065] It should be noted that the rear-view camera can be installed in the cab (for example, it can be installed at the position of the rear-view mirror in the cab, for photographing the image of the region where the face is located), and the human eye can be observed. In addition, the average brightness value of the first image obtained by the rear-view camera can reflect the light intensity of the environment in the cab.

[0066] S103, dividing the second image into a plurality of image blocks, and obtaining an average brightness value of each image block.

[0067] The step S103 can be achieved by transmitting the second image obtained by the wide-angle front-view camera to the image processor, and the image processor divides the second image into a plurality of image blocks after receiving the second image, and obtains an average brightness value of each image block.

[0068] For example, in the embodiment of the present application, the average brightness value of each image block can be directly obtained by the image processor, or can be achieved in the following manner, which can specifically include:

[0069] Step a: setting the proportion of the first image block in the second image to 100%, and the proportions of other image blocks in the second image to 0% except the first image block.

[0070] Step b: outputting the average brightness value of the second image in step a, which is the average brightness value of the first image block.

[0071] Step c: sequentially outputting the average brightness value of each image block according to steps a and b.

[0072] It should be noted that the wide-angle front-view camera can be installed in the cab (behind the windshield), which can fully cover the field of view of the front region, and the average brightness value of each image block can reflect the light intensity of the strong light source.

[0073] For example, the lens field of view angle of the wide-angle front-view camera can be 120°, i.e., the lens of the wide-angle front-view camera is a super wide-angle lens. It is to be noted that the embodiments of the present application do not limit the angle of the lens field of view angle of the wide-angle front-view camera, and the lens field of view angle of the wide-angle front-view camera can also be 85°, 90°, 95°, 100°, 110°, etc. In addition, the average brightness value of each image block can also be obtained in the prior art manner, such as regarding each image block as a separate image, and then using the implementation manner of obtaining the average brightness value of the first image in S102 to obtain the average brightness value of each image block.

[0074] S104, determining whether there is a strong light source image block in the plurality of image blocks.

[0075] In some embodiments, the implementation manner of step S104 (determining whether there is a strong light source image block in the plurality of image blocks) can include:

[0076] calculating the difference between the average brightness value of each image block and the average brightness value of the first image to determine whether there is a strong light source image block in the plurality of image blocks.

[0077] For example, the microcontroller calculates the difference between the average brightness value of a first image block in the plurality of image blocks obtained by dividing the second image and the average brightness value of the first image, and when the difference is greater than a preset brightness difference, it is determined that the first image block is a strong light source image block, wherein the first image block can be any one of the plurality of image blocks obtained by dividing the second image.

[0078] If the above step S104 determines that there is a strong light source image block in the plurality of image blocks, the following step S105 is performed:

[0079] S105, obtaining a to-be-tinted area of the windshield.

[0080] In some embodiments, the implementation manner of the above step S105 (obtaining a to-be-tinted area of the windshield) can include:

[0081] If there is a strong light source image block in the plurality of image blocks, the to-be-tinted area corresponding to the strong light source image block is obtained, and the to-be-tinted area is an area of the windshield located on the line connecting the to-be-protected area and the strong light source image block.

[0082] The to-be-tinted area of the windshield is an area of a plurality of areas of the windshield located on the line connecting the position corresponding to the to-be-protected area and the strong light source image block.

[0083] In some embodiments, the positions of the strong light source image blocks, the positions of the various regions of the windshield, and the positions corresponding to the regions to be protected can be converted to the same coordinate system, such as a world coordinate system, a vehicle coordinate system, a camera coordinate system of an image acquisition device used to acquire the first image, a camera coordinate system of an image acquisition device used to acquire the second image, etc. Then a straight line connecting the position of the strong light source image block and the position corresponding to the region to be protected (such as a straight line connecting the center points of the strong light source image block and the region to be protected) is obtained, and the intersection of the straight line and the windshield is obtained, and finally the region of the windshield to which the intersection belongs is determined as the region to be tinted of the windshield.

[0084] It should be noted that the number of regions to be tinted of the windshield obtained in the embodiments of the present application can be any number, and the present application does not limit the number of regions to be tinted of the windshield. For example, there are 2 strong light source image blocks in the plurality of image blocks obtained by segmenting the second image, and the regions to be tinted determined according to the 2 strong light source image blocks are the same region of the windshield (the intersection of the corresponding connecting line and the windshield is located in the same region of the windshield), then the number of regions to be tinted of the windshield is 1. For another example, there are 3 strong light source image blocks in the plurality of image blocks obtained by segmenting the second image, and the regions to be tinted determined according to the 3 strong light source image blocks are different regions of the windshield (the intersections of the corresponding connecting lines and the windshield are located in different regions of the windshield, respectively), then the number of regions to be tinted of the windshield is 3.

[0085] S106, control the light transmittance of the region to be tinted to change from the first light transmittance to the second light transmittance, the second light transmittance being less than the first light transmittance.

[0086] For example, the first light transmittance can be 90%, and the second light transmittance can be 85%.

[0087] That is, the light transmittance of the region to be tinted is controlled to change from 90% to 85%.

[0088] For another example, the first light transmittance can be 90%, and the second light transmittance can be 80%.

[0089] That is, the light transmittance of the region to be tinted is controlled to change from 90% to 80%.

[0090] For another example, the first light transmittance can be 85%, and the second light transmittance can be 80%.

[0091] That is, the light transmittance of the region to be tinted is controlled to change from 85% to 80%.

[0092] For another example, the first light transmittance can be 80%, and the second light transmittance can be 75%.

[0093] That is, the light transmittance of the to-be-tinted region is controlled to change from 85% to 75%.

[0094] It should be noted that the first light transmittance can also be 89%, 87%, 84%, 83%, etc.; the first light transmittance can also be 83%, 77%, 74%, 71%, etc.; as long as the second light transmittance is less than the first light transmittance and can play a role in anti-glare.

[0095] The vehicle control method provided by the embodiment of the present application first acquires a first image and a second image; wherein the first image is an image acquired by image collection in the cab, and the second image is an image acquired by image collection of the vehicle driving environment; then the average brightness value of the first image and the to-be-protected region are acquired from the first image, the second image is divided into a plurality of image blocks, and the average brightness value of each image block is acquired; whether there is a strong light source image block in the plurality of image blocks is determined by calculating the difference between the average brightness value of each image block and the average brightness value of the first image; if there is a strong light source image block in the plurality of image blocks, the to-be-tinted region of the windshield is acquired, and the to-be-tinted region of the windshield is the region on the line corresponding to the to-be-protected region and the strong light source image block among the plurality of regions of the windshield; finally, the light transmittance of the to-be-tinted region is controlled to change from the first light transmittance to the second light transmittance, and the second light transmittance is less than the first light transmittance. Since the embodiment of the present application processes the first image and the second image by the above method, the position corresponding to the to-be-protected region and the position corresponding to the strong light source image block are acquired, and then the to-be-protected region and the position corresponding to the strong light source image block are connected to acquire the to-be-tinted region of the windshield, the light transmittance of the to-be-tinted region of the windshield is reduced to reduce the illumination intensity of the strong light source passing through the windshield, the automatic anti-glare of the windshield is realized, and thus the problem of glare caused by the direct irradiation of the strong light source to the human eye is avoided, and the driving safety of the vehicle is improved.

[0096] As an extension and refinement of the above embodiment, the present application provides another embodiment of a vehicle control method, which is described with reference to Figure 2 The vehicle control method provided by the embodiment includes the following steps:

[0097] S201, acquiring a first image and a second image.

[0098] The specific content of step S201 is referred to step S101, and this step will not be described in detail here.

[0099] S202, acquiring the average brightness value of the first image and the to-be-protected region.

[0100] The specific content of step S202 is referred to step S102, and this step will not be described in detail here.

[0101] S203, divide the second image into a plurality of image blocks, and obtain average brightness values of the image blocks.

[0102] The specific content of step S203 can refer to step S103, and will not be described in detail herein.

[0103] SS204, determine whether the plurality of image blocks exist a strong light source image block.

[0104] In some embodiments, the implementation of step SS204 (calculating the difference between the average brightness value of each image block and the average brightness value of the first image to determine whether the plurality of image blocks exist a strong light source image block) can include:

[0105] calculating the difference between the average brightness value of each image block and the average brightness value of the first image;

[0106] If the difference between the average brightness value of the first image block in the plurality of image blocks and the average brightness value of the first image is greater than a threshold difference value, the first image block is determined as a strong light source image block.

[0107] For example, the threshold difference value can be a critical difference value between the critical brightness value of the second image that just can not cause human to be dazzled (if the average brightness value of the image block is greater than the critical brightness value, it just can cause human to be dazzled) and the average brightness value of the first image. It is easy to understand that when the average brightness value of the image block is equal to the average brightness value of the first image (i.e. the difference between the average brightness value of the image block and the average brightness value of the first image is equal to zero), this state is the most comfortable state for human eyes, when the average brightness value of the image block becomes larger until greater than the critical brightness value (the difference between the average brightness value of the image block and the average brightness value of the first image is greater than the threshold difference value), human begins to be dazzled, at this time, the average brightness value of the image block needs to be reduced to make human not be dazzled.

[0108] For another example, if the average brightness value of the second image block is less than or equal to the threshold difference value, the second image block cannot be determined as a strong light source image block.

[0109] It should be noted that the strong light source can include sunlight, illumination light generated by a traffic participant, reflected light, etc. For example, strong illumination sunlight, headlight of an oncoming vehicle, illumination light of an illumination tool, flash of a traffic violation snapshot, reflected light of road water, reflected light of a mirror or glass, etc.

[0110] S205, obtaining the first position coordinate and the second position coordinate.

[0111] In an embodiment, the implementation of step S205 (obtaining the first position coordinate and the second position coordinate) can include:

[0112] Obtaining a first position coordinate and a second position coordinate, the first position coordinate being a position coordinate of a center point of the to-be-protected area in a world coordinate system, and the second position coordinate being a position coordinate of a center point of the strong light source image block in the world coordinate system.

[0113] In some embodiments, the implementation of the above step S205 (obtaining the first position coordinate and the second position coordinate) can include:

[0114] Step 1, obtaining a first pixel point coordinate and a second pixel point coordinate, the first pixel point coordinate being a coordinate of a pixel point corresponding to a center point of the to-be-protected area in a camera coordinate system, and the second pixel point coordinate being a coordinate of a pixel point corresponding to a center point of the strong light source image block in the camera coordinate system.

[0115] Step 2, converting the first pixel point coordinate into the first position coordinate through camera internal and external parameters, and converting the second pixel point coordinate into the second position coordinate through the camera internal and external parameters.

[0116] Specifically, the embodiment of the present application provides a method for implementing the above step S205, and the specific steps can include:

[0117] (1) establishing a pixel coordinate system of the first image and a pixel coordinate system of the second image.

[0118] For example, the coordinate origin of the pixel coordinate system of the first image can be the first pixel point at the top left corner of the first image, and the coordinate origin of the pixel coordinate system of the second image can be the first pixel point at the top left corner of the second image.

[0119] It should be noted that the pixel coordinate system of the first image and the pixel coordinate system of the second image can only describe the rows and columns of the pixel points of the first image and the pixel points of the second image, and cannot describe the specific positions on the pixel point image.

[0120] For example, the pixel coordinate system of the first image can be represented as the following matrix:

[0121]

[0122] (2) converting the pixel coordinate system of the first image and the pixel coordinate system of the second image into an image coordinate system of the first image and an image coordinate system of the second image according to the first internal parameter.

[0123] For example, the coordinate origin of the image coordinate system of the first image can be the intersection of the optical axis of the rear-view camera and the imaging plane, and the coordinate origin of the image coordinate system of the second image can be the intersection of the optical axis of the wide-angle front-view camera and the imaging plane.

[0124] It should be noted that the first internal parameter is a conversion relationship for converting the pixel coordinate system into the image coordinate system, and the image coordinate system is a coordinate system that can actually describe the physical position of a pixel.

[0125] The exemplary first image coordinate system can be represented as the following matrix:

[0126]

[0127] Based on step (2) in the above step S205, the coordinates of the pixel points corresponding to the to-be-protected region in the image coordinate system and the coordinates of the pixel points corresponding to the strong light source image block in the image coordinate system are obtained.

[0128] (3) According to the second internal parameter, the coordinates of the pixel points corresponding to the to-be-protected region in the image coordinate system are converted into first pixel point coordinates, and the coordinates of the pixel points corresponding to the strong light source image block in the image coordinate system are converted into second pixel point coordinates.

[0129] The first pixel point coordinates are the coordinates of the pixel points corresponding to the to-be-protected region in the camera coordinate system, and the second pixel point coordinates are the coordinates of the pixel points corresponding to the strong light source image block in the camera coordinate system.

[0130] For example, the origin of the camera coordinate system can be the optical center of the camera.

[0131] It should be noted that the second internal parameter is a conversion relationship for converting the image coordinate system into the camera coordinate system.

[0132] For example, the first pixel point coordinates can be represented as the following matrix:

[0133]

[0134] Based on step (3) in the above step S205, the first pixel point coordinates and the second pixel point coordinates are obtained.

[0135] (4) The first pixel point coordinates are converted into first position coordinates through the external parameter, and the second pixel point coordinates are converted into second position coordinates through the external parameter.

[0136] For example, the origin of the world coordinate system can be the position coordinates of the rear-view camera in the world coordinate system.

[0137] It should be noted that the external parameter is a conversion relationship for converting the camera coordinate system into the world coordinate system.

[0138] For example, the world coordinate system can be represented as the following matrix:

[0139]

[0140] The first position coordinate and the second position coordinate are obtained based on step (4) in step S205.

[0141] The steps (1)-(4) in step S205 can obtain the following linear equations:

[0142]

[0143] It should be noted that the position coordinate of the position corresponding to the to-be-protected region in the world coordinate system can be obtained by the linear equations according to the pixel point corresponding to the to-be-protected region in the first image; and the position coordinate of the position corresponding to the first highlight source image block in the world coordinate system can be obtained by the linear equations according to the pixel point corresponding to the highlight source image block in the second image.

[0144] S206, obtaining the coordinate range of each region of the windshield in the world coordinate system.

[0145] In some embodiments, the glass number module of the windshield, the position coordinate of the rear-view camera in the world coordinate system, and the position coordinate of the wide-angle front-view camera in the world coordinate system are input, and the coordinate range of each region of the windshield in the world coordinate system is obtained.

[0146] S207, obtaining a third position coordinate.

[0147] In some embodiments, the implementation manner of the above step S207 (obtaining the third position coordinate) can include:

[0148] The third position coordinate is the position coordinate of the intersection point of the line connecting the first position coordinate and the second position coordinate and the windshield.

[0149] For example, the first position coordinate can be the position coordinate of the position corresponding to the to-be-protected region in the world coordinate system, and the second position coordinate can be the position coordinate of the position corresponding to the first highlight source image block in the world coordinate system.

[0150] That is, the line connecting the first position coordinate and the second position coordinate is the line connecting the position coordinate of the position corresponding to the to-be-protected region in the world coordinate system and the position coordinate of the position corresponding to the first highlight source image block in the world coordinate system, and the intersection point of the line is the third position coordinate.

[0151] S208, determining the region of the windshield corresponding to the coordinate range to which the third position coordinate belongs as the to-be-tinted region.

[0152] Please refer to Figure 3In order to more clearly understand how the third position coordinate is obtained in the steps S207 and S208, the present embodiment provides a position diagram of the first position coordinate 301, the second position coordinate 302 and the third position coordinate 303, as shown in FIG. 3. Figure 3

[0153] For example, the line connecting the first position coordinate 301 and the second position coordinate 302 intersects the region of the windshield at the third position coordinate 303.

[0154] In this case, the coordinate range to which the third position coordinate 303 belongs is the first region 304 of the windshield, and it is determined that the first region 304 of the windshield is the color-changing region.

[0155] S209, obtaining the second light transmittance.

[0156] In some embodiments, the implementation of the step S209 (obtaining the second light transmittance) can include:

[0157] According to the luminance difference between the average luminance value of the highlight source image block and the average luminance value of the first image, and the preset corresponding relationship, the second light transmittance is obtained.

[0158] In this case, the preset corresponding relationship includes the corresponding relationship between the plurality of difference ranges and the light transmittance.

[0159] For example, the corresponding relationship between the plurality of difference ranges and the light transmittance can be as shown in Table 1:

[0160] Table 1

[0161] Difference range Transmittance [0,5) 90% [5,10) 85% [10,25) 80% [25,35) 75% [35,50) 70%

[0162] For example, the luminance difference between the average luminance value of the highlight source image block and the average luminance value of the first image is 25, and the second light transmittance is 80%.

[0163] It should be noted that the corresponding relationship between the plurality of difference ranges and the light transmittance (the preset corresponding relationship) shown in Table 1 is only provided as a reference for easier understanding of the specific embodiments, and the corresponding relationship between the difference ranges and the light transmittance can also be set according to the specific embodiments.

[0164] In some embodiments, the second light transmittance is greater than the preset light transmittance.

[0165] For example, the preset light transmittance can be 70%.

[0166] It can be understood that if the local or national laws and regulations require that the light transmittance of the color-changing region cannot be lower than the preset light transmittance (for example, 70%), then when adjusting the light transmittance of the color-changing region, the light transmittance of the color-changing region cannot be lower than the preset light transmittance. ​

[0167] S210, control the light transmittance of the to-be-chromic region to change from the first light transmittance to the second light transmittance, the second light transmittance being less than the first light transmittance.

[0168] The specific content of step S210 can refer to step S106, and will not be described in detail here.

[0169] It should be noted that the application also provides a windshield. The windshield can be adjusted by the vehicle control method provided in any of the above embodiments.

[0170] The windshield includes an inner glass plate, an outer glass plate, a PVB interlayer, an electrochromic layer, and a conductive wire. The PVB interlayer and the electrochromic layer are arranged between the inner glass plate and the outer glass plate, and the electrochromic layer includes a plurality of chromic regions. The conductive wire is electrically connected to the plurality of chromic regions to control the chromic regions to change the light transmittance.

[0171] As shown in Figure 4 , the windshield is divided into a plurality of regions. Figure 4

[0172] Specifically, the plurality of regions of the windshield 400 correspond to the plurality of chromic regions of the electrochromic layer. Each chromic region is electrically connected to the microcontroller through the conductive wire, so that the microcontroller controls the chromic region to change the light transmittance, thereby avoiding the influence of the strong light source directly opposite the human eye on the human eye, and effectively preventing glare.

[0173] For example, the plurality of regions can be region A to region T.

[0174] That is, if the strong light source directly irradiates the human eye through the region N of the windshield, the chromic region 401 of the electrochromic layer corresponding to the region N of the windshield needs to be chromic to change the light transmittance corresponding to the region N of the windshield.

[0175] It can be understood that the plurality of chromic regions can be changed in light transmittance simultaneously or individually. Changing the light transmittance of the to-be-chromic region will affect the overall light transmittance of the windshield. Under the premise of effectively avoiding glare, the field of view brightness and the overall light transmittance of the windshield must meet the requirements.

[0176] The application provides a vehicle control device, please refer to Figure 5 , Figure 5 is a structural schematic diagram of the vehicle control device provided by the application. The vehicle control device includes:

[0177] ​The acquisition unit 501 is configured to acquire a first image and a second image, the first image being an image obtained by image collection in a cab, and the second image being an image obtained by image collection of a vehicle driving environment.

[0178] The analysis unit 502 is configured to acquire an average brightness value of the first image and a region to be protected.

[0179] The processing unit 503 is configured to divide the second image into a plurality of image blocks and acquire an average brightness value of each image block.

[0180] The calculation unit 504 is configured to calculate a difference value between the average brightness value of each image block and the average brightness value of the first image to determine whether there is a strong light source image block in the plurality of image blocks.

[0181] The determination unit 505 is configured to acquire a region to be colored of the windshield if there is a strong light source image block in the plurality of image blocks, the region to be colored of the windshield being a region of the windshield located on a line corresponding to the strong light source image block among a plurality of regions of the windshield corresponding to the region to be protected.

[0182] The control unit 506 is configured to control a light transmittance of the region to be colored to change from a first light transmittance to a second light transmittance, the second light transmittance being less than the first light transmittance.

[0183] In some embodiments, the analysis unit 502 is configured to acquire the region to be protected, including:

[0184] performing human eye recognition on the first image to acquire a human eye position in the first image; and determining a region in a preset range of the human eye position as the region to be protected.

[0185] In some embodiments, the calculation unit 504 is configured to calculate the difference value between the average brightness value of each image block and the average brightness value of the first image to determine whether there is a strong light source image block in the plurality of image blocks, including:

[0186] calculating the difference value between the average brightness value of each image block and the average brightness value of the first image; and determining a first image block in the plurality of image blocks as a strong light source image block if a difference value between the average brightness value of the first image block and the average brightness value of the first image is greater than a threshold difference value.

[0187] In some embodiments, the determination unit 505 is configured to acquire the region to be colored of the windshield, including:

[0188] The first position coordinate and the second position coordinate are acquired, the first position coordinate is a position coordinate of a position corresponding to the to-be-protected area in a world coordinate system, and the second position coordinate is a position coordinate of a position corresponding to the strong light source image block in the world coordinate system; coordinate ranges of a plurality of areas of the windshield in the world coordinate system are acquired respectively; the third position coordinate is acquired, the third position coordinate is a position coordinate of an intersection of a line connecting the first position coordinate and the second position coordinate and the windshield; and an area of the windshield corresponding to a coordinate range to which the third position coordinate belongs is determined as the to-be-tinted area.

[0189] Based on the same inventive concept, the embodiment of the present application further provides an electronic device. Figure 6 The structural schematic diagram of the electronic device provided by the embodiment of the present application is shown in Figure 6 The electronic device provided by the embodiment of the present application includes a memory 601 and a processor 602, the memory 601 is used for storing a computer program, and the processor 602 is used for executing the vehicle control method provided by the above-mentioned embodiment when executing the computer program.

[0190] Based on the same inventive concept, the embodiment of the present application further provides a computer readable storage medium, the computer readable storage medium has a computer program stored thereon, when the computer program is executed by a processor, the computing device realizes the vehicle control method provided by the above-mentioned embodiment.

[0191] Based on the same inventive concept, the embodiment of the present application further provides a computer program product, when the computer program product runs on a computer, the computing device realizes the vehicle control method provided by the above-mentioned embodiment.

[0192] Based on the same inventive concept, the embodiment of the present application further provides a vehicle, the vehicle includes the vehicle control device provided by the above-mentioned embodiment or the electronic device provided by the above-mentioned embodiment.

[0193] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer usable storage media containing computer usable program codes.

[0194] The processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic components, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.

[0195] The memory can include non-persistent memory in computer-readable media, random access memory (RAM), and / or non-volatile memory, such as read-only memory (ROM) or flash memory. The memory is an example of computer-readable media.

[0196] The computer-readable media include non-transitory and transitory, removable and non-removable media. The storage media can be implemented by any method or technology for storage of information such as computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile discs (DVDs) or other optical storage, magnetic cassettes, magnetic disks storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to computing devices. According to the definition herein, computer-readable media do not include transitory media, such as modulated data signals and carrier waves.

[0197] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A vehicle control method characterized by, The method comprises the following steps: acquiring a first image and a second image, the first image being an image acquired by image collection in a cab, and the second image being an image acquired by image collection of a vehicle driving environment; acquiring an average brightness value of the first image and a region to be protected; dividing the second image into a plurality of image blocks and acquiring an average brightness value of each image block; calculating a difference value between the average brightness value of each image block and the average brightness value of the first image to determine whether there is a strong light source image block in the plurality of image blocks; if there is a strong light source image block in the plurality of image blocks, acquiring a region to be colored of a windshield, the region to be colored of the windshield being a region of a plurality of regions of the windshield located on a line corresponding to the strong light source image block and a position corresponding to the region to be protected; controlling a light transmittance of the region to be colored to change from a first light transmittance to a second light transmittance, the second light transmittance being smaller than the first light transmittance.

2. The method of claim 1, wherein, The acquiring of the region to be protected comprises: performing human eye recognition on the first image to acquire a human eye position in the first image; determining a region in a preset range of the human eye position as the region to be protected.

3. The method of claim 1, wherein, The calculating of the difference value between the average brightness value of each image block and the average brightness value of the first image to determine whether there is a strong light source image block in the plurality of image blocks comprises: calculating the difference value between the average brightness value of each image block and the average brightness value of the first image; if the difference value between the average brightness value of a first image block in the plurality of image blocks and the average brightness value of the first image is greater than a threshold difference value, determining that the first image block is a strong light source image block.

4. The method of claim 1, wherein, The acquiring of the region to be colored of the windshield comprises: acquiring a first position coordinate and a second position coordinate, the first position coordinate being a position coordinate of a position corresponding to the region to be protected in a world coordinate system, and the second position coordinate being a position coordinate of a position corresponding to the strong light source image block in the world coordinate system; respectively acquiring coordinate ranges of a plurality of regions of the windshield in the world coordinate system; acquiring a third position coordinate, the third position coordinate being a position coordinate of an intersection of a line of the first position coordinate and the second position coordinate and the windshield; determining a region of the windshield corresponding to a coordinate range to which the third position coordinate belongs as the region to be colored.

5. The method of claim 4, wherein, The acquiring of the first position coordinate and the second position coordinate comprises: acquiring a first pixel point coordinate and a second pixel point coordinate, the first pixel point coordinate being a coordinate of a pixel point corresponding to the region to be protected in a camera coordinate system, and the second pixel point coordinate being a coordinate of a pixel point corresponding to the strong light source image block in the camera coordinate system; transforming the first pixel point coordinate into the first position coordinate and transforming the second pixel point coordinate into the second position coordinate through camera internal and external parameters.

6. The method of claim 1, wherein, Before the controlling of the light transmittance of the region to be colored to change from the first light transmittance to the second light transmittance, the method further comprises: acquiring the second light transmittance according to a brightness difference value between the average brightness value of the strong light source image block and the average brightness value of the first image and a preset corresponding relationship; The preset corresponding relationship includes a corresponding relationship between a plurality of difference ranges and transmittances.

7. The method of claim 6, wherein, The second transmittance is greater than a preset transmittance.

8. A vehicle control device characterized by comprising: Comprise: An acquisition unit, configured to acquire a first image and a second image, the first image being an image acquired by image collection in a cab, and the second image being an image acquired by image collection of a vehicle driving environment; An analysis unit, configured to acquire an average brightness value of the first image and a region to be protected; A processing unit, configured to divide the second image into a plurality of image blocks, and acquire an average brightness value of each image block; A calculation unit, configured to calculate a difference between the average brightness value of each image block and the average brightness value of the first image to determine whether there is a strong light source image block in the plurality of image blocks; A judgment unit, configured to, if there is a strong light source image block in the plurality of image blocks, acquire a region to be colored of a windshield, the region to be colored of the windshield being a region of the plurality of regions of the windshield located on a line corresponding to the strong light source image block and corresponding to a position of the region to be protected; A control unit, configured to control a transmittance of the region to be colored to change from a first transmittance to a second transmittance, the second transmittance being less than the first transmittance.

9. An electronic device, comprising: Comprise: A memory and a processor, the memory being configured to store a computer program; and the processor being configured to, when executing the computer program, enable the electronic device to implement the vehicle control method according to any one of claims 1 to 7.

10. A vehicle characterized by comprising: Comprise: The vehicle control device according to claim 8 or the electronic device according to claim 9.

Citation Information

Patent Citations

  • Anti-dazzling glasses and anti-dazzling method

    CN110646951A

  • Shading method and system, electronic equipment and storage medium

    CN114500866A