Patent Description:
During the last few years camera based driver assistance systems (DAS) have been entering the market; including lane departure warning (LDW), Automatic High-beam Control (AHC), traffic sign recognition (TSR) and forward collision warning (FCW).

Lane departure warning (LDW) systems are designed to give a warning in the case of unintentional lane departure. The warning is given when the vehicle crosses or is about to cross the lane marker. Driver intention is determined based on use of turn signals, change in steering wheel angle, vehicle speed and brake activation. There are various LDW systems available. One algorithm for lane departure warning (LDW) used by the assignee (Mobileye Technologies Ltd. , Nicosia, Cyprus, hereinafter "Mobileye") of the present application is predictive in that it computes time to lane crossing (TLC) based on change in wheel-to-lane distance and warns when the time-to-lane crossing (TLC) is below a certain threshold. Other algorithms give a warning if the wheel is inside a certain zone around the lane marker. In either case, essential to the lane departure warning system is the lane marker detection algorithm. Typically, the lane markers are detected in the camera image and then, given the known camera geometry and camera location relative to the vehicle, the position of the vehicle relative to the lane is computed. The lane markers detected in the camera image are then collected over time, for instance using a Kalman filter. Wheel-to-lane marker distance may be given with an accuracy of better than <NUM> centimeters. With a forward looking camera, wheel-to-lane marker distance is not observed directly but is extrapolated from the forward view of the camera. The closer road markings are observed, less extrapolation is required for determining wheel-to-lane marker distance and more accurate estimates of wheel-to-lane marker distance are achieved especially on curves of the road. Due to the car hood and the location of the camera, the road is seldom visible closer than six meters in front of the wheels of the car. In some cars with longer hoods, minimal distance to visible road in front of the car is even greater. Typically the lane departure warning system of Mobileye works on sharp curves (with radius down to <NUM>). With a horizontal field of view (FOV) of <NUM> degrees of the camera, the inner lane markers are still visible on curves with a radius down to <NUM> meters. In order to correctly perform lane assignment on curves, lane markings are detected at <NUM> meters and beyond. With a horizontal field of view (FOV) of <NUM> degrees for the camera, a lane mark of width <NUM> meters at <NUM> distance corresponds in the image plane to just under two pixels wide and can be detected accurately. The expectation from the lane departure warning systems is greater than <NUM>% availability when lane markings are visible. Expectation with <NUM>% availability is particularly challenging to achieve in low light conditions when the lane markings are not freshly painted (have low contrast with the road) and the only light source is the car halogen headlights. In low light conditions, the lane markings are only visible using the higher sensitivity of the clear pixels (i.e. using a monochrome sensor or a red/clear sensor). With the more powerful xenon high intensity discharge (HID) headlights it is possible to use a standard red green blue (RGB) sensor in most low light conditions.

The core technology behind forward collision warning (FCW) systems and headway distance monitoring is vehicle detection. Assume that reliable detection of vehicles in a single image a typical forward collision warning (FCW) system requires that a vehicle image be <NUM> pixels wide, then for a car of width <NUM>, a typical camera (640x480 resolution and <NUM> deg FOV) gives initial detection at <NUM> and multi-frame approval at <NUM>. A narrower horizontal field of view (FOV) for the camera gives a greater detection range however; the narrower horizontal field of view (FOV) will reduce the ability to detect passing and cutting-in vehicles. A horizontal field of view (FOV) of around <NUM> degrees was found by Mobileye to be almost optimal (in road tests conducted with a camera) given the image sensor resolution and dimensions. A key component of a typical forward collision warning (FCW) algorithm is the estimation of distance from a single camera and the estimation of scale change from the time-to-contact/collision (TTC) as disclosed for example in <CIT>.

Traffic sign recognition (TSR) modules are designed typically to detect speed limit signs and end-of-speed limit signs on highways, country roads and urban settings. Partially occluded, slightly twisted and rotated traffic signs are preferably detected. Systems implementing traffic sign recognition (TSR) may or should ignore the following signs: signs on truck/buses, exit road numbers, minimum speed signs, and embedded signs. A traffic sign recognition (TSR) module which focuses on speed limit signs does not have a specific detection range requirement because speed limit signs only need to be detected before they leave the image. An example of a difficult traffic sign to detect is a <NUM> meter diameter traffic sign on the side of the road when the vehicle is driving in the center lane of a three lane highway. Further details of a TSR system is disclosed by the present assignee in <CIT>.

A typical automatic headlight or high/low beam control (AHC) system detects the following conditions and switches from high beams to low beams: headlights of oncoming vehicles, taillights of preceding vehicles, street lights or ambient light indicating that high beams are not required and a low vehicle speed. The host vehicle lights are switched back to high beams when none of these conditions exist (often after a specified grace period). One approach for detecting taillights is to compare images from two sensors: one with a red filter and the second with a cyan filter. The cyan filter responds to non-red light sources and will give zero response to red light. By comparing corresponding pixels from two imaging sensors one can detect the color of the light source. The number of pixels of each color above a certain intensity is counted and if the count is above a threshold the systems switches to low beams. The use of color filters with imaging sensors may preclude the simultaneous use of the same image frames for other driver assistance applications.

A second approach for automatic high-beam control (AHC) uses an RGB sensor to give better color differentiation. Typical light sources can be located in the full CIE color space as defined by the International Commission on Illumination. This approach distinguishes between green, yellow and red lights. A powerful green traffic light is not confused with an oncoming vehicle. Since a single sensor with a color mosaic filter i.e. Bayer pattern mosaic is used, the lens is defocused so as to spread a light source over multiple pixels. The use of the color mosaic filter reduces both the effective image sensor resolution (by <NUM>%) and the intensity response (to less than one third). The color mosaic filter may preclude the use of the same sensor for traffic sign recognition (TSR) or lane departure warning (LDW) because of the intensity response penalty.

Given that forward collision warning (FCW), traffic sign recognition (TSR) and lane departure warning (LDW) already require a high resolution monochrome sensor, a new automatic high-beam control (AHC) algorithm was developed for use with high resolution monochrome sensors as disclosed in <CIT>. A number of different pattern recognition techniques are used with higher resolution monochrome imaging sensors to identify light sources instead of relying on color information. The automatic high-beam control (AHC) algorithm includes the following features: Detect bright spots in the sub-sampled long exposure image and then perform clustering and classification in the full resolution image, classify spots based on brightness, edge shape, internal texture, get further brightness information from the short exposure frames and classify obvious oncoming headlights based on size and brightness, track spots over time and compute change in size and brightness, pair up matching spots based on similarity of shape, brightness and motion, classify pairs as oncoming or taillights based on distance, brightness and color, and estimate distance and where unmatched spots might be motorcycles taillights.

The term "electronic traffic sign" as used herein refers to variable message signs, pulsed electronic traffic signs and/or back-lit traffic signs. A variable message sign (VMS) and in the UK known as a matrix sign is an electronic traffic sign often used on roadways to give travelers information about special events. Such signs warn of traffic congestion, accidents, incidents, roadwork zones, or speed limits on a specific highway segment. In urban areas, VMS are used within parking guidance and information systems to guide drivers to available car parking spaces. They may also ask vehicles to take alternative routes, limit travel speed, warn of duration and location of the incidents or just inform of the traffic conditions.

Pulsed electronic traffic signs include an array on light emitting diodes (LEDs) Typically the light emitting diodes (LEDs) in electronic signs are not on all the time but are pulsed at a high frequency (typically <NUM> to <NUM>) giving varying cycle times for the light emitting diodes (LEDs) in electronic signs (typically between <NUM> to <NUM>). The LED frequency, LED duty cycle and LED light intensity vary from electronic sign to electronic sign. Moreover, electronic signs are not uniform across all countries and even vary according to the time of day and ambient light levels. However, the typical cycle time of all LED electronic signs is smaller than <NUM> milliseconds and longer than <NUM> milliseconds.

Support vector machines (SVMs) are a set of related supervised learning methods used for classification and regression. Support vector machines (SVMs) belong to a family of generalized linear classifiers Support vector machines (SVMs) can also be considered a special case of Tikhonov regularization. A special property of SVMs is that they simultaneously minimize the empirical classification error and maximize the geometric margin; hence they are also known as maximum margin classifiers.

Viewing the input data as two sets of vectors in an n-dimensional space, an SVM will construct a separating hyper-plane in that space, one which maximizes the "margin" between the two data sets. To calculate the margin, two parallel hyper-planes are constructed, one on each side of the separating one, which are "pushed up against" the two data sets. Intuitively, a good separation is achieved by the hyper-plane that has the largest distance to the neighboring data points of both classes. The hope is that, the larger the margin or distance between these parallel hyper-planes, the better the generalization error of the classifier will be.

In geometry, a two-dimensional Bravais lattice, studied by Auguste Bravais (<NUM>), is a set of points generated by a set of discrete translation operations described by: <MAT> where ni are any integers and ai are known as the primitive vectors which lie in a plane and span the lattice. For any choice of position vector, the lattice looks the same.

The term "exposure" and "exposure time" are used herein interchangeably and refers to the time duration of image integration in an image sensor.

