Method and device for image processing

By processing the image with gain function and compensation function, highlighting specific colors or features, the problem of insignificant differences between the target and the environment in image processing is solved, and the accuracy of object detection is improved.

CN119729231APending Publication Date: 2025-03-28VALEO INTERIOR CONTROLS (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311285052.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-28
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

In complex object detection application scenarios, how to properly process the image so that the difference between the object to be detected and the surrounding environment is more significant, thereby improving the accuracy of object detection.

Method used

By processing the input image, a gain function and compensation function are used to enhance specific colors or features in the image, generating an output image so that specific colors or features are highlighted. The specific steps include obtaining the input image, determining the gain function and the compensation function, determining the third dimension function based on these functions, and then determining the third dimension value of the pixel, and generating an output image.

Benefits of technology

By highlighting specific colors or features, recognizability after image processing is improved, making object detection easier and more accurate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119729231A_ABST
    Figure CN119729231A_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method for image processing, the method comprising: acquiring an input image wherein the color of each pixel of the input image is presented by values of three dimensions; determining a gain function in a first dimension, wherein the gain function gains values within a first range of the first dimension; determining a compensation function in the second dimension, wherein the value of the compensation function increases as the value of the second dimension increases; determining a third dimension function according to the gain function and the compensation function; determining the value of the third dimension of each pixel according to the value of the first dimension and the value of the second dimension by using the third dimension function; and generating an output image according to the value of the first dimension, the value of the second dimension, and the value of the third dimension for each pixel. The disclosure also relates to an apparatus for image processing, an image processing apparatus for a vehicle, a computer program product and a computer readable storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to a method for image processing, an apparatus for image processing, an image processing apparatus for a vehicle, a computer program product, and a computer-readable storage medium. Background Art

[0002] As one of the most important sources of information for humans, images account for a large proportion of various information databases. With the rapid development of computer technology, image processing has been widely used in all aspects of human social life, such as industrial inspection, medicine, intelligent robots, etc. Images are often used in various fields to describe and express the characteristics and logical relationships of things due to their vividness and intuitiveness. They have a wide range of applications. Therefore, the development of image processing technology and information processing in various fields are extremely important.

[0003] Image processing technology is a technology that uses computers to process image information. It mainly includes image target detection, image enhancement and restoration, image data encoding, image segmentation and image recognition. Among them, image target detection technology is widely used in application scenarios such as security monitoring, autonomous driving, traffic condition monitoring, drone scene analysis, and robot vision.

[0004] As target detection application scenarios become more and more complex, how to properly process images so that the difference between the target to be detected and the surrounding environment in the image is more obvious, thereby making target detection easier and more accurate is one of the important research directions in the field of image processing and target detection. Summary of the invention

[0005] According to the method and device for image processing disclosed in the present invention, the obtained original image, especially the color image, is processed so that specific colors, specific indicators or specific features in the processed image are highlighted or enhanced to be suitable for subsequent image processing.

[0006] The present disclosure provides a method for image processing, the method comprising: acquiring an input image, wherein the colors of each pixel of the input image are presented by values ​​of three dimensions; determining a gain function in a first dimension, wherein the gain function enables values ​​within a first range of the first dimension to obtain gain; determining a compensation function in a second dimension, wherein the value of the compensation function increases as the value of the second dimension increases; determining a third dimension function based on the gain function and the compensation function; using the third dimension function, determining the value of the third dimension of each pixel based on the value of the first dimension and the value of the second dimension; and generating an output image based on the value of the first dimension, the value of the second dimension, and the value of the third dimension of each pixel.

[0007] In an embodiment according to the present disclosure, acquiring the input image includes: acquiring an RGB image, and converting the RGB image into an input image, wherein the input image is an HSV image, and the color of each pixel of the HSV image is presented by a hue value, a saturation value, and a brightness value.

[0008] In an embodiment according to the present disclosure, determining a gain function in the first dimension includes: determining a gain function for the hue value; determining a compensation function in the second dimension includes: determining a compensation function for the saturation value; determining a third dimension function based on the gain function and the compensation function includes: determining a brightness function based on the gain function and the compensation function; using the third dimension function, determining the value of the third dimension of each pixel based on the value of the first dimension and the value of the second dimension includes: using the brightness function, determining the processed brightness value of each pixel based on the hue value and the saturation value; and generating an output image based on the value of the first dimension, the value of the second dimension and the value of the third dimension of each pixel includes: generating a processed HSV image based on the hue value, the saturation value and the processed brightness value of each pixel.

[0009] In an embodiment according to the present disclosure, determining the brightness function according to the gain function and the compensation function includes: multiplying the gain function and the compensation function to determine the brightness function.

[0010] In an embodiment of the present disclosure, using the brightness function to determine the processed brightness value of each pixel according to the hue value and the saturation value includes: using the brightness function to determine the brightness increment of each pixel according to the hue value and the saturation value, and adding the brightness increment to the brightness value of each pixel to determine the processed brightness value.

[0011] In an embodiment according to the present disclosure, the gain function enables the target value within the first range of the first dimension to have the maximum gain, and the gains of the first dimension values ​​on both sides of the target value gradually decrease.

[0012] In an embodiment according to the present disclosure, the gain function is a parabolic function or a normal distribution function.

[0013] In an embodiment according to the present disclosure, the first range of the first dimension includes hue values ​​from 26 to 34.

[0014] In an embodiment according to the present disclosure, the slope of the compensation function increases as the value of the second dimension increases.

[0015] In an embodiment according to the present disclosure, the compensation function is an exponential function or a gamma function.

[0016] An embodiment of the present disclosure further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it is used to execute the above method.

[0017] An embodiment of the present disclosure further provides a computer-readable storage medium having computer-executable instructions stored thereon, and the instructions are used to execute the above method when executed by a processor.

[0018] An embodiment of the present disclosure also provides a device for image processing, the device for image processing comprising an image acquisition unit for acquiring an input image, wherein the colors of each pixel of the input image are presented by values ​​of three dimensions; an image processing unit for determining a gain function in a first dimension, wherein the gain function enables values ​​within a first range of the first dimension to obtain a gain, determining a compensation function in a second dimension, wherein the value of the compensation function increases as the value of the second dimension increases, determining a third dimension function based on the gain function and the compensation function, and determining a corresponding third dimension value based on the value of the first dimension and the value of the second dimension using the third dimension function; and an image output unit for generating an output image based on the values ​​of the first dimension, the second dimension, and the third dimension of each pixel.

[0019] An embodiment of the present disclosure also provides an image processing device for a vehicle, the image processing device for a vehicle comprising: an image acquisition unit for acquiring an RGB image; an image conversion unit for converting the RGB image into an HSV image, the color of each pixel of the HSV image being presented by a hue value, a saturation value and a brightness value; an image processing unit for determining a gain function for the hue value, the gain function causing a value within a specific hue value range to obtain a gain, determining a compensation function for the saturation, the value of the compensation function increasing as the saturation value increases, multiplying the gain function and the compensation function to determine a brightness function, and using the brightness function to determine a corresponding processed brightness value according to the hue value and the saturation value; an image output unit for generating a processed HSV image according to the hue value, the saturation value and the processed brightness value of each pixel; and a grayscale image conversion unit for converting the processed HSV image into a grayscale image.

[0020] The embodiment of the present disclosure also provides a motor vehicle, including the computer-readable storage medium according to the embodiment of the present disclosure described above and / or the device for image processing according to the embodiment of the present disclosure described above and / or the image processing device for a vehicle according to the embodiment of the present disclosure described above. The features of the motor vehicle according to the embodiment of the present disclosure refer to the corresponding part above, which will not be repeated here for the sake of brief introduction.

[0021] Compared to the input image, in the output image processed by the method for image processing according to the present disclosure, colors whose values ​​on the first dimension are within the first range and whose values ​​on the second dimension are larger will be assigned larger values ​​of the third dimension. Based on the larger value of the third dimension, the color will be highlighted, that is, the pixels with the color in the output image will be highlighted and easy to identify. In the case where the input image is an HSV image, in the HSV output image processed by the method for image processing according to the present disclosure, the colors with high saturation within the first range of hue have significantly improved brightness compared to the input image, that is, the original image. This processed HSV output image can still highlight the corresponding colors, that is, the colors with high saturation within the first range of hue, after grayscale conversion. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some exemplary embodiments of the present disclosure, and a person of ordinary skill in the art can obtain other drawings based on these drawings without creative work.

[0023] Herein, in the accompanying drawings:

[0024] Figure 1 A flowchart of a method for image processing according to an embodiment of the present disclosure is shown;

[0025] Figure 2 A flowchart of a method for image processing according to another embodiment of the present disclosure is shown;

[0026] Figure 3 shows a graph of a gain function according to an embodiment of the present disclosure,

[0027] Figure 4 shows a graph of a compensation function according to an embodiment of the present disclosure,

[0028] Figure 5 shows a chromatogram according to an embodiment of the present disclosure and a chromatogram processed by a graphics processing method according to an embodiment of the present disclosure,

[0029] Figure 6 FIG. 4 shows a block diagram of an image processing device for a vehicle according to an embodiment of the present disclosure.

[0030] Figure 7 shows the effect of grayscale conversion of an image acquired by an image acquisition unit of an image processing device for a vehicle according to an embodiment of the present disclosure, and

[0031] Figure 8 The figure shows the effect of grayscale conversion on an image processed by the image processing device for a vehicle according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0032] In order to make the purpose, technical solution and advantages of the present disclosure more obvious, the exemplary embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure, and it should be understood that the present disclosure is not limited to the exemplary embodiments described here.

