[go: up one dir, main page]

CN1635545A - Method and apparatus for changing human face image - Google Patents

Method and apparatus for changing human face image Download PDF

Info

Publication number
CN1635545A
CN1635545A CNA2003101245099A CN200310124509A CN1635545A CN 1635545 A CN1635545 A CN 1635545A CN A2003101245099 A CNA2003101245099 A CN A2003101245099A CN 200310124509 A CN200310124509 A CN 200310124509A CN 1635545 A CN1635545 A CN 1635545A
Authority
CN
China
Prior art keywords
image
point
pixel
edge
frontier
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.)
Pending
Application number
CNA2003101245099A
Other languages
Chinese (zh)
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.)
SHANGHAI SCIENCE & TECHNOLOGY MUSEUM
Original Assignee
SHANGHAI SCIENCE & TECHNOLOGY MUSEUM
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 SHANGHAI SCIENCE & TECHNOLOGY MUSEUM filed Critical SHANGHAI SCIENCE & TECHNOLOGY MUSEUM
Priority to CNA2003101245099A priority Critical patent/CN1635545A/en
Publication of CN1635545A publication Critical patent/CN1635545A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

This invention discloses a human face changing method, which comprises the following steps: photograph video images and reserves it; removing the background of the non-human face; extracting human face outline to determine the image position; establishing network mode to put the face into the mode; changing the top points positions of the network mode and its mapped points change with it to fulfill the human image change.

Description

