# Patent

## Title
Vehicular camera with on-board microcontroller

## Abstract

In one aspect of the invention, a vehicular camera is provided, comprising a lens, a housing, an imager and a microcontroller that is capable of handling certain functions, such as applying overlays to images received by the imager, dewarping the image and/or providing different viewing modes.

## Background
CROSS REFERENCE TO RELATED APPLICATIONS
The present application is a 371 national phase filing of PCT Application No. PCT/US2010/043363, filed Jul. 27, 2010, which claims the filing benefit of U.S. provisional application Ser. No. 61/228,659, filed Jul. 27, 2009, which are hereby incorporated herein by reference in their entireties.


FIELD OF THE INVENTION
The present invention relates to a camera for use in vehicles, and more particularly rearview cameras for use in vehicles.
BACKGROUND OF THE INVENTION
A typical camera for mounting on a vehicle has a lens member, an imaging element, a circuit board and housing members that connect together. The typical vehicular camera, however, is relatively restricted in terms of its processing capabilities.
SUMMARY OF THE INVENTION
In a first aspect, the invention is directed to a vehicular camera, comprising a lens, a housing, an imager and a microcontroller that is capable of handling certain functions, such as controlling the application of overlays to images received by the imager, dewarping the image and/or providing different viewing modes.
In a second aspect, the invention is directed to vehicles and/or vehicular systems that incorporate the aforementioned camera. Such systems include, for example, vehicle surround view systems and object detection/collision avoidance systems.
In a third aspect, the invention is directed to a vehicular camera, comprising a lens, an image processor and a microcontroller. The microcontroller is connected to the image processor by a first bus through which command data is communicated to the image processor from the microcontroller. The command data includes application instructions to draw application data from a selected point in the flash memory. The microcontroller is connected to the image processor by a second bus through which application data is communicated to the image processor from the flash memory.
In a fourth aspect, the invention is directed to a vehicular camera that dewarps an image by stretching and compressing portions of the image so as to provide a selected shape to a selected known element in the raw image received by the camera. For example, the camera may be configured to dewarp images based on the shape of the horizon line in the images. In the raw images received by the camera the horizon line may be curved instead of being straight as it should be if there were no warpage in the raw images. The camera will stretch and compress portions of the image in order to at least partially straighten out the horizon line thereby dewarping the image.
In a particular embodiment, the camera includes a lens having a field of view, an image sensor, a housing and a controller. The lens and image sensor are mounted to the housing at a selected position relative to each other. The imager receives raw images from the lens. For at least one raw image the controller is programmed to generate a dewarped image by stretching and compressing portions of the raw image so as to provide in the dewarped image a selected shape for a selected known element in the field of view of the lens.
In a fifth aspect, the invention is directed to a camera system for a vehicle, including a camera, a distance sensor, and a controller that determines whether there is an element in the fields of view of the camera and the distance sensor that represents a collision risk for the vehicle based on an image from the camera and input from the distance sensor. Upon detection of an element that represents a collision risk the controller is programmed to carry out at least one action consisting of: informing the driver of the vehicle of the collision risk; and control at least one vehicle component to inhibit a collision by the vehicle with the element that represents a collision risk.
In a sixth aspect, the invention is directed to a camera system for a vehicle, including a plurality of cameras each of which is connected to a central controller by an electrical cable. Each camera has sufficient individual processing capacity to be able to modify raw images and generate processed images. The processed images are sent to the central controller, which combines the images into a single image which shows the combined field of view of the plurality of cameras, and which may optionally apply an overlay to the single image. Because each camera has sufficient processing capacity to modify the raw images, a relatively inexpensive type of electrical cable can be used to transmit the images from the cameras to the central controller. By contrast, in some prior art systems, the cameras are not capable of modifying the images and so typically expensive, well-insulated cable (eg. coaxial cable) is used to transmit images from the camera to a central controller, which receives the images and carries out functions, such as dewarping functions, on the images. The coaxial cables, however, are relatively expensive, and are difficult to route easily through the vehicle due to their thickness and consequent low flexibility.
In a particular embodiment, the camera system includes four cameras. The cameras are positioned at selected positions about the vehicle such that the combined field of view of the four cameras is substantially 360 degrees. Each camera includes a lens, an image sensor, a housing and a controller. The lens and image sensor are mounted to the housing at a selected position relative to each other. The image sensor receives raw images from the lens. The controller is programmed to modify at least one raw image to produce a processed image. The central controller is programmed to combine the processed images from the cameras into a single combined image showing the combined field of view.
In a seventh aspect, the invention is directed to a camera for a vehicle having a towing device, including a lens having a field of view, an image sensor, a housing and a controller that processes raw images received by the image sensor into processed images. The camera is positioned at an actual viewing angle and has the towing device is in the field of view of the lens. The camera has a bird's eye viewing mode in which the controller is programmed to modify the raw image so that the processed image appears to have been taken at an apparent viewing angle that is more vertically oriented than the actual viewing angle.
In an eighth aspect, the invention is directed to a camera for a vehicle. The camera is programmed to recognize a selected feature in its field of view and to apply an overlay proximate the selected feature in an initial raw image showing the selected feature. As the vehicle moves, and the selected feature moves in the field of view of the camera, the camera holds the overlay in a fixed position, so that the selected feature moves relative to the overlay. This can be used for several purposes. One purpose in particular is to assist the vehicle driver in backing up the vehicle when towing a trailer. The selected feature would be provided on the trailer (eg. a sign with a cross-hairs on it). Initially, when the driver has the trailer directly behind the vehicle, the camera could be activated by the driver to apply an overlay to the raw image showing the cross-hairs. The overlay could be, for example, a dot at the center of the cross-hairs. As the driver backs up the vehicle and trailer, the cross-hairs on the trailer will move relative to the fixed dot on the screen if the trailer begins to turn at an angle relative to the vehicle. Thus, the driver can use the dot and the cross-hairs as a reference to keep the vehicle and the trailer straight while backing up.