The term "detection" in the context of traffic sign detection as used hereinafter refers to detecting that there is a putative traffic sign in the environment of the vehicle such as by detecting the outline of a traffic sign. The term "recognition" in the context of traffic sign recognition refers to reading and/or interpreting the content or meaning of the traffic sign.

The terms "maximal" and "minimal" in the context of transmittance of optical filters are relative terms, for instance a range of wavelengths in which there is "maximal transmittance means that there is a relative maximum on the average in that wavelength range compared with the adjacent ranges of wavelengths.

The term "substantial" transmittance refers to transmittance greater than eighty per cent on the average in the wavelength range. The term "insubstantial" transmittance means less than twenty per cent transmittance on the average in the wavelength range.

A camera has six degrees of freedom, three of which involve rotations: pan, tilt and roll. A "pan" is a rotary pivoting movement of the camera from left to right or vice versa. In a three dimensional coordinate system where y is the vertical axis, a" pan" is a rotation of the camera around the vertical or y axis. A "tilt" is an up and/or down movement of the camera, or a rotation around the horizontal or x axis. A "roll" is a rotation of the camera about the z axis that is the optical axis of the camera. These terms are analogous to the aeronautical terms yaw, pitch and roll. Yaw is synonymous with pan. Pitch is synonymous with tilt, and roll has the same meaning in both nomenclatures.

The term "camera parameter" as used herein in the context of calibration of a camera refers to one or more of the six degrees of freedom, for instance camera height from the ground and/or camera orientation parameters , e.g. "pitch", "roll" and "yaw".

The term "rake angle" of a windshield of a vehicle is the angle between the vertical and the surface of the windshield in the middle of the windshield where the windshield approximates a plane surface.

The term "partitioning" or "to partition" as used herein refers to assigning different attributes to different image frames, for example by capturing different partitions with different camera parameters, e.g. gain, exposure time. The term "partitioning" as used herein does not refer to dividing an image frame into parts, e.g. two halves of an image frame. In the context of "image frames", the terms "portion" and "partition" are used herein interchangeably.

According to an aspect of the present invention there is provided a computerized method as in claim <NUM>.

When the traffic sign is an electronic traffic sign, both the first portion of the image frames and the second portion of the image frames may be used for recognition of the traffic sign. The electronic traffic sign may be a pulsed electronic traffic sign, a variable message traffic sign and/or a back-lit traffic sign. For the second portion of the image frames, a short exposure time is set which is substantially shorter than the exposure time of the first portion. The camera parameter of the second portion of the image frames is set substantially differently between day-mode operation during the day and night-mode operation during the night. Optionally the camera parameter of the second portion is set substantially differently during dusk for dusk-mode operation than during the day-mode operation and/or the camera parameter of the second portion is set substantially differently during dusk for dusk-mode operation than during the night-mode operation.

A third portion of the image frames is optionally partitioned and for the third portion a yet shorter exposure time is set substantially shorter than the short exposure time of the second portion. When the traffic sign is an electronic traffic sign, during the day the recognition of the electronic traffic sign may be performed using all three portions of the image frames each with the substantially different exposure times and at night, the third portion is typically used for automatic headlight control. At night, exposure of the second portion of the image frames is optionally toggled between values selected to be complementary to the camera parameters of image frames of the third portion. When the driver assistance function includes detection of traffic signs, a gain is controlled based on a portion of the image frames including an image of the road and not on an a portion of the image frames image where traffic signs are likely to be imaged.

The foregoing and/or other aspects will become apparent from the following detailed description when considered in conjunction with the accompanying drawing figures.

Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the like elements throughout. The embodiments are described below to explain the teachings herein by referring to the Figures.

Before explaining embodiments of the invention in detail, it is to be understood that the teachings herein are not limited in its application to the details of design and the arrangement of the components set forth in the following description or illustrated in the drawings.

By way of introduction, another aspect the present disclosure describes "bundling" of multiple driver assistance systems (e.g. automatic high-beam control (AHC) and traffic sign recognition (TSR), lane departure warning (LDW), forward collision warning (FCW)) on a single hardware platform, e.g. camera and processor. Bundling provides cost reduction and may allow more driver assistance functions to be added to the vehicle without increasing the space required beyond the windshield of the vehicle. Different driver assistance applications have different requirements from the camera, i.e. image sensor and optics. For example, a conventional automatic high-beam control (AHC) algorithm makes significant use of color information and thus requires a color sensor, while lane detection and traffic sign recognition require the extra sensitivity of a monochrome sensor for operation under low light conditions. No single gain/exposure setting is optimal for all applications and in fact, some applications (such as AHC and TSR) may each use more than one gain/exposure setting, according to different features of the present invention.

Referring now to the drawings, reference is now made to <FIG> which illustrate a driver assistance system according to embodiments of the present invention. <FIG> illustrates a vehicle <NUM> in which a camera <NUM> is mounted typically just inside the windshield near the centerline of vehicle <NUM> and close to the rear-view mirror attachment. A camera mount <NUM> facilitates mounting camera <NUM> in close proximity to the windshield. Referring now also to <FIG>, camera <NUM> is attached to a processor <NUM> to provide a hardware platform <NUM> suitable for bundling driving assistance applications according to embodiments of the present invention. Camera <NUM> includes optics, e.g. lens <NUM> and an image sensor <NUM>. A patterned, i.e. spatial color filter <NUM> is located in the focal plane of lens <NUM>. Image frames <NUM> are shown schematically which are transferred from image sensor <NUM> to processor <NUM> for simultaneously performing different driver assistance functions. Processor <NUM> is configured to operate according to a number of algorithms. After mounting, camera <NUM>, a calibration procedure <NUM> is used to calibrate angular orientation, i.e. pitch, yaw and roll of camera <NUM>, and to find camera height. A target <NUM> used for the calibration (process <NUM>) of camera <NUM> is shown in <FIG>. Processes for which processor <NUM> is configured, according to embodiments of the present invention are: traffic sign detection <NUM> and electronic traffic sign recognition <NUM>. Other processes for which processor may also be configured are fog detection <NUM>, and a method <NUM> for determining headway <NUM>.

According to an exemplary embodiment of the present invention. image frames are partitioned into three slots or partitions so that three image frames (frame <NUM>, frame <NUM> and frame <NUM>) are captured in sequence with different image capture parameters (e.g. gain, exposure time). A complete set of three frames is captured typically in <NUM> milliseconds. Image frame <NUM> which has a relatively long exposure is primarily used for lane departure warning (LDW) and vehicle detection. Clear lane marks are detected even in low light conditions. However, the relatively long exposure produces motion blur on traffic signs which makes traffic signs unreadable or unrecognizable. Furthermore, distant oncoming lights tend to have blurred image spots. The outline of a vehicle ahead and the vehicle point of contact with the ground may also be determined using image frame <NUM>, which may then be used to compute distance and time-to-contact according to <CIT> for forward collision warning (FCW). The relatively long exposure of image frame <NUM> may also be used to detect distant taillights for automatic high beam control (AHC) as disclosed in <CIT> and to detect traffic signs as candidate circles for eventual traffic sign recognition (TSR) as disclosed in <CIT>.

Image frame <NUM> has a medium exposure and high gain. Image frame <NUM> has minimal motion blur and may be used for traffic sign recognition (TSR). The gain and exposure settings used for the traffic sign recognition (TSR) image frame <NUM> may be previously determined or determined dynamically (on-the-fly). Once the outline circle of a traffic sign has been detected and tracked in two images (in any combination of longer exposure image frames <NUM> and medium exposure image frames <NUM>) it is possible to predict the location and size of the sign in the next image. It is also possible to determine the maximum allowable exposure that will keep the motion blur below a certain limit. The exposure of image frame <NUM> may be set on-the-fly to keep motion blur is to less than one pixel. In some cases the maximum allowable exposure combined with the maximum gain, give an image which is too bright and the traffic sign is saturated. In order to avoid saturation, brightness of the sign is predicted based on the distance (derived from the image size of the circle), the angle based on the predicted location of the sign in the image and/or the high/low beam status. The gain and exposure are then set accordingly. Further adjustment can be made using closed loop control. Since the image frame <NUM> uses a high gain, it has significant image noise and not optimal for LDW under low light and/or poorly contrasted lane markings. However image frame <NUM> does give useful information on well-marked highways and can effectively double the frame rate on such roads which are more typical for fast moving vehicles.

Image frame <NUM> has a short exposure and may be used together with longer exposure image frame <NUM> for accurate interpretation of light sources. For example, oncoming headlights of one or more vehicles in image frame <NUM> appear as a bright cluster of lights. Short exposure image frame <NUM> of the bright cluster can clearly distinguish the cluster as the oncoming headlights.

Reference is now made to <FIG> which illustrates a method for detection of and subsequent recognition of non-electronic traffic signs, according to an embodiment of the present invention. Image frames from camera <NUM> are partitioned (step <NUM>) into multiple portions or partitions. Long exposure times are set (step <NUM>) for the first partition and shorter exposure times are set (step <NUM>) for the second partition. Image frames <NUM> are captured, typically alternating between image frames <NUM> of the first partition and of the second partition. Image frames <NUM> are transferred (step <NUM>) to processor <NUM>. Detection of traffic signs is performed (step <NUM>) using the first partition with the longer exposure times and recognition (step <NUM>) of the traffic sign is performed using the second partition of image frames with shorter exposure. Optionally, in step <NUM> setting exposure times or gains for first partition of image frames <NUM> is achieved using a gain control, and exposure times (or gains) are set in step <NUM> for the second partition based on the controlled parameter of the first partition.