Method and device that people's face image is changed
Technical field
The present invention relates to the method and apparatus that the face image to the people changes.
Background technology
Distorting mirror is a kind of funny shit, and distortion in various degree all can take place people's face of seeing from distorting mirror, but a distorting mirror can only have a kind of change of shape, and is subjected to the restriction of mirror shape, and the visitor can not indiscriminately ad. as one wishes change shape of face.But if on computers, situation has just been made a world of difference, and the people's that can capture with video camera face image also deposits in the computer, can carry out random operation to people's face on computers then, thereby generate grotesque face.Simple distorting mirror is interesting has howed than other for this.
Summary of the invention
Purpose of the present invention just provides a kind of method that people's face image is changed.
Another object of the present invention provides a kind of device of realizing said method.
Method of the present invention comprises step:
A. capture video image comprises people's face image in the described image, and this image is preserved;
B. remove background operation, the background image of non-face part in the image is removed;
C. extract the edge of facial image, determine the position of facial image;
D. set up grid model, the facial image of determining among the step c is placed in the described grid model, set up the pixel on the facial image and the mapping relations on the summit in the grid model;
E. change the position on the summit on the described grid model, the variation of people's face image is finished in also change thereupon of Ying She pixel with it.
According to embodiments of the invention, among the described step a, image is saved as RGB 24 bit formats.Go the method for background operation to be among the described step b, at first read the image of preserving among the described step a, and add 8 Alpha passage for each pixel, set the chroma key of Alpha passage correspondence then, like this, just can obtain the image that each pixel all passes through color treatments, according to predefined color threshold value, distinguish facial image and background image, the background image of distinguishing is removed.The method of extracting the facial image edge among the described step c is, with certain a bit is starting point, judge at first whether this point is frontier point, the method of judging is edge threshold value of definition, if this around eight each points color value all this more than threshold value or below, then this point is not a frontier point, otherwise this point is exactly a frontier point; Find after the frontier point, according to the right side, the bottom right, down, lower-left, a left side, upper left, on, upper right order, whether all eight adjacent points of searching it are frontier points, if find next frontier point, write down this point so, and with this point is that central point is searched down a bit according to above-mentioned method once more again, by that analogy, all frontier points is noted, when finding certain a bit for described starting point, rim detection finishes.The grid of setting up in the described steps d has at least 10000 summits, and the pixel of the inside, facial image edge that above-mentioned steps is definite is mapped on the summit of described grid; If the quantity of described pixel is greater than the quantity on described summit, the quantity of described pixel then adopts the method that pixel is sampled and shone upon, if less than the quantity on described summit, then can be mapped to a pixel on a plurality of summits, if equate, just mapping one by one.
The device of realization said method of the present invention comprises
Image collecting device, collection comprises the video image of people's face image;
Image storage apparatus links to each other with described image collecting device, preserves described image;
Remove the background operation device, link to each other, the background image of non-face part in the image is removed with described image storage apparatus;
The edge extracting device links to each other with the described background operation device that goes, and extracts the edge of facial image;
The grid model apparatus for establishing is set up grid model;
Mapping device links to each other with described grid model apparatus for establishing with described edge extracting device, facial image is put as in the grid model, and set up the pixel on the facial image and the mapping relations on the summit in the grid model;
The grid model converting means links to each other with described mapping device, changes the position on the summit on the grid, and the variation of people's face image is finished in also change thereupon of Ying She pixel with it.
According to embodiments of the invention, described image storage apparatus is the image storage apparatus of RGB 24 bit formats.Described method of going the background operation device to remove background operation is, at first read the image of preserving among the described step a, and add 8 Alpha passage for each pixel, set the chroma key of Alpha passage correspondence then, like this, just can obtain the image that each pixel all passes through color treatments, according to predefined color threshold value, distinguish facial image and background image, the background image of distinguishing is removed.The method that the edge extracting device extracts the facial image edge is, with certain a bit is starting point, judge at first whether this point is frontier point, the method of judging is edge threshold value of definition, if this around eight each points color value all this more than threshold value or below, then this point is not a frontier point, otherwise this point is exactly a frontier point; Find after the frontier point, according to the right side, the bottom right, down, lower-left, a left side, upper left, on, upper right order, whether all eight adjacent points of searching it are frontier points, if find next frontier point, write down this point so, and with this point is that central point is searched down a bit according to above-mentioned method once more again, by that analogy, all frontier points is noted, when finding certain a bit for described starting point, rim detection finishes.The grid that described grid model apparatus for establishing is set up has at least 10000 summits; Described mapping device will be mapped on the summit of described grid by the pixel of the definite inside, facial image edge of edge extracting device; If the quantity of described pixel is greater than the quantity on described summit, the quantity of described pixel then adopts the method that pixel is sampled and shone upon, if less than the quantity on described summit, then can be mapped to a pixel on a plurality of summits, if equate, just mapping one by one.
Adopt technical scheme of the present invention, can carry out random operation, thereby generate grotesque face, increase visitor's interest facial image.
Description of drawings
Fig. 1 is the process flow diagram according to an embodiment of the method that people's face image is changed of the present invention;
Fig. 2 is the structured flowchart according to an embodiment of the device that people's face image is changed of the present invention;
Fig. 3 is the outside drawing of the foregoing description.
Embodiment
Further specify technical scheme of the present invention below in conjunction with drawings and Examples.
With reference to figure 1, Fig. 1 is the process flow diagram according to an embodiment of the method that people's face image is changed of the present invention.The method of this embodiment may further comprise the steps:
A. capture video image comprises people's face image in the image, and this image is preserved.Photographic images is to use video camera or digital camera, when taking, preferably use and the bigger background of color distortion of people's face skin, such as dark colors such as black in the back of people's face, perhaps use the such light color of pure white, this helps more easily to identify background in the step of back.After taking image, this image is preserved, in this embodiment, this image is saved 24 bit formats into RGB.Certainly, can save as other picture format, so long as computer-readable and be easy to carry out the form of Flame Image Process, the stylistic variation of this preservation should not be regarded as a departure from scope of the present invention yet.
B. remove background operation, the background image of non-face part in the image is removed.Among this embodiment, go the method for background operation to be, the image of preserving among the read step a at first, and, set the chroma key of Alpha passage correspondence then, like this for each pixel adds 8 Alpha passage, just can obtain the image that each pixel all passes through color treatments, according to predefined color threshold value, distinguish facial image and background image, the background image of distinguishing is removed.Here just can find out, because people's skin color is relatively fixing, if in a step, use darker or more shallow background colour, just be easier to distinguish out background, if use dark-background, just with the color threshold settings darker and more shallow than background than the colour of skin, color depth is higher than being considered as background of threshold value and removes, similarly, if use light background, just with the color threshold settings more shallow and darker than background than the colour of skin, color depth be lower than being considered as background of threshold value and remove.In this step the face mask edge is not extracted, because the color distortion of marginal portion is less relatively, is left in the next step and is handling, the existing background parts that color distortion is bigger is removed in this step.
C. extract the edge of facial image, determine the position of facial image.In this step, to the edge of facial image be extracted, the method of extracting the facial image edge is, with certain a bit is starting point, judges at first whether this point is frontier point, and the method for judgement is edge threshold value of definition, this edge threshold value is different from above-mentioned color threshold value, because when carrying out edge treated, near color the edge and people's skin color difference are less, so the value that this edge threshold value generally is set at skin color adds or deduct a smaller amount.If what use is light background, the color of edge near zone remains the color that is shallower than skin so, so the value that this edge threshold value is a skin color deducts a smaller amount, otherwise, if what background was used is dark, is exactly to add a smaller amount so.For a point, if this around eight each points color value all this more than threshold value or below, then this point is not a frontier point, otherwise this point is exactly a frontier point; Find after the frontier point, according to the right side, the bottom right, down, lower-left, a left side, upper left, on, upper right order, whether all eight adjacent points of searching it are frontier points, if find next frontier point, write down this point so, and with this point is that central point is searched down a bit according to above-mentioned method once more again, by that analogy, all frontier points is noted, when finding certain a bit for described starting point, rim detection finishes.
D. set up grid model, in the grid model that the facial image of determining among the step c is placed into, set up the pixel on the facial image and the mapping relations on the summit in the grid model.Among this embodiment, the grid of foundation has at least 10000 summits, and the pixel of the inside, facial image edge that above-mentioned steps is definite is mapped on the summit of grid; If the quantity of pixel is greater than the quantity on summit, then adopt the method that pixel is sampled and shone upon, promptly extracting a summit with grid every or more point at 2 shines upon, if the quantity of pixel is less than the quantity on summit, then a pixel can be mapped on a plurality of summits, if equate, just mapping one by one.
E. change the position on the summit on the described grid model, the variation of people's face image is finished in also change thereupon of Ying She pixel with it.The position on the summit on the grid can arbitrarily change, and this just means that also the pixel of mapping also can arbitrarily change mutually with it, by this change, just can access the face image of Any shape.
Fig. 2 is the structured flowchart according to an embodiment of the device that people's face image is changed of the present invention.As shown in Figure 2, this device comprises:
Image collecting device 21, collection comprises the video image of people's face image.Can be video camera or digital camera.
Image storage apparatus 22 links to each other with image collecting device 21, preserves image.In this embodiment, image storage apparatus 22 is image storage apparatus of RGB 24 bit formats.In other embodiment, also can be the image storage apparatus of extended formatting.
Remove background operation device 23, link to each other, the background image of non-face part in the image is removed with image storage apparatus 22.Go background operation device 23 at first image to be read from image storage apparatus 22, be that each pixel in this image adds 8 Alpha passage then, set the chroma key of Alpha passage correspondence, like this, just can obtain the image that each pixel all passes through color treatments, according to predefined color threshold value, distinguish facial image and background image, the background image of distinguishing is removed.Here just can find out, because people's skin color is relatively fixing, if use darker or more shallow background colour, just be easier to distinguish out background, if use dark-background, just with the color threshold settings darker and more shallow than background than the colour of skin, color depth is higher than being considered as background of threshold value and removes, similarly, if use light background, just with the color threshold settings more shallow and darker than background than the colour of skin, color depth be lower than being considered as background of threshold value and remove.In this step the face mask edge is not extracted, because the color distortion of marginal portion is less relatively, is left in the next step and is handling, the existing background parts that color distortion is bigger is removed in this step.
Edge extracting device 24 links to each other with removing background operation device 23, extracts the edge of facial image.After going background operation device 23 with the background place to go in the image, image is sent to edge extracting device 24 and carries out the extraction of image border.The method at edge extracting device 24 extraction facial image edges is in an embodiment, with certain a bit is starting point, judge at first whether this point is frontier point, the method of judging is edge threshold value of definition, this edge threshold value is different from above-mentioned color threshold value, because when carrying out edge treated, near color the edge and people's skin color difference are less, so the value that this edge threshold value generally is set at skin color adds or deduct a smaller amount.If what use is light background, the color of edge near zone remains the color that is shallower than skin so, so the value that this edge threshold value is a skin color deducts a smaller amount, otherwise, if what background was used is dark, is exactly to add a smaller amount so.For a point, if this around eight each points color value all this more than threshold value or below, then this point is not a frontier point, otherwise this point is exactly a frontier point; Find after the frontier point, according to the right side, the bottom right, down, lower-left, a left side, upper left, on, upper right order, whether all eight adjacent points of searching it are frontier points, if find next frontier point, write down this point so, and with this point is that central point is searched down a bit according to above-mentioned method once more again, by that analogy, all frontier points is noted, when finding certain a bit for described starting point, rim detection finishes.
Grid model apparatus for establishing 25 is set up grid model.Among this embodiment, the grid model that grid model apparatus for establishing 25 is set up has 10000 summits at least.
Mapping device 26, link to each other with grid model apparatus for establishing 25 with edge extracting device 24, the facial image that edge extracting device 24 extracts is put into the grid model that grid model apparatus for establishing 25 is set up, and set up the pixel on the facial image and the mapping relations on the summit in the grid model.The pixel of the inside of being determined by edge extracting device 24, facial image edge all is mapped on the summit of grid; If the quantity of pixel is greater than the quantity on summit, then adopt the method that pixel is sampled and shone upon, promptly extracting a summit with grid every or more point at 2 shines upon, if the quantity of pixel is less than the quantity on summit, then a pixel can be mapped on a plurality of summits, if equate, just mapping one by one.
Grid model converting means 27 links to each other with mapping device 26, changes the position on the summit on the grid, and the variation of people's face image is finished in also change thereupon of Ying She pixel with it.
Adopt technical scheme of the present invention, the image of the people face that just can arbitrarily be changed, and because this image can be kept in the computer, can also print according to visitor's requirement, increased enjoyment wherein widely.
The foregoing description provides to being familiar with the person in the art and realizes or use of the present invention; those skilled in the art can be under the situation that does not break away from invention thought of the present invention; the foregoing description is made various modifications or variation; thereby protection scope of the present invention do not limit by the foregoing description, and should be the maximum magnitude that meets the inventive features that claims mention.

