A valley-detecting algorithm for spotting intensity changes in an image. It was developed upon the discovery that the face is not a flat pattern but a bumpy surface and that a luminance valley exists in an image. This mathematical model is essential for faces where the edges are not essential.