[0033] Furthermore, in the present specification and the drawings, steps and elements having substantially the same or similar features are denoted by the same or similar reference numerals, and repeated description of these steps and elements will be omitted.

[0034] In addition, in this specification and the accompanying drawings, elements are described in singular or plural form, depending on the embodiment. However, the singular and plural forms are appropriately selected for the proposed situation only for the convenience of explanation and are not intended to limit the present disclosure thereto. Therefore, the singular form may include the plural form, and the plural form may also include the singular form, unless the context clearly indicates otherwise.

[0035] In addition, in this specification and the drawings, the terms "first / second" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It is understandable that "first / second" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present disclosure described herein can be implemented in an order other than that illustrated or described herein.

[0036] In addition, in this specification and the drawings, the terms "upper", "lower", "vertical", "horizontal", etc., which are used to refer to orientation or positional relationships, are only used to facilitate description of the embodiments according to the present disclosure, and are not intended to limit the present disclosure thereto. Therefore, they should not be understood as limiting the present disclosure.

[0037] Furthermore, in this specification and the drawings, unless expressly stated otherwise, “connection” does not necessarily mean “direct connection” or “direct contact”; here, “connection” may refer to both a fixed function and electrical connectivity.

[0038] Figure 1A flow chart of a method 100 for image processing according to an embodiment of the present disclosure is shown. In the method 100. First, an input image is acquired in step 110. The acquired input image is composed of a plurality of pixels, and the color of each pixel is presented by the values ​​of three dimensions. In an embodiment according to the present disclosure, the input image may be, for example, an RGB (R: red, G: green, B: blue) image, a CIE XYZ image, a Lab color image, an HSV (H: hue, S: saturation, V: brightness) image, etc. Regardless of the form of the input image, the color presentation or color display effect of each pixel in the input image is based on the size of the values ​​in the three dimensions. In step S120, a gain function is determined in the first dimension, wherein the gain function causes the values ​​within the first range of the first dimension to obtain a gain. Therefore, the values ​​within the first range of the first dimension can be enhanced or highlighted by the gain function. In step S130, a compensation function is determined in the second dimension, wherein the value of the compensation function increases as the value of the second dimension increases. The compensation function can cause the values ​​of the larger second dimension to obtain a larger compensation, and cause the values ​​of the smaller second dimension to obtain a smaller compensation. In step S140, a third dimension function is determined according to the gain function and the compensation function. In step S150, the value of the third dimension of each pixel is determined according to the value of the first dimension and the value of the second dimension using the third dimension function. In an embodiment according to the present disclosure, the value of the third dimension can, for example, replace the value of the third dimension of the input image. Finally, in step S160, an output image is generated according to the value of the first dimension, the value of the second dimension, and the value of the third dimension of each pixel.