Claims (10)

1. method that people's face image is changed may further comprise the steps:
A. capture video image comprises people's face image in the described image, and this image is preserved;
B. remove background operation, the background image of non-face part in the image is removed;
C. extract the edge of facial image, determine the position of facial image;
D. set up grid model, the facial image of determining among the step c is placed in the described grid model, set up the pixel on the facial image and the mapping relations on the summit in the grid model;
E. change the position on the summit on the described grid model, the variation of people's face image is finished in also change thereupon of Ying She pixel with it.
2. the method for claim 1 is characterized in that, among the described step a, image is saved as RGB 24 bit formats.
3. the method for claim 1, it is characterized in that, go the method for background operation to be among the described step b, at first read the image of preserving among the described step a, and add 8 Alpha passage for each pixel, set the chroma key of Alpha passage correspondence then, like this, just can obtain the image that each pixel all passes through color treatments, according to predefined color threshold value, distinguish facial image and background image, the background image of distinguishing is removed.
4. the method for claim 1, it is characterized in that, the method of extracting the facial image edge among the described step c is, with certain a bit is starting point, judges at first whether this point is frontier point, and the method for judgement is edge threshold value of definition, if this around eight each points color value all this more than threshold value or below, then this point is not a frontier point, otherwise this point is exactly a frontier point; Find after the frontier point, according to the right side, the bottom right, down, lower-left, a left side, upper left, on, upper right order, whether all eight adjacent points of searching it are frontier points, if find next frontier point, write down this point so, and with this point is that central point is searched down a bit according to above-mentioned method once more again, by that analogy, all frontier points is noted, when finding certain a bit for described starting point, rim detection finishes.
5. the method for claim 1 is characterized in that, the grid of setting up in the described steps d has at least 10000 summits, and the pixel of the inside, facial image edge that above-mentioned steps is definite is mapped on the summit of described grid; If the quantity of described pixel is greater than the quantity on described summit, the quantity of described pixel then adopts the method that pixel is sampled and shone upon, if less than the quantity on described summit, then can be mapped to a pixel on a plurality of summits, if equate, just mapping one by one.
6. the device that people's face image is changed is characterized in that, comprising:
Image collecting device, collection comprises the video image of people's face image;
Image storage apparatus links to each other with described image collecting device, preserves described image;
Remove the background operation device, link to each other, the background image of non-face part in the image is removed with described image storage apparatus;
The edge extracting device links to each other with the described background operation device that goes, and extracts the edge of facial image;
The grid model apparatus for establishing is set up grid model;
Mapping device links to each other with described grid model apparatus for establishing with described edge extracting device, facial image is put as in the grid model, and set up the pixel on the facial image and the mapping relations on the summit in the grid model;
The grid model converting means links to each other with described mapping device, changes the position on the summit on the grid, and the variation of people's face image is finished in also change thereupon of Ying She pixel with it.
7. device as claimed in claim 6 is characterized in that, described image storage apparatus is the image storage apparatus of RGB 24 bit formats.
8. device as claimed in claim 6, it is characterized in that, described method of going the background operation device to remove background operation is at first to read the image of preserving among the described step a, and add 8 Alpha passage for each pixel, set the chroma key of Alpha passage correspondence then, like this, just can obtain the image that each pixel all passes through color treatments, according to predefined color threshold value, distinguish facial image and background image, the background image of distinguishing is removed.
9. device as claimed in claim 6, it is characterized in that, the method that the edge extracting device extracts the facial image edge is, with certain a bit is starting point, judges at first whether this point is frontier point, and the method for judgement is edge threshold value of definition, if this around eight each points color value all this more than threshold value or below, then this point is not a frontier point, otherwise this point is exactly a frontier point; Find after the frontier point, according to the right side, the bottom right, down, lower-left, a left side, upper left, on, upper right order, whether all eight adjacent points of searching it are frontier points, if find next frontier point, write down this point so, and with this point is that central point is searched down a bit according to above-mentioned method once more again, by that analogy, all frontier points is noted, when finding certain a bit for described starting point, rim detection finishes.
10. device as claimed in claim 6 is characterized in that, the grid that described grid model apparatus for establishing is set up has at least 10000 summits; Described mapping device will be mapped on the summit of described grid by the pixel of the definite inside, facial image edge of edge extracting device; If the quantity of described pixel is greater than the quantity on described summit, the quantity of described pixel then adopts the method that pixel is sampled and shone upon, if less than the quantity on described summit, then can be mapped to a pixel on a plurality of summits, if equate, just mapping one by one.
CNA2003101245099A 2003-12-30 2003-12-30 Method and apparatus for changing human face image Pending CN1635545A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2003101245099A CN1635545A (en) 2003-12-30 2003-12-30 Method and apparatus for changing human face image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2003101245099A CN1635545A (en) 2003-12-30 2003-12-30 Method and apparatus for changing human face image