BRIEF DESCRIPTION OF THE DRAWINGS
The present invention will now be described by way of example only with reference to the attached drawings, in which:
FIG. 1 is a schematic illustration of a camera in accordance with an embodiment of the present invention;
FIG. 1A is a schematic of a camera in accordance with an embodiment of the present invention, illustrating electrical components associated with the camera;
FIG. 2 is a graph showing temperature-related specifications for the camera shown in FIG. 1;
FIG. 3 is a table showing fatigue-related specifications for the camera shown in FIG. 1;
FIG. 4 is a view of the lens superimposed with the imager for the camera shown in FIG. 1;
FIGS. 5a, 5b and 5c are images taken using the camera shown in FIG. 1 with different amounts of distortion correction;
FIG. 6 is an image from the camera shown in FIG. 1, when in a cross-traffic viewing mode;
FIG. 7 is an image from the camera shown in FIG. 1, when in a bird's eye viewing mode;
FIG. 8 is an image from the camera shown in FIG. 1, showing a static overlay applied to the image;
FIG. 9 is an image from the camera shown in FIG. 1, showing a dynamic overlay applied to the image;
FIG. 10 is an image from the camera shown in FIG. 1, when the camera is in a hitch mode, showing a dynamic overlay applied to the image;
FIG. 11 is an schematic illustration of a vehicle surround view system that uses a plurality of the cameras shown in FIG. 1;
FIG. 12 is an image taken using the vehicle surround view system shown in FIG. 11;
FIG. 13 is an image from the camera shown in FIG. 1, during a procedure to align the lens and imager;
FIG. 14 is an image from the camera shown in FIG. 1 when the camera is in a trailer mode; and
FIG. 15 is a schematic illustration of a camera system that is used for object detection using the camera shown in FIG. 1.