[0039] Compared to the input image, in the output image processed by the method for image processing according to the present disclosure, a color whose value on the first dimension is within the first range and whose value on the second dimension is larger is assigned a larger value of the third dimension. Based on the larger value of the third dimension, the color is highlighted, that is, the pixel with the color in the output image is highlighted and is easy to identify.

[0040] In an embodiment according to the present disclosure, for example, when the input image is an HSV image, the color of each pixel of the HSV image is presented by a hue value, a saturation value, and a brightness value. In an embodiment according to the present disclosure, for example, the hue value is a value of a first dimension, the saturation value is a value of a second dimension, and the brightness value is a value of a third dimension.

[0041] Figure 2A flow chart of a method 200 for image processing according to another embodiment of the present disclosure is shown. In this embodiment, before obtaining the input image as an HSV image, an additional step S210 may be provided, i.e., obtaining an RGB image. In the subsequent step S220, the RGB image is converted into an HSV image to obtain the input image. Since the images recorded by common image sensors are usually in RGB color form, steps S210 and S220 are very meaningful in this embodiment and in practice.

[0042] Subsequently, the gain function of the hue value is determined in step S230. Hue (abbreviated as h) can be understood as the primary colors of the color, such as blue, yellow, green and red, etc., and the transition colors between these colors. According to different standards or data formats, the hue can vary in the range of 0 to 360° or in the range of 0 to 180. In the case where the hue range is 0 to 360°, for example, h=0° is the red primary color, i.e., spectral red, h=60° is the yellow primary color, i.e., spectral yellow, and h=240° is the blue primary color, i.e., spectral blue. In the case where the hue range is 0 to 180, for example, h=5 is the red primary color, h[0,10] is the red range, h=30 is the yellow primary color, h[26,34] is the yellow range, h=112 is the blue primary color, and h[100,124] is the blue range. The gain function enables the first dimension, i.e., the value in the first range of the hue, to obtain a gain. For example, the gain function may be a step function or a square wave function, so that the gain within the first range is different from the gain within the remaining ranges. In the implementation according to the present disclosure, the gain function may, for example, allow the target value within the first range of the first dimension to have the maximum gain, and the gain of the first dimension values ​​on both sides of the target value to gradually decrease. This makes the gain maximum at the target value of the first dimension, such as the target value of the hue, and the gain on both sides of the target value to gradually decrease. This form can both allow the desired hue range to obtain gain and weight the values ​​of the hue range differently so that the target value, that is, a specific hue, obtains the maximum weight, thereby highlighting the specific hue the most.