Publications (1)

Publication Number Publication Date
CN1635545A true CN1635545A (en) 2005-07-06

Family

ID=34845029

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2003101245099A Pending CN1635545A (en) 2003-12-30 2003-12-30 Method and apparatus for changing human face image

Country Status (1)

Country Link
CN (1) CN1635545A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101902544A (en) * 2010-05-31 2010-12-01 西安电子科技大学 Embedded electronic distorting mirror system
CN102737369A (en) * 2011-03-31 2012-10-17 卡西欧计算机株式会社 Image processing apparatus, image processing method, and storage medium
CN101464132B (en) * 2008-12-31 2014-09-10 北京中星微电子有限公司 Position confirming method and apparatus
CN105095654A (en) * 2015-07-16 2015-11-25 努比亚技术有限公司 Output method and device for facial information

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101464132B (en) * 2008-12-31 2014-09-10 北京中星微电子有限公司 Position confirming method and apparatus
CN101902544A (en) * 2010-05-31 2010-12-01 西安电子科技大学 Embedded electronic distorting mirror system
CN102737369A (en) * 2011-03-31 2012-10-17 卡西欧计算机株式会社 Image processing apparatus, image processing method, and storage medium
CN105095654A (en) * 2015-07-16 2015-11-25 努比亚技术有限公司 Output method and device for facial information

