CN100571404C - Skin color signal correcting method - Google Patents

Skin color signal correcting method Download PDF

Info

Publication number
CN100571404C
CN100571404C CNB2007100482080A CN200710048208A CN100571404C CN 100571404 C CN100571404 C CN 100571404C CN B2007100482080 A CNB2007100482080 A CN B2007100482080A CN 200710048208 A CN200710048208 A CN 200710048208A CN 100571404 C CN100571404 C CN 100571404C
Authority
CN
China
Prior art keywords
deal
skin
color difference
difference signal
signal
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.)
Expired - Fee Related
Application number
CNB2007100482080A
Other languages
Chinese (zh)
Other versions
CN101005628A (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.)
Sichuan Changhong Electric Co Ltd
Original Assignee
Sichuan Changhong Electric Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Sichuan Changhong Electric Co Ltd filed Critical Sichuan Changhong Electric Co Ltd
Priority to CNB2007100482080A priority Critical patent/CN100571404C/en
Publication of CN101005628A publication Critical patent/CN101005628A/en
Application granted granted Critical
Publication of CN100571404C publication Critical patent/CN100571404C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Processing Of Color Television Signals (AREA)

Abstract

Skin color signal correcting method relates to image processing method, particularly a kind of skin color signal correcting method.The present invention is directed in the flesh correction luminance signal to the influence of the colour of skin, propose skin color signal correcting method.Technical scheme of the present invention may further comprise the steps: luminance signal and the color difference signal of importing image to be corrected; Value according to luminance signal is done preliminary treatment to color difference signal; Judge whether pretreated color difference signal is in the colour of skin distributed areas, if then pretreated color difference signal is made the color difference signal after the output luminance signal and flesh correction behind the flesh correction; Otherwise directly export luminance signal and the color difference signal of being imported.The invention has the beneficial effects as follows, solved effectively and made the problem that patch occurs in the flesh correction processing, set different correction coefficient, realized adaptive real-time flesh correction according to the detected colour of skin depth to crossing bright or dark excessively skin.And whole calculating process is simple, is convenient to hardware and realizes.

Description