[0043] In an embodiment according to the present disclosure, the gain function may be, for example, a parabolic function or a normal distribution function. In an embodiment according to the present disclosure, the gain function may also be constructed by, for example, a piecewise function. Figure 3 FIG. 4 shows a graph of a gain function according to an embodiment of the present disclosure. Figure 3 In FIG. 1 , the horizontal axis represents the value of the hue h, which varies in the range of 0 to 180. The vertical axis represents the magnitude of the gain. Figure 3 It can be seen that the gain function is constructed as a parabolic function f(h)=ah 2+bh+c, 0≤h≤180, where a, b and c are constants. By choosing the appropriate values ​​of a, b and c, we can obtain Figure 3 In order to set the gain outside the first range, that is, the range between the intersection points of the parabola and the horizontal axis, to 0, the parabola function is further constructed as f(h)=MAX(0,ah 2 +bh+c), 0≤h≤180. MAX function means taking 0 and ah 2 +bh+c. Figure 3 In the illustrated embodiment, the parabolic function enables the hue values ​​in the first range, that is, the range of 26 to 34, to obtain gain, and the gain at the hue value of 30 is the maximum, which is equal to 2, and the gain of the hue values ​​outside the range of 26 to 34 is 0. Figure 3 The gain function shown can gain the generalized yellow, that is, the yellow in the yellow range h[26, 34], and achieve the maximum gain for the hue h=30, that is, the yellow primary color.

