CN111815651B - Method, system and equipment for segmenting human face and body skin color region - Google Patents

Method, system and equipment for segmenting human face and body skin color region Download PDF

Info

Publication number
CN111815651B
CN111815651B CN202010651065.8A CN202010651065A CN111815651B CN 111815651 B CN111815651 B CN 111815651B CN 202010651065 A CN202010651065 A CN 202010651065A CN 111815651 B CN111815651 B CN 111815651B
Authority
CN
China
Prior art keywords
skin color
block
current
blocks
detection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010651065.8A
Other languages
Chinese (zh)
Other versions
CN111815651A (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.)
Shenzhen Mengwang Video Co ltd
Original Assignee
Shenzhen Mengwang Video 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 Shenzhen Mengwang Video Co ltd filed Critical Shenzhen Mengwang Video Co ltd
Priority to CN202010651065.8A priority Critical patent/CN111815651B/en
Publication of CN111815651A publication Critical patent/CN111815651A/en
Application granted granted Critical
Publication of CN111815651B publication Critical patent/CN111815651B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a method, a system and equipment for segmenting human face and body skin color areas. The method designs a sequential skin color block detection method, and then distinguishes two types of skin color blocks according to the structural characteristics of the skin color blocks of the human face and the skin color blocks of the body, so that the detection of the skin color blocks of the human face is cut off in time, the calculated amount is reduced, and auxiliary information can be further provided for subsequent code rate allocation.

Description