The light emitting diodes (LEDs) of pulsed electronic traffic signs are not on all the time but are pulsed on and off at a frequency of typically <NUM> -<NUM> cycles/sec Hertz (Hz. The frame exposure time may be selected so as not to over saturate the image of the electronic traffic sign but still capture the full cycles of the switching light emitting diodes (LED). LED frequency, duty cycle and intensity vary from sign to sign. The operating parameters of pulsed electronic traffic signs may vary from country to country and even may vary according to the time of day and ambient light levels. However the cycle time of most or all LED signs is longer than about <NUM> milliseconds and less than about <NUM> milliseconds.

Reference is now made to <FIG> which illustrates image sensor <NUM>, according to a feature of the present invention. Camera <NUM> is previously aligned in vehicle <NUM> so that image regions (A, B and C) of image sensor <NUM> are imaged in image frames <NUM>. Region C includes an image of the road region (immediately in front of vehicle <NUM>), regions A and B image the sides of the road region where electronic signs are possibly located. Image sensor <NUM> has two main parameters that affect the image brightness: exposure (also known as integration time) and gain.

Reference is now made to <FIG> which illustrates a feature of the present invention, a method of setting camera parameters in a second partition of image frames, e.g. image frames <NUM> based on a first partition, image frames <NUM> for example using the AGC of image frames <NUM>.

To accommodate recognition for the various electronic signs and the operating environments of the electronic signs, the exposure/gain control of camera <NUM> has different algorithms (executed by processor <NUM>) and settings for day, dusk and night operation. For instance, in decision box <NUM> the decision of processor <NUM> between day, dusk and night modes of image frames <NUM> is optionally based on the exposure/gain parameters of another image frame, typically image frame <NUM> or time-to-lane crossing (TLC) frame used in LDW. A classic automatic-gain-control (AGC) algorithm may be used for image frame <NUM> so that a certain percentage of pixels in a specified image region (e.g. A, B and/or C) are within a certain value range. Typically for time-to-lane crossing (TLC) image frame <NUM>, the gain and exposure is set so that <NUM>% of the pixels in the regions A, B and C are below a value of <NUM> (out of <NUM>).

Image frame <NUM> automatic gain control (AGC) is designed to keep the gain as low as possible and exposure is increased first to a maximum of about <NUM> milliseconds. When the exposure of image frame <NUM> based on the automatic gain control is above <NUM> milliseconds processor <NUM> specifies 'dusk' mode for image frame <NUM> and when the exposure passes <NUM> milliseconds processor <NUM> specifies 'night' mode. There is typically no hysteresis specified in the exposure thresholds but the exposure of image frame <NUM> preferably specifies a new setting for at least <NUM> frames before switching from day mode to dusk mode or dusk mode to night mode.

During the day mode, the automatic high beam control (AHC) algorithm is not active and image frame <NUM> allocated (at night) for the automatic high beam control (AHC) algorithm may be used by the traffic sign detection and recognition algorithm in the day. During the day, the traffic sign detection and recognition algorithm typically controls the exposure and gain settings of image frame <NUM>. During the day, image frame <NUM> may also be used by traffic sign detection and recognition algorithm but the exposure and gain are optimized for lane departure warning.

Reference is now made to <FIG>, a method illustrating traffic sign recognition and detection according to an embodiment of the present invention.

The gain control (GC) of image frames <NUM> during the day has two modes of operation shown in decision box <NUM>. In the first mode, for traffic sign detection (step <NUM>) when the system is looking for candidates (typically circles of the appropriate size and location)of traffic signs an open loop gain control is used. The second mode called closed loop AGC is used to optimize the exposure for verifying and recognizing (steps <NUM>, <NUM>, <NUM>) the particular sign. Even though the objects we are looking for (traffic signs) are above the horizon we perform gain control in the first mode based on road region C because the area of the image above the horizon varies significantly in brightness due to the background (e.g. mountains, buildings or sky). The brightness of the road surface (region C) is generally a much better indicator of the general illumination. This was a non-obvious discovery: that the AGC for TSR is best performed based on the road and not on the regions where traffic signs are likely to be found. The gain control algorithm for traffic sign detection (step <NUM>) candidate search is similar to the AGC (step <NUM>) used for the LDW frame (image frame <NUM>) but with different parameters even though they both use road region C. Exposure settings are selected so that <NUM>% of the pixels are below <NUM> (out of <NUM>). The above setting works well in most cases. However if the road surface appears washed out due to low sun in front, the algorithm parameters are adjusted and the exposure is set so that <NUM>% of the pixels are below a value of <NUM>. The already bright road is nearly totally saturated. However, this may be an optimal setting for detecting traffic signs in this situation, since the traffic signs, with the illumination from behind, are self-shadowed and appear very dark. When the sun is low but behind the car, the road also often appears very bright and washed out however in this case the traffic signs are illuminated from the front and the illumination is not increased further. To detect the particular situation of bright roads due to low sun, histograms of the two small regions 'A' and 'B' are compared to the histogram of the road region C. If the low sun is behind, then the image above the horizon is bright. If the low sun is in front, then the image above the horizon is dark. The actual comparison is done by running an SVM classifier on the <NUM> bin histogram values of the <NUM> regions together with the exposure and gain settings of the current image, the average brightness of the pixels above the regions A, B and C and the average brightness of the pixels below the region C.

Up to here the AGC used is for both electronic and non-electronic traffic signs. After detection different strategies are used for the electronic and non-electronic traffic signs. Once a circle candidate is detected (decision box <NUM>) the system is switched to a closed loop AGC. There are two types of closed loop AGC for daytime: one is for regular non-electronic sign recognition (step <NUM>) and one for electronic traffic sign recognition <NUM>. So we first check in decision box <NUM> if the detected candidate is a non-electronic sign or electronic sign and choose the correct closed loop AGC algorithm. Electronic signs are typically bright. To test for an electronic sign in the daytime, we first require that a certain percent of pixels are above a certain threshold (e.g. in saturation). For example we require that <NUM>% of the pixels inside the candidate circle are in saturation. If the candidate passes this first test we run an SVM classifier trained on candidates that were electronic signs and candidates that were regular signs as a negative training set or 'falses'.

Non-electronic traffic sign: The gain and exposure to bring the median value of the pixels inside the square bounded by the candidate circle to be <NUM>.

Electronic traffic sign: The electronic sign typically flickers although the duty cycle is typically quite high in daylight. All three image frames (image frame <NUM> (LDW), image frame <NUM> ( TSR) and image frame <NUM> (AHC) are used with different exposures. The TSR frame gain and exposure is set as for day closed loop AGC. Image frame <NUM> (LDW) frame uses the settings optimized for LDW. Image frame <NUM> is set to an exposure of <NUM> milliseconds unless either the LDW or TSR frames are set to exposure of anything between <NUM> milliseconds and <NUM> milliseconds. In that case, the image frame <NUM> (AHC) is set to <NUM> milliseconds.

In 'Night Mode' the automatic high beam control (AHC) algorithm is active and the gain and exposure settings for the automatic high beam control (AHC) image frame <NUM> are set by the automatic high beam control (AHC) algorithm. These are optionally a fixed cycle of four exposure settings {<NUM> <NUM> <NUM> <NUM>}. The gain is set to <NUM>. The automatic high beam control (AHC) image frame <NUM> may also be used by the traffic sign recognition (TSR) algorithm. The traffic sign recognition (TSR) frame, image frame <NUM> is running at a fixed exposure of <NUM> milliseconds and gain of <NUM>. Once we detect a traffic sign (typically a saturated bright circle) we first determine if it is likely to be an electronic sign or a regular non-electronic sign and apply the appropriate automatic gain control (AGC). We should note that at night there are many bright circular images: not just electronic signs and regular signs but also light sources such as headlights and taillights and even some street lights. Once we have detected a round saturated circle in the traffic sign recognition (TSR) frame (image frame <NUM>) we look in the automatic high beam control (AHC) frame (image frame <NUM>) which has shorter exposure. In the shorter exposure we would start to see the texture inside the electronic sign which is distinct from a regular sign or a light source. The respective locations in image space in current traffic sign recognition (TSR) frame <NUM> and previous traffic sign recognition (TSR) frame <NUM> may be used to interpolate and get a position in automatic high beam control (AHC) frame <NUM>. A classifier (SVM) may be used based on the raw intensity image to differentiate between a light source, a non-electronic traffic sign and an electronic traffic sign. If the candidate is classified as a likely non-electronic traffic sign or electronic sign the appropriate closed loop automatic gain control (AGC) is used. If more than one likely sign is detected optimization may be selected for the largest candidate detected, since this would indicate that it is likely to be the closer traffic sign. If no candidate was classified as a likely sign traffic sign recognition (TSR) exposure parameters are maintained at the fixed value of <NUM> milliseconds with gain equal to <NUM>.

In some cases the maximum allowable exposure combined with the maximum gain, give an image which is too bright and the traffic sign is saturated. In order to avoid this situation, the brightness of the sign is predicted based on the distance (derived from the image size of the circle), the angle based on the predicted location of sign in the image and the high/low beam status. The gain and exposure are then set accordingly. This can typically be done for OEM serial production where the type of headlights and windshield glass is known.

Further adjustment can be made using closed loop control. If we have a likely non-electronic sign which is overly saturated, gain and/or exposure are adjusted to a lower setting. For example, for exposure time <NUM> milliseconds and gain <NUM> gives half of the brightness of the standard exposure of <NUM> milliseconds and gain <NUM>.

At night, the automatic high beam control (AHC) frame is typically also used for non-electronic traffic sign recognition and a traffic sign recognition classifier is run on all image frames <NUM>,<NUM> and <NUM>.

Electronic traffic sign at night: Electronic signs are quite bright and the brightness of their images is not affected by the cone of illumination of the vehicle headlights. According to features of the present invention the full LED cycle is captured and an image is required which is not over saturated. LED frequency, duty cycle and intensity vary from sign to sign. The cycle time of all LEDs is smaller than <NUM> milliseconds and longer than <NUM> milliseconds. However an exposure of <NUM> milliseconds, even with minimal gain, sometimes leads to saturation. If the exposure time for all image frames is uniformly decreased to <NUM> milliseconds or less there may be frames where the sign is not captured.

According to an aspect of the present invention, one or more of the image frame partitions is sub-partitioned into multiple exposure settings. One or more of the frames is toggled between different settings. In a frame triplet when the automatic high beam control (AHC) image frame <NUM> uses a short exposure setting, a longer exposure is used for traffic sign recognition (TSR) image frame <NUM> and vice versa. For example: image frame <NUM> (AHC) is cycled between four exposure times of {<NUM> <NUM> <NUM> <NUM>} and image frame <NUM> traffic sign recognition (TSR) is cycled. {<NUM> <NUM> <NUM> <NUM>} The frame <NUM> exposures are thus set to compliment the frame exposures to ensure a short exposure and a medium exposure in each frame triplet.

Some back illuminated signs (such as in tunnels) are not LEDs and require very short exposure (<NUM> milliseconds). If the AGC is in the night Electronic sign mode there is an appropriate exposure frame every triplet. However, back illuminated signs are often not classified as electronic signs and the AGC is in night non-electronic sign mode. In this case, it is the short automatic high beam control (AHC) image frames <NUM> that give the correct classification.

The typical dusk scene has the following characteristics:.

If we are in 'Dusk Mode', as determined by the LDW frame exposure (decision box <NUM> in <FIG>) the TSR frame (image frame <NUM>) settings are adjusted using the AGC day algorithm. This is a typical scenario where we will have to deal with low light from in front. We set the AHC frame (image frame <NUM>) to exposure <NUM> milliseconds and gain <NUM>. Since the duty cycle of electronic signs during dusk is still quite long the exposure of <NUM> milliseconds is good at catching the electronic signs without saturating. Both the TSR (image frame <NUM>) and AHC (image frame <NUM>) frames are used for classification.

Reference is now made again to <FIG> which illustrates a camera system <NUM> including camera <NUM> connected to and passing image frames <NUM> to processor <NUM>. Camera <NUM> includes lens <NUM>, image sensor <NUM> and a focal plane filter <NUM>. Camera <NUM> orientation may be centered around the horizon as a compromise since the for traffic sign recognition a small upward tilt may be preferred for better detection of overhead signs, however an upward tilt is unacceptable for lane departure warning. The camera height is typically about <NUM> meters above the ground.

A sensor appropriate for embodiments of the present invention is a wide VGA sensor with resolution <NUM>×<NUM>. Sensor <NUM> has a <NUM>×<NUM> square pixel. It has a global shutter and can switch exposure and gain settings every frame. One unusual aspect of camera is that it includes focal plane filter <NUM> with only red and clear pixels. The red pixels are arranged as they would be on a standard Bayer pattern but the green and blue filters are missing. This is done in order to combine most of the advantages of the monochrome sensor in terms of low light sensitivity and sensor <NUM> resolution with some color information; in particular, the ability to distinguish between red and white lights.

The lens example discussed is a <NUM> lens with a low F number F1. <NUM><NUM> (e.g. Marshall Electronics Inc. , El Segundo, CA). An infra-red (IR) cutoff lens filter may be used to give a consistent response with a variety of windshields whose transmittance characteristics in the IR spectrum can vary widely. The lens filter selected is an IR cutoff filter with the <NUM>% cutoff set at <NUM> rather than the typical <NUM>. This lens filter lets in more light and increases the low light performance in detection of lanes and traffic signs under halogen headlights in particular and also increases the detection range for red taillights.

The sensor <NUM> / lens <NUM> configuration in camera <NUM> gives a field of view of <NUM>° per pixel or <NUM>° × <NUM>° over whole sensor <NUM>. However due to assembly tolerances we will only assume that <NUM>×<NUM> pixels are available giving an effective field of view of <NUM>° ×<NUM>°. Once sensor <NUM> and lens <NUM> have been fixed it is often convenient to specify the lens focal length (F) in pixels, e.g. F=<NUM> pixels.

While the red/clear filter focal plane filter <NUM> works well, there are applications that could benefit from the full <NUM>-dimensional color space. For example to determine traffic light colors - green, yellow and red, or to expand the range of traffic signs that can be detected; for example, to differentiate between yellow (recommended) and white (obligatory) speed signs in North America. Color information could also be used for classifying lane marking types (white, yellow, orange and blue are typical some examples). In fact, without color information, some lane mark color and road surface configurations make the lane marks invisible or with very low contrast when imaged in monochrome. These can be enhanced using a particular color filter over the whole image but the choice of filter would be region specific. The red channel of the red/clear sensor can help in enhancing the lane marks in such case however the lane mark color is hard to determine. To make a truly universal system a color sensor is appropriate. However, a standard red/green/blue (RGB) sensor is not recommended since the green channel is much less sensitive than the monochrome channel harming both LDW and TSR performance in low light conditions. A yellow filter (from <NUM> and up into the NIR) gives a stronger response combining the response of both the green and red filters in the RGB sensor. Since halogen head lights are actually quite yellow in color and have only little energy in the blue part of the spectrum, the difference between the response of a monochrome camera to that of a monochrome camera with a yellow filter is small.

Newer xenon or high intensity discharge (HID) lamps have a stronger blue component so there is noticeable drop in sensor response with the added yellow filter. However these headlights are so much brighter in general than the older halogen headlights that even with the yellow filter the response is strong enough. In fact, with HID headlights, even an RGB sensor can be used for LDW and TSR. The new LED technology also falls into this second category. In order to make best use of the available light energy from the halogen headlights it is important to capture light also in the NIR region. So a near infrared (NIR) cutoff filter, if used at all, should have a cutoff at <NUM> or even <NUM>. Typical automotive windshield glass has a NIR cutoff characteristic however it usually only reduces near infrared transmittance to <NUM>%. Newer and more expensive glass filters the NIR transmittance down to <NUM>%, however this glass is usually on high end vehicle where HID headlights are used and scene brightness is not an issue. The yellow filter has the added advantage that it enhances the contrast, in daytime, between yellow lane markings and the concrete road surface often used in the USA. Understanding that yellow is the best color filter to use for low light situations, leads to the idea of using a CYM (Cyan, Yellow and Magenta) instead of the standard RGB. Reference is now made to <FIG> which schematically show two examples of the color pattern of CYM focal plane filter <NUM>, according to embodiments of the present invention. The yellow portion (Y) replaces the green in the standard Bayer pattern so the yellow portion has the maximum resolution using half of the pixels. The remaining pixels alternate between magenta (M) and cyan (Y). However a standard CYM filter is preferably modified, according to an exemplary embodiment of the present invention.

Reference is now made to <FIG> which illustrates a graph of responsivity (V/µJ/cm<NUM>) of a CCD image sensor TC246CYM-B0 (Texas Instruments Inc. ) as a function of wavelength in nanometers. While the cyan portion filters out the red part of the spectrum it has noticeable NIR response above <NUM> nanometers. Near infra-red response of the cyan filtered image sensor is marked with an arrow. The significant response with the standard cyan filter above <NUM> nanometers means that a red tail light gives a noticeable response on the cyan pixels and can not typically be differentiated from white headlights. This drawback which we noted in standard CYM sensors is not typically noticed since color cameras typically have an additional filter which cut out most NIR above <NUM>. Thus, for a standalone AHC application a standard CYM filter would be suitable. However when combining with other applications such as LDW and TSR currently available CYM sensors are not preferably used since these applications preferably use response of the yellow channel to NIR. Therefore, according to a feature of the present invention the cyan filter as used in standard CYM filters is preferably modified so that it blocks out or significantly reduces the NIR from <NUM> nanometers to at least <NUM> nanometers. A graph of responsivity with a modified cyan filter, according to a feature of the present invention is shown in <FIG>. An arrow points to the responsivity as measured through the modified cyan filter, according to a feature of the present invention using the same image sensor as used for the responsivity shown in <FIG>. For an absorbing filter, the filter may be modified by adding a pigment such as iron which is used to absorb NIR in standard automotive glass. For a reflective dichroic filter a dielectric layer design with several non-absorbing dielectric layers are typically used. In the example of <FIG>, the minimal cyan IR response is up to about <NUM> nanometers. The wavelength range of minimal cyan IR response may be extended to <NUM> nanometers, <NUM> nanometers or more.

In some applications the there is a desire to display the images to the driver in some form. This might be the case for a backup display or an all-around-view application.

With the modification of the cyan filter, significantly more NIR reaches the sensor the image will have a strong yellow tint if standard color matrix values are used to convert to RGB for display. It is quite easy to manually tune the color matrix values for each scene so as to give good color rendering however these matrix values will require retuning when the light source changes spectrally. In particular, settings suitable for daylight are not suitable for a scene illuminated with halogen lights with a spectrum skewed much more towards NIR. According to an embodiment of the present invention, switching is performed between multiple color matrices according to light level as measured by the camera and other information such as time and/or place typically available on the car network.

The Mobileye AWS <NUM> system uses a monochrome sensor. The algorithm uses, among other algorithms, various classifiers which were trained using hundreds of thousands of training samples. Accumulating such a large database of much time and effort. In order to avoid having such an effort going to waste when switching to the CYM sensor the same examples are reused. It should first be noted that the images captured from a monochrome camera or from a monochrome camera with a yellow filter are very similar. The differences are negligible. However when using the CYM color filter array the response of the cyan and magenta pixels will be different from the yellow pixel response creating spurious edges. Given that the color of the viewed object is not known the cyan and magenta values cannot be adjusted automatically to give the correct yellow response. The solution is to use only the yellow pixels as input to the classifier. The values at the cyan and magenta pixel locations are interpolated based on the yellow neighboring pixels. These images will still appear different from the images obtained from the monochrome sensor however they can correctly be simulated from the monochrome data. As a training set for the classifiers using the CYM sensor we use the monochrome images where we interpolate in a checker board fashion. We use the 'white' pixels as is and interpolate the 'black' to get one example image and then use the 'black' to interpolate the 'white' to get a second example image.

The term "headway" as used herein refers to the time it takes a host vehicle to reach the preceding vehicles current position. The term "headway distance" as used herein refers to the distance from the front of the host vehicle to the preceding vehicle's current position. Maintaining a safe headway distance is a key element of driving safety. Since a safe headway distance is related to vehicle speed, headway is typically in seconds or distance/speed. However computing headway based on distance/speed requires good estimates both of distance and vehicle speed. The distance can be estimated from an image stream obtained from a monocular camera. The vehicle speed may be obtained by connecting to the vehicle controller area network (CAN) bus or by connecting directly to the speedometer analog signal. However, both methods for obtaining the speed require a professional installation. It would be advantageous for an after-market product to avoid having to use professional installation.

Reference is now made to <FIG> which shows a forward view 402a from camera <NUM> mounted inside host vehicle <NUM> (<FIG>), according to an example of the disclosure. Camera <NUM> is preferably a monocular camera mounted close to the rear mirror, looking forward out through the windshield of host vehicle <NUM>. Forward view 402a shows two vehicles <NUM> and 408R in two lanes and the progression of a feature 404a - 404n (behind vehicles <NUM>) in the road surface for successively captured image frames <NUM>. Examples of features 404a - 404n in the road are typically the end of a lane mark segment, shadows or tar seams.

One method to determine headway is to estimate the distance of vehicle 408R ahead and then divide by the speed of host vehicle <NUM>. This will give the time it takes host vehicle <NUM> to reach the current position of vehicle 408R.

Reference is now also made to <FIG> showing a method 40a for determining headway, according to an example of the disclosure, without having or requiring speed of host vehicle <NUM>. Method 40a is implemented by an algorithm in processor <NUM> which determines the time for host vehicle <NUM> to reach the current position of preceding vehicle 408R. Method 40a locates (step <NUM>) a feature point 404a on the road surface that is on the same horizontal image line as the bottom of preceding vehicle 408R. At this point in time, feature point 404a on the road and the preceding vehicle 408R are at the same distance from host vehicle <NUM>. Feature point 404a is then tracked (step <NUM>) in the next few frames (the same feature point now labeled 404b in <FIG>) till the bottom of the image frame <NUM> is reached i.e. feature point 404n. The time stamp of the first image frame <NUM> showing feature point 404a is then subtracted (step <NUM>) from the time stamp of the image frame <NUM> where the feature point 404n has reached the bottom of image frame <NUM>. The subtraction (step <NUM>) between the time stamp of the first image frame <NUM> and the time stamp of the image frame <NUM> where the feature point 404n has reached the bottom of image frame <NUM> gives an estimate (step <NUM>) of the headway in seconds.

It is preferable to use a scale invariant feature transform (SIFT) features for tracking (step <NUM>) features. Since these features encode scale invariant information they are well suited for tracking features on the road as they grow bigger. When tracking features on periodic structures (such as dashed lane markings) a fast frame rate is preferably maintained for frames <NUM> to avoid aliasing.

Referring back to <FIG>, camera <NUM> is positioned inside host vehicle <NUM> and mounted close to the rear-view mirror, viewing in the forward direction through the windshield of host vehicle <NUM>. The tracked feature point 404n leaves the image frame when the feature point is in fact a few meters in front of host vehicle <NUM>, a fact which adds inaccuracy to the estimated headway (step <NUM>). Moreover, a wait of a few seconds may be needed until the headway estimate is obtained (step <NUM>); by then the distance to the preceding vehicle 408R or the speed of the host vehicle <NUM> may have changed. A wide angle camera may be mounted at the front of vehicle <NUM> so that in typical situations, the correct distance to the preceding vehicle 408R is resolved.

Reference is now made to <FIG> which shows another forward view 402b from camera <NUM> mounted inside a host vehicle <NUM> according to another example of the disclosure. Forward view 402b shows two vehicles <NUM> and 408R in two lanes and the progression of two pairs of features <NUM> and <NUM> (behind vehicle 408R) in the road surface for successively captured image frames <NUM>.

Typically features <NUM> and <NUM> in view 402b are provided from one dashed lane marking and one solid lane marking respectively. If both lane markings are dashed then the horizontal line extending from a feature detected lane mark might not intersect a lane mark segment on the other side. In that case the intersection point of the horizontal line and a line joining the end points of two lane mark segments is used.

A substantially horizontal distance d<NUM> separates features <NUM> and <NUM> and a substantially horizontal distance d<NUM> separates features <NUM> and <NUM> in successively captured image frames <NUM>. Examples of features <NUM> and <NUM> in the road are typically the end of a lane mark segment, shadows or tar seams.

Reference is now also made to <FIG> showing a method 40b, according to another example of the disclosure. Method 40b first locates (step <NUM>) a feature point <NUM> on the road surface that is on the same horizontal image line (di) as the bottom of the preceding vehicle 408R. At this point in time the feature point <NUM> on the road and the preceding vehicle 408R are at the same distance from host vehicle <NUM>. A second feature point <NUM> is located (step <NUM>) along the same horizontal image line (di) as the bottom of the preceding vehicle 408R. Typically, linear features such as a solid lane mark are used for providing the second feature point <NUM> since only the horizontal location of the second feature point <NUM> is needed. Typically both features <NUM> and <NUM> are tracked (step <NUM>) in every captured image frame <NUM>. From tracking (step <NUM>), image distance (for example d<NUM>) between the two features (features <NUM> and <NUM>) can be determined. From the change in image distance (i.e. d<NUM> compared to d<NUM>), the time-to-contact (Tttc) can be estimated. In effect, a forward collision warning (FCW) is being determined not from vehicle 408R ahead but from distance d<NUM>, where the host vehicle <NUM> is in the current image frame <NUM>, hereinafter the first image frame.

Once the first image frame is produced both feature points <NUM> and <NUM> are tracked (step <NUM>) in the next few image frames <NUM> until the change in distance between successively tracked feature points <NUM> and <NUM> is significant (for example if the size of feature points <NUM> and <NUM> doubles). Image frame <NUM> that produces the situation where the distance between successively tracked feature points <NUM> and <NUM> is significant is known as a second image frame.

Once the second image frame is obtained, the time stamp of the first image frame is subtracted (step <NUM>) from the time stamp of the second image frame. The subtraction between the time stamp of the first image frame and the time stamp of the second image frame is known as the time difference (δT). The time to contact (Tttc) is then computed (step <NUM>) using: <MAT> The term <MAT> is known herein as the relative change of distance in image space. The time-to-contact Tttc or headway is then given by the time difference found for example from the difference between the time stamps of the image frames divided by the relative change of distance <MAT>.

Typically time to contact (Tttc) can be improved further by using measurements from multiple or all the image frames <NUM> (i). Using measurements from all the image frames <NUM> (i) indexed with integer i a plot of <NUM>/di as a function of δTi for each value of time (T) may be made. The points of the plot can be fit with a linear fit producing a line and the point of intersection of the line with the time (T) axis will give the time to contact (Tttc) or headway distance. The line can also be fit to a parabola to account for acceleration of host vehicle <NUM>.

In typical driver assistance systems, the headway warning is not an urgent signal. Therefore one can compute the time to contact (Tttc) starting at number of image frames <NUM> and then give a warning only if a large number of measurements agree. If speed for host vehicle <NUM> is available then the headway computed using distance/speed may be combined with the headway computed using method 40a and/or 40b to give a more robust warning signal. Using host vehicle <NUM> speed (V) and time to contact (Tttc) derived (step <NUM> or <NUM>) using method 40b an estimate of the distance (Z) to the vehicle 408R in front may be obtained using: <MAT>.

The distance (Z) does not require knowledge of the camera <NUM> height or the pitch angle of camera <NUM>. The distance (Z) can then be combined with the distance obtained using FCW (<CIT>) to get a more robust distance measurement using, for example, a Kalman filter.

Fog detection is an important feature when driving at night since, in the presence of fog, a different light strategy is used. The driver switches off high beams and switches on fog lamps if available. The light strategy during fog is used because light scattered from the high beams in the presence of fog may blind the driver. Not all drivers are aware of this however, and often respond incorrectly to the reduced visibility due to the fog by switching on their high beams. By so doing, they reduce the visibility even more. A fog detection system which can advise the driver or switch lights on and off automatically would be useful. There has been interest in adding a fog detection feature to a camera based driver assistance systems. One method uses spatial gradients in the image. During heavy fog the image contrast drops and so the image loses its sharper edges. However, the presence of sharp edges may also be dependent on other characteristics. Urban scenes have many sharp edges while country scenes have softer edges. Furthermore, mist or condensation on the glass may also create a drop in image contrast and reduce the higher spatial frequencies. Another method may use the relative drop in contrast of a lane mark in higher portions of the image, i.e. as the viewing direction approaches the horizon where the lane mark is farther from the camera. In foggy conditions, a freshly painted lane mark close to the vehicle is quite sharp but the sharpness drops quite quickly for more distant lane marks. It is also possible to monitor the increase in contrast on objects, such as road signs, or lane marks, as they get closer. If a lane departure warning system is already installed, then such fog detection techniques could be used. These methods assume lane markings of good quality or an object in the scene that can be tracked, and they may require significant computational power.

A more direct measure of the driver's need to lower high beams is the amount of scatter produced by the atmospheric conditions. If the scene is dark then it is possible to detect the light of the host vehicle high-beams scattered by the fog back to the camera. The high beams have a very particular back scatter pattern which is determined by the location of the forward looking camera and the vehicle headlights. The back scatter pattern from the high beams of the host vehicle may be learned by using machine learning techniques. The input feature vector may be a few horizontal lines from a low resolution image. The problem is that low beams do not give rise to strong scatter pattern. This is due to the fact that the low beams illuminate the close road which also reflects back to the camera. There is not a significant difference in the reflection pattern from the road or the scatter pattern from the low beams. This means that it is hard to give the driver, who has switched to low beams due to the fog, an indication that the fog has ended and now is a good time to switch back to high beam.

This method may be less applicable in an illuminated night scene. However one might argue that in an illuminated night scene an average driver would use low beams. Fog is readily detectable when other light sources such as street lights are in the scene or other cars with their lights on (high or low) are viewed from the side.

Some car models are available with rear-view camera systems. Reference is now made to <FIG> which illustrates schematically a rear view camera system <NUM> mounted on host vehicle <NUM>, according to an example of the disclosure. Rear camera 104R is shown mounted on the rear of vehicle <NUM>, typically centered along the rear of vehicle <NUM> and oriented backward. One use of rear camera system <NUM> is for detection of obstructions behind vehicle <NUM>. Obstruction detection using rear camera system <NUM> is disclosed in co-pending <CIT> and <CIT>. The horizontal field of view (HFOV) of camera 104R is large between <NUM> and <NUM> degrees. Rear-view camera may view almost the entire cone of light emanating from the host vehicle taillights <NUM>. The cone of light from taillights <NUM> is shown schematically as between two dotted lines. Thus, rear camera 104R is well located to observe light scatter from taillights <NUM> due to fog <NUM> shown as a droplet of water. An incident light ray i is shown and a scattered light ray s scattered into the aperture of camera 104R. In the absence of scattered light from fog <NUM>, at least a portion of the image of image sensor 104R is not illuminated by taillights or background light at night. Furthermore, the light emitted from the taillights is red. Thus the detected scattered light will have a red hue which differentiates the detected scattered light from white background light. Since there are two taillights <NUM> and camera 104R is symmetrically situated between two taillights <NUM>, a symmetric pattern of detected light is expected due to scattering from fog <NUM>. We will further note that in original equipment manufacture (OEM) series production the location of camera 104R and taillights <NUM> is known thus the scattered light in the presence of fog <NUM> causes an expected shape in the image plane of image sensor 104R.

It is possible to engineer a rule based system that looks for particular regions in the image being brighter than other regions and that the red hue is above a certain threshold. One then determines if there is a signal on both left and right edges of the image then fog <NUM> is detected.

Alternatively machine learning techniques are used to determine the presence of fog <NUM>. Reference is now made to <FIG> which illustrates schematically by way of flow chart a simplified method <NUM> for detecting fog <NUM> using camera 104R or camera <NUM>. A large number of image frames <NUM> are used for training (step <NUM>) in order to produce a trained classifier <NUM>. Trained classifier <NUM> is subsequently used to classify (step <NUM>) a detected halo as fog when the halo is detected (step <NUM> ).

The image is reduced to 160x120 red/green/blue RGB pixels (i.e. the red, green and blue pixels are averaged separately to preserve color information) and optionally only the left and right <NUM> columns of the top half of the image are used for fog detection. The result is a feature vector of <NUM>*(<NUM>*<NUM>)x3 values.

The machine learning technique as used was the support vector machine or SVM. A linear kernel can be used and trained on <NUM>,<NUM> frames <NUM> of which half are examples of fog taken from multiple vehicles <NUM> from the same car model. Other machine learning techniques such as principal component Analysis and Fisher discriminants also show promising results.

Since we do not require very fast response information of many frames may be accumulated such as <NUM> frames (<NUM> seconds at <NUM> frames per second) and since flickering or oscillating states of headlights and/or fog lights is undesirable a constraint may be imposed that a fraction, e.g. ~<NUM>% of the frames agree in order to switch state of fog lights and/or headlights.

Reference is now made again to <FIG>, which illustrates another example of the disclosure. Headlight <NUM> of vehicle <NUM> is illustrated. A modification of headlight <NUM> causes a small amount of the light to be diverted upward. A single light ray i is shown propagating upward from headlight <NUM>. In that case the forward looking camera <NUM> will simply looks for a vertical beam of light. The vertical beam is visible only when there is fog <NUM> or another scattering medium in the atmosphere. A single ray s scattered from fog <NUM> is shown.

It would advantageous to have additional information about any change in rear light status such as braking, reverse or even turn signals. Any change in brightness that corresponds in time to changes in rear light status may give further indication as to scattering.

Reference is now made to <FIG> which illustrates a method <NUM>, according to another example of the disclosure. Certain LED taillights flicker at a high frequency. By synchronizing (process <NUM>) video capture to the switching frequency of taillights <NUM> one can sequentially capture images (steps <NUM>) with taillight illumination and capture images (step <NUM> ) without taillight illumination. It would also be possible for the system to initiate a brief flickering of the taillights even in the case of regular incandescent taillights to achieve a similar effect. Taillights or other illumination may be switched on (step <NUM>) and very briefly switched off (step <NUM>). Subtracting (step <NUM>) )or otherwise comparing or correlating the two or more captured images) may include a subtracted image of the light scattered with an enhanced the signal to background ratio for use in fog detection (step <NUM>) based on light scatter in the subtracted image.