DETAILED DESCRIPTION OF THE INVENTION
FIG. 1A is a system block diagram of a camera system 100 which includes an image processor 102 operatively connected to a camera lens 103 (as discussed in greater detail below) and a microcontroller 104. In the preferred embodiment the image processor 102 is a model MT9V126 which includes a CMOS image sensor and some control elements and is available from Aptina Imaging, San Jose, Calif., and the microcontroller 104 is a PIC microcontroller available from Microchip Technology, Chandler, Ariz., and which includes an internal flash memory 110. The image processor 102 and microcontroller 104 communicate via a serial, two wire, inter-integrated circuit (I2C) bus 106, as known in the art per se. The image processor 102 and microcontroller 104 also communicate via a four wire serial peripheral interface (SPI) bus 108, as known in the art per se. The system 100 also includes a transceiver 112 that enables the microcontroller 104 to communicate with other devices over the vehicle internal bus 114 such as a CAN or LIN bus as known in the art per se. The image processor 102 provides a composite video output 116, such as a single ended or differential NTSC or PAL signal.
In an embodiment not shown in FIG. 1A, the image processor SPI bus is used to connect to an external flash memory device that stores overlay data to be superimposed on the images obtained from the camera lens 103. In the embodiment shown in FIG. 1A, the SPI bus 108 is directly connected to the microcontroller 104, which includes I/O pins (not shown) and appropriate interface circuitry for implementing the SPI bus protocol, all under control of the microcontroller. The SPI protocol provides for the reading or writing to a block of memory, commencing from a memory address. Thus, the microcontroller 104 is able to emulate a flash device, providing data from its internal flash 110, or dynamically calculating and providing imager data such as overlay data to the internal SPI bus registers for transfer to the image processor 102. Thus, overlay data can be dynamically calculated on the fly. This provides an advantage over the prior art where conventionally, the overlay data had to be pre-programmed or pre-considered to account for all eventualities. For example, in an application which superimposes a square block at any point in the image to represent a moving object, the prior art required that the flash memory be pre-programmed with a series of blocks that covered the entire display area, to thus mimic the movement of the block. This can be avoided by dynamic overlay data generation by the microcontroller 104. For example, the microcontroller 104 may be programmed to calculate at least one of the size and shape of an overlay, to store the calculated shape of the overlay in its flash memory 110 and to transmit data relating to the overlay to the image processor 102 for the image processor 102 to apply to one or more images.
The I2C bus 106 is used by the microcontroller 104 to send command data to the image processor 102, including for example memory instructions for where to draw application data including for example, overlay data. The SPI bus 108 is used to communicate the application data between the microcontroller 104 and the image processor (specifically between the flash memory 110 contained on the microcontroller 104 and the image processor 102).
The implementation of the emulated flash provides a convenient method for the camera system 100 to access imager-specific data, including custom image settings, overlays, and digital correction algorithms. The imager-specific data is organized into a series of records, including custom register settings sets, digital correction algorithms, overlays, and imager patches. Each record is organized into tables indexed by a table of contents. Each table is in turn indexed by a master table of contents. Furthermore, initialization tables are made available for custom initialization routines.
Thus, other advantages flowing from the invention includes the fact that flash drivers do not need to be developed to support an external device. Rather, the microcontroller has a means for performing flash-based operations on program memory. The bootloader also has reduced complexity as the microcontroller does not need to maintain a separate flash driver for an external flash. There are also a reduced number of physical connections/communication channels. With emulated flash, a single SPI communication channel exists between the microcontroller and image processor. With an external flash, an additional SPI connection between the microcontroller and external flash would be required, in order to allow for re-flashing.
Reference is made to FIG. 1, which shows a camera 10 in accordance with an embodiment of the present invention. The camera includes a lens assembly 12, a housing 14, which may include a lens holder 14a and a rear housing member 14b, an imager 16 and a microcontroller 18.
The lens assembly 12 is an assembly that includes a lens 22 and a lens barrel 24. The lens 22 may be held in the lens barrel 24 in any suitable way. The lens 22 preferably includes optical distortion correction features and is tailored to some extent for use as a rearview camera for a vehicle. The distance between the top of the lens 22 and the plane of the imager is preferably about 25 mm.
The lens barrel 24 may have either a threaded exterior wall or a threadless exterior wall. In embodiments wherein the exterior wall is threaded, the thread may be an M12×0.5 type thread. The barrel 24 is preferably made from Aluminum or plastic, however other materials of construction are also possible. The lens barrel 24 preferably has a glue flange thereon.
A lens retainer cap, if provided, preferably has a diameter of about 20 mm. The imager 16 is preferably a 1⁄4 inch CMOS sensor with 640×480 pixels, with a pixel size of 5.6 micrometers×5.6 micrometers. The imager preferably has an active sensor area of 3.584 mm horizontal×2.688 mm vertical, which gives a diagonal length of 4.480 mm.
The field of view of the camera 10 may be about 123.4 degrees horizontally×about 100.0 degrees vertically, which gives a diagonal field of view of about 145.5 degrees. It will be understood that other fields of view are possible, and are described further below.
The F number of the lens is preferably about 2.0 or lower.
The relative illumination is preferably >about 50% inside an image circle having a diameter of about 4.480 mm.
The geometrical distortion is preferably better than about −47.
The modulation transfer function (MTF) values for both tangential MTF and sagittal MTF are preferably greater than about 0.45 at 45 lp/mm on the lens axis, and greater than or equal to about 0.30 at 45 lp/mm off the camera axis between about 0 degrees and about 60 degrees. Exemplary curves for the MTF value at 0 degrees and at 60 degrees are shown in FIGS. 2a and 2b. 
The lens 22 preferably has an integrated infrared cutoff filter. The filter can be directly coated on one of the lens elements. Alternatively, the filter can be an add-on thin glass element with the coating thereon. The pass-band wavelengths of the infrared cutoff filter may be about 410 nm for a low pass, and about 690 nm for a high pass.
The infrared cutoff filter preferably has at least about 85% transmission over the pass-band spectrum, and at least about 50% transmission at both 410 nm and 690 nm.
The lens 22 preferably has an anti-reflective coating on each surface of each lens element, except the surface with the infrared cutoff filter thereon and except any surfaces that are cemented to the lens barrel or to some other component.
The image circle diameter of the lens is preferably less than 4.80 mm. The angle between the optical axis of the lens 22 and the reference diameter axis for the barrel 24 is preferably less than 1.0 degrees.
Preferably, the lens 22 is substantially free from artificial optical effects, such as halo, veiling glare, lens flare and ghost images.
Preferably, the lens 22 has a hydrophobic coating on its outer surfaces, for repelling water and for providing a self-cleaning capability to the lens 22.
Preferably, the lens 22 is capable of withstanding the following conditions without any detrimental effects, such as peel-off, cracking, crazing, voids, bubbles of lens elements, dust/water/fluid ingress, moisture condensation, foreign objects, cropping of field, non-uniform image field and distortion that did not exist prior to the conditions, or any visible and irreversible change to the appearance of the lens 22 including colour and surface smooth level, or any of the aforementioned lens properties changing outside a selected range.
The conditions to be withstood by the lens 22 include:

    
    
        Subjecting the lens 22 to a temperature of anywhere from −40 degrees Celsius to 95 degrees Celsius;
        Enduring 1000 hours at 95 degrees Celsius;
        Cycling of the lens a selected number of times between −40 and 95 degrees Celsius, with a dwell time for the lens in each temperature of at least a selected period of time and a ramping time to reach one or the other temperature of less than another selected period of time;
        Exposing the lens 22 to 85 degrees Celsius and 85% relative humidity for 1200 hours;
        Subjecting the lens 22 to 10 cycles of the test profile shown in FIG. 2, including a first set of 5 cycles that include exposing the lens 22 to the portion of the cycle wherein the temperature drops to −10 degrees, and then a second set of 5 cycles wherein that portion of the cycle is replaced by ramping the lens 22 from 45 degrees Celsius to 25 degrees Celsius;
        Dropping a lens with a front cover thereon from a selected height, such as 1 m, onto a concrete or steel surface;
        Running the lens 22 under 6 shock pulses with 100 g and 10 ms half-sine pulses, one in each opposite direction of 3 perpendicular axes;
        Exposing the lens 22 to a vibration test for 27 hours in the X-axis, 27 hours in the Y-axis and 81 hours in the Z-axis, with a RMS acceleration value of 27.8 m/s^2 according to the power spectrum density/frequency table shown in FIG. 3;
        Exposing the lens 22 to the following test procedure relating to abrasion resistance: Prepare 1000 ml of sludge in which 100 g of Kanto loam (JIS Z 8901 class 8) is dissolved. Soak a sponge in the sludge and scrub the lens surface with the sponge for 250 repetitions, applying 20 N of pressing force while scrubbing.
        Exposing the lens 22 to heavy splash shower, car wash spray mist and dust, with the condition that any moisture condensation in the lens assembly 12 dissipates within 10 minutes;
        Exposure to water without leakage therepast in accordance with ISO standard 20653;
        Meeting IP Code 7 and 6K requirements;
        Heating the lens 22 to 85 degrees Celsius for 1 hour, spraying the upper body of the lens 22 with 1200 psi water stream for 2 minutes at a 0 degree angle, a 90 degree angle and at a 45 degree angle relative to the lens axis, respectively;
        Soaking the lens in water at 95 degrees Celsius for 1 hour and then immediately dunk the upper body of the lens 22 in room temperature water at a depth of 15 cm for 30 minutes;
        Meeting ISO Standard 20653 with respect to dust requirement, and meeting IP Code 6K for protection against foreign objects. For the testing a vertical flow chamber is preferably used, with a dust density of 2 kgm^3 for 8 hours continuous circulation.
        Exposing the upper part of the lens to 5% salt water at 35 degrees Celsius for 96 hours;
        Testing that the front glass surface of the lens 22 and the upper exterior body of the lens 22 resist the following chemicals: Automatic transmission fluid, hypoid lubricant, hydraulic fluid, power steering fluid, differential lubricant, central hydraulic fluid, engine oil, engine wax protective, engine coolant/Ethylene Glycol, gasoline, diesel fuel, kerosene, bio-diesel/Methanol based fuel, brake fluid, windshield washer fluid, window glass cleaner, car wash cleaner/soap solution, car wax and silicone protectants, leather wax, battery acid—dilute sulfuric acid (density: 1.285 g/cm3), and CaCl2;
    
    