Similar Documents

Publication Publication Date Title
CN106682601B (en) A driver's illegal call detection method based on multi-dimensional information feature fusion
JP4505362B2 (en) Red-eye detection apparatus and method, and program
CN102915438B (en) The extracting method of a kind of video caption and device
CN109918971B (en) Method and device for detecting number of people in monitoring video
WO2018145470A1 (en) Image detection method and device
US8131013B2 (en) Method and detecting system for positions of facial parts
Iwaoka et al. Digital safari guidebook with image retrieval
CN104361357B (en) Photo album categorizing system and sorting technique based on image content analysis
CN112614136A (en) Infrared small target real-time instance segmentation method and device
CN1890688A (en) Image discriminating method and image processing apparatus
CN109948566A (en) A dual-stream face anti-fraud detection method based on weight fusion and feature selection
CN111145105A (en) Image rapid defogging method and device, terminal and storage medium
KR100903816B1 (en) Face Extraction System and its Method in Still Images
CN110956184A (en) An Abstract Graph Orientation Determination Method Based on HSI-LBP Features
CN104392211A (en) Skin recognition method based on saliency detection
CN108345867A (en) Gesture identification method towards Intelligent household scene
CN102915449B (en) A kind of photo classification method
CN113643202B (en) Low-light-level image enhancement method based on noise attention-seeking instruction
CN102629969A (en) Smear eliminating method during shooting of plane objects
CN112016437A (en) A method of living body detection based on key frames of face video
Nakashima et al. Automatic generation of privacy-protected videos using background estimation
CN111797694A (en) License plate detection method and device
CN1635545A (en) Method and apparatus for changing human face image
CN103500439B (en) Drawing method is beaten based on image processing techniques
CN111710018B (en) Method and device for manually smearing sundries, electronic equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication