Patent ID: 8031970

Claim:
A method of restoring closed-eye portrait photo applied to an electronic device, comprising: detecting the locations and range of the eyes of an input portrait photo; retrieving a patch of a designated range of the eyes area and its neighboring area, wherein said patch represents the state of the designated range of the eyes area and its neighboring area; determining whether the eyes of said patch are open or closed by using an eyes state classifier, and temporarily storing said patch as an open-eye template when it is determined that the eyes are open; detecting the locations and range of the eyes of a subsequently input portrait photo according to the above steps, and calcuating an eyes restoration area when it is determined that the eyes are closed; replacing the closed-eye patch with said open-eye template; and performing fusion operation toward said eyes restoration area to generate a portrait photo with the eyes open, wherein said fusion operation is based on said patch and comprises steps of: calculating the edges of the eyes which performs haar-like filter operation in horizontal direction with an area of predetermined size as the operand to acquire a photo of the edge magnitude of the eyes within said patch; filtering the skin color which removes the area not corresponding to the skin color of the human face from said photo of the edge magnitude of the eyes according to the skin color information from said original portrait photo to acquire a filtered photo of the edge magnitude of the eyes; acquiring the locations of the pupils which performs k-mean clustering analysis toward said filtered photo of the edge magnitude of the eyes to acquire a center of both eyes, the center of the eyes including the locations of the pupils and an interval between the pupils; and estimating a size which calculates the width and height of said eyes restoration area based on said locations of the pupils and said interval.