Abstract
We propose a method for removing view-disturbing waterdrops from images by processing images taken with a pan-tilt camera system. Images that are taken on rainy days are often hard to make out due to adherent waterdrops on the surface of the protecting lens. In our method, a first image of a distant view is taken and then a second image is taken from a different angle. The new image is transformed with the projective transformation and compared with the first one to identify the regions with waterdrops. We can distinguish which image portion has waterdrops by considering the distance between two potential waterdrop regions. Finally, the region with waterdrops can be eliminated by merging two images. Experimental results showed the effectiveness of this method.
What Problem Does This Paper Address?
Outdoor surveillance cameras often struggle in bad weather. While researchers have developed robust algorithms to handle changing light or moving clouds, physical obstructions like waterdrops on the protective glass are a different beast.
Because waterdrops are stuck to the lens, they remain stationary in the image frame even if the background is static. This makes them nearly impossible to distinguish from the background using standard "background subtraction" techniques. To a computer, a blurry raindrop looks like a permanent part of the scenery. Previous solutions involved using multiple cameras (expensive and hard to calibrate) or complex image "inpainting" (which often looks unnatural). The authors wanted a way to solve this using a single, standard pan-tilt camera.
Methods
The authors propose a six-step pipeline to clean up the image:
- Image Acquisition: The camera takes one photo, rotates by a small angle ($\theta$), and takes a second photo.
- Alignment (Projective Transformation): Since the camera only rotates and the scene is distant, the authors use projective transformation to warp the second image so its background perfectly matches the first.
- Color Matching: To account for slight changes in lighting between the two shots, they perform a color-space normalization across different brightness levels.
- Candidate Extraction: By subtracting the two aligned images, the system finds areas that don't match. Since the backgrounds are aligned, these "mismatches" are likely waterdrops.
- Waterdrop Discrimination: This is the "secret sauce." Because the authors know the rotation angle and the camera's focal length, they can predict exactly how far a waterdrop should appear to have moved relative to the background. If a candidate region matches this predicted shift, it's confirmed as a waterdrop.
- Removal and Merging: The "dirty" pixels in Image A are replaced with the "clean" pixels from the corresponding spot in Image B.
Key Insights and Ideas
- The Near-Far Disparity: The core "aha" moment is the realization that waterdrops are in the "near-field" (on the lens) while the scene is in the "far-field." When a camera rotates, the distant background moves in a predictable way that can be mathematically reversed, but the waterdrops stay fixed relative to the camera's sensor.
- Mathematical "Eraser": By rotating the camera, the background effectively "slides" behind the stationary waterdrop. This ensures that for almost every point obscured by a drop in the first image, there is a clear view of that same point in the second image.
- Geometric Constraints: The authors derived a specific constraint to determine the minimum rotation angle needed to ensure that waterdrops in the two images don't overlap, which would make restoration impossible.
Key Results
- High Success Rate: The method successfully removed 92.6% of waterdrop pixels in their test cases.
- Visual Clarity: Qualitative results show that even in areas where the waterdrop was large and blurry, the merged image restored sharp edges of the background objects (like buildings and windows).
- Robustness: The system proved effective even when lighting conditions changed slightly between the two shots, thanks to the color-matching step.
- Residuals: The remaining 7.4% of unremoved pixels were mostly in areas where the contrast between the waterdrop and the background was extremely low, making the drop nearly invisible to the subtraction algorithm anyway.
Limitations and Future Work
- Static Scenes Only: The current method assumes the background is stationary (distant static views). If a car drives through the scene while the camera is rotating, it might be mistaken for a waterdrop or cause ghosting artifacts.
- Processing Time: While simpler than multi-camera setups, the waterdrop discrimination step increases in complexity as the number of drops increases.
- Overlapping Drops: If the lens is so covered in water that drops overlap even after the camera rotates, the system cannot recover the background. The authors suggest that using three or more images from different angles could solve this.
- Automation: Future work involves automating the parameter settings (like the threshold for 2-value subtraction) which currently require some manual tuning.
Reference: Yamashita, A., Kaneko, T., Nishimura, M., & Miura, K. T. (2003). Restoration of Deteriorated Images in Contrary Weather by Changing the Camera Direction. The Journal of the Institute of Image Information and Television Engineers, 57(10), 1347-1353.
Summary updated