Skin color signal correcting method
Technical field
The present invention relates to image processing method, particularly a kind of skin color signal correcting method.
Background technology
ITU-R BT.601 is that (standarddefinition television, SDTV) image digitazation standard are used for the television image of 525 scan lines and 625 scan lines is carried out digital coding an international standard definition television.The YCbCr color space is the part of ITU-RBT-601, wherein Y is a luminance signal, be defined as [16,235] 8 bit binary data in the scope, Cb is a color difference signal, is defined as [16,240] 8 bit binary data in the scope, Cr is a color difference signal, is defined as 8 bit binary data in [16,240] scope.
Flesh correction is just becoming a critical function module in the video image process chip, and it can detect the colour of skin (exposed skin) of people in the image in real time, and proofreaies and correct, and makes it the truer colour of skin near the people.In the YCbCr color space, colour of skin picture element always accumulates in certain spatial dimension, i.e. colour of skin distributed areas, and as shown in Figure 1 in the accompanying drawing, therefrom as can be seen, along with the difference of Y, the distribution of Cb, Cr is discrepant.And present a lot of algorithms all only are conceived to color difference signal itself is handled, do not consider the influence of luminance signal, this just causes crossing bright or dark excessively skin treatments effect undesirable, occurs patch etc. easily, can not proofread and correct adaptively according to the depth of the colour of skin.And, just detect area of skin color usually based on the edge detection algorithm in HSI space, do not do flesh correction, do not consider the influence of luminance signal to the colour of skin yet, and relate to complex mathematical computational process, so the hardware realization is very difficult, is not easy to be used in the image real time processing system.
Summary of the invention
Technical problem to be solved by this invention is at the influence of luminance signal in the flesh correction to the colour of skin, to propose skin color signal correcting method.
The technical scheme that the present invention solve the technical problem employing is that skin color signal correcting method may further comprise the steps: (1) input image brightness signal to be corrected and color difference signal; (2) according to the value of luminance signal color difference signal is done preliminary treatment:
1. when 16≤Y≤120:
Cb _ deal = m 1 + 47 × ( Cb - m 1 ) j 1
Cr _ deal = n 1 + 39 × ( Cr - n 1 ) k 1
m 1 = 108 + 10 × ( 120 - Y ) 128 j 1 = 23 + 24 × ( Y - 16 ) 128
In the formula n 1 = 154 - 10 × ( 120 - Y ) 128 k 1 = 20 + 19 × ( Y - 16 ) 128
2. when 120<Y<180:
Cb_deal=Cb
Cr_deal=Cr
3. when Y 〉=180:
Cb _ deal = m 2 + 47 × ( Cb - m 2 ) j 2
Cr _ deal = n 2 + 39 × ( Cr - n 2 ) k 2
In the formula m 2 = 108 + 10 × ( Y - 180 ) 64 j 2 = 14 + 32 × ( 235 - Y ) 64
n 2 = 154 + 22 × ( Y - 180 ) 64 k 2 = 10 + 32 × ( 235 - Y ) 64
In the following formula, Y is a luminance signal, and Cb, Cr are color difference signal, and Cb_deal, Cr_deal are pretreated color difference signal;
(3) judge whether pretreated color difference signal is in the area of skin color, if then enter step (4), otherwise enter step (6): Rule of judgment is: when Cb_deal, Cr_deal satisfy 3 &times; ( x - 1.6 ) 2 2048 + 5 &times; ( y - 2.4 ) 2 1024 < 1 The time, pretreated color difference signal is in the colour of skin distributed areas, otherwise just is not in the colour of skin distributed areas,
x=-0.819×(Cb_deal-109)+0.574×(Cr_deal-152)
In the formula,
y=-0.574×(Cb_deal-109)-0.819×(Cr_deal-152)
In the following formula, Cb_deal, Cr_deal are pretreated color difference signal;
(4) pretreated color difference signal is made flesh correction:
Cb _ out = Cb _ deal + ( Cb _ deal - mid _ cb ) ftc _ coefficient
Cr _ out = Cr _ deal + ( Cr _ deal - mid _ cr ) ftc _ coefficient
In the following formula, Cb_deal, Cr_deal is pretreated color difference signal, Cb_out is the value behind the Cb_deal flesh correction, Cr_out is the value behind the Cr_deal flesh correction, mid_cb is the pairing Cb value of the central value of colour of skin distributed areas, mid_cr is the pairing Cr value of the central value of colour of skin distributed areas, draw by a large amount of experiments, Cb in the colour of skin distributed areas, the Cr span is generally Cb ∈ [75,128], Cr ∈ [130,165], central value (the mid_cb of colour of skin distributed areas, mid_cr) Dui Ying Cb, the Cr span is respectively: mid_cb ∈ [100,110], mid_cr ∈ [130,140], ftc_coefficient is a colour of skin reinforcing coefficient, and value is 2 or 4;
(5) output luminance signal, the color difference signal behind the flesh correction;
(6) luminance signal and the color difference signal of output step (1) input.
By getting different ftc_coefficient values, the further strength grade of refinement flesh correction.To being in different spans of Cb_deal, Cr_deal in the area of skin color as Rule of judgment to the concrete value of ftc_coefficient, as: in Cb_deal 〉=105 and Cr_deal 〉=140 o'clock, ftc_coefficient=2, and for Cb_deal, the Cr_deal of other scope, then get ftc_coefficient=4, thus the colour of skin adaptively in the correcting image.By actual verification, mid_cb=105, mid_cr=130, during ftc_coefficient=4, the result of image processing is more satisfactory.
The invention has the beneficial effects as follows, considered the influence of luminance signal to the colour of skin, solved effectively and made the problem that patch occurs in the flesh correction processing crossing bright or dark excessively skin, set different correction coefficient according to the detected colour of skin depth, realized adaptive real-time flesh correction, and whole calculating process is simple, is convenient to hardware and realizes, can be widely used in the image quality improving chip of video image processing.
Description of drawings
Fig. 1 is the three-dimensional cluster feature figure of the colour of skin in the YCbCr space.
Fig. 2 is the flow chart of algorithm of the present invention.
Embodiment
This algorithm is optimized and verified that the image pixel of selection is 1366*768 by Matlab6.5 programming.At first, adopt the imread () function of Matlab6.5 to read in image, and process rgb2ycbcr () function arrives the YCbCr color space with image transitions, isolate Y, Cb, three signal components of Cr, carry out flesh correction with foregoing algorithmic formula again, pixel value after will proofreading and correct by ycbcr2rgb () function is at last changed back rgb color space, and shows image after flesh correction is handled with imshow () function.
Provide specific embodiments of the invention below in conjunction with concrete input data.
Specific embodiment 1: input Y=80, Cb=101, Cr=145, because 16≤Y≤120, so Cb, Cr are carried out preliminary treatment, getting behind the Y=80 substitution preliminary treatment formula:
m 1 = 108 + 10 &times; ( 120 - 80 ) 128 j 1 = 23 + 24 &times; ( 80 - 16 ) 128
n 1 = 154 - 10 &times; ( 120 - 80 ) 128 k 1 = 20 + 19 &times; ( 80 - 16 ) 128
Cb _ deal = m 1 + 47 &times; ( 101 - m 1 ) j 1 = 98
Cr _ deal = n 1 + 39 &times; ( 145 - n 2 ) k 1 = 143
Whether the value of then judging Cb_deal, Cr_deal is in the colour of skin distributed areas, respectively
x=-0.819×(98-109)+0.574×(143-152)
y=-0.574×(98-109)-0.819×(143-152)
The substitution equation can get: 3 &times; ( x - 1.6 ) 2 2048 + 5 &times; ( y - 2.4 ) 2 1024 = 0.6516 < 1 , Then Cb_deal, Cr_deal are in the colour of skin distributed areas, Cb_deal, Cr_deal are done flesh correction, because this moment Cb_deal=98≤105, then get ftc_coefficient=4, Cb_deal=98, Cr_deal=143, mid_cb=105, mid_cr=130, ftc_coefficient=4 substitution flesh correction formula can get:
Cb _ out = 98 + ( 98 - 105 ) 4 = 100
Cr _ out = 143 + ( 143 - 130 ) 4 = 149
Export 80,100,149 then, compare with Y=80, Cb=101, the Cr=145 of input,
Make after handling like this to be in dark skin pixel value and to have obtained correction, the image that show this moment is then more near people's the true colour of skin.
Specific embodiment 2: input Y=223, Cb=106, Cr=136, because Y 〉=180, so Cb, Cr are carried out preliminary treatment, getting behind the Y=223 substitution preliminary treatment formula:
m 2 = 108 + 10 &times; ( 223 - 180 ) 64 j 2 = 14 + 32 &times; ( 235 - 223 ) 64
n 2 = 154 + 22 &times; ( 223 - 180 ) 64 k 2 = 10 + 32 &times; ( 235 - 223 ) 64
Cb _ deal = m 2 + 47 &times; ( 106 - m 2 ) j 2 = 105
Cr _ deal = n 2 + 39 &times; ( 136 - n 2 ) k 2 = 142
Judge then whether Cb_deal, Cr_deal are in the colour of skin distributed areas, respectively
x=-0.819×(105-109)+0.574×(142-152)
y=-0.574×(105-109)-0.819×(142-152)
The substitution equation can get: 3 &times; ( x - 1.6 ) 2 2048 + 5 &times; ( y - 2.4 ) 2 1024 = 0.3576 < 1 , Then Cb_deal, Cr_deal are in the colour of skin distributed areas, Cb_deal, Cr_deal are done flesh correction, because ftc_coefficient=2 item is got in Cb=105 〉=105 and Cr=142 〉=140, Cb_deal=105, Cr_deal=142, mid_cb=105, mid_cr=130, ftc_coefficient=2 substitution flesh correction formula can get:
Cb _ out = 105 + ( 105 - 105 ) 2 = 107
Cr _ out = 142 + ( 142 - 130 ) 2 = 139
Export 223,107,139 then, compare with Y=223, Cb=106, the Cr=136 of input, make after handling like this to be in bright skin pixel value and to have obtained correction, the image of demonstration this moment is then more near people's the true colour of skin.
Specific embodiment 3: input Y=23, Cb=89, Cr=165, because 16≤Y≤120, so Cb, Cr are carried out preliminary treatment, getting behind the Y=23 substitution preliminary treatment formula:
m 1 = 108 + 10 &times; ( 120 - 23 ) 128 j 1 = 23 + 24 &times; ( 80 - 23 ) 128
n 1 = 154 - 10 &times; ( 120 - 23 ) 128 k 1 = 20 + 19 &times; ( 80 - 23 ) 128
Cb _ deal = m 1 + 47 &times; ( 89 - m 1 ) j 1 = 64
Cr _ deal = n 1 + 39 &times; ( 165 - n 2 ) k 1 = 181
Judge then whether Cb_deal, Cr_deal are in the colour of skin distributed areas, respectively
x=-0.819×(64-109)+0.574×(181-152)
y=-0.574×(64-109)-0.819×(181-152)
The substitution equation can get: 3 &times; ( x - 1.6 ) 2 2048 + 5 &times; ( y - 2.4 ) 2 1024 = 3.9096 > 1 , Then Cb_deal, Cr_deal are not in the colour of skin distributed areas, Cb_deal, Cr_deal are not done flesh correction, output 23,89,165 is compared no change with Y=23, Cb=89, the Cr=165 of input, because Cb_deal, Cr_deal do not belong in the colour of skin distributed areas.At this moment, the image no change that shows this moment.

