CN110084826B - Hair segmentation method based on TOF camera - Google Patents

Hair segmentation method based on TOF camera Download PDF

Info

Publication number
CN110084826B
CN110084826B CN201811452085.1A CN201811452085A CN110084826B CN 110084826 B CN110084826 B CN 110084826B CN 201811452085 A CN201811452085 A CN 201811452085A CN 110084826 B CN110084826 B CN 110084826B
Authority
CN
China
Prior art keywords
hair
mask
pixel
variance
tof camera
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
CN201811452085.1A
Other languages
Chinese (zh)
Other versions
CN110084826A (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.)
Plex VR Digital Technology Shanghai Co Ltd
Original Assignee
Plex VR Digital Technology Shanghai 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 Plex VR Digital Technology Shanghai Co Ltd filed Critical Plex VR Digital Technology Shanghai Co Ltd
Priority to CN201811452085.1A priority Critical patent/CN110084826B/en
Publication of CN110084826A publication Critical patent/CN110084826A/en
Application granted granted Critical
Publication of CN110084826B publication Critical patent/CN110084826B/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/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Abstract

A hair segmentation method based on a TOF camera, comprising: establishing a deep learning network based on the data set of the hair color chart and the mask thereof; obtaining a depth map by using a TOF camera, and obtaining a variance map; optimizing the preliminary hair mask obtained by deep learning to obtain an optimized hair mask; and (5) re-optimizing the optimized hair mask by using the variance diagram to obtain a final accurate hair mask. The invention skillfully and reversely utilizes the characteristic that the flight time generates a certain degree of noise on the hair, and realizes higher-precision segmentation of the hair.

Description

