1. Field of the Invention
This invention relates generally to a system and method for detecting a sun-shade line on a object and, more particularly, to an active system and method for detecting a sun-shade line on a vehicle driver using a low cost camera so as to control the position of a sun blocker in response thereto.
2. Discussion of the Related Art
Most vehicles are equipped with a sun visor that can be selectively flipped down from a stored position if the vehicle is traveling into a low sun angle so that the driver is not staring directly into the sun. The sun visor is typically able to block the sun shining through the windshield, as well as through the windows. The sun visor makes the driving experience more pleasant, and also has an obvious safety value.
Systems have been developed in the art to automatically adjust the position of a sun blocker in response to a sun incident angle. For example, U.S. Pat. No. 6,811,201, titled, Automatic Sun Visor and Solar Shade System for Vehicles, issued Nov. 2, 2004 to Naik, discloses an automatic sun visor system for a vehicle that includes a light detecting apparatus for detecting sunlight incident on the face of an occupant of the vehicle. The system includes a microcontroller that adjusts the sun visor in response to the detected sunlight on the face of the vehicle driver.
Typically, the known GPS-based systems that attempt to automatically control the position of the sun blocker do not take into consideration the location of the vehicle drivers head, and thus drivers of different heights or who make different motions will typically not receive the full benefit of the position of the sun visor that was intended. These known systems were typically passive in nature in that they did not employ feedback to know whether the sun blocker was properly blocking the sun. Thus, it would desirable to provide an active sun visor system that detected a sun-shade line on the vehicle driver and position a sun blocker in response thereto where the system monitored the position of the sun-shade line as the driver and sun blocker move.
In accordance with the teachings of the present invention, a system and method are disclosed for identifying a sun-shade line on a vehicle driver's face so as to automatically position a sun blocker at the appropriate location to block the sun. The method includes generating subsequent images of the vehicle driver using a low cost camera and providing a difference image from the subsequent camera images to eliminate stationary parts of the image. The method then filters the difference image to enhance the expected motion from the controlled sun blocker and to remove the un-expected motion, such as from the vehicle driver in the horizontal direction, which generates a filter response image that includes an identification of the movement of the sun-shade line from image to image. The method then applies a threshold to the filter response image to remove portions of the filter response image that do not exceed a predetermined intensity, and performs a Hough transform on the thresholded filter response image to identify the sun-shade line on the object. The Hough transformed image is then sent to a false alarm mitigation and tracking process that removes line segments in the image that are too short to be the sun-shade line.
Additional features of the present invention will become apparent from the following description and appended claims, taken in conjunction with the accompanying drawings.
The following discussion of the embodiments of the invention directed to a system and method for identifying a sun-shade line on a vehicle driver and automatically positioning a sun blocker in response thereto is merely exemplary in nature, and is in no way intended to limit the invention or its applications or uses. For example, the present invention has specific application for moving a sun blocker in a vehicle. However, as will be appreciated by those skilled in the art, the invention may have application in other environments for detecting a sun-shade line.
The present invention is concerned with identifying the sun-shade line 22 in the images generated by the camera 26. The blocker 18 that forms the shadow 20 can be any blocker that is suitable for the purposes described herein. In one specific embodiment, the blocker 18 is part of the vehicle windshield or side windows, referred to in the industry as “smart glass.” For example, the smart glass can include electro-chromic portions in the windshield or side window that are responsive to electric signals that cause the electro-chromic portions to become opaque.
If the sun-shade line 22 is moving downward from one frame to the next, then the band 44 will create a negative difference in the filter response image 40 and if the sun-shade line 22 is moving upward from one frame to the next, then that band 44 will create a positive difference in the filtered response image 40. If the sun-shade line 22 moves downward from one image frame to the next, then the filter response image 40 is multiplied by a negative one to change the negative band 44 to a positive band 44 that is of a light shade in the filter response image 40 that can be detected. The light regions in the difference image 36 and the filter response image 40 are shown dark in
Generally, other vertical motions in the images from one frame to the next frame will include other lighter portions that are not the sun-shade line 22. Known technology in the art allows cameras to detect the face region of the vehicle driver 12. The cropped face region of the filter response image 40 is thus sent to a thresholding box 48 that removes the portions of the filter response image 40 that do not exceed a predetermined intensity threshold to remove at least some of those non-sun-shade line portions. As a result of the thresholding, the thresholded filter response image should mostly only include the strip 46 in the filtered response image 40 identifying the movement of the sun-shade line 22.
The thresholded filter response image is then sent to a Hough transform 50, discussed in more detail below, that identifies areas in the filter response image that form a line. Once lines are identified in the thresholded filter response image, the image it is sent to a false alarm mitigation and pixel tracking box 52 that identifies false sun-shade lines, such as short lines, in the filter response image 40 that cannot be the sun-shade line 22. If the filter response gets through the false alarm mitigation and tracking, then the remaining line identified by the Hough transform 50 is the sun-shade line as shown by line 56 in a resulting image 54. The false alarm mitigation and tracking eliminates short line segments, maintains the temporal smoothing of the detected line's position orientation between neighboring frames using tracking techniques, such as Kalman filtering, particle filtering, etc., and tracks the specific motion pattern from the sun blockers motion.
The Hough transform 50 is a technique for identifying lines in the filter response image 40. The algorithm parameterizes the lines in the image domain with two parameters, where parameter ρ represents the distance between a line and an origin and θ is the angle of the line, as shown in
Known technology in the art allows cameras to detect the eyes 24 of the vehicle driver 12 and by combining driver eye detection with the algorithm for detecting the sun-shade line 22 discussed above it can be determined whether that line is below the driver's eyes. If the sun-shade line 22 is not below the driver's eyes 24, then the controller 28 can adjust the blocker 18 to the appropriate location.
Although the discussion above concerns detecting the sun-shade line 22 to move the sun blocker 18, the same idea can be applied to other applications. These applications could include active detection that combines traditional passive sensor detection with active device control to detect the expected motion changes due to the controlled motion and drop the un-expected motion that is not related to the controlled motion as an additional cue to improve the object detection accuracy. One specific application would be to detect the position and angle of a robot arm using sensing techniques, such as camera vision, by matching the expected/controlled motion through sensors to provide suitable robot control.
The foregoing discussion discloses and describes merely exemplary embodiments of the present invention. One skilled in the art will readily recognize from such discussion and from the accompanying drawings and claims that various changes, modifications and variations can be made therein without departing from the spirit and scope of the invention as defined in the following claims.