According to another example of the disclosure, a special light source such as a LED with a focused beam may be mounted on the car hood in front of the camera with the beam facing up. Since it is a dedicated light source it can be alternatively switched on and off synchronously with image frames of either camera <NUM> or 104R and then image subtracted the light scattered from the dedicated light source may be sensed.

Reference is now made to <FIG> which includes a flow chart illustrating a method <NUM>, according to an example of the disclosure for performing calibration of camera <NUM> mounted in vehicle <NUM> for use in a driver assistance system. Method <NUM> uses upright target <NUM> (<FIG>) placed at two distances from vehicle <NUM>. Target <NUM> is first placed (step <NUM>) at a first distance, e.g. up against the front bumper of vehicle <NUM> on the centerline of the vehicle. Standard features on the vehicle may be used such as the license plate or the car makers emblem. Typically the first distance is zero centimeters - the target is placed touching the front bumper centered on the bumper.

A first image is captured (step <NUM>) of target <NUM>. Target <NUM> is relocated (step <NUM>) to a second distance, e.g. moved back away from vehicle <NUM> approximately one meter. The lateral location of the target in the second position is not important. A second image is captured (step <NUM>) of target <NUM>. A mapping (step <NUM>) is performed between respective image coordinates of the first image and the second image. A stationary point during mapping (step <NUM>) is a focus of expansion (FOE) typically on the horizon. This provides the Y coordinate of the FOE used in the algorithms. The lateral position of the target in the first image provides the X coordinate of the FOE used in the algorithms. If the camera is not located in the center of the image this is adjusted for. and adjusted to correspond to the center of vehicle <NUM>. Method <NUM> may provide the camera orientation in all three angles and the camera height.