[0044] Subsequently, the compensation function of the saturation value is determined in step S240. Saturation can be understood as the degree to which a color is close to a primary color or a spectral color. In other words, saturation can be understood as the degree to which white is mixed into a primary color, wherein the higher the saturation, the closer the color is to the primary color, and vice versa, the lower the saturation, the closer the color is to white. According to different standards or data formats, saturation can vary in the range of 0 to 100%, or in the range of 0 to 255. The value of the compensation function increases with the increase of the value of the second dimension, i.e., saturation. In other words, the closer the color is to the primary color or the spectral color, the greater the compensation will be. In an embodiment according to the present disclosure, the value of the compensation function increases nonlinearly, for example, with the increase of the value of saturation. In an embodiment according to the present disclosure, the slope of the value of the compensation function increases, for example, with the increase of the value of the second dimension. This enables colors close to the primary color or the spectral color to obtain a greater gain, while colors far from the primary color or the spectral color obtain a very small gain.

[0045] In an embodiment according to the present disclosure, the compensation function may be, for example, an exponential function or a gamma function. In an embodiment according to the present disclosure, the compensation function may also be constructed by, for example, a piecewise function. Figure 4 FIG. 4 shows a graph of a compensation function according to an embodiment of the present disclosure. Figure 4 In the figure, the horizontal axis represents the value of saturation S, which varies in the range of 0 to 255, and the vertical axis represents the size of the compensation, ranging from Figure 4 It can be seen that the gain function is constructed as a gamma function g(s)=255*(s / 255) γ, 0≤s≤255, where γ is a constant. By choosing a suitable γ and a suitable size, we can obtain Figure 4 The gamma curve shape shown. Preferably, γ can be 1.8, for example. In order to limit the maximum value of the compensation function, the gamma function is further constructed as g(s)=MIN(255*(s / 255) γ ,255), 0≤s≤255. The MIN function represents 255 and 255*(s / 255) γ The minimum value between Figure 4 In the embodiment shown, the gamma function shown makes a small saturation only obtain a small compensation, and a large saturation obtains a very large compensation value due to the nonlinear growth of the gamma function shown. Combined with the previous description, this means that the closer the color is to the spectral color, the larger the compensation value will be, and the more white is mixed in the color, the smaller the compensation value will be.

[0046] In step S250, a brightness function B(h, s) is determined according to the gain function f(h) of the hue value and the compensation function g(s) of the saturation value. In an embodiment according to the present disclosure, for example, the gain function f(h) and the compensation function g(s) may be multiplied to determine the brightness function, i.e., B(h, s) = f(h)·g(s).

[0047] In step S260, the brightness function B(h,s) is used to determine the processed brightness value v of each pixel according to the hue value h and the saturation value s. new In the embodiment of the present disclosure, the brightness function B(h,s) is used to determine the brightness increment B(h,s)=Δv of each pixel according to the hue value h and the saturation value s, and the brightness increment Δv is respectively compared with the brightness value v of each pixel. orig Add, that is, v new =v orig +Δv, to determine the processed brightness value v new . Brightness value v orig and the processed brightness value v new For example, it varies in the range of 0 to 225. In order to convert the processed brightness value v new The maximum value is limited to 255, using the MIN function, that is, v new =MIN(v orig +Δv,255), MIN function means taking v orig The minimum value between +Δv and 255.