For each chemical tested, the test is preferably conducted for 24 hours of exposure. The test is conducted in accordance with the following procedure:

    
    
        1. Place test sample in a temperature chamber maintained at 40° C. on a test fixture representative of in-vehicle position with any protective surrounding structures.
        2. Keep test sample at 40° C. for one hour. Remove sample from the chamber and apply 100 ml of test chemical/fluid by either spraying or pouring to front glass surface and upper exterior body. Store the sample at outside ambient temperature (RT) for 1 hour.
        3. Replace the sample in the chamber and keep it at 40° C. for one hour. Then ramp up the chamber temperature to 70° C. (60° C. for battery acid) within 30 minutes and keep the sample at that temperature for 4 hours (dwell time). Ramp down the chamber temperature to 40° C. within 30 minutes.
        4. Repeat step B and C for the same fluid but prolong dwell time from 4 hours to 12 hours at high temperature.
        5. Repeat step B, C and D for the next fluid in the set. Continue the process up to a maximum of four fluids per sample.
        Exposing the lens to a test procedure laid out in IEC 60068-2-60 method 4, whereby the lens 22 is exposed to H2S in a gas concentration of 10 ppb, SO2 in a gas concentration of 200 ppb, Chlorine in a gas concentration of 10 ppb and NO2 in a gas concentration of 200 ppb;
        Subjecting the lens 22 to UV exposure test as referenced to SAE J1960v002, with a minimum exposure level is 2500 KJ/m2. There must be no significant change of color and gloss level or other visible detrimental surface deterioration in any part of the lens upper body. The lens upper body includes and is not limited to lens cap surface, the subsurface under the first glass element, top glass and its surface coating. There is preferably no crack, crazing, bubbles or any defect or particles appear after UV exposure in and on any of the glass or plastic lens elements and its coatings.
    
    