Reference is now made to <FIG> which illustrates an example of a calibration target <NUM>, according to an example of the disclosure. Target <NUM> includes an optical pattern 615b mounted for instance on a rigid upright pole <NUM>. The base <NUM> is preferably sufficiently heavy so that it does not wobble. It is recommended that base <NUM> have three points of support to insure stability. Pattern <NUM> optionally includes a narrow checker pattern, an example of which is shown in <FIG> and enlarged in <FIG>. In this case the squares are optionally five centimeters on the edge. Another example of pattern <NUM> is shown in <FIG>. The narrow shape is tends to keep target <NUM> more stable and to reduce the chance of being blown over by wind. The height of target <NUM> is designed to be wholly visible when placed close to the bumper of vehicle <NUM>. A different target height is typically required for trucks and automobiles.

Reference is now made again to <FIG> which illustrates pattern 615b with six rows of alternating black and white squares. Five saddle points <NUM> are shown marked with small circles with dotted lines while only the topmost saddle point is labeled with the reference number <NUM> so as not to clutter the drawing. With an additional five centimeters of wide margin above and below the total target is <NUM> centimeters high. However, only the middle <NUM> may be visible in the image of camera <NUM>.

Given that target <NUM> is located about <NUM> meters from camera <NUM> and the target height is <NUM> centimeters, the image height is f · (<NUM>/<NUM>) = <NUM> pixels with a camera lens of focal length <NUM> pixels. The distance in image space between top and bottom saddle points is <NUM> pixels. Given that the total image height is <NUM> pixels we can afford to have the camera height vary about <NUM> without requiring adjustment of the camera height. Thus we may have one target for camera of <NUM>-<NUM> and a second for camera height of <NUM> to <NUM>.

