High beam control method, device, equipment, medium and program product
By identifying the number and information of the spots in the vehicle body environment image and controlling the opening and closing of the high beams, the problem of low control accuracy of high beams in the prior art is solved, and higher control accuracy and driving safety are achieved.
Patent Information
- Application Number
- CN202411812751.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-03-18
AI Technical Summary
Existing high beam control methods turn off the high beam when the spot is identified, resulting in less accuracy in control.
By obtaining the number of spots and spot information in the vehicle body environment image, if the number of spots is less than or equal to the preset number, the high beam will be turned on; if the number of spots is greater than the preset number, the corresponding spots of the street light will be filtered out based on the spot information, and the high beam will be determined.
Improve the control accuracy of high beams, ensure accurate turn off the high beams in the street light area, and improve driving safety.
Smart Images

Figure CN119636568A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle technology, and in particular to a high beam control method, device, equipment, medium and program product. Background Art
[0002] With the development of technology, vehicles have more and more functions, and the headlights can also automatically turn on or off the high beam according to the external environment.
[0003] In the prior art, the control of high beams is usually performed by acquiring an image of the environment around the vehicle body while the vehicle is driving in a dark environment, and then performing target recognition. When a light spot is recognized, the light spot is determined to be a street light, and the high beams are turned off; when no light spot is recognized, the high beams are turned on.
[0004] In summary, the existing high beam control method turns off the high beam when a light spot is identified, which results in low control accuracy. Summary of the invention
[0005] The high beam control method, device, equipment, medium and program product provided in the embodiments of the present application are used to solve the problem of low control accuracy caused by turning off the high beam when a light spot is identified in the existing high beam control method.
[0006] In a first aspect, an embodiment of the present application provides a high beam control method, comprising:
[0007] When it is determined that there are light spots in the acquired vehicle body environment image, the number of light spots and light spot information of each light spot are determined;
[0008] If the number of light spots is less than or equal to a first preset number, controlling the high beam to turn on;
[0009] If the number of the light spots is greater than the first preset number, all the light spots are screened according to the light spot information of each light spot to obtain a first light spot;
[0010] The high beam is controlled to be turned on or off according to the number and light spot information of all the first light spots.
[0011] In a possible implementation, each of the light spot information includes light spot position information, a horizontal pixel quantity of the light spot, and a vertical pixel quantity of the light spot, and screening all the light spots according to the light spot information of each light spot to obtain a first light spot includes:
[0012] Screening all the light spots according to the light spot position information of each light spot to obtain a second light spot;
[0013] According to the transverse pixel quantity and the longitudinal pixel quantity of each second light spot, all the second light spots are screened to obtain the first light spot.
[0014] In a possible implementation manner, screening all the light spots according to the light spot position information of each light spot to obtain the second light spot includes:
[0015] For each of the light spots, if the light spot position corresponding to the light spot position information of the light spot does not belong to the preset ground plane range, the light spot is used as the second light spot.
[0016] In a possible implementation manner, screening all the second light spots according to the transverse pixel quantity and the longitudinal pixel quantity of each second light spot to obtain the first light spot includes:
[0017] For each second light spot, if the horizontal pixel quantity of the second light spot belongs to a preset horizontal pixel quantity range, and the vertical pixel quantity of the second light spot belongs to a preset vertical pixel quantity range, the second light spot is used as the first light spot.
[0018] In a possible implementation manner, each of the light spot information includes light spot position information, and controlling the high beam to be turned on or off according to the number and light spot information of all the first light spots includes:
[0019] If the number of all the first light spots is less than or equal to a second preset number, controlling the high beam to turn on;
[0020] If the number of all the first light spots is greater than the second preset number, the high beam is controlled to be turned on or off according to the light spot information of all the first light spots.
[0021] In a possible implementation manner, controlling the high beam to be turned on or off according to the light spot information of all the first light spots includes:
[0022] Determining a reference position of each first light spot according to the light spot position information of each first light spot;
[0023] Determine, from all the first light spots, an adjacent light spot of each of the first light spots according to a reference position of each of the first light spots;
[0024] For each of the first light spots, generating a light spot connection line according to a reference position of the first light spot and a reference position of a light spot adjacent to the first light spot;
[0025] According to the angle between each of the light spot connection lines and the horizontal line, all the light spot connection lines are screened to obtain the target connection line;
[0026] If the number of all the target lines is greater than a third preset number, controlling the high beam to be turned off;
[0027] If the number of all the target links is less than or equal to the third preset number, the high beam is controlled to be turned on.
[0028] In a possible implementation, screening all the light spot lines according to the angle between each of the light spot lines and the horizontal line to obtain the target line includes:
[0029] For each of the light spot lines, if the angle between the light spot line and the horizontal line is greater than a preset angle, the light spot line is used as a target line.
[0030] In a second aspect, an embodiment of the present application provides a high beam control device, comprising:
[0031] A processing module, used for determining the number of light spots and the light spot information of each light spot when determining that there are light spots in the acquired vehicle body environment image;
[0032] A control module is used to control the high beam to turn on if the number of light spots is less than or equal to a first preset number.
[0033] The processing module is further configured to screen all the light spots according to the light spot information of each light spot to obtain a first light spot if the number of the light spots is greater than the first preset number;
[0034] The control module is further used to control the high beam to be turned on or off according to the quantity and light spot information of all the first light spots.
[0035] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0036] Processor, memory, communication interface;
[0037] The memory is used to store executable instructions of the processor;
[0038] Wherein, the processor is configured to execute the high beam control method described in any one of the first aspects by executing the executable instructions.
[0039] In a fourth aspect, an embodiment of the present application provides a readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the high beam control method described in any one of the first aspects.
[0040] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, is used to implement the high beam control method described in any one of the first aspects.
[0041] The high beam control method, device, equipment, medium and program product provided in the embodiments of the present application, by determining the number of light spots and the light spot information of each light spot when the acquired vehicle body environment image is determined; then the high beam is controlled to be turned on when the number of light spots is less than or equal to the first preset number; when the number of light spots is greater than the first preset number, all light spots are screened according to the light spot information to obtain the first light spot, and then the high beam is controlled to be turned on or off according to the number of the first light spots and the light spot information. This solution effectively improves the control accuracy of the high beam by controlling the high beam according to the number of light spots and the light spot information when there are light spots in the vehicle body environment image. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] 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.
[0043] Figure 1a A schematic diagram of the camera installation location provided for this application;
[0044] Figure 1b A schematic diagram of the structure of the camera provided for this application;
[0045] Figure 1c A schematic diagram of an application scenario of the high beam control method provided in this application;
[0046] Figure 2a A flowchart of a first embodiment of a high beam control method provided in the present application;
[0047] Figure 2b A schematic diagram of the high beam pattern provided for this application;
[0048] Figure 3a A flowchart of a second embodiment of the high beam control method provided in this application;
[0049] Figure 3b Schematic diagram 1 of the vehicle body environment image provided for this application;
[0050] Figure 3c Schematic diagram 2 of the vehicle body environment image provided for this application;
[0051] Figure 3d Schematic diagram of the vehicle body environment image provided for this application 3;
[0052] Figure 4a A flowchart of a third embodiment of the high beam control method provided in this application;
[0053] Figure 4b Schematic diagram 4 of the vehicle body environment image provided for this application;
[0054] Figure 4cThe vehicle body environment image provided for this application is shown in FIG. Figure 5 ;
[0055] Figure 5 A schematic diagram of the structure of an embodiment of a high beam control device provided in this application;
[0056] Figure 6 A schematic diagram of the structure of an electronic device provided in this application.
[0057] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0058] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0059] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof 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 necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0060] With the development of technology, vehicles have more and more functions, and the headlights can also automatically turn on or off the high beam according to the external environment.
[0061] For example, Figure 1a The camera installation location diagram provided for this application is as follows: Figure 1a As shown, the black trapezoid represents the camera, which is installed around the vehicle body and can capture the vehicle body environment image.
[0062] For example, Figure 1b The structural diagram of the camera provided for this application is as follows: Figure 1bAs shown, the camera includes a lens, multiple filter layers and a photoelectric conversion unit. Light passes through the lens and multiple filter layers to reach the photoelectric conversion unit. The photoelectric conversion unit converts the optical signal into an electrical signal to generate an image.
[0063] In the prior art, the control of the high beam is usually carried out by using a camera to capture an image of the vehicle body environment when the vehicle is driving in a dark environment, and then performing target recognition. When a light spot is recognized, the light spot is determined to be a street light, and the high beam is turned off; when the light spot is not recognized, the high beam is turned on.
[0064] Since the high beam is turned off when a light spot is identified, this may result in low control accuracy.
[0065] In view of the problems existing in the prior art, the inventor discovered during the research on the high beam control method that the vehicle needs to turn off the high beam in the street lamp area. The street lamp area not only has light sources emitted by street lamps, but also has a large number of street lamps, and the street lamps are arranged in a relatively regular manner. Therefore, when it is determined that there are light spots in the acquired vehicle body environment image, the high beam can be controlled to be turned on or off according to the number of light spots and light spot information, effectively improving the control accuracy of the high beam. Based on the above inventive concept, the high beam control scheme in this application is designed.
[0066] The executor of the high beam control method in the present application may be a controller or a vehicle-mounted terminal in the vehicle, or may be a server or a computer, etc. The present application does not limit it and the following description will be made using a controller as an example.
[0067] For example, Figure 1c A schematic diagram of an application scenario of the high beam control method provided in this application, such as Figure 1c As shown, the white part in the figure is the light source. In this application scenario, a vehicle is driving at night. Lights are installed outside the houses on the roadside close to the vehicle, and street lights are installed on the roadside far from the vehicle. Both the lights outside the houses and the street lights are in a glowing state.
[0068] When the vehicle is driving, the controller uses the camera to obtain the vehicle body environment image in real time. When the vehicle drives next to the house, the vehicle body environment image obtained includes the house but not the street lamp. By performing target detection on the vehicle body environment image, it can be determined that there are light spots in the vehicle body environment image, and then the number of light spots is determined to be 1, which means that the light spot is not the light spot corresponding to the street lamp, and the high beam is controlled to turn on to ensure driving safety.
[0069] When the vehicle drives next to a street lamp, the acquired vehicle body environment image includes the street lamp. By performing target detection on the vehicle body environment image, it can be determined that there are light spots in the vehicle body environment image, and then the number of light spots is determined to be 4, which is greater than the first preset number. Then, according to the light spot information of the light spot, it is determined that the light spot is a light spot corresponding to the street lamp, and the high beam is controlled to be turned off to ensure the safety of other vehicles or pedestrians.
[0070] It should be noted that Figure 1c This is only a schematic diagram of an application scenario provided by the embodiment of the present application. Figure 1c The actual form of the various devices included in the Figure 1c The interaction mode between devices is limited, and in the specific application of the solution, it can be set according to actual needs.
[0071] The technical solution of the present application is described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0072] Figure 2a This is a flow chart of the first embodiment of the high beam control method provided by the present application. The present embodiment of the present application describes the situation where the controller controls the high beam according to the number of light spots and light spot information. The method in this embodiment can be implemented by software, hardware, or a combination of software and hardware. Figure 2a As shown, the high beam control method specifically includes the following steps:
[0073] S201: When it is determined that there are light spots in the acquired vehicle body environment image, the number of light spots and light spot information of each light spot are determined.
[0074] After the controller obtains the vehicle body environment image through the camera, it will perform target detection on it to determine whether there is a light spot in the vehicle body environment image. If there is no light spot, it means that there is no street light on the current road and the high beam needs to be turned on.
[0075] In this step, if the controller determines that there are light spots in the vehicle body environment image, it is necessary to determine whether the current road is in a streetlight area, and first determine the number of light spots and the light spot information of each light spot.
[0076] When target detection is performed on the vehicle body environment image to determine the presence of light spots therein, the light spot position information, the horizontal pixel quantity of the light spot and the vertical pixel quantity of the light spot can be obtained for each light spot, and the number of light spots can also be obtained. The light spot information includes the light spot position information, the horizontal pixel quantity of the light spot and the vertical pixel quantity of the light spot.
[0077] S202: Determine whether the number of light spots is greater than a first preset number; if the number of light spots is less than or equal to the first preset number, execute step S203; if the number of light spots is greater than the first preset number, execute steps S204-S205.
[0078] In this step, after obtaining the number of light spots and the light spot information, the controller needs to first determine whether the number of light spots is greater than a first preset number to determine whether the current road is in a streetlight area.
[0079] It should be noted that the first preset number is greater than or equal to 1, and can be 1, 2, 3, etc. The embodiment of the present application does not limit the first preset number, and can be determined according to actual conditions.
[0080] S203: Control the high beam to turn on.
[0081] In this step, if the controller determines that the number of light spots is less than or equal to the first preset number, it means that the current number of light spots is small. Even if the light spots in the vehicle body environment image are all light spots corresponding to street lamps, the number of street lamps is still small and the light is dim. The current road is still not in the street lamp area, so the high beam is controlled to turn on.
[0082] It should be noted that when it is determined that the high beam needs to be turned on, it can be turned on after a first preset time delay. This is because the current vehicle is in two scenarios. The first scenario is that the vehicle has not left the street light area, and the second scenario is that the vehicle is not in the street light area.
[0083] In the first scenario, although the current road is not in the streetlight area, the vehicle has not yet driven out of the streetlight area, and it is necessary to wait until the vehicle drives out of the streetlight area before turning on the high beam.
[0084] In the second scenario, the vehicle is not in the street lamp area, and the high beam of the vehicle is currently on. Turning it on again after the first preset time will not affect driving safety.
[0085] The first preset time length may be 500 milliseconds, 1 second, 2 seconds, etc. The embodiment of the present application does not limit the first preset time length, and may be determined according to actual conditions.
[0086] It should be noted that after the controller turns on the high beam, the high beam pattern can be changed according to the position of the vehicle in the field of vision in front of the vehicle to avoid dazzling other road users. Figure 2b The schematic diagram of the high beam light type provided for this application is as follows: Figure 2b As shown in the figure, the white area represents the illumination area of the high beam, which can avoid the illumination area of the high beam from the vehicle in front, thereby improving driving safety.
[0087] S204: Screening all light spots according to the light spot information of each light spot to obtain a first light spot.
[0088] In this step, if the controller determines that the number of light spots is greater than the first preset number, it means that the number of light spots is large and the current road may be in a street light area, and it is necessary to remove the light spots whose positions and sizes do not conform to the street light characteristics. According to the light spot information of each light spot, all light spots are screened to obtain the first light spot.
[0089] S205: Controlling the high beam to be turned on or off according to the number and light spot information of all first light spots.
[0090] In this step, after the controller obtains the first light spot, although the position and size of the first light spot are consistent with the characteristics of the street lamp, there may still be a small number of first light spots, and there may be a situation where the first light spot is not the light spot corresponding to the street lamp. Therefore, based on the number and light spot information of all first light spots, it is determined whether the current road is in the street lamp area, and then the high beam is controlled to be turned on or off.
[0091] It should be noted that when the controller performs target detection on the vehicle body environment image, if it can also detect whether the light spot is the light spot corresponding to the headlight, the light spot corresponding to the headlight in the vehicle body environment image is removed and the solution of the present application is executed.
[0092] The high beam control method provided in this embodiment determines the number of light spots and the light spot information of each light spot when it is determined that there are light spots in the acquired vehicle body environment image; then controls the high beam to be turned on when the number of light spots is less than or equal to the first preset number; when the number of light spots is greater than the first preset number, all light spots are screened according to the light spot information to obtain the first light spot, and then the high beam is controlled to be turned on or off according to the number of the first light spots and the light spot information. This solution effectively improves the control accuracy of the high beam and improves driving safety by controlling the high beam according to the number of light spots and the light spot information when there are light spots in the vehicle body environment image.
[0093] Figure 3a This is a flow chart of the second embodiment of the high beam control method provided by the present application. Based on the above embodiment, the present embodiment of the present application describes the situation where the controller screens all light spots according to the light spot information to obtain the first light spot. Figure 3a As shown, the high beam control method specifically includes the following steps:
[0094] S301: Screening all light spots according to the light spot position information of each light spot to obtain a second light spot.
[0095] In this step, after the controller determines that the number of light spots is greater than the first preset number, in order to determine whether the current road is in the street light area, the light spots need to be screened first. First, all light spots are screened according to the light spot position information of each light spot to obtain the second light spot.
[0096] Specifically, for each light spot, if the light spot position corresponding to the light spot position information of the light spot does not belong to the preset ground plane range, the light spot is used as the second light spot.
[0097] Since the light source of a street lamp is above the ground, when a family car is generally driving on the road, the headlights of the family car are within the preset ground plane range in the body environment image, and the reflective lights on the ground are also within the preset ground plane range, so the position of the second light spot meets the characteristics of the street lamp.
[0098] For example, Figure 3b A schematic diagram of the vehicle body environment image provided for this application is shown in FIG. Figure 3b As shown in the figure, the white part is the light spot, and the part below the dotted line is the preset ground plane range. It can be seen that the light spots corresponding to the headlights of the family car and the reflection of water stains on the ground are both within the preset ground plane range, and the light spots corresponding to the street lights do not belong to the preset ground plane range.
[0099] S302: Screening all second light spots according to the transverse pixel quantity and the longitudinal pixel quantity of each second light spot to obtain a first light spot.
[0100] In this step, after the controller obtains the second light spot, since the second light spot only meets the characteristics of the street lamp in position and some second light spots do not meet the characteristics of the street lamp in size, it is also necessary to screen all the second light spots according to the horizontal pixel quantity and the vertical pixel quantity of each second light spot to obtain the first light spot.
[0101] It should be noted that the horizontal pixel quantity of the light spot refers to the number of pixels in a row with the most pixels in the area corresponding to the light spot. The vertical pixel quantity of the light spot refers to the number of pixels in a column with the most pixels in the area corresponding to the light spot.
[0102] Specifically, for each second light spot, if the horizontal pixel quantity of the second light spot belongs to the preset horizontal pixel quantity range, and the vertical pixel quantity of the second light spot belongs to the preset vertical pixel quantity range, the second light spot is used as the first light spot.
[0103] Since the size of the street lamp is within a certain range, the second light spot can be screened according to the preset horizontal pixel quantity range and the preset vertical pixel quantity range, and the obtained first light spot not only conforms to the characteristics of the street lamp in position, but also conforms to the characteristics of the street lamp in size.
[0104] It should be noted that the preset horizontal pixel quantity range and the preset vertical pixel quantity range can be 5-10, 100-300, 1000-3000, etc. The embodiment of the present application does not limit the preset horizontal pixel quantity range and the preset vertical pixel quantity range, which can be determined according to actual conditions.
[0105] For example, Figure 3c The second schematic diagram of the vehicle body environment image provided for this application is as follows: Figure 3c As shown in the figure, the white part is the light spot, the white rectangle is the light spot corresponding to the billboard, and the part below the dotted line is the preset ground plane range. It can be seen that the position of the light spot corresponding to the billboard meets the characteristics of the street lamp, but the size does not meet the characteristics of the street lamp, so it can be screened out.
[0106] For example, Figure 3d The third schematic diagram of the vehicle body environment image provided for this application is as follows: Figure 3d As shown in the figure, each grid represents a pixel point, the white area is the second light spot, the preset horizontal pixel quantity range is 3-5, and the preset vertical pixel quantity range is 1-5. The horizontal pixel quantity of the light spot on the left is 4, and the vertical pixel quantity of the light spot is 3. The horizontal pixel quantity of the light spot belongs to the preset horizontal pixel quantity range, and the vertical pixel quantity of the light spot belongs to the preset vertical pixel quantity range, so the light spot on the left is the first light spot. The horizontal pixel quantity of the light spot on the right is 6, and the vertical pixel quantity of the light spot is 6. The horizontal pixel quantity of the light spot does not belong to the preset horizontal pixel quantity range, and the vertical pixel quantity of the light spot does not belong to the preset vertical pixel quantity range, so the light spot on the right is not the first light spot.
[0107] It should be noted that after the controller determines the second light spot, it can also screen the second light spot according to the number of pixels of the second light spot to obtain the first light spot. For each second light spot, if the number of pixels of the second light spot belongs to the preset pixel number range, the second light spot is used as the first light spot. The preset pixel number range can be 8-15, 100-500, 1000-5000, 10000-50000, etc. The embodiment of the present application does not limit the preset pixel number range, which can be determined according to actual conditions.
[0108] The high beam control method provided in this embodiment selects a second light spot whose position meets the characteristics of the street lamp according to the light spot position information, and then selects a first light spot whose size meets the characteristics of the street lamp according to the number of horizontal pixels and the number of vertical pixels of the light spot, so that the obtained first light spot is more matched with the light spot corresponding to the street lamp, and the high beam is controlled according to the number of subsequent first light spots and the light spot information, which can improve the control accuracy.
[0109] Figure 4a This is a flow chart of the third embodiment of the high beam control method provided by the present application. Based on the above embodiment, the present embodiment of the present application describes the situation in which the controller controls the high beam to be turned on or off according to the number of first light spots and light spot information. Figure 4a As shown, the high beam control method specifically includes the following steps:
[0110] S401: Determine whether the number of first light spots is greater than a second preset number; if the number of all first light spots is less than or equal to the second preset number, execute step S408; if the number of all first light spots is greater than the second preset number, execute steps S402-S406.
[0111] In this step, after obtaining the first light spots, the controller needs to determine whether the current road is in a streetlight area, and first determines whether the number of the first light spots is greater than a second preset number.
[0112] It should be noted that the second preset number is greater than or equal to 2, and can be 2, 3, 4, etc. The embodiment of the present application does not limit the second preset number, and can be determined according to actual conditions.
[0113] S402: Determine a reference position of each first light spot according to the light spot position information of each first light spot.
[0114] In this step, if the controller determines that the number of all first light spots is greater than the second preset number, it means that the number of first light spots is large, and then it is necessary to determine whether there are more light spots corresponding to street lights, that is, whether the current road is in the street light area. According to the light spot information of all first light spots, the high beam is controlled to be turned on or off.
[0115] First, the reference position of each first light spot is determined according to the light spot position information of each first light spot.
[0116] According to the spot position information of the first spot, the area of the first spot in the vehicle body environment image can be determined, and then the reference position can be determined from the area. The reference position can be the center point, center of gravity, lowest point, highest point, etc. of the area. The embodiment of the present application does not limit the reference position, and it can be determined according to actual conditions.
[0117] S403: Determine the adjacent light spot of each first light spot from all the first light spots according to the reference position of each first light spot.
[0118] In this step, after the controller determines the reference position of each first light spot, it can determine the adjacent light spot of each first light spot from all the first light spots according to the reference position of each first light spot.
[0119] For each first light spot, the first light spot is used as the third light spot, and among all the first light spots except the third light spot, the light spot whose reference position is closest to the reference position of the third light spot is used as the adjacent light spot of the third light spot. In this way, the adjacent light spot of each first light spot can be obtained.
[0120] S404: For each first light spot, generate a light spot connection line according to a reference position of the first light spot and a reference position of a light spot adjacent to the first light spot.
[0121] In this step, after obtaining the reference position of each first light spot, the controller generates a light spot connection line for each first light spot according to the reference position of the first light spot and the reference position of a light spot adjacent to the first light spot.
[0122] That is, a reference position of the first light spot is connected with a reference position of a light spot adjacent to the first light spot to obtain a light spot connection line.
[0123] S405: Screening all the light spot connection lines according to the angle between each light spot connection line and the horizontal line to obtain the target connection line.
[0124] In this step, after the controller obtains the light spot lines, in order to screen out the light spot lines corresponding to the street lamps, it is necessary to screen all the light spot lines according to the angle between each light spot line and the horizontal line to obtain the target line.
[0125] For each light spot line, if the angle between the light spot line and the horizontal line is greater than a preset angle, the light spot line is used as a target line, and the two light spots of the target line are the light spots corresponding to the street lamp.
[0126] Since street lamps are installed at regular positions on the road, the light spot lines formed by them are tilted downward in the vehicle body environment image, with a large angle to the horizontal line. Light spot lines that are not formed by light spots corresponding to street lamps, such as the light spot lines formed by light spots corresponding to multiple cameras with light sources on monitoring poles, and the light spot lines formed by light spots corresponding to multiple lights installed on the top of heavy trucks, have small angles to the horizontal line.
[0127] For example, Figure 4b The vehicle body environment image diagram 4 provided for this application is as follows: Figure 4b As shown in the figure, the white part is the light spot, the part below the dotted line is the preset ground plane range, the reference position is the highest point of the light spot, the angle between the light spot connection line formed by the light spot corresponding to the street lamp and the horizontal line is greater than the preset angle, and these light spot connection lines are used as target lines.
[0128] For example, Figure 4c The vehicle body environment image provided for this application is shown in FIG. Figure 5 ,like Figure 4c As shown in the figure, the white part is the light spot, the part below the dotted line is the preset ground plane range, the reference position is the highest point of the light spot, and the angle between the light spot connection line formed by the light spot corresponding to the camera and the horizontal line is less than the preset angle. These light spot connection lines are not target lines.
[0129] It should be noted that the preset angle can be 5 degrees, 10 degrees, 15 degrees, etc. The embodiment of the present application does not limit the preset angle and can be determined according to actual conditions.
[0130] It should be noted that since there may be duplication between the light spot lines, all the light spot lines can be deduplicated, and then all the deduplicated light spot lines can be screened according to the angle between each deduplicated light spot line and the horizontal line to obtain the target line.
[0131] S406: Determine whether the number of all target links is greater than a third preset number; if the number of all target links is greater than the third preset number, execute step S407; if the number of all target links is less than or equal to the third preset number, execute step S408.
[0132] In this step, after obtaining the target lines, the controller can determine whether the current road is in a streetlight area according to the number of target lines, and judge whether the number of target lines is greater than a third preset number.
[0133] It should be noted that the third preset number can be 2, 3, 4, etc. The embodiment of the present application does not limit the third preset number and can be determined according to actual conditions.
[0134] S407: Control the high beam to be turned off.
[0135] In this step, if the controller determines that the number of all target links is greater than the third preset number, it means that there are a large number of street lamps and the current road is in a street lamp area, then the high beam is controlled to be turned off.
[0136] It should be noted that when it is determined that the high beam needs to be turned off, it can be turned off after a second preset time period. This is because the current vehicle is in two scenarios. The first scenario is that the vehicle has not entered the street light area, and the second scenario is that the vehicle is in the street light area.
[0137] In the first scenario, although the current road is in the streetlight area, the vehicle has not yet entered the streetlight area. It is necessary to wait until the vehicle enters the streetlight area before turning off the high beam.
[0138] In the second scenario, the vehicle is in a street lamp area and the high beam is currently off. Turning it off again after the second preset time will not affect driving safety.
[0139] The second preset time length may be 1 second, 2 seconds, 3 seconds, etc. The embodiment of the present application does not limit the second preset time length and may be determined according to actual conditions.
[0140] S408: Control the high beam to turn on.
[0141] In this step, if the controller determines that the number of all first light spots is less than or equal to the second preset number, it means that the number of first light spots is small. Even if the second light spots are all light spots corresponding to street lamps, the number of street lamps is small and the light is dim. The current road is not in the street lamp area, so the high beam is controlled to turn on.
[0142] If the controller determines that the number of all target links is less than or equal to the third preset number, it means that the number of street lamps is small, and the current road is not in the street lamp area, and then the high beam is controlled to turn on.
[0143] The high beam control method provided in this embodiment determines whether the current road is in a street light area according to the number of first light spots and light spot information, and then controls the turning on and off of the high beam, thereby improving control accuracy.
[0144] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0145] Figure 5 This is a schematic diagram of the structure of an embodiment of the high beam control device provided in this application. Figure 5 As shown, the high beam control device 50 includes:
[0146] The processing module 51 is used to determine the number of light spots and the light spot information of each light spot when it is determined that there are light spots in the acquired vehicle body environment image;
[0147] The control module 52 is used for controlling the high beam to be turned on if the number of light spots is less than or equal to a first preset number;
[0148] The processing module 51 is further configured to screen all the light spots according to the light spot information of each light spot to obtain a first light spot if the number of the light spots is greater than the first preset number;
[0149] The control module 52 is further configured to control the high beam to be turned on or off according to the quantity and light spot information of all the first light spots.
[0150] Furthermore, each of the light spot information includes light spot position information, a horizontal pixel quantity of the light spot, and a vertical pixel quantity of the light spot. The processing module 51 is specifically used for:
[0151] Screening all the light spots according to the light spot position information of each light spot to obtain a second light spot;
[0152] According to the transverse pixel quantity and the longitudinal pixel quantity of each second light spot, all the second light spots are screened to obtain the first light spot.
[0153] Furthermore, the processing module 51 is specifically used for:
[0154] For each of the light spots, if the light spot position corresponding to the light spot position information of the light spot does not belong to the preset ground plane range, the light spot is used as the second light spot.
[0155] Furthermore, the processing module 51 is specifically used for:
[0156] For each second light spot, if the horizontal pixel quantity of the second light spot belongs to a preset horizontal pixel quantity range, and the vertical pixel quantity of the second light spot belongs to a preset vertical pixel quantity range, the second light spot is used as the first light spot.
[0157] Further, each of the light spot information includes light spot position information, and the control module 52 is specifically used to:
[0158] If the number of all the first light spots is less than or equal to a second preset number, controlling the high beam to turn on;
[0159] If the number of all the first light spots is greater than the second preset number, the high beam is controlled to be turned on or off according to the light spot information of all the first light spots.
[0160] Furthermore, the control module 52 is specifically used for:
[0161] Determining a reference position of each first light spot according to the light spot position information of each first light spot;
[0162] Determine, from all the first light spots, an adjacent light spot of each of the first light spots according to a reference position of each of the first light spots;
[0163] For each of the first light spots, generating a light spot connection line according to a reference position of the first light spot and a reference position of a light spot adjacent to the first light spot;
[0164] According to the angle between each of the light spot connection lines and the horizontal line, all the light spot connection lines are screened to obtain the target connection line;
[0165] If the number of all the target links is greater than a third preset number, controlling the high beam to be turned off;
[0166] If the number of all the target links is less than or equal to the third preset number, the high beam is controlled to be turned on.
[0167] Furthermore, the control module 52 is specifically used for:
[0168] For each of the light spot lines, if the angle between the light spot line and the horizontal line is greater than a preset angle, the light spot line is used as a target line.
[0169] The high beam control device provided in this embodiment is used to execute the technical solution in any of the aforementioned method embodiments, and its implementation principle and technical effect are similar and will not be described in detail here.
[0170] Figure 6 This is a schematic diagram of the structure of an electronic device provided in this application. Figure 6 As shown, the electronic device 60 includes:
[0171] Processor 61, memory 62, and communication interface 63;
[0172] The memory 62 is used to store executable instructions of the processor 61;
[0173] The processor 61 is configured to execute the technical solution in any of the aforementioned method embodiments by executing the executable instructions.
[0174] Optionally, the memory 62 may be independent or integrated with the processor 61 .
[0175] Optionally, when the memory 62 is a device independent of the processor 61, the electronic device 60 may further include:
[0176] The bus 64 , the memory 62 and the communication interface 63 are connected to the processor 61 via the bus 64 and communicate with each other. The communication interface 63 is used to communicate with other devices.
[0177] Optionally, the communication interface 63 may be implemented by a transceiver. The communication interface is used to implement communication between the database access device and other devices (such as a client, a read-write library, and a read-only library). The memory may include a random access memory (RAM) and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage.
[0178] The bus 64 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0179] The above-mentioned processor can be a general-purpose processor, including a central processing unit CPU, a network processor (NP), etc.; it can also be a digital signal processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0180] The electronic device is used to execute the technical solution in any of the aforementioned method embodiments, and its implementation principle and technical effect are similar and will not be repeated here.
[0181] An embodiment of the present application also provides a readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the technical solution provided by any of the aforementioned method embodiments is implemented.
[0182] An embodiment of the present application also provides a computer program product, including a computer program, which is used to implement the technical solution provided by any of the aforementioned method embodiments when executed by a processor.
[0183] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0184] 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 high beam control method, characterized in that: include: When it is determined that there are light spots in the acquired vehicle body environment image, the number of light spots and light spot information of each light spot are determined; If the number of light spots is less than or equal to a first preset number, controlling the high beam to turn on; If the number of the light spots is greater than the first preset number, all the light spots are screened according to the light spot information of each light spot to obtain a first light spot; The high beam is controlled to be turned on or off according to the quantity and light spot information of all the first light spots.
2. The method according to claim 1, characterized in that Each of the light spot information includes light spot position information, a horizontal pixel quantity of the light spot, and a vertical pixel quantity of the light spot. According to the light spot information of each of the light spots, all the light spots are screened to obtain a first light spot, including: Screening all the light spots according to the light spot position information of each light spot to obtain a second light spot; According to the transverse pixel quantity and the longitudinal pixel quantity of each second light spot, all the second light spots are screened to obtain the first light spot.
3. The method according to claim 2, characterized in that The step of screening all the light spots according to the light spot position information of each light spot to obtain a second light spot comprises: For each of the light spots, if the light spot position corresponding to the light spot position information of the light spot does not belong to the preset ground plane range, the light spot is used as the second light spot.
4. The method according to claim 2, characterized in that: The step of screening all the second light spots according to the horizontal pixel quantity and the vertical pixel quantity of each second light spot to obtain the first light spot comprises: For each second light spot, if the horizontal pixel quantity of the second light spot belongs to a preset horizontal pixel quantity range, and the vertical pixel quantity of the second light spot belongs to a preset vertical pixel quantity range, the second light spot is used as the first light spot.
5. The method according to claim 1, characterized in that Each of the light spot information includes light spot position information, and controlling the high beam to be turned on or off according to the number and light spot information of all the first light spots includes: If the number of all the first light spots is less than or equal to a second preset number, controlling the high beam to turn on; If the number of all the first light spots is greater than the second preset number, the high beam is controlled to be turned on or off according to the light spot information of all the first light spots.
6. The method according to claim 5, characterized in that The controlling the high beam to be turned on or off according to the light spot information of all the first light spots includes: Determining a reference position of each first light spot according to the light spot position information of each first light spot; Determine, from all the first light spots, an adjacent light spot of each of the first light spots according to a reference position of each of the first light spots; For each of the first light spots, generating a light spot connection line according to a reference position of the first light spot and a reference position of a light spot adjacent to the first light spot; According to the angle between each of the light spot connection lines and the horizontal line, all the light spot connection lines are screened to obtain the target connection line; If the number of all the target lines is greater than a third preset number, controlling the high beam to be turned off; If the number of all the target links is less than or equal to the third preset number, the high beam is controlled to be turned on.
7. The method according to claim 6, characterized in that The method of screening all the light spot connection lines according to the angle between each light spot connection line and the horizontal line to obtain the target connection line includes: For each of the light spot lines, if the angle between the light spot line and the horizontal line is greater than a preset angle, the light spot line is used as a target line.
8. A high beam control device, characterized in that: include: A processing module, used for determining the number of light spots and the light spot information of each light spot when determining that there are light spots in the acquired vehicle body environment image; A control module is used to control the high beam to turn on if the number of light spots is less than or equal to a first preset number. The processing module is further configured to screen all the light spots according to the light spot information of each light spot to obtain a first light spot if the number of the light spots is greater than the first preset number; The control module is further used to control the high beam to be turned on or off according to the quantity and light spot information of all the first light spots.
9. An electronic device, characterized in that: include: Processor, memory, communication interface; The memory is used to store executable instructions of the processor; Wherein, the processor is configured to execute the high beam control method according to any one of claims 1 to 7 by executing the executable instructions.
10. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the high beam control method according to any one of claims 1 to 7 is implemented.
11. A computer program product, characterized in that It comprises a computer program, which is used to implement the high beam control method according to any one of claims 1 to 7 when being executed by a processor.