The lens cap is preferably black and free of ding, dig, crack, bur, scratch, or other visible defects. There must be no visible color variation on a lens cap and among lenses.
The coating of the first glass is preferably free of dig, scratch, peeling, crack, bubble or flaking. The color appearance of the AR coating should have no or minimum visible color variation among lenses.
The interior of the lens 22 (at the mating surfaces of the constituent lens elements) preferably has little or no moisture inside it, which can cause water spots on the inside surfaces of the lens 22 after cycles of condensation and subsequent evaporation, and which can leak out from the lens 22 into portions of the camera 10 containing electrical components thereby causing problems with those electrical components. Preferably, the lens 22 is manufactured in a controlled, low-humidity environment. Other optional steps that can be taken during lens manufacture include: drying the interior surfaces of the lens 22, and vacuum packing the lens for transportation.
The manufacture of the lens 22 using a plurality of lens elements that are joined together can optically correct for distortion that can otherwise occur. Such optical distortion correction is advantageous particularly for a lens with a field of view that approaches 180 degrees horizontally, but is also advantageous for a lens 22 with a lesser field of view, such as a 135 degree field of view. An example of the effects of optical distortion correction is shown in FIG. 5b. The multiple lens elements that are provided in the lens each have selected optical properties, (eg. refractive index), and are shaped in a selected way to optically dewarp the image produced by the lens, as compared to a single element, spherical lens.
Aside from optical distortion correction, the camera 10 preferably also provides other forms of distortion correction. To carry this out, selected techniques may be employed. For example, one technique is to position the lens 22 so that the horizon line (shown at 28) in the field of view (shown at 30) lies near the optical axis of the lens 22 (shown at 32). As a result, there will be less distortion in the horizon line in the image sent from the camera 10 to the in-vehicle display. Aside from positioning the lens 22 so that the horizon line is closer to the optical axis of the lens 22, the microcontroller 18 preferably processes the image to straighten the horizon line digitally (ie. by compressing and/or stretching selected vertically extending portions of the image). In some embodiments, the amount of distortion in the image will increase proportionally with horizontal distance from the optical axis. Thus, the amount of compression or stretching of vertically extending strips of the image will vary depending on the horizontal position of the strip. The portions of the image to stretch or compress and the amounts by which to compress them can be determined empirically by testing an example of the camera so as to determine the amount of distortion present in vertically extending portions (ie. vertical strips) of the image that contain image elements that have a known shape. For example, the horizon line should appear as a straight horizontal line in camera images. Thus when testing the camera, values can be manually calculated for use to compress or stretch vertically extending portions (eg. strips) above and below the horizon line so that the horizon line appears straight in the image. These values can then be used in production versions of the camera that will have the same lens and the same orientation relative to the horizon line. As an alternative instead of manually calculating the compression and stretch values to apply to vertical strips of the image, the microcontroller 18 may be programmed to carry out a horizon line detection routine, taking into account that the horizon line is vertically close to the optical axis in the centre region of the image to assist the routine in finding the horizon line. It will be understood that other selected known elements could be positioned proximate the optical axis and used instead of the horizon line.
The microcontroller 18 (FIG. 1) is preferably further programmed to stretch or compress other selected portions of the image so that other selected, known image elements in the image appear closer to how they would appear if the image was not distorted. For example, the microcontroller 18 may carry out an edge detection routine to determine where the edge of the bumper appears in the image. Alternatively, testing can be carried out on the camera to manually determine where the bumper is in the image. Once the edge of the bumper is located either manually or by use of an edge detection routine, values can be determined to use to compress or stretch vertically extending portions (ie. strips) above an below the edge of the bumper to adjust the position of the edge of the bumper so that it more closely matches a selected shape (ie. so that it more closely matches the shape it should have if the image were not distorted). It will be understood that the ‘selected shape’ of the bumper edge may be a horizontal line if the bumper has a rear edge that is straight. However, the selected shape may be a curve since many vehicle bumpers have rear edges that are curved.
Aside from reducing the amount of warping in the portions of the image containing the bumper and the horizon line, the microcontroller 18 can also modify the image in a way to make vertical elements of the image appear approximately vertical. These digital distortion correction steps can take place in a selected order. For example, the first step can be to straighten the vehicle bumper. A second step can be to straighten the horizon line. A third step can be to straighten vertical objects.
In embodiments or applications wherein other artifacts are always in the image received by the camera 10, these artifacts may be used to determine the image modification that can be carried out by the microcontroller 18 to at least straighten out portions of the image that show the artifacts.
As shown in FIG. 5c, the combination of digital distortion correction and optical distortion correction reduces the amount of overall distortion in the image sent by the camera to an in-vehicle display.
In addition to the distortion correction, the microcontroller 18 is preferably capable of providing a plurality of different image types. For example, the microcontroller 18 can provide a standard viewing mode which gives an approximately 135 degree field of view horizontally, a ‘cross-traffic’ viewing mode which gives an approximately 180 degree field of view horizontally, and a bird's eye viewing mode, which gives a view that appears to be from a camera that is spaced from the vehicle and is aimed directly downwards. The standard viewing mode (with optical and digital distortion correction) is shown in FIG. 5c. 
The cross-traffic viewing mode is shown in FIG. 6. The cross-traffic viewing mode provides a view of the regions behind to the left and behind to the right of the vehicle, so that a driver can determine, for example, whether it is safe to back out of a parking spot in a parking lot. The cross-traffic view provides the driver with an approximately 180 degree view. This permits the driver to see to the left of the vehicle, to the right of the vehicle and directly behind the vehicle all at once. The digital dewarping (ie. the digital distortion correction) that is carried out by the microcontroller 18 (FIG. 1) for the cross-traffic view is different than the digital dewarping that is carried out for the standard view.
It will be understood that, in order to provide the cross-traffic viewing mode, the lens 22 (FIG. 1) is constructed to have a field of view of approximately 180 degrees horizontally (ie. it is a 180 degree lens). That same lens 22 is also used when the camera provides the standard viewing mode with the 135 degree field of view. Accordingly, the standard viewing mode involves cropping portions of the image taken by the 180 degree lens 22.
While a 180 degree lens 22 is preferable for the camera 10, it is alternatively possible for the lens 22 to be a 135 degree lens. In such a case, the camera 10 would not provide a cross-traffic viewing mode.
The bird's eye viewing mode (FIG. 7) can be provided by compressing selected portions of the image and expanding other portions of it, thereby moving the apparent viewpoint of the camera 10.
The bird's eye viewing mode can be used, for example, to assist the driver when backing up the vehicle to connect it to a trailer hitch. The bird's eye viewing mode provides a view that appears to come from a viewpoint that is approximately directly above the tow ball on the vehicle. This viewing mode is discussed further below.
In addition to providing a plurality of viewing modes, the camera 10 is preferably capable of providing graphical overlays on the images prior to the images being sent from the camera 10 to an in-vehicle display. Preferably, the camera 10 can provide both static overlays and dynamic overlays. Static overlays are overlays that remain constant in shape, size and position on the image. An example of a static overlay is shown at 36 in FIG. 8. The static overlay 36 shown in FIG. 8 provides information regarding the width of the vehicle and rough distance information behind the vehicle.
Many different types of dynamic overlay can be provided for many different functions. A first example of a dynamic overlay is shown at 38 in FIG. 9. The dynamic overlay 38 shows the vehicle's projected path based on the current steering wheel angle of the vehicle. It will be noted that the overlay 38 may have a selected degree of transparency, so that the image behind it shows through and is thus not completely obscured.
Another example of a dynamic overlay is shown at 40 in FIG. 10. The overlay 40 shows the projected path of the tow ball of the vehicle based on the vehicle's current steering angle. This overlay 40 gives the driver useful information when backing the vehicle up to align the tow ball shown at 42 with a hitch (not shown). It will be noted that the camera 10 is operating in a hitch viewing mode to provide the image shown in FIG. 10. The hitch viewing mode incorporates the bird's eye viewing mode, along with a digital zoom function that provides the driver with a magnified view of the tow ball 42 and its immediate surroundings. This view, combined with the overlay 40 gives the driver detailed information so that the driver can align the tow ball 42 with a hitch relatively precisely. It will be understood that the tow ball could alternatively be any other type of towing device.
Another application of the camera 10 that combines the features of overlays and the bird's eye viewing mode is in a 360 degree view system, an example of which is shown at 50 in FIG. 11. The 360 degree view system 50 includes four cameras 10, including a front camera 10a, a rear camera 10b, a driver's side camera 10c and a passenger side camera 10d, and a central controller 52. Each of the cameras 10a, 10b, 10c and 10d can be operated in a bird's eye viewing mode and can provide images to the central controller 52. The central controller 52 can then put together an image shown in FIG. 12, with a static overlay 54 which would be a representation of a top view of the vehicle along with the four bird's eye views shown at 56 and individually 56a, 56b, 56c and 56d from the four cameras 10 (FIG. 11). The bird's eye views 56a, 56b, 56c and 56d are preferably merged together into a single image 58 without any seam lines where one view 56 mates with another.
Because the cameras 10 are each capable of dewarping the images they receive, and of processing the images to provide a bird's eye view, and of adding graphic overlays on the images, the cameras 10 can be used for all of these functions and the processed images produced by the cameras 10 and be sent to the central controller 52 using inexpensive electrical cables, such as shielded twisted (or untwisted) pair cables, shown schematically in FIG. 11 at 60. These electrical cables 60, in addition to being relatively inexpensive are also relatively flexible, making them easy to route through the vehicle between the cameras 10 and the central controller 52.
By contrast, if such as a system were provided with cameras that were not themselves equipped with sufficiently powerful on-board microcontrollers 18 to carry out the aforementioned functions, the functions would have to be carried out externally, eg. by the central controller 52. In such a situation, the raw images received by the cameras 10 would have to be sent to the central controller 52 for processing. A relatively great amount of care would need to be taken to ensure that the raw images were transmitted to the central controller 52 in relatively pristine condition, since the processing of the images will result in some degradation of the images. In order to minimize the degradation of the images in their transmission from the cameras to the central controller, the electrical cables and any connectors could be relatively expensive (eg. coaxial cable). In addition, the electrical cables could be relatively inflexible and difficult to route through the vehicle.
Reference is made to FIG. 1. Because the camera 10 has the capability of applying graphic overlays to the image using the on-board microcontroller 18, the overlays can be aligned to the optical axis of the lens 22 before the camera 10 leaves the assembly facility. The camera 10 may be held in a fixture that is itself positioned at a known position relative to a selected reference pattern, shown at 62 in FIG. 13. When in the fixture, the image received by the camera's imager 16 is sent to an external controller (not shown). The external controller compares the image received from the camera 10 with the image that would have been received if the center of the imager 16 (FIG. 2) were precisely aligned with the optical axis of the lens 22 (FIG. 1). The offset between the actual and theoretically perfect images indicates the amount of offset present between the optical axis of the lens 22 and the center of the imager 16. This offset provides the camera 10 with an offset value to apply to certain types of overlays when they are provided on the image, such as the static overlay 36 shown in FIG. 8, the dynamic overlay 38 shown in FIG. 9, and the dynamic overlay 40 shown in FIG. 10. By aligning the overlay to the optical axis of the lens 22, a source of error in the positioning of the overlays is eliminated.
Reference is made to FIG. 14, which shows a trailer 64 with a target shown at 66. The microcontroller 18 is capable of identifying selected target shapes in images received on the imager 16. In the embodiment shown in FIG. 14, the target is a cross. With the trailer 64 positioned directly behind the vehicle (ie. at a zero angle relative to the vehicle), the driver 10 can instruct the camera 10 to enter a ‘trailer’ mode, wherein the microcontroller 18 finds the center of the target 66. Once found, the microcontroller 18 applies an overlay shown at 68 to the image of the target 66. The overlay 68 may be a spot that appears at the center of the target 66. As the driver backs up the vehicle, the target 66 will shift in the image transmitted from the camera 10 to the in-vehicle display, but the overlay 68 is held in a fixed position, and thus the driver will see an offset between the overlay 68 and the center of the target 66 depending on the angle between the trailer 64 and the vehicle. By steering the vehicle so that the overlay 68 remains at the center of the target 66, the driver can back the vehicle up keeping the trailer 64 and the vehicle aligned. It will be understood that the overlay 68 need not be a dot and need not be at the centre of the target 66. The system will be useful even if the overlay 68 is near the target 66 but not covering the target 66. Thus, the overlay 68 can be used if it is proximate the target 66 (ie. sufficiently close to the target 66 or covering some or all of the target 66 that relative movement between the target 66 and the overlay 68 is noticeable by the driver of the vehicle).
Reference is made to FIG. 15, which shows a schematic illustration of a camera system 200 that provides obstacle detection to the driver of the vehicle. The camera system 200 includes the camera 10, a camera processor 202, a distance sensor system 204, a distance sensor processor 206, a fusion controller 208, an overlay generator 210 and a Human/Machine Interface (HMI) 212. The camera 10 as described receives a first image on the imager 14 (FIG. 1). The first image has a first resolution that depends on the resolution of the imager 14. For a typical application, the resolution is preferably 640×480 pixels. The first image itself does not contain any explicit distance information regarding the distances of objects behind the vehicle, however, the camera processor 202 is configured to process the first image to detect objects of interest in the first image (eg. people, animals, other vehicles) and to determine whether such objects of interest represent a collision risk.
The distance sensor system 204 preferably includes an infrared time-of-flight sensor 214 (which may be referred to as a TOF sensor) and a plurality of light sources 216. The light sources 216 emit modulated light, which reflects off any objects behind the vehicle. The reflected light is received by an imager 218 that is part of the TOF sensor 214. The image that is formed on the imager 218 is a greyscale image, which may be referred to as a second image. The second image has a second image resolution that depends on the resolution of the imager 218. In a typical application, the second image resolution will be lower than the resolution of the first image with the camera 10. The first and second images may be processed by the fusion controller 208 to generate a stereo image, which provides the fusion controller 208 with depth information relating to objects in the two images. The fusion controller 208 uses the depth information to determine if any objects behind the vehicle represent a collision risk, in which case the fusion controller 208 determines what action, if any, to take. One action that can be taken is for the fusion controller 208 to send a signal to a vehicle control system (shown at 219) to apply the parking brake, or the regular vehicle brakes or to prevent their release. Additionally, the fusion controller 208 communicates with the overlay generator 210 to apply an overlay on the image warning the driver of the object or objects that represent a collision risk. The overlay could, for example be a box around any such objects in the image. The overlay generator 210 may communicate the overlay information back to the camera 10, which then sends the image with the overlay to the in-vehicle display, shown at 220, which makes up part of the HMI 212. The rest of the HMI may be made up of a touch screen input 221 that is superimposed on the display 220. In order to override the system 200 and release the applied brake, the driver can interact with the HMI 212 to press a selected on-screen button to indicate to the system 200 that the objects have been seen and the driver does not feel that they represent a collision risk, at which time the system 200 can release the applied brake. In addition to the overlay, the driver of the vehicle can be notified of a collision risk by way of sound (eg. a chime, a beep or a voice message) or by way of tactile feedback, such as by vibration of the steering wheel or seat.
Additionally, the image received by the imager 218 can be processed by the distance sensor processor 106 to determine the phase shift of the light at each pixel on the imager 218. The phase shift of the light is used to determine the distance of the surface that reflected the light to the TOF sensor 214. Thus, the distance sensor processor 206 can generate a depth map relating to the image. Optionally, the distance sensor processor 206 processes the pixels in groups and not individually. For example, the processor 206 may obtain average phase shift data from groups of 2×2 pixels. Thus, the depth map has a third resolution that is lower than the second image resolution.
The depth map is sent to the fusion controller 208, which can interpret it to determine if any objects shown therein represent a collision risk. The fusion controller 208 preferably works with both the depth map and the camera image to improve the determination of whether detected objects are collision risks. For example, the fusion controller 208 may determine from the depth map, that there is an object that is within 2 meters from the vehicle towards the lower central portion of the depth map. However, the fusion controller 208 may determine from the camera processor 202 that the object in that region is a speed bump, in which case the fusion controller 208 may determine that this does not represent a collision risk and so the system 200 would not warn the driver, and would not apply the brake.
In different situations, the fusion controller 208 gives greater weight to the information from either the depth map or the camera image. For example, for objects that are farther than 3 meters away, the fusion controller 208 gives greater weight to information from the camera 10 and the camera processor 202. For objects that are closer than 3 meters (or some other selected distance) away, the fusion controller 208 gives greater weight to information from the distance sensor 204 and the distance sensor processor 206.
The camera processor 202 is configured to recognize certain types of object in the images it receives from the camera 10, such as an adult, a child sitting, a toddler, a vehicle, a speed bump, a child on a bicycle, tall grass, fog (eg. fog from a sewer grating or a manhole, or fog from the exhaust of the vehicle itself). In some situations, the fusion controller 208 determines whether there is movement towards the vehicle by any objected in the images it receives. In some situations, when the fusion controller 208 determines from the depth map that an object is too close to the vehicle, it uses information from the camera processor 202 to determine what the object is. This assists the fusion controller 208 in determine whether the object is something to warn the driver about (eg. a child, or a tree), or if it is something to be ignored (eg. exhaust smoke from the vehicle itself, or a speed bump). Additionally, this information can also be used by the overlay generator 210 to determine the size and shape of the overlay to apply to the image. It will be understood that some of the elements recognized by the camera processor 202 belong to a category containing objects of interest, such as the adult, the child sitting, the toddler, the vehicle and the child on the bicycle. Other elements recognized by the camera processor 202 may belong to a category of elements that do not represent a collision risk, such as, a speed bump, tall grass and fog.
After the TOF sensor 214 and the camera 10 are installed on the vehicle, a calibration procedure is preferably carried out. The calibration procedure includes displaying an image with high contrast elements on it, at a selected distance from the vehicle, at a selected position vertically and laterally relative to the vehicle. The image can be for example, a white rectangle immediately horizontally adjacent a black rectangle. The fusion controller 208 determines the relative positions of the mating line between the two rectangles on the two imagers 16 and 218. During use of the camera system 200 this information is used by the fusion controller 208 to determine the distances of other objects viewed by the camera 10 and the TOF sensor 214. The calibration procedure could alternatively be carried out using a checkerboard pattern of four or more rectangles so that there are vertical and horizontal mating lines between rectangles.
Throughout this disclosure the term imager and image processor have been used. These terms both indicate a device that includes an image sensor and some control elements. The microcontroller and the portion of the imager including the control elements together make up a ‘controller’ for the camera. It will be understood that in some embodiments, and for some purposes the control of the camera need not be split into the control elements in the imager and the microcontroller that is external to the imager. It will be understood that the term ‘controller’ is intended to include any device or group of devices that control the camera.
While the above description constitutes a plurality of embodiments of the present invention, it will be appreciated that the present invention is susceptible to further modification and change without departing from the fair meaning of the accompanying claims.

## Claims

1. A vehicular camera system, comprising:
a rear backup camera comprising a lens and having a field of view that encompasses a rear bumper of a vehicle equipped with said vehicular camera system;
wherein said rear backup camera comprises an image sensor and a housing;
wherein the lens and the image sensor are mounted within the housing at a selected position relative to each other, and wherein the image sensor receives raw images from the lens and captures image data;
a controller, wherein for at least one raw image, the controller is operable to (i) compare captured image data of the rear bumper present in the field of view of said rear backup camera to a known shape of the rear bumper of the vehicle, (ii) responsive to the comparison, determine a distortion correction that is indicative of distortion of the rear bumper in the raw image relative to the known shape of the rear bumper and (iii) apply the distortion correction to the raw image to generate a dewarped image by stretching and compressing portions of the raw image so that the rear bumper in the dewarped image corresponds to the known shape of the rear bumper;
a display screen disposed in the vehicle and operable to display dewarped images for viewing by a driver of the vehicle while the driver is operating the vehicle;
wherein the controller is operable to identify a portion of a trailer in the captured image data and, responsive at least in part to identifying the portion of the trailer, is further operable to determine the position of the portion of a trailer in the field of view of the rear backup camera and rearward of the vehicle, and wherein the controller, responsive to the determined position of the portion of the trailer, is operable to apply a first overlay at the portion of the trailer in a first displayed dewarped image to produce an initial displayed dewarped image, and wherein the controller is operable to thereafter maintain the first overlay in a fixed position in subsequent displayed dewarped images, and wherein the portion of the trailer in subsequent displayed dewarped images is movable relative to the first overlay; and
wherein the controller, responsive at least in part to processing of captured image data, is operable to display a second overlay in displayed dewarped images, and wherein the controller is operable to thereafter move the second overlay in subsequent displayed dewarped images relative to the fixed first overlay as the vehicle is driven to assist the driver of the vehicle in reversing the vehicle towards the trailer.

