Vehicle control method and device, electronic equipment and vehicle
Image processing technology analyzes the images inside and outside the vehicle, determines the location of the strong light source and reduces the light transmittance of the windshield, solving the problem of dazzling caused by the driver due to strong external light exposure and improving driving safety.
Patent Information
- Application Number
- CN202311416022.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-27
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2043-10-27
AI Technical Summary
When driving a vehicle, the driver produces a dazzling effect due to strong external light, which affects the clarity of vision and increases safety hazards. The existing technology requires manual operation and has poor anti-glare effect.
By acquiring images in the cab and the vehicle driving environment, analyzing and calculating the average brightness difference of the image block, determining whether there is a strong light source image block. If there is, the area to be discolored in the windshield is obtained, and its light transmittance is controlled to reduce the light intensity transmitted by the strong light source.
The automatic anti-glare of the windshield is realized, avoiding the glare caused by the direct light source of the human eye, and improving the driving safety of the vehicle.
Smart Images

Figure CN119898170A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle technology, and in particular to a vehicle control method, device, electronic equipment and vehicle. Background Art
[0002] Drivers often encounter strong light from the outside when driving, such as the light from the high beam of the oncoming vehicle, the strong sunlight at sunrise or sunset, and even the light refracted or reflected by the sunlight shining on the outer surface of the building, the surface of the vehicle, and the ground. These may become strong light that affects the driver, causing a dazzling effect on the driver, blurring the driver's vision and causing color deviation. This will cause the driver to be unable to see the surrounding vehicle driving environment clearly, thereby increasing safety hazards.
[0003] In the prior art, drivers generally take measures such as wearing sunglasses and using sun visors to reduce the glare caused by strong external light. The prior art usually requires manual operation to prevent glare, which is inconvenient and distracts the driver, and the anti-glare effect is poor and not conducive to driving safety. Therefore, how to automatically block the strong external light for the driver without requiring the driver to operate and without affecting the driver's vision has become an urgent problem to be solved. Summary of the invention
[0004] The present application provides a vehicle control method, device, electronic device and vehicle to prevent glare and thus improve driving safety.
[0005] In a first aspect, an embodiment of the present application provides a vehicle control method, the method comprising:
[0006] Acquire a first image and a second image, wherein the first image is an image acquired by acquiring an image in the driving room, and the second image is an image acquired by acquiring an image of a driving environment of the vehicle;
[0007] Obtaining an average brightness value of the first image and an area to be protected;
[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 among the multiple image blocks;
[0010] If there is a strong light source image block among the multiple image blocks, then obtaining the area to be discolored of the windshield, wherein the area to be discolored of the windshield is an area on a line connecting a position corresponding to the area to be protected and the strong light source image block among the multiple areas of the windshield;
[0011] The light transmittance of the area to be changed color is controlled to change from a first light transmittance to a second light transmittance, wherein the second light transmittance is less than the first light transmittance.
[0012] In some embodiments, obtaining the area to be protected includes:
[0013] Performing human eye recognition on the first image to obtain a human eye position in the first image;
[0014] An area within a preset range of the human eye position is determined as the area to be protected.
[0015] In some embodiments, 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 among the multiple image blocks includes:
[0016] Calculating the difference between the average brightness value of each of the image blocks and the average brightness value of the first image;
[0017] If the difference between the average brightness value of a first image block among the multiple image blocks and the average brightness value of the first image is greater than a threshold difference, the first image block is determined to be a strong light source image block.
[0018] In some embodiments, obtaining the area of the windshield to be changed in color includes:
[0019] Acquire a first position coordinate and a second position coordinate, wherein the first position coordinate is the position coordinate of the position corresponding to the area to be protected in the world coordinate system, and the second position coordinate is the position coordinate of the position corresponding to the strong light source image block in the world coordinate system;
[0020] Respectively obtaining coordinate ranges of multiple areas of the windshield in the world coordinate system;
[0021] Acquire a third position coordinate, where the third position coordinate is the position coordinate of an intersection of a line connecting the first position coordinate and the second position coordinate and the windshield;
[0022] The area of the windshield corresponding to the coordinate range to which the third position coordinate belongs is determined as the area to be changed color.
[0023] In some embodiments, obtaining the first position coordinates and the second position coordinates includes:
[0024] Obtaining first pixel coordinates and second pixel coordinates, wherein the first pixel coordinates are coordinates of the pixel corresponding to the area to be protected in the camera coordinate system, and the second pixel coordinates are coordinates of the pixel corresponding to the strong light source image block in the camera coordinate system;
[0025] The first pixel point coordinates are converted into the first position coordinates through the camera internal and external parameters, and the second pixel point coordinates are converted into the second position coordinates through the camera internal and external parameters.
[0026] In some embodiments, before controlling the light transmittance of the area to be color-changed to change from the first light transmittance to the second light transmittance, the method further includes:
[0027] acquiring the second light transmittance according to a brightness difference between an average brightness value of the strong light source image block and an average brightness value of the first image, and a preset corresponding relationship;
[0028] Wherein, the preset corresponding relationship includes: a corresponding relationship between a plurality of difference ranges and transmittance.
[0029] In some embodiments, the second light transmittance is greater than a preset light transmittance.
[0030] In a second aspect, an embodiment of the present application provides a vehicle control device, including:
[0031] An acquisition unit, used to acquire a first image and a second image, wherein the first image is an image acquired by acquiring an image in the driving room, and the second image is an image acquired by acquiring an image of a driving environment of the vehicle;
[0032] An analysis unit, used to obtain an average brightness value of the first image and an area to be protected;
[0033] A processing unit, configured to divide the second image into a plurality of image blocks, and obtain an average brightness value of each image block;
[0034] A calculation unit, configured to calculate a difference between an average brightness value of each image block and an average brightness value of the first image to determine whether there is a strong light source image block among the multiple image blocks;
[0035] a judgment unit, configured to obtain a region of the windshield to be discolored if a strong light source image block exists among the multiple image blocks, wherein the region of the windshield to be discolored is a region on a line connecting a position corresponding to the region to be protected and the strong light source image block among the multiple regions of the windshield;
[0036] A control unit is used to control the light transmittance of the area to be color-changed to change from a first light transmittance to a second light transmittance, wherein the second light transmittance is less than the first light transmittance.
[0037] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to enable the electronic device to implement a vehicle control method as described in any one of the first aspects above when executing the computer program.
[0038] In a fourth aspect, an embodiment of the present application provides a vehicle, comprising: a vehicle control device as described in the second aspect above or an electronic device as described in the third aspect above.
[0039] The vehicle control method provided in 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 acquisition in the cab, and the second image is an image acquired by image acquisition of the vehicle driving environment; then, the average brightness value of the first image and the area to be protected are acquired from the first image, the second image is divided into multiple image blocks, and the average brightness value of each image block is acquired; by calculating the difference between the average brightness value of each image block and the average brightness value of the first image, it is determined whether there is a strong light source image block in the multiple image blocks; if there is a strong light source image block in the multiple image blocks, the area to be discolored of the windshield is acquired, and the area to be discolored of the windshield is an area in the multiple areas of the windshield located on a line connecting a position corresponding to the area to be protected and a position corresponding to the strong light source image block; finally, the transmittance of the area to be discolored is controlled to change from the first transmittance to the second transmittance, and the second transmittance is less than the first transmittance. Since the embodiment of the present application first processes the first image and the second image through the above method, obtains the position corresponding to the area to be protected and the position corresponding to the strong light source image block, and then connects the position corresponding to the area to be protected and the position corresponding to the strong light source image block to obtain the area to be discolored of the windshield, the transmittance of the area to be discolored of the windshield is reduced to weaken the light intensity of the strong light source passing through the windshield, thereby realizing automatic anti-glare of the windshield, thereby avoiding the problem of glare caused by direct strong light sources to the human eyes, and improving the driving safety of the vehicle. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings, which are incorporated in and constitute a part of this 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 embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0042] Figure 1 It is a flow chart of an embodiment of the vehicle control method provided by the present application;
[0043] Figure 2 is a flow chart of another embodiment of the vehicle control method provided by the present application;
[0044] Figure 3is a schematic diagram of the positions of the first position coordinates, the second position coordinates and the third position coordinates provided in an embodiment of the present application;
[0045] Figure 4 is a schematic diagram of a windshield provided in an embodiment of the present application being divided into multiple areas;
[0046] Figure 5 is a schematic diagram of the structure of a vehicle control device provided in an embodiment of the present application;
[0047] Figure 6 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0048] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0049] In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.
[0050] The terms "first", "second", and "third" in this application are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first", "second", and "third" can explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. All directional indications in the embodiments of this application (such as up, down, left, right, front, back...) are only used to explain the relative position relationship, movement, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication also changes accordingly. The terms "including" and "having" in the embodiments of this application and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or components inherent to these processes, methods, products, or devices.
[0051] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0052] The present application is described in detail below with reference to the accompanying drawings and embodiments.
[0053] The present application provides an embodiment of a vehicle control method, referring to Figure 1 As shown, the vehicle control method provided in this embodiment includes the following steps:
[0054] S101: Acquire a first image and a second image.
[0055] In some embodiments, the implementation of the above step S101 (obtaining the first image and the second image) may include:
[0056] A first image and a second image are acquired, wherein the first image is an image acquired by acquiring an image in the cab, and the second image is an image acquired by acquiring an image of the vehicle's driving environment.
[0057] That is, a rearview camera facing the vehicle cab can be set behind the vehicle's front windshield, and the rearview camera can be used to capture images inside the cab to obtain a first image. A wide-angle front camera facing outside the vehicle cab can also be set behind the vehicle's front windshield, and the wide-angle front camera can be used to capture images of the vehicle's driving environment (such as the front of the vehicle) to obtain a second image.
[0058] It should be noted that the first image may include an image of the face area of the cab occupants (including: the occupants of the main driver's seat and / or the occupants of the co-driver's seat), and the vehicle driving environment in the second image may include the external environment of the cab with a strong light source. In addition, there is no limitation on the specific model and setting position of the sensor for collecting the first image and the second image, as long as it is a sensor that can collect the first image or the second image.
[0059] S102: Obtain an average brightness value of the first image and an area to be protected.
[0060] The method for obtaining the average brightness value of the first image in the above step S102 can be obtained by using existing methods such as obtaining the brightness value of an image.
[0061] The implementation method of acquiring the area to be protected by acquiring the first image in the above step S102 may include:
[0062] Perform human eye recognition on the first image to obtain the position of the human eye in the first image; and determine an area within a preset range of the human eye position as an area to be protected.
[0063] Specifically, the first image acquired can be transmitted to the image processor through the rearview camera. After receiving the first image, the image processor acquires the average brightness value of the first image, and scans the face in the first image to identify the position of the human eyes, and determines the area within a preset range of the human eye position as the area to be protected.
[0064] Exemplarily, the preset range of the human eye position may be a range including only the two eyes of the human, or may be a range including the human face.
[0065] It should be noted that the rearview camera can be installed in the cab (for example, it can be installed in the position of the rearview mirror in the cab to capture images of the area where the face is located) and can observe the human eye; in addition, the average brightness value of the first image obtained by the rearview camera can reflect the light intensity of the environment in the cab.
[0066] S103: Divide the second image into a plurality of image blocks, and obtain an average brightness value of each image block.
[0067] In the above step S103, the second image obtained can be transmitted to the image processor through the wide-angle front-view camera. After receiving the second image, the image processor divides the second image into multiple image blocks and obtains the average brightness value of each image block.
[0068] Exemplarily, in the embodiment of the present application, the average brightness value of each image block may be directly obtained by an image processor, or may be implemented in the following manner, which may specifically include:
[0069] Step a: setting the proportion of the first image block in the second image to 100%, and setting the proportions of other image blocks except the first image block in the second image to 0%.
[0070] Step b: outputting the average brightness value of the second image described in step a above, where the average brightness value of the second image is the average brightness value of the first image block.
[0071] Step c: refer to step a and step b to output the average brightness value of each image block in sequence.
[0072] It should be noted that the wide-angle front-view camera can be installed in the cab (behind the windshield) to fully cover the field of view of the front area of the vehicle, and the average brightness value of each image block can reflect the light intensity of the strong light source.
[0073] Exemplarily, the field of view of the wide-angle front-view camera lens can be 120°, that is, the lens of the wide-angle front-view camera is an ultra-wide-angle lens. It should be noted that the embodiment of the present application does not make a unique limitation on the angle of the field of view of the wide-angle front-view camera lens, and the field of view of the wide-angle front-view camera lens 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 existing manner, such as treating each image block as a separate image, and then using the implementation method of obtaining the average brightness value of the first image in S102 to obtain the average brightness value of each image block.
[0074] S104: Determine whether there is an image block with a strong light source among the multiple image blocks.
[0075] In some embodiments, the implementation of step S104 (determining whether there is a strong light source image block among the multiple image blocks) may include:
[0076] The difference between the average brightness value of each image block and the average brightness value of the first image is calculated to determine whether there is a strong light source image block among the multiple image blocks.
[0077] Exemplarily, a microcontroller calculates a difference between an average brightness value of a first image block among multiple image blocks obtained by dividing the second image and an average brightness value of the first image, and when the difference is greater than a preset brightness difference, the first image block is determined to be a strong light source image block, wherein the first image block can be any one of the multiple image blocks obtained by dividing the second image.
[0078] If the above step S104 determines that there is a strong light source image block among the multiple image blocks, the following step S105 is executed:
[0079] S105: Obtain the area of the windshield to be changed in color.
[0080] In some embodiments, the implementation of the above step S105 (obtaining the area of the windshield to be discolored) may include:
[0081] If there is a strong light source image block among the multiple image blocks, the area to be discolored corresponding to the strong light source image block is obtained, and the area to be discolored is an area of the windshield located on the line connecting the area to be protected and the strong light source image block.
[0082] The area to be discolored of the windshield is an area on a line connecting a position corresponding to the area to be protected and the strong light source image block among multiple areas of the windshield.
[0083] In some embodiments, the position of the strong light source image block, the positions of the various regions of the windshield, and the position corresponding to the area to be protected can be converted to the same coordinate system, such as the world coordinate system, the vehicle coordinate system, the camera coordinate system of the image acquisition device used to acquire the first image, the camera coordinate system of the image acquisition device used to acquire the second image, etc. Then, a straight line connecting the position corresponding to the protection area and the position of the strong light source image block (such as a straight line connecting the center point of the protection area and the center point of the strong light source image block) is obtained, and the intersection of the straight line and the windshield is obtained, and finally the area of the windshield to which the intersection belongs is determined as the area of the windshield to be discolored.
[0084] It should be noted that the number of areas to be discolored of the windshield obtained in the embodiment of the present application can be any number, and the present application does not limit the number of areas to be discolored of the windshield. For example: there are 2 strong light source image blocks in the multiple image blocks obtained by segmenting the second image, but the area to be discolored determined based on the 2 strong light source image blocks is the same area of the windshield (the intersection of the corresponding connecting line and the windshield is located in the same area of the partition glass), then the number of areas to be discolored of the windshield is 1. Another example: there are 3 strong light source image blocks in the multiple image blocks obtained by segmenting the second image, and the areas to be discolored determined based on the 3 strong light source image blocks are different areas of the windshield, respectively (the intersection of the corresponding connecting line and the windshield is located in different areas of the partition glass), then the number of areas to be discolored of the windshield is 3.
[0085] S106, controlling the light transmittance of the area to be color-changed to change from a first light transmittance to a second light transmittance, wherein the second light transmittance is less than the first light transmittance.
[0086] Exemplarily, the first light transmittance may be 90%, and the second light transmittance may be 85%.
[0087] That is, the light transmittance of the area to be changed in color is controlled from 90% to 85%.
[0088] As another example, the first light transmittance may be 90%, and the second light transmittance may be 80%.
[0089] That is, the light transmittance of the area to be changed in color is controlled from 90% to 80%.
[0090] As another example, the first light transmittance may be 85%, and the second light transmittance may be 80%.
[0091] That is, the light transmittance of the area to be changed in color is controlled from 85% to 80%.
[0092] As another example, the first light transmittance may be 80%, and the second light transmittance may be 75%.
[0093] That is, the light transmittance of the area to be changed in color is controlled 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 an anti-glare effect.
[0095] The vehicle control method provided in 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 acquisition in the cab, and the second image is an image acquired by image acquisition of the vehicle driving environment; then, the average brightness value of the first image and the area to be protected are acquired from the first image, the second image is divided into multiple image blocks, and the average brightness value of each image block is acquired; by calculating the difference between the average brightness value of each image block and the average brightness value of the first image, it is determined whether there is a strong light source image block in the multiple image blocks; if there is a strong light source image block in the multiple image blocks, the area to be discolored of the windshield is acquired, and the area to be discolored of the windshield is an area in the multiple areas of the windshield located on a line connecting a position corresponding to the area to be protected and a position corresponding to the strong light source image block; finally, the transmittance of the area to be discolored is controlled to change from the first transmittance to the second transmittance, and the second transmittance is less than the first transmittance. Since the embodiment of the present application first processes the first image and the second image through the above method, obtains the position corresponding to the area to be protected and the position corresponding to the strong light source image block, and then connects the position corresponding to the area to be protected and the position corresponding to the strong light source image block to obtain the area to be discolored of the windshield, the transmittance of the area to be discolored of the windshield is reduced to weaken the light intensity of the strong light source passing through the windshield, thereby realizing automatic anti-glare of the windshield, thereby avoiding the problem of glare caused by direct strong light sources to the human eyes, and improving the driving safety of the vehicle.
[0096] As an extension and refinement of the above embodiment, the present application provides another embodiment of the vehicle control method, referring to Figure 2 As shown, the vehicle control method provided in this embodiment includes the following steps:
[0097] S201: Acquire a first image and a second image.
[0098] The specific content of step S201 refers to step S101, and this step will not be described in detail here.
[0099] S202: Obtain an average brightness value of the first image and an area to be protected.
[0100] The specific content of step S202 refers to step S102, and this step is not described in detail here.
[0101] S203: Divide the second image into a plurality of image blocks, and obtain an average brightness value of each image block.
[0102] The specific content of step S203 refers to step S103, and this step will not be described in detail here.
[0103] SS204: Determine whether there is a strong light source image block among the multiple image blocks.
[0104] In some embodiments, the implementation of the above 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 there is a strong light source image block among the multiple image blocks) may include:
[0105] Calculate 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 among the multiple image blocks and the average brightness value of the first image is greater than the threshold difference, the first image block is determined to be a strong light source image block.
[0107] Exemplarily, the threshold difference value may be the critical difference between the critical brightness value of the second image that is just enough to avoid dazzling a person (if the average brightness value of the image block is greater than the critical brightness value, it is just enough to cause dazzling a person) 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 (that is, 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 the human eye. When the average brightness value of the image block increases until it is 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), a person begins to feel dazzling. At this time, the average brightness value of the image block needs to be reduced so that the person does not feel dazzling.
[0108] As another example, if the average brightness value of the second image block is less than or equal to the threshold difference, it cannot be determined that the second image block is a strong light source image block.
[0109] It should be noted that strong light sources may include: sunlight, light generated by traffic participants, reflected light, etc. For example, strong sunlight, headlights of oncoming vehicles, light from lighting tools, flash lights for capturing traffic violations, reflected light from water on the road, reflected light from mirrors or glass, etc.
[0110] S205: Obtain the first position coordinates and the second position coordinates.
[0111] In one implementation, the implementation of the above step S205 (obtaining the first position coordinates and the second position coordinates) may include:
[0112] The first position coordinates and the second position coordinates are obtained, wherein the first position coordinates are the position coordinates of the position corresponding to the center point of the area to be protected in the world coordinate system, and the second position coordinates are the position coordinates of the position corresponding to the 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 coordinates and the second position coordinates) may include:
[0114] Step 1, obtain the first pixel point coordinates and the second pixel point coordinates, the first pixel point coordinates are the coordinates of the pixel point corresponding to the center point of the protected area in the camera coordinate system, and the second pixel point coordinates are the coordinates of the pixel point corresponding to the center point of the strong light source image block in the camera coordinate system.
[0115] Step 2: Convert the first pixel point coordinates into the first position coordinates through the camera internal and external parameters, and convert the second pixel point coordinates into the second position coordinates through the camera internal and external parameters.
[0116] Specifically, the embodiment of the present application provides the following method to implement the above step S205, and the specific steps may include:
[0117] (1) Establish a pixel coordinate system of the first image and a pixel coordinate system of the second image.
[0118] Exemplarily, the coordinate origin of the pixel coordinate system of the first image may be the first pixel point in the upper left corner of the first image, and the coordinate origin of the pixel coordinate system of the second image may be the first pixel point in the upper left corner of the second image.
[0119] It should be noted that the pixel coordinate system of the first image and the pixel coordinates of the second image can only describe the rows and columns of the pixels of the first image and the second image, but cannot describe the specific positions of the pixels on the images.
[0120] Exemplarily, the pixel coordinate system of the first image can be expressed as the following matrix:
[0121]
[0122] (2) Convert the pixel coordinate system of the first image and the pixel coordinate system of the second image into the image coordinate system of the first image and the image coordinate system of the second image according to the first internal reference.
[0123] Exemplarily, the coordinate origin of the image coordinate system of the first image may 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 may 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 transformation relationship for transforming a pixel coordinate system into an image coordinate system, and the image coordinate system is a coordinate system that can actually describe the physical position of a pixel point.
[0125] An 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 area to be protected 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 reference, the coordinates of the pixel points corresponding to the area to be protected in the image coordinate system are converted into the 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 the second pixel point coordinates.
[0129] The first pixel point coordinates are the coordinates of the pixel point corresponding to the area to be protected in the camera coordinate system, and the second pixel point coordinates are the coordinates of the pixel point corresponding to the strong light source image block in the camera coordinate system.
[0130] Exemplarily, the coordinate origin of the camera coordinate system may be the optical center of the camera.
[0131] It should be noted that the second internal parameter is a transformation relationship for transforming the image coordinate system into the camera coordinate system.
[0132] Exemplarily, the first pixel coordinates can be expressed 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 the first position coordinates through external parameters, and the second pixel point coordinates are converted into the second position coordinates through external parameters.
[0136] Exemplarily, the coordinate origin of the world coordinate system may be the position coordinates of the rearview camera in the world coordinate system.
[0137] It should be noted that the external parameter is the transformation relationship from the camera coordinate system to the world coordinate system.
[0138] For example, the world coordinate system can be represented by the following matrix:
[0139]
[0140] The first position coordinates and the second position coordinates are acquired based on step (4) in the above step S205.
[0141] In summary, steps (1) to (4) in step S205 can yield the following linear equations:
[0142]
[0143] It should be noted that, according to the pixel points corresponding to the area to be protected in the first image, the position coordinates of the position corresponding to the area to be protected in the world coordinate system can be obtained through the linear equation group; according to the pixel points corresponding to the strong light source image block in the second image, the position coordinates of the position corresponding to the strong light source image block in the world coordinate system can be obtained through the linear equation group.
[0144] S206 , respectively obtaining coordinate ranges of multiple areas of the windshield in the world coordinate system.
[0145] In some embodiments, the glass digital model of the windshield, the position coordinates of the rear-view camera in the world coordinate system, and the position coordinates of the wide-angle front-view camera in the world coordinate system are input to obtain the coordinate range of each area of the windshield in the world coordinate system.
[0146] S207: Obtain the third position coordinates.
[0147] In some embodiments, the implementation of the above step S207 (obtaining the third position coordinates) may include:
[0148] A third position coordinate is obtained, where the third position coordinate is the position coordinate of an intersection of a line connecting the first position coordinate and the second position coordinate and the windshield.
[0149] Exemplarily, the first position coordinates may be position coordinates of a position corresponding to the area to be protected in the world coordinate system, and the second position coordinates may be position coordinates of a position corresponding to the first strong light 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 protected area in the world coordinate system and the position coordinate of the position corresponding to the first strong light source image block in the world coordinate system, and the intersection of the lines is the third position coordinate.
[0151] S208: Determine the area of the windshield corresponding to the coordinate range to which the third position coordinate belongs as the area to be changed color.
[0152] Please refer to Figure 3In order to more clearly understand how the third position coordinates are obtained in the above steps S207 and S208, the present application embodiment provides a schematic diagram of the positions of the first position coordinates 301, the second position coordinates 302 and the third position coordinates 303, as shown in FIG. Figure 3 shown.
[0153] Exemplarily, a line connecting the first position coordinate 301 and the second position coordinate 302 intersects the area of the windshield at a third position coordinate 303;
[0154] Among them, the coordinate range to which the third position coordinate 303 belongs is the first area 304 of the windshield, and the first area 304 of the windshield is determined to be the area to be changed in color.
[0155] S209: Obtain a second light transmittance.
[0156] In some embodiments, the implementation of the above step S209 (obtaining the second light transmittance) may include:
[0157] Obtaining a second light transmittance according to a brightness difference between an average brightness value of the strong light source image block and an average brightness value of the first image, and a preset corresponding relationship;
[0158] The preset corresponding relationship includes: a corresponding relationship between a plurality of difference ranges and transmittance.
[0159] Exemplarily, the corresponding relationship between the multiple difference ranges and the transmittance may be as shown in the following Table 1:
[0160] Table 1
[0161] Difference range Light transmittance [0,5) 90% [5,10) 85% [10,25) 80% [25,35) 75% [35,50) 70%
[0162] For example, the brightness difference between the average brightness value of the strong light source image block and the average brightness value of the first image is 25, and the second light transmittance is 80%.
[0163] It should be noted that the correspondence between the multiple difference ranges and the transmittance (preset correspondence) shown in Table 1 is only a reference provided for easier understanding of the specific embodiments, and the correspondence between the difference range and the 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] Exemplarily, the preset light transmittance may be 70%.
[0166] It is understandable that if local or national laws and regulations require that the transmittance of the area to be discolored must not be lower than a preset transmittance (for example, 70%), then when adjusting the transmittance of the area to be discolored, the transmittance of the area to be discolored cannot be lower than the preset transmittance.
[0167] S210, controlling the light transmittance of the area to be color-changed to change from a first light transmittance to a second light transmittance, wherein the second light transmittance is less than the first light transmittance.
[0168] The specific content of step S210 refers to step S106, and this step is not described in detail here.
[0169] It should be noted that the embodiment of the present application further provides a windshield. The windshield can adjust the color of the area to be changed by the vehicle control method provided by any of the above embodiments.
[0170] The windshield comprises: a glass inner panel, a glass outer panel, a PVB interlayer, an electrochromic layer and a conductive wire; wherein the PVB interlayer and the electrochromic layer are arranged between the glass inner panel and the glass outer panel, and the electrochromic layer comprises a plurality of color-changing regions; the conductive wire is electrically connected to the plurality of color-changing regions to control the color-changing regions to change the transmittance.
[0171] like Figure 4 As shown, Figure 4 A schematic diagram showing a windshield being divided into multiple areas.
[0172] Specifically, multiple areas of the windshield 400 correspond to multiple color-changing areas of the electrochromic layer, and each color-changing area is electrically connected to the microcontroller through a conductive wire, so that the microcontroller controls the area to be color-changed to change the transmittance, thereby avoiding the strong light source directly facing the human eye from affecting people and effectively preventing glare.
[0173] Exemplarily, the plurality of regions may be region A to region T.
[0174] That is, if a strong light source directly shines into the human eye through area N of the windshield, the color-changing area 401 of the electrochromic layer corresponding to area N of the windshield needs to be changed to change the light transmittance corresponding to area N of the windshield.
[0175] It is understandable that the transmittance of multiple color-changing areas can be changed simultaneously or individually. Changing the transmittance of the area to be color-changed will affect the overall transmittance of the windshield. Under the premise of effectively avoiding glare, the field of view brightness and overall transmittance of the windshield must meet the requirements.
[0176] The present application embodiment provides a vehicle control device, see Figure 5 , Figure 5 : is a schematic diagram of the structure of a vehicle control device provided in an embodiment of the present application. The vehicle control device comprises:
[0177] The acquisition unit 501 is used to acquire a first image and a second image, wherein the first image is an image acquired by acquiring an image in the cab, and the second image is an image acquired by acquiring an image of a vehicle driving environment.
[0178] The analysis unit 502 is used to obtain the average brightness value of the first image and the area to be protected.
[0179] The processing unit 503 is configured to divide the second image into a plurality of image blocks and obtain an average brightness value of each image block.
[0180] The calculation unit 504 is configured to calculate 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 among the multiple image blocks.
[0181] The judgment unit 505 is used to obtain the area to be discolored of the windshield if there is a strong light source image block among the multiple image blocks. The area to be discolored of the windshield is the area on the line connecting the position corresponding to the area to be protected and the strong light source image block among the multiple areas of the windshield.
[0182] The control unit 506 is used to control the light transmittance of the area to be changed from a first light transmittance to a second light transmittance, wherein the second light transmittance is less than the first light transmittance.
[0183] In some embodiments, the analysis unit 502 is used to obtain the area to be protected, including:
[0184] Perform human eye recognition on the first image to obtain the position of the human eye in the first image; and determine an area within a preset range of the human eye position as an area to be protected.
[0185] In some embodiments, the calculation unit 504 is used to calculate 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 among the multiple image blocks, including:
[0186] The difference between the average brightness value of each image block and the average brightness value of the first image is calculated; if the difference between the average brightness value of the first image block among the multiple image blocks and the average brightness value of the first image is greater than the threshold difference, the first image block is determined to be a strong light source image block.
[0187] In some embodiments, the determining unit 505 is used to obtain the area of the windshield to be changed in color, including:
[0188] Obtain a first position coordinate and a second position coordinate, the first position coordinate being the position coordinate of the position corresponding to the area to be protected in the world coordinate system, and the second position coordinate being the position coordinate of the position corresponding to the strong light source image block in the world coordinate system; respectively obtain the coordinate ranges of multiple areas of the windshield in the world coordinate system; obtain a third position coordinate, the third position coordinate being the position coordinate of the intersection of a line connecting the first position coordinate and the second position coordinate and the windshield; and determine the area of the windshield corresponding to the coordinate range to which the third position coordinate belongs as the area to be discolored.
[0189] Based on the same inventive concept, an embodiment of the present application also provides an electronic device. Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Figure 6 As shown, the electronic device provided in this embodiment includes: a memory 601 and a processor 602, wherein the memory 601 is used to store a computer program; and the processor 602 is used to execute the vehicle control method provided in the above embodiment when executing the computer program.
[0190] Based on the same inventive concept, an embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the computing device implements the vehicle control method provided in the above embodiment.
[0191] Based on the same inventive concept, an embodiment of the present application further provides a computer program product. When the computer program product is run on a computer, the computing device implements the vehicle control method provided in the above embodiment.
[0192] Based on the same inventive concept, an embodiment of the present application further provides a vehicle, which includes the vehicle control device provided by the above embodiment or the electronic device provided by the above embodiment.
[0193] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media that include computer-usable program code.
[0194] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0195] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0196] Computer readable media include permanent and non-permanent, removable and non-removable storage media. Storage media can be implemented by any method or technology to store information, and the information can be 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 disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (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, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A vehicle control method, characterized in that: include: Acquire a first image and a second image, wherein the first image is an image acquired by acquiring an image in the driving room, and the second image is an image acquired by acquiring an image of a driving environment of the vehicle; Obtaining an average brightness value of the first image and an area to be protected; Dividing the second image into a plurality of image blocks, and obtaining 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 among the multiple image blocks; If there is a strong light source image block among the multiple image blocks, then obtaining the area to be discolored of the windshield, wherein the area to be discolored of the windshield is an area on a line connecting a position corresponding to the area to be protected and the strong light source image block among the multiple areas of the windshield; The light transmittance of the area to be changed color is controlled to change from a first light transmittance to a second light transmittance, wherein the second light transmittance is less than the first light transmittance.
2. The method according to claim 1, characterized in that The step of obtaining the area to be protected includes: Performing human eye recognition on the first image to obtain a human eye position in the first image; An area within a preset range of the human eye position is determined as the area to be protected.
3. The method according to claim 1, characterized in that: The step of 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 among the multiple image blocks comprises: Calculating the difference between the average brightness value of each of the image blocks and the average brightness value of the first image; If the difference between the average brightness value of a first image block among the multiple image blocks and the average brightness value of the first image is greater than a threshold difference, the first image block is determined to be a strong light source image block.
4. The method according to claim 1, characterized in that: The step of obtaining the area of the windshield to be discolored comprises: Acquire a first position coordinate and a second position coordinate, wherein the first position coordinate is the position coordinate of the position corresponding to the area to be protected in the world coordinate system, and the second position coordinate is the position coordinate of the position corresponding to the strong light source image block in the world coordinate system; Respectively obtaining coordinate ranges of multiple areas of the windshield in the world coordinate system; Acquire a third position coordinate, where the third position coordinate is the position coordinate of an intersection of a line connecting the first position coordinate and the second position coordinate and the windshield; The area of the windshield corresponding to the coordinate range to which the third position coordinate belongs is determined as the area to be changed color.
5. The method according to claim 4, characterized in that The obtaining of the first position coordinate and the second position coordinate comprises: Obtaining first pixel coordinates and second pixel coordinates, wherein the first pixel coordinates are coordinates of the pixel corresponding to the area to be protected in the camera coordinate system, and the second pixel coordinates are coordinates of the pixel corresponding to the strong light source image block in the camera coordinate system; The first pixel point coordinates are converted into the first position coordinates through the camera internal and external parameters, and the second pixel point coordinates are converted into the second position coordinates through the camera internal and external parameters.
6. The method according to claim 1, characterized in that Before controlling the light transmittance of the area to be color-changed to change from the first light transmittance to the second light transmittance, the method further includes: acquiring the second light transmittance according to a brightness difference between an average brightness value of the strong light source image block and an average brightness value of the first image, and a preset corresponding relationship; Wherein, the preset corresponding relationship includes: a corresponding relationship between a plurality of difference ranges and transmittance.
7. The method according to claim 6, characterized in that The second light transmittance is greater than a preset light transmittance.
8. A vehicle control device, characterized in that: include: An acquisition unit, used to acquire a first image and a second image, wherein the first image is an image acquired by acquiring an image in the driving room, and the second image is an image acquired by acquiring an image of a driving environment of the vehicle; An analysis unit, used to obtain an average brightness value of the first image and an area to be protected; A processing unit, configured to divide the second image into a plurality of image blocks, and obtain an average brightness value of each image block; A calculation unit, configured to calculate a difference between an average brightness value of each image block and an average brightness value of the first image to determine whether there is a strong light source image block among the multiple image blocks; a judgment unit, configured to obtain a region of the windshield to be discolored if a strong light source image block exists among the multiple image blocks, wherein the region of the windshield to be discolored is a region on a line connecting a position corresponding to the region to be protected and the strong light source image block among the multiple regions of the windshield; A control unit is used to control the light transmittance of the area to be color-changed to change from a first light transmittance to a second light transmittance, wherein the second light transmittance is less than the first light transmittance.
9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory is used to store a computer program; and the processor is used to enable the electronic device to implement the vehicle control method as described in any one of claims 1 to 7 when executing the computer program.
10. A vehicle, characterized in that: include: 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
Dimming method and device of shading assembly, shading assembly and vehicle
CN114666488A
Phase difference observation device and cell processing device
JP2019066819A
Device and method for glare shielding
KR1020160125306A
Cited By
Electronic control color-changing film light intensity adjusting system on surface of self-closed-loop car lamp and control method
CN120521173A