CN104952065A - Method for building multilayer detailed skeleton model of garment images - Google Patents

Method for building multilayer detailed skeleton model of garment images Download PDF

Info

Publication number
CN104952065A
CN104952065A CN201510237236.1A CN201510237236A CN104952065A CN 104952065 A CN104952065 A CN 104952065A CN 201510237236 A CN201510237236 A CN 201510237236A CN 104952065 A CN104952065 A CN 104952065A
Authority
CN
China
Prior art keywords
clothing
skeleton
outline
branch
contour
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510237236.1A
Other languages
Chinese (zh)
Other versions
CN104952065B (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.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
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 Zhejiang University ZJU filed Critical Zhejiang University ZJU
Priority to CN201510237236.1A priority Critical patent/CN104952065B/en
Publication of CN104952065A publication Critical patent/CN104952065A/en
Application granted granted Critical
Publication of CN104952065B publication Critical patent/CN104952065B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)

Abstract

本发明公开了一种建立服装图像多层次细节骨架模型的方法。对于预先从图像中提取的服装轮廓,运用约束Delaunay三角化方法提取服装轮廓对应的服装骨架,并对提取得到的服装骨架进行光滑;同时提取服装轮廓对称轴,并利用服装轮廓对称轴匹配服装骨架分支,利用改进的网页排序方法计算骨架关键点的重要性值;利用迭代循环计算服装骨架关键点的重要性值并且简化服装骨架,得到最后的服装图像的多层次细节骨架模型。本发明可对服装骨架进行依次简化,并可得到服装图像从简到繁的多层次细节骨架模型。

The invention discloses a method for establishing a multi-level detailed skeleton model of clothing images. For the clothing outline extracted from the image in advance, use the constrained Delaunay triangulation method to extract the clothing skeleton corresponding to the clothing outline, and smooth the extracted clothing skeleton; at the same time extract the symmetry axis of the clothing outline, and use the clothing outline symmetry axis to match the clothing skeleton Branch, use the improved web page sorting method to calculate the importance value of the key points of the skeleton; use the iterative cycle to calculate the importance value of the key points of the clothing skeleton and simplify the clothing skeleton to obtain the final multi-level detail skeleton model of the clothing image. The invention can sequentially simplify the clothing skeleton, and can obtain the multi-level detailed skeleton model of the clothing image from simple to complicated.

Description

一种建立服装图像多层次细节骨架模型的方法A method for building multi-level details skeleton model of clothing image

技术领域technical field

本发明涉及一种建立服装图像骨架模型的方法,尤其是一种建立服装图像多层次细节骨架模型的方法。The invention relates to a method for establishing a skeleton model of a clothing image, in particular to a method for establishing a multi-level detailed skeleton model of a clothing image.

背景技术Background technique

图像处理领域中,骨架可以用一种简单紧凑的方式对物体进行描述,尤其在服装图像的处理应用中,骨架可以集中体现服装的一系列信息,比如对称性、方向性、属性。但在实际应用中,骨架不仅容易受到物体轮廓线的干扰而产生不合理的细小分支,而且自身可能也包含过多过杂的小分支。因此,骨架简化成为了在具有丰富细节的骨架中提取有效特征的一个重要手段。传统的骨架简化方法大多数采取简单的裁剪方法,即先选定一个与骨架属性相关的参数(通常选取长度为参数),然后通过设置该参数的阈值来裁剪掉干扰分支以及不重要的骨架分支。但这种方法只能得到一个相对简化的骨架,而不能抽离出最重要的骨架原型;另外,参数的阈值不容易确定,常常需要人为地进行设置和调整。这种方法存在不确定性大和效率低下的缺点,因而无法满足骨架在实际应用中的多重、快速的应用。In the field of image processing, skeletons can describe objects in a simple and compact way. Especially in the application of clothing image processing, skeletons can embody a series of information of clothing, such as symmetry, directionality, and attributes. However, in practical applications, the skeleton is not only easily disturbed by the outline of the object to produce unreasonably small branches, but also may contain too many small branches. Therefore, skeleton simplification becomes an important means to extract effective features in skeletons with rich details. Most of the traditional skeleton simplification methods adopt a simple clipping method, that is, first select a parameter related to the skeleton attribute (usually the length is selected as the parameter), and then cut out the interference branch and the unimportant skeleton branch by setting the threshold of the parameter. . But this method can only get a relatively simplified skeleton, but cannot extract the most important skeleton prototype; in addition, the threshold of the parameters is not easy to determine, and often needs to be set and adjusted manually. This method has the shortcomings of large uncertainty and low efficiency, so it cannot meet the multiple and rapid application of the skeleton in practical applications.

发明内容Contents of the invention

针对上述提到的传统骨架简化方法所存在的不确定性大和效率低下的缺点,本发明提供了一种建立服装图像多层次细节骨架模型的方法,通过将修改的PageRank方法运用到建立服装图像的骨架中,对骨架分支进行重要性等级评估,并且进行不同层次的分级,自动建立一个多层次细节的模型。该模型在服装分类和服装匹配中具有很大的应用前景。Aiming at the shortcomings of large uncertainty and low efficiency in the traditional skeleton simplification method mentioned above, the present invention provides a method for establishing a multi-level detailed skeleton model of clothing images, by applying the modified PageRank method to the construction of clothing images In the skeleton, the importance level of the skeleton branch is evaluated, and different levels of classification are carried out to automatically build a multi-level detail model. This model has great application prospects in clothing classification and clothing matching.

如图1所示,本发明所采用的技术方案包括以下步骤:As shown in Figure 1, the technical scheme adopted in the present invention comprises the following steps:

步骤一、提取服装骨架:通过OPENCV工具从服装图像提取服装轮廓并等距采样得到服装轮廓的多边形,将组成服装轮廓的多边形作为约束条件,对多边形内部进行Delaunay三角剖分,使得多边形内部的三角形保持Delaunay三角形的属性,得到具有两种不同类型边的三角形;两种不同类型边为存在于服装轮廓的内部的内部边和存在于服装轮廓上的边界边,边界边由两个相邻的服装轮廓点之间的连线组成,再将剖分得到的三角形根据所具有内部边和边界边的数量划分为三类,提取每个三角形的内部骨架线段,将所有三角形的内部骨架线段端点首尾相连,得到服装骨架;Step 1. Extract the clothing skeleton: extract the clothing outline from the clothing image with the OPENCV tool and sample the polygon at equal intervals to obtain the polygon of the clothing outline, use the polygons that make up the clothing outline as constraints, and perform Delaunay triangulation on the inside of the polygon, so that the triangles inside the polygon Keeping the properties of the Delaunay triangle, a triangle with two different types of edges is obtained; the two different types of edges are the interior edges existing in the interior of the clothing outline and the boundary edges existing on the clothing outline, and the boundary edge is composed of two adjacent clothing The connection lines between the contour points are composed, and then the divided triangles are divided into three types according to the number of internal edges and boundary edges, and the internal skeleton line segments of each triangle are extracted, and the end points of the internal skeleton line segments of all triangles are connected end to end. , get the clothing skeleton;

上述的服装图像中图像背景颜色单一并与服装颜色的具有明显色差,能显示出服装轮廓。In the above clothing image, the background color of the image is single and has obvious color difference from that of the clothing, which can show the outline of the clothing.

步骤二、对所提取的服装骨架进行光滑:Step 2. Smooth the extracted clothing skeleton:

提取服装骨架中的服装骨架分支,为了光滑服装骨架,分别对每个服装骨架分支进行Bezier曲线拟合,将服装骨架分支的两个端点作为Bezier曲线的始末点,服装骨架分支中间的骨架连接点作为Bezier曲线的控制点;这样既可达到光滑的效果,又可保持关键点的位置不变,以此来保证服装骨架的整体位置不变。Extract the clothing skeleton branches in the clothing skeleton. In order to smooth the clothing skeleton, perform Bezier curve fitting on each clothing skeleton branch respectively. The two end points of the clothing skeleton branch are used as the beginning and end points of the Bezier curve, and the skeleton connection point in the middle of the clothing skeleton branch is As the control point of the Bezier curve; this can not only achieve a smooth effect, but also keep the position of the key point unchanged, so as to ensure that the overall position of the clothing skeleton remains unchanged.

步骤三、提取服装轮廓对称轴:Step 3. Extract the symmetry axis of the clothing outline:

大部分服装都具有对称性,因此先用主成分分析PCA(Principal ComponentAnalysis)方法对服装轮廓的等距采样点进行降维得到两个特征向量,两个特征向量分别作为主方向和次方向;以服装轮廓的重心点为经过点,分别以主方向和次方向为直线方向,各自组成两个PCA轴,每个PCA轴将服装轮廓分割成两侧的轮廓线P和Q;Most of the clothing has symmetry, so first use the principal component analysis PCA (Principal Component Analysis) method to reduce the dimensionality of the equidistant sampling points of the clothing outline to obtain two eigenvectors, and the two eigenvectors are respectively used as the main direction and the secondary direction; The center of gravity of the clothing outline is the passing point, and the main direction and the secondary direction are respectively used as the straight line direction to form two PCA axes. Each PCA axis divides the clothing outline into contour lines P and Q on both sides;

以其中任意一个PCA轴为镜像轴,将其中一侧的轮廓线P镜像映射到另一侧,得到镜像部分轮廓线P′,该镜像部分轮廓线P′和原来分割得到的另一部分侧的轮廓线Q在镜像轴的同侧,并计算镜像轴同侧两个轮廓线P′和Q的镜像Hausdorff距离(镜像Hausdorff距离表示成MHD(Mirror Hausdorff Distance)值,用来衡量被PCA轴分割得到的两部分轮廓线P和Q的对称性),分别计算两个PCA轴分割得到两侧轮廓线的镜像Hausdorff距离,选取较小镜像Hausdorff距离所对应的PCA轴(即更具有轮廓对称性的轴)作为初始服装轮廓对称轴l0,初始服装轮廓对称轴l0进行迭代调整得到真实服装轮廓对称轴l;Taking any one of the PCA axes as the mirror axis, mirror the contour line P on one side to the other side to obtain the contour line P' of the mirrored part, and the contour line P' of the mirrored part and the contour of the other side obtained by the original segmentation The line Q is on the same side of the mirror axis, and the mirror Hausdorff distance of the two contour lines P′ and Q on the same side of the mirror axis is calculated (the mirror Hausdorff distance is expressed as MHD (Mirror Hausdorff Distance) value, which is used to measure the value obtained by dividing by the PCA axis The symmetry of the two parts of the contour line P and Q), respectively calculate the two PCA axis divisions to obtain the mirror Hausdorff distance of the contour lines on both sides, and select the PCA axis corresponding to the smaller mirror Hausdorff distance (that is, the axis with more contour symmetry) As the initial clothing outline symmetry axis l 0 , the initial clothing outline symmetry axis l 0 is iteratively adjusted to obtain the real clothing outline symmetry axis l;

步骤四、匹配服装骨架分支:Step 4. Match the clothing skeleton branch:

利用真实服装轮廓对称轴l对服装骨架分支根据重心的位置进行左右归类,计算左、右侧服装骨架分支两两之间的镜像Hausdorff距离;依次选取镜像Hausdorff距离最小值所对应的两个左右服装骨架分支作为匹配对,已选取作为匹配对的两个左右服装骨架分支不作为下一次选取匹配对的对象,直至其中一侧的服装骨架分支已被选取完,得到多组匹配对;Use the symmetry axis l of the real clothing outline to classify the clothing skeleton branches left and right according to the position of the center of gravity, and calculate the mirror Hausdorff distance between the left and right clothing skeleton branches; select the two left and right corresponding to the minimum value of the mirror Hausdorff distance in turn The clothing skeleton branch is used as a matching pair, and the two left and right clothing skeleton branches that have been selected as a matching pair are not used as objects for the next selection of matching pairs until the clothing skeleton branch on one side has been selected, and multiple sets of matching pairs are obtained;

将镜像Hausdorff距离依次从小到大排列,再运用大津Otsu法,每个镜像Hausdorff距离依次作为分割值,用分割值将所有得到的镜像Hausdorff距离根据大小分成两类,并计算两类各自的类内方差以及类间方差,取两类的类内方差最小和类间方差最大对应的分割值作为最优阈值,去除大于最优阈值的镜像Hausdorff距离所对应的服装骨架分支匹配对;大于最优阈值的镜像Hausdorff距离所对应的服装骨架分支匹配对通常是一些对称性不高、匹配错误的匹配对,因此最后去除这些服装骨架分支匹配对。Arrange the mirrored Hausdorff distances from small to large, and then use the Otsu Otsu method. Each mirrored Hausdorff distance is used as a split value in turn. Use the split value to divide all the mirrored Hausdorff distances into two categories according to the size, and calculate the respective intra-class values of the two categories. Variance and inter-class variance, take the segmentation value corresponding to the smallest intra-class variance and the largest inter-class variance of the two classes as the optimal threshold, and remove the matching pairs of clothing skeleton branches corresponding to the mirror Hausdorff distance greater than the optimal threshold; greater than the optimal threshold The clothing skeleton branch matching pairs corresponding to the mirror image Hausdorff distance of are usually some matching pairs with low symmetry and matching errors, so these clothing skeleton branch matching pairs are finally removed.

步骤五、利用改进的网页排序方法(PageRank方法)计算骨架关键点的重要性值:Step 5, utilize the improved web page sorting method (PageRank method) to calculate the importance value of skeleton key point:

将每个骨架关键点作为网页排序方法的页面节点赋予相同的重要性初始值,每个服装骨架分支表示了两个骨架关键点(服装骨架分支的两个端点)之间的一个链接,包含出链和入链;Each skeleton key point is given the same initial value of importance as the page node of the webpage sorting method, and each clothing skeleton branch represents a link between two skeleton key points (two endpoints of the clothing skeleton branch), including the chain and in-chain;

所有的页面节点和它们相互之间的链接关系组成了一个网络图模型,利用PageRank方法可计算在这个网络图模型中每个页面节点的重要性值。PageRank方法刚开始赋予每个网页相同的重要性值,通过出链、入链的关系不断迭代计算来更新每个页面节点的PageRank得分(定义为PR值),直到得分稳定为止。本发明中,改进的PageRank方法将出链、入链的路径距离(即服装骨架分支的长度)添加到方法中。All the page nodes and their mutual links constitute a network graph model, and the importance value of each page node in the network graph model can be calculated by using the PageRank method. The PageRank method first assigns the same importance value to each webpage, and updates the PageRank score (defined as PR value) of each page node through the iterative calculation of the relationship between outbound and inbound links until the score is stable. In the present invention, the improved PageRank method adds the path distances of outgoing links and incoming links (that is, the length of clothing skeleton branches) to the method.

将服装骨架分支的长度作为网页排序方法中重要性值的分配因素,采用网页排序方法通过出链、入链的关系不断迭代计算更新,直至数值稳定得到最后每个页面节点的重要性值,具体采用以下公式:The length of the clothing skeleton branch is used as the distribution factor of the importance value in the web page sorting method, and the web page sorting method is used to iteratively calculate and update through the relationship between the outgoing link and the incoming link until the value is stable and the importance value of each page node is finally obtained. Specifically The following formula is used:

PRPR (( EE. )) == ΣΣ ii == 00 mm -- 11 LL (( EE. ,, EE. ii )) ΣΣ jj == 00 nno -- 11 LL (( EE. ii ,, EE. jj )) PRPR (( EE. ii ))

其中,PR(E)表示页面节点E的重要性值,m表示页面节点E所链接的页面节点Ei的数量,N(Ei)表示页面节点Ei所链接的页面节点数量,n表示页面节点Ei所链接的页面节点Ej的数量,L(Ei,Ej)表示两个相互链接页面节点Ei和Ej之间的路径长度,i表示页面节点E所链接的页面节点Ei的序数,j表示页面节点Ei所链接的页面节点Ej的序数;Among them, PR(E) represents the importance value of page node E, m represents the number of page nodes E i linked by page node E, N(E i ) represents the number of page nodes linked by page node E i, and n represents the number of page nodes E i linked to. The number of page nodes E j linked by node E i , L(E i , E j ) represents the path length between two interlinked page nodes E i and E j , and i represents the page node E linked by page node E The ordinal number of i , j represents the ordinal number of the page node E j linked by the page node E i ;

步骤六、利用迭代循环计算服装骨架的重要性值,建立服装图像的多层次细节骨架模型:Step 6. Use the iterative cycle to calculate the importance value of the clothing skeleton, and establish a multi-level detailed skeleton model of the clothing image:

