Removing Shadows from Images

Similar documents
Abstract. 1. Introduction

Multispectral Image Invariant to Illumination Colour, Strength, and Shading

An Algorithm to Determine the Chromaticity Under Non-uniform Illuminant

Computational Photography and Video: Intrinsic Images. Prof. Marc Pollefeys Dr. Gabriel Brostow

HOW USEFUL ARE COLOUR INVARIANTS FOR IMAGE RETRIEVAL?

Supplementary Material: Specular Highlight Removal in Facial Images

An ICA based Approach for Complex Color Scene Text Binarization

Estimating the wavelength composition of scene illumination from image data is an

Color Constancy from Illumination Changes

Illumination Estimation Using a Multilinear Constraint on Dichromatic Planes

Shadow detection and removal from a single image

Mobile Human Detection Systems based on Sliding Windows Approach-A Review

Improvements to Gamut Mapping Colour Constancy Algorithms

Video-Based Illumination Estimation

Illuminant-Invariant Model-Based Road Segmentation

Physics-based Vision: an Introduction

CS 231A Computer Vision (Fall 2012) Problem Set 3

NOVEL METHODS FOR EXTRACTING ILLUMINATION-INVARIANT IMAGES AND FAST CLASSIFICATION OF TEXTURES

CS 223B Computer Vision Problem Set 3

A Survey of Light Source Detection Methods

Module 6: Pinhole camera model Lecture 32: Coordinate system conversion, Changing the image/world coordinate system

HISTOGRAMS OF ORIENTATIO N GRADIENTS

COLOR FIDELITY OF CHROMATIC DISTRIBUTIONS BY TRIAD ILLUMINANT COMPARISON. Marcel P. Lucassen, Theo Gevers, Arjan Gijsenij

Light-Invariant Fitting of Active Appearance Models

Shadow Removal from a Single Image

then assume that we are given the image of one of these textures captured by a camera at a different (longer) distance and with unknown direction of i

Local Linear Models for Improved von Kries Adaptation

Material-Based Object Segmentation Using Near-Infrared Information

A Novel Approach for Shadow Removal Based on Intensity Surface Approximation

Accurate and Dense Wide-Baseline Stereo Matching Using SW-POC

CS 231A Computer Vision (Winter 2014) Problem Set 3

Part-Based Skew Estimation for Mathematical Expressions

MULTISPECTRAL AND HYPERSPECTRAL IMAGES INVARIANT TO ILLUMINATION

An ICA-Based Multivariate Discretization Algorithm

Illumination-Robust Face Recognition based on Gabor Feature Face Intrinsic Identity PCA Model

Color and Shading. Color. Shapiro and Stockman, Chapter 6. Color and Machine Vision. Color and Perception

JPEG compression of monochrome 2D-barcode images using DCT coefficient distributions

Diagonal versus affine transformations for color correction

Metric Structure from Motion

EE368 Project Report CD Cover Recognition Using Modified SIFT Algorithm

Motion Estimation. There are three main types (or applications) of motion estimation:

Human Action Recognition Using Independent Component Analysis

3D Reconstruction of a Hopkins Landmark

Human Motion Detection and Tracking for Video Surveillance

arxiv: v1 [cs.cv] 28 Sep 2018

CHAPTER 9. Classification Scheme Using Modified Photometric. Stereo and 2D Spectra Comparison

A Colour Constancy Algorithm Based on the Histogram of Feasible Colour Mappings

Specular Reflection Separation using Dark Channel Prior

Spectral Images and the Retinex Model

Computer Vision Lecture 17

Computer Vision Lecture 17

Machine learning based automatic extrinsic calibration of an onboard monocular camera for driving assistance applications on smart mobile devices

An Overview of Matchmoving using Structure from Motion Methods

Reconstruction of Images Distorted by Water Waves

HOUGH TRANSFORM CS 6350 C V

Simultaneous surface texture classification and illumination tilt angle prediction

The Detection of Faces in Color Images: EE368 Project Report

Experimentation on the use of Chromaticity Features, Local Binary Pattern and Discrete Cosine Transform in Colour Texture Analysis

ROBUST LINE-BASED CALIBRATION OF LENS DISTORTION FROM A SINGLE VIEW

Real-Time Human Detection using Relational Depth Similarity Features

Self Lane Assignment Using Smart Mobile Camera For Intelligent GPS Navigation and Traffic Interpretation

How to Compute the Pose of an Object without a Direct View?

Character Recognition