For camera height <NUM> to <NUM> centimeter the center of target <NUM> should be at <NUM> centimeter. The bottom at <NUM> centimeters (bottom saddle point is at <NUM> centimeters ). This value is based on the following reasoning: If target <NUM> is placed <NUM> meters from camera <NUM> and target <NUM> is <NUM> centimeters in height then about <NUM> centimeters extra is available to adjust camera height. Assuming target <NUM> works for vehicles of height within <NUM> to <NUM> then the center of target <NUM> is at <NUM> centimeter.

The image of pattern 615b of <FIG> is <NUM> pixels high so a margin of error and tolerance is available of about <NUM> pixels (i.e. <NUM> to <NUM> pixels).

The distance between uppermost and lowermost saddle points is <NUM> pixels which is typically adequate for roll computation even if target <NUM> is <NUM> away.

The discussion above does not take into account camera angle (pitch). Camera <NUM> has been assumed to be horizontal. Consider that camera <NUM> is pointed down <NUM>-<NUM> pixels. Taking the middle pixel (i.e. <NUM> pixels) at <NUM> meters, <NUM> pixels in image space translates in real space to: <MAT>.

So target <NUM> is located <NUM> lower when camera <NUM> points down equivalent to <NUM> pixels on the average in image space. Rounding the <NUM> to <NUM>. , the center of target <NUM> is at height 120centimeter. The bottom of target <NUM> is at height <NUM> centimeters and the bottom saddle point is at height <NUM>. A second target height may optionally be used to cover camera heights from <NUM> to <NUM>. The second target height may be <NUM>. higher than the first target height.