Hair segmentation method based on TOF camera
Technical Field
The invention relates to the field of three-dimensional images, in particular to a hair segmentation method based on a TOF camera by reversely utilizing noise.
Background
At present, the hair segmentation method is not very robust, mainly because the segmentation method based on RGB images is very severely affected by illumination and background, the traditional segmentation method based on images cannot well complete the task, and especially the hair segmentation for high-definition images is a very difficult problem.
With the advent of the artificial intelligence era, attempts have been made to segment hair using deep learning methods. But a very obvious problem is that there are currently few more data sets for hair. The main reasons are that the hair of different people is changed and the boundary is very unsmooth, which makes the data marking very difficult. On the premise that the data set labeling is very difficult and inaccurate, the segmentation of the hair cannot be realized very well by simply utilizing a deep learning method.
The TOF (Timeofflight) camera works on the principle that depth information of the whole image is finally obtained by continuously sending light pulses to the object, then receiving light returned from the object by the sensor, and obtaining the distance of the object by detecting the flight round trip time of the light pulses. However, if the head hair is directly photographed by the TOF camera, it is found that the resulting depth image is quite noisy, mainly because the time at which the light pulses return is not exactly the same as the hair appears to be non-uniform in depth from one direction. The more jagged the hair is, the more serious the noise of the obtained depth map is; in general, the depth map obtained for the hair portion is much more noisy than for the face and background portions.
Typically, capturing a portion of the hair with a TOF camera results in a significant portion of the noise. Noise means that the transformation of the depth image is discontinuous, the edges are not clear, which is a very detrimental thing. However, in this case, the noise margin obtained by photographing only the head is very sharp, but the height of the depth of the hair portion is very remarkable. The noise information, which is visually harmful and requires smoothing, can be used in reverse to determine the approximate probability of hair location from the noise.
Disclosure of Invention
The invention aims to solve the existing problems and provides a hair segmentation method based on a TOF camera.
In order to achieve the above purpose, the technical scheme adopted by the invention comprises the following steps: comprising the following steps:
step one, establishing a deep learning network based on a data set of a hair color chart and a mask thereof;
obtaining a depth map by using a TOF camera, and obtaining a corresponding variance map;
optimizing the preliminary hair mask obtained by deep learning to obtain an optimized hair mask; and step four, re-optimizing the optimized hair mask by using the variance diagram to obtain a final accurate hair mask.
Adding noise to the hair in the data set, and changing brightness saturation to obtain training data; and then constructing a coded-decoded deep learning network, and combining gradient information of the images to train and train fit, so as to finally obtain a relatively accurate hair segmentation result.
In the second step, for each pixel, a small block with the pixel as the center is provided with a threshold value, and for the pixels in the small block, the variance is obtained for which the difference value between the pixel and the center pixel is within the threshold value range, and finally, a variance map is obtained, wherein the formula is as follows:
for all |d i -d center I < threshold, where n is d i Is a number of (3).
In the third step, the primary hair mask is optimized by utilizing the distance information, the color information and the variance information among the pixel points and combining the method of utilizing the Dense CRF model, so that the optimized hair mask is obtained:
compared with the prior art, the method skillfully and reversely utilizes the characteristic that the flight time generates noise to a certain extent on the hair, and combines the variance diagram to optimize the hair mask twice, thereby realizing higher-precision segmentation of the hair; and optimizing the mask of the hair by using the distance information, the color information and the variance information among the pixel points to obtain the mask with higher quality.
Drawings
FIG. 1 is a schematic diagram of a constructed deep learning network;
FIG. 2 is a flow chart of one embodiment of the present invention.
Detailed Description
The invention will now be further described with reference to the accompanying drawings.
Referring to fig. 1 and 2, fig. 1 and 2 show an embodiment of the present invention, which is based on the characteristic that a TOF camera achieves higher precision segmentation of human hair, and reversely utilizes the characteristic that a certain degree of noise is generated on the hair by the time of flight to achieve higher precision segmentation of the hair.
First, deep learning achieves a preliminary segmentation of the hair.
That is, a deep learning network of hair style is constructed by utilizing the existing data set of a small quantity of and not very fine hair color map plus mask, and the important information of adding hair gradient is integrated, so that a preliminary hair segmentation map is obtained through training.
Referring to fig. 1, the present embodiment uses a Figaro 1K hair dataset with 1050 pieces of hair data. And performing data enhancement on the data set, adding noise to the hair, changing brightness saturation and the like, and finally obtaining about 1 ten thousand training data. And then constructing a deep learning network of encoding-decoding (Encoder-Decoder), and combining gradient information of the image, training and fitting to finally obtain a relatively accurate hair segmentation result.
Next, a variance map processing is obtained using a depth map (depth map) obtained by the TOF camera.
Referring to fig. 2, for each pixel, there is a patch centered on the pixel to set a threshold (obtained by preprocessing); and solving variances for the pixel points of which the difference value between the pixel point and the central pixel point in the small block is within a threshold range, and finally obtaining a variance map. The formula is as follows:
for all |d i -d center I < thr threshold, where n is d i Is a number of (3).
Again, the hair mask was first optimized based on the Dense CRF method.
The traditional dense CRF method is mainly used for carrying out global optimization on images based on color information among pixels and position information among pixels, so that edges are sharper. However, a very poor result is obtained because other background colors such as clothing are similar to hair colors. In this embodiment, the distance information, the color information and the variance information between the pixel points are used to optimize the mask of the hair, so that a better result can be obtained.
Optimizing the preliminary hair mask obtained by deep learning by combining the distance information, the color information and the variance information among the pixel points and a DenseRF model method to obtain an optimized hair mask:
the formula is as above. Where x is the label of the pixel point of the input image. Psi u (x i ) Is a first order mapping function. Psi phi type p (x i ,x j ) Mapping for the interrelationship between pixels. At psi p (x i ,x j ) In (x) i ,x j ) Mu (x) i ,x j )=[x i ≠x j ]。k(f i ,f j ) The first term is the relationship between pixel color value, pixel location, and pixel variance value as a relationship function. The second term is a smoothing function, which depends mainly on the relation between pixel locations.
And finally, performing second optimization on the optimized hair mask by using the variance diagram.
The optimized result obtained by the DenseRF model adds the parts such as the eye eyebrows, etc., and the main reason is that the variance diagram of the eye eyebrows and the color diagram are also very high in weight, so that the positions cannot be effectively eliminated. Meanwhile, the influence of illumination is easily received due to the consideration of the color information.
The hair is essentially black in color, but has a large portion of white due to the effects of light, and an erroneous result is obtained with the Dense CRF.
However, this embodiment also has to use the great advantage that DensecRF can obtain edge information of a comparison detail.
Therefore, in order to avoid these errors, the resulting mask needs to be optimized again using only the variogram. It can be understood from the above formula that, since color information is mostly considered, the obtained mask is small relative to a truly correct mask, and the mask is expanded based on variance, so that the final result is accurate to the hair mask.
The specific algorithm is that the whole binary mask calculated in the previous step is traversed pixel by pixel. If the current pixel is determined to be a non-masked region, then an optimization validation is performed on this pixel and surrounding 4*4 regions based on color and variance. If more than half of the pixels around do not differ much from the center pixel in color and variance, and they are all confirmed as mask parts, the pixels tested are changed to mask parts. A round of optimization iterations is performed until no more changes in the mask area occur. And only the mask with the largest communication area is reserved, and the smaller part of the communication area is removed.
The embodiments of the present invention have been described above with reference to the accompanying drawings and examples, which are not to be construed as limiting the invention, and those skilled in the art can make modifications as required, all within the scope of the appended claims.