将服装的骨架末梢点所连接的唯一服装骨架分支定义为骨架末梢分支,重复计算服装骨架关键点的重要性值并且简化服装骨架,得到最后的服装图像的多层次细节骨架模型.The only clothing skeleton branch connected to the clothing skeleton terminal point is defined as the skeleton terminal branch, and the importance value of the key points of the clothing skeleton is repeatedly calculated and the clothing skeleton is simplified to obtain the final multi-level detail skeleton model of the clothing image.

从最初的服装骨架开始,以上过程可以得到一系列依次简化的服装骨架,共同组成了从繁到简的一系列服装骨架。为了应用的方便性,将这些服装骨架的排列方式重新倒序排列,得到从简到繁的一系列服装骨架,即服装图像的多层次细节骨架模型。Starting from the initial clothing skeleton, the above process can obtain a series of sequentially simplified clothing skeletons, which together form a series of clothing skeletons from complex to simple. For the convenience of application, the arrangement of these clothing skeletons is rearranged in reverse order to obtain a series of clothing skeletons from simple to complex, that is, the multi-level detail skeleton model of clothing images.

所述步骤一中,剖分得到的三角形根据所具有的内部边和边界边的数量采用以下方式划分为三类:具有一个内部边和二个边界边的为I类三角形,具有二个内部边和一个边界边的为II类三角形,具有三个内部边的为III类三角形。In the described step one, the triangles obtained by splitting are divided into three categories according to the quantity of internal sides and boundary sides: the triangles with one internal side and two boundary sides are Class I triangles, and the triangles with two internal sides and one boundary side are class II triangles, and those with three interior sides are class III triangles.

所述步骤一中,内部骨架线段包括I类三角形中内部边的中点和该内部边所对的三角形顶点的连线、II类三角形中两个内部边的中点之间连线、III类三角形中三个内部边的中点和三角形Voronoi点的各自连线。In said step 1, the internal skeleton line segment includes the midpoint of the internal edge in the type I triangle and the connection line of the triangle vertex to which the internal edge corresponds, the connection line between the midpoints of the two internal edges in the type II triangle, and the line between the midpoints of the internal edge in the type III triangle. The respective lines connecting the midpoints of the three interior sides of the triangle to the Voronoi points of the triangle.

所述步骤二中,提取服装骨架中的服装骨架分支具体为:根据步骤一组成服装骨架的点有以下三类:连接三个三角形内部骨架线段的骨架交叉点、连接二个三角形内部骨架线段的骨架连接点和只连接一个三角形内部骨架线段的骨架末梢点;将骨架交叉点和骨架末梢点作为骨架关键点,如果两个骨架关键点之间的骨架线段路径上不存在骨架交叉点,则该骨架线段路径为服装骨架分支,该两个骨架关键点为服装骨架分支的两个端点。In the second step, the clothing skeleton branch in the clothing skeleton is extracted as follows: according to step one, the points forming the clothing skeleton have the following three types: the skeleton intersection point connecting three triangle internal skeleton line segments, and the point connecting two triangle internal skeleton line segments. Skeleton connection points and skeleton end points that only connect a skeleton line segment inside a triangle; take the skeleton intersection point and the skeleton end point as the skeleton key point, if there is no skeleton intersection point on the skeleton line segment path between the two skeleton key points, then the The path of the skeleton line segment is the branch of the clothing skeleton, and the two key points of the skeleton are the two endpoints of the branch of the clothing skeleton.

所述步骤三中,对初始服装轮廓对称轴lk采用以下方式进行迭代调整以接近真实服装轮廓对称轴:In the third step, the initial clothing outline symmetry axis l k is iteratively adjusted in the following manner to approach the real clothing outline symmetry axis:

3.1)服装轮廓对称轴lk将服装轮廓分割为两侧的轮廓线Pk和Qk,k为服装轮廓对称轴调整次数,将其中一部分轮廓线Pk以服装轮廓对称轴lk为基准映射到另一侧,得到镜像部分轮廓P′k3.1) Clothing contour symmetry axis l k divides the clothing contour into contour lines P k and Q k on both sides, k is the number of adjustments to the clothing contour symmetry axis, and maps a part of the contour lines P k to the clothing contour symmetry axis l k to the other side, to obtain the mirrored partial profile P′ k ;

3.2)将镜像部分轮廓P′k和另一侧轮廓线Qk上的点作为两个点集合,用ICP(Iterative Closest Points)方法不断计算并更新得到镜像部分轮廓P″k,更新后的镜像部分轮廓P″k和其初始未映射的部分轮廓Pk进行点的一一对应,得到对应的各对匹配点;3.2) Take the points on the contour P′ k of the mirrored part and the contour line Q k on the other side as two point sets, use the ICP (Iterative Closest Points) method to continuously calculate and update to obtain the contour P″ k of the mirrored part, and the updated mirror image Partial profile P″ k and its initial unmapped partial profile P k carry out one-to-one correspondence of points, and obtain corresponding pairs of matching points;

3.3)利用最小二乘法,将每对匹配点连接线段的中点作为点集来拟合得到新的服装轮廓对称轴lk+13.3) Use the least squares method to fit the midpoint of each pair of matching point connecting line segments as a point set to obtain a new clothing outline symmetry axis l k+1 ;

3.4)重复以上3.1)、3.2)、3.3)步骤进行迭代调整,直至当前步骤得到的服装轮廓对称轴ln与上一步得到的服装轮廓对称轴ln-1的偏差角度小于2°,停止计算,将最后一次计算得到的服装轮廓对称轴ln作为真实服装轮廓对称轴l,n为得到真实服装轮廓对称轴所经过的调整次数。3.4) Repeat the above 3.1), 3.2), 3.3) steps to iteratively adjust until the deviation angle between the symmetry axis l n of the clothing outline obtained in the current step and the symmetry axis l n -1 of the clothing outline obtained in the previous step is less than 2°, and stop the calculation , the clothing outline symmetry axis l n obtained from the last calculation is taken as the real clothing outline symmetry axis l, and n is the number of adjustments to obtain the real clothing outline symmetry axis.

所述步骤四中,左、右侧服装骨架分支两两之间的镜像Hausdorff距离包括其中一侧任一服装骨架分支与另一侧各个服装骨架分支的镜像Hausdorff距离。In the fourth step, the mirrored Hausdorff distances between the left and right clothing skeleton branches include the mirrored Hausdorff distances between any clothing skeleton branch on one side and each clothing skeleton branch on the other side.

所述步骤六具体包括:6.1)由步骤五计算得到各个骨架关键点的重要性值与步骤四匹配得到的各服装骨架分支匹配对,计算出骨架末梢分支匹配对中两个骨架末梢点重要性值的平均值;Said step 6 specifically includes: 6.1) The importance value of each skeleton key point calculated in step 5 is matched with each clothing skeleton branch matching pair obtained in step 4, and the importance of two skeleton terminal points in the matching pair of skeleton terminal branches is calculated. the average of the values;

6.2)选出重要性值的平均值小于重要性初始值的骨架末梢点匹配对并去除其所对应的骨架末梢分支匹配对;对于未匹配的单个骨架末梢分支,去除重要性值小于重要性初始值的骨架末梢分支,生成新服装骨架;6.2) Select the matching pair of skeleton terminal points whose average value is less than the initial value of importance, and remove the matching pair of corresponding skeleton terminal branches; The end branch of the skeleton of the value generates a new clothing skeleton;

6.3)依次迭代重复6.1)、6.2)步骤,直至最后剩余的服装骨架分支个数为1或0,而无法继续计算新的简化服装骨架的重要性值,则完成建立服装图像的多层次细节骨架模型。6.3) Iteratively repeat steps 6.1) and 6.2) until the number of branches of the remaining clothing skeleton is 1 or 0, and the importance value of the new simplified clothing skeleton cannot be calculated, then the establishment of the multi-level detail skeleton of the clothing image is completed Model.

本发明具有的有益效果是:The beneficial effects that the present invention has are:

本发明通过将修改的PageRank方法运用到建立服装图像的骨架中,对骨架分支进行重要性等级评估,并且进行不同层次的分级,自动建立一个多层次细节的模型。本发明按照重要程度对服装骨架进行依次简化,在服装识别和服装匹配方面具有广泛的应用前景。本发明方法效率高,确定性好,可满足骨架在实际应用中的多重、快速的应用。The invention applies the modified PageRank method to the skeleton of the clothing image, evaluates the importance level of the skeleton branches, and performs different levels of classification to automatically establish a multi-level detail model. The invention sequentially simplifies the clothing skeleton according to the degree of importance, and has wide application prospects in clothing identification and clothing matching. The method of the invention has high efficiency and good certainty, and can satisfy the multiple and rapid application of the skeleton in practical applications.

附图说明Description of drawings

图1是本发明所述方法的流程图。Figure 1 is a flow chart of the method of the present invention.

图2是本发明实施例提取的服装轮廓。Fig. 2 is the clothing outline extracted by the embodiment of the present invention.

图3是本发明实施例提取的服装骨架。Fig. 3 is the clothing skeleton extracted by the embodiment of the present invention.

图4是本发明实施例的服装骨架分支。Fig. 4 is the clothing skeleton branch of the embodiment of the present invention.

图5是本发明实施例光滑的服装骨架。Figure 5 is a smooth garment skeleton according to an embodiment of the present invention.

图6是本发明实施例服装轮廓对称轴的计算过程和结果。Fig. 6 is the calculation process and results of the symmetry axis of the garment outline according to the embodiment of the present invention.

图7是本发明实施例服装骨架分支的匹配对。Fig. 7 is a matching pair of clothing skeleton branches according to an embodiment of the present invention.

图8是本发明实施例简化服装骨架及骨架关键点的过程。Fig. 8 is the process of simplifying the clothing skeleton and the key points of the skeleton according to the embodiment of the present invention.

图中:1、服装,2、服装轮廓,3、内部边,4、边界边,5、服装骨架,6、骨架交叉点,7、骨架连接点,8、骨架末梢点,9、骨架关键点,10、服装骨架分支,11、服装轮廓对称轴,12、PCA轴,13、匹配对,14、多层次细节骨架模型,15、骨架末梢分支。In the figure: 1. Clothing, 2. Clothing outline, 3. Internal edge, 4. Boundary edge, 5. Clothing skeleton, 6. Skeleton intersection point, 7. Skeleton connection point, 8. Skeleton end point, 9. Skeleton key point , 10, clothing skeleton branch, 11, clothing outline symmetry axis, 12, PCA axis, 13, matching pair, 14, multi-level detailed skeleton model, 15, skeleton terminal branch.

具体实施方式Detailed ways

下面结合附图和实施例对本发明作进一步说明。The present invention will be further described below in conjunction with drawings and embodiments.

本发明的具体实施例如下:Specific embodiments of the present invention are as follows:

步骤一:如图2所示,提取服装1对应的服装轮廓2,将组成服装轮廓2的多边形作为约束条件进行Delaunay三角剖分。Step 1: As shown in Figure 2, extract the clothing outline 2 corresponding to clothing 1, and use the polygons that make up the clothing outline 2 as constraints to perform Delaunay triangulation.

如图3(a)所示,剖分得到的三角形具有内部边3和边界边4。将剖分得到的三角形根据所具有的内部边3和边界边4的数量划分为以下三类:具有一个内部边3和两个边界边4的为I类三角形;具有两个内部边3和一个边界边4的为II类三角形;具有三个内部边3的为III类三角形。As shown in FIG. 3( a ), the divided triangle has internal sides 3 and boundary sides 4 . The divided triangles are divided into the following three categories according to the number of interior sides 3 and boundary sides 4: the triangle with one interior side 3 and two boundary sides 4 is a type I triangle; the triangle with two interior sides 3 and one A triangle with boundary side 4 is a type II triangle; a triangle with three interior sides 3 is a type III triangle.

提取每个三角形的内部骨架线段,即I类三角形中内部边的中点和该内部边所对的三角形顶点的连线、II类三角形中二个内部边的中点连线、III类三角形中三个内部边的中点和三角形Voronoi点的各自连线。将所有三角形的内部骨架线段端点首尾相连,可以得到服装骨架5,如图3(b)和图3(c)所示。Extract the internal skeleton line segment of each triangle, that is, the connection line between the midpoint of the internal side in the type I triangle and the triangle vertex corresponding to the internal side, the connection line between the midpoints of the two internal sides in the type II triangle, and the connection line between the midpoints of the two internal sides in the type III triangle. The respective lines connecting the midpoints of the three interior sides and the Voronoi points of the triangle. Connect all the triangle internal skeleton line end points end to end to get the clothing skeleton 5, as shown in Figure 3(b) and Figure 3(c).

步骤二:对所提取的服装骨架5进行光滑。Step 2: Smooth the extracted clothing skeleton 5 .

如图4(b)所示,组成服装骨架5的点有三类:连接三个三角形内部骨架线段的骨架交叉点6、连接二个三角形内部骨架线段的骨架连接点7和只连接一个三角形内部骨架线段的骨架末梢点8。As shown in Figure 4(b), there are three types of points that make up the clothing skeleton 5: the skeleton intersection point 6 that connects three triangle interior skeleton line segments, the skeleton connection point 7 that connects two triangle interior skeleton line segments, and only one triangle interior skeleton line segment Skeleton end point 8 of the line segment.

将其中骨架交叉点6和骨架末梢点8定义为骨架关键点9,如果两个骨架关键点9之间的骨架线段路径上不存在骨架交叉点6,则将这个骨架线段路径定义为服装骨架分支10,这两个骨架关键点9就是服装骨架分支10的两个端点,如图4(c)所示。将服装骨架分支10的两个端点作为Bezier曲线的始末点,中间的骨架连接点作为Bezier曲线的控制点,对每个服装骨架分支10进行Bezier曲线拟合,结果如图5(b)所示。Define the skeleton intersection point 6 and the skeleton end point 8 as the skeleton key point 9, if there is no skeleton intersection point 6 on the skeleton line segment path between the two skeleton key points 9, then define this skeleton line segment path as the clothing skeleton branch 10. The two skeleton key points 9 are the two endpoints of the clothing skeleton branch 10, as shown in Figure 4(c). The two endpoints of the clothing skeleton branch 10 are used as the beginning and end points of the Bezier curve, and the middle skeleton connection point is used as the control point of the Bezier curve. Each clothing skeleton branch 10 is fitted with a Bezier curve, and the result is shown in Figure 5(b) .

步骤三:提取服装轮廓对称轴11。Step 3: Extract the symmetry axis 11 of the clothing outline.

用主成分分析PCA(Principal Component Analysis)方法对服装轮廓的等距采样点进行降维得到两个特征向量,两个特征向量分别作为主方向和次方向。如图6所示,以服装轮廓2的重心点为经过点,分别以主方向和次方向为直线方向,各自组成两个PCA轴12,每个PCA轴12将服装轮廓2分割成两部分轮廓线P和Q。以其中一个PCA轴12为镜像轴,将其中一部分轮廓线Ej镜像映射到另一侧,得到镜像部分轮廓线P′,该镜像部分轮廓线P′和原来分割得到的另一部分轮廓线Q在镜像轴的同侧,并计算镜像轴同侧两轮廓线P′和Q的镜像Hausdorff距离,即称为MHD值。分别计算两个PCA轴12分割得到的两部分轮廓线的MHD值,选取拥有较小值对应的PCA轴12作为初始服装轮廓对称轴lk(k为服装轮廓对称轴调整次数)。Using the PCA (Principal Component Analysis) method to reduce the dimensionality of the equidistant sampling points of the clothing outline to obtain two eigenvectors, the two eigenvectors are respectively used as the main direction and the secondary direction. As shown in Figure 6, the center of gravity of the clothing outline 2 is taken as the passing point, and the main direction and the secondary direction are respectively used as the straight line directions to form two PCA axes 12. Each PCA axis 12 divides the clothing outline 2 into two parts. Lines P and Q. Taking one of the PCA axes 12 as the mirror axis, mirroring a part of the contour line Ej to the other side to obtain the mirrored part of the contour line P', the mirrored part of the contour line P' and the other part of the contour line Q obtained by the original segmentation are in The same side of the mirror axis, and calculate the mirror Hausdorff distance of the two contour lines P' and Q on the same side of the mirror axis, which is called the MHD value. Calculate the MHD values of the two parts of the contour line obtained by dividing the two PCA axes 12 respectively, and select the PCA axis 12 corresponding to the smaller value as the initial clothing contour symmetry axis l k (k is the number of clothing contour symmetry axis adjustments).