It would be advantageous to avoid having multiple target heights for different camera heights, when camera <NUM> is mounted on either automobiles and trucks. Reference is now made again to <FIG>. Pattern 615c shown in <FIG> may be used for camera heights ranging from <NUM> to about <NUM>. Corresponding to both smaller automobiles and trucks.

Reference is now made to <FIG> which illustrates pattern 615c in more detail. A center portion of <NUM> rows such as that marked with reference <NUM> of pattern 615c is optionally used for performing method <NUM>. Two additional strips <NUM> allow for unique identification of saddle points <NUM>.

If target <NUM> is placed at a distance greater than <NUM> at least <NUM> height of pattern 615c is imaged, corresponding to nine saddle points <NUM>. Pattern 615c includes an innovative feature so each set of six saddle points has a unique code based on strips <NUM>. With nine saddle points <NUM>, at least one transition in strips <NUM> is imaged and vertical position within pattern 615c may be determined. Note that the corners of strips <NUM> align with the corners of the black squares to avoid additional saddle points which may be confused with saddle points <NUM>. Pattern 615c is preferably limited in height to about <NUM> meter so that it does not become to long for packing. Pattern 615c is also optimally of length similar to the longest element of stand <NUM> so that pattern 615c fits in the same package for shipment. Alternatively, the length of pattern 615c may be extended to <NUM> meters or <NUM> meters without adding another vertical stripe for coding saddle point <NUM> positions.

In an alternative example, pattern <NUM> may be inverted around a rotation point <NUM> high up on pattern <NUM>. Markings <NUM> in pattern 615c are designed to be unique under target rotation.

Let D be the image distance between saddle points <NUM>. For each saddle point <NUM> we look at the regions <NUM>. 5D to above and <NUM>. 5D to the left and right and check if that region is white or black:.

We can now compute a code C for each saddle point <NUM> in pattern 615c: <MAT>.

For pattern 615c the codes for the <NUM> saddle points <NUM> listed from top to bottom are: <NUM>. As one can see each sequence of five codes is unique. If pattern 615c is inverted then the codes are: <NUM>. Again, every sequence of five codes is unique. If we do not know the orientation of pattern 615c we look at six codes to get a unique sequence.

The method first detects saddle points where two black squares meet. These are then matched between the two target images. The vertical positions of the points in the two images are used to estimate the stationary point of the horizon, focus of expansion (FOE) Y or horizon. The lateral position of the close target is used to estimate the lateral position of the calibration, focus of expansion (X) or Yaw.

If camera <NUM> is mounted in the center of vehicle <NUM> then the average X position of the point can be used as is. The lateral position of the points in the far pole position is ignored since target pole 50b is not centered on vehicle <NUM>. If camera <NUM> is mounted with an offset to the center this is preferably accounted for. The vertical spacing of the points in the close image is used as a ruler since it corresponds to <NUM> in the real world. Let the measured camera offset be <NUM> and the length of the edge of the square in the close image be <NUM> pixels. Then the lateral position correction Xoffset is calculated: <MAT>.

Saddle points are known to be the local minimum of the determinant of the Hessian. The first step is to find these local minima with a small threshold. Note, this measure is orientation invariant. This can be computed on a <NUM> by <NUM> image.

The second step is to verify these points using normalized cross correlation with a template of a simple checker pattern with two black and two white squares. The size of each square is kept small: typically <NUM> pixels for the side. Only points with a high enough (positive or negative) score are kept. The results for the close image are shown in by blue points in the bottom left image. Note one spurious point on the dark vehicle parked on the right.

The third step is to find N = <NUM> points that are vertically aligned. We require that they lie within a band of <NUM> pixels. We further check that they have alternating orientation starting from the top with the upper square off to the left. Other tests such as requiring that the points are evenly spaced can also be used (but not currently implemented).

All such sets of points are detected however we expect only one such set per image. More that one set should generate an error. The right hand images show the detected points. The determinant of the Hessian is: <MAT>
The x and y derivatives are computed using the Sobel filter: <MAT>.

We normalize each point by the magnitude of the gradient. <MAT> where we use Ĩx to denote the blurred versions of the image derivative. Blurring was done by twice convolving with the filter: <MAT>.

We compute the local minimum of the image by computing the local maximum of the negative of the image. The function returns true for points that are above a certain threshold t and that are greater than all the pixels in a square region of <NUM> · w + <NUM> centered around the point. w is set to <NUM> and t is set as the standard deviation of the determinant of the Hessian image.

Points are verified to be saddle points if their normalized 2D correlation with a saddle shaped template is greater than <NUM> (or smaller than -<NUM>). The correlation function is based on Matlab corr2. The template is a <NUM> checker board pattern with squares of size <NUM> pixels. It is intentionally orientation dependent.

If we are using the simple case where the target is wholly visible in both images then matching is straightforward: the points are matched one to one starting from either end. In the case that only a subset of the points on the target is visible, we use the unique codes. For each image we compute the sub-code for the subset of points that are visible. We then find the location of the sub-code within the full code of the target. This in turn allows us to give the correct index to each point in the subset. We use only points from the two images with matching indices. Points in one image which do not have a match in the other image are not used. Alignment of the sub-code within the target also gives the true height of each point from the ground.

The lateral position of the FOE (or 'yaw') is given by the lateral position of the close target. We take the average of the x coordinate of the points on the close line. For the horizon we are looking for the stationary point y<NUM> in the mapping from the y coordinates of the line points in one image y<NUM> to the matching line points in the second image y<NUM>. The model is a scale around a stationary point thus: <MAT>
This can be rewritten as a linear set of equations: <MAT>
We solve using the pseudo inverse: <MAT> It is then straightforward to solve for y<NUM>.