Claims (2)

1, skin color signal correcting method is characterized in that, may further comprise the steps:
(1) input image brightness signal to be corrected and color difference signal;
(2) according to the value of luminance signal color difference signal is done preliminary treatment:
1. when 16≤Y≤120:
Cb _ deal = m 1 + 47 &times; ( Cb - m 1 ) j 1
Cr _ deal = n 1 + 39 &times; ( Cr - n 1 ) k 1
m 1 = 108 + 10 &times; ( 120 - Y ) 128 j 1 = 23 + 24 &times; ( Y - 16 ) 128
In the formula n 1 = 154 - 10 &times; ( 120 - Y ) 128 k 1 = 20 + 19 &times; ( Y - 16 ) 128
2. when 120<Y<180:
Cb_deal=Cb
Cr_deal=Cr
3. when Y 〉=180:
Cb _ deal = m 2 + 47 &times; ( Cb - m 2 ) j 2
Cr _ deal = n 2 + 39 &times; ( Cr - n 2 ) k 2
In the formula m 2 = 108 + 10 &times; ( Y - 180 ) 64 j 2 = 14 + 32 &times; ( 235 - Y ) 64
n 2 = 154 + 22 &times; ( Y - 180 ) 64 k 2 = 10 + 32 &times; ( 235 - Y ) 64
In the following formula, Y is a luminance signal, and Cb, Cr are color difference signal, and Cb_deal, Cr_deal are pretreated color difference signal;
(3) judge whether pretreated color difference signal is in the area of skin color, if then enter step (4), otherwise enter step (6): Rule of judgment is: when Cb_deal, Cr_deal satisfy 3 &times; ( x - 1.6 ) 2 2048 + 5 &times; ( y - 2.4 ) 2 1024 < 1 The time, pretreated color difference signal is in the colour of skin distributed areas, otherwise just is not in the colour of skin distributed areas,
x=-0.819×(Cb_deal-109)+0.574×(Cr_deal-152)
In the formula,
y=-0.574×(Cb_deal-109)-0.819×(Cr_deal-152)
In the following formula, Cb_deal, Cr_deal are pretreated color difference signal;
(4) pretreated color difference signal is made flesh correction:
Cb _ out = Cb _ deal + ( Cb _ deal - mid _ cb ) ftc _ coeffi cient
Cr _ out = Cr _ deal + ( Cr _ deal - mid _ cr ) ftc _ coeffi cient
In the following formula, Cb_deal, Cr_deal are pretreated color difference signal, Cb_out is the value behind the Cb_deal flesh correction, and Cr_out is the value behind the Cr_deal flesh correction, and mid_cb is the pairing Cb value of the central value of colour of skin distributed areas, mid_cr is the pairing Cr value of the central value of colour of skin distributed areas, described mid_cb, mid_cr scope are respectively: mid_cb ∈ [100,110], mid_cr ∈ [130,140], ftc_coefficient is a colour of skin reinforcing coefficient, and value is 2 or 4;
(5) output luminance signal, the color difference signal behind the flesh correction;
(6) luminance signal and the color difference signal of output step (1) input.
2, skin color signal correcting method as claimed in claim 1 is characterized in that, described mid_cb is 105, and mid_cr is 130.
CNB2007100482080A 2007-01-04 2007-01-04 Skin color signal correcting method Expired - Fee Related CN100571404C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2007100482080A CN100571404C (en) 2007-01-04 2007-01-04 Skin color signal correcting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2007100482080A CN100571404C (en) 2007-01-04 2007-01-04 Skin color signal correcting method