对初始服装轮廓对称轴lk进行进一步地迭代调整以接近真实的服装轮廓对称轴11:Make further iterative adjustments to the initial clothing outline symmetry axis l k to approach the real clothing outline symmetry axis 11:

3.1)初始服装轮廓对称轴lk将服装轮廓分割为两部分轮廓线Pk和Qk,将其中一部分轮廓线lk以初始服装轮廓对称轴lk为基准映射到另一侧,得到镜像部分轮廓P′k,如图6(a)所示;3.1) The initial clothing outline symmetry axis l k divides the clothing outline into two parts of the contour line P k and Q k , and maps one part of the contour line l k to the other side based on the initial clothing outline symmetry axis l k to obtain the mirror part Profile P′ k , as shown in Fig. 6(a);

3.2)将镜像部分轮廓P′k和分割得到的另一部分轮廓线Qk上的点作为两个点集合,用ICP方法不断计算并更新该镜像部分轮廓P″k,更新后的镜像部分轮廓P″k和其初始未映射的部分轮廓Pk进行点的一一对应,如图6(b)所示;3.2) Take the points on the mirrored part contour P′ k and the segmented part of the contour line Q k as two point sets, use the ICP method to continuously calculate and update the mirrored part contour P″ k , and the updated mirrored part contour P ″ k and its initial unmapped partial profile P k carry out point-to-point correspondence, as shown in Figure 6(b);

3.3)利用最小二乘法,将每对对应点的中点作为点集来拟合得到新的服装轮廓对称轴lk+1,如图6(c)所示;3.3) Use the least squares method to fit the midpoint of each pair of corresponding points as a point set to obtain a new clothing outline symmetry axis l k+1 , as shown in Figure 6(c);

3.4)重复以上3.1)、3.2)、3.3)步骤,直至得到的服装轮廓对称轴ln(n为得到真实的服装轮廓对称轴所经过的调整次数)与上一步的服装轮廓对称轴ln-1的偏差角度小于2°,停止计算,将ln作为真实的服装轮廓对称轴11。3.4) Repeat the above steps 3.1), 3.2), and 3.3) until the obtained clothing outline symmetry axis l n (n is the number of adjustments to obtain the real clothing outline symmetry axis) and the clothing outline symmetry axis l n- If the deviation angle of 1 is less than 2°, the calculation is stopped, and l n is taken as the real clothing outline symmetry axis 11.

步骤四:利用服装轮廓对称轴11对服装骨架分支10进行左右归类,如图7(a)所示,计算左右服装骨架分支10的两两MHD值,本实施例中的两两MHD值如表1所示,依次选取MHD值最小值所对应的两个左右服装骨架分支作为匹配对,已选取作为匹配对的两个左右服装骨架分支不作为下一次选取匹配对的对象,直至其中一侧的服装骨架分支已被选取完,得到多组匹配对:Step 4: Utilize the clothing outline symmetry axis 11 to classify the clothing skeleton branches 10 left and right, as shown in Figure 7 (a), calculate the pairwise MHD values of the left and right clothing skeleton branches 10, the pairwise MHD values in the present embodiment are as follows As shown in Table 1, the two left and right clothing skeleton branches corresponding to the minimum value of MHD value are sequentially selected as matching pairs, and the two left and right clothing skeleton branches that have been selected as matching pairs are not used as the objects for the next selection of matching pairs until one side The clothing skeleton branch of has been selected, and multiple matching pairs are obtained:

表1Table 1

根据表1得到的结果如图7(b)到图7(m)所示。运用大津Otsu法,将MHD值依次从小到大排列,分别选取每个MHD值作为阈值,该阈值将匹配对13根据对应的MHD值大小分成两类,在这两类的类内方差最小和类间方差最大的时候,得到本实施例的最优阈值20.082。大于最优阈值的MHD值所对应的服装骨架分支匹配13对通常是一些对称性不高、匹配错误的匹配对,根据表1中的结果,即为图7中的(l)和(m),最后去除这些匹配对13。The results obtained according to Table 1 are shown in Fig. 7(b) to Fig. 7(m). Using the Otsu Otsu method, the MHD values are arranged in ascending order, and each MHD value is selected as a threshold value. The threshold value divides the matching pair 13 into two categories according to the corresponding MHD value. The variance within the two categories is the smallest and the category When the variance between is the largest, the optimal threshold of this embodiment is 20.082. The clothing skeleton branch matching 13 pairs corresponding to the MHD value greater than the optimal threshold is usually some matching pairs with low symmetry and matching errors. According to the results in Table 1, they are (l) and (m) in Figure 7 , and finally remove these matching pairs 13.

步骤五:利用改进的PageRank方法计算骨架关键点9的重要性值,即为PR值。Step 5: Use the improved PageRank method to calculate the importance value of skeleton key point 9, which is the PR value.

将骨架关键点9作为PageRank方法的页面节点,每个服装骨架分支10表示了两个骨架关键点9(服装骨架分支10的两个端点)之间的一个链接。所有的页面节点和它们相互之间的链接关系组成了一个网络图模型。改进的PageRank方法公式为:Using the skeleton key point 9 as the page node of the PageRank method, each clothing skeleton branch 10 represents a link between two skeleton key points 9 (two endpoints of the clothing skeleton branch 10). All page nodes and their interlinkages constitute a network graph model. The improved PageRank method formula is:

PRPR (( EE. )) == ΣΣ ii == 00 mm -- 11 LL (( EE. ,, EE. ii )) ΣΣ jj == 00 nno -- 11 LL (( EE. ii ,, EE. jj )) PRPR (( EE. ii ))

PR(E)表示页面节点E的PR值,m表示页面节点E所链接的页面节点Ei的数量,N(Ei)表示页面节点Ei所链接的页面节点数量,n表示页面节点Ei所链接的页面节点Ej的数量,L(Ei,Ej)表示两个相互链接页面节点Ei和Ej之间的路径长度。PR(E) represents the PR value of page node E, m represents the number of page nodes E i linked by page node E, N(E i ) represents the number of page nodes linked by page node E i , and n represents page node E i The number of linked page nodes E j , L(E i , E j ) represents the path length between two mutually linked page nodes E i and E j .

本实施例中,对每个骨架关键点9赋予相同的PR初始值1.0,用改进后的PageRank公式迭代计算直至数值稳定,得到该服装骨架的网络PR值。In this embodiment, the same PR initial value of 1.0 is assigned to each skeleton key point 9, and the improved PageRank formula is used to iteratively calculate until the value is stable, and the network PR value of the clothing skeleton is obtained.

步骤六:利用迭代循环计算服装骨架的网络PR值,建立服装图像的多层次细节骨架模型14。Step 6: Use an iterative cycle to calculate the network PR value of the clothing skeleton, and establish a multi-level detailed skeleton model of the clothing image14.

将服装的骨架末梢点8所连接的唯一服装骨架分支10定义为骨架末梢分支15,重复计算服装骨架关键点9的PR值并且简化服装骨架5,得到最后的服装图像的多层次细节骨架模型14:Define the only clothing skeleton branch 10 connected to the clothing skeleton terminal point 8 as the skeleton terminal branch 15, repeatedly calculate the PR value of the clothing skeleton key point 9 and simplify the clothing skeleton 5, and obtain the final multi-level detail skeleton model 14 of the clothing image :

6.1)按照步骤五计算服装的骨架关键点9的PR值,并且按照步骤四匹配各服装骨架分支10,计算出骨架末梢分支15匹配对中的对应骨架末梢点8的PR平均值;6.1) Calculate the PR value of the skeleton key point 9 of the clothing according to step five, and match each clothing skeleton branch 10 according to step four, and calculate the PR average value of the corresponding skeleton end point 8 in the matching pair of skeleton end branches 15;