If the camera is not centered in the car it is necessary to adjust for the camera lateral offset. We use the known size of the squares (<NUM>) and the vertical spacing between the points in the close image to convert from cm to pixels: <MAT> where Cx in the camera lateral offset in cm and Tpixels, Bpixels, Tcm and Bcm are the position of the top and bottom saddle points in the image and in centimeters from the ground respectively.

To compute camera height we convert the coordinates of the stationary point yo (also known as FOEy or horizon) to height from the floor.

The camera roll is computed from the close target: <MAT> where XT , XB, YT and YB are the x and y coordinates of the top and bottom saddle points respectively.

In OEM installations there is often a specific host vehicle model and since the rake angle of the windshield glass is known in the mechanical design phase, camera mount <NUM> (<FIG>) can be optimized. For after market products, system <NUM> is potentially installed in a variety of vehicle models with a large variation in windshield rake angles.

Reference is now made to <FIG> which illustrates schematically rake angles of windshields 701a and 701b of different vehicle models and camera <NUM>. The camera elevation or pitch is preferably within a desired tolerance angle. According to an example of the disclosure, camera mount adapters may be used for each possible windshield rake angle. In practice a single adapter might cover a range of <NUM> degrees. For each car model, the appropriate adapter is affixed to the vehicle window and camera <NUM> is inserted into the adapter. The advantage of this method is that the mount can be optimized for the particular angle and bring camera <NUM> lens close to the windshield glass. A disadvantage is that it requires to supply the after-market unit with a variety of adapters, most of which are not used. An alternative solution is to use an adjustable mount that can accommodate a variety of angles and is adjusted after fixing the mount to the glass so as to bring the camera to the desired angle. While the angle of camera <NUM> is correct, the position of camera <NUM> relative to the glass is not optimal and the distance can be quite large, especially for sharp rake angles. This in turn significantly increases the size of the light shield often attached around camera <NUM>; the light shield is recommended for eliminating stray light reflecting into the camera aperture from the windshield glass. Various mount designs are presented, which allow both adjustment of the angle and ensuring that lens <NUM> is optimally close to glass <NUM>.

<FIG> shows a conventional design of an adjustable mount. As one can see, when camera <NUM> is adjusted for the sharp rake angle of windshield 701a camera <NUM> moves away from the glass. The same problem occurs if a ball socket is used with the ball centered above or ball camera <NUM> or if camera <NUM> fits inside a sphere mounted inside a ball socket of the same diameter so that camera <NUM> may be adjusted in all three angles.

A camera mount <NUM> is desirable that allows adjustment of the camera angle but enforces a constraint that camera lens <NUM> touches glass <NUM>. Reference is now made to <FIG> which show an example of camera mount <NUM>. In <FIG>, camera <NUM> is shown butted up against windshield glass <NUM> shown at two different angles. Camera mount <NUM> includes a fixed element <NUM> mounted flush with windshield <NUM>. Reference is now also made to <FIG> which illustrates the embodiment of camera mount <NUM> of <FIG> in more detail. An axis <NUM> of rotation has been shifted to the tip of lens <NUM> where the lens mount <NUM> touches the glass. The body of camera <NUM> has two extensions <NUM> one on each side of lens <NUM>. The tip of extension <NUM> is in line with upper edge of lens <NUM>. From each extension <NUM>, axis pin <NUM> is attached which is parallel to the glass plane. Axis pins <NUM> fit into corresponding holes in extension <NUM>. If we wish to have lens <NUM> actually touch the glass, the holes in the mount extensions <NUM> may be replaced by grooves and the glass itself closes onto pin <NUM>. After the camera angle is adjusted, camera <NUM> is locked into position optionally by applying an adhesive, e.g. epoxy adhesive, between extension <NUM> and fixed element <NUM>. Alternatively, a set screw or any other method as commonly known in the art may be used for locking.

<FIG> shows a modification of the previous design( <FIG>) in which an arm <NUM> with a slot is attached to each side of fixed element <NUM> and camera body <NUM>. (only one side is shown) Arm <NUM> rotates around a point <NUM> on fixed element <NUM> and slides along pins <NUM> protruding from camera body <NUM>. If pins <NUM> are threaded, a nut or wing nut may be used to lock the camera angle.

Further modifications of the design are possible. Reference is now made to <FIG>, illustrating camera mount <NUM> according to another example of the disclosure. Arm <NUM> may have another hole, one for the pin at point <NUM> connecting to fixed element <NUM> and the other for a pin <NUM> attached to camera body <NUM>. The axis at point <NUM> at the tip of lens <NUM> may slide in a slot along the glass of windshield <NUM>. If the pin at point <NUM> is not actually at the tip of lens <NUM> but further back, a curved slot may be designed that constrains the tip of lens <NUM> to move along a straight path while touching the glass.

Reference is now made to <FIG> which illustrates two views of a second example. The two views differ by the angles of windshield <NUM>. As camera <NUM> is rotated so that the tip of lens <NUM> touches glass <NUM> at point <NUM>, the opposite corner <NUM> of camera body <NUM> marks a circular path whose center is point <NUM> of contact between lens <NUM> and glass <NUM>. Since opposite corner <NUM> is the most distant point on camera <NUM> from the tip of lens <NUM>, the semi-circle shown encloses all of camera <NUM> during adjustment. Reference is now also made to <FIG> which show a side view and rear view respectively, of camera mount <NUM>, according to an example of the disclosure. Camera body <NUM> may be modified so that instead of a sharp corner at point <NUM> it has a flat or beveled surface <NUM> at the point of contact with a semi-circular strip <NUM>. It should be noted that the flat surface at point <NUM> is perpendicular to a radius of semi-circular element <NUM>. One can prove, using elementary geometry, that if flat surface at point <NUM> is pulled tight towards the semi-circular element, the tip of lens <NUM> touches center <NUM> of semi-circular element <NUM> which is on glass <NUM>, regardless of where on semi-circular element <NUM> the flat surface touches. One way to pull the flat camera surface tightly towards the semi-circular mount <NUM> is with a fastener <NUM>, e.g. wing nut or screw. A slot, e.g. of two centimeters, in width is bent into a semi-circle and a slot <NUM> is cut into it. A threaded hole may be tapped through flat surface on camera body <NUM>. Screw <NUM> is optionally inserted through slot <NUM> and then screwed into camera body <NUM>. When screw <NUM> is tightened the flat surface is pulled tightly towards semi-circular element <NUM>.

Another option is to glue the flat surface to semicircular element <NUM> once the correct angle has been determined. Another option is to have the semicircle ferromagnetic and camera body <NUM> be a magnet. Camera <NUM> is typically constrained to have only one degree of freedom in movement since the flat surface is a rectangular shaped and the minimum distance (radius) is achieved when opposite edges of the rectangle touch semi-circular element <NUM>. If however camera body <NUM> is part of a sphere, then the surface at point <NUM> is a circle. Semi-circular element <NUM> may be formed from a hemisphere. Screw <NUM> may then give a second axis of rotation and allow for an adjustment of camera roll. Some lateral rotation (pan) motion is also possible. Semi-circular element <NUM> may be a portion of a sphere and camera body <NUM> may be a portion of sphere of the same diameter, so that tip <NUM> of lens <NUM> is the center of the sphere. The screw hole may be placed on any location on camera body <NUM>. The screw hole may be placed on the optical axis of camera <NUM> enabling two axis of motion. Vertical motion to account for windshield rake angle and rotation around the optical axis to account for roll. If camera body <NUM> is attached to mount <NUM> using glue or a magnet then the hemisphere inside hemisphere design gives also a lateral rotation (pan) by relaxing the requirement that tip <NUM> of lens <NUM> touches glass <NUM>.

Reference is now made to <FIG>, illustrating a method for mounting a camera behind a windshield according to an example of the disclosure. A tilt rotation axis is provided (step <NUM> ) at a point between the lens mount and the windshield. The front tip of the lens mount is constrained ( step <NUM>) to be in close proximity to or to contact the inside of the windshield for different rake angles of the windshield.

The indefinite articles "a", "an" is used herein, such as "an image frame ", "a traffic sign " have the meaning of "one or more" that is "one or more image frames " or "one or more traffic signs".

In the context of a patterned filter, ". " means that the pattern continues to repeat.

Claim 1:
A computerized method for performing a driver assistance function using a computerized system mounted on a moving vehicle, the computerized system including a processor (<NUM>) and a camera (<NUM>), wherein under control of the processor (<NUM>) the camera is configured for capturing in real time image frames of the environment in the field of view of the camera, the method comprising:
assigning different camera parameters to different image frames by
for a first portion of image frames (<NUM>), controlling a camera parameter based on ambient lighting conditions in the environment in the field of view of the camera;
based on the camera parameter of the first portion of image frames (<NUM>), setting a camera parameter of a second portion of image frames (<NUM>);
capturing the image frames; and
transferring the image frames (<NUM>) to the image processor for processing of the driver assistance function;
wherein
the driver assistance function includes detection and recognition of traffic signs;
the camera parameters are gain and/or exposure time; and
the exposure time of the second portion of image frames is shorter than the exposure time of the first portion of image frames.