AN IMAGE BASED SYSTEM TO AUTOMATICALLY

Low Cost Motion Capture

Rotation and Scaling Image Using PCA

Applying Synthetic Images to Learning Grasping Orientation from Single Monocular Images

Computationally Efficient Serial Combination of Rotation-invariant and Rotation Compensating Iris Recognition Algorithms

Local invariant features

Salient Region Detection and Segmentation in Images using Dynamic Mode Decomposition

Color Constancy from Hyper-Spectral Data

Robust color segmentation algorithms in illumination variation conditions

Determination of 3-D Image Viewpoint Using Modified Nearest Feature Line Method in Its Eigenspace Domain

Eugene Borovikov. Human Head Pose Estimation by Facial Features Location. UMCP Human Head Pose Estimation by Facial Features Location

A Comparison of Computational Color Constancy Algorithms; Part Two: Experiments with Image Data

PCA and KPCA algorithms for Face Recognition A Survey

Generalized Hough Transform, line fitting

Removing Shadows From Images using Retinex

METRIC PLANE RECTIFICATION USING SYMMETRIC VANISHING POINTS

An Efficient Need-Based Vision System in Variable Illumination Environment of Middle Size RoboCup

Practical Camera Auto-Calibration Based on Object Appearance and Motion for Traffic Scene Visual Surveillance

Flexible Calibration of a Portable Structured Light System through Surface Plane

Features Points. Andrea Torsello DAIS Università Ca Foscari via Torino 155, Mestre (VE)

SELECTION OF A MULTIVARIATE CALIBRATION METHOD

Level lines based disocclusion

An explicit feature control approach in structural topology optimization

Segmentation and Tracking of Partial Planar Templates

2003 Steve Marschner 7 Light detection discrete approx. Cone Responses S,M,L cones have broadband spectral sensitivity This sum is very clearly a dot

Simultaneous Vanishing Point Detection and Camera Calibration from Single Images

Projective Geometry and Camera Models

NOVEL PCA-BASED COLOR-TO-GRAY IMAGE CONVERSION. Ja-Won Seo and Seong Dae Kim

Hypothesis Generation of Instances of Road Signs in Color Imagery Captured by Mobile Mapping Systems

A New Color Constancy Algorithm Based on the Histogram of Feasible Mappings

Exploring Curve Fitting for Fingers in Egocentric Images

Shadow Resistant Road Segmentation from a Mobile Monocular System

SYDE Winter 2011 Introduction to Pattern Recognition. Clustering

Angular Error /Degrees. Angular Error /Degrees Number of Surfaces

Perception and Action using Multilinear Forms

This blog addresses the question: how do we determine the intersection of two circles in the Cartesian plane?

Estimating normal vectors and curvatures by centroid weights

Transcription:

Removing Shadows from Images Zeinab Sadeghipour Kermani School of Computing Science Simon Fraser University Burnaby, BC, V5A 1S6 Mark S. Drew School of Computing Science Simon Fraser University Burnaby, BC, V5A 1S6 Abstract We attempt to recover a 2D chromaticity intrinsic variation of a single RGB image which is independent of lighting, without requiring any prior knowledge about the camera. The proposed algorithm aims to learn an invariant direction for projecting from 2D color space to the greyscale intrinsic image. We notice that along this direction, the entropy in the derived invariant image is minimized. The experiments conducted on various inputs indicate that this method achieves intrinsic 2D chromaticity images which are free of shadows. In addition, we examined the idea to utilize projection pursuit instead of entropy minimization to find the desired direction. 1. Introduction It has been investigated that many vision algorithms including image segmentation, object tracking or recognition may fail due to some specific illumination conditions [1][2][3]. To illustrate, shadows are the result of changes in lighting conditions in images which can cause some difficulties in the aforementioned set of algorithms. Hence, the problem of removing shadows from color images has stimulated increasing interest in the field of computer vision. One of the suggested solutions is based on the observation that greyscale intrinsic images extracted from the original color ones do not contain any shadows because they are not dependent on illumination conditions. In [2], after generating a 2D chromaticity color map from the original image, they acquire a 1D illumination invariant image in which shadows are removed using the prior information about the camera. Afterwards, with the help of inverse conversions and shadow edges extracted from the source, they reconstruct a full color, shadow free image. This report is based on the method proposed in [3] that eliminates the need to calibrate camera. Instead, we seek the best direction for the projection line through minimizing entropy in the resulting greyscale image. Furthermore, the idea of using Independent Component Analysis (ICA) and projection pursuit to obtain the invariant direction is also discussed. The rest of this report is organized as follows: in section 2, we study the details of the algorithm. Section 3 provides the results for a number of experiments and finally, the complete method is summerized in section 4 along with some suggestions for future work. 2. System Model As stated in the previous section, our main goal in this project is to remove shadows from images through producing a greyscale intrinsic image. Note that our method assumed that camera sensors are fairly narrow-band or we applied spectral sharpening on them to simulate narrow-band behavior [4]. The light present in the images also should act similar to a Planckian light, such as daylight. In the following parts, we describe the steps of the algorithm in detail. 2.1 Geometric Mean 2D Chromaticity Space Following the arguements and proofs in [3], at first we need to map the 3D original image to a 2D space. In order to accomplish this goal, we divided three color channels by the geometric mean 3 R G B. Thus the chromaticity would be: c k = R k / 3 3 R i R k /R M, (1) i=1 If we take the log of the above equation, we get: with ρ k = log c k = log ( s k ) + e k e M, k = 1..3, (2) s M T s k = k 1 λ 5 k S(λ k)q k, s M = 3 3 s j, j=1 e k = k 2 k 2, e M = λ k 3 p j=1 λ, j 1

