Patent ID: 7336819

Claim:
A method of detecting sky in a digital color image having pixels, the method comprising: a) identifying pixels having a range of colors from the digital color image and forming an initial sky region using the identified sky pixels; b) developing a model based on the identified sky pixels, wherein such model is a mathematical function that has inputs of pixel position and outputs of color; c) using the model to operate on the digital color image to classify additional pixels not included in the formed initial sky region as sky including; i) determining a difference between the color of a pixel and the model estimated color for the pixel's position; ii) using the determined difference at a plurality of pixel positions to calculate a residual error from the differences; and iii) using the difference to assign a probability that the pixel represents sky further, by computing a ratio of the difference with the residual error and using the ratio to assign the probability; and d) using the probability to determine if the pixel is in a sky region.