6.2)选出骨架末梢分支15匹配对的平均PR值小于初始值1.0的骨架末梢点8匹配对,裁剪掉其所对应的骨架末梢分支15匹配对;对于未匹配的单个骨架末梢分支15,直接去掉骨架末梢点8的PR值小于1.0的骨架末梢分支15,生成一个新的简化服装骨架。6.2) Select 8 matching pairs of skeleton terminal points whose average PR value is less than the initial value of 1.0 for the 15 matching pairs of the skeleton terminal branches, and cut out the corresponding skeleton terminal branch 15 matching pairs; for the unmatched single skeleton terminal branch 15, directly Remove the skeleton terminal branch 15 whose PR value is less than 1.0 at the skeleton terminal point 8, and generate a new simplified clothing skeleton.

6.3)对新得到的简化服装骨架重复6.1)、6.2)步骤,直至最后服装骨架分支10个数剩余1或0,本实施例各步的PR值如表2所示,网络图模型如图8所示,表2中1次计算结果对应图8(a),2次计算结果对应图8(b),3次计算结果对应图8(c)。6.3) Repeat steps 6.1) and 6.2) for the newly obtained simplified clothing skeleton until the last clothing skeleton branch has 10 remaining 1 or 0. The PR values of each step in this embodiment are shown in Table 2, and the network diagram model is shown in Figure 8 As shown, in Table 2, the results of one calculation correspond to Figure 8(a), the results of two calculations correspond to Figure 8(b), and the results of three calculations correspond to Figure 8(c).

表2Table 2

从最初的服装骨架5开始,以上过程可以得到一系列依次简化的服装骨架,即得到最终服装图像的多层次细节骨架模型14。Starting from the initial clothing skeleton 5, the above process can obtain a series of sequentially simplified clothing skeletons, that is, obtain the multi-level detail skeleton model 14 of the final clothing image.

由此可见,本发明实现建立了一个多层次细节的模型,按照重要程度对服装骨架进行依次简化,效率高,确定性好,能用于服装识别和服装匹配等方面。It can be seen that the present invention establishes a model of multi-level details, and sequentially simplifies the clothing skeleton according to the degree of importance, which has high efficiency and good certainty, and can be used for clothing identification and clothing matching.

上述具体实施方式用来解释说明本发明,而不是对本发明进行限制,在本发明的精神和权利要求的保护范围内,对本发明作出的任何修改和改变,都落入本发明的保护范围。The above specific embodiments are used to explain the present invention, rather than to limit the present invention. Within the spirit of the present invention and the protection scope of the claims, any modification and change made to the present invention will fall into the protection scope of the present invention.

Claims (7)