Claims (3)

1. A hair segmentation method based on a TOF camera, comprising:
step one, establishing a deep learning network based on a data set of a hair color chart and a mask thereof;
obtaining a depth map by using a TOF camera, and obtaining a corresponding variance map;
optimizing the preliminary hair mask obtained by deep learning, and utilizing distance information, color information and variance information among pixels to optimize the preliminary hair mask by combining with a Dense CRF model to obtain an optimized hair mask:
wherein x is the label of the pixel point of the input image, ψ u (x i ) Is a first order mapping function;
ψ p (x i ,x j ) Mapping for the interrelationship between pixels;
at psi p (x i ,x j ) In (x) i ,x j ) Mu (x) i ,x j )=[x i ≠x j ];k(f i ,f j ) As a relation function, the first term is the relation among the pixel position, the pixel color value and the pixel variance value; the second term is a smoothing function, which depends mainly on the relationship between pixel locations;
optimizing the optimized hair mask again by using the variance diagram to obtain a final accurate hair mask; traversing the hair mask obtained in the third step pixel by pixel; if the current pixel point is determined to be a non-mask area, performing optimization confirmation based on color and variance on the current pixel point and surrounding areas; if more than half of the pixels around do not differ much from the center pixel in color and variance, and they are all confirmed as mask parts, the pixels tested are changed to mask parts.
2. The TOF camera-based hair segmentation method according to claim 1, wherein: adding noise to the hair in the data set, and changing brightness saturation to obtain training data; and then constructing a coded-decoded deep learning network, and combining gradient information of the image to train and fit to finally obtain a relatively accurate hair segmentation result.
3. The TOF camera-based hair segmentation method according to claim 1, wherein: in the second step, a threshold value is set for each pixel point and a small block taking the pixel point as the center, and variance is obtained for the pixel points of which the difference value between the pixel point in the small block and the central pixel point is within the threshold value range, and finally a variance map is obtained.
CN201811452085.1A 2018-11-30 2018-11-30 Hair segmentation method based on TOF camera Active CN110084826B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811452085.1A CN110084826B (en) 2018-11-30 2018-11-30 Hair segmentation method based on TOF camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811452085.1A CN110084826B (en) 2018-11-30 2018-11-30 Hair segmentation method based on TOF camera

Publications (2)

Publication Number Publication Date
CN110084826A CN110084826A (en) 2019-08-02
CN110084826B true CN110084826B (en) 2023-09-12

Family

ID=67412863

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811452085.1A Active CN110084826B (en) 2018-11-30 2018-11-30 Hair segmentation method based on TOF camera

Country Status (1)