[0048] In step S270, according to the hue value h, the saturation value s and the processed brightness value v of each pixel newA processed HSV image is generated. In an embodiment according to the present disclosure, through the aforementioned steps S210 to S260, only colors with high saturation within the first range of hues have a large brightness increment. As described in the previous embodiment, the yellow with the highest saturation and closest to the spectral color in the "generalized yellow" described within the range of hue h[26, 34] has the largest brightness increment. Yellow with lower saturation within the range of hue h[26, 34] has a relatively small brightness increment, while colors outside the range of hue h[26, 34] have no brightness increment. Therefore, in the output image processed by the method for image processing according to the present disclosure, colors with high saturation within the first range of hues have significantly improved brightness compared to the input image, that is, the original image. Therefore, in the output image, pixels with the desired color will have very high brightness, and the pattern formed by these pixels or the graphics shown can be highlighted so that they can be clearly identified.

[0049] Figure 5 The chromatogram according to the embodiment of the present disclosure and the chromatogram processed by the graphics processing method according to the embodiment of the present disclosure are shown. It should be noted that the chromatogram should be in color, and is only shown in grayscale here. However, the brightness of different colors can be seen from the gray "chromatogram". Figure 5 The left picture shown in the figure shows a chromatogram. In the chromatogram, different areas represent different colors, that is, different tones with different saturation, and the color depth in the image can reflect the brightness. The lighter the color and the more white the area is, the higher the brightness is. Conversely, the darker the color and the more black the area is, the lower the brightness is. It can be seen from the chromatogram that there is not much difference in brightness between different colors. Figure 5 The right figure shown in shows a chromatogram processed by the graphics processing method according to an embodiment of the present disclosure. In the processed chromatogram, it can be clearly seen that the colors in only one area have a very high brightness. According to an embodiment of the present disclosure, the area corresponds to the first range of hues, for example, corresponding to the yellow range h[26, 34]. In contrast, the colors in other areas have almost no brightness and are close to black. By superimposing these two figures, the colors in the first range of hues can obtain a very high brightness, thereby highlighting them.

[0050] The present disclosure also provides a device for image processing, which is used to perform the above-mentioned method for image processing according to an embodiment of the present disclosure. The device for image processing includes an image acquisition unit, which is used to acquire an input image, wherein the color of each pixel of the input image is presented by values ​​of three dimensions; an image processing unit, which is used to determine a gain function in a first dimension, wherein the gain function makes the value within a first range of the first dimension gain a gain, determine a compensation function in a second dimension, wherein the value of the compensation function increases as the value of the second dimension increases, determine a third dimension function according to the gain function and the compensation function, and use the third dimension function to determine the corresponding third dimension value according to the value of the first dimension and the value of the second dimension, and an image output unit, which is used to generate an output image according to the value of the first dimension, the value of the second dimension and the value of the third dimension of each pixel.

[0051] Figure 6 The block diagram of an image processing device 600 for a vehicle according to an embodiment of the present disclosure is shown. The image processing device 600 for a vehicle includes an image acquisition unit 610, which is used to acquire an RGB image; an image conversion unit 620, which is used to convert the RGB image into an HSV image, wherein the color of each pixel of the HSV image is presented by a hue value, a saturation value, and a brightness value; an image processing unit 630, which is used to determine a gain function for the hue value, wherein the gain function enables a value within a specific hue value range to obtain a gain, determine a compensation function for the saturation, wherein the value of the compensation function increases as the saturation value increases, multiply the gain function and the compensation function to determine a brightness function, and use the brightness function to determine a corresponding processed brightness value according to the hue value and the saturation value; an image output unit 640, which is used to generate a processed HSV image according to the hue value, the saturation value, and the processed brightness value of each pixel, and a grayscale image conversion unit 650, which is used to convert the processed HSV image into a grayscale image.

[0052] The image acquisition unit 610 can be, for example, an image capture device, such as a camera. The RGB image, i.e., the color image, acquired by the image acquisition unit 610 can be used for subsequent image recognition, thereby realizing or helping to realize the automatic driving or assisted driving function of the vehicle. In the process of image recognition, grayscale images are usually used because grayscale images have a small amount of data, which can reduce storage space, increase computing speed, and speed up the image recognition process. However, the disadvantage of grayscale images relative to color images is the loss of image information. For example, objects that can be clearly distinguished by different colors become difficult to distinguish in grayscale images. For this reason, it is necessary to pre-process the RGB image acquired by the image acquisition unit 610.