2. A vehicular camera system as claimed in claim 1, wherein the lens has an optical axis,
wherein the rear backup camera is mounted to a vehicle in such a way that a horizon line in the field of view of the lens approximately intersects the optical axis of the lens,
and wherein the portions of the raw image stretched and compressed are vertically extending portions of the raw image above and below the horizon line in the raw image to at least partially straighten out the horizon line appearing in the displayed dewarped image.

3. A vehicular camera system as claimed in claim 2, wherein the lens has approximately a 180 degree field of view horizontally, and has a first viewing mode and a second viewing mode,
wherein in the first viewing mode dewarped images are sent to a display in the vehicle showing approximately 180 degrees of the field of view horizontally, and the controller is operable to stretch and compress portions of the raw image using first values so that the rear bumper in the dewarped image corresponds to the known shape of the rear bumper,
and wherein in the second viewing mode images are sent to a display in the vehicle showing less of the field of view horizontally than in the first viewing mode, and the controller is operable to stretch and compress portions of the raw image using second values so that the rear bumper in the dewarped image corresponds to the known shape of the rear bumper.

4. A vehicular camera system as claimed in claim 3, wherein in the second viewing mode dewarped images are sent to a display in the vehicle showing approximately 135 degrees of the field of view horizontally.

5. A vehicular camera system as claimed in claim 2, wherein the rear backup camera has a first viewing mode and a second viewing mode,
wherein in the first viewing mode dewarped images are sent to said display screen in the vehicle showing a field of view horizontally, and the controller is operable to stretch and compress portions of the raw image using first values so that the rear bumper in the dewarped image corresponds to the known shape of the rear bumper,
and wherein in the second viewing mode images are sent to said display screen in the vehicle showing a second field of view that is less of the field of view horizontally than in the first viewing mode, and the controller is operable to stretch and compress portions of the raw image using second values so that the rear bumper in the dewarped image corresponds to the known shape of the rear bumper.