1.一种建立服装图像多层次细节骨架模型的方法,其特征在于:1. A method of setting up a clothing image multi-level detail skeleton model, characterized in that: 步骤一、提取服装骨架:Step 1. Extract clothing skeleton: 通过OPENCV工具从服装图像提取服装轮廓并等距采样得到服装轮廓的多边形,将组成服装轮廓的多边形作为约束条件,对多边形内部进行Delaunay三角剖分,使得多边形内部的三角形保持Delaunay三角形的属性,得到具有两种不同类型边的三角形;两种不同类型边为存在于服装轮廓的内部的内部边和存在于服装轮廓上的边界边,再将剖分得到的三角形根据所具有内部边和边界边的数量划分为三类,提取每个三角形的内部骨架线段,将所有三角形的内部骨架线段端点首尾相连,得到服装骨架;The clothing contour is extracted from the clothing image by the OPENCV tool, and the polygon of the clothing contour is obtained by equidistant sampling. The polygons that make up the clothing contour are used as constraints, and the Delaunay triangulation is performed on the interior of the polygon, so that the triangles inside the polygon maintain the attributes of the Delaunay triangle. A triangle with two different types of edges; the two different types of edges are the internal edges existing in the interior of the clothing outline and the boundary edges existing on the clothing outline, and then the divided triangle is obtained according to the internal edge and the boundary edge The quantity is divided into three categories, the internal skeleton line segment of each triangle is extracted, and the end points of the internal skeleton line segments of all triangles are connected end to end to obtain the clothing skeleton; 步骤二、对所提取的服装骨架进行光滑:Step 2. Smooth the extracted clothing skeleton: 提取服装骨架中的服装骨架分支,分别对每个服装骨架分支进行Bezier曲线拟合,将服装骨架分支的两个端点作为Bezier曲线的始末点,服装骨架分支中间的骨架连接点作为Bezier曲线的控制点;Extract the clothing skeleton branches in the clothing skeleton, perform Bezier curve fitting on each clothing skeleton branch respectively, use the two end points of the clothing skeleton branch as the beginning and end points of the Bezier curve, and the skeleton connection point in the middle of the clothing skeleton branch as the control of the Bezier curve point; 步骤三、提取服装轮廓对称轴:Step 3. Extract the symmetry axis of the clothing outline: 用主成分分析PCA方法对服装轮廓的等距采样点进行降维得到两个特征向量,两个特征向量分别作为主方向和次方向;以服装轮廓的重心点为经过点,分别以主方向和次方向为直线方向,各自组成两个PCA轴,每个PCA轴将服装轮廓分割成两侧的轮廓线P和Q;Using principal component analysis (PCA) method to reduce the dimensionality of the equidistant sampling points of the clothing outline to obtain two eigenvectors, the two eigenvectors are respectively used as the main direction and the secondary direction; The secondary direction is a straight line direction, each of which forms two PCA axes, and each PCA axis divides the clothing contour into contour lines P and Q on both sides; 以其中任意一个PCA轴为镜像轴,将其中一侧的轮廓线P镜像映射到另一侧,得到镜像部分轮廓线P′,并计算镜像轴同侧两个轮廓线P′和Q的镜像Hausdorff距离,分别计算两个PCA轴分割得到两侧轮廓线的镜像Hausdorff距离,选取较小镜像Hausdorff距离所对应的PCA轴作为初始服装轮廓对称轴l0,初始服装轮廓对称轴l0进行迭代调整得到真实服装轮廓对称轴l;Taking any one of the PCA axes as the mirror axis, mirror the contour line P on one side to the other side to obtain the mirror part contour line P′, and calculate the mirror Hausdorff of the two contour lines P′ and Q on the same side of the mirror axis Distance, respectively calculate the two PCA axis divisions to obtain the mirrored Hausdorff distance of the contour lines on both sides, select the PCA axis corresponding to the smaller mirrored Hausdorff distance as the initial clothing outline symmetry axis l 0 , and iteratively adjust the initial clothing outline symmetry axis l 0 to obtain The symmetry axis l of the real clothing outline; 步骤四、匹配服装骨架分支:Step 4. Match the clothing skeleton branch: 利用真实服装轮廓对称轴l对服装骨架分支根据重心的位置进行左右归类,计算左、右侧服装骨架分支两两之间的镜像Hausdorff距离;依次选取镜像Hausdorff距离最小值所对应的两个左右服装骨架分支作为匹配对,已选取作为匹配对的两个左右服装骨架分支不作为下一次选取匹配对的对象,直至其中一侧的服装骨架分支已被选取完,得到多组匹配对;Use the symmetry axis l of the real clothing outline to classify the clothing skeleton branches left and right according to the position of the center of gravity, and calculate the mirror Hausdorff distance between the left and right clothing skeleton branches; select the two left and right corresponding to the minimum value of the mirror Hausdorff distance in turn The clothing skeleton branch is used as a matching pair, and the two left and right clothing skeleton branches that have been selected as a matching pair are not used as objects for the next selection of matching pairs until the clothing skeleton branch on one side has been selected, and multiple sets of matching pairs are obtained; 将镜像Hausdorff距离依次从小到大排列,再运用大津Otsu法,每个镜像Hausdorff距离依次作为分割值,用分割值将所有得到的镜像Hausdorff距离根据大小分成两类,并计算两类各自的类内方差以及类间方差,取两类的类内方差最小和类间方差最大对应的分割值作为最优阈值,去除大于最优阈值的镜像Hausdorff距离所对应的服装骨架分支匹配对;Arrange the mirrored Hausdorff distances from small to large, and then use the Otsu Otsu method. Each mirrored Hausdorff distance is used as a split value in turn. Use the split value to divide all the mirrored Hausdorff distances into two categories according to the size, and calculate the respective intra-class values of the two categories. Variance and inter-class variance, take the segmentation value corresponding to the smallest intra-class variance and the largest inter-class variance of the two classes as the optimal threshold, and remove the clothing skeleton branch matching pairs corresponding to the mirror Hausdorff distance greater than the optimal threshold; 步骤五、利用改进的网页排序方法计算骨架关键点的重要性值:Step five, using the improved web page sorting method to calculate the importance value of the key points of the skeleton: 将每个骨架关键点作为网页排序方法的页面节点赋予相同的重要性初始值,每个服装骨架分支表示了两个骨架关键点之间的一个链接,包含出链和入链;将服装骨架分支的长度作为网页排序方法中重要性值的分配因素,采用网页排序方法通过出链、入链的关系不断迭代计算更新,直至数值稳定得到最后每个页面节点的重要性值,具体采用以下公式:Each skeleton key point is given the same initial value of importance as the page node of the webpage sorting method, and each clothing skeleton branch represents a link between two skeleton key points, including the out-link and in-link; the clothing skeleton branch The length of is used as the distribution factor of the importance value in the web page sorting method. The web page sorting method is used to iteratively calculate and update through the relationship between outbound and inbound links until the value is stable and the importance value of each page node is finally obtained. Specifically, the following formula is used: PRPR (( EE. )) == ΣΣ ii == 00 mm -- 11 LL (( EE. ,, EE. ii )) ΣΣ jj == 00 nno -- 11 LL (( EE. ii ,, EE. jj )) PRPR (( EE. ii )) 其中,PR(E)表示页面节点E的重要性值,m表示页面节点E所链接的页面节点Ei的数量,N(Ei)表示页面节点Ei所链接的页面节点数量,n表示页面节点Ei所链接的页面节点Ej的数量,L(Ei,Ej)表示两个相互链接页面节点Ei和Ej之间的路径长度,i表示页面节点E所链接的页面节点Ei的序数,j表示页面节点Ei所链接的页面节点Ei的序数;Among them, PR(E) represents the importance value of page node E, m represents the number of page nodes E i linked by page node E, N(E i ) represents the number of page nodes linked by page node E i, and n represents the number of page nodes E i linked to. The number of page nodes E j linked by node E i , L(E i , E j ) represents the path length between two interlinked page nodes E i and E j , and i represents the page node E linked by page node E The ordinal number of i , j represents the ordinal number of the page node E i linked by the page node E i ; 步骤六、利用迭代循环计算服装骨架的重要性值,建立服装图像的多层次细节骨架模型:Step 6. Use the iterative cycle to calculate the importance value of the clothing skeleton, and establish a multi-level detailed skeleton model of the clothing image: 将服装的骨架末梢点所连接的唯一服装骨架分支定义为骨架末梢分支,重复计算服装骨架关键点的重要性值并且简化服装骨架,得到最后的服装图像的多层次细节骨架模型。The only clothing skeleton branch connected to the clothing skeleton terminal point is defined as the skeleton terminal branch, and the importance value of the key points of the clothing skeleton is repeatedly calculated and the clothing skeleton is simplified to obtain the multi-level detail skeleton model of the final clothing image. 2.根据权利要求1所述的一种建立服装图像多层次细节骨架模型的方法,其特征在于:所述步骤一中,剖分得到的三角形根据所具有的内部边和边界边的数量采用以下方式划分为三类:具有一个内部边和二个边界边的为I类三角形,具有二个内部边和一个边界边的为II类三角形,具有三个内部边的为III类三角形。2. a kind of method for setting up the multi-level detail skeleton model of clothing image according to claim 1, is characterized in that: in described step 1, the triangle that subdivides obtains adopts the following according to the quantity of internal side and border side that has. There are three types of triangles: Type I triangles with one interior side and two boundary sides, Type II triangles with two interior sides and one boundary side, and Type III triangles with three interior sides. 3.根据权利要求1所述的一种建立服装图像多层次细节骨架模型的方法,其特征在于:所述步骤一中,内部骨架线段包括I类三角形中内部边的中点和该内部边所对的三角形顶点的连线、II类三角形中两个内部边的中点之间连线、III类三角形中三个内部边的中点和三角形Voronoi点的各自连线。3. a kind of method of setting up clothing image multi-level details skeleton model according to claim 1, is characterized in that: in described step 1, interior skeleton line segment comprises the midpoint of interior edge and this interior edge in class I triangle The line connecting the vertices of a pair of triangles, the line between the midpoints of the two interior sides of a type II triangle, the respective lines connecting the midpoints of the three interior sides of a type III triangle and the Voronoi points of the triangle. 4.根据权利要求1所述的一种建立服装图像多层次细节骨架模型的方法,其特征在于:所述步骤二中,提取服装骨架中的服装骨架分支具体为:根据步骤一组成服装骨架的点有以下三类:连接三个三角形内部骨架线段的骨架交叉点、连接二个三角形内部骨架线段的骨架连接点和只连接一个三角形内部骨架线段的骨架末梢点;将骨架交叉点和骨架末梢点作为骨架关键点,如果两个骨架关键点之间的骨架线段路径上不存在骨架交叉点,则该骨架线段路径为服装骨架分支,该两个骨架关键点为服装骨架分支的两个端点。4. A method for setting up a multi-level detailed skeleton model of clothing images according to claim 1, characterized in that: in said step 2, extracting the clothing skeleton branches in the clothing skeleton is specifically: forming the clothing skeleton according to step 1 There are three types of points: the skeleton intersection point connecting three triangle interior skeleton line segments, the skeleton connection point connecting two triangle interior skeleton line segments, and the skeleton end point connecting only one triangle interior skeleton line segment; the skeleton intersection point and skeleton end point As a skeleton key point, if there is no skeleton intersection point on the skeleton line segment path between two skeleton key points, the skeleton line segment path is a clothing skeleton branch, and the two skeleton key points are the two endpoints of the clothing skeleton branch. 5.根据权利要求1所述的一种建立服装图像多层次细节骨架模型的方法,其特征在于:所述步骤三中,对初始服装轮廓对称轴l0采用以下方式进行迭代调整以接近真实服装轮廓对称轴:5. A method for setting up a multi-level detailed skeleton model of clothing images according to claim 1, characterized in that: in said step 3, the initial clothing outline symmetry axis 10 is iteratively adjusted in the following manner to approach real clothing Contour symmetry axis: 3.1)服装轮廓对称轴lk将服装轮廓分割为两侧的轮廓线Pk和Qk,k为服装轮廓对称轴调整次数,将其中一部分轮廓线Pk以服装轮廓对称轴lk为基准映射到另一侧,得到镜像部分轮廓P′k3.1) Clothing contour symmetry axis l k divides the clothing contour into contour lines P k and Q k on both sides, k is the number of adjustments to the clothing contour symmetry axis, and maps a part of the contour lines P k to the clothing contour symmetry axis l k to the other side, to obtain the mirrored partial profile P′ k ; 3.2)将镜像部分轮廓P′k和另一侧轮廓线Qk上的点作为两个点集合,用ICP(Iterative Closest Points)方法不断计算并更新得到镜像部分轮廓P″k,更新后的镜像部分轮廓P″k和其初始未映射的部分轮廓Pk进行点的一一对应,得到对应的各对匹配点;3.2) Take the points on the contour P′ k of the mirrored part and the contour line Q k on the other side as two point sets, use the ICP (Iterative Closest Points) method to continuously calculate and update to obtain the contour P″ k of the mirrored part, and the updated mirror image Partial profile P″ k and its initial unmapped partial profile P k carry out one-to-one correspondence of points, and obtain corresponding pairs of matching points; 3.3)利用最小二乘法,将每对匹配点连接线段的中点作为点集来拟合得到新的服装轮廓对称轴lk+13.3) Use the least squares method to fit the midpoint of each pair of matching point connecting line segments as a point set to obtain a new clothing outline symmetry axis l k+1 ; 3.4)重复以上3.1)、3.2)、3.3)步骤进行迭代调整,直至当前步骤得到的服装轮廓对称轴ln与上一步得到的服装轮廓对称轴ln-1的偏差角度小于2°,停止计算,将最后一次计算得到的服装轮廓对称轴ln作为真实服装轮廓对称轴l,n为得到真实服装轮廓对称轴所经过的调整次数。3.4) Repeat the above 3.1), 3.2), 3.3) steps to iteratively adjust until the deviation angle between the symmetry axis l n of the clothing outline obtained in the current step and the symmetry axis l n -1 of the clothing outline obtained in the previous step is less than 2°, and stop the calculation , the clothing outline symmetry axis l n obtained from the last calculation is taken as the real clothing outline symmetry axis l, and n is the number of adjustments to obtain the real clothing outline symmetry axis. 6.根据权利要求1所述的一种建立服装图像多层次细节骨架模型的方法,其特征在于:所述步骤四中,左、右侧服装骨架分支两两之间的镜像Hausdorff距离包括其中一侧任一服装骨架分支与另一侧各个服装骨架分支的镜像Hausdorff距离。6. A kind of method for setting up the multi-level detail skeleton model of clothing image according to claim 1, is characterized in that: in described step 4, the mirror image Hausdorff distance between left and right clothing skeleton branches two by two comprises one of them The mirrored Hausdorff distance between any clothing skeleton branch on one side and each clothing skeleton branch on the other side. 7.根据权利要求1所述的一种建立服装图像多层次细节骨架模型的方法,其特征在于:所述步骤六具体包括:7. A method for setting up a multi-level detailed skeleton model of clothing images according to claim 1, wherein said step six specifically includes: 6.1)由步骤五计算得到各个骨架关键点的重要性值与步骤四匹配得到的各服装骨架分支匹配对,计算出骨架末梢分支匹配对中两个骨架末梢点重要性值的平均值;6.1) The importance value of each skeleton key point calculated by step 5 is matched with the matching pair of each clothing skeleton branch obtained in step 4, and the average value of the importance values of the two skeleton terminal points in the matching pair of skeleton terminal branches is calculated; 6.2)选出重要性值的平均值小于重要性初始值的骨架末梢点匹配对并去除其所对应的骨架末梢分支匹配对;对于未匹配的单个骨架末梢分支,去除重要性值小于重要性初始值的骨架末梢分支,生成新服装骨架;6.2) Select the matching pair of skeleton terminal points whose average value is less than the initial value of importance, and remove the matching pair of corresponding skeleton terminal branches; The end branch of the skeleton of the value generates a new clothing skeleton; 6.3)依次迭代重复6.1)、6.2)步骤,直至最后剩余的服装骨架分支个数为1或0,而无法继续计算新的简化服装骨架的重要性值,则完成建立服装图像的多层次细节骨架模型。6.3) Iteratively repeat steps 6.1) and 6.2) until the number of branches of the remaining clothing skeleton is 1 or 0, and the importance value of the new simplified clothing skeleton cannot be calculated, then the establishment of the multi-level detail skeleton of the clothing image is completed Model.
CN201510237236.1A 2015-05-10 2015-05-10 A kind of method of setting up the multi-level details skeleton pattern of image of clothing Active CN104952065B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510237236.1A CN104952065B (en) 2015-05-10 2015-05-10 A kind of method of setting up the multi-level details skeleton pattern of image of clothing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510237236.1A CN104952065B (en) 2015-05-10 2015-05-10 A kind of method of setting up the multi-level details skeleton pattern of image of clothing

