SYSTEM AND METHOD FOR DETERMINING A VISIBILITY STATE
The present invention is generally directed to methods and systems of estimating visibility around a vehicle and automatically configuring one or more systems in response to the visibility level. The visibility level can be estimated by comparing two images of the vehicle's surroundings, each taken from a different perspective. Distance of objects in the images can be estimated based on the disparity between the two images, and the visibility level (e.g., a distance) can be estimated based on the farthest object that is visible in the images.
1 . A non-transitory computer readable storage medium storing instructions which, when executed by a vehicle including one or more processors, cause the vehicle to perform a method of estimating visibility around the vehicle, the method comprising the steps of:
receiving first image data and second image data from one or more image sensors mounted on the vehicle;
generating a disparity map between the first image data and the second image data; and
estimating a visibility level based on the disparity map between the first image data and the second image data.
2 . The non-transitory computer readable storage medium of claim 1 , the method further comprising the step of increasing the brightness of one or more lights of the vehicle in accordance with the estimated visibility level being below a predetermined threshold.
3 . The non-transitory computer readable storage medium of claim 1 , the method further comprising the step of activating one or more fog lights of the vehicle in accordance with the estimated visibility level being below a predetermined threshold.
4 . The non-transitory computer readable storage medium of claim 1 , the method further comprising the step of: disabling a driving assistance system in accordance with the estimated visibility level being below a predetermined threshold.
5 . The non-transitory computer readable storage medium of claim 1 , the method further comprising the step of reducing a confidence level of a driving assistance system in accordance with the estimated visibility level being below a predetermined threshold.
6 . The non-transitory computer readable storage medium of claim 1 , wherein the vehicle includes a stereo camera comprising a first image sensor and a second image sensor, the first image data is captured by the first image sensor, and the second image data is captured by the second image sensor.
7 . The non-transitory computer readable storage medium of claim 6 , the method further comprising the step of generating a depth map based on the disparity map and a baseline distance, wherein said baseline distance is a distance between the first and the second image sensor, and wherein the estimated visibility level is based on the generated depth map.
8 . The non-transitory computer readable storage medium of claim 1 , wherein the vehicle include a first image sensor, and both the first and second image data are captured by the first image sensor.
9 . The non-transitory computer readable storage medium of claim 8 , the method further comprising the steps of:
determining a speed of the vehicle;
computing a baseline distance based on the speed of the vehicle and a time difference between the first image data and the second image data; and
generating a depth map based on the disparity map and the baseline distance, wherein the estimated visibility level is based on the generated depth map.
10 . The non-transitory computer readable storage medium of claim 1 , the method further comprising the steps of:
detecting a first edge in the first image data;
determining a property of the first edge in the first image data;
in accordance with the property of the first edge not exceeding a predetermined threshold, generating the disparity map; and
in accordance with the property of the first edge exceeding the predetermined threshold, forgoing generation of the disparity map.
11 . The non-transitory computer readable storage medium of claim 1 , the method further comprising the steps of:
generating a depth map based on the disparity map; and
determining a first density of pixels at a first distance in the depth map, wherein the estimated visibility level is based on the first density of pixels at the first distance in the depth map.
12 . The non-transitory computer readable storage medium of claim 11 , the method further comprising the steps of:
determining a second density of pixels at a second distance in the depth map;
wherein the estimated visibility level is based on the first distance in the depth map in accordance the first density exceeding a predetermined density threshold;
wherein the estimated visibility level is based on the second distance in the depth map in accordance with the second density exceeding the predetermined density threshold and the first density not exceeding the predetermined density threshold.
13 . A vehicle, comprising:
one or more processors;
one or more image sensors
a memory storing one or more instructions which, when executed by the one or more processors, cause the vehicle to perform a method of estimating visibility around the vehicle, the method comprising the steps of:
receiving first image data and second image data from the one or more image sensors mounted on the vehicle;
generating a disparity map between the first image data and the second image data; and
estimating a visibility level based on the disparity map between the first image data and the second image data.
14 . The vehicle of claim 13 , the method further comprising the step of increasing the brightness of one or more lights of the vehicle in accordance with the estimated visibility level being below a predetermined threshold.
15 . The vehicle of claim 13 , the method further comprising the step of activating one or more fog lights of the vehicle in accordance with the estimated visibility level being below a predetermined threshold.
16 . The vehicle of claim 13 , the method further comprising the step of disabling a driving assistance system in accordance with the estimated visibility level being below a predetermined threshold.
17 . The vehicle of claim 13 , the method further comprising the step of reducing a confidence level of a driving assistance system in accordance with the estimated visibility level being below a predetermined threshold.
18 . The vehicle of claim 13 , wherein the the vehicle includes a stereo camera comprising a first image sensor and a second image sensor, wherein the first image data is captured by the first image sensor, and the second image data is captured by the second image sensor.
19 . The vehicle of claim 18 , wherein the first image sensor is a baseline distance from the second image sensor, and wherein the method further comprising the step of generating a depth map based on the disparity map and the baseline distance, wherein the estimated visibility level is based on the generated depth map.
20 . The vehicle of claim 13 , wherein the vehicle include a first image sensor, and both the first and second image data are captured by the first image sensor.
21 . The vehicle of claim 20 , the method further comprising the steps of:
determining a speed of the vehicle;
computing a baseline distance based on the speed of the vehicle and a time difference between the first image data and the second image data; and
generating a depth map based on the disparity map and the baseline distance, wherein the estimated visibility level is based on the generated depth map.
22 . The vehicle of claim 13 , the method further comprising the steps of:
detecting a first edge in the first image data;
determining a property of the first edge in the first image data;
in accordance with the property of the first edge not exceeding a predetermined threshold, generating the disparity map; and
in accordance with the property of the first edge exceeding the predetermined threshold, forgoing generation of the disparity map.
23 . The vehicle of claim 13 , the method further comprising the steps of:
generating a depth map based on the disparity map; and
determining a first density of pixels at a first distance in the depth map, wherein the estimated visibility level is based on the first density of pixels at the first distance in the depth map.
24 . The vehicle of claim 23 , the method further comprising the steps of:
determining a second density of pixels at a second distance in the depth map;
wherein the estimated visibility level is based on the first distance in the depth map in accordance the first density exceeding a predetermined density threshold;
wherein the estimated visibility level is based on the second distance in the depth map in accordance with the second density exceeding the predetermined density threshold and the first density not exceeding the predetermined density threshold.