Country Link
CN (1) CN110084826B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102147852A (en) * 2010-02-04 2011-08-10 三星电子株式会社 Method for detecting hair area
CN102609686A (en) * 2012-01-19 2012-07-25 宁波大学 Pedestrian detection method
CN106373096A (en) * 2016-08-30 2017-02-01 电子科技大学 Multi-feature weight adaptive shadow elimination method
JP2017188071A (en) * 2016-03-30 2017-10-12 大日本印刷株式会社 Pattern change simulation device, pattern change simulation method and program
CN107277491A (en) * 2012-11-01 2017-10-20 谷歌公司 Generate the method and corresponding medium of the depth map of image
WO2017181332A1 (en) * 2016-04-19 2017-10-26 浙江大学 Single image-based fully automatic 3d hair modeling method
CN108133182A (en) * 2017-12-18 2018-06-08 北京国能日新系统控制技术有限公司 A kind of generation of electricity by new energy Forecasting Methodology and device based on cloud imaging
CN108447060A (en) * 2018-01-29 2018-08-24 上海数迹智能科技有限公司 Front and back scape separation method based on RGB-D images and its front and back scene separation device
AU2018101336A4 (en) * 2018-09-12 2018-10-11 Hu, Yuan Miss Building extraction application based on machine learning in Urban-Suburban-Integration Area
CN108765371A (en) * 2018-04-25 2018-11-06 浙江大学 The dividing method of unconventional cell in a kind of pathological section

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110194762A1 (en) * 2010-02-04 2011-08-11 Samsung Electronics Co., Ltd. Method for detecting hair region
US9928601B2 (en) * 2014-12-01 2018-03-27 Modiface Inc. Automatic segmentation of hair in images
US10582907B2 (en) * 2016-10-31 2020-03-10 Siemens Healthcare Gmbh Deep learning based bone removal in computed tomography angiography

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102147852A (en) * 2010-02-04 2011-08-10 三星电子株式会社 Method for detecting hair area
CN102609686A (en) * 2012-01-19 2012-07-25 宁波大学 Pedestrian detection method
CN107277491A (en) * 2012-11-01 2017-10-20 谷歌公司 Generate the method and corresponding medium of the depth map of image
JP2017188071A (en) * 2016-03-30 2017-10-12 大日本印刷株式会社 Pattern change simulation device, pattern change simulation method and program
WO2017181332A1 (en) * 2016-04-19 2017-10-26 浙江大学 Single image-based fully automatic 3d hair modeling method
CN106373096A (en) * 2016-08-30 2017-02-01 电子科技大学 Multi-feature weight adaptive shadow elimination method
CN108133182A (en) * 2017-12-18 2018-06-08 北京国能日新系统控制技术有限公司 A kind of generation of electricity by new energy Forecasting Methodology and device based on cloud imaging
CN108447060A (en) * 2018-01-29 2018-08-24 上海数迹智能科技有限公司 Front and back scape separation method based on RGB-D images and its front and back scene separation device
CN108765371A (en) * 2018-04-25 2018-11-06 浙江大学 The dividing method of unconventional cell in a kind of pathological section
AU2018101336A4 (en) * 2018-09-12 2018-10-11 Hu, Yuan Miss Building extraction application based on machine learning in Urban-Suburban-Integration Area

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
朱庆棠等.深度学习.《周围神经缺损修复材料的生物制造与临床评估》.中山大学出版社,2018,第136-137、139-141页. *

Also Published As

Publication number Publication date
CN110084826A (en) 2019-08-02

Similar Documents

Publication Publication Date Title
US11457138B2 (en) Method and device for image processing, method for training object detection model
CN107771336B (en) Feature detection and masking in images based on color distribution
Li et al. Multi-angle head pose classification when wearing the mask for face recognition under the COVID-19 coronavirus epidemic
US9547908B1 (en) Feature mask determination for images
US9530071B2 (en) Hierarchical interlinked multi-scale convolutional network for image parsing
CN108537782B (en) Building image matching and fusing method based on contour extraction
US11854244B2 (en) Labeling techniques for a modified panoptic labeling neural network
CN110866871A (en) Text image correction method and device, computer equipment and storage medium
CN103035013B (en) A kind of precise motion shadow detection method based on multi-feature fusion
US20100098331A1 (en) System and method for segmenting foreground and background in a video
CN103810473B (en) A kind of target identification method of human object based on HMM
CN111160291B (en) Human eye detection method based on depth information and CNN
CN102982334B (en) The sparse disparities acquisition methods of based target edge feature and grey similarity
CN109657612B (en) Quality sorting system based on facial image features and application method thereof
CN107944437B (en) A kind of Face detection method based on neural network and integral image
CN102024156A (en) Method for positioning lip region in color face image
CN110245600B (en) Unmanned aerial vehicle road detection method for self-adaptive initial quick stroke width
CN109740572A (en) A kind of human face in-vivo detection method based on partial color textural characteristics
CN103632153B (en) Region-based image saliency map extracting method
US11042986B2 (en) Method for thinning and connection in linear object extraction from an image
CN104851089A (en) Static scene foreground segmentation method and device based on three-dimensional light field
CN107689050A (en) A kind of depth image top sampling method based on Color Image Edge guiding
CN110009670A (en) The heterologous method for registering images described based on FAST feature extraction and PIIFD feature
CN114693760A (en) Image correction method, device and system and electronic equipment
CN107730508A (en) Color documents images multichannel binary processing method

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