Publications (2)

Publication Number Publication Date
CN104952065A true CN104952065A (en) 2015-09-30
CN104952065B CN104952065B (en) 2016-05-18

Family

ID=54166693

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510237236.1A Active CN104952065B (en) 2015-05-10 2015-05-10 A kind of method of setting up the multi-level details skeleton pattern of image of clothing

Country Status (1)

Country Link
CN (1) CN104952065B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106384126A (en) * 2016-09-07 2017-02-08 东华大学 Garment Style Recognition Method Based on Contour Curvature Feature Points and Support Vector Machine
WO2017107324A1 (en) * 2015-12-24 2017-06-29 中兴通讯股份有限公司 Photographing mode processing method and device
CN110378959A (en) * 2019-07-15 2019-10-25 杭州恢弘科技有限公司 A kind of clothes auxiliary print is boiling hot to position setting method, localization method and auxiliary print ironing process
CN112419444A (en) * 2020-12-09 2021-02-26 北京维盛视通科技有限公司 Clothing sheet drawing method and device, electronic equipment and storage medium
CN113554758A (en) * 2021-07-21 2021-10-26 南京师范大学 Method and device for branch processing of parallel contour lines based on Voronoi diagram

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110169838A1 (en) * 2007-06-01 2011-07-14 Branets Larisa V Generation of Constrained Voronoi Grid In A Plane
CN102254343A (en) * 2011-07-01 2011-11-23 浙江理工大学 Convex hull and OBB (Oriented Bounding Box)-based three-dimensional grid model framework extracting method
CN103400372A (en) * 2013-07-10 2013-11-20 中国科学技术大学 Three-dimensional topological information extraction method based on Reeb graph description

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110169838A1 (en) * 2007-06-01 2011-07-14 Branets Larisa V Generation of Constrained Voronoi Grid In A Plane
CN102254343A (en) * 2011-07-01 2011-11-23 浙江理工大学 Convex hull and OBB (Oriented Bounding Box)-based three-dimensional grid model framework extracting method
CN103400372A (en) * 2013-07-10 2013-11-20 中国科学技术大学 Three-dimensional topological information extraction method based on Reeb graph description

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
宫法明: "一种改进的基于特征点求解的骨架提取算法", 《微型电脑应用》, vol. 26, no. 4, 30 April 2010 (2010-04-30) *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017107324A1 (en) * 2015-12-24 2017-06-29 中兴通讯股份有限公司 Photographing mode processing method and device
CN106384126A (en) * 2016-09-07 2017-02-08 东华大学 Garment Style Recognition Method Based on Contour Curvature Feature Points and Support Vector Machine
CN110378959A (en) * 2019-07-15 2019-10-25 杭州恢弘科技有限公司 A kind of clothes auxiliary print is boiling hot to position setting method, localization method and auxiliary print ironing process
CN112419444A (en) * 2020-12-09 2021-02-26 北京维盛视通科技有限公司 Clothing sheet drawing method and device, electronic equipment and storage medium
CN112419444B (en) * 2020-12-09 2024-03-29 北京维盛视通科技有限公司 Clothing sheet drawing method and device, electronic equipment and storage medium
CN113554758A (en) * 2021-07-21 2021-10-26 南京师范大学 Method and device for branch processing of parallel contour lines based on Voronoi diagram
CN113554758B (en) * 2021-07-21 2024-08-23 南京师范大学 Parallel contour line branch processing method and device based on Voronoi diagram

Also Published As

Publication number Publication date
CN104952065B (en) 2016-05-18

Similar Documents

Publication Publication Date Title
CN104952065B (en) A kind of method of setting up the multi-level details skeleton pattern of image of clothing
CN106570468B (en) A Method for Reconstructing Building Outlines from LiDAR Raw Point Clouds
CN107609587A (en) A kind of multi-class multi views data creation method that confrontation network is generated based on depth convolution
CN109615581B (en) Splicing recovery method of three-dimensional fragments fusing expanded Gaussian balls and color geometric features
CN108038821A (en) A kind of image Style Transfer method based on production confrontation network
CN112257762B (en) Road network matching method and system among different-source high-precision maps
CN106548479B (en) A kind of multi-level laser point cloud building boundary rule method
CN109558902A (en) A kind of fast target detection method
CN109816772A (en) A kind of processing method quickly generating virtual reality scenario by CAD house type file
CN106411572A (en) Community discovery method combining node information and network structure
CN104346481A (en) Community detection method based on dynamic synchronous model
CN104317886B (en) Searching and selecting method of adjacent conditional data points during grid node interpolation under fault constraints
CN105389596A (en) Method for enabling convolutional neural network to be suitable for recognition of pictures of various sizes
CN105045863B (en) A kind of method and system for Entities Matching
De Runz et al. Unsupervised visual data mining using self-organizing maps and a data-driven color mapping
CN109948242A (en) A network representation learning method based on feature hashing
CN109461209A (en) A kind of new structure grid generation method
CN112217834A (en) A method for extracting interactive features of encrypted Internet traffic based on graph structure
CN108319677A (en) The alignment schemes of the cyberrelationship figure of dynamic change
CN102289661A (en) Method for matching three-dimensional grid models based on spectrum matching
CN113514072B (en) Road matching method oriented to navigation data and large-scale drawing data
CN105069430B (en) A kind of method for designing of multi-pose Face detector based on MSNRD feature
CN111190829A (en) Automatic intersection test model data construction method and device
CN103942366B (en) The aerofoil profile and its generation method of the continual curvature represented based on four sections of rational Béziercurves
CN104778308B (en) The recognition methods of aircaft configuration section bar and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant