# US 2010/0166331 A1 · Method for beautifying human face in digital image

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2010/0166331 A1
- Document ID: US20100166331A1
- Status: Published application
- Kind: A1
- Application number: 12/471,013
- Filed: 2009-05-22
- Published: 2010-07-01
- Earliest claimed: 2008-12-31
- Assignees: Altek Corporation
- Inventors: Chen Hung Chan; Hong Long Chou
- Web page: https://patentgrep.com/patent/US20100166331A1

## CPC

- G06V 40/162: {using pixel segmentation or colour matching}
- G06T 5/20: using local operators
- G06T 5/70: Denoising; Smoothing
- H04N 1/409: Edge or detail enhancement; Noise or error suppression
- H04N 1/4097: {Removing errors due external factors, e.g. dust, scratches}
- G06T 2207/20012: Locally adaptive
- G06T 2207/30201: Face
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

A method for beautifying a human face in a digital image is adapted to beautify a face area of an input image. The method includes setting a selection window to select a partial image area in the input image; setting a target pixel in the selection window, and setting other pixels as comparison pixels; performing a detail checking process according to a variance between the target pixel; performing a luminance checking process on the target pixel to determine; performing a nonlinear filtering process to filter the target pixel by using a nonlinear filter to generate a filtered value, and providing a mixing ratio to mix the target pixel with the filtered value at the mixing ratio to generate a completed pixel; replacing the original target pixel with the completed pixel; and repeating the above steps until all pixels are completed.

## Claims

### Claim 1

A method for beautifying a human face in a digital image, adapted to remove noises on the skin of a human face in an input image, the method comprising:
a. selecting a partial image area in the input image as a selection window;
b. setting a target pixel in the selection window, and setting other pixels as comparison pixels;
c. performing a detail checking process according to a variance between the target pixel and the comparison pixels to determine whether the target pixel has detail information or not;
d. if the target pixel has the detail information, performing a luminance checking process on the target pixel to determine whether the target pixel is within a luminance range or not;
e. if the target pixel is within the luminance range, performing a nonlinear filtering process to filter the target pixel by using a nonlinear filter to generate a filtered value, and providing a mixing ratio to mix the target pixel with the filtered value at the mixing ratio to generate a completed pixel, and replacing the target pixel with the completed pixel; and
f. repeating Step a to Step e until all pixels in the input image are completed, and outputting a target image.

### Claim 2 (depends on 1)

The method for beautifying a human face in a digital image according to claim 1, wherein the selection window is an m*n pixel array, and m and n are positive integers.

### Claim 3 (depends on 1)

The method for beautifying a human face in a digital image according to claim 1, wherein Step c further comprises:
providing a variance threshold;
calculating a horizontal variance SAD_H according to the target pixel and the comparison pixels;
calculating a vertical variance SAD_V according to the target pixel and the comparison pixels;
calculating a set of diagonal variances SAD_D1, SAD_D2 according to the target pixel and the comparison pixels;
calculating a total variance SAD according to the horizontal variance SAD_H, the vertical variance SAD_V, and the diagonal variances SAD_D1, SAD_D2;
if the total variance SAD is smaller than the variance threshold, determining that the target pixel does not have the detail information, and selecting another pixel from the input image and performing Step a; and
if the total variance SAD is greater than the variance threshold, determining that the target pixel has the detail information, and selecting another pixel from the input image and performing Step a.

### Claim 4 (depends on 1)

The method for beautifying a human face in a digital image according to claim 1, wherein before Step d, the method further comprises:
calculating a mean according to values of the target pixel and the comparison pixels;
providing a mean upper threshold Mean_THU and a mean lower threshold Mean_THL greater than the mean upper threshold Mean_THU; and
setting a range for the luminance range according to the mean upper threshold Mean_THU and the mean lower threshold Mean_THL.

### Claim 5 (depends on 1)

The method for beautifying a human face in a digital image according to claim 1, wherein the process for generating the filtered value in Step e further comprises:
selecting a maximum pixel value from the comparison pixels, and defining the maximum pixel value as a maximum filtered value P_Max;
selecting a median value from the comparison pixels, and defining the median value as a median filtered value P_Mid; and
mixing the maximum filtered value P_Max, the median filtered value P_Mid, and the target pixel at the mixing ratio to generate the completed pixel.

### Claim 6 (depends on 1)

The method for beautifying a human face in a digital image according to claim 1, wherein after Step e, the method further comprises:
determining whether to continue to perform Step a to Step e.

### Claim 7 (depends on 6)

The method for beautifying a human face in a digital image according to claim 6, wherein after Step e, the method further comprises:
h. setting a comparison window to select the partial image area in the target image, setting the target pixel in the comparison window, and setting other pixels as the comparison pixels;
i. performing the detail checking process to detect the target pixel having the detail information according to the variance between the target pixel and the comparison pixels;
j. performing a filtering process on the target pixel having the detail information to output a finished pixel; and
k. repeating Step f-Step h until all pixels in the target image are completed, and outputting a completed image.

### Claim 8 (depends on 7)

The method for beautifying a human face in a digital image according to claim 7, wherein Step i further comprises:
if it is detected that the target pixel does not have the detail information, selecting another pixel from the target image, and repeating Step h.