[0053] The image processing device 600 for a vehicle according to an embodiment of the present disclosure can implement the method for image processing according to the embodiment of the present disclosure described above. Therefore, the image processing device 600 for a vehicle according to an embodiment of the present disclosure can pre-process the RGB image acquired by the image acquisition unit 610, so that in the processed HSV image generated by the image output unit 640, the colors in a specific range, that is, the hues in a specific range with higher saturation obtain very high brightness. After such a processed HSV image is converted into a grayscale image, the highlighted color will be highlighted, so that the image information related to the color will not be lost, thereby not affecting the image recognition related to it.

[0054] The image processing device 600 for a vehicle according to an embodiment of the present disclosure is used, for example, to highlight lane markings with specific colors, such as yellow lane lines or parking space lines. Figure 7 FIG. 6 shows the effect of grayscale conversion of an image acquired by the image acquisition unit 610 of the image processing device 600 for a vehicle according to an embodiment of the present disclosure. Figure 7 It can be seen that after the RGB image acquired by the image acquisition unit 610 is directly converted to grayscale, or after the RGB image is converted into an HSV image and then converted to grayscale, the lane lines or parking space lines in the grayscale image have a color similar to the ground, such as a gray ground, making it difficult to identify the lane lines or parking space lines.

[0055] The image processing device 600 for a vehicle according to an embodiment of the present disclosure can significantly improve the brightness of a yellow hue with a higher saturation, such as a hue with a higher saturation [26, 34] in an original RGB image or an original HSV image. Figure 8 FIG. 6 shows the effect of grayscale conversion of an image processed by the image processing device 600 for a vehicle according to an embodiment of the present disclosure. Figure 8 It can be seen that after converting the processed HSV image into a grayscale image, the yellow lane line or parking space line is very obvious in the grayscale image. Therefore, the yellow lane line or parking space line can be easily identified in image recognition.

[0056] It should be noted that the flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment, or a part of a code, and the module, program segment, or a part of the code contains at least one executable instruction for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0057] The present disclosure uses specific words to describe the embodiments of the present disclosure. For example, "first / second embodiment", "one embodiment", and / or "some embodiments" refer to a certain feature, structure or characteristic related to at least one embodiment of the present disclosure. Therefore, it should be emphasized and noted that "one embodiment" or "an embodiment" or "an alternative embodiment" mentioned twice or more in different locations in this specification does not necessarily refer to the same embodiment. In addition, certain features, structures or characteristics in one or more embodiments of the present disclosure may be appropriately combined.

[0058] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the invention belongs. It should also be understood that terms such as those defined in common dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant technology and should not be interpreted in an idealized or extremely formal sense, unless explicitly defined as such herein.

[0059] The above is an explanation of the present invention and should not be considered as a limitation thereof. Although several exemplary embodiments of the present invention have been described, it will be readily appreciated by those skilled in the art that many modifications may be made to the exemplary embodiments without departing from the novel teachings and advantages of the present invention. Therefore, all such modifications are intended to be included within the scope of the present invention as defined in the claims. It should be understood that the above is an explanation of the present invention and should not be considered as being limited to the specific embodiments disclosed, and modifications to the disclosed embodiments and other embodiments are intended to be included within the scope of the appended claims. The present invention is defined by the claims and their equivalents.

Claims

1. A method for image processing, comprising: Acquire an input image, wherein the color of each pixel of the input image is represented by values ​​of three dimensions; determining a gain function in a first dimension, wherein the gain function causes values ​​within a first range of the first dimension to gain; determining a compensation function in the second dimension, wherein a value of the compensation function increases as a value of the second dimension increases; Determine a third dimension function according to the gain function and the compensation function; Determine the value of the third dimension of each pixel according to the value of the first dimension and the value of the second dimension by using the third dimension function; and An output image is generated according to the value of the first dimension, the value of the second dimension, and the value of the third dimension of each pixel.

2. The method for image processing according to claim 1, wherein: Acquiring the input image comprises: An RGB image is acquired and converted into an input image, wherein the input image is an HSV image, and the color of each pixel of the HSV image is presented by a hue value, a saturation value, and a brightness value.

3. The method for image processing according to claim 2, wherein: Determining the gain function in the first dimension includes: determining the gain function of the hue value; Determining the compensation function in the second dimension includes: determining the compensation function of the saturation value; Determining the third dimension function according to the gain function and the compensation function comprises: determining a brightness function according to the gain function and the compensation function; Determining the value of the third dimension of each pixel according to the value of the first dimension and the value of the second dimension using the third dimension function includes: determining a processed brightness value of each pixel according to the hue value and the saturation value using the brightness function; and Generating an output image according to the value of the first dimension, the value of the second dimension and the value of the third dimension of each pixel includes: generating a processed HSV image according to the hue value, the saturation value and the processed brightness value of each pixel.

4. The method for image processing according to claim 3, wherein: Determining a brightness function according to the gain function and the compensation function includes multiplying the gain function and the compensation function to determine the brightness function.

5. The method for image processing according to claim 3, wherein: Using the brightness function to determine the processed brightness value of each pixel according to the hue value and the saturation value includes: using the brightness function to determine the brightness increment of each pixel according to the hue value and the saturation value, and adding the brightness increment to the brightness value of each pixel to determine the processed brightness value.

6. The method for image processing according to claim 1, wherein: The gain function enables a target value within a first range of the first dimension to have a maximum gain, and the gains of first dimension values ​​on both sides of the target value gradually decrease.

7. The method for image processing according to claim 6, wherein: The gain function is a parabolic function or a normal distribution function.

8. The method for image processing according to claim 2 or 3, wherein: The first range of the first dimension includes hue values ​​from 26 to 34.

9. The method for image processing according to claim 1, wherein: The slope of the compensation function increases as the value of the second dimension increases. 10 . The method for image processing according to claim 9 , wherein the compensation function is an exponential function or a gamma function.

11. A computer program product, comprising a computer program for executing the method according to any one of claims 1 to 10 when the computer program is executed by a processor. 12 . A computer-readable storage medium having computer-executable instructions stored thereon, wherein the instructions are used to perform the method according to claim 1 when executed by a processor.

13. A device for image processing, comprising An image acquisition unit, configured to acquire an input image, wherein the color of each pixel of the input image is presented by values ​​of three dimensions; an image processing unit, configured to determine a gain function in a first dimension, wherein the gain function causes values ​​within a first range of the first dimension to obtain a gain, determine a compensation function in a second dimension, wherein a value of the compensation function increases as a value of the second dimension increases, determine a third dimension function according to the gain function and the compensation function, and determine a corresponding third dimension value according to a value of the first dimension and a value of the second dimension using the third dimension function; and An image output unit is used to generate an output image according to the value of the first dimension, the value of the second dimension and the value of the third dimension of each pixel.

14. An image processing device for a vehicle, comprising: An image acquisition unit, used for acquiring an RGB image; An image conversion unit, used for converting the RGB image into an HSV image, wherein the color of each pixel of the HSV image is presented by a hue value, a saturation value, and a brightness value; an image processing unit, configured to determine a gain function for the hue value, the gain function causing a value within a specific hue value range to obtain a gain, determine a compensation function for the saturation, the value of the compensation function increasing as the saturation value increases, multiply the gain function and the compensation function to determine a brightness function, and use the brightness function to determine a corresponding processed brightness value according to the hue value and the saturation value; An image output unit, configured to generate a processed HSV image according to the hue value, the saturation value and the processed brightness value of each pixel; and A grayscale image conversion unit is used to convert the processed HSV image into a grayscale image.

15. A motor vehicle comprising the computer-readable storage medium according to claim 12 and / or the device for image processing according to claim 13 and / or the image processing device for a vehicle according to claim 14.