and we calculate the entropy for each angle by η = i p i log p i, (5) with the height of the i-th bin denoted as p i, to determine the minimum value. Figure 1: Inuition for using entropy minimization However, we still have three components for the color space which should be projected into a proper plane to get a 2D representation of chromaticity. To accomplish this conversion, we form a plane {χ 1, χ 2 } such that straight lines in the color space ρ, each related to a single surface in the original image, remain straight in this plane[3]. As a result, if we plot 2D log-chromaticities, a pattern of parallel lines is identifieble that enables projection onto a line to derive an illuminant invariant image. 2.2 Entropy Minimization To recover the greyscale intrinsic image, we require to learn the invariant direction in which the straight lines in the 2D chromaticity space mentioned above, point in. According to the observation in [3], the right invariant direction is the one that minimizes the entropy of the greyscale image. As illustrated in Fig. 1(b), if we project onto a line which causes the entropy to be larger than the minimum, then the distribution of pixels along this line is not aggregated in a set of points. In other words, the desired line is perpendicular to the 2D log-chromaticity straight lines, leading to sharp peaks for corresponding surfaces after projection to 1D, as in Fig. 1(a). Regarding the concept of entropy, these sharp peaks can be associated with small values for entropy. To formulate this observation into algorithm steps, we require to iterate through every possible projection direction and select the one that minimizes the entropy. Accordingly, for angles θ = 0..180, we produce the greyscale image I from 2D chromaticity color map by: I = χ 1 cos θ + χ 2 sin θ, (3) Next, for each angle, we compose histogram of the middle 90% of data with the intention to remove outliers. The bin width differes for every θ and is established using Scott s Rule [5]: bin width = 3.5std(I)N(I) 1/3, (4) 2.3 3-Vector Representation The final step of the method involves converting the greyscale intrinsic image back to a 3D representation for visualizing the results. To accomplish this, we form a 2x2 matrix P θ as the projector for the candidate angle θ and utilize that to obtain 2-vector χ θ as: χ θ = P θ χ (6) Employing this 2D representation, we estimate the 3D color space and afterwards add a constant extra light to all pixels to retreive the original chromaticity [3]. 2.4 Algorithm Steps To sum up, we present the algorithm to reconstruct the greyscale intrinsic image in a number of explicit steps: 1. Project the original color image into a 2D logchromaticity space. 2. For θ = 0..180 (a) Project the 2D representation of the image onto the line defined by the direction θ to retain a 1D greyscale image. (b) Calculate the entropy for pixels in the resulting greyscale image. (c) Select the angle that ensures the minimum entropy. 2.5 Independent Component Analysis and Projection Pursuit The major purpose of the algorithm in [3] is to identify a line achieving a set of sharp peaks which are well-seperated from each other after pojection rather than attaining an outspread distribution for pixels. This concept can also be modeled by applying Independent Component Analysis (ICA) to the 2D log-chromaticity representation of the image. The general definition for ICA concerns estimating a linear representation for the given mixed signal such that the components are statistically as independent as possible [6]. An alternative comprehension for ICA is maximizing the nongaussianity present in the data. Indeed this is one of the 2

ICA estimation principles which states that each local maxima of nongaussianity in the given data with the constant variance, corresponds with one of the independent components. The preceding principle connects ICA with another method named projection pursuit which also has the objective to detect maximally nongaussian linear combinations of the data. In other words, the directions for projection pursuit are another interpretation for the independent components resulting from ICA. Reconsidering the problem of verifying the correct invariant direction, we notice that recognizing the aforementioned set of peaks can be explained as maximizing the nongaussianity which is the intention of projection pursuit. Thus, a substitute for entropy minimization used in this project could be a robust implementation of ICA in [7] to learn the projection pursuit directions. 3. Experiments and Results To evaluate our algorithm, we did three rounds of experiments. At first, we tried the algorithm for the data from [3] and extracted both the greyscale and L 1 chromaticity invariant images, shown in the last two columns of Fig. 2. As we can see, the method is quite successful in this round as the results are nearly shadow free. The second time, we looked at the outputs of performing the approach on some JPEG images from unknown cameras which are provided in Fig. 3 (the dataset from [8]). We note that shadows are not removed as well as the previous case. It seems that a number of processing operations, e.g. compression in these images causes the procedure to fail since the assumptions made in the beginning of section 2 do not hold. Finally, we investigate the idea of using projection pursuit instead of entropy minimization on the same set of images from Fig. 2. We used the first independet component of the 2D log-chromaticity to create the greyscale intrinsic images which are presented in the middle column of Fig. 4. The right column is repeated from Fig. 2 to compare two approaches. We notice that projection pursuit can work as effective as entropy minimizaion but is better in terms of performance; for instance, learning the invariant direction with entropy minimization takes almost 60 seconds for an original image of size 2048 1152 pixels while projection pursuit accomplishes the task in 10 seconds. 4. Conclusions In this project, we implemented the algorithm demonstrated in [3] to reconstruct a greyscale and then an L 1 chromaticity illumination invariant image through entropy minimization with the aim to remove shadows from the original image. One of the crucial properties of suggested method is its independence on any specific information about camera or Figure 3: The result of applying entropy minimization method on JPEG images: columns show original image, L 1 chromaticity image and intrinsic greyscale image. Figure 4: The result of applying projection pursuit method: columns show original image, intrinsic greyscale image obtained from projection pursuit and entropy minimization. 3

Figure 2: The result of applying entropy minimization method on data from [3]: columns show original image, L 1 chromaticity image, intrinsic greyscale image and invariant L 1 chromaticity. 4

image. We also looked into projection pursuit and ICA to distinguish the invariant direction and came to this conclusion that it can be a replacement to entropy minimization. Future work could concentrate on improving the approach to also work on JPEG images. Also it may be possible to enhance the reconstructed RGB shadow free image following the notion of projection pursuit. Acknowledgments I would like to show my gratitude to Ali Madooei for his helpful suggestions. I also thank Zhaopeng Cui for assistance to find an appropriate implementation for ICA. References [1] Graham D Finlayson and Mark S Drew, 4-sensor camera calibration for image representation invariant to shading, shadows, lighting, and specularities, in Computer Vision, 2001. ICCV 2001. Proceedings. Eighth IEEE International Conference on. IEEE, 2001, vol. 2, pp. 473 480. [2] Graham D Finlayson, Steven D Hordley, and Mark S Drew, Removing shadows from images, in Computer VisionECCV 2002, pp. 823 836. Springer, 2002. [3] Graham D Finlayson, Mark S Drew, and Cheng Lu, Intrinsic images by entropy minimization, in Computer Vision-ECCV 2004, pp. 582 595. Springer, 2004. [4] Graham D Finlayson, Mark S Drew, and Brian V Funt, Spectral sharpening: sensor transformations for improved color constancy, JOSA A, vol. 11, no. 5, pp. 1553 1563, 1994. [5] David W Scott, Multivariate density estimation: theory, practice, and visualization, vol. 383, John Wiley & Sons, 2009. [6] Aapo Hyvärinen, Juha Karhunen, and Erkki Oja, Independent component analysis, vol. 46, John Wiley & Sons, 2004. [7] Vicente Zarzoso and Pierre Comon, Robust independent component analysis by iterative maximization of the kurtosis contrast with algebraic optimal step size, Neural Networks, IEEE Transactions on, vol. 21, no. 2, pp. 248 261, 2010. [8] Ruiqi Guo, Qieyun Dai, and Derek Hoiem, Singleimage shadow detection and removal using paired regions, in Computer Vision and Pattern Recognition (CVPR), 2011 IEEE Conference on. IEEE, 2011, pp. 2033 2040. 5