Publications (2)

Publication Number Publication Date
CN101005628A CN101005628A (en) 2007-07-25
CN100571404C true CN100571404C (en) 2009-12-16

Family

ID=38704442

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2007100482080A Expired - Fee Related CN100571404C (en) 2007-01-04 2007-01-04 Skin color signal correcting method

Country Status (1)

Country Link
CN (1) CN100571404C (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096911B (en) * 2011-01-31 2012-08-01 格科微电子(上海)有限公司 Luminance raising method
CN103065290B (en) * 2013-01-23 2016-05-18 广东欧珀移动通信有限公司 In photo, carry out the apparatus and method of flesh correction
CN106456005B (en) * 2014-06-13 2020-12-08 宝洁公司 Apparatus and method for modifying keratinous surfaces
WO2015191821A2 (en) * 2014-06-13 2015-12-17 The Procter & Gamble Company Apparatus and methods for modifying keratinous surfaces
CN105096238A (en) * 2015-03-27 2015-11-25 浙江慧谷信息技术有限公司 Visual lossless CMYK dynamic conversion algorithm
US11116302B2 (en) 2015-06-11 2021-09-14 The Procter & Gamble Company Apparatus and methods for modifying keratinous surfaces
CN109429014A (en) * 2017-09-04 2019-03-05 扬智科技股份有限公司 Video coding circuit, video output system and relevant video signal conversion method
CN114945087B (en) * 2022-06-06 2023-10-03 安谋科技(中国)有限公司 Image processing method, device, equipment and storage medium based on face characteristics

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1116394A (en) * 1994-04-15 1996-02-07 松下电器产业株式会社 Circuit for regenerating skin color of picture signal
CN1261170A (en) * 1998-12-21 2000-07-26 伊士曼柯达公司 Method and apparatus for remedying parts of images by color parameters
CN1719882A (en) * 2004-07-09 2006-01-11 Lg电子株式会社 Display apparatus and method for reproducing color therewith

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1116394A (en) * 1994-04-15 1996-02-07 松下电器产业株式会社 Circuit for regenerating skin color of picture signal
CN1261170A (en) * 1998-12-21 2000-07-26 伊士曼柯达公司 Method and apparatus for remedying parts of images by color parameters
CN1719882A (en) * 2004-07-09 2006-01-11 Lg电子株式会社 Display apparatus and method for reproducing color therewith

Also Published As

Publication number Publication date
CN101005628A (en) 2007-07-25

Similar Documents

Publication Publication Date Title
CN100571404C (en) Skin color signal correcting method
Shi et al. Normalised gamma transformation‐based contrast‐limited adaptive histogram equalisation with colour correction for sand–dust image enhancement
CN103593830B (en) A kind of low illumination level video image enhancement
CN114049283A (en) Self-adaptive gray gradient histogram equalization remote sensing image enhancement method
US8295596B1 (en) Adaptive histogram-based video contrast enhancement
CN101303765B (en) Method for reinforcing image contrast based on image mean-squared deviation
CN101686306A (en) Visual processing device, visual processing method, visual processing program, integrated circuit, display device, imaging device, and mobile information terminal
CN113507598B (en) Video picture display method, device, terminal and storage medium
JP5847341B2 (en) Image processing apparatus, image processing method, program, and recording medium
CN110175969A (en) Image processing method and image processing apparatus
CN114626967A (en) Digital watermark embedding and extracting method, device, equipment and storage medium
US9571744B2 (en) Video processing method and apparatus
Perez-Daniel et al. Watermarking of HDR images in the spatial domain with HVS-imperceptibility
CN101453558A (en) Video image contrast improving method
CN112488968B (en) Image enhancement method for hierarchical histogram equalization fusion
CN113658043A (en) Image processing method, image processing device, electronic equipment and readable storage medium
CN107358592B (en) Iterative global adaptive image enhancement method
CN112381073A (en) IQ (in-phase/quadrature) adjustment method and adjustment module based on AI (Artificial Intelligence) face detection
Chen et al. Dynamic color image resolution compensation under low light
US8086065B2 (en) Apparatus and method for contrast enhancement
CN115484408A (en) Snow surface reflection coefficient generation method and device based on high-precision camera shooting
CN115423724A (en) Underwater image enhancement method, device and medium for reinforcement learning parameter optimization
EP2290945B1 (en) Picture correcting device, picture correcting program and picture correcting method
CN114612344A (en) Image sharpening device and method
KR20120083671A (en) Low illumination intensity image enhancement method and apparatus using histogram normalization and gamma correction

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20091216

Termination date: 20220104