Method, system and equipment for segmenting human face and body skin color region
Technical Field
The present invention relates to the field of video coding technologies, and in particular, to a method, a system, and an apparatus for segmenting a skin color region of a face and a body.
Background
With the rapid development of multimedia technology and computer network technology, video is becoming one of the mainstream carriers of information dissemination. Whether the face video searching or the online video beautifying, the video compression and the accurate and rapid face positioning technology can enhance the effect of half effort. On the other hand, although the human face and the skin color region of the body have the same skin color characteristics, there is a significant difference in visual attention. If the human face searching is not distinguished, the human face searching for the complete skin color area searching can cause the waste of calculated amount; when the coding is performed under the condition of insufficient overall code rate, the code rate is distributed to the area with little improvement of video quality, and the visual effect is further deteriorated.
Disclosure of Invention
The embodiment of the invention aims to provide a method, a system and equipment for dividing human face and body skin color areas, and aims to solve the problems of face searching, calculated amount waste and poor visual effect of full skin color area searching in the prior art.
A first object of an embodiment of the present invention is to provide a method for segmenting a skin color region of a face and a body, where the method includes:
step1: creating a current image block detection set;
step2: the method comprises the steps of sequentially carrying out skin color on a current image block detection set from top to bottom and from left to right according to the position of a block in an imageDetecting, when a skin tone block is detected, identifying the skin tone block as a first skin tone identification block gmb 1 And deleting all detected blocks;
step3: in the current image block detection set, a block set psi meeting a first position condition 0 Performing skin color detection sequentially from left to right according to the positions of the blocks in the image, and when a non-skin-color block is detected, marking the left adjacent skin-color block of the non-skin-color block as a second skin-color marking block gmb 2 And deleting all detected blocks;
step4: and according to the positions of the first skin color identification block and the second skin color identification block, solving the current face area and the current body skin color area.
A second object of an embodiment of the present invention is to provide a segmentation system for a skin color region of a face and a body, the system including:
the current image block detection set creation module is used for creating a current image block detection set omega;
a first skin color identification module, configured to detect skin colors of a current image block detection set Ω according to positions of the blocks in the image, sequentially from top to bottom and from left to right, and identify the skin color block as a first skin color identification block gmb when the skin color block is detected 1 And deleting all detected blocks;
a second skin color identification module, configured to detect, for a current image block, a block set ψ satisfying a first location condition in the set Ω 0 Performing skin color detection sequentially from left to right according to the positions of the blocks in the image, and when a non-skin-color block is detected, marking the left adjacent skin-color block of the non-skin-color block as a second skin-color marking block gmb 2 And deleting all detected blocks;
the device is used for solving the current face area and the current body skin color area according to the positions of the first skin color identification block and the second skin color identification block.
A third object of an embodiment of the present invention is to provide an apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements steps of a method for segmenting the skin color region of the human face and the body when executing the computer program.
The beneficial effects of the invention are that
The invention provides a method, a system and equipment for segmenting a human face and body skin color region. The method designs a sequential skin color block detection method, and then distinguishes two types of skin color blocks according to the structural characteristics of the skin color blocks of the human face and the skin color blocks of the body, so that the detection of the skin color blocks of the human face is cut off in time, the calculated amount is reduced, and auxiliary information can be further provided for subsequent code rate allocation.
Drawings
FIG. 1 is a flowchart of a method for segmenting a skin color region of a human face and a human body according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for obtaining a current face region and a current body skin color region according to an embodiment of the present invention;
FIG. 3 is a block diagram of a segmentation system for a human face and body skin color region according to an embodiment of the present invention;
FIG. 4 is a block diagram of a device for obtaining a current face region and a current body skin color region according to an embodiment of the present invention;
fig. 5 is a block diagram of a jump step selection and facial and body skin color region acquisition module according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in detail with reference to the accompanying drawings and examples, and only the portions related to the examples of the present invention are shown for convenience of description. It is to be understood that the specific embodiments described herein are for illustrative purposes only and are not limiting, as other equivalent embodiments according to the present invention may be made by those of ordinary skill in the relevant art without departing from the inventive concepts herein.
The invention provides a method, a system and equipment for segmenting a human face and body skin color region. The method designs a sequential skin color block detection method, and then distinguishes two types of skin color blocks according to the structural characteristics of the skin color blocks of the human face and the skin color blocks of the body, so that the detection of the skin color blocks of the human face is cut off in time, the calculated amount is reduced, and auxiliary information can be further provided for subsequent code rate allocation.
FIG. 1 is a flowchart of a method for segmenting a skin color region of a human face and a human body according to an embodiment of the present invention; the method comprises the following steps:
step1: creating a current image block detection set omega;
optionally, step0 is further included before Step 1;
step0: determining the size of a block of the current image according to the resolution of the current image;
wherein the size of the block (also referred to as an analysis block) is represented by a one-dimensional size (i.e., the size of an NXN square block is represented by its one-dimensional size N); size (gmb (i, j)) represents the one-dimensional size of the block gmb (i, j) of the current image; gmb (i, j) represents the ith row and jth column block of the current image, the blocks are square blocks, and i, j represent the row serial number and the column serial number of the current block in the current image respectively; VGA is the standard size of the conventional image in the technical field;
the creating of the current image block detection set Ω specifically includes:
deleting the first block row and the last 2 block rows of the current image, and dividing all the rest blocks into a current image block detection set omega.
Step2: detecting skin color of a current image block detection set omega according to the position of the block in the image sequentially from top to bottom and from left to right, and when the skin color block is detected, marking the skin color block as a first skin color identification block gmb 1 And deleting all detected blocks;
in this step, all detected blocks include all detected non-skin tone blocks and the first skin tone identification block gmb 1
In the embodiment of the invention, gmb 1 =gmb(i 1 ,j 1 ),gmb(i 1 ,j 1 ) Representing a current diagramImage ith 1 Line j 1 Column block, i 1 、j 1 And respectively representing the row serial number and the column serial number of the first skin color identification block in the current image.
Optionally, in another embodiment of the present invention, if no skin tone block is detected, ending;
the skin color detection is performed by adopting a conventional block-based skin color detection method, and is not described in detail herein;
step3: detecting a block set psi meeting a first position condition in a set omega of current image blocks 0 Performing skin color detection sequentially from left to right according to the positions of the blocks in the image, and when a non-skin-color block is detected, marking the left adjacent skin-color block of the non-skin-color block as a second skin-color marking block gmb 2 And deleting all detected blocks;
the set of blocks ψ satisfying a first location condition 0 ={gmb(i,j)|i=i 1 ,j 1 +1.ltoreq.j.ltoreq. bkw }; where bkw denotes the block width of the current image;
gmb 2 =gmb(i 1 ,j 2 ),gmb(i 1 ,j 2 ) Representing the current image ith 1 Line j 2 Column block j 2 Respectively representing the column sequence numbers of the second skin color identification blocks in the current image, wherein the row sequence numbers of the second skin color identification blocks in the current image are the same as the row sequence numbers of the first skin color identification blocks in the current image;
alternatively, in another implementation of the present invention, if no non-skin tone blocks are detected, the flag identifies a second skin tone identification block gmb 2 Is psi 0 The block with the largest column number in it and deleting all detected blocks;
the skin color detection is performed by adopting a conventional block-based skin color detection method, and is not described in detail herein;
step4: according to the positions of the first skin color identification block and the second skin color identification block, a current face area and a current body skin color area are obtained;
FIG. 2 is a flowchart of a method for obtaining a current face region and a current body skin color region according to an embodiment of the present invention; comprising the following steps:
s41: setting span variable and current face region χ f
L 1 =j 2 -j 1 ;χ f ={gmb(i,j)|i=i 1 ,j 1 ≤j≤j 2 }。
Wherein L is 1 Representing a span variable, namely, a column sequence number difference between the second skin color identification block and the first skin color identification block;
s42: constructing a first detection set ψ 1 A second detection set ψ 2
S43: first, for the first detection set ψ 1 All blocks in the block are subjected to skin color detection in sequence from right to left until a non-skin color block is detected, and the non-skin color block is updated to be a first skin color identification block gmb 1 The method comprises the steps of carrying out a first treatment on the surface of the Then, for the second detection set ψ 2 All the blocks in the block are subjected to skin color detection in sequence from left to right until a non-skin color block is detected, and the non-skin color block is updated to be a second skin color identification block gmb 2 The method comprises the steps of carrying out a first treatment on the surface of the Finally, collecting all detected blocks and blocks meeting the second position condition 0 ' delete from the current image block detection set Ω.
The set of blocks ψ satisfying the second position condition 0 ’={gmb(i,j)|i=i 1 +1,j 1 ≤j≤j 2 };
Optionally, in another embodiment of the present invention, the first detection set ψ is set 1 All blocks in the block are subjected to skin color detection in sequence from right to left, and if no non-skin color block is detected, the first skin color identification block gmb is updated 1 For the first detection set ψ 1 The block with the smallest column number inside;
optionally, in another embodiment of the present invention, the second detection set ψ 2 Inner all blocks, slaveSkin color detection is sequentially carried out from left to right, and if no non-skin color block is detected, the second skin color identification block gmb is updated 2 For the second detection set ψ 2 The block with the largest column number inside.
The skin color detection is performed by adopting a conventional block-based skin color detection method, and is not described in detail herein;
s44: let intermediate variable temp=l 1 The first skin tone identification block gmb is then updated 1 Second skin tone identification block gmb 2 Corresponding rank number i 1 ,j 1 ,j 2 Updating the value of the current face region χ f =χ f Y{gmb(i,j)|i=i 1 ,j 1 ≤j≤j 2 Update span variable L 1 =j 2 -j 1
S45: selecting a jump step according to the first mode variable and the second mode variable value, and acquiring a current face area and a current body skin color area;
further, between Step2 and Step3, further includes: setting a first mode variable and a second mode variable and giving an initial value;
the value of the mode variable is used for controlling the selective jump of the encoding step; in the embodiment of the invention, the first mode variable and the second mode variable are controlled by two values of 0 and 1 to control the flow jump under different conditions; the mode variable can be any other different numerical value pair; in the embodiment of the invention, the first mode variable and the second mode variable give an initial value of 0;
the step of selecting the jump according to the first mode variable and the second mode variable value, and the step of obtaining the current face area and the current body skin color area comprises the following specific steps: if the second mode variable is 0, entering a step A1; otherwise, step B1 is entered.
Step A1: if span variable L 1 Making the first mode variable be 1, and returning to S42; otherwise, if the first mode variable is 0, making the current face area be an empty set, and entering a step A2; if not, the second mode variable is set to 1, and the process returns to S42.
Step A2, if the current image block detection set omega is empty, ending; otherwise, let the current face region χ f Current body skin color region χ b The initial value is set as empty (i.e. the next face and body skin color area detection is performed), and Step2 is performed again.
Step B1: if span variable L 1 Temp, let the current face cut-off line number be i 1 -1, updating the current face region χ f =χ f I{gmb(i,j)|i≤i 1 -1}, updating the current body skin color region start line number to i 1 Updating span variable L 1 =temp; step B2 is entered, otherwise, S42 is repeated.
Step B2: detecting the current body skin color area; comprising the following steps:
step b201: let the current skin color region χ of the body b ={gmb(i,j)|i=i 1 ,j 1 ≤j≤j 2 }。
Step b202: for the region χ corresponding to the current skin color of the body b Adjacent undetected blocks are used for detecting skin color, and the skin color blocks are judged to be marked into the skin color region χ of the current body b And the detected block is deleted from the current image block detection set Ω.
Step b203: if there is a region χ corresponding to the current skin color of the body b The adjoining undetected block, then reverting back to step b202; otherwise, finishing the detection of the current body skin color area.
Step b204: if the current image block detection set omega is empty, ending; otherwise, let the current face region χ f Current body skin color region χ b The initial value is set as the empty set (the next face and body skin color region detection is carried out), and the process returns to Step2.
Corresponding to the method for segmenting the human face and the body skin color region described in the above embodiment, fig. 3 is a block diagram of a segmentation system for the human face and the body skin color region according to the embodiment of the present invention; the system comprises:
the current image block detection set creation module is used for creating a current image block detection set omega;
a first skin color identification module, configured to detect, for a current image block, a position of a detection set Ω in an image by block, and sequentially detect skin colors from top to bottom and from left to right, when detecting thatWhen a skin color block is identified, the skin color block is identified as a first skin color identification block gmb 1 And deleting all detected blocks;
a second skin color identification module, configured to detect, for a current image block, a block set ψ satisfying a first location condition in the set Ω 0 Performing skin color detection sequentially from left to right according to the positions of the blocks in the image, and when a non-skin-color block is detected, marking the left adjacent skin-color block of the non-skin-color block as a second skin-color marking block gmb 2 And deleting all detected blocks;
the device is used for solving the current face area and the current body skin color area according to the positions of the first skin color identification block and the second skin color identification block;
specifically, the creating the current image block detection set Ω specifically includes: deleting the first block row and the last 2 block rows of the current image, and dividing all the rest blocks into a current image block detection set omega.
Further, the segmentation system of the human face and body skin color region further comprises:
the current image block size determining module is connected with the current image block detection set creating module and is used for determining the size of a block of the current image according to the resolution of the current image;
wherein the size of the block (also called analysis block) is represented by a one-dimensional size; size (gmb (i, j)) represents the one-dimensional size of the block gmb (i, j) of the current image; gmb (i, j) represents the ith row and jth column block of the current image, the blocks are square blocks, and i, j represent the row serial number and the column serial number of the current block in the current image respectively; VGA is the standard size of the conventional image in the technical field;
specifically, in the first skin tone identification module, all detected blocks include all detected non-skin tone blocks and the first skin tone identification block gmb 1
gmb 1 =gmb(i 1 ,j 1 ),gmb(i 1 ,j 1 ) Representing the current image ith 1 Line j 1 Column block, i 1 、j 1 And respectively representing the row serial number and the column serial number of the first skin color identification block in the current image.
Optionally, the first skin tone identification module further comprises:
the first triggering module is used for detecting the position of the current image block detection set omega in the image according to the blocks, and ending if no skin color block is detected when skin color detection is sequentially carried out from top to bottom and from left to right;
the skin color detection is performed by adopting a conventional block-based skin color detection method, and is not described in detail herein;
specifically, in the second skin tone identification module, the set of blocks ψ satisfying a first location condition 0 ={gmb(i,j)|i=i 1 ,j 1 +1.ltoreq.j.ltoreq. bkw }; where bkw denotes the block width of the current image;
gmb 2 =gmb(i 1 ,j 2 ),gmb(i 1 ,j 2 ) Representing the current image ith 1 Line j 2 Column block j 2 Respectively representing the column sequence numbers of the second skin color identification blocks in the current image, wherein the row sequence numbers of the second skin color identification blocks in the current image are the same as the row sequence numbers of the first skin color identification blocks in the current image;
optionally, the second skin tone identification module further comprises:
a second triggering module, configured to detect, for a current image block, a block set ψ satisfying a first location condition in the set Ω 0 When skin color detection is sequentially carried out from left to right according to the positions of the blocks in the image, if no non-skin color block is detected, the mark marks the second skin color mark block gmb 2 Is psi 0 The block with the largest column number in it and deleting all detected blocks;
further, fig. 4 is a block diagram of a device for obtaining a current face area and a current body skin color area according to an embodiment of the present invention; the device for obtaining the skin color region of the current face and the body comprises:
span variable and current face area setting moduleFor setting span variable and current face region χ f
A first and a second detection set constructing module for constructing a first detection set psi 1 A second detection set ψ 2
A first updating module for first, for the first detection set ψ 1 All blocks in the block are subjected to skin color detection in sequence from right to left until a non-skin color block is detected, and the non-skin color block is updated to be a first skin color identification block gmb 1 The method comprises the steps of carrying out a first treatment on the surface of the Then, for the second detection set ψ 2 All the blocks in the block are subjected to skin color detection in sequence from left to right until a non-skin color block is detected, and the non-skin color block is updated to be a second skin color identification block gmb 2 The method comprises the steps of carrying out a first treatment on the surface of the Finally, collecting all detected blocks and blocks meeting the second position condition 0 ' delete from the current image block detection set Ω.
An intermediate variable setting and second updating module for first making intermediate variable=span variable, temp=l 1 The first skin tone identification block gmb is then updated 1 Second skin tone identification block gmb 2 Corresponding rank number i 1 ,j 1 ,j 2 Updating the value of the current face region χ f =χ f Y{gmb(i,j)|i=i 1 ,j 1 ≤j≤j 2 Update span variable L 1 =j 2 -j 1
The jump step selection and human face and body skin color region acquisition module is used for selecting a jump step according to the first mode variable value and the second mode variable value to acquire a current human face region and a current body skin color region;
specifically, span variable L 1 =j 2 -j 1 ;χ f ={gmb(i,j)|i=i 1 ,j 1 ≤j≤j 2 }。
Wherein L is 1 Representing a span variable, namely, a column sequence number difference between the second skin color identification block and the first skin color identification block;
in particular, the method comprises the steps of,
specifically, the set of blocks ψ satisfying the second location condition 0 ’={gmb(i,j)|i=i 1 +1,j 1 ≤j≤j 2 };
Optionally, the first updating module further includes:
a third trigger module for detecting the first detection set ψ 1 All blocks in the block are subjected to skin color detection in sequence from right to left, and if no non-skin color block is detected, the first skin color identification block gmb is updated 1 For the first detection set ψ 1 The block with the smallest column number inside;
optionally, the first updating module further includes:
a fourth triggering module for detecting the second detection set psi 2 All blocks in the block are subjected to skin color detection in sequence from left to right, and if no non-skin color block is detected, the second skin color identification block gmb is updated 2 For the second detection set ψ 2 The block with the largest column number inside.
Further, the device for obtaining the skin color region of the current face and the body further comprises:
the mode variable setting and initial value giving module is used for setting a first mode variable, a second mode variable and an initial value;
the value of the mode variable is used for controlling the selective jump of the encoding step; in the embodiment of the invention, the first mode variable and the second mode variable are controlled by two values of 0 and 1 to control the flow jump under different conditions; the mode variable can be any other different numerical value pair; in the embodiment of the invention, the first mode variable and the second mode variable give an initial value of 0;
further, fig. 5 is a block diagram of a jump step selection and a face and body skin color region acquisition module according to an embodiment of the present invention.
The jump step selection and human face and body skin color region acquisition module comprises the following steps:
the jump step selection module is used for selecting to enter the first face and body skin color region acquisition module or the second face and body skin color region acquisition module according to the first mode variable value and the second mode variable value;
the first face and body skin color region acquisition module is used for acquiring a current face region and a current body skin color region in a first mode;
the second face and body skin color region acquisition module is used for acquiring a current face region and a current body skin color region in a second mode;
further, the first face and body skin color region acquiring module further includes:
a first judging and processing module for judging if the span variable L 1 Making the first mode variable be 1 and returning to the first detection set construction module and the second detection set construction module; otherwise, if the first mode variable is 0, making the current face area be an empty set, and entering a second judging and processing module; and if not, the second mode variable is set to be 1, and the first detection set construction module and the second detection set construction module are returned again.
The second judging and processing module is used for judging that if the current image block detection set omega is empty, ending; otherwise, let the current face region χ f Current body skin color region χ b The initial value is set as empty (namely, the detection of the next face and body skin color area is carried out), and the first skin color identification module is entered again.
Further, the second face and body skin color region acquiring module further includes:
a third judging and processing module for judging if the span variable L 1 The current face cut-off line number is i 1 -1, updating the current face region χ f =χ f I{gmb(i,j)|i≤i 1 -1}, updating the current body skin color region start line number to i 1 Updating span variable L 1 =temp; and (5) entering a body skin color region detection module, otherwise, returning to the first detection set construction module and the second detection set construction module.
The current body skin color region detection module is used for detecting the current body skin color region;
further, the current body skin color region detection module further includes:
a current body skin color region setting module for enabling the current body skin color region χ b ={gmb(i,j)|i=i 1 ,j 1 ≤j≤j 2 };
A current body skin color region adjacent block detection module for detecting the region χ of the current body skin color b Adjacent undetected blocks are used for detecting skin color, and the skin color blocks are judged to be marked into the skin color region χ of the current body b And the detected block is deleted from the current image block detection set Ω.
A fourth judging and processing module for judging whether the current body skin color region χ exists b The adjacent undetected blocks are returned to the adjacent block detection module of the current body skin color region in the step; otherwise, finishing the detection of the current body skin color area.
A fifth judging and processing module, if judging that the current image block detection set omega is empty, ending; otherwise, let the current face region χ f Current body skin color region χ b The initial value is set as an empty set (the detection of the next face and body skin color area is carried out), and the first skin color identification module is reentered.
The embodiment of the invention also provides a terminal device, which comprises: a processor, a memory, and a computer program stored in the memory and executable on the processor. The steps in the above-mentioned segmentation method embodiment of the human face and body skin color region are implemented when the processor executes the computer program. Alternatively, the processor may implement the functions of the units in the above-described system embodiments when executing the computer program.
It will be appreciated by those of ordinary skill in the art that implementing all or part of the steps of the methods of the embodiments described above may be accomplished by program instruction related hardware, and the program may be stored on a computer readable storage medium, which may be a ROM, a RAM, a magnetic disk, an optical disk, etc.
The sequence numbers of the steps in the above embodiments do not mean the execution sequence, and the execution sequence of the processes should be determined according to the functions and internal logic, and should not limit the implementation process of the embodiments of the present invention.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, and alternatives falling within the spirit and principles of the invention.

Claims (3)

1. A method for segmenting a skin color region of a human face and a human body, the method comprising:
step1: creating a current image block detection set;
step2: detecting skin color of a current image block detection set according to the positions of blocks in an image sequentially from top to bottom and from left to right, and when a skin color block is detected, marking the skin color block as a first skin color identification block gmb 1 And deleting all detected blocks;
step3: in the current image block detection set, a block set psi meeting a first position condition 0 Performing skin color detection sequentially from left to right according to the positions of the blocks in the image, and when a non-skin-color block is detected, marking the left adjacent skin-color block of the non-skin-color block as a second skin-color marking block gmb 2 And deleting all detected blocks;
step4: according to the positions of the first skin color identification block and the second skin color identification block, a current face area and a current body skin color area are obtained;
step0 is also included before Step 1;
step0: determining the size of a block of the current image according to the resolution of the current image;
the set of blocks ψ satisfying a first location condition 0 ={gmb(i,j)|i=i 1 ,j 1 +1.ltoreq.j.ltoreq. bkw }; where bkw denotes the block width of the current image;
gmb 2 =gmb(i 1 ,j 2 ),gmb(i 1 ,j 2 ) Representing the current image ith 1 Line j 2 Column block j 2 Respectively representing the column sequence numbers of the second skin color identification blocks in the current image, wherein the row sequence numbers of the second skin color identification blocks in the current image are the same as the row sequence numbers of the first skin color identification blocks in the current image;
in Step3, a block set ψ satisfying a first position condition is detected in a set Ω of current image blocks 0 Skin color detection is sequentially carried out from left to right according to the positions of the blocks in the image, and if no non-skin color block is detected, the mark marks the second skin color mark block gmb 2 Block set ψ to satisfy a first location condition 0 The block with the largest column number in it and deleting all detected blocks;
the step of obtaining the current face area and the current body skin color area according to the positions of the first skin color identification block and the second skin color identification block comprises the following steps:
s41: setting span variable and current face region χ f
L 1 =j 2 -j 1 ;χ f ={gmb(i,j)|i=i 1 ,j 1 ≤j≤j 2 };
Wherein L is 1 Representing a span variable, namely, a column sequence number difference between the second skin color identification block and the first skin color identification block;
s42: constructing a first detection set ψ 1 A second detection set ψ 2
S43: first, for the first detection set ψ 1 All blocks in the block are subjected to skin color detection in sequence from right to left until a non-skin color block is detected, and the non-skin color block is updated to be a first skin color identification block gmb 1 The method comprises the steps of carrying out a first treatment on the surface of the Then, for the second detection set ψ 2 All blocks in the block are sequentially subjected to skin color detection from left to right until non-skin color blocks are detected, and updating is carried outThe non-skin tone block is a second skin tone identification block gmb 2 The method comprises the steps of carrying out a first treatment on the surface of the Finally, collecting all detected blocks and blocks meeting the second position condition 0 ' delete from the current image block detection set Ω;
the set of blocks ψ satisfying the second position condition 0 ’={gmb(i,j)|i=i 1 +1,j 1 ≤j≤j 2 };
S44: let intermediate variable temp=l 1 The first skin tone identification block gmb is then updated 1 Second skin tone identification block gmb 2 Corresponding rank number i 1 ,j 1 ,j 2 Updating the value of the current face region χ f =χ f Y{gmb(i,j)|i=i 1 ,j 1 ≤j≤j 2 Update span variable L 1 =j 2 -j 1
S45: selecting a jump step according to the first mode variable and the second mode variable value, and acquiring a current face area and a current body skin color area;
the pair of first detection sets ψ 1 All blocks in the block are subjected to skin color detection in sequence from right to left, and if no non-skin color block is detected, the first skin color identification block gmb is updated 1 For the first detection set ψ 1 The block with the smallest column number inside;
the pair of second detection sets ψ 2 All blocks in the block are subjected to skin color detection in sequence from left to right, and if no non-skin color block is detected, the second skin color identification block gmb is updated 2 For the second detection set ψ 2 The block with the largest column number inside;
still include between Step2 and Step3: setting a first mode variable and a second mode variable and giving an initial value;
the step of selecting the jump according to the first mode variable and the second mode variable value, and the step of obtaining the current face area and the current body skin color area comprises the following specific steps: if the second mode variable is 0, entering a step A1; otherwise, enter step B1;
step A1: if span variable L 1 Making the first mode variable be 1, and returning to S42; otherwise, if the first mode variable is 0, making the current face area be empty set, enteringStep A2; if not, the second mode variable is set to be 1, and S42 is repeated;
step A2, if the current image block detection set omega is empty, ending; otherwise, let the current face region χ f Current body skin color region χ b Assigning the initial value as an empty set, and returning to Step2;
step B1: if span variable L 1 Temp, let the current face cut-off line number be i 1 -1, updating the current face region χ f =χ f I{gmb(i,j)|i≤i 1 -1}, updating the current body skin color region start line number to i 1 Updating span variable L 1 =temp; step B2 is entered, otherwise, S42 is repeated;
step B2: detecting the current body skin color area; comprising the following steps:
step b201: let the current skin color region χ of the body b ={gmb(i,j)|i=i 1 ,j 1 ≤j≤j 2 };
Step b202: for the region χ corresponding to the current skin color of the body b Adjacent undetected blocks are used for detecting skin color, and the skin color blocks are judged to be marked into the skin color region χ of the current body b And deleting the detected block from the current image block detection set omega;
step b203: if there is a region χ corresponding to the current skin color of the body b The adjoining undetected block, then reverting back to step b202; otherwise, finishing the detection of the current body skin color area;
step b204: if the current image block detection set omega is empty, ending; otherwise, let the current face region χ f Current body skin color region χ b The initial value is set to null and Step2 is resumed.
2. A system for segmenting a human face from a skin color region of a body, the system comprising:
the current image block detection set creation module is used for creating a current image block detection set omega;
a first skin color identification module for detecting the position of the set omega in the image according to the blocks for the current image block, and the positions are sequentially from top to bottom and from left to rightPerforming skin color detection, and when a skin color block is detected, identifying the skin color block as a first skin color identification block gmb 1 And deleting all detected blocks;
a second skin color identification module, configured to detect, for a current image block, a block set ψ satisfying a first location condition in the set Ω 0 Performing skin color detection sequentially from left to right according to the positions of the blocks in the image, and when a non-skin-color block is detected, marking the left adjacent skin-color block of the non-skin-color block as a second skin-color marking block gmb 2 And deleting all detected blocks;
the device is used for solving the current face area and the current body skin color area according to the positions of the first skin color identification block and the second skin color identification block;
the segmentation system of the human face and the body skin color region further comprises: the current image block size determining module is connected with the current image block detection set creating module and is used for determining the size of a block of the current image according to the resolution of the current image;
in the second skin color identification module, the block set ψ satisfying the first position condition 0 ={gmb(i,j)|i=i 1 ,j 1 +1.ltoreq.j.ltoreq. bkw }; where bkw denotes the block width of the current image; gmb 2 =gmb(i 1 ,j 2 ),gmb(i 1 ,j 2 ) Representing the current image ith 1 Line j 2 Column block j 2 Respectively representing the column sequence numbers of the second skin color identification blocks in the current image, wherein the row sequence numbers of the second skin color identification blocks in the current image are the same as the row sequence numbers of the first skin color identification blocks in the current image;
the second skin tone identification module further includes:
a second triggering module, configured to detect, for a current image block, a block set ψ satisfying a first location condition in the set Ω 0 When skin color detection is sequentially carried out from left to right according to the positions of the blocks in the image, if no non-skin color block is detected, a second skin color identification block gmb is identified 2 Is psi 0 The block with the largest column number in it and deleting all detected blocks;
the device for obtaining the skin color region of the current face and the body comprises: the span variable and current face region setting module is used for setting the span variable and the current face region χ f
A first and a second detection set constructing module for constructing a first detection set psi 1 A second detection set ψ 2
A first updating module for first, for the first detection set ψ 1 All blocks in the block are subjected to skin color detection in sequence from right to left until a non-skin color block is detected, and the non-skin color block is updated to be a first skin color identification block gmb 1 The method comprises the steps of carrying out a first treatment on the surface of the Then, for the second detection set ψ 2 All the blocks in the block are subjected to skin color detection in sequence from left to right until a non-skin color block is detected, and the non-skin color block is updated to be a second skin color identification block gmb 2 The method comprises the steps of carrying out a first treatment on the surface of the Finally, collecting all detected blocks and blocks meeting the second position condition 0 ' delete from the current image block detection set Ω;
an intermediate variable setting and second updating module for first making intermediate variable=span variable, temp=l 1 The first skin tone identification block gmb is then updated 1 Second skin tone identification block gmb 2 Corresponding rank number i 1 ,j 1 ,j 2 Updating the value of the current face region χ f =χ f Y{gmb(i,j)|i=i 1 ,j 1 ≤j≤j 2 Update span variable L 1 =j 2 -j 1
The jump step selection and human face and body skin color region acquisition module is used for selecting a jump step according to the first mode variable value and the second mode variable value to acquire a current human face region and a current body skin color region;
wherein the span variable L 1 =j 2 -j 1 ;χ f ={gmb(i,j)|i=i 1 ,j 1 ≤j≤j 2 };L 1 Representing a span variable, namely, a column sequence number difference between the second skin color identification block and the first skin color identification block;
the set of blocks ψ satisfying the second position condition 0 ’={gmb(i,j)|i=i 1 +1,j 1 ≤j≤j 2 };
The first update module further includes: a third trigger module for detecting the first detection set ψ 1 All blocks in the block are subjected to skin color detection in sequence from right to left, and if no non-skin color block is detected, the first skin color identification block gmb is updated 1 For the first detection set ψ 1 The block with the smallest column number inside;
the first update module further includes:
a fourth triggering module for detecting the second detection set psi 2 All blocks in the block are subjected to skin color detection in sequence from left to right, and if no non-skin color block is detected, the second skin color identification block gmb is updated 2 For the second detection set ψ 2 The block with the largest column number inside;
the device for obtaining the skin color region of the current face and the body further comprises: the mode variable setting and initial value giving module is used for setting a first mode variable, a second mode variable and an initial value;
the jump step selection and human face and body skin color region acquisition module comprises the following steps:
the jump step selection module is used for selecting to enter the first face and body skin color region acquisition module or the second face and body skin color region acquisition module according to the first mode variable value and the second mode variable value;
the first face and body skin color region acquisition module is used for acquiring a current face region and a current body skin color region in a first mode;
the second face and body skin color region acquisition module is used for acquiring a current face region and a current body skin color region in a second mode;
the first face and body skin color region acquisition module further includes:
a first judging and processing module for judging if the span variable L 1 Making the first mode variable be 1 and returning to the first detection set construction module and the second detection set construction module; otherwise, if the first mode variable is 0, making the current face area be an empty set, and entering a second judging and processing module; if not, the second mode variable is 1, and the first detection set construction module and the second detection set construction module are returned again;
the second judging and processing module is used for judging that if the current image block detection set omega is empty, ending; otherwise, let the current face region χ f Current body skin color region χ b Assigning the initial value as an empty set, and returning to the first skin color identification module;
the second face and body skin color region acquisition module further includes:
a third judging and processing module for judging if the span variable L 1 The current face cut-off line number is i 1 -1, updating the current face region χ f =χ f I{gmb(i,j)|i≤i 1 -1}, updating the current body skin color region start line number to i 1 Updating span variable L 1 =temp; entering a body skin color region detection module, otherwise, returning to the first detection set construction module and the second detection set construction module;
the current body skin color region detection module is used for detecting the current body skin color region;
the current body skin tone region detection module further comprises:
a current body skin color region setting module for enabling the current body skin color region χ b ={gmb(i,j)|i=i 1 ,j 1 ≤j≤j 2 };
A current body skin color region adjacent block detection module for detecting the region χ of the current body skin color b Adjacent undetected blocks are used for detecting skin color, and the skin color blocks are judged to be marked into the skin color region χ of the current body b And deleting the detected block from the current image block detection set omega;
a fourth judgment processing module for judging whether the current body existsSkin color region χ b The adjacent undetected blocks are returned to the adjacent block detection module of the current body skin color region in the step; otherwise, finishing the detection of the current body skin color area;
a fifth judging and processing module, if judging that the current image block detection set omega is empty, ending; otherwise, let the current face region χ f Current body skin color region χ b The initial value is set as the empty set, and the first skin color identification module is entered again.
3. An apparatus comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor performs the steps of the method of segmentation of human face and body skin tone regions as claimed in claim 1 when the computer program is executed.
CN202010651065.8A 2020-07-08 2020-07-08 Method, system and equipment for segmenting human face and body skin color region Active CN111815651B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010651065.8A CN111815651B (en) 2020-07-08 2020-07-08 Method, system and equipment for segmenting human face and body skin color region

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010651065.8A CN111815651B (en) 2020-07-08 2020-07-08 Method, system and equipment for segmenting human face and body skin color region

Publications (2)

Publication Number Publication Date
CN111815651A CN111815651A (en) 2020-10-23
CN111815651B true CN111815651B (en) 2024-01-30

Family

ID=72841583

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010651065.8A Active CN111815651B (en) 2020-07-08 2020-07-08 Method, system and equipment for segmenting human face and body skin color region

Country Status (1)

Country Link
CN (1) CN111815651B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111815653B (en) * 2020-07-08 2024-01-30 深圳市梦网视讯有限公司 Method, system and equipment for segmenting human face and body skin color region

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20110054180A (en) * 2009-11-17 2011-05-25 한국과학기술원 Apparatus for detecting face using skin region detection and method therefor
CN103577838A (en) * 2013-11-25 2014-02-12 苏州大学 Face recognition method and device
CN105426816A (en) * 2015-10-29 2016-03-23 深圳怡化电脑股份有限公司 Method and device of processing face images
CN107911625A (en) * 2017-11-30 2018-04-13 广东欧珀移动通信有限公司 Light measuring method, device, readable storage medium storing program for executing and computer equipment
CN109190529A (en) * 2018-08-21 2019-01-11 深圳市梦网百科信息技术有限公司 A kind of method for detecting human face and system based on lip positioning
CN109446967A (en) * 2018-10-22 2019-03-08 深圳市梦网百科信息技术有限公司 A kind of method for detecting human face and system based on compression information
WO2019100282A1 (en) * 2017-11-23 2019-05-31 深圳和而泰智能控制股份有限公司 Face skin color recognition method, device and intelligent terminal
CN110807402A (en) * 2019-10-29 2020-02-18 深圳市梦网百科信息技术有限公司 Facial features positioning method, system and terminal equipment based on skin color detection

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20110054180A (en) * 2009-11-17 2011-05-25 한국과학기술원 Apparatus for detecting face using skin region detection and method therefor
CN103577838A (en) * 2013-11-25 2014-02-12 苏州大学 Face recognition method and device
CN105426816A (en) * 2015-10-29 2016-03-23 深圳怡化电脑股份有限公司 Method and device of processing face images
WO2019100282A1 (en) * 2017-11-23 2019-05-31 深圳和而泰智能控制股份有限公司 Face skin color recognition method, device and intelligent terminal
CN107911625A (en) * 2017-11-30 2018-04-13 广东欧珀移动通信有限公司 Light measuring method, device, readable storage medium storing program for executing and computer equipment
CN109190529A (en) * 2018-08-21 2019-01-11 深圳市梦网百科信息技术有限公司 A kind of method for detecting human face and system based on lip positioning
CN109446967A (en) * 2018-10-22 2019-03-08 深圳市梦网百科信息技术有限公司 A kind of method for detecting human face and system based on compression information
CN110807402A (en) * 2019-10-29 2020-02-18 深圳市梦网百科信息技术有限公司 Facial features positioning method, system and terminal equipment based on skin color detection

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Face detection and posture recognition in a real time tracking system;Hung-Yuan Chung等;《2017 IEEE International Systems Engineering Symposium (ISSE)》;论文第1-6页 *
图像处理-皮肤分割方法汇总(最全最有用的);风铃777;《https://blog.csdn.net/weixin_40820983/article/details/104903319》;论文第1-9页 *

Also Published As

Publication number Publication date
CN111815651A (en) 2020-10-23

Similar Documents

Publication Publication Date Title
US11361585B2 (en) Method and system for face recognition via deep learning
CN108090443B (en) Scene text detection method and system based on deep reinforcement learning
CN108921019B (en) Gait recognition method based on GEI and TripletLoss-DenseNet
CN111814902A (en) Target detection model training method, target identification method, device and medium
CN110807402B (en) Facial feature positioning method, system and terminal equipment based on skin color detection
Qu et al. A method of hierarchical feature fusion and connected attention architecture for pavement crack detection
CN111144483A (en) Image feature point filtering method and terminal
CN111724370B (en) Multi-task image quality evaluation method and system based on uncertainty and probability
CN111815651B (en) Method, system and equipment for segmenting human face and body skin color region
CN114266894A (en) Image segmentation method and device, electronic equipment and storage medium
CN104732534A (en) Method and system for matting conspicuous object in image
CN112270384B (en) Loop detection method and device, electronic equipment and storage medium
CN111814705B (en) Pedestrian re-identification method based on batch blocking shielding network
CN111539390A (en) Small target image identification method, equipment and system based on Yolov3
CN111626143B (en) Reverse face detection method, system and equipment based on eye positioning
CN111815653B (en) Method, system and equipment for segmenting human face and body skin color region
CN112801013A (en) Face recognition method, system and device based on key point recognition and verification
CN111461073B (en) Reverse face detection method, system and equipment based on nose positioning
CN112861689A (en) Searching method and device of coordinate recognition model based on NAS technology
CN110705479A (en) Model training method, target recognition method, device, equipment and medium
CN115641434B (en) Power equipment positioning method, system, terminal and storage medium
CN116912502B (en) Method and equipment for segmenting image key anatomical structure under assistance of global visual angle
CN116912918B (en) Face recognition method, device, equipment and computer readable storage medium
CN116895093B (en) Face recognition method, device, equipment and computer readable storage medium
CN116434151B (en) Pavement foreign matter identification method, device, computer equipment and storage medium

Legal Events

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