Patent ID: 7514669

Claim:
A light source estimating device for estimating a kind of a light source used during capture of an input image, comprising: distribution holding means for holding a spectral energy distribution of a specific light source as a specular reflection component; set generating means for generating a set of angles between a reference half-plane defined by the specular reflection component and half-planes corresponding to pixel data of the input image in a predetermined space, by determining an angle value between a half-plane specified by specific pixel data of the input image, and the reference half-plane, and registering the angle value in a set; detecting means for detecting, by accessing the set, neighboring pixel data included in the set having the same angle value as the specific pixel data; and determining means for determining whether or not the specific light source corresponds to the light source used during capture of the input image, by setting a high likelihood that the specific light source corresponds to the light source used during capture if neighboring pixel data having the same angle value exists, and setting a low likelihood that the specific light source corresponds to the light source used during capture if neighboring pixel data having the same angle value does not exist.