Color adjusting method, device and system and electronic equipment
By acquiring and analyzing the color statistics of the image acquisition device and adjusting the projection color of the AR-HUD device, the problem of insufficient contrast of projection information in a specific environment is solved, and driving safety and experience are improved.
Patent Information
- Application Number
- CN202510147270.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-10
- Publication Date
- 2025-05-30
AI Technical Summary
The traditional AR-HUD device has a single projection color, which leads to insufficient contrast of projection information in specific environments such as snow or foggy days, making it difficult to be identified by the driver, and increases driving risk.
By acquiring the color statistics of the target projection area corresponding to the image acquisition device, the current environment color information is determined, and the color of the projection information is adjusted according to this information to provide appropriate color contrast.
Improves driving safety and driving experience, ensuring clarity and recognizability of projected information in different environments.
Smart Images

Figure CN120056727A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of transportation technologies, and particularly to a color adjustment method, apparatus, system, and electronic device. Background Art
[0002] With the development of technology, augmented reality technology has been increasingly widely used in the automotive field. Among them, an AR-HUD (Augmented Reality Head-Up Display) device has become an important driving assistance device, providing more abundant driving information for drivers.
[0003] However, traditional AR-HUD devices have the problem of a single projection color, and the projection color is usually limited to white. This limitation may lead to a poor driving experience for drivers and may also increase the risk of driving. For example, in specific environments such as snowy days or foggy days, the white projection information is similar to the color of the background environment, resulting in a serious lack of contrast in the picture. Not only may the provided projection information not be clearly recognized by the driver, but also the driver's eyes may become exhausted due to long-term efforts to identify. Another example is that when following a vehicle, if the vehicle in front is white, the white projection information may blend with the color of the vehicle in front, making it difficult for the driver to identify key projection information and increasing the risk of driving. Summary of the Invention
[0004] In view of the above problems, the present application provides a color adjustment method, apparatus, system, and electronic device to achieve the purpose of providing appropriate color contrast according to the original image data and improving driving safety and driving experience. The specific solutions are as follows:
[0005] The first aspect of the present application provides a color adjustment method, including:
[0006] Obtaining color statistical data of a target projection area of a driving assistance device corresponding to an image acquisition device; the color statistical data is determined based on the original image data of the image acquisition device corresponding to the target projection area; the original image data corresponds to the environment in which the vehicle is located;
[0007] Based on the color statistical data, determining current environmental color information corresponding to the target projection area;
[0008] Based on the current environmental color information, determining target color information of projection information in the target projection area; the target color information is used to enable the driving assistance device to adjust the color information of the projection information in the target projection area.
[0009] In a possible implementation, obtaining color statistical data of a target projection area of an image acquisition device corresponding to a driving assistance device includes:
[0010] Obtaining the position of the eye nucleus;
[0011] Based on the position of the eye nucleus, calibrating the target position range of the target projection area in the imaging coordinate system of the image acquisition device on the vehicle;
[0012] Sending the target position range to the image acquisition device so that the image acquisition device performs statistics on the image raw data within the target position range in the image raw data collected by the image acquisition device to obtain color statistical data;
[0013] Obtaining the color statistical data from the image acquisition device.
[0014] In a possible implementation, sending the target position range to the image acquisition device so that the image acquisition device performs statistics on the image raw data within the target position range in the image raw data collected by the image acquisition device to obtain color statistical data includes:
[0015] Dividing the target projection area into a plurality of sub - projection areas;
[0016] Corresponding to the plurality of sub - projection areas, dividing the target position range into a plurality of sub - position ranges;
[0017] Sending the plurality of sub - position ranges to the image acquisition device so that the image acquisition device performs color statistics on the image raw data within each sub - position range in the image raw data collected by the image acquisition device to obtain color statistical data for each sub - position range;
[0018] Based on the color statistical data, determining the current environmental color information corresponding to the target projection area includes:
[0019] Based on the color statistical data of each sub - position range, respectively determining the current environmental color information corresponding to each sub - projection area;
[0020] Based on the current environmental color information, determining the target color information of the projection information in the target projection area includes:
[0021] Based on the current environmental color information corresponding to each sub - projection area, determining the target color information of the projection information in each sub - projection area.
[0022] In a possible implementation, based on the color statistical data of each of the sub-position ranges, determining the current ambient color information corresponding to each of the sub-projection regions respectively includes:
[0023] Performing white correction on the color statistical data of each of the sub-position ranges based on a first correction parameter to obtain the white-corrected color statistical data of each of the sub-position ranges;
[0024] Performing color correction on the white-corrected color statistical data of each of the sub-position ranges based on a second correction parameter to determine the current ambient color information corresponding to each of the sub-projection regions.
[0025] In a possible implementation, after determining the target color information of the projection information in each of the sub-projection regions based on the current ambient color information corresponding to each of the sub-projection regions, it further includes:
[0026] Performing smoothing processing on the target color information of the projection information in each of the sub-projection regions by using a Gaussian filter.
[0027] In a possible implementation, determining the target color information of the projection information in the target projection region based on the current ambient color information includes:
[0028] Obtaining the current projection color information of the projection information of the target projection region;
[0029] Determining the color contrast between the current projection color information and the current ambient color information;
[0030] If the color contrast is not less than a set color contrast threshold, determining the current projection color information as the target color information of the projection information in the target projection region.
[0031] In a possible implementation, the method further includes:
[0032] If the color contrast is less than the set color contrast threshold, determining the Hue component corresponding to the current ambient color information in the HSV color space;
[0033] Starting from the Hue component corresponding to the current ambient color information in the HSV color space, rotating a set angle clockwise or counterclockwise on the Hue component color disk in the HSV color space to obtain a new Hue component;
[0034] Taking the RGB components corresponding to the new Hue component in the RGB color space as the target color information of the projection information in the target projection region.
[0035] On the other hand, the present application provides a color adjustment device, including:
[0036] A color perception unit for obtaining color statistical data of a target projection area of an image acquisition device corresponding to a driving assistance device; the color statistical data is determined based on the original image data of the image acquisition device corresponding to the target projection area; the original image data corresponds to the environment in which the vehicle is located; and, based on the color statistical data, determining current environmental color information corresponding to the target projection area;
[0037] A target color calculation unit for determining target color information of projection information in the target projection area based on the current environmental color information; the target color information is used to enable the driving assistance device to adjust the color information of the projection information in the target projection area.
[0038] The third aspect of the present application provides a color adjustment system, including:
[0039] An image acquisition device for acquiring original image data, and determining color statistical data of a target projection area corresponding to a driving assistance device based on the original image data corresponding to the target projection area in the original image data; the original image data corresponds to the environment in which the vehicle is located;
[0040] A color adjustment device for obtaining the color statistical data, determining current environmental color information corresponding to the target projection area based on the color statistical data; and determining target color information of the projection information in the target projection area based on the current environmental color information;
[0041] The driving assistance device is used to adjust the color information of the projection information in the target projection area based on the target color information.
[0042] The fourth aspect of the present application provides an electronic device, including at least one processor and a memory connected to the processor, wherein:
[0043] The memory is used to store a computer program;
[0044] The processor is used to execute the computer program so that the electronic device can implement the color adjustment method described in any one of the above.
[0045] With the above technical solution, the color statistical data of the image acquisition device corresponding to the target projection area of the driving assistance device can reflect the original color of the environment where the vehicle corresponding to the target projection area is located. On this basis, based on the color statistical data, the current environmental color information corresponding to the target projection area is determined, so that the current environmental color information can reflect the color perceived by the human eye in the actual environment of the vehicle. Based on the current environmental color information, the target color information is determined, and the target color information is used to enable the driving assistance device to adjust the color information of the projection information in the target projection area, which can realize the adaptive adjustment of the color information of the projection information for different environments to provide an appropriate color contrast and improve driving safety and driving experience. Description of the Drawings
[0046] In combination with the accompanying drawings and with reference to the following specific embodiments, the above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic and the original and elements are not necessarily drawn to scale.
[0047] Figure 1 It is a schematic flow chart of a color adjustment method provided in Embodiment 1 of the present application;
[0048] Figure 2 It is a schematic flow chart of a color adjustment method provided in Embodiment 2 of the present application;
[0049] Figure 3 It is a schematic diagram of an implementation scenario of a color adjustment method provided in the present application;
[0050] Figure 4 It is a schematic flow chart of a color adjustment method provided in Embodiment 3 of the present application;
[0051] Figure 5 It is another schematic diagram of an implementation scenario of a color adjustment method provided in the present application;
[0052] Figure 6 It is a schematic flow chart of a color adjustment method provided in Embodiment 4 of the present application;
[0053] Figure 7 It is a schematic flow chart of a color adjustment method provided in Embodiment 5 of the present application;
[0054] Figure 8 It is a schematic structural diagram of a color adjustment device provided in the present application;
[0055] Figure 9 It is a schematic structural diagram of another color adjustment device provided in the present application;
[0056] Figure 10 Schematic diagram of another color adjustment device provided by this application;
[0057] Figure 11 Schematic diagram of another color adjustment device provided by this application. Detailed implementation manners
[0058] The embodiments of this application will be described below with reference to the accompanying drawings in the embodiments of this application. The terms used in the embodiments of this application are only for explaining the specific embodiments of this application, rather than intending to limit this application.
[0059] The embodiments of this application will be described below with reference to the accompanying drawings. Those skilled in the art know that with the development of technology and the emergence of new scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0060] The terms "first", "second", etc. in the description and claims of this application and the above accompanying drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that such terms can be interchanged under appropriate circumstances, which is only a way of distinguishing objects with the same attributes when describing the embodiments of this application. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion, so that a process, method, system, product or device including a series of units does not have to be limited to those units, but may include other units not clearly listed or inherent to these processes, methods, products or devices.
[0061] To solve the problem of single projection color, the projection color can be adjusted in the following ways:
[0062] Way (1): Manually adjust the AR-HUD color mode; Way (2): Based on an external sensor, real-time sense the change of ambient light and adjust the AR-HUD color mode accordingly; Way (3): Analyze the image collected by the camera, extract the color information of the environment, and adjust the AR-HUD color mode accordingly.
[0063] However, Way (1) is easily interfered by the subjective factors of the driver, and the adjustment during driving may distract the driver's attention, and there are still potential safety hazards.
[0064] Although Way (2) can sense the change of ambient light in real time, the manufacturing cost is high, and the accuracy and stability of the sensor affect the adjustment effect.
[0065] Although Way (3) can sense the color information of the current image environment, the collected image is processed by ISP and does not truly reflect the original information, and the algorithm complexity is high and the calculation time is long.
[0066] In addition, the above three methods all select and adjust from the preset color modes, making it difficult to adapt to all complex and changeable external environments.
[0067] Therefore, this application proposes a color adjustment method to ensure accurate environmental light perception, low cost, flexible adjustment, and improve driving safety and comfort.
[0068] The following further elaborates on this application in conjunction with the accompanying drawings and specific implementation manners.
[0069] Refer to Figure 1 , which is a schematic flowchart of a color adjustment method provided for Embodiment 1 of this application. This method can be applied to the main control module of a vehicle. As Figure 1 shown, this method can include but is not limited to the following steps:
[0070] Step S101: Obtain the color statistical data of the target projection area corresponding to the driving assistance device by the image acquisition device; the color statistical data is determined based on the original image data of the image acquisition device corresponding to the target projection area; the original image data corresponds to the environment where the vehicle is located.
[0071] In this embodiment, the driving assistance device can project projection information (such as vehicle speed, navigation instructions, road signs, obstacles, etc.) in front of the driver's line of sight, enabling the driver to avoid looking down at the instrument panel or navigation screen, thereby reducing the driver's line of sight transfer and improving driving safety. For example, the driving assistance device can be an AR-HUD device, and the AR-HUD device can project the projection information onto the windshield of the vehicle so that objects inside the vehicle (such as the driver) can see the virtual image from the windshield.
[0072] The original image data of the target projection area can be understood as: the image data collected by the image acquisition device and not processed or optimized in any form by the ISP Pipeline. The original image data can include the original color information without color interpolation, white balance adjustment, color space conversion, etc.
[0073] The color statistical data can be determined based on the original color information in the original image data of the image acquisition device corresponding to the target projection area. The original image data corresponds to the environment where the vehicle is located, so the color statistical data can reflect the original color of the environment where the vehicle is located.
[0074] It can be understood that performing subsequent processing based on the color statistical data can improve the processing efficiency and reduce the consumption of computing resources compared to performing subsequent processing based on the original color information.
[0075] Step S102: Determine the current environmental color information corresponding to the target projection area based on the color statistical data.
[0076] In this embodiment, the current environmental color information corresponding to the target projection area can be used to describe the color perceived by the human eye in the actual environment of the vehicle.
[0077] Step S103: Determine the target color information of the projection information in the target projection area based on the current environmental color information; the target color information is used to enable the driving assistance device to adjust the color information of the projection information in the target projection area.
[0078] In this embodiment, there is a difference between the current environmental color information corresponding to the target projection area and the target color information of the projection information in the target projection area, so that there is sufficient color contrast between the projection information and the background environment or the vehicle ahead, enabling an object (such as a driver) inside the vehicle to clearly identify the projection information, thereby improving driving safety and the driving experience.
[0079] The main control module can send the target color information of the projection information in the target projection area to the driving assistance device, and the driving assistance device can perform color adaptive adjustment based on the target color information.
[0080] In this embodiment, the color statistical data of the image acquisition device corresponding to the target projection area of the driving assistance device can reflect the original color of the environment where the vehicle is located corresponding to the target projection area. Based on this, the current environmental color information corresponding to the target projection area is determined, so that the current environmental color information can reflect the color perceived by the human eye in the actual environment of the vehicle. Based on the current environmental color information, the target color information is determined, and the target color information is used to enable the driving assistance device to adjust the color information of the projection information in the target projection area, which can achieve adaptive adjustment of the color information of the projection information for different environments to provide appropriate color contrast and improve driving safety and the driving experience.
[0081] As another alternative embodiment of the present application, refer to Figure 2 , which is a schematic flowchart of a color adjustment method provided in Embodiment 2 of the present application. This embodiment is mainly a refinement of step S101 in the above Embodiment 1. As Figure 2 shown, step S101 may include but is not limited to the following steps:
[0082] Step S1011: Obtain the position of the eye nucleus.
[0083] In this embodiment, when the driving assistance device provides a projection function, it can project projection information in front of the line of sight of the object. To ensure that the object can clearly and accurately see the projection information, the driving assistance device needs to determine the position of the eye nucleus of the object. After the position of the eye nucleus is determined, the driving assistance device can perform projection based on the position of the eye nucleus of the object to ensure that the projection information can be clearly and accurately presented within the line of sight of the object.
[0084] The driving assistance device can send the position of the eye nucleus to the main control module. Correspondingly, the main control module receives the position of the eye nucleus from the driving assistance device.
[0085] Step S1012: Based on the position of the eye nucleus, calibrate the target position range of the target projection area in the imaging coordinate system of the image acquisition device on the vehicle.
[0086] In this embodiment, the target projection area of the driving assistance device corresponding to the position of the eye nucleus can be determined.
[0087] In this embodiment, an eye coordinate system can be established based on the position of the eye nucleus. Further, the coordinates A, B, C, and D of the four corner points of the target projection area in the eye coordinate system can be determined. Secondly, based on the transformation matrix between the eye coordinate system and the world coordinate system, the coordinates A', B', C', and D' corresponding to the coordinates A, B, C, and D in the world coordinate system can be determined. Finally, based on the transformation matrix between the imaging coordinate system of the image acquisition device and the world coordinate system, the coordinates A", B", C", and D" corresponding to the coordinates A', B', C', and D' in the imaging coordinate system can be determined. The range formed by the coordinates A", B", C", and D" can be used as the target position range of the target projection area in the imaging coordinate system of the image acquisition device on the vehicle.
[0088] For example, if the driving assistance device may include: an AR-HUD device, such as Figure 3As shown, the PGU light source in the AR-HUD device projects the projection information (such as driving assistance information) onto the front windshield of the vehicle through multiple internal light path foldbacks and reflects it into the human eye. The driver can see a distant and enlarged virtual image (Virtual Image) in front. In the human eye coordinate system xyz, the position coordinates of the four corner points of the virtual image can be expressed as A, B, C, and D. The virtual image seen by the human eye will have a corresponding position in the world coordinate system x'-y'-z' of the road. The coordinates A, B, C, and D can be converted to coordinates A', B', C', and D' through calibration. The ADAS forward-looking camera (i.e., an embodiment of the image acquisition device) above the windshield captures the road conditions ahead in real time, and can convert the positions A', B', C', D' of the virtual image in the world coordinate system into A", B", C", D" in the ADAS forward-looking coordinate system x"-y"-z". As described in the above steps, the conversion calibration of the human eye coordinate system xyz→world coordinate system x'-y'-z'→ADAS forward-looking coordinate system x"-y"-z" is completed, and the accurate position of the HUD projection area in the ADAS forward-looking camera capture image can be obtained.
[0089] Step S1013: Send the target position range to the image acquisition device, so that the image acquisition device performs statistics on the original image data within the target position range in the original image data acquired by the image acquisition device to obtain color statistical data.
[0090] In this embodiment, the coordinates A", B", C", and D" can be sent to the image acquisition device, and the image acquisition device can perform statistics on the original image data within the target position range composed of the coordinates A", B", C", and D" to obtain H3A data. The H3A data may include the average value of the R channel, the stitching value of the Gr channel, the average value of the Gb channel, and the average value of the B channel.
[0091] Step S1014: Obtain color statistical data from the image acquisition device.
[0092] In this embodiment, the position of the eye nucleus is inherent in the projection function of the driving assistance device. The main control module can directly use the position of the eye nucleus determined by the driving assistance device, reducing the computational burden on the main control module itself. Based on the position of the eye nucleus, the main control module can accurately calibrate the target position range of the target projection area in the imaging coordinate system of the image acquisition device on the vehicle, and send the target position range to the image acquisition device, so that the image acquisition device can only perform statistics on the original image data within the target position range, rather than on the original image data within the entire field of view. This can reduce the computational amount of the image acquisition device, thereby improving the efficiency of the main control module in obtaining color statistics data, further improving the efficiency of adjusting the color information of the projection information, and further enhancing driving safety and driving experience.
[0093] As another alternative embodiment of the present application, refer to Figure 4 , which is a schematic flowchart of a color adjustment method provided in Embodiment 3 of the present application. This embodiment is mainly a refinement of step S1013 in the above-mentioned Embodiment 2. As Figure 4 shown, step S1013 may include but is not limited to the following steps:
[0094] Step S10131: Divide the target projection area into multiple sub-projection areas.
[0095] In the present application, the number of multiple sub-projection areas is not limited. For example, the target projection area can be divided into 16 sub-projection areas.
[0096] Step S10132: Corresponding to the multiple sub-projection areas, divide the target position range into multiple sub-position ranges.
[0097] In this embodiment, the number of multiple sub-position ranges can be the same as the number of multiple sub-projection areas. For example, corresponding to 16 sub-projection areas, the target position range can be divided into 16 sub-position ranges.
[0098] Step S10133: Send the multiple sub-position ranges to the image acquisition device, so that the image acquisition device performs color statistics on the original image data within each sub-position range in the original image data collected by the image acquisition device, and obtains the color statistics data of each sub-position range.
[0099] In this embodiment, the image acquisition device can partition its field of view. After receiving the multiple sub-position ranges sent by the main control module, it can set the weight coefficient of the partition that coincides with the sub-position range in the partition to 1, and set the weight coefficients of other partitions to 0. The image acquisition device can only perform color statistics on the original image data within the partition with a weight coefficient of 1. For example, the positional relationship of the target projection area within the driver's field of view is as Figure 5As shown in part (a), the target projection area can be divided into 16 sub-projection areas, and each sub-projection area is an independent color control unit. The 16 sub-projection areas correspond to 16 sub-position ranges in the imaging coordinate system of the ADAS front-view camera. The field of view of the ADAS front-view camera can be set to 8×8, a total of 64 partitions, as Figure 5 As shown in part (b), the weight coefficient of the sub-position range in the partition can be set to 1, and the weight coefficients of other partitions can be set to 0. The image acquisition device can only perform color statistics on the raw image data within the partition with a weight coefficient of 1 to obtain the color statistical data of the 16 partitions.
[0100] Correspondingly, step S1041 may include:
[0101] Step S10411: Obtain the color statistical data of each sub-position range from the image acquisition device.
[0102] Correspondingly, step S102 may include but is not limited to:
[0103] Step S1021: Based on the color statistical data of each sub-position range, respectively determine the current ambient color information corresponding to each sub-projection area.
[0104] The current ambient color information corresponding to the sub-projection area can be used to describe the color perceived by the human eye in the actual environment corresponding to the sub-projection area.
[0105] Correspondingly, step S103 may include but is not limited to:
[0106] Step S1031: Based on the current ambient color information corresponding to each sub-projection area, determine the target color information of the projection information in each sub-projection area.
[0107] There is a difference between the target color information of the projection information in the sub-projection area and the current ambient color information corresponding to the sub-projection area, so that there is sufficient color contrast between the projection information in the sub-projection area and the background environment corresponding to the sub-projection area or a part of the vehicle in front, enabling the object in the vehicle (such as the driver) to clearly identify the projection information, improving driving safety and driving experience.
[0108] Moreover, without adding additional computing units, color statistics can be performed by partitioning and weighting the field of view of the image acquisition device, which can reduce the computational amount and improve the efficiency of color statistics.
[0109] As another optional embodiment of the present application, referring to Figure 6 , it is a schematic flowchart of a color adjustment method provided in Embodiment 4 of the present application. This embodiment is mainly a refinement of step S1021 in Embodiment 3 above, as Figure 6As shown, step S1021 may include but is not limited to the following steps:
[0110] Step S10211: Perform white correction on the color statistical data of each sub-position range based on the first correction parameter to obtain the white-corrected color statistical data of each sub-position range.
[0111] In this embodiment, the first correction parameter can be calculated by the image acquisition device. For example, the first correction parameter may include: AWB (Automatic White Balance) parameter, and the AWB parameter may include R gain , G gain , B gain , R gain , G gain , B gain can be used to adjust the gains of the R channel, G channel, and B channel of the sub-position range. White correction can be performed through the following relational expression:
[0112] R′ = R * R gain
[0113] G′ = G * G gain
[0114] B′ = B * B gain
[0115] R represents the average value of the R channel, G represents the average value of the G channel, B represents the average value of the B channel, R′ represents the average value of the R channel after ARW correction, G′ represents the average value of the G channel after ARW correction, and B′ represents the average value of the B channel after ARW correction.
[0116] Step S10212: Perform color correction on the white-corrected color statistical data of each sub-position range based on the second correction parameter to determine the current ambient color information corresponding to each sub-projection area.
[0117] In this embodiment, the second correction parameter can be calculated by the image acquisition device. For example, the second correction parameter may include: CCM (Color Correction Matrix), and correspondingly, color correction can be performed through the following relational expression:
[0118]
[0119] represents CCM, R ″ represents the value of R′ after color correction, G ″ represents the value of G′ after color correction, B ″ represents the value of B′ after color correction.
[0120] In this embodiment, without adding extra computing units, the AWB parameters and CCM calculated by the image acquisition device can be used to complete the correction. Moreover, compared with the method of correcting pixel by pixel, the correction by partition can reduce the amount of calculation and improve the efficiency of color statistics.
[0121] As another optional embodiment of the present application, referring to Figure 7 , which is a schematic flowchart of a color adjustment method provided in Embodiment 5 of the present application. As shown in Figure 7 , the method may include but is not limited to the following steps:
[0122] Step S201: Obtain the position of the eye nucleus.
[0123] Step S202: Based on the position of the eye nucleus, calibrate the target position range of the target projection area in the imaging coordinate system of the image acquisition device on the vehicle.
[0124] For the detailed processes of Steps S201 - S202, reference can be made to the relevant descriptions of Steps S1011 - S1012 in Embodiment 2, which will not be elaborated here.
[0125] Step S203: Divide the target projection area into multiple sub - projection areas.
[0126] Step S204: Corresponding to the multiple sub - projection areas, divide the target position range into multiple sub - position ranges.
[0127] Step S205: Send the multiple sub - position ranges to the image acquisition device, so that the image acquisition device performs color statistics on the image raw data within each sub - position range in the image raw data collected by the image acquisition device, and obtains the color statistical data of each sub - position range.
[0128] For the detailed processes of Steps S203 - S205, reference can be made to the relevant descriptions of Steps S10131 - S10133 in Embodiment 3, which will not be elaborated here.
[0129] Step S206: Obtain the color statistical data of each sub - position range from the image acquisition device.
[0130] For the detailed process of Step S206, reference can be made to the relevant description of Step S10141 in Embodiment 4, which will not be elaborated here.
[0131] Step S207: Based on the color statistical data of each sub - position range, respectively determine the current environmental color information corresponding to each sub - projection area.
[0132] For the detailed process of Step S207, reference can be made to the relevant description of Step S1021 in Embodiment 3, which will not be elaborated here.
[0133] Step S208: Based on the current environmental color information corresponding to each sub-projection area, determine the target color information of the projection information in each sub-projection area.
[0134] For the detailed process of Step S208, reference can be made to the relevant introduction of Step S1031 in Embodiment 3, which will not be elaborated here.
[0135] Step S209: Use a Gaussian filter kernel to smooth the target color information of the projection information in each sub-projection area.
[0136] In this embodiment, the edge pixels of the sub-projection area do not have complete neighborhood information, so edge filling is required. In this application, the method of edge filling is not limited. For example, the mirror filling method can be selected to fill the edge by copying the symmetric pixel values of the edge pixels.
[0137] On the basis of edge filling the sub-projection area, each pixel in the sub-projection area can be traversed. Taking this pixel as the center, a pixel matrix corresponding to the size of the Gaussian filter kernel is taken out. Based on the Gaussian filter kernel and the pixel matrix, a new pixel value is obtained, and the new pixel value is assigned to this pixel to complete the filtering of this pixel.
[0138] In this embodiment, corresponding to multiple sub-projection areas, the target position range is divided into multiple sub-position ranges, and color statistics are performed for each sub-position range, and then the implementation method of determining the target color information corresponding to each sub-projection area may have a color block effect, that is, the driving assistance device projects different colors in different sub-projection areas, resulting in poor picture appearance. To improve the color block effect, smoothing processing can be performed based on the Gaussian filter kernel to improve the color coherence of multiple sub-projection areas and improve the picture appearance.
[0139] As another optional embodiment of the present application, a color adjustment method provided in Embodiment 6 of the present application. This embodiment is mainly an implementation manner of Step S103 in Embodiment 1. Step S103 may include but is not limited to the following steps:
[0140] Step S1032: Obtain the current projection color information of the projection information in the target projection area.
[0141] In this embodiment, the current projection color information of the projection information in the target projection area can be obtained from the driving assistance device.
[0142] Step S1033: Determine the color contrast between the current projection color information and the current environmental color information.
[0143] In this embodiment, the color contrast can be determined through the following relational expression:
[0144]
[0145] Among them, L 1 represents the relative luminance of the current projection color information, and L 0 represents the relative luminance of the current ambient color information. The relative luminance L 1 or L 0 can be calculated by the following relational expression:
[0146] L = 0.2126 * R + 0.7152 * G + 0.0722 * B
[0147] R represents the average value of the R channel, G represents the average value of the G channel, and B represents the average value of the B channel.
[0148] Step S1034: If the color contrast is not less than the set color contrast threshold, determine the current projection color information as the target color information of the projection information in the target projection area.
[0149] If the color contrast is not less than the set color contrast threshold, it indicates that the color difference between the current projection color information and the current ambient color information is relatively obvious. The current projection color information can be determined as the target color information of the projection information in the target projection area, which is equivalent to not adjusting the current projection color information.
[0150] The set color contrast threshold can be obtained through calibration measurement.
[0151] In this embodiment, by calculating the color contrast between the current projection color information and the current ambient color information, the color difference between the two can be quantified. If the color contrast is not less than the set color contrast threshold, it indicates that the current projection color has formed a sufficient color contrast with the background environment, and the driver can clearly identify the projection information. In this case, determining the current projection color information as the target color information of the projection information in the target projection area, that is, not adjusting the projection color, can maintain the original design effect of the projection information and avoid the computational overhead and possible color distortion caused by unnecessary color adjustment.
[0152] As another alternative embodiment of the present application, a color adjustment method provided for Embodiment 7 of the present application. This embodiment is mainly an implementation manner of step S103 in Embodiment 1. Step S103 may include but is not limited to the following steps:
[0153] Step S1035: Obtain the current projection color information of the projection information in the target projection area.
[0154] Step S1036: Determine the color contrast between the current projection color information and the current ambient color information.
[0155] Step S1037: If the color contrast is not less than the set color contrast threshold, determine the current projection color information as the target color information of the projection information in the target projection area.
[0156] For the detailed processes of steps S1035 - S1037, reference can be made to the relevant descriptions of steps S1032 - S1034 in Embodiment 6, which will not be elaborated here.
[0157] Step S1038: If the color contrast is less than the set color contrast threshold, determine the Hue component corresponding to the current environmental color information in the HSV color space.
[0158] If the color contrast is less than the set color contrast threshold, it indicates that the color difference between the current projection color information and the current environmental color information is not obvious, and a new projection color needs to be determined.
[0159] Step S1039: Starting from the Hue component corresponding to the current environmental color information in the HSV color space, rotate a set angle clockwise or counterclockwise on the Hue component color wheel in the HSV color space to obtain a new Hue component.
[0160] The set angle can be set as needed and is not limited in this application. For example, the set angle can be any angle in the range of 120° to 240°.
[0161] Step S10310: Use the RGB components corresponding to the new Hue component in the RGB color space as the target color information of the projection information in the target projection area.
[0162] It can be understood that the new Hue component can have an obvious difference from the Hue component corresponding to the current environmental color information in the HSV color space. Correspondingly, the RGB components corresponding to the new Hue component in the RGB color space also have an obvious difference from the current environmental color information, that is, there is an obvious difference between the target color information of the projection information in the target projection area and the current environmental color information.
[0163] In this embodiment, a new projection color can be determined through the Hue component color wheel in the HSV color space, so that there is an obvious difference between the target color information of the projection information in the target projection area and the current environmental color information, providing an appropriate color contrast for the environment and projection information, and improving driving safety and driving experience.
[0164] It should be noted that for the implementation manner of step S209 in Embodiment 5, reference can also be made to the relevant descriptions of steps S1032 - S1037, which will not be elaborated here.
[0165] Next, a color adjustment device provided by the present application will be introduced. The color adjustment device described below can be correspondingly referred to the color adjustment method described above.
[0166] Please refer to Figure 8 , the color adjustment device includes: a color perception unit 100 and a target color calculation unit 200.
[0167] The color perception unit 100 is used to obtain the color statistical data of the target projection area corresponding to the driving assistance device by the image acquisition device; the color statistical data is determined based on the original image data corresponding to the target projection area by the image acquisition device; the original image data corresponds to the environment where the vehicle is located; and, based on the color statistical data, the current environment color information corresponding to the target projection area is determined.
[0168] The target color calculation unit 200 is used to determine the target color information of the projection information in the target projection area based on the current environment color information; the target color information is used to enable the driving assistance device to adjust the color information of the projection information in the target projection area.
[0169] The color adjustment device may further include: a calibration unit 300.
[0170] As Figure 9 shown, the calibration unit 300 can be used to:
[0171] Obtain the eye nucleus position;
[0172] Determine the target projection area of the driving assistance device corresponding to the eye nucleus position;
[0173] Calibrate the target position range of the target projection area in the imaging coordinate system of the image acquisition device on the vehicle;
[0174] Send the target position range to the image acquisition device, so that the image acquisition device statistically processes the original image data within the target position range in the original image data acquired by the image acquisition device to obtain color statistical data;
[0175] As Figure 9 shown, the eye nucleus position may be sent by the driving assistance device to the calibration unit 300.
[0176] Correspondingly, the color perception unit 100 can be used to obtain the color statistical data from the image acquisition device.
[0177] Among them, the process that the calibration unit 300 sends the target position range to the image acquisition device, so that the image acquisition device statistically processes the original image data within the target position range in the original image data acquired by the image acquisition device to obtain color statistical data may specifically include:
[0178] Divide the target projection area into multiple sub - projection areas;
[0179] Corresponding to the multiple sub - projection areas, divide the target position range into multiple sub - position ranges;
[0180] Send the multiple sub - position ranges to the image acquisition device, so that the image acquisition device performs color statistics on the image raw data within each sub - position range in the image raw data acquired by the image acquisition device, and obtains the color statistical data of each sub - position range.
[0181] Correspondingly, the process by which the color perception unit 100 determines the current ambient color information corresponding to the target projection area based on the color statistical data may specifically include:
[0182] Based on the color statistical data of each sub - position range, respectively determine the current ambient color information corresponding to each sub - projection area.
[0183] The target color calculation unit 200 may specifically be used to determine the target color information of the projection information in each sub - projection area based on the current ambient color information corresponding to each sub - projection area.
[0184] As Figure 10 shown, the image acquisition device may also send the first correction parameter and the second correction parameter to the color perception unit 100. Correspondingly, the process by which the color perception unit 100 determines the current ambient color information corresponding to each sub - projection area based on the color statistical data of each sub - position range may specifically include:
[0185] Perform white correction on the color statistical data of each sub - position range based on the first correction parameter to obtain the white - corrected color statistical data of each sub - position range;
[0186] Perform color correction on the white - corrected color statistical data of each sub - position range based on the second correction parameter to determine the current ambient color information corresponding to each sub - projection area.
[0187] In this embodiment, the color adjustment device may further include: a filtering feedback unit 400.
[0188] The filtering feedback unit 400 is used to perform smoothing processing on the target color information of the projection information in each sub - projection area by using a Gaussian filter kernel.
[0189] As Figure 11 shown, the filtering feedback unit 400 may send the smoothed target color information to the driving assistance device, so that the driving assistance device performs adaptive projection color adjustment based on the target color information.
[0190] In this embodiment, the target color calculation unit 200 may specifically be used for:
[0191] Obtain the current projection color information of the projection information of the target projection area;
[0192] Determine the color contrast between the current projection color information and the current ambient color information;
[0193] If the color contrast is not less than the set color contrast threshold, determine the current projection color information as the target color information of the projection information in the target projection area;
[0194] If the color contrast is less than the set color contrast threshold, determine the Hue component corresponding to the current ambient color information in the HSV color space;
[0195] Starting from the Hue component corresponding to the current ambient color information in the HSV color space, rotate a set angle clockwise or counterclockwise on the Hue component color disk of the HSV color space to obtain a new Hue component;
[0196] Use the RGB components corresponding to the new Hue component in the RGB color space as the target color information of the projection information in the target projection area.
[0197] Next, a color adjustment system provided by the present application will be introduced. The color adjustment system introduced below can be mutually corresponding and referenced with the color adjustment method introduced above.
[0198] A color adjustment system may include:
[0199] An image acquisition device, configured to acquire image raw data, and determine color statistical data of a target projection area corresponding to a driving assistance device based on the image raw data corresponding to the target projection area in the image raw data; the image raw data corresponds to the environment where the vehicle is located.
[0200] A color adjustment device, configured to obtain color statistical data, determine the current ambient color information corresponding to the target projection area based on the color statistical data; and determine the target color information of the projection information in the target projection area based on the current ambient color information.
[0201] A driving assistance device, configured to adjust the color information of the projection information in the target projection area based on the target color information.
[0202] In an embodiment of the present application, an electronic device is further provided. The electronic device is installed on a vehicle. The electronic device may include at least one processor and a memory connected to the processor, wherein:
[0203] The memory is used to store a computer program;
[0204] The processor is used to execute a computer program so that the electronic device can implement the color adjustment method introduced in any one of Embodiments 1 to 6.
[0205] An embodiment of the present application also provides a computer program product, including computer-readable instructions. When the computer-readable instructions run on an electronic device, the electronic device implements the color adjustment method introduced in any one of Embodiments 1 to 6 of the present application.
[0206] An embodiment of the present application also provides a computer-readable storage medium. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the color adjustment method introduced in any one of Embodiments 1 to 6.
[0207] In addition, it should be noted that the device embodiments described above are only illustrative. The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the attached drawings of the device embodiments provided in the present application, the connection relationship between the modules indicates that they have a communication connection, which can be specifically implemented as one or more communication buses or signal lines.
[0208] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by dedicated hardware including application-specific integrated circuits, dedicated CPUs, dedicated memories, dedicated components, etc. Generally, functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structures for implementing the same function can also be various, such as analog circuits, digital circuits or dedicated circuits. However, for the present application, in more cases, software program implementation is a better implementation method. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a readable storage medium, such as a floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk or optical disc of a computer, and includes several instructions to enable a computer device (which can be a personal computer, training device, or network device, etc.) to execute the methods described in various embodiments of the present application.
[0209] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product.
[0210] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from a website, a computer, a training device, or a data center to another website, a computer, a training device, or a data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or a data center that includes one or more integrated available media. The available medium may be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)).
Claims
1. A color adjustment method, characterized in that: include: Acquire color statistics of the image acquisition device corresponding to the target projection area of the driving assistance device; The color statistical data is determined based on the original image data of the image acquisition device corresponding to the target projection area; the original image data corresponds to the environment in which the vehicle is located; Based on the color statistical data, determine the current environment color information corresponding to the target projection area; Based on the current environment color information, determining target color information of the projection information in the target projection area; The target color information is used to enable the driving assistance device to adjust the color information of the projection information in the target projection area.
2. The method according to claim 1, characterized in that Obtaining color statistics of the image acquisition device corresponding to the target projection area of the driving assistance device, including: Obtain the position of the eye nucleus; Based on the eye nucleus position, calibrate the target position range of the target projection area in the imaging coordinate system of the image acquisition device on the vehicle; Sending the target position range to the image acquisition device, so that the image acquisition device performs statistics on the original image data within the target position range in the original image data acquired by the image acquisition device to obtain color statistical data; The color statistics are obtained from the image acquisition device.
3. The method according to claim 2, characterized in that The target position range is sent to the image acquisition device so that the image acquisition device performs statistics on the original image data collected by the image acquisition device and within the target position range to obtain color statistical data, including: Dividing the target projection area into a plurality of sub-projection areas; Corresponding to the multiple sub-projection areas, dividing the target position range into multiple sub-position ranges; Sending the multiple sub-position ranges to the image acquisition device, so that the image acquisition device performs color statistics on the original image data within each sub-position range in the original image data acquired by the image acquisition device, to obtain color statistics data of each sub-position range; Determining current environment color information corresponding to the target projection area based on the color statistical data includes: Based on the color statistical data of each of the sub-position ranges, respectively determine the current environment color information corresponding to each of the sub-projection areas; Determining target color information of the projection information in the target projection area based on the current environment color information includes: Based on the current environment color information corresponding to each of the sub-projection areas, target color information of the projection information in each of the sub-projection areas is determined.
4. The method according to claim 3, characterized in that Based on the color statistical data of each of the sub-position ranges, current environment color information corresponding to each of the sub-projection areas is determined respectively, including: Performing white correction on the color statistical data of each of the sub-position ranges based on the first correction parameter to obtain the color statistical data of each of the sub-position ranges after white correction; Color correction is performed on the color statistical data of each sub-position range after white correction based on the second correction parameter to determine current environment color information corresponding to each sub-projection area.
5. The method according to claim 3, characterized in that: After determining the target color information of the projection information in each of the sub-projection areas based on the current environment color information corresponding to each of the sub-projection areas, the method further includes: The target color information of the projection information in each of the sub-projection areas is smoothed using a Gaussian filter kernel.
6. The method according to claim 1, characterized in that Determining target color information of the projection information in the target projection area based on the current environment color information includes: Acquire current projection color information of the projection information of the target projection area; Determine a color contrast ratio between the current projection color information and the current environment color information; If the color contrast is not less than the set color contrast threshold, the current projection color information is determined as the target color information of the projection information in the target projection area.
7. The method according to claim 6, characterized in that The method further comprises: If the color contrast is less than the set color contrast threshold, determine the Hue component corresponding to the current environment color information in the HSV color space; Taking the Hue component corresponding to the current environment color information in the HSV color space as the starting point, the Hue component color wheel in the HSV color space is rotated clockwise or counterclockwise by a set angle to obtain a new Hue component; The RGB component corresponding to the new Hue component in the RGB color space is used as the target color information of the projection information in the target projection area.
8. A color adjustment device, characterized in that: include: A color perception unit, used to obtain color statistics of the image acquisition device corresponding to the target projection area of the driving assistance device; The color statistical data is determined based on the original image data of the image acquisition device corresponding to the target projection area; the original image data corresponds to the environment in which the vehicle is located; and based on the color statistical data, the current environment color information corresponding to the target projection area is determined; A target color calculation unit, configured to determine target color information of the projection information in the target projection area based on the current environment color information; The target color information is used to enable the driving assistance device to adjust the color information of the projection information in the target projection area.
9. A color adjustment system, comprising: An image acquisition device, used to acquire original image data, and determine color statistics corresponding to the target projection area of the driving assistance device based on the original image data corresponding to the target projection area in the original image data; the original image data corresponds to the environment in which the vehicle is located; A color adjustment device, used to obtain the color statistical data, and determine the current environment color information corresponding to the target projection area based on the color statistical data; Based on the current environment color information, determining target color information of the projection information in the target projection area; The driving assistance device is used to adjust the color information of the projection information in the target projection area based on the target color information.
10. An electronic device, characterized in that: The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the color adjustment method according to any one of claims 1 to 6.