Adaptive image threshold processing for light source identification
By using nonlinear image transformation and image pyramid technology, combined with pixel neighborhood information and statistical analysis, and dynamically adjusting the threshold processing, the problem of false positive light source identification in vehicle light detection is solved, thereby improving the accuracy of light source identification and driving safety.
Patent Information
- Application Number
- CN202510625518.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-05-16
- Filing Date
- 2025-05-15
- Publication Date
- 2025-11-18
AI Technical Summary
Existing technologies for vehicle light detection suffer from false positive light source identification due to dynamic range variations caused by tone mapping, affecting the accuracy of light source identification.
By employing nonlinear image transformation and image pyramid technology, light sources are identified through adaptive thresholding. By combining pixel neighborhood information and statistical analysis, the strictness and aggressiveness of the thresholding process are dynamically adjusted to ensure the accuracy of light source identification.
It improves the accuracy of light source recognition, reduces false positives and false negatives, optimizes high beam control, and improves driver visibility and road safety.
Smart Images

Figure CN120976324A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the identification of light sources in images. The present disclosure relates to the use of a non-linear image transformation to determine a light source identification threshold for an image. The present disclosure relates particularly, but not exclusively, to the detection of vehicle lights. BACKGROUND
[0002] Systems that detect vehicle lights can be used to alert a driver to the presence of other vehicles, helping to prevent collisions and other accidents. Such systems can also be used to improve the switching and directionality of adaptive beam control to avoid blinding the driver of another vehicle, for example, by automatically turning off high beams or adjusting the illumination area of a light based on a matrix of light emitting diodes to control the beam angle.
[0003] If there is inaccuracy in the detection of other vehicle lights, it is possible that high beams are turned off even in the absence of other vehicles. Such inaccuracy can be a result of tone mapping operations commonly used in image processing performed by vehicle camera systems. Tone mapping is a pre-processing technique based on a non-linear transformation that is performed by an image signal processor to reduce the dynamic range of an image, thereby saving computational resources for storage and processing. However, while important visual details are preserved during tone mapping, real-world or scene luminance information is lost. For example, an image signal processor commonly used in automotive environments compresses an original image into an 8-bit image for storage, where scene luminance information is mapped to 8-bit pixel intensity values.
[0004] The change in dynamic range resulting from such compression causes areas of an image that are not illuminated by a light source, such as reflectors, lane markings, and other bright non-light emitting objects, can have pixel intensities comparable to those of a light source, and create false positives in the light source identification process. In some cases, such illuminated areas can have higher intensities than those associated with a true light source, particularly in the case of a light source that is far away and a high beam light source is not detected, particularly if a global light source detection threshold is applied to the image.
[0005] The embodiments set forth in the present disclosure propose a technique aimed at improving the accuracy of the identification of light sources in tone mapped images. In particular, a non-linear image transformation is used to apply a light source identification threshold to an image. In effect, the non-linear image transformation enables light source detection to be performed in an approximate real-world color space rather than in the color space of a compressed image. The embodiments set forth in the present disclosure are applicable to the identification of any type of light source, without being limited to vehicle light sources, and without being limited to any resolution of an image. SUMMARY
[0006] According to a first aspect, there is provided a method of identifying light sources in an image, the method comprising receiving, from a low resolution reference array of pixels and from one or more test arrays of pixels having a higher resolution than the reference array of pixels, an image pyramid representing a tone-mapped image, comparing pixel values of test pixels in the image to respective luminance thresholds, wherein a light source is identified at locations where a test pixel value exceeds a respective luminance threshold, wherein for each test pixel the method comprises defining the respective luminance threshold as a non-linear function of pixel values of reference pixels in the reference array of pixels having a region in the image including the location of the test pixel.
[0007] In this way, a robust adaptive thresholding process is employed, such that light sources can be accurately identified from a tone-mapped image produced by a camera system based on real-world luminance. There is no need to use the raw image, the required information can be derived from a compressed image.
[0008] In embodiments, the non-linear function has the form T(x,y) = (A*I"(x,y) γ + β, where T is the threshold at test pixel image location (x,y), I"(x,y) is the reference pixel value, A is a scaling coefficient A, γ is a gamma correction coefficient, and β is a linear offset.
[0009] In this way, by employing a modified gamma correction technique as an inverse process to tone-mapping, apparent scene luminance information can be decoded from the image.
[0010] In embodiments, the image pyramid is such that I"(x,y) is a mean of pixel values in a window of the test array of pixels including the test pixel, wherein a size of the window corresponds to a size of a portion of the image represented by the reference pixels.
[0011] The effectiveness of the thresholding process is increased in combination with pixel neighbourhood information, due to illumination conditions, contrast or texture varying across the image.
[0012] In embodiments, the method further comprises identifying one or more regions of interest in which a likelihood of a light source being present is above a minimum probability threshold in the one or more test arrays of pixels, wherein comparing pixel values comprises comparing pixel values of test pixels in the one or more regions of interest to respective luminance thresholds.
[0013] In embodiments, the method comprises identifying the one or more regions of interest using a statistical analysis of a training data set containing information identifying one or more light sources in one or more historical images.
[0014] In this way, it can be ensured that areas in the image where it is unlikely that a light source is identified are not unnecessarily processed.
[0015] In an embodiment, the method comprises classifying the region of interest into at least two levels of likelihood of presence of a light source, wherein for regions of interest of a higher likelihood level, the method comprises comparing the pixel values of the higher resolution test pixel array with a respective threshold, and for regions of interest of a lower likelihood level, the method comprises comparing the test pixel values of the lower resolution test array with a respective threshold.
[0016] In this way, computational efficiency is ensured by checking the region of interest at high resolution only when a light source is likely to be present.
[0017] In an embodiment, β is a function of color information of the test pixel, and the color information is chrominance information, wherein the function of the chrominance information depends on the color of the light source to be detected.
[0018] In this way, red vehicle tail lights and blue-white vehicle head lights can be distinguished from other apparent bright areas in the image.
[0019] In an embodiment, β is a function of a level of likelihood of the region of interest of the test pixel, the likelihood being a probability of detection of a light source.
[0020] In this way, β can be dynamically changed so that the strictness or aggression of the thresholding can be controlled based on image and dataset properties.
[0021] In an embodiment, γ is a function of at least one of an exposure of the image and an identification of one or more light sources in historical images.
[0022] In this way, γ can be dynamically changed so that the obtained threshold is inversely proportional to the actual scene brightness at the time of capture of the scene.
[0023] In an embodiment, the light source is a vehicle light source. In this case, accurate identification of vehicle light sources improves road safety and optimizes high beam control, improves the visibility of the driver and reduces the risk of accidents caused by sudden changes in the brightness of the headlight.
[0024] According to a second aspect, there is provided a computer program arranged to perform the above method when executed by one or more processors.
[0025] According to a third aspect, there is provided an apparatus comprising one or more processors arranged to perform the above computer program.
[0026] According to a fourth aspect, there is provided a car controller comprising the above-mentioned apparatus.
[0027] According to a fifth aspect, there is provided a system comprising the above-mentioned car controller and one or more cameras for taking images and generating an image pyramid from the taken images. BRIEF DESCRIPTION OF DRAWINGS
[0028] Illustrative embodiments will now be described with reference to the accompanying drawings, in which:
[0029] Figure 1 A configuration of the operational stages of the light source recognition method according to the first embodiment is shown;
[0030] Figure 2 A relationship between pixel values in pixel arrays at different levels of the image pyramid used in the method of the first embodiment is shown;
[0031] Figure 3 An example of a statistical analysis of historical vehicle light source recognition results is shown;
[0032] Figure 4 A configuration of a region of interest of an image plane resulting from a statistical analysis using Figure 3 ; and
[0033] Figure 5 A relationship between factors that can be considered for dynamic calculation and adaptation of the image threshold coefficient in embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0034] Figure 1 A configuration of the operational stages of the light source recognition method 10 according to the first embodiment is shown. The method 10 is applied to an image received from an image taking source, such as a camera, and operates to identify the presence of one or more light sources in a scene represented by the taken image. The first embodiment is described in the context of identifying a vehicle high beam in an image received from a car camera system, taken in low light or night driving conditions in which the vehicle high beam should be switched on. However, it will be appreciated that this is by way of example only, and that the working principles are applicable to the identification of other types of light sources from images taken by other types of cameras.
[0035] The received image has been compressed by the camera's image signal processor 20 based on a tone mapping operation. Tone mapping is well known to those skilled in the art of image processing, and for the sake of brevity the details are not repeated here. For the first embodiment it is significant that the image signal processor 20 constructs an image pyramid 21 for the tone mapping operation. The image pyramid 21 is a multi-scale representation of the image in which the image is represented at a series of different resolutions. Each level of the pyramid 21 is typically created by an iterative Gaussian-like smoothing and down-sampling of the higher resolution levels of the pyramid 21, with a corresponding scaling factor between successive levels.
[0036] The method 10 of the first embodiment is based on comparing S13 the pixel values of the received image with a threshold value, and identifying S14 a light source in the image at locations where the pixel values exceed a light source identification threshold. After the light source has been identified, any of a number of subsequent operations can be performed, such as alerting the user of the presence of the light source and controlling the switching or adjusting the brightness and direction of the vehicle's headlamps as part of an adaptive beam control system. In addition, an annotation can be applied to the image to indicate the location of the identified light source to enable statistical analysis of historical data. Such subsequent operations need not be part of the light source identification method 10 of the first embodiment, but rather form part of a further embodiment that extends the functionality of the first embodiment in this way.
[0037] In the first embodiment, preparatory operations are performed in order to structure the thresholding step. Such preparatory operations include defining S11 a region of interest of the received image, and using a non-linear transformation S12 to define a threshold value required to identify a light source in the region of interest based on a perception of the scene brightness rather than the brightness information represented in the compressed image. These steps are defined in more detail below.
[0038] The image received from the camera's image processor 20 is a two-dimensional array of pixels I(x,y) containing a pixel brightness value I at each location (x,y). The first embodiment is described in relation to receiving an 8-bit image, in which the pixel brightness values range from 0 to 255. However, the principles of operation of the first embodiment can be applied to any other resolution. The pixel values exhibit higher intensities in regions corresponding to a light source, and the thresholding operation S13 is used to binarize the 8-bit image to generate a positive light source identification result at pixel locations where the pixel value exceeds the threshold value, and a negative result at pixel locations where the pixel value does not satisfy the threshold value.
[0039] In step S12, a threshold value I(x,y) is computed for each pixel position. The first embodiment thus contrasts with the use of a single global threshold value applied across the entire image, and in this way, a dynamic, adaptive thresholding technique is implemented. By ensuring that the thresholding based on gamma correction depends not only on the individual image pixel value, but also on a set of neighbouring pixels, a further advantage arises in the light source identification method 10 of the first embodiment. For example, lighting conditions, contrast or texture vary across an image, such that thresholding based on a single pixel alone can not be as effective as the context-aware system of the present disclosure, which takes into account the impact of such variations.
[0040] Thus, in the first embodiment, the threshold value I(x,y) computed for each pixel position is based on the pixel values of a predetermined size of pixel window, which contains the test pixel at position (x,y). The pixel values of the pixel window can be combined in order to determine an average pixel value of the window, but other weighted combinations of the pixels in the window can be used in alternative embodiments.
[0041] In embodiments using an average pixel value, the image pyramid 21 is particularly advantageous, since a single pixel in a lower resolution or "reference" level of the pyramid 21 can already correspond to the mean of the pixels at the same position in the image in a higher resolution level or "test" level of the pyramid 21. This is illustrated with reference to Figure 2 to illustrate, Figure 2 The relationship between the pixel values of three different levels 30, 31, 32 of the pyramid 21 is shown, specifically the high resolution test pixel array 30 at the base of the pyramid 21 and the two lower resolution reference pixel arrays 31, 32 at higher levels (closer to the apex) of the pyramid 21.
[0042] Thus, a pixel value at a position in the image can be derived from the reference pixel array, which includes the position of the test pixel 36 in the image, and such a reference pixel value is referred to herein using the notation I"(x,y). The reference pixel value can be taken from the level 31 of the pyramid adjacent to the level 30 of the test level containing the test pixel array, but this is not essential, depending on the size of the window to be averaged. As Figure 2As shown, for example, I"(x,y) is shown as a reference pixel array 32, which is two levels above the test pixel array 30. The reference pixels 33 in the pixel array 32 have a size corresponding to the light-shaded areas 34 in the reference pixel array 31 and the light-shaded areas 35 in the test pixel array 30. The scaling factor between the levels of the pyramid is such that the reference pixels 33 correspond to the area 34 covered by four pixels in the reference pixel array 31, one of which (dark-shaded) corresponds to the location of the test pixel 36 in the image in the test array 30. The area 35 corresponding to the location of the areas 33 and 34 is covered by 25 pixels in the test pixel array 30, one of which is the test pixel 36. The reference pixel 33 corresponds to the mean of the pixel values contained in the area 35.
[0043] For 8-bit images, the threshold is computed according to expression (1):
[0044] T(x,y) = 255 * (I"(x,y) / 255) γ + β expression (1)
[0045] γ is a non-linear coefficient that has an exponential effect on the thresholding. β is a linear coefficient. Expression (1) is referred to in the present disclosure as a modified or extended form of gamma correction, which is a well-known image processing method for contrast enhancement. The threshold of expression (1) varies non-linearly over the image and, in contrast to the application of a global threshold, it reverses the effect of the tone mapping of the image processor of the camera that took the image, which maps the scene luminance information to the pixel values of the image. The modification or extension refers to the addition of a linear coefficient in I"(x,y) combined with neighborhood information.
[0046] In the case where γ is lower than 1 and β is lower than 0, expression (1) ensures that the computed threshold for darker pixels is rendered brighter to a greater extent, while pixels that were already bright are rendered slightly darker. The threshold thus has a low contrast compared to the image pixels and is obtained by selectively changing the brightness of the original pixel values. In this sense, the threshold can be considered dynamic.
[0047] If β is high, the threshold T(x, y) is also high, making the thresholding aggressive, resulting in finer binarization (smaller clusters of test pixels over the threshold) and reducing false positives. If β is too high, false negatives can increase, where bright areas of the image are missed. If β is low, the thresholding is relaxed, resulting in larger areas or clusters of test pixels over the threshold, and the risk of failing to detect bright areas of the image is lower, but if β is too low, the number of false positives increases. The choice of the optimal value of β therefore has a large impact on performance. In the first embodiment, instead of a fixed value, β is configured as a function of the pixel position as well as the color properties, to produce advantageous effects. β can thus be considered as a local linear coefficient.
[0048] Likewise, if γ is set too high, the risk of false positives increases, while a low γ can result in false negatives. In the first embodiment, γ is made configurable per image or per group of images or frames to be used to produce advantageous effects. In particular, when using a small value of γ, highly illuminated or overexposed images result in better detection, with fewer false positives. Underexposed or low- illuminated images typically have high contrast, resulting in better detection, with fewer false negatives, and with a high value of γ. In the first embodiment, γ is thus a function of a suitable measure of exposure of the image, resulting in a dynamic thresholding that adapts to varying lighting conditions. γ can thus be considered as a global non-linear coefficient.
[0049] In addition to the appropriate configuration of γ and β, a further optimization of the light source recognition method is achieved in the first embodiment by identifying S11 a region of interest of the image, which is a region where the likelihood of the presence of one or more light sources is expected to reach a certain degree. In this way, unnecessary processing of low-likelihood regions of the image containing light sources can be avoided, saving computational resources.
[0050] In the context of recognizing vehicle light sources, a statistical analysis is applied to a dataset containing information identifying the presence and location of light sources in historical images taken under low-light conditions, in order to assess the likelihood of the presence of light sources in a new image. Figure 3 An example of the results of such statistical analysis is shown in the form of a probability map or heat map across the image plane 40, where regions 41 of high probability are shown brighter than regions 42 of low probability. It is observed from this that the spatial distribution of car lights in the image plane 40 is concentrated around the vanishing point close to region 41. Car lights appearing in this region 41 are typically far from the camera, and are therefore small in size. As a result, these regions need to be carefully examined to not miss any light sources during thresholding. Conversely, car lights closer to the camera will appear larger, and it can be computationally efficient to check these car lights at lower resolution. Typically, the size of car lights tends to decrease radially inwards towards the vanishing point.
[0051] It was also observed that there are regions 43 in image plane 40 where no light source has been historically identified. This suggests that, given the camera's mounting location, driving conditions, etc., it is reasonable to infer that a light source is unlikely to be identified at that location in future images. Such locations are typically at the periphery of the camera's field of view. No processing is required on these portions of the image.
[0052] about Figure 3 The statistical analysis shown, Figure 4 The configuration of the regions of interest defined for image plane 40 is shown. Apart from regions 46a and 46b, which can be ignored, regions of interest at two salience levels are identified: region 48 with higher salience, which represents a higher probability of the presence of a light source and will be evaluated at higher resolution; and region 47 with lower salience, which represents a lower probability of the presence of a light source and will be evaluated at lower resolution.
[0053] Since different levels of image resolution already exist in image pyramid 21, image pyramid 21 is also advantageous in easily implementing the evaluation of different types of regions of interest. For example, for region of interest 48 with the highest probability, the “bottom” level or the highest resolution level of pyramid 21 is evaluated, and for region of interest 47 with a lower probability, a higher level is evaluated. In the implementation, the higher level is no higher than the penultimate level of pyramid 21, so as to allow pixel values of even higher levels of pyramid 21 to be used to calculate the threshold in the manner of expression (1). As used herein, the term “evaluation” refers to the pixel to be thresholded, and the pixel value to be used in the calculation of the corresponding threshold.
[0054] In this way, it is ensured that distant light spots are not ignored, and larger light spots are not fragmented due to noise or artifacts within the light source.
[0055] Figure 5 The relationship between factors that can be considered for the dynamic calculation and adaptation of β and γ in embodiments of this disclosure is illustrated. Any individual or combination of these factors can be used in a first embodiment.
[0056] γ adaptive 50 depends on at least one of exposure metric 51 and the number of detections in the previous frame 52.
[0057] As mentioned above, if the image is bright due to overexposure, the exposure metric 51 increases, which leads to an increase in γ, which in turn increases T(x,y). The exposure metric 51 can be one of the following:
[0058] (a) Dynamic range at the base level of the image pyramid (the difference between the maximum and minimum intensity);
[0059] (b) The difference between the 95th percentile and the 5th percentile of the luminance information of the y channel of an image captured in the YUV color space;
[0060] (c) Contrast obtained from the image histogram;
[0061] (d) Average brightness; and
[0062] (e) Average intensity or median intensity.
[0063] If γ depends on the number of detections in the previous 52 frames, the sensitivity to new detections can be configured accordingly. For example, on a quiet road where few headlights have been identified, it can be inferred that few headlights are likely to be identified in the short term. Based on the fact that detected bright spots are unlikely to correspond to headlights and are more likely to correspond to lane markings or other bright sources, a higher γ can be used, and therefore a higher threshold can be used. On busy roads where light sources have been identified extensively in the past, a lower γ can be used to reduce the likelihood of missing headlights.
[0064] β adaptive 53 depends on at least one of the color channel information 55 and the probability graph 56 of the vehicle light possibility (where each depends on the test pixel position 54), such that β is a local parameter.
[0065] In the case of relying on vehicle lights, possibility 56, for example... Figure 3 The statistical probabilities of vehicle lights shown are compared with those of non-vehicle lights, and from this, for each image location, the joint probability that the light source is definitely identified as a vehicle light rather than some other light source can be derived. Specifically, using Bayes' theorem, based on the expression P... x,y (A|B)=P x,y (A∩B) / P x,y (B), P x,y (A) represents the probability that a car light exists at a given pixel (x, y) in the dataset, P x,y (B) represents the probability that a car light is detected by the detector at pixel (x,y) in a given dataset, P x,y (A∩B) represents the probability of a car light being present and detected at a given pixel (x,y) in the dataset, and P x,y (A|B) represents the probability of detecting a car light (true positive).
[0066] The joint probability map is normalized, and therefore has a value between 0 and 1 for a specific pixel grid where the joint probability value and thus β are calculated. The value at the pixel in the grid is calculated using the following expression (2):
[0067] β=β max –(βmax - β min )*p_grid Equation (2)
[0068] where β max and β min are values defined as constants for a particular data set, and p_grid is the joint probability value for a region of interest in a given pixel grid. Thus, β is computed based on: (a) the region of interest for the pixel under consideration, for which β max and β min are set; (b) the color properties of the pixel under consideration; and (c) the location of the pixel within the region of interest, factors (b) and (c) affecting the associated joint probability derived from p_grid that the pixel is both a vehicle light source and detected. For large joint probability values, β tends towards β min , while for low joint probability values, β tends towards β max . β max and β min may be determined from the data set, which is based on the expected range of values for β for a particular region of interest, which in turn can be based on the level of significance for the entire region of interest, but β max and β min may also be set empirically by a user as part of a calibration process.
[0069] This computation of β enables more lenient detection in areas of high true positives, and more stringent detection in areas of high false positives.
[0070] In some implementations, the probability map is updated 57 using information related to the location of detections 58 in previous frames and lane information, whereby the location of bright artifacts such as lane markings and road signs can be determined.
[0071] In some implementations, the probability map is updated based on a probability map of false negatives or a probability map of lane markings.
[0072] In implementations, β can vary according to the color properties of the pixel under consideration. In implementations where compressed images are received from an image capture source in YUV color space, β can vary according to U and V channel information. This is particularly useful because some vehicle lights can have relatively low Y channel (brightness or luminance) values, such as red taillights and blue-white headlamps, such that consideration of luminance values can not be sufficient to enable identification of such light sources. For example, such light sources are typically faint compared to other bright areas in the image having similar gray scale values, such as brighter yellow headlamps or red reflective taillights. In alternative implementations, compressed images are received from an image capture source in RGB color space, and β can vary according to red and blue channel information.
[0073] The V channel represents chrominance related to the blue-yellow axis, which is information related to the difference between luminance and the blue component. The U channel represents chrominance related to the red-yellow axis, which is information related to the difference between luminance and the red component. The color properties of each pixel given by the U and V channel values are compared to the color properties of red tail lights and blue-white headlamps to determine the probability of matching either class of vehicle light. Beta is reduced based on the determined probability in order to relax the threshold in cases where a pixel with weak Y channel information should actually be identified as a light source.
[0074] The outputs of the gamma and beta adaptations are fed into a threshold calculation 59 associated with step S12 of the method 10. The luminance channel information 60 is compared to the calculated threshold in the manner described above.
[0075] The above-described embodiments provide advantageous techniques for image thresholding for light source detection that can be performed on compressed images obtained from any image capture source. The techniques enable scene luminance information to be derived using modified gamma correction such that light source detection can be accurately performed. The modified gamma correction enables high contrast to be used for dark image regions and low contrast to be used for high illumination image regions. The threshold formula takes into account one or more of the location of the test pixel, the color properties of the pixel, the exposure metric and the number of detections in previous frames, while pixel neighborhood mapping is achieved using image pyramids and consideration of regions of interest improves processing efficiency.
[0076] The described embodiments are able to detect almost every vehicle light source with low computational complexity, low false positive detection, requiring only minimal image resolution (such as 8-bit images). The techniques are easily adaptable to different camera settings that use tone mapping and generate image pyramids.
[0077] The method of the first embodiment is implemented by any suitable processing system that can execute computer instructions for performing the required functions. According to the second embodiment, Figure 1 Each step shown in Figure 6 represents a functional part of a computer program executed by one or more processors or controllers. The computer program is stored in a non-volatile memory of an apparatus containing the one or more processors or controllers. Such an apparatus forms the third embodiment. The program can be downloaded from a server and installed for operation, with a user interface enabling control of specific parameters or optimization. For example, parameters such as max and beta min can be input by a user, and the selection of input for the gamma and beta adaptations can also be controlled by the user.
[0078] The above described embodiments relate to the recognition of vehicle lights, and the device of the third embodiment is included in a car controller in the fourth embodiment. The term "car controller" is to be interpreted broadly to encompass any control system used in a car environment, and such car controller can form part of an existing electronic control unit to which the controller of the third embodiment is added, or form a separate electronic control unit connected to a central or domain controller of the vehicle. In the fifth embodiment, the car controller further comprises a camera system comprising one or more cameras for taking images of the light sources to be detected.
[0079] In a modification to the first, second and third embodiments, light sources other than vehicle light sources can be detected and recognized, wherein parameters related to the nature of the application of the light source recognition technology can be used for the recognition of gamma and beta. As an example, in some embodiments, ground light sources mounted to a building can be recognized to facilitate drone navigation, and height information can be used to control the adaptive manner of beta and gamma.
[0080] In a further modification to the first, second and third embodiments, the step S11 of recognizing a region of interest can be omitted, such that the complete image is processed. This can be appropriate in situations where the light source positions can not be expected to be constrained by real-world factors such as road directions, such that there is no prior knowledge that can inform the light source recognition method. In a further modification of recognizing a region of interest, this step does not need to be based on statistical analysis of a dataset, and can instead be based on a predetermined fixed layout suitable for the specific light source recognition context.
[0081] The light source recognition method can be continuously performed frame by frame as the video or sequence of motion images frames are received, in order to be able to output to the user substantially real-time information related to the light source recognition results. This is particularly advantageous in driving scenarios where a quick reaction is required.
Claims
1. A method for identifying a light source in an image, the method comprising the following steps: An image pyramid representing a tone-mapped image is received by a low-resolution reference pixel array and one or more test pixel arrays with a higher resolution than the reference pixel array; as well as The pixel value of the test pixel in the image is compared with a corresponding brightness threshold, wherein light sources are identified at locations where the pixel value of the test pixel exceeds the corresponding brightness threshold. Specifically, for each test pixel, the method includes defining a corresponding brightness threshold as a non-linear function of the pixel value of a reference pixel in the reference pixel array, wherein the reference pixel has a region in the image that includes the location of the test pixel, and the pixel value of the reference pixel is the average pixel value of multiple test pixels within the region in the image. The nonlinear function is in the form T(x,y)=(1 / A)*(A*I””x,y)). γ +β, T is the threshold at the test pixel image position (x,y), I""x,y" is the reference pixel value, A is the maximum pixel value, γ is the gamma correction coefficient, and β is the linear offset.
2. The method according to claim 1, further comprising the following steps: Identify one or more regions of interest in the one or more test pixel arrays where the probability of the presence of a light source is higher than a minimum probability threshold; as well as The step of comparing pixel values includes comparing the pixel values of test pixels in one or more regions of interest with corresponding brightness thresholds.
3. The method according to claim 2, further comprising the following steps: Statistical analysis of a training dataset is used to identify one or more regions of interest, the training dataset including information identifying one or more light sources in one or more historical images.
4. The method according to claim 2 or 3, further comprising the following step: The region of interest is classified into at least two levels of the probability of the presence of a light source. For regions of interest with a high probability level, the method further includes comparing the pixel values of a higher-resolution test pixel array with a corresponding threshold, and For regions of interest with a low probability level, the method includes comparing the test pixel values of a lower resolution test array with a corresponding threshold.
5. The method according to claim 4, wherein, β is a function of the color information of the test pixel, and the color information is chromaticity information, wherein the function of the chromaticity information depends on the color of the light source to be detected.
6. The method according to claim 4 or 5, wherein, β is a function of the probability level of the region of interest of the test pixel, and the probability is the probability of detecting a light source.
7. The method according to any one of claims 1 to 6, wherein, γ is a function of at least one of the following: The exposure of the image; and Identification of one or more light sources in historical images.
8. The method according to any one of claims 1 to 7, wherein, The light source is a vehicle light source.
9. A computer program, which, when executed by one or more processors, is arranged to perform the method according to any one of claims 1 to 8.
10. An apparatus comprising one or more processors arranged to execute a computer program according to claim 9.
11. A vehicle controller comprising the means according to claim 10.
12. A system comprising a vehicle controller according to claim 11 and one or more cameras, the cameras being used to capture images and generate an image pyramid based on the captured images.