6. A vehicular camera system as claimed in claim 1, wherein the known shape of the rear bumper comprises an edge of the rear bumper on the vehicle.

7. A vehicular camera system as claimed in claim 1, wherein the lens has approximately a 180 degree field of view horizontally.

8. A vehicular camera system as claimed in claim 1, wherein the lens has approximately a 135 degree field of view horizontally.

9. A vehicular camera system as claimed in claim 1, wherein the image sensor is part of an imager, and the controller is made up of a portion of the imager and a microcontroller that is external to the imager.

10. A vehicular camera system as claimed in claim 9, wherein the microcontroller contains flash memory, wherein the microcontroller is connected to an image processor by a first bus through which command data is communicated to the image processor from the microcontroller, wherein the command data includes application instructions to draw application data from a selected point in the flash memory, and wherein the microcontroller is connected to the image processor by a second bus through which application data is communicated to the image processor from the flash memory.

11. A vehicular camera system as claimed in claim 10, wherein the first bus is an inter-integrated circuit bus, and the second bus is a serial peripheral interface bus.

12. A vehicular camera system as claimed in claim 10, wherein the command data includes data relating to an overlay, and wherein the microcontroller is operable to send position data to the image processor relating to a position at which to apply the overlay to one or more displayed images.

13. A vehicular camera system as claimed in claim 10, wherein the microcontroller is operable to calculate at least one of the size and shape of an overlay and to transmit data relating to the overlay to the image processor for the image processor to apply to one or more displayed images.

14. A vehicular camera system as claimed in claim 1, wherein the vehicular camera system is for a vehicle having a towing device.

15. A vehicular camera system as claimed in claim 14, wherein the controller is operable to modify at least one raw image to produce a processed image, and wherein the rear backup camera is positioned at an actual viewing angle such that the towing device is in the field of view of the lens, and wherein the rear backup camera has a bird's eye viewing mode in which the controller is operable to modify the raw image so that the processed image, when displayed on said display screen, appears to have been taken at an apparent viewing angle that is more vertically oriented than the actual viewing angle.

16. A vehicular camera system as claimed in claim 15, wherein the controller is operable to compress a lower portion of the raw image and stretch an upper portion of the raw image so that the apparent viewing angle is more vertically oriented than the actual viewing angle.

17. A vehicular camera system as claimed in claim 15, wherein the rear backup camera has a hitch viewing mode in which the processed image, when displayed on said display screen, appears to have been taken at an apparent viewing angle that is more vertically oriented than the actual viewing angle, and in which the towing device in the displayed processed image is magnified to a magnification level that is greater than a magnification level provided in the bird's eye viewing mode.

18. A vehicular camera system as claimed in claim 15, wherein the controller is operable to determine a projected trajectory for the vehicle and is operable to apply a projected trajectory overlay to the displayed processed image containing a representation of the projected trajectory.

19. A vehicular camera system as claimed in claim 18, wherein the controller is operable to apply at least one indicator of distance from the towing device to displayed images.

20. A vehicular camera system as claimed in claim 1, wherein the controller is operable to move the second overlay relative to the first overlay to indicate to the driver of the vehicle when the trajectory of the vehicle has changed to assist the driver of the vehicle in driving the vehicle towards the trailer.

21. A vehicular camera system as claimed in claim 1, wherein said controller is operable to determine the presence of a feature of a hitch portion of a trailer behind the vehicle and wherein the controller is operable to move the second overlay relative to the first overlay to indicate to the driver of the vehicle when the trajectory of the vehicle has changed to assist the driver of the vehicle in reversing the vehicle towards the hitch portion of the trailer.

22. A vehicular camera system as claimed in claim 21, wherein the image sensor is part of an imager and the controller is made up of a portion of the imager and a microcontroller that is external to the imager, and wherein the portion of the imager is operable to determine the position of the feature of the hitch portion in the field of view of the lens, and wherein the microcontroller is operable to receive from the imager a position indicator indicating the position of the feature of the hitch portion, wherein the microcontroller and the portion of the imager are together operable to apply the first overlay at the portion of the trailer in the first image to produce the initial image and to thereafter maintain the first overlay in the fixed position in subsequent displayed images regardless of movement of the portion of the trailer in subsequent captured images.

23. A vehicular camera system as claimed in claim 1, wherein the known shape of the rear bumper comprises a known generally horizontal edge of the rear bumper and wherein said controller applies the distortion correction to straighten a curved edge of the rear bumper in the raw image so the edge of the rear bumper in the dewarped image corresponds to the known generally horizontal edge of the rear bumper.

24. A vehicular camera system as claimed in claim 1, wherein the known shape of the rear bumper comprises a known generally vertical edge of the rear bumper and wherein said controller applies the distortion correction to straighten a curved edge of the rear bumper in the raw image so the edge of the rear bumper in the dewarped image corresponds to the known generally vertical edge of the rear bumper.