Automatic skin color model face detection and mean-shift face tracking
First Claim
1. A method of automatically detecting and tracking a face by an electronic capturing device, comprising:
- executing a face detecting algorithm to detect a face position in a frame in a red, green and blue (RGB) chromaticity space based on a skin color model, wherein said face detecting algorithm performs a color transformation for transforming said frame into a new frame in a hue, saturation and value (HSV) chromaticity space and comprises steps of;
calculating a histogram of hue of color pixels on said new frame when r>
max(g,b, S) and S>
38, wherein S represents saturation of said new frame, and r>
max(g,b,S) and S>
38 represents that intensity of red color of said frame is larger than maximum value of intensities of green color and blue color of said frame when the saturation S of said new frame is larger than 38;
obtaining a maximum value Maxh of said histogram of hue when number of said color pixels multiplied by 256 is larger than total number of all pixels on said new frame;
obtaining a smallest value i of said histogram of hue, such that said pixels of said new frame with hues falling within a histogram hue range [Maxh−
i, Maxh+i] are determined to be skin color pixels respectively;
forming a mask for said skin color pixels;
marking a label for all continuous regions in said new frame for defining a rectangle corresponding to said label when a number of pixels of said continuous regions is larger than the total number of pixels on said new frame divided by 256;
using a face feature matching engine to analyze and determine whether an image within said rectangle is a face or not;
generating a detected rectangle for covering at least one rectangle;
calculating a skin color probability density function for an image within said detected rectangle; and
outputting information of detecting a face within said detected rectangle and displaying said detected rectangle on said new frame corresponding to said face; and
executing a face tracking algorithm to detect face positions in subsequent new frames by using a nonparametric technique and a mean shift algorithm according to said face.
5 Assignments
0 Petitions
Accused Products
Abstract
The present invention discloses a method of automatically detecting and tracking a face by an electronic capturing device that alternatively uses a face detecting algorithm to quickly locate a face in a frame based on a skin color model and a face tracking algorithm to locate a face in subsequent frames by a nonparametric technique and a mean shift algorithm. If the face tracking algorithm cannot track and locate a face correctly, the face detecting algorithm will be used again to detect a face position in another new frame until the face position is located successfully, and then the face tracking algorithm will be used again for detecting and locating the face position in subsequent frames. After this method has detected a face position, a variable focal lens is used to slowly and smoothly refocus the frame including a face region, so as to obtain a clear face image.
-
Citations
29 Claims
-
1. A method of automatically detecting and tracking a face by an electronic capturing device, comprising:
-
executing a face detecting algorithm to detect a face position in a frame in a red, green and blue (RGB) chromaticity space based on a skin color model, wherein said face detecting algorithm performs a color transformation for transforming said frame into a new frame in a hue, saturation and value (HSV) chromaticity space and comprises steps of; calculating a histogram of hue of color pixels on said new frame when r>
max(g,b, S) and S>
38, wherein S represents saturation of said new frame, and r>
max(g,b,S) and S>
38 represents that intensity of red color of said frame is larger than maximum value of intensities of green color and blue color of said frame when the saturation S of said new frame is larger than 38;obtaining a maximum value Maxh of said histogram of hue when number of said color pixels multiplied by 256 is larger than total number of all pixels on said new frame; obtaining a smallest value i of said histogram of hue, such that said pixels of said new frame with hues falling within a histogram hue range [Maxh−
i, Maxh+i] are determined to be skin color pixels respectively;forming a mask for said skin color pixels; marking a label for all continuous regions in said new frame for defining a rectangle corresponding to said label when a number of pixels of said continuous regions is larger than the total number of pixels on said new frame divided by 256; using a face feature matching engine to analyze and determine whether an image within said rectangle is a face or not; generating a detected rectangle for covering at least one rectangle;
calculating a skin color probability density function for an image within said detected rectangle; andoutputting information of detecting a face within said detected rectangle and displaying said detected rectangle on said new frame corresponding to said face; and executing a face tracking algorithm to detect face positions in subsequent new frames by using a nonparametric technique and a mean shift algorithm according to said face. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29)
-
Specification