CN103491305B - A kind of Atomatic focusing method based on the colour of skin and autofocus system - Google Patents

A kind of Atomatic focusing method based on the colour of skin and autofocus system Download PDF

Info

Publication number
CN103491305B
CN103491305B CN201310463444.4A CN201310463444A CN103491305B CN 103491305 B CN103491305 B CN 103491305B CN 201310463444 A CN201310463444 A CN 201310463444A CN 103491305 B CN103491305 B CN 103491305B
Authority
CN
China
Prior art keywords
skin
colour
value
central point
focusing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310463444.4A
Other languages
Chinese (zh)
Other versions
CN103491305A (en
Inventor
张伟
傅松林
胡瑞鑫
张长定
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
XIAMEN MEITUWANG TECHNOLOGY Co Ltd
Original Assignee
XIAMEN MEITUWANG TECHNOLOGY Co Ltd
Filing date
Publication date
Application filed by XIAMEN MEITUWANG TECHNOLOGY Co Ltd filed Critical XIAMEN MEITUWANG TECHNOLOGY Co Ltd
Priority to CN201310463444.4A priority Critical patent/CN103491305B/en
Publication of CN103491305A publication Critical patent/CN103491305A/en
Application granted granted Critical
Publication of CN103491305B publication Critical patent/CN103491305B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention relates to a kind of Atomatic focusing method based on the colour of skin and autofocus system, Face datection is carried out by the view data that photographic head is obtained, and carry out skin detection and skin color probability statistics according to the position of face, thus realize automatic focusing function, avoid because causing focusing unsuccessfully to the acquisition of high-frequency signal, and improve the quality taken pictures largely, it is ensured that skin will not colour cast.

Description

A kind of Atomatic focusing method based on the colour of skin and autofocus system
Technical field
The present invention relates to a kind of focusing method, a kind of Atomatic focusing method based on the colour of skin and application The focusing system of the method.
Background technology
Recently, along with digital camera, the development of mobile phone camera so that take pictures and become universal phenomenon. In general, for main body can be highlighted when taking pictures, so all can focus.Current most phase Machine and mobile phone all possess the function of auto-focusing.
About in Atomatic focusing method, such as China issued patents CN101625506B, disclose a kind of number The face automatic focusing method of word image-taking device.Offer a kind of digital image acquisition dress is be provided in the invention The Atomatic focusing method put, carries out the period focused at digital image capture device, and focusing area can be along face Extend to health direction and at least contain more than chest, believe so as to containing the high frequency of neck span and clothes decorative pattern Number.
This inventive method has the disadvantage that in (1) said method and mainly calculates in each digitized video Focusing form high-frequency signal;Maximum is obtained from high-frequency signal;By the focusing mirror of digital image capture device Group move to maximum the lens location of corresponding object distance, to complete focusing.If in that case When the color of clothes is just the signal of high frequency, can cause focusing on clothes rather than our people On the face, the face thus causing us is not main part, and clothes becomes main body, and this is equivalent to Focus unsuccessfully.And HFS is most likely not area of skin color, and us are caused to autodyne the image obtained In the color of the colour of skin partially dark, cause the poor effect autodyned.
Summary of the invention
For solving the problems referred to above, one of goal of the invention of the present invention there is provided a kind of base in Face Detection Improve on plinth quality of taking pictures, ensure skin will not the Atomatic focusing method based on the colour of skin of colour cast, its feature It is, comprises the following steps:
A. the view data obtained by photographic head is captured;
B. described view data is carried out Face datection;
C. judge whether described view data detects face?If it is not, then jump to step A;As Fruit is, then enter step D;
D. carry out skin detection and skin color probability statistics according to the position of face, and obtain skin color probability and The center position of high skin chunk;
Described central point is compared with original focusing central point and judges whether to need again to focus by E? If it is not, then jump to step A;If it is, enter step F;
F is according to described center position auto-focusing and saves as central point of newly focusing, and jumps to step A.
As a kind of preferred embodiment: described step D farther includes:
D1. view data is carried out recognition of face, obtains human face region;
D2. the human face region obtained is carried out mean value computation, obtain the average colour of skin;
D3. the data of human face region are carried out piecemeal, each data block are carried out the statistics of skin color probability, And the skin color probability mapping table of current data block is calculated according to the average colour of skin obtained;
D4. according to the skin color probability mapping table obtained, current data block is carried out skin color model, and obtain the colour of skin Probability and the central point of the highest data block.
As a kind of preferred embodiment: described step D2 farther includes:
D2.1. original skin model is initialized;
D2.2. the color average of whole image is calculated, as the threshold value of the initial colour of skin;
D2.3. according to the average colour of skin of threshold calculations human face region of the initial colour of skin obtained.
As a kind of preferred embodiment: described step D2.1 farther includes:
D2.1.1. creating skin model, size is 256*256;
The most successively skin model being carried out assignment, concrete false code is as follows:
Preset temporary variable AlphaValue, nMax, i, j are integer type.
Skin model variable is SkinModel [256] [256]
For(i=0;i<256;i++)
{
Judging whether i is more than 128, if greater than 128, then AlphaValue is 255, is otherwise i*2;
Calculating the value obtaining nMax, computing formula is nMax=min (256, AlphaValue*2);
For(j=0;j<nMax;j++)
{
Calculate the value of skin model of correspondence position, computing formula be SkinModel [i] [j]= AlphaValue-(j/2);
}
For(j=nMax.j<256;j++)
{
The value of the skin model of initial correspondence position is 0;
}
}。
As a kind of preferred embodiment: described step D2.2 farther includes:
D2.2.1. the pixel of whole image is traveled through, by red channel, green channel, the face of blue channel Colour adds up, and obtains color accumulated value;
D2.2.2. by color accumulated value divided by the sum of the pixel of whole image, red channel, green is obtained Chrominance channel, the average of blue channel, as the threshold value of the initial colour of skin.
As a kind of preferred embodiment: described step D2.3 farther includes:
D2.3.1. according to the gray value of the equation below average colour of skin of calculating:
GRAY1=0.299*RED+0.587*GREEN+0.114*BLUE
Wherein, GRAY1 is the gray value of current pixel point of image;RED, GREEN, BLUE are respectively The color value of the red, green, blue passage of the current pixel point of image;
D2.3.2. using described gray value as threshold value, it is used for getting rid of the noncutaneous part of human face region;
The color value of the pixel in traversal human face region, obtains average according to equation below the most successively The colour of skin:
skin=SkinModel[red][blue];
Wherein, skin is the skin tone value after the color of skin model maps;SkinModel is step The original skin model of initialization of D2.1;Red is the color value of red channel;Blue is blue channel Color value.
As a kind of preferred embodiment: the skin color probability mapping table of described step D3 obtains as follows Take:
D3.1. creating skin color probability mapping table, size is 256*256;
The most successively skin color probability mapping table being carried out assignment, concrete false code is as follows;
Preset temporary variable i, j, SkinRed_Left, AlphaValue, Offset, TempAlphaValue, OffsetJ are integer type;
The variable of skin color probability mapping table is SkinProbabi lity [256] [256];
SkinRed is the average of the calculated red channel of step D2.2.2.;SkinBlue is step The average of the calculated blue channel of D2.2.2;
Presetting the value of SkinRed_Left, computing formula is: SkinRed_Left=SkinRed-128;
For(i=0;i<256;i++)
{
Calculating the value of Offset, formula is Offset=max (0, min (255, i-SkinRed_Left));
Judge whether the value of Offset is less than 128, if less than, talk about then AlphaValue=Offset*2; If greater than equal to 128, then AlphaValue=255;
For(j=0;j<256;j++)
{
Calculating the value of OffsetJ, formula is OffsetJ=max (0, j-SkinBlue);
Calculating the value of TempAlphaValue, formula is TempAlphaValue=max (AlphaValue -(OffsetJ*2), 0);
Judge the value of TempAlphaValue.If 160, then The value of SkinProbability [i] [j] is 255;
If 90, then the value of SkinProbability [i] [j] is 0;Otherwise The value of SkinProbability [i] [j] is TempAlphaValue+30;
}
}。
As a kind of preferred embodiment: described step D4 is realized by equation below:
skinColor=SkinProbability[red][blue]
Wherein, skinColor is the skin color probability value of result figure;SkinProbability is skin color probability Mapping table;Red is the color value of the red channel of pixel;Blue is the face of the blue channel of pixel Colour.
As a kind of preferred embodiment: the data of human face region are divided into N*N block by described step D3, Wherein N is more than or equal to 10.
As a kind of preferred embodiment: described step E is by described central point and original focusing central point Compare, it is judged that whether the distance between described central point and original focusing central point is more than predetermined Value?If it is, enter step F, otherwise jump to step A.
As a kind of preferred embodiment: the distance between described central point and original focusing central point Computing formula is:
N = ( xNew - xOld ) * ( xNew - xOld ) + ( yNew - yOld ) * ( yNew - yOld )
Wherein, N is described predetermined value, and the span of N is 1~50 pixel;Described center The coordinate of point is Y (xNew, yNew), and the coordinate of described original focusing central point is X (xOld, yOld).
It is a further object of the present invention to provide and a kind of can improve, with colour of skin judgement unit, matter of taking pictures Amount, ensure that skin will not the autofocus system based on the colour of skin of colour cast, it is characterised in that comprising:
Image acquisition unit, its view data obtained by photographic head for capture;
Image detecting element, it is for carrying out Face datection to described view data;
Colour of skin judgement unit, it is for the position calculation skin color probability according to face and finally determines that it is corresponding Central point;
Auto-focusing unit, it is for carrying out auto-focusing according to described central point to image.
As a kind of preferred embodiment: described auto-focusing unit is by described central point and original focusing Central point compares, and the distance between described central point and original focusing central point is more than predetermined value Time, described auto-focusing unit carries out auto-focusing, and is saved as in new focusing by described central point Heart point.
As a kind of preferred embodiment: the distance between described central point and original focusing central point Computing formula is:
N = ( xNew - xOld ) * ( xNew - xOld ) + ( yNew - yOld ) * ( yNew - yOld )
Wherein, N is described predetermined value, and the span of N is 1~50 pixel;Described center The coordinate of point is Y (xNew, yNew), and the coordinate of described original focusing central point is X (xOld, yOld).
The invention has the beneficial effects as follows:
Atomatic focusing method of the present invention and autofocus system, directly to the skin in view data Detect, it is to avoid because causing focusing unsuccessfully to the acquisition of high-frequency signal, and improve largely The quality taken pictures, it is ensured that skin will not colour cast.
Accompanying drawing explanation
Accompanying drawing described herein is used for providing a further understanding of the present invention, constitutes of the present invention Point, the schematic description and description of the present invention is used for explaining the present invention, is not intended that the present invention's Improper restriction.In the accompanying drawings:
Fig. 1 is the general flow chart of Atomatic focusing method of the present invention;
Fig. 2 is the schematic diagram of autofocus system of the present invention;
Fig. 3 is the artwork of the photographic head acquisition of Atomatic focusing method of the present invention and autofocus system;
Skin color model when Fig. 4 is Atomatic focusing method of the present invention and autofocus system carries out skin color probability statistics Figure.
Detailed description of the invention
In order to make the technical problem to be solved, technical scheme and beneficial effect clearer, bright In vain, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that herein Described specific embodiment, only in order to explain the present invention, is not intended to limit the present invention.
As it is shown in figure 1, a kind of based on the colour of skin the Atomatic focusing method of the present invention, comprise the following steps:
A. the view data obtained by photographic head is captured;
B. described view data is carried out Face datection;
C. judge whether described view data detects face?If it is not, then jump to step A;As Fruit is, then enter step D;
D. carry out skin detection and skin color probability statistics according to the position of face, and obtain skin color probability and The center position of high skin chunk;
Described central point is compared with original focusing central point and judges whether to need again to focus by E? If it is not, then jump to step A;If it is, enter step F;
F is according to described center position auto-focusing and saves as central point of newly focusing, and jumps to step A.
At present, most calculating equipment is equipped with photographic head, such as PC, mobile terminal etc..This enforcement Example step A is then to obtain the view data obtained by photographic head, and data form is probably data below form In one: 16BE555 (the BE form of RGB555), 16LE555 (the LE form of RGB555), 16LE5551 (the LE form of RGB5551), 16BE565 (the BE form of RGB565), 16LE565 (RGB565 LE form), 24RGB (RGB order), 24BGR (BGR order), 32ARGB (ARGB order), 32BGRA (BGRA order), 32ABGR (ABGR order), 32RGBA (RGBA order), 64ARGB (ARGB Sequentially, each passage accounts for 16), 48RGB (RGB order, each passage accounts for 16), 32AlphaGray (AGray order, each passage accounts for 16), 16Gray (only Gray, each passage accounts for 16), 30RGB (RGB order, each passage accounts for 10), 422YpCbCr8,4444YpCbCrA8, 4444YpCbCrA8R、4444AYpCbCr8、4444AYpCbCr16、444YpCbCr8、422YpCbCr16、 22YpCbCr10、444YpCbCr10、420YpCbCr8Planar、420YpCbCr8PlanarFullRange、 422YpCbCr_4A_8BiPlanar、420YpCbCr8BiPlanarVideoRange、YCbCrBiPlanar、 The forms such as 422YpCbCr8_yuvs.It addition, the method for detecting human face in the present embodiment step B often uses Rule method, does not repeats;If being not detected by face in view data, then jump to step A obtains the view data obtained by photographic head again, and photographic head can capture same position or difference again The view data of position;If view data detects face, then enter step D.
In the present embodiment, described step D farther includes:
D1. view data is carried out recognition of face, obtains human face region;
D2. the human face region obtained is carried out mean value computation, obtain the average colour of skin;
D3. the data of human face region are carried out piecemeal, each data block are carried out the statistics of skin color probability, And the skin color probability mapping table of current data block is calculated according to the average colour of skin obtained;
D4. according to the skin color probability mapping table obtained, current data block is carried out skin color model, and obtain the colour of skin Probability and the central point of the highest data block.
In the present embodiment, described step D2 farther includes:
D2.1. original skin model is initialized;
D2.2. the color average of whole image is calculated, as the threshold value of the initial colour of skin;
D2.3. according to the average colour of skin of threshold calculations human face region of the initial colour of skin obtained.
In the present embodiment, described step D2.1 farther includes:
D2.1.1 creates skin model, and size is 256*256;
D2.1.2 carries out assignment to skin model successively, and concrete false code is as follows:
Preset temporary variable AlphaValue, nMax, i, j are integer type.
Skin model variable is SkinModel [256] [256]
For(i=0;i<256;i++)
{
Judging whether i is more than 128, if greater than 128, then AlphaValue is 255, is otherwise i*2;
Calculating the value obtaining nMax, computing formula is nMax=min (256, AlphaValue*2);
For(j=0;j<nMax;j++)
{
Calculate the value of skin model of correspondence position, computing formula be SkinModel [i] [j]= AlphaValue-(j/2);
}
For(j=nMax.j<256;j++)
{
The value of the skin model of initial correspondence position is 0;
}
}。
In the present embodiment, described step D2.2 farther includes:
D2.2.1. the pixel of whole image is traveled through, by red channel, green channel, the face of blue channel Colour adds up, and obtains color accumulated value;
D2.2.2. by color accumulated value divided by the sum of the pixel of whole image, red channel, green is obtained Chrominance channel, the average of blue channel, as the threshold value of the initial colour of skin.
In the present embodiment, described step D2.3 farther includes:
D2.3.1. according to the gray value of the equation below average colour of skin of calculating:
GRAY1=0.299*RED+0.587*GREEN+0.114*BLUE
Wherein, GRAY1 is the gray value of current pixel point of image;RED, GREEN, BLUE are respectively The color value of the red, green, blue passage of the current pixel point of image;
D2.3.2. using described gray value as threshold value, it is used for getting rid of the noncutaneous part of human face region;
The color value of the pixel in traversal human face region, obtains average according to equation below the most successively The colour of skin:
skin=SkinModel[red][blue];
Wherein, skin is the skin tone value after the color of skin model maps;SkinModel is step The original skin model of initialization of D2.1;Red is the color value of red channel;Blue is blue channel Color value.
In the present embodiment, the skin color probability mapping table of described step D3 obtains as follows:
D3.1 creates skin color probability mapping table, and size is 256*256;
D3.2 carries out assignment to skin color probability mapping table successively, and concrete false code is as follows;
Preset temporary variable i, j, SkinRed_Left, AlphaValue, Offset, TempAlphaValue, OffsetJ are integer type;
The variable of skin color probability mapping table is SkinProbability [256] [256];
SkinRed is the average of the calculated red channel of step D2.2.2;SkinBlue is step The average of the calculated blue channel of D2.2.2;
Presetting the value of SkinRed_Left, computing formula is: SkinRed_Left=SkinRed-128;
For(i=0;i<256;i++)
{
Calculating the value of Offset, formula is Offset=max (0, min (255, i-SkinRed_Left));
Judge whether the value of Offset is less than 128, if less than, talk about then AlphaValue=Offset*2; If greater than equal to 128, then AlphaValue=255;
For(j=0;j<256;j++)
{
Calculating the value of OffsetJ, formula is OffsetJ=max (0, j-SkinBlue);
Calculating the value of TempAlphaValue, formula is TempAlphaValue=max (AlphaValue -(OffsetJ*2), 0);
Judge the value of TempAlphaValue.If 160, then The value of SkinProbability [i] [j] is 255;
If 90, then the value of SkinProbability [i] [j] is 0;Otherwise The value of SkinProbability [i] [j] is TempAlphaValue+30;
}
}。
In the present embodiment, described step D4 is realized by equation below:
skinColor=SkinProbability[red][blue]
Wherein, skinColor is the skin color probability value of result figure;SkinProbability is skin color probability Mapping table;Red is the color value of the red channel of pixel;Blue is the face of the blue channel of pixel Colour.
In the present embodiment, in described step D3, the data of human face region being divided into N*N block, wherein N is more than Equal to 10.
In the present embodiment, described central point is compared by described step E with original focusing central point, Whether the distance between central point and original focusing central point described in judgement is more than predetermined value?If it is, Then enter step F, otherwise jump to step A.
In the present embodiment, the computing formula of the distance between described central point and original focusing central point is:
N = ( xNew - xOld ) * ( xNew - xOld ) + ( yNew - yOld ) * ( yNew - yOld )
Wherein, N is described predetermined value, and the span of N is 1~50 pixel, preferably 10 Pixel;The coordinate of described central point is Y (xNew, yNew), the coordinate of described original focusing central point For X (xOld, yOld).
It is a further object of the present invention to provide and a kind of can improve, with colour of skin judgement unit, matter of taking pictures Amount, ensure skin will not the autofocus system based on the colour of skin of colour cast, comprising:
Image acquisition unit, its view data obtained by photographic head for capture;
Image detecting element, it is for carrying out Face datection to described view data;
Colour of skin judgement unit, it is for the position calculation skin color probability according to face and finally determines that it is corresponding Central point;
Auto-focusing unit, it is for carrying out auto-focusing according to described central point to image.
In the present embodiment, described central point is carried out by described auto-focusing unit with original focusing central point Relatively, when the distance between described central point and original focusing central point is more than predetermined value, described from Dynamic focusing unit carries out auto-focusing, and described central point saves as new focusing central point.
In the present embodiment, the computing formula of the distance between described central point and original focusing central point is:
N = ( xNew - xOld ) * ( xNew - xOld ) + ( yNew - yOld ) * ( yNew - yOld )
Wherein, N is described predetermined value, and the span of N is 1~50 pixel, preferably 10 Pixel;The coordinate of described central point is Y (xNew, yNew), the coordinate of described original focusing central point For X (xOld, yOld).
Described above illustrate and describes the preferred embodiments of the present invention, as before, be to be understood that the present invention is also It is not limited to form disclosed herein, is not to be taken as the eliminating to other embodiments, and can be used for each Kind of other combinations, amendment and environment, and can in invention contemplated scope herein, by above-mentioned teaching or Technology or the knowledge of association area are modified.And the change that those skilled in the art are carried out and change without departing from The spirit and scope of the present invention, the most all should be in the protection domain of claims of the present invention.

Claims (14)

1. an Atomatic focusing method based on the colour of skin, it is characterised in that comprise the following steps:
A. the view data obtained by photographic head is captured;
B. described view data is carried out Face datection;
C. judge whether described view data detects face?If it is not, then jump to step A;As Fruit is, then enter step D;
D. carry out skin detection and skin color probability statistics according to the position of face, and obtain skin color probability and The center position of high skin chunk;
Described central point is compared with original focusing central point and judges whether to need again to focus by E? If it is not, then jump to step A;If it is, enter step F;
F is according to described center position auto-focusing and saves as central point of newly focusing, and jumps to step A.
A kind of Atomatic focusing method based on the colour of skin the most according to claim 1, it is characterised in that: Described step D farther includes:
D1. view data is carried out recognition of face, obtains human face region;
D2. the human face region obtained is carried out mean value computation, obtain the average colour of skin;
D3. the data of human face region are carried out piecemeal, each data block are carried out the statistics of skin color probability, And the skin color probability mapping table of current data block is calculated according to the average colour of skin obtained;
D4. according to the skin color probability mapping table obtained, current data block is carried out skin color model, and obtain the colour of skin Probability and the central point of the highest data block.
A kind of Atomatic focusing method based on the colour of skin the most according to claim 2, it is characterised in that: Described step D2 farther includes:
D2.1. original skin model is initialized;
D2.2. the color average of whole image is calculated, as the threshold value of the initial colour of skin;
D2.3. according to the average colour of skin of threshold calculations human face region of the initial colour of skin obtained.
A kind of Atomatic focusing method based on the colour of skin the most according to claim 3, it is characterised in that: Described step D2.1 farther includes:
D2.1.1. creating skin model, size is 256*256;
The most successively skin model being carried out assignment, concrete false code is as follows:
Preset temporary variable AlphaValue, nMax, i, j are integer type;
Skin model variable is SkinModel [256] [256]
For (i=0;i<256;i++)
{
Judging whether i is more than 128, if greater than 128, then AlphaValue is 255, is otherwise i*2;
Calculating the value obtaining nMax, computing formula is nMax=min (256, AlphaValue*2);
For (j=0;j<nMax;j++)
{
Calculate the value of skin model of correspondence position, computing formula be SkinModel [i] [j]= AlphaValue-(j/2);
}
For (j=nMax.j < 256;j++)
{
The value of the skin model of initial correspondence position is 0;
}
}。
A kind of Atomatic focusing method based on the colour of skin the most according to claim 3, it is characterised in that: Described step D2.2 farther includes:
D2.2.1. the pixel of whole image is traveled through, by red channel, green channel, the face of blue channel Colour adds up, and obtains color accumulated value;
D2.2.2. by color accumulated value divided by the sum of the pixel of whole image, red channel, green is obtained Chrominance channel, the average of blue channel, as the threshold value of the initial colour of skin.
A kind of Atomatic focusing method based on the colour of skin the most according to claim 3, it is characterised in that: Described step D2.3 farther includes:
D2.3.1. according to the gray value of the equation below average colour of skin of calculating:
GRAY 1=0.299*RED+0.587*GREEN+0.114*BLUE
Wherein, GRAY1 is the gray value of current pixel point of image;RED, GREEN, BLUE are respectively The color value of the red, green, blue passage of the current pixel point of image;
D2.3.2. using described gray value as threshold value, it is used for getting rid of the noncutaneous part of human face region;
The color value of the pixel in traversal human face region, obtains average according to equation below the most successively The colour of skin:
Skin=SkinModel [red] [blue];
Wherein, skin is the skin tone value after the color of skin model maps;SkinModel is step The original skin model of initialization of D2.1;Red is the color value of red channel;Blue is blue channel Color value.
A kind of Atomatic focusing method based on the colour of skin the most according to claim 5, it is characterised in that: The skin color probability mapping table of described step D3 obtains as follows:
D3.1. creating skin color probability mapping table, size is 256*256;
The most successively skin color probability mapping table being carried out assignment, concrete false code is as follows;
Preset temporary variable i, j, SkinRed_Left, AlphaValue, Offset, TempAlphaValue, OffsetJ are integer type;
The variable of skin color probability mapping table is SkinProbability [256] [256];
SkinRed is the average of the calculated red channel of step D2.2.2;SkinBlue is step The average of the calculated blue channel of D2.2.2;
Presetting the value of SkinRed_Left, computing formula is: SkinRed_Left=SkinRed-128;
For (i=0;i<256;i++)
{
Calculating the value of Offset, formula is Offset=max (0, min (255, i-SkinRed_Left));
Judge whether the value of Offset is less than 128, if less than, talk about then AlphaValue=Offset*2; If greater than equal to 128, then AlphaValue=255;
For (j=0;j<256;j++)
{
Calculating the value of OffsetJ, formula is OffsetJ=max (0, j-SkinBlue);
Calculating the value of TempAlphaValue, formula is TempAlphaValue=max (AlphaValue -(OffsetJ*2),0);
Judge the value of TempAlphaValue;
If 160, then the value of SkinProbability [i] [j] is 255;
If 90, then the value of SkinProbability [i] [j] is 0;Otherwise The value of SkinProbability [i] [j] is TempAlphaValue+30;
}
}。
A kind of Atomatic focusing method based on the colour of skin the most according to claim 7, it is characterised in that: Described step D4 is realized by equation below:
SkinColor=SkinProbability [red] [blue]
Wherein, skinColor is the skin color probability value of result figure;SkinProbability is skin color probability Mapping table;Red is the color value of the red channel of pixel;Blue is the face of the blue channel of pixel Colour.
A kind of Atomatic focusing method based on the colour of skin the most according to claim 2, it is characterised in that: The data of human face region are divided in described step D3 N*N block, and wherein N is more than or equal to 10.
A kind of Atomatic focusing method based on the colour of skin the most according to claim 1, it is characterised in that: Described central point is compared by described step E with original focusing central point, it is judged that described central point And whether the distance between original focusing central point is more than predetermined value?If it is, enter step F, no Then jump to step A.
11. a kind of Atomatic focusing methods based on the colour of skin according to claim 10, it is characterised in that: The computing formula of the distance between described central point and original focusing central point is:
N = ( x N e w - x O l d ) * ( x N e w - x O l d ) + ( y N e w - y O l d ) * ( y N e w - y O l d )
Wherein, N is described predetermined value, and the span of N is 1~50 pixel;Described center The coordinate of point is Y (xNew, yNew), and the coordinate of described original focusing central point is X (xOld, yOld).
12. 1 kinds of autofocus systems based on the colour of skin, it is characterised in that comprising:
Image acquisition unit, its view data obtained by photographic head for capture;
Image detecting element, it is for carrying out Face datection to described view data;
Colour of skin judgement unit, it is for the position calculation skin color probability according to face and finally determines that it is corresponding Central point;
Auto-focusing unit, it is for carrying out auto-focusing according to described central point to image.
13. a kind of autofocus systems based on the colour of skin according to claim 12, it is characterised in that: Described central point is compared, in described by described auto-focusing unit with original focusing central point When distance between heart point and original focusing central point is more than predetermined value, described auto-focusing unit is carried out certainly Dynamic focusing, and described central point is saved as new focusing central point.
14. a kind of autofocus systems based on the colour of skin according to claim 13, it is characterised in that: The computing formula of the distance between described central point and original focusing central point is:
N = ( x N e w - x O l d ) * ( x N e w - x O l d ) + ( y N e w - y O l d ) * ( y N e w - y O l d )
Wherein, N is described predetermined value, and the span of N is 1~50 pixel;Described central point Coordinate be Y (xNew, yNew), the coordinate of described original focusing central point is X (xOld, yOld).
CN201310463444.4A 2013-10-07 A kind of Atomatic focusing method based on the colour of skin and autofocus system Active CN103491305B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310463444.4A CN103491305B (en) 2013-10-07 A kind of Atomatic focusing method based on the colour of skin and autofocus system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310463444.4A CN103491305B (en) 2013-10-07 A kind of Atomatic focusing method based on the colour of skin and autofocus system

Publications (2)

Publication Number Publication Date
CN103491305A CN103491305A (en) 2014-01-01
CN103491305B true CN103491305B (en) 2016-11-30

Family

ID=

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107438162A (en) * 2017-07-31 2017-12-05 努比亚技术有限公司 The method of adjustment and device of a kind of acquisition parameters
US11810277B2 (en) 2018-07-20 2023-11-07 Huawei Technologies Co., Ltd. Image acquisition method, apparatus, and terminal

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101777113A (en) * 2009-01-08 2010-07-14 华晶科技股份有限公司 Method for establishing skin color model
US7903163B2 (en) * 2001-09-18 2011-03-08 Ricoh Company, Limited Image pickup device, automatic focusing method, automatic exposure method, electronic flash control method and computer program
CN103327254A (en) * 2013-07-01 2013-09-25 厦门美图网科技有限公司 Automatic focusing method and focusing system thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7903163B2 (en) * 2001-09-18 2011-03-08 Ricoh Company, Limited Image pickup device, automatic focusing method, automatic exposure method, electronic flash control method and computer program
CN101777113A (en) * 2009-01-08 2010-07-14 华晶科技股份有限公司 Method for establishing skin color model
CN103327254A (en) * 2013-07-01 2013-09-25 厦门美图网科技有限公司 Automatic focusing method and focusing system thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
彩色图像人脸特征点定位算法研究;吴证 等;《电子学报》;20080229;第36卷(第2期);第309-313页 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107438162A (en) * 2017-07-31 2017-12-05 努比亚技术有限公司 The method of adjustment and device of a kind of acquisition parameters
US11810277B2 (en) 2018-07-20 2023-11-07 Huawei Technologies Co., Ltd. Image acquisition method, apparatus, and terminal

Similar Documents

Publication Publication Date Title
CN103491307B (en) A kind of intelligent self-timer method of rear camera
CN107370958B (en) Image blurs processing method, device and camera terminal
JP4335565B2 (en) Method and apparatus for detecting and / or tracking one or more color regions in an image or sequence of images
CN106570838B (en) A kind of brightness of image optimization method and device
CN103455790B (en) A kind of skin identification method based on complexion model
US10453188B2 (en) Methods and devices for improving image quality based on synthesized pixel values
CN108932696B (en) Signal lamp halo suppression method and device
CN104778460B (en) A kind of monocular gesture identification method under complex background and illumination
US9256954B2 (en) Image analysis apparatus to analyze state of predetermined object in image
CN104599297A (en) Image processing method for automatically blushing human face
CN106534677A (en) Image overexposure optimization method and device
CN105279487A (en) Beauty tool screening method and system
CN104966266A (en) Method and system to automatically blur body part
CN108965647A (en) A kind of foreground image preparation method and device
CN109040720B (en) A kind of method and device generating RGB image
CN114331860A (en) Distorted image correction method and positioning method thereof
CN108961299A (en) A kind of foreground image preparation method and device
CN103327254A (en) Automatic focusing method and focusing system thereof
CN106097261A (en) Image processing method and device
CN109583330B (en) Pore detection method for face photo
CN103729624B (en) A kind of light measuring method and photometric system based on skin color model
CN107491718A (en) The method that human hand Face Detection is carried out under different lightness environment
KR20140075068A (en) Video modulating device and method in video calling
CN103491305B (en) A kind of Atomatic focusing method based on the colour of skin and autofocus system
CN111062926B (en) Video data processing method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant