CN104933390A - Method and device for generating skin image and electronic device - Google Patents

Method and device for generating skin image and electronic device Download PDF

Info

Publication number
CN104933390A
CN104933390A CN201410102423.4A CN201410102423A CN104933390A CN 104933390 A CN104933390 A CN 104933390A CN 201410102423 A CN201410102423 A CN 201410102423A CN 104933390 A CN104933390 A CN 104933390A
Authority
CN
China
Prior art keywords
image
value
frame
skin
determining unit
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.)
Granted
Application number
CN201410102423.4A
Other languages
Chinese (zh)
Other versions
CN104933390B (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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to CN201410102423.4A priority Critical patent/CN104933390B/en
Publication of CN104933390A publication Critical patent/CN104933390A/en
Application granted granted Critical
Publication of CN104933390B publication Critical patent/CN104933390B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment of the invention provides a method and device for generating a skin image and an electronic device. The device for generating the skin image comprises a first determining unit used for determining an illumination condition for image shooting; and a first image generating unit used for generating a skin image corresponding to an image by adopting a processing mode corresponding to the illumination condition. According to the embodiment of the invention, the skin image is generated by different processing modes according to the illumination condition for image shooting, so that clear skin images can be generated under different illumination conditions.

Description

Generate the method for skin image, device and electronic equipment
Technical field
The present invention relates to image processing field, particularly relate to a kind of method, device and the electronic equipment that generate skin image.
Background technology
Skin image is the image generated according to the pixel corresponding to human body skin in image, and in skin image, the pixel corresponding to human body skin can be highlighted.Along with popularizing of video image acquisition equipment, the application of skin image is also increasingly extensive.The aspects such as relatively more typical application at present comprises recognition of face and detection, Expression Recognition, gesture identification, human body detect, new human-machine interface technology.
Based in the remote control technology of gesture identification, first the picture of shot by camera is converted into corresponding skin image by gesture identification equipment, and the hand region of people in detection of skin image, and then the hand region detected is mated with gesture template, identify the gesture of people according to matching result, finally export corresponding control signal by opertaing device according to the gesture of people.
Wherein, the gesture identification equipment of prior art adopts following formula (1) to generate skin image,
Skin(x,y)=r(x,y)-((g(x,y)+b(x,y))>>1) (1)
In formula (1), Skin (x, y) be that in this skin image, position coordinates is (x, the pixel value of pixel y), r (x, y), g (x, y), b (x, y) representing position coordinates in the picture of shot by camera is respectively color-values R value, G value, the B value of the pixel of (x, y), and " > > 1 " refers to and the bit number of result of calculation is moved right 1;
In the prior art, that gesture identification equipment can adopt following formula (2) to calculate the absolute value of difference and (Sumof Absolute Differences, SAD), and is defined as the hand region of this skin image by the region with minimum SAD,
SAD = Σ ( x 0 , y 0 ) ∈ TARGET ( x , y ) ∈ SA abs ( Skin current ( x , y ) - Skin prev ( x 0 , y 0 ) ) - - - ( 2 )
In formula (2), Skin current(x, y) represents position coordinates in current skin image is the pixel value of the pixel of (x, y), wherein, and the position coordinates of pixel in the region of search of (x, y) ∈ current skin image; Skin prev(x 0, y 0) to represent position coordinates in last skin image be (x 0, y0) the pixel value of pixel, wherein, (x 0, y 0) the last skin image of ∈ hand region in the position coordinates of pixel; The computing of abs representative " taking absolute value ".
Above it should be noted that, just conveniently to technical scheme of the present invention, clear, complete explanation is carried out to the introduction of technical background, and facilitate the understanding of those skilled in the art to set forth.Only can not think that technique scheme is conventionally known to one of skill in the art because these schemes have carried out setting forth in background technology part of the present invention.
Summary of the invention
At present, when generating skin image, for the image obtained under normal lighting conditions, skin picture clearly can be generated according to prior art, but for the image obtained under backlight or low lighting condition, then skin image clearly cannot be generated according to prior art.
The embodiment of the present invention provides a kind of method, device and the electronic equipment that generate skin image, its object is to all can generate skin image clearly under different lighting conditions.
According to the first aspect of the embodiment of the present invention, provide a kind of device generating skin image, this device comprises:
First determining unit, it is for determining lighting condition when taking image;
First image generation unit, it adopts the processing mode corresponding with described lighting condition to generate the skin image corresponding with described image.
According to the second aspect of the embodiment of the present invention, it has the device of the generation skin image as described in the first aspect of the embodiment of the present invention.
According to the third aspect of the embodiment of the present invention, provide a kind of method generating skin image, the method comprises:
Determine lighting condition when taking image;
The processing mode corresponding with described lighting condition is adopted to generate the skin image corresponding with described image.
Beneficial effect of the present invention is: according to lighting condition during shooting image, different processing modes can be adopted to generate skin image, thus, can generate skin image clearly under different lighting conditions.
With reference to explanation hereinafter and accompanying drawing, disclose in detail particular implementation of the present invention, specifying principle of the present invention can adopted mode.Should be appreciated that, thus embodiments of the present invention are not restricted in scope.In the spirit of claims and the scope of clause, embodiments of the present invention comprise many changes, amendment and are equal to.
The feature described for a kind of embodiment and/or illustrate can use in one or more other embodiment in same or similar mode, combined with the feature in other embodiment, or substitutes the feature in other embodiment.
Should emphasize, term " comprises/comprises " existence referring to feature, one integral piece, step or assembly when using herein, but does not get rid of the existence or additional of one or more further feature, one integral piece, step or assembly.
Accompanying drawing explanation
Included accompanying drawing is used to provide the further understanding to the embodiment of the present invention, which constituting a part for instructions, for illustrating embodiments of the present invention, and coming together to explain principle of the present invention with text description.Apparently, the accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.In the accompanying drawings:
Fig. 1 is the formation structure schematic diagram of the device of the generation skin image of the embodiment of the present invention 1;
Fig. 2 is the formation schematic diagram of the first determining unit of the embodiment of the present invention 1;
Fig. 3 is the formation schematic diagram of the first image generation unit of the embodiment of the present invention 2;
Fig. 4 is skin image corresponding under the low lighting shooting condition adopting the mode of embodiment 2 to generate;
Fig. 5 is skin image corresponding under the low lighting shooting condition adopting prior art to generate;
Fig. 6 is a schematic block diagram of the System's composition of the electronic equipment of the embodiment of the present invention 3;
Fig. 7 is the method flow diagram of the generation skin image of the embodiment of the present invention 4;
The method flow diagram of lighting condition when Fig. 8 is the determination shooting image of the embodiment of the present invention 4;
Fig. 9 is the method flow diagram generating skin image under the low lighting shooting condition of the embodiment of the present invention 4
Embodiment
With reference to accompanying drawing, by instructions below, aforementioned and further feature of the present invention will become obvious.In the specification and illustrated in the drawings, specifically disclose particular implementation of the present invention, which show the some embodiments that wherein can adopt principle of the present invention, will be appreciated that, the invention is not restricted to described embodiment, on the contrary, the present invention includes the whole amendments fallen in the scope of claims, modification and equivalent.
Embodiment 1
Fig. 1 is the formation schematic diagram of the device of the generation skin image of the embodiment of the present invention 1.As shown in Figure 1, device 100 comprises the first determining unit 101 and the first image generation unit 102.
Wherein, the first determining unit 101 is for determining lighting condition when taking image, and the first image generation unit 102 adopts the processing mode corresponding with this lighting condition to generate the skin image corresponding with this image.
According to embodiments of the invention 1, according to the processing mode of lighting condition determination image, thus all can generate skin image clearly under different lighting conditions, solve problems of the prior art.
Fig. 2 is the formation schematic diagram of the first determining unit of the embodiment of the present invention 1.As shown in Figure 2, the first determining unit 101 comprises the first conversion unit 201, second determining unit the 202, three determining unit 203 and the 4th determining unit 204.
Wherein, the first conversion unit 201 is for being converted into corresponding gray level image by this image; Second determining unit 202, for the gray-scale value according to pixel in this gray level image, determines the first parameter K; 3rd determining unit 203, for the gray-scale value according to pixel in the first object region of this gray level image, determines the second parameter L; 4th determining unit is used for, according to the relation of this first parameter K and the second parameter L with the threshold value preset, determining lighting condition.
In the present embodiment, the first conversion unit 201 can adopt the mode of prior art, and image is converted into gray level image, and the present embodiment repeats no more.
Second determining unit 202 according to the mean value of the gray-scale value of N1 pixel before when gray-scale value arranges from big to small in this gray level image, can be determined the first parameter K, such as, adopts following formula (3) to determine this first parameter K,
AVG = Σ ( x , y ) gray ( x , y ) N 1 - - - ( 4 ) ,
Wherein, gray (x, y) representing coordinate in this gray level image is (x, y) gray-scale value of the pixel at place, and the coordinate of front N1 pixel when gray-scale value arranges from big to small in this gray level image of (x, y) ∈, N1 is positive integer, and N1 can be the 3%-5% of total number of pixels in gray level image, such as, N1 can be 5% of total number of pixels in gray level image; Maximum gradation value can be different according to the attribute of this gray level image, and such as, this maximum gradation value can be 255 or 128.
3rd determining unit 203 according to the gray-scale value of N2 pixel before when gray-scale value arranges from big to small in the first object region of this gray level image, can determine the second parameter L.Such as, the 3rd determining unit 203 can adopt following formula (5) to determine this second parameter L,
L = Σ ( x , y ) gray ( x , y ) N 3 - - - ( 5 ) ,
Wherein, gray (x, y) representing coordinate in this gray level image is (x, y) gray-scale value of the pixel at place, and (x, the coordinate of front N2 pixel when gray-scale value arranges from big to small in the first object region of y) this gray level image of ∈, N2 is positive integer, and N2 can be the 40%-60% of pixel quantity in this first object region; This first object region is the region comprising target subject in this gray level image, and such as, this target subject can be staff or face etc.; N3 is positive integer, and N3 can be the 20%-30% of pixel quantity in this first object region, and such as N3 can be 20% of pixel quantity in this first object region.
First parameter K and/or the second parameter L and the threshold value preset can compare by the 4th determining unit 204, determine this lighting condition according to comparative result.
Such as, when this first parameter K is less than or equal to first threshold K1, and when this second parameter L is less than or equal to the 3rd threshold value L1, determine that this lighting condition is backlight, wherein, this first threshold K1 can be the arbitrary numerical value in 1.1-1.3, such as, this first threshold K1 arbitrary numerical value that can be the 1.2, three threshold value L1 can be in 70-90, such as, the 3rd threshold value L1 can be 80;
When this first parameter K is greater than Second Threshold K2, determine that described lighting condition is low illumination, wherein, this Second Threshold K2 can be the arbitrary numerical value in 1.5-2.5, and such as, this Second Threshold K2 can be 2;
When this first parameter K is greater than the 4th threshold k 3, and when being less than or equal to the 5th threshold k 4, determine that this lighting condition is normal illumination, wherein, the 4th threshold k 3 can be the arbitrary numerical value in 0.9-1.1, such as, 4th threshold k 3 can be 1,5th threshold k 4 can be the arbitrary numerical value in 1.8-2.2, and such as, the 5th threshold k 4 can be 2.
Certainly, the 4th determining unit 204 determines that the mode of lighting condition is not limited thereto, and according to actual needs, can also arrange other criterion to determine this lighting condition.
In the present embodiment, the first image generation unit 102 adopts the processing mode corresponding with lighting condition to process image, thus generates the skin image corresponding with this image.
Wherein, when the first determining unit 101 determines that this lighting condition is normal illumination, first image generation unit 102 can according to the color-values of pixel in this image, generate corresponding skin image, such as, it is the pixel value Skin (x, y) of the pixel of (x, y) that first image generation unit 102 can adopt above-mentioned formula (1) to generate position coordinates in skin image.
When the first determining unit 101 determines that this lighting condition is backlight, the first image generation unit 102 can according to the color-values of pixel in this image, and the gray-scale value of pixel in the gray level image corresponding with this image, generates the skin image corresponding with this image.Such as, it is the pixel value Skin_backlight (x, y) of the pixel of (x, y) that the first image generation unit 102 can adopt following formula (6)-(7) to generate position coordinates in skin image,
Skin_backlight(x,y)=Skin(x,y)+compensate(x,y) (6),
Wherein,
Wherein, gray (x, y) represents coordinate in this gray level image is the gray-scale value of the pixel at (x, y) place; N4 is penalty coefficient, and wherein, N4 can be the arbitrary numerical value in 25-35, and such as N4 can be 30; The implication of Skin (x, y) can with reference to above-mentioned formula (1).
According to embodiments of the invention, according to lighting condition during shooting image, different processing modes can be adopted to generate skin image, thus, skin image clearly can be generated under different lighting conditions.
Embodiment 2
The embodiment of the present invention 2 provides a kind of device generating skin image.Based on embodiment 1, in the present embodiment, be described for the structure of the first image generation unit 102 under low lighting condition, the content identical with embodiment 1 no longer repeated herein, the different content with embodiment 1 is described in detail.
Fig. 3 is the formation schematic diagram of the first image generation unit of the embodiment of the present invention 2.As shown in Figure 3, the first image generation unit 102 comprises the second conversion unit the 301, five determining unit 302 and the second image generation unit 303.
Wherein, the second conversion unit 301 can detect that the image of the continuous shooting of target subject is converted into corresponding YCbCr image; 5th determining unit 302, according to the chromatic value of other frame beyond the first frame of chroma reference value and this YCbCr image, determines the output chromatic value of other frame; Second image generation unit 303, according to this output chromatic value and brightness value of this other frame, generates corresponding skin image.
In addition, in the present embodiment, the device 100 generating skin image can also have the 6th determining unit (not shown), and it determines this chroma reference value for the first frame based on this YCbCr image.
In the present embodiment, the second conversion unit 301 can adopt the mode of prior art, and can detect that the image of the continuous shooting of target subject is converted into YCbCr image, the present embodiment repeats no more.Wherein, this target subject can be staff or face etc.
In addition, to the detection of target subject in image, can be realized by local binary patterns of the prior art (LocalBinary Patterns, LBP) sorter, the embodiment of the present invention repeats no more.
6th determining unit can according to the chromatic value of N5 pixel before when chromatic value arranges from big to small in the second target area of the first frame of this YCbCr image, determine this chroma reference value, this second target area is the region comprising target subject in this first frame.Such as, the 5th determining unit can adopt following formula (8)-(9) to determine chroma reference value Cbr and Crr,
Cbr = Σ ( x , y ) Cb ( x , y ) N 6 - - - ( 8 ) ,
Crr = Σ ( x , y ) Cr ( x , y ) N 6 - - - ( 9 ) ,
Wherein, Cb (x, y), Cr (x, y) representing coordinate in this first frame is respectively (x, Cb and the Cr chromatic value of pixel y), the coordinate of front N5 pixel when chromatic value Cb or Cr arranges from big to small in (x, y) ∈ second target area, wherein, N5 can be the 40%-60% of pixel quantity in this second target area; N6 and N7 can be the 20%-30% of pixel quantity in this second target area, and such as, N6 and N7 can be 20% of pixel quantity in this second target area.
5th determining unit 302 can according to the absolute value of the chromatic value of other frame outside this YCbCr image first frame and the difference of chroma reference value, and the first reference value R, determines the output chromatic value of this other frame.When the first reference value R is more than or equal to this absolute value, determine that this output chromatic value is the difference of the first reference value R and this absolute value, when this first reference value is less than this absolute value, determine that this output chromatic value is zero.
Such as, the 5th determining unit 302 can determine the output chromatic value of each frame in other frame in the following way:
Determine the absolute value of the chromatic value input_Cb (x, y) of this other frame and the difference of input_Cr (x, y) and this chroma reference value Cbr and Crr respectively, that is,
temp_cb=abs(input_Cb(x,y)-Cbr) (10)
temp_cr=abs(input_Cr(x,y)-Crr) (11)
When this absolute value is greater than the first reference value R, the first reference value R is assigned to this absolute value, otherwise this absolute value remains unchanged, that is,
temp_cb>R?R:temp_cb (12)
temp_cr>R?R:temp_cr (13)
Using the difference of this first reference value R and this absolute value as this output chromatic value, that is,
output_Cb(x,y)=R-temp_cb (14)
output_Cr(x,y)=R-temp_cr (15)
Wherein, output_Cb (x, y) and output_Cr (x, y) represents in each frame of this other frame, and coordinate is the output chromatic value of the pixel of (x, y); First reference value R can be the arbitrary numerical value between 25-35.
Certainly, above citing is example, and the 5th determining unit 302 can also adopt other mode to determine to export chromatic value.
Second image generation unit 303 according to the brightness value of other frame and can export chromatic value, generates the color-values of this other frame, and generates skin image corresponding to this other frame according to this color-values.
In the present embodiment, the second image generation unit 303 can adopt either type of the prior art, generates color-values, thus transfer this other frame to RGB image from YCbCr image according to brightness value and output chromatic value.Such as, following formula can be adopted to generate color-values
r(x,y)=1.164×(Y(x,y)-16)+1.596×(output_Cr(x,y)-128) (16)
g(x,y)=
(17)
1.164×(Y(x,y)-16)-0.392×(output_Cb(x,y)-128)-0.813×(output_Cr(x,y)-128)
b(x,y)=1.164×(Y(x,y)-16)+2.017×(output_Cb(x,y)-128) (18)
Wherein, Y (x, y) represents in each frame of this other frame, and coordinate is the brightness value of the pixel of (x, y); R (x, y), g (x, y), b (x, y) represent color-values R value, G value, the B value of the pixel that coordinate is (x, y) respectively.
In the present embodiment, the second image generation unit 303 can adopt the above-mentioned formula (1) of embodiment 1 to determine Skin (x, y), thus generates skin image.
Fig. 4 is skin image corresponding under the low lighting shooting condition adopting the mode of embodiment 2 to generate, and Fig. 5 is skin image corresponding under the low lighting shooting condition adopting prior art to generate.From Fig. 4 and Fig. 5, under low lighting shooting condition, adopt the mode of embodiment 2 can generate skin image more clearly.
According to embodiments of the invention, according to lighting condition during shooting image, corresponding processing mode can be adopted to generate skin image, thus, even if under the shooting condition of low illumination, also can generate skin image clearly.
Embodiment 3
The embodiment of the present invention provides a kind of electronic equipment, and this electronic equipment comprises the device of the generation skin image as described in embodiment 1 ~ 2.
Fig. 6 is a schematic block diagram of the System's composition of the electronic equipment 600 of the embodiment of the present invention 3, and this electronic equipment can be such as the gesture identification equipment for gesture identification.As shown in Figure 6, this electronic equipment 600 can comprise central processing unit 601 and storer 602; Storer 602 is coupled to central processing unit 601.It should be noted that this figure is exemplary; The structure of other types can also be used, supplement or replace this structure, to realize telecommunications functions or other functions.
In one embodiment, the function generating the device of skin image can be integrated in central processing unit 601.Wherein, central processing unit 601 can be configured to:
For determining lighting condition when taking image, and the processing mode corresponding with described lighting condition is adopted to generate the skin image corresponding with described image;
Described image is converted into corresponding gray level image, according to the mean value of the gray-scale value of N1 pixel before when gray-scale value arranges from big to small in described gray level image, determine the first parameter, according to the gray-scale value of N2 pixel before when gray-scale value arranges from big to small in the first object region of described gray level image, determine the second parameter, described first object region is the region comprising target subject in described gray level image, when described first parameter is less than or equal to first threshold, and when described second parameter is less than or equal to the 3rd threshold value, determine that described lighting condition is backlight, when described first parameter is greater than Second Threshold, determine that described lighting condition is low illumination, wherein, described first threshold is 1.1-1.3, described Second Threshold is 1.5-2.5, described 3rd threshold value is 70-90,
When described lighting condition is backlight, according to the gray-scale value of pixel in the gray level image corresponding with described image, and the color-values of pixel in described image, generate described skin image;
When described lighting condition is low illumination, can detect that the described image of the continuous shooting of target subject is converted into corresponding YCbCr image, the chromatic value of other frame beyond the first frame of the chroma reference value determined according to the first frame based on described YCbCr image and described YCbCr image, determine the output chromatic value of other frame described, according to brightness value and the described output chromatic value of other frame described, generate the skin image that other frame described is corresponding;
According to the chromatic value of N5 pixel before when chromatic value arranges from big to small in the second target area of the first frame of described YCbCr image, determine described chroma reference value, described second target area is the region comprising target subject in the first frame of described YCbCr image;
Determine the absolute value of the described described chromatic value of other frame and the difference of described chroma reference value, when the first reference value be greater than or described absolute value time, described output chromatic value is the difference of the first reference value and described absolute value, when described absolute value is greater than described first reference value, described output chromatic value is zero;
According to described brightness value and the described output chromatic value of other frame described, generate the color-values of other frame described, and generate skin image corresponding to other frame described according to described color-values.
In another embodiment, generate skin image device can with central processing unit 601 separate configuration, such as the device generating skin image can be configured to the chip be connected with central processing unit 601, be realized the function of the device generating skin image by the control of central processing unit.
In addition, central processing unit 601 can also be configured to the skin image according to generating, and identifies gesture, about identifying the concrete mode of gesture, and can explanation to gesture identification equipment in REFERENCE TO RELATED background technology.。
As shown in Figure 6, electronic equipment 600 can also comprise: communication module 603, input block 604, display 605, power supply 606.Wherein, such as can via the picture etc. of this input block to this electronic equipment input shot by camera, in addition, this electronic equipment 600 can also replace input block 604 with image unit (scheming not shown), directly can pass through image unit pictures taken thus; In addition, electronic equipment 600 can also export the result etc. of gesture identification to miscellaneous equipment by communication module 603; In addition, electronic equipment 600 can also be Showed Picture by display 605.It should be noted that subscriber equipment 600 is also not necessary to all parts comprised shown in Fig. 6; In addition, subscriber equipment 600 can also comprise the parts do not illustrated in Fig. 6, can with reference to prior art.
As shown in Figure 6, central processing unit 601, sometimes also referred to as controller or operational controls, can comprise microprocessor or other processor devices and/or logical unit, and this central processing unit 601 receives and inputs and control the operation of all parts of subscriber equipment 600.
Wherein, storer 602 can be such as one or more of in buffer, flash memory, hard disk driver, removable medium, volatile memory, nonvolatile memory or other appropriate device.Execution program for information about can be stored.And central processing unit 601 can perform this program that this storer 602 stores, to realize information storage or process etc.The function of miscellaneous part and existing similar, repeats no more herein.Each parts of subscriber equipment 600 can be realized by specialized hardware, firmware, software or its combination, and do not depart from scope of the present invention.
Embodiment 4
The embodiment of the present invention 4 provides a kind of method generating skin image, and corresponding to the device of the generation skin image described in embodiment 1-2, the content identical with embodiment 1-2 repeats no more.
Fig. 7 is the method flow diagram of the generation skin image of the embodiment of the present invention 4, and as described in Figure 7, the method comprises:
Step 701, determines lighting condition when taking image;
Step 702, adopts the processing mode corresponding with described lighting condition to generate the skin image corresponding with described image.
The method flow diagram of lighting condition when Fig. 8 is the determination shooting image of the embodiment of the present invention 4, as shown in Figure 8, the method comprises:
Step 801, is converted into corresponding gray level image by described image;
Step 802, according to the mean value of the gray-scale value of N1 pixel before when the gray-scale value of pixel arranges from big to small in described gray level image, determines the first parameter;
Step 803, according to the gray-scale value of N2 pixel before when gray-scale value arranges from big to small in the first object region of described gray level image, determines the second parameter;
Step 804, when described first parameter is less than first threshold, and when described second parameter is less than the 3rd threshold value, determines that described lighting condition is backlight, when described first parameter is greater than Second Threshold, determines that described lighting condition is low illumination.
In the present embodiment, the specific works mode of each step 801-804 please refer to the specific works mode of corresponding units in embodiment 1-2, repeats no more herein.
Fig. 9 is the method flow diagram generating skin image under the low lighting shooting condition of the embodiment of the present invention 4, and as shown in Figure 9, the method comprises:
Step 901, can detect that the described image of the continuous shooting of target subject is converted into corresponding YCbCr image;
Step 902, according to the chromatic value of other frame beyond the first frame of chroma reference value and described YCbCr image, determines the output chromatic value of other frame described;
Step 903, according to brightness value and the described output chromatic value of other frame described, generates the skin image that other frame described is corresponding.
In the present embodiment, the specific works mode of each step 901-903 please refer to the specific works mode of corresponding units in embodiment 2, repeats no more herein.
In addition, in the present embodiment, when determining that lighting condition is normal lighting conditions, according to the color-values of pixel in image, corresponding skin image can be generated; When determining that lighting condition is backlight and is, can according to the color-values of pixel in image, and the gray-scale value of pixel in the gray level image corresponding with this image, generate corresponding skin image.Specific works mode can the specific works mode of corresponding units in reference example 1, repeats no more herein.
According to embodiments of the invention, according to lighting condition during shooting image, different processing modes can be adopted to generate skin image, thus, skin image clearly can be generated under different lighting conditions.
The embodiment of the present invention also provides a kind of computer-readable program, wherein when performing described program in signal conditioning package or subscriber equipment, described program makes computing machine in described signal conditioning package or subscriber equipment, perform the method for the generation skin image described in embodiment 4.
The embodiment of the present invention also provides a kind of storage medium storing computer-readable program, and wherein said computer-readable program makes computing machine in signal conditioning package or subscriber equipment, perform generation skin image method described in embodiment 4.
The embodiment of the present invention also provides a kind of computer-readable program, wherein when performing described program in signal conditioning package or base station, described program makes computing machine in described signal conditioning package or base station, perform the method for the generation skin image described in embodiment 4.
The embodiment of the present invention also provides a kind of storage medium storing computer-readable program, and wherein said computer-readable program makes computing machine in signal conditioning package or base station, perform the method for the generation skin image described in embodiment 4.
Apparatus and method more than the present invention can by hardware implementing, also can by combination of hardware software simulating.The present invention relates to such computer-readable program, when this program is performed by logical block, this logical block can be made to realize device mentioned above or component parts, or make this logical block realize various method mentioned above or step.The invention still further relates to the storage medium for storing above program, as hard disk, disk, CD, DVD, flash storer etc.
More than in conjunction with concrete embodiment, invention has been described, but it will be apparent to those skilled in the art that these descriptions are all exemplary, is not limiting the scope of the invention.Those skilled in the art can make various variants and modifications according to spirit of the present invention and principle to the present invention, and these variants and modifications also within the scope of the invention.
About the embodiment comprising above embodiment, following remarks is also disclosed:
(remarks 1) a kind of device generating skin image, this device comprises:
First determining unit, it is for determining lighting condition when taking image;
First image generation unit, it adopts the processing mode corresponding with described lighting condition to generate the skin image corresponding with described image.
(remarks 2) device as described in remarks 1, wherein, described first determining unit comprises:
First conversion unit, it is for being converted into corresponding gray level image by described image;
Second determining unit, it is for the mean value of the gray-scale value according to N1 pixel before when gray-scale value arranges from big to small in described gray level image, and determine the first parameter, N1 is positive integer;
3rd determining unit, it is for the gray-scale value according to N2 pixel before when gray-scale value arranges from big to small in the first object region of described gray level image, determine the second parameter, described first object region is the region comprising target subject in described gray level image, and N2 is positive integer;
4th determining unit, it for being less than or equal to first threshold when described first parameter, and when described second parameter is less than or equal to the 3rd threshold value, determines that described lighting condition is backlight, when described first parameter is greater than Second Threshold, determine that described lighting condition is low illumination.
(remarks 3) device as described in remarks 2, wherein, described first threshold is 1.1-1.3, and described Second Threshold is 1.5-2.5, and described 3rd threshold value is 70-90.
(remarks 4) device as described in remarks 1, wherein, when described first determining unit determines that described lighting condition is backlight, described first image generation unit is according to the gray-scale value of pixel in the gray level image corresponding with described image, and the color-values of pixel in described image, generate described skin image.
(remarks 5) device as described in remarks 1, wherein, when described first determining unit determines that described lighting condition is low illumination, described first image generation unit comprises:
Second conversion unit, its described image for the continuous shooting that target subject can be detected is converted into corresponding YCbCr image;
5th determining unit, it is for the chromatic value according to other frame beyond the first frame of the chroma reference value determined based on the first frame of described YCbCr image and described YCbCr image, determines the output chromatic value of other frame described;
Second image generation unit, it, for according to the brightness value of other frame described and described output chromatic value, generates the skin image that other frame described is corresponding.
(remarks 6) device as described in remarks 5, wherein, this device also comprises:
6th determining unit, it is for the chromatic value of N5 pixel before when chromatic value arranges from big to small in the second target area of the first frame according to described YCbCr image, determine described chroma reference value, described second target area is the region comprising target subject in the first frame of described YCbCr image, and N5 is positive integer.
(remarks 7) device as described in remarks 5, wherein,
Described 5th determining unit is for determining the absolute value of the described described chromatic value of other frame and the difference of described chroma reference value, and, when the first reference value is more than or equal to described absolute value, determine that described output chromatic value is the difference of the first reference value and described absolute value, when described first reference value is less than described absolute value, determine that described output chromatic value is zero.
(remarks 8) device as described in remarks 5, wherein,
Described second image generation unit, according to the described brightness value of other frame described and described output chromatic value, generates the color-values of other frame described, and generates skin image corresponding to other frame described according to described color-values.
(remarks 9) a kind of electronic equipment, it has the device of the generation skin image as described in remarks 1-8.
A kind of (remarks 10) method generating skin image, the method comprises:
Determine lighting condition when taking image;
The processing mode corresponding with described lighting condition is adopted to generate the skin image corresponding with described image.
(remarks 11) method as described in remarks 10, wherein, determine that lighting condition when taking image comprises:
Described image is converted into corresponding gray level image;
According to the mean value of the gray-scale value of N1 pixel before when gray-scale value arranges from big to small in described gray level image, determine the first parameter, N1 is positive integer;
According to the gray-scale value of N2 pixel before when gray-scale value arranges from big to small in the first object region of described gray level image, determine the second parameter, described first object region is the region comprising target subject in described gray level image, and N2 is positive integer;
When described first parameter is less than or equal to first threshold, and when described second parameter is less than or equal to the 3rd threshold value, determine that described lighting condition is backlight, when described first parameter is greater than Second Threshold, determine that described lighting condition is low illumination.
(remarks 12) method as described in remarks 11, wherein, described first threshold is 1.1-1.3, and described Second Threshold is 1.5-2.5, and described 3rd threshold value is 70-90.
(remarks 13) device as described in remarks 10, wherein, when determining that described lighting condition is backlight, generating the skin image corresponding with described image and comprising:
According to the gray-scale value of pixel in the gray level image corresponding with described image, and the color-values of pixel in described image, generate described skin image.
(remarks 14) method as described in remarks 10, wherein, when determining that described lighting condition is low illumination, generating the skin image corresponding with described image and comprising:
Can detect that the described image of the continuous shooting of target subject is converted into corresponding YCbCr image;
The chromatic value of other frame beyond the first frame of the chroma reference value determined according to the first frame based on described YCbCr image and described YCbCr image, determines the output chromatic value of other frame described;
According to brightness value and the described output chromatic value of other frame described, generate the skin image that other frame described is corresponding.
(remarks 15) method as described in remarks 14, wherein, described method also comprises:
According to the chromatic value of N5 pixel before when chromatic value arranges from big to small in the second target area of the first frame of described YCbCr image, determine described chroma reference value, described second target area is the region comprising target subject in the first frame of described YCbCr image, and N5 is positive integer.
(remarks 16) method as described in remarks 14, wherein, according to the chromatic value of other frame beyond the first frame of chroma reference value and described YCbCr image, determine that the output chromatic value of other frame described comprises:
Determine the absolute value of the described described chromatic value of other frame and the difference of described chroma reference value;
When the first reference value is more than or equal to described absolute value, determine that described output chromatic value is the difference of the first reference value and described absolute value, when described first reference value is less than described absolute value, determine that described output chromatic value is zero.
(remarks 17) method as described in remarks 14, wherein, according to brightness value and the described output chromatic value of other frame described, the skin image generating other frame described corresponding comprises:
According to described brightness value and the described output chromatic value of other frame described, generate the color-values of other frame described;
Skin image corresponding to other frame described is generated according to described color-values.

Claims (10)

1. generate a device for skin image, this device comprises:
First determining unit, it is for determining lighting condition when taking image;
First image generation unit, it adopts the processing mode corresponding with described lighting condition to generate the skin image corresponding with described image.
2. device as claimed in claim 1, wherein, described first determining unit comprises:
First conversion unit, it is for being converted into corresponding gray level image by described image;
Second determining unit, it is for the mean value of the gray-scale value according to N1 pixel before when gray-scale value arranges from big to small in described gray level image, and determine the first parameter, N1 is positive integer;
3rd determining unit, it is for the gray-scale value according to N2 pixel before when gray-scale value arranges from big to small in the first object region of described gray level image, determine the second parameter, described first object region is the region comprising target subject in described gray level image, and N2 is positive integer;
4th determining unit, it for being less than or equal to first threshold when described first parameter, and when described second parameter is less than or equal to the 3rd threshold value, determines that described lighting condition is backlight, when described first parameter is greater than Second Threshold, determine that described lighting condition is low illumination.
3. device as claimed in claim 2, wherein, described first threshold is 1.1-1.3, and described Second Threshold is 1.5-2.5, and described 3rd threshold value is 70-90.
4. device as claimed in claim 1, wherein, when described first determining unit determines that described lighting condition is backlight, described first image generation unit is according to the gray-scale value of pixel in the gray level image corresponding with described image, and the color-values of pixel in described image, generate described skin image.
5. device as claimed in claim 1, wherein, when described first determining unit determines that described lighting condition is low illumination, described first image generation unit comprises:
Second conversion unit, its described image for the continuous shooting that target subject can be detected is converted into corresponding YCbCr image;
5th determining unit, it is for the chromatic value according to other frame beyond the first frame of the chroma reference value determined based on the first frame of described YCbCr image and described YCbCr image, determines the output chromatic value of other frame described;
Second image generation unit, it, for according to the brightness value of other frame described and described output chromatic value, generates the skin image that other frame described is corresponding.
6. device as claimed in claim 5, wherein, this device also comprises:
6th determining unit, it is for the chromatic value of N5 pixel before when chromatic value arranges from big to small in the second target area of the first frame according to described YCbCr image, determine described chroma reference value, described second target area is the region comprising target subject in the first frame of described YCbCr image, and N5 is positive integer.
7. device as claimed in claim 5, wherein, described 5th determining unit is for determining the absolute value of the described described chromatic value of other frame and the difference of described chroma reference value, and, when the first reference value is more than or equal to described absolute value, determine that described output chromatic value is the difference of the first reference value and described absolute value, when described first reference value is less than described absolute value, determine that described output chromatic value is zero.
8. device as claimed in claim 5, wherein,
Described second image generation unit, according to the described brightness value of other frame described and described output chromatic value, generates the color-values of other frame described, and generates skin image corresponding to other frame described according to described color-values.
9. an electronic equipment, it has the device of the generation skin image as described in claim 1-8.
10. generate a method for skin image, the method comprises:
Determine lighting condition when taking image;
The processing mode corresponding with described lighting condition is adopted to generate the skin image corresponding with described image.
CN201410102423.4A 2014-03-19 2014-03-19 Generate the method, apparatus and electronic equipment of skin image Expired - Fee Related CN104933390B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410102423.4A CN104933390B (en) 2014-03-19 2014-03-19 Generate the method, apparatus and electronic equipment of skin image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410102423.4A CN104933390B (en) 2014-03-19 2014-03-19 Generate the method, apparatus and electronic equipment of skin image

Publications (2)

Publication Number Publication Date
CN104933390A true CN104933390A (en) 2015-09-23
CN104933390B CN104933390B (en) 2018-02-13

Family

ID=54120551

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410102423.4A Expired - Fee Related CN104933390B (en) 2014-03-19 2014-03-19 Generate the method, apparatus and electronic equipment of skin image

Country Status (1)

Country Link
CN (1) CN104933390B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106331513A (en) * 2016-09-06 2017-01-11 深圳美立知科技有限公司 Method and system for acquiring high-quality skin image

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080219517A1 (en) * 2007-03-05 2008-09-11 Fotonation Vision Limited Illumination Detection Using Classifier Chains
CN103262126A (en) * 2010-12-09 2013-08-21 三星电子株式会社 Image processor, lighting processor and method therefor

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080219517A1 (en) * 2007-03-05 2008-09-11 Fotonation Vision Limited Illumination Detection Using Classifier Chains
CN103262126A (en) * 2010-12-09 2013-08-21 三星电子株式会社 Image processor, lighting processor and method therefor

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
MARICOR SORIANO等: "Skin detection in video under changing illumination conditions", 《PATTERN RECOGNITION, 2000. PROCEEDINGS. 15TH INTERNATIONAL CONFERENCE ON》 *
李超纯: "基于DSP与CPLD的实时图像采集与处理系统的研究", 《中国优秀硕士学位论文全文数据库信息科技辑》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106331513A (en) * 2016-09-06 2017-01-11 深圳美立知科技有限公司 Method and system for acquiring high-quality skin image

Also Published As

Publication number Publication date
CN104933390B (en) 2018-02-13

Similar Documents

Publication Publication Date Title
US11948282B2 (en) Image processing apparatus, image processing method, and storage medium for lighting processing on image using model data
JP6993148B2 (en) Display device that carries out the video processing method
CN110460782B (en) Information acquisition device, method, inspection robot and storage medium
CN111862875B (en) Display method, display panel, display control device, and storage medium
CN111832745B (en) Data augmentation method and device and electronic equipment
CN109600605B (en) Detection method of 4K ultra-high-definition video, electronic device and computer program product
CN105894009B (en) Image fusion method and image fusion device
US10462368B1 (en) Temporal filtering based on motion detection between temporally non-adjacent pictures
CN105227882B (en) A kind of display methods and corresponding intrument
US8577141B2 (en) Method of enhancing contrast using bezier curve
KR20140019950A (en) Method for generating 3d coordinate using finger image from mono camera in terminal and mobile terminal for generating 3d coordinate using finger image from mono camera
CN105336306B (en) A kind of color temperature adjusting method and electronic equipment
US10552961B2 (en) Method, device, and non-transitory computer readable storage medium for object tracking
CN104933390A (en) Method and device for generating skin image and electronic device
CN103657089A (en) System and method for judging posture of device
CN109345600A (en) A kind of local noise-reduction method, device and terminal based on tone
CN113132639A (en) Image processing method and device, electronic equipment and storage medium
CN110111341B (en) Image foreground obtaining method, device and equipment
CN111833262A (en) Image noise reduction method and device and electronic equipment
CN111597963A (en) Light supplementing method, system, medium and electronic device for human face in image
US20210256293A1 (en) Two-way descriptor matching on deep learning accelerator
CN106683047B (en) Illumination compensation method and system for panoramic image
CN115310277A (en) Model training method, system, device and storage medium
US11004180B2 (en) Computer device and method for generating dynamic images
CN110008911B (en) Image processing method, image processing device, electronic equipment and computer readable storage medium

Legal Events

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

Granted publication date: 20180213

Termination date: 20190319

CF01 Termination of patent right due to non-payment of annual fee