CN105761314B - A kind of Model Simplification Method kept based on notable color attribute feature - Google Patents

A kind of Model Simplification Method kept based on notable color attribute feature Download PDF

Info

Publication number
CN105761314B
CN105761314B CN201610150721.XA CN201610150721A CN105761314B CN 105761314 B CN105761314 B CN 105761314B CN 201610150721 A CN201610150721 A CN 201610150721A CN 105761314 B CN105761314 B CN 105761314B
Authority
CN
China
Prior art keywords
color
model
vertex
folded
edge
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
CN201610150721.XA
Other languages
Chinese (zh)
Other versions
CN105761314A (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.)
Beijing Institute of Technology BIT
Original Assignee
Beijing Institute of Technology BIT
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 Beijing Institute of Technology BIT filed Critical Beijing Institute of Technology BIT
Priority to CN201610150721.XA priority Critical patent/CN105761314B/en
Publication of CN105761314A publication Critical patent/CN105761314A/en
Application granted granted Critical
Publication of CN105761314B publication Critical patent/CN105761314B/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
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • G06T17/205Re-meshing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • G06T9/001Model-based coding, e.g. wire frame

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Image Generation (AREA)

Abstract

The present invention relates to a kind of Model Simplification Methods kept based on notable color attribute feature, belong to computer graphics, technical field of virtual reality.The technology specifically comprises the steps of:Original mesh model data is read in, Regularization is carried out to grid model, includes the Regularization of the geometric position on vertex and color attribute;Calculate the quadric error matrix on all vertex;The conspicuousness that attribute is executed to model calculates, and obtains the attribute significance on all vertex;The geometric attribute error and color attribute error for calculating side to be folded, then obtain the collapse cost on side to be folded;All sides are ranked up from small to large according to collapse cost;Therefrom the side of selection Least-cost carries out folding operation, and updates relevant information, including global characteristics importance, and the side being associated collapse cost;Edge contraction operation is repeated, simplifies requirement or heap until reaching as sky.The present invention can be not only realized well to the lattice simplified of property grid, while can effectively keep the notable attributive character of the color of model, and the color notable feature of model can be still kept when the rate of simplification reaches 90%.

Description

一种基于显著颜色属性特征保持的模型简化方法A Model Simplification Method Based on Feature Preservation of Salient Color Attributes

技术领域technical field

本发明涉及一种基于显著颜色属性特征保持的三维模型简化方法,属于计算机图形学、虚拟现实技术领域。The invention relates to a three-dimensional model simplification method based on salient color attribute feature preservation, and belongs to the technical fields of computer graphics and virtual reality.

背景技术Background technique

在计算机图形学和计算机视觉领域,物体通常可以用三角网格来表示。由于在数据获取技术和建模技术的日益进步,人们很容易获得物体在计算机中的大规模网格模型表示,3D模型也变得越来越复杂。尽管复杂模型能包含最贴近物体的描述,它们却需要更大的存储空间,也需要更多的时间完成绘制。然而,在许多应用中,通常并不需要高度复杂的包含过多细节的模型。一个精简的网格模型不仅能减小模型的物理存储空间,节省模型的绘制时间,而且能够大幅减小模型的网络传输时间。此外,精简模型还能加速图形学中一系列有关形状信息的计算,包括有限元分析,碰撞检测,可见性测试,形状识别等等。因此,适当的对复杂多细节模型进行一定程度的简化具有重要意义。In the fields of computer graphics and computer vision, objects can often be represented by triangular meshes. Due to the increasing progress in data acquisition technology and modeling technology, it is easy for people to obtain large-scale grid model representations of objects in computers, and 3D models are becoming more and more complex. Although complex models can contain the closest object descriptions, they require more storage space and more time to render. However, in many applications, highly complex models with excessive detail are usually not required. A simplified grid model can not only reduce the physical storage space of the model, save the drawing time of the model, but also greatly reduce the network transmission time of the model. In addition, the simplified model can also accelerate a series of calculations related to shape information in graphics, including finite element analysis, collision detection, visibility testing, shape recognition, etc. Therefore, it is of great significance to appropriately simplify the complex multi-detail model to a certain extent.

随着计算机技术的发展,网格简化技术已经在许多在计算机图形学和虚拟现实中广泛应用。这些模型通常不只包含复杂的几何细节信息,而且还有各种表面属性,例如颜色,纹理,和表面法向量等等。扫描等网格获取技术通常会产生一些带属性的复杂网格模型。这些模型的几何细节以及属性细节会对某些应用的性能造成负面影响。比如计算机游戏和分布式虚拟环境通常运行在绘制和网络传输能力有限的环境中,因此细节层次太高的模型是无法使用的。对带属性网格简化算法的研究也成为一项很有意义的工作。With the development of computer technology, mesh simplification technology has been widely used in many computer graphics and virtual reality. These models usually contain not only complex geometric details, but also various surface properties, such as color, texture, and surface normal vectors, etc. Mesh acquisition techniques such as scanning usually produce some complex mesh models with attributes. The geometric and attribute details of these models can negatively affect the performance of some applications. For example, computer games and distributed virtual environments often run in environments with limited rendering and network transmission capabilities, so models with too high a level of detail cannot be used. The research on mesh simplification algorithm with attributes has also become a very meaningful work.

所以按照网格类型来分可以分为两类,即三角网格简化算法和四边形网格简化算法。四边形网格是近年来新出现的网格表示方法,而最为广泛应用的还是三角网格模型,本发明主要针对三角形网格。Therefore, according to the grid type, it can be divided into two categories, namely the triangular mesh simplification algorithm and the quadrilateral mesh simplification algorithm. Quadrilateral grid is a new grid representation method in recent years, and the most widely used is the triangular grid model. The present invention is mainly aimed at the triangular grid.

三角网格简化算法也可以依照不同的方法分类,按照网格模型是否为流形可以分为流形网格简化算法和非流形网格简化算法。根据是否与视点相关可以分为视点相关简化和视点无关简化;根据在简化过程中是否与用户交互,可以分为交互式简化算法和自动简化算法。分类方式很多,其中的一些算法中有交叉混用。目前的研究成果可以分成三类,第一类是局部几何操作简化算法。这类算法在简化中通过不断使用局部简化操作,如顶点移除,边折叠,点对收缩以及三角形移除来实现对原始模型的逐步简化。这类算法的主要优点在于算法的高效执行并且很容易被实现。同时在实现的过程中可以得到原始网格模型的多分辨率模型。在这类算法中最具代表性的是Garland提出的二次误差度量网格简化算法,算法中用通过多次点对折叠,实现对模型的高效简化,同时使得简化误差在一个可控范围内。第二类是表面聚类算法,这类算法先将原始模型的表面依据一定的聚类规则分成几块,然后用一些简单的几何曲面如平面,球面,或者柱面等等来替代每一小块模型,然后对每一块模型重新三角化。在替代的过程中选择误差最小的简单几何面来替代原始模型的每一块。比较简单的一种是只用平面来替代,这样得到的模型也比较简单。第三类算法是直接采样法,也可以称之为网格重新划分法。这类算法中,首先依照一定的规则将一定数量的点分布在网格模型表面上,然后对这些布点的点云使用Delaunay三角化法则得到新的模型。其中比较有代表性的算法有基于各向同性和各向异性的中心韦恩图细分法。这类算法的主要优势在于能够使得网格的分布更加均匀和规则。Triangular mesh simplification algorithms can also be classified according to different methods. According to whether the mesh model is manifold, it can be divided into manifold mesh simplification algorithm and non-manifold mesh simplification algorithm. According to whether it is related to the viewpoint, it can be divided into viewpoint-related simplification and viewpoint-independent simplification; according to whether it interacts with users during the simplification process, it can be divided into interactive simplification algorithm and automatic simplification algorithm. There are many classification methods, some of which have cross-mixing in their algorithms. The current research results can be divided into three categories. The first category is local geometric operation simplification algorithm. This type of algorithm realizes the gradual simplification of the original model by continuously using local simplification operations such as vertex removal, edge folding, point pair shrinkage and triangle removal in the simplification process. The main advantage of this type of algorithm lies in the efficient execution of the algorithm and its ease of implementation. At the same time, the multi-resolution model of the original grid model can be obtained in the process of realization. The most representative of this type of algorithm is the quadratic error metric grid simplification algorithm proposed by Garland. In the algorithm, multiple point pair folding is used to achieve efficient simplification of the model while keeping the simplification error within a controllable range. . The second type is the surface clustering algorithm. This type of algorithm first divides the surface of the original model into several pieces according to certain clustering rules, and then replaces each small piece with some simple geometric surfaces such as planes, spheres, or cylinders. block models, and then re-triangulate each block model. In the replacement process, the simple geometric surface with the smallest error is selected to replace each piece of the original model. The simpler one is to use only a plane instead, and the model obtained in this way is also relatively simple. The third type of algorithm is the direct sampling method, which can also be called the mesh re-division method. In this type of algorithm, a certain number of points are first distributed on the surface of the mesh model according to certain rules, and then a new model is obtained by using the Delaunay triangulation rule on the point cloud of these points. One of the more representative algorithms is based on the isotropic and anisotropic central Venn diagram subdivision method. The main advantage of this type of algorithm is that it can make the grid distribution more uniform and regular.

与无属性的网格模型简化算法相比,当前对带属性网格简化算法的研究还是比较少的。对于有限的几种表面模型,如高度场模型,可以采取非常简单的简化算法。然而,更一般的模型需要更先进的简化技术,Hoppe简化网格时,度量误差时显式的包含属性。Certain等探讨了将颜色添加到一个基于小波的多分辨率模型的方法。Cohen提出的算法首先简化网格模型,而后将纹理重新参数化后对应到简化后的网格上。Garland等将表示顶点的三维向量扩展到高维向量,向量中不仅包含了顶点的位置信息,而且包含了网格的颜色或者纹理等其他属性信息,然后用扩展的二次误差度量算法对带属性网格进行简化。Fahn等提出了一种保持模型面片颜色的简化算法,该算法只能简化面片关联属性的模型,无法简化顶点关联属性的模型。针对有纹理属性的网格模型,刘秀文等综合考虑了几何重要性和纹理属性的重要性,并将其作为各半边的折叠代价来确定模型中的所有边的折叠顺序。从折叠后几何空间和纹理空间变化的不一致性引入了纹理代价,这样边折叠代价就是几何代价和纹理代价的加权和,在对强特征边的处理上,采用禁止折叠策略。在对边界边的处理上,从弱特征点折向强特征点,很好的控制了边界的简化质量。算法有效的削弱了简化过程中的纹理拉扯现象。保证了简化后模型的视觉效果。Compared with the mesh model simplification algorithm without attributes, the current research on mesh simplification algorithms with attributes is still relatively small. For a limited number of surface models, such as height field models, a very simple simplification algorithm can be adopted. However, more general models require more advanced simplification techniques. When Hoppe simplifies the mesh, attributes are explicitly included when measuring the error. Certain methods for adding color to a wavelet-based multiresolution model were explored by Certain et al. The algorithm proposed by Cohen first simplifies the mesh model, and then reparameterizes the texture to correspond to the simplified mesh. Garland et al. extended the three-dimensional vector representing the vertex to a high-dimensional vector. The vector not only contains the position information of the vertex, but also contains other attribute information such as the color or texture of the grid, and then uses the extended quadratic error measurement algorithm for the band attribute. The grid is simplified. Fahn et al. proposed a simplification algorithm to keep the color of the model patch. This algorithm can only simplify the model of the associated attribute of the patch, but cannot simplify the model of the associated attribute of the vertex. For mesh models with texture attributes, Liu Xiuwen et al. considered the importance of geometry and texture attributes comprehensively, and used them as the folding cost of each half edge to determine the folding order of all edges in the model. The texture cost is introduced from the inconsistency of geometric space and texture space after folding, so that the cost of edge folding is the weighted sum of geometric cost and texture cost. In the processing of strong feature edges, the policy of prohibiting folding is adopted. In the processing of the boundary edge, the simplification quality of the boundary is well controlled by turning from the weak feature point to the strong feature point. The algorithm effectively weakens the texture pulling phenomenon in the simplification process. The visual effect of the simplified model is guaranteed.

当前对带属性的网格模型的简化算法可以分为两种。第一种方法是同时处理模型的几何信息和属性信息,即将原有的只考虑网格的几何信息的算法进行扩展,使得两种信息的处理同步进行。如将三维网格扩展到高维网格,然后对此高维网格进行简化。其中如何协调几何信息和属性信息,如何定义高维网格是该类算法的难点。第二种方法是将带属性的网格简化算法分为两步。第一步不考虑网格的属性信息,仅对无属性的网格进行简化,然后将原始网格模型的属性信息映射到简化后的网格上。这种方法分步进行,其中如何将原始网格的属性信息重新映射到简化模型上是算法的难点。The current simplification algorithms for mesh models with attributes can be divided into two types. The first method is to process the geometric information and attribute information of the model at the same time, that is, to extend the original algorithm that only considers the geometric information of the grid, so that the processing of the two information is carried out simultaneously. Such as extending the three-dimensional grid to a high-dimensional grid, and then simplifying the high-dimensional grid. Among them, how to coordinate geometric information and attribute information, and how to define high-dimensional grids are the difficulties of this type of algorithm. The second approach divides the mesh simplification algorithm with attributes into two steps. The first step does not consider the attribute information of the grid, but only simplifies the grid without attributes, and then maps the attribute information of the original grid model to the simplified grid. This method is carried out step by step, and how to remap the attribute information of the original grid to the simplified model is the difficulty of the algorithm.

发明内容Contents of the invention

本发明的目的是为了解决带颜色属性的三维模型的网格简化问题,提出一种基于显著颜色属性特征保持的模型简化方法。The object of the present invention is to solve the mesh simplification problem of the three-dimensional model with color attributes, and propose a method for model simplification based on the preservation of salient color attribute features.

本发明的目的是通过下述技术方案实现的。The purpose of the present invention is achieved through the following technical solutions.

本发明的一种基于显著颜色属性特征保持的模型简化方法,其具体实现步骤为:A kind of model simplification method based on the preservation of salient color attribute feature of the present invention, its specific implementation steps are:

步骤一、对原始网格三维模型进行规格化处理。所述原始网格三维模型包括顶点的颜色属性。具体为:Step 1: Normalize the original mesh 3D model. The original mesh 3D model includes color attributes of vertices. Specifically:

步骤1.1:对原始网格三维模型顶点的颜色属性进行处理。Step 1.1: Process the color attributes of vertices of the original mesh 3D model.

将原始网格三维模型顶点的颜色属性表示为红绿蓝(RGB)颜色分量组成的三维向量,获得顶点的颜色属性坐标。然后,采取加权颜色分量法,通过公式(1)计算原始网格三维模型的任意两个顶点的颜色差异。用符号ci和cj表示原始网格三维模型的任意两个顶点,用符号ci(ri,gi,bi)和cj(rj,gj,bj)分别表示原始网格三维模型的任意两个顶点ci和cj的颜色三维向量。Express the color attribute of the vertex of the original mesh 3D model as a 3D vector composed of red, green and blue (RGB) color components, and obtain the color attribute coordinates of the vertex. Then, the weighted color component method is adopted to calculate the color difference between any two vertices of the original mesh 3D model through formula (1). Use the symbols c i and c j to represent any two vertices of the original mesh 3D model, and use the symbols c i (r i , g i , b i ) and c j (r j , g j , b j ) to represent the original mesh The color 3D vectors of any two vertices c i and c j of the lattice 3D model.

其中,D(ci,cj)表示原始网格三维模型的任意两个顶点ci和cj的颜色差异;wr、wg、wb分别表示对应红色、绿色和蓝色的加权系数,wr>wb,wg>wbAmong them, D( ci ,c j ) represents the color difference between any two vertices c i and c j of the original mesh 3D model; w r , w g , w b represent the weighting coefficients corresponding to red, green and blue respectively , w r > w b , w g > w b .

优选的,wr=3、wg=4、wb=2。Preferably, w r =3, w g =4, and w b =2.

原始网格三维模型的任意两个顶点ci和cj的颜色差异D(ci,cj)可采用顶点ci和cj之间的欧氏距离,但其前提条件是RGB空间是一个均匀颜色空间:即每个颜色的等色差颜色应在RGB空间中成一个球面;而且球面上不同位置的颜色和球心处的颜色应该表示出相同的差异。RGB空间显然不满足这一条件,在RGB空间中用欧氏距离来度量色差并不符合人的视感。研究表明,人眼对红、绿、蓝三原色的敏感度不同,对红色和绿色的更敏感一些,所以在计算色差时需要对三原色有区别对待,使计算更准确。为了补偿RGB空间的非均匀性,对色差的计算采取加权颜色分量法:即加入wr、wg、wb三个加权系数。The color difference D( ci ,c j ) between any two vertices c i and c j of the original mesh 3D model can be the Euclidean distance between vertices c i and c j , but the prerequisite is that the RGB space is a Uniform color space: that is, the equal color difference of each color should form a sphere in RGB space; and the colors at different positions on the sphere and the color at the center of the sphere should show the same difference. The RGB space obviously does not meet this condition, and using the Euclidean distance to measure the color difference in the RGB space does not conform to the human visual sense. Studies have shown that the human eye has different sensitivities to the three primary colors of red, green, and blue, and is more sensitive to red and green. Therefore, when calculating the color difference, it is necessary to treat the three primary colors differently to make the calculation more accurate. In order to compensate the non-uniformity of RGB space, the weighted color component method is adopted for the calculation of color difference: that is, three weighting coefficients w r , w g , and w b are added.

步骤1.2:将原始网格三维模型各顶点的几何坐标和颜色属性坐标规格到相同的范围内。Step 1.2: Standardize the geometric coordinates and color attribute coordinates of each vertex of the original mesh 3D model to the same range.

在步骤1.1操作基础上,原始网格三维模型各顶点的几何坐标和颜色属性坐标的坐标范围可能不同,为了使得在计算折叠代价时空间位置和颜色属性信息起到平等的作用,将原始网格三维模型各顶点的几何坐标和颜色属性坐标规格到相同的范围内,即:原始网格三维模型的顶点颜色坐标的三个分量都在[0,m]范围内,则原始网格三维模型顶点的几何坐标的三个维度需要规格到[0,m]范围内,m∈[1,10]。Based on the operation in step 1.1, the coordinate ranges of the geometric coordinates and color attribute coordinates of each vertex of the original mesh 3D model may be different. In order to make the spatial position and color attribute information play an equal role in the calculation of the folding cost, the original mesh The geometric coordinates and color attribute coordinates of each vertex of the 3D model are within the same range, that is, the three components of the vertex color coordinates of the original mesh 3D model are all within the range of [0, m], then the original mesh 3D model vertices The three dimensions of the geometric coordinates need to be standardized to the range [0,m], m∈[1,10].

设定原始网格三维模型的包围盒的三个维度的坐标范围分别为[xmin,xmax],[ymin,ymax],[zmin,zmax],则通过公式(2)计算原始网格三维模型中任意一个顶点规格化后的坐标值。Set the coordinate ranges of the three dimensions of the bounding box of the original grid 3D model to [x min , x max ], [y min , y max ], [z min , z max ] respectively, then calculate by formula (2) The normalized coordinate value of any vertex in the original mesh 3D model.

其中,(xa,ya,za)表示原始网格三维模型中任意一个顶点的几何坐标;(x′b,y′b,z′b)表示原始网格三维模型中任意一个顶点规格化后的几何坐标;d=max{xmax-xmin,ymax-ymin,zmax-zmin}。Among them, (x a , y a , z a ) represent the geometric coordinates of any vertex in the original mesh 3D model; (x′ b , y′ b , z′ b ) represent the specification of any vertex in the original mesh 3D model The geometric coordinates after transformation; d=max{x max -x min , y max -y min , z max -z min }.

经过步骤一的操作,得到规格化后的网格三维模型。After the operation in step 1, a normalized grid 3D model is obtained.

步骤二、得到规格化后的网格三维模型的所有顶点的颜色属性显著度。Step 2: Obtain the saliency of color attributes of all vertices of the normalized three-dimensional grid model.

在步骤一操作的基础上,计算规格化后的网格三维模型的所有顶点的颜色属性显著度,具体为:On the basis of the operation in step 1, the color attribute salience of all vertices of the normalized mesh 3D model is calculated, specifically:

步骤2.1:计算规格化后的网格三维模型中的每个顶点的灰度值。Step 2.1: Calculate the gray value of each vertex in the normalized grid 3D model.

用符号(ra,ga,ba)表示计算规格化后的网格三维模型中任意一个顶点的颜色属性坐标。为了便于研究,将顶点的颜色向量降为一维向量。使用灰度能够将彩色模型转换为高质量的黑白模型,RGB空间中不同的颜色对应于不同的灰度值,而不同的灰度值也对应于不同的RGB向量。用顶点的灰度值来表示原来的颜色信息,不仅可以降低原来模型的维度,同时也能不失真的表示原来的模型。通过公式(3)计算规格化后的网格三维模型中每个顶点的灰度值,用gray(a)表示。Use symbols (r a , g a , b a ) to represent the color attribute coordinates of any vertex in the normalized mesh 3D model. For the convenience of research, the color vector of the vertex is reduced to a one-dimensional vector. Using grayscale can convert the color model into a high-quality black-and-white model. Different colors in the RGB space correspond to different grayscale values, and different grayscale values also correspond to different RGB vectors. Using the gray value of the vertex to represent the original color information can not only reduce the dimension of the original model, but also represent the original model without distortion. The gray value of each vertex in the normalized grid 3D model is calculated by formula (3), represented by gray(a).

gray(a)=0.299ra+0.587ga+0.114ba (3)gray(a)=0.299r a +0.587g a +0.114b a (3)

通过该转换可以将一个彩色模型,转化为高质量的灰度模型。Through this conversion, a color model can be converted into a high-quality grayscale model.

步骤2.2:计算规格化后的网格三维模型中的每个顶点的邻域灰度值。Step 2.2: Calculate the neighborhood gray value of each vertex in the normalized grid 3D model.

通过公式(4)计算顶点a的半径为σ的邻域,σ为一个人为设定值。顶点a的邻域使用欧氏距离来定义。Calculate the neighborhood of vertex a with radius σ by formula (4), where σ is an artificially set value. The neighborhood of vertex a is defined using Euclidean distance.

N(a,σ)={x|||x-a||<σ,x∈U} (4)N(a,σ)={x|||x-a||<σ,x∈U} (4)

其中,N(a,σ)表示顶点a的半径为σ的邻域;U表示规格化后的网格三维模型。Among them, N(a,σ) represents the neighborhood of vertex a whose radius is σ; U represents the normalized three-dimensional mesh model.

然后,通过公式(5)计算顶点a的邻域灰度值;顶点a的邻域灰度值采用顶点灰度的高斯加权平均灰度值。Then, the neighborhood gray value of vertex a is calculated by formula (5); the neighborhood gray value of vertex a adopts the Gaussian weighted average gray value of the vertex gray.

其中,G(gray(a),σ)表示顶点a的邻域灰度值;exp(·)表示自然底数e的幂次方。Among them, G(gray(a),σ) represents the neighborhood gray value of vertex a; exp( ) represents the power of the natural base e.

步骤2.3:计算规格化后的网格三维模型中的每个顶点的颜色属性显著度。通过不同半径的灰度的差值来计算顶点的颜色属性显著度,如公式(6)所示。Step 2.3: Calculate the saliency of the color attribute of each vertex in the normalized mesh 3D model. The saliency of the color attribute of the vertex is calculated by the difference of the gray values of different radii, as shown in formula (6).

S(a)=|G(gray(a),2σ)-G(gray(a),σ)| (6)S(a)=|G(gray(a),2σ)-G(gray(a),σ)| (6)

其中,S(a)表示规格化后的网格三维模型中顶点a的颜色属性显著度。Among them, S(a) represents the salience of the color attribute of vertex a in the normalized three-dimensional mesh model.

为了在不同规格邻域下计算网格属性的显著度,用公式(7)计算某一规格下顶点a的颜色属性显著度。In order to calculate the salience degree of the grid attribute in the neighborhood of different specifications, formula (7) is used to calculate the salience degree of the color attribute of vertex a under a certain specification.

St(a)=|G(gray(a),2σt)-G(gray(a),σt)| (7)S t (a)=|G(gray(a),2σ t )-G(gray(a),σ t )| (7)

其中,St(a)表示顶点a在规格t下的颜色属性显著度;σt表示顶点a在规格t下的邻域半径;t∈{1,2,3};σt∈{ε,2ε,3ε},ε的取值为规格化后的网格三维模型包围盒对角线长度的0.3%~0.8%。Among them, S t (a) represents the color attribute salience of vertex a under specification t; σ t represents the neighborhood radius of vertex a under specification t; t∈{1,2,3};σ t ∈{ε, The values of 2ε, 3ε} and ε are 0.3% to 0.8% of the diagonal length of the bounding box of the normalized grid 3D model.

为了综合不同规格的结果,采用非线性抑制算子综合不同规格下的顶点a的颜色属性显著度St(a),将公式(6)进一步改写为公式(8)。In order to synthesize the results of different specifications, the nonlinear suppression operator is used to synthesize the color attribute saliency S t (a) of vertex a under different specifications, and formula (6) is further rewritten as formula (8).

其中,Mt表示顶点a在规格t下计算得到的St(a)中的最大值;表示顶点a在规格t下计算得到的St(a)中,除Mt以外的平均值。Among them, M t represents the maximum value of S t (a) calculated by vertex a under specification t; Indicates the average value of vertex a except M t in S t (a) calculated under specification t.

通过公式(8),即可得到规格化后的网格三维模型的所有顶点的颜色属性显著度。By formula (8), the color attribute salience of all vertices of the normalized mesh 3D model can be obtained.

步骤三、依次计算每一条待折叠边的几何属性误差和颜色属性误差,以及待折叠边的折叠代价;待折叠边用符号(vk,vk′)表示。Step 3: Calculate the geometric attribute error and color attribute error of each edge to be folded sequentially, and the folding cost of the edge to be folded; the edge to be folded is represented by the symbol (v k , v k′ ).

步骤3.1:计算待折叠边的颜色属性误差(用符号Ec表示)。Step 3.1: Calculate the error of the color attribute of the edge to be folded (indicated by the symbol E c ).

步骤3.1.1:通过公式(9)计算得到规格化后的网格三维模型中各顶点的颜色二次误差测度。Step 3.1.1: Calculate the quadratic color error measure of each vertex in the normalized grid 3D model through formula (9).

Qvc(a)=ΣQfc(a) (9)Q vc (a) = ΣQ fc (a) (9)

其中,Qvc(a)表示规格化后的网格三维模型中任意一个顶点a的颜色二次误差测度;Qfc(a)表示规格化后的网格三维模型中顶点a的某一相邻三角面的颜色二次误差测度;ΣQfc(a)表示规格化后的网格三维模型中顶点a的全部相邻三角面的颜色二次误差测度之和。Among them, Q vc (a) represents the color quadratic error measure of any vertex a in the normalized mesh 3D model; Q fc (a) represents a certain neighbor of vertex a in the normalized mesh 3D model The color quadratic error measure of the triangular face; ΣQ fc (a) represents the sum of the color quadratic error measure of all adjacent triangular faces of vertex a in the normalized mesh 3D model.

在计算规格化后的网格三维模型中顶点a的某一相邻三角面的颜色二次误差测度Qfc(a)时,由于存在同一个三角面的三个顶点的颜色一样或者其中两个顶点的颜色一样的情况,此时该三角面的三个颜色矢量不能构成平面。因此对于三个顶点的颜色一样或者其中两个顶点的颜色一样的三角面,其颜色二次误差测度Qfc(a)的计算方法为:When calculating the color quadratic error measure Q fc (a) of an adjacent triangular face of vertex a in the normalized mesh 3D model, because there are three vertices of the same triangular face with the same color or two of them When the colors of the vertices are the same, the three color vectors of the triangular face cannot form a plane. Therefore, for a triangular surface whose three vertices have the same color or two of the vertices have the same color, the calculation method of the color quadratic error measure Q fc (a) is:

当一个三角面片的三个顶点的颜色一样时,其相当于在颜色空间中的一个点,用符号v1表示该点的颜色,v1=(r1,g1,b1),(r1,g1,b1)分别表示RGB空间中三个分量的值;则对于三个顶点的颜色一样的三角面的颜色二次误差测度Qfc(a)通过公式(10)计算。When the colors of the three vertices of a triangular surface are the same, it is equivalent to a point in the color space, and the color of the point is represented by the symbol v 1, v 1 = (r 1 ,g 1 ,b 1 ), ( r 1 , g 1 , b 1 ) respectively represent the values of the three components in the RGB space; then the color quadratic error measure Q fc (a) of the triangular surface with the same color of the three vertices is calculated by the formula (10).

其中,I是单位矩阵。where I is the identity matrix.

当一个三角面片中任意两个顶点的颜色一样,此时三角形所在的颜色平面退化成一条直线。用符号vc1、vc2和vc3分别表示三个顶点的颜色,vc1=(r1,g1,b1),vc2=vc3=(r2,g2,b2),(r1,g1,b1)和(r2,g2,b2)均表示RGB空间中三个分量的值;则对于两个顶点的颜色一样的三角面的颜色二次误差测度Qfc(a)通过公式(11)计算。When the colors of any two vertices in a triangular patch are the same, the color plane where the triangle is located degenerates into a straight line. Use symbols v c1 , v c2 and v c3 to represent the colors of the three vertices respectively, v c1 = (r 1 , g 1 , b 1 ), v c2 = v c3 = (r 2 , g 2 , b 2 ), ( r 1 , g 1 , b 1 ) and (r 2 , g 2 , b 2 ) both represent the values of the three components in the RGB space; then for the color quadratic error measure Q fc of a triangular surface with two vertices of the same color (a) is calculated by formula (11).

其中, in,

通过此步骤的操作,得到待折叠边(vk,vk′)上的顶点vk和vk′的颜色二次误差测度。Through the operation of this step, the color quadratic error measure of vertices v k and v k ' on the edge to be folded (v k , v k' ) is obtained.

步骤3.1.2:通过公式(12)计算待折叠边(用符号(vk,vk′)表示)上的点vk和vk′折叠后得到的顶点(用符号表示)的颜色二次误差测度(用符号Qc表示)。Step 3.1.2: Use formula (12) to calculate the vertices obtained after folding the points v k and v k′ on the edge to be folded (indicated by symbols (v k , v k′ ) (indicated by symbols Indicates the color quadratic error measure (indicated by the symbol Q c ).

Qc=Qvc(k)+Qvc(k′) (12) Qc = Qvc (k) + Qvc (k') (12)

其中,Qvc(k)和Qvc(k′)可通过公式(9)计算得到。Among them, Q vc (k) and Q vc (k′) can be calculated by formula (9).

步骤3.1.3:计算待折叠边的颜色属性误差EcStep 3.1.3: Calculate the color attribute error E c of the edge to be folded.

待折叠边(vk,vk′)上的点vk和vk′折叠后得到的顶点有几何属性(用符号表示)和颜色特征属性(用符号表示),(x,y,z)是顶点的三维几何坐标,(r,g,b)是顶点的颜色三维向量。通过公式(13)计算得到待折叠边的颜色属性误差EcThe vertices obtained after the points v k and v k' on the edge to be folded (v k , v k′ ) are folded have geometric properties (with the symbol ) and color feature attributes (with the symbol express), (x,y,z) is the vertex The three-dimensional geometric coordinates of , (r, g, b) is the vertex color 3d vector. The color attribute error E c of the edge to be folded is calculated by formula (13).

步骤3.2:计算待折叠边的几何属性误差(用符号Eg表示)。Step 3.2: Calculate the geometric property error of the edge to be folded (expressed by the symbol E g ).

步骤3.2.1:通过公式(14)计算得到规格化后的网格三维模型中各顶点的几何二次误差测度。Step 3.2.1: Calculate the geometric quadratic error measure of each vertex in the normalized grid 3D model through formula (14).

Qvg(a)=∑Qfg(a) (14)Q vg (a)=∑Q fg (a) (14)

其中,Qvg(a)表示规格化后的网格三维模型中任意一个顶点a的几何二次误差测度;Qfg(a)表示规格化后的网格三维模型中顶点a的某一相邻三角面的几何二次误差测度;∑Qfg(a)表示规格化后的网格三维模型中顶点a的全部相邻三角面的几何二次误差测度之和。Among them, Q vg (a) represents the geometric quadratic error measure of any vertex a in the normalized three-dimensional mesh model; Q fg (a) represents an adjacent Geometric quadratic error measure of triangular faces; ∑Q fg (a) represents the sum of geometric quadratic error measures of all adjacent triangular faces of vertex a in the normalized mesh 3D model.

步骤3.2.2:通过公式(15)计算待折叠边(vk,vk′)的点vk和vk′折叠后得到的顶点的几何二次误差测度(用符号Qg表示)。Step 3.2.2: Use formula (15) to calculate the point v k of the edge to be folded (v k , v k′ ) and the vertex obtained after v k′ is folded The geometric quadratic error measure of (denoted by the symbol Q g ).

将规格化后的网格三维模型中的边分为三类:内部边、简单边和边界边;将规格化后的网格三维模型中的点分为两类:内部点和边界点。内部边的两个端点都是内部点;简单边的一个端点是内部点,另一个端点是边界点;边界边的两个端点都是边界点。边界边只有一个邻接面而其他边均有两个邻接面。The edges in the normalized mesh 3D model are divided into three types: internal edges, simple edges and boundary edges; the points in the normalized mesh 3D model are divided into two types: internal points and boundary points. Both endpoints of an interior edge are interior points; one endpoint of a simple edge is an interior point and the other endpoint is a border point; both endpoints of a border edge are border points. Boundary edges have only one contiguous face and all other edges have two contiguous faces.

如果待折叠边(vk,vk′)是简单边或内部边,则通过公式(15)计算待折叠边(vk,vk′)的点vk和vk′折叠后得到的顶点的几何二次误差测度QgIf the edge to be folded (v k , v k′ ) is a simple edge or an internal edge, the point v k of the edge to be folded (v k , v k′ ) and the vertex obtained after v k′ are calculated by formula (15) The geometric quadratic error measure Q g .

Qg=Qvg(k)+Qvg(k′) (15) Qg = Qvg (k) + Qvg (k') (15)

其中,Qvg(k)和Qvg(k′)可通过公式(14)计算得到。Among them, Q vg (k) and Q vg (k′) can be calculated by formula (14).

如果待折叠边(vk,vk′)是边界边,则待折叠边(vk,vk′)的点vk和vk′折叠后得到的顶点的几何二次误差测度Qg的计算方法为:If the edge to be folded (v k , v k′ ) is a boundary edge, then the vertex v k and v k′ of the edge to be folded (v k , v k′ ) are folded The calculation method of the geometric quadratic error measure Q g is:

对待折叠边(vk,vk′)做一个其关联平面的垂直平面,将该垂直平面的二次型矩阵(用符号Qp表示)合并到待折叠边(vk,vk′)上边界点的二次型矩阵中,得到待折叠边(vk,vk′)的几何二次误差测度Qg,如公式(16)所示。Make a vertical plane of its associated plane for the edge to be folded (v k , v k′ ), and merge the quadratic matrix of the vertical plane (indicated by the symbol Q p ) to the edge to be folded (v k , v k′ ) From the quadratic matrix of the boundary points, the geometric quadratic error measure Q g of the edge to be folded (v k , v k′ ) is obtained, as shown in formula (16).

其中,Qt为待折叠边(vk,vk′)上任意一个边界点的二次型矩阵;t表示待折叠边(vk,vk′)上边界点的顺序编号,t为正整数;表示待折叠边(vk,vk′)上所有边界点的二次型矩阵之和;w为一常数,其作用是保证边界边被适度简化,同时使得简单边折叠时目标点的位置靠近边界边;w∈[100,1000]。Among them, Q t is the quadratic matrix of any border point on the side to be folded (v k , v k′ ); t represents the sequence number of the border point on the side to be folded (v k , v k′ ), and t is integer; Indicates the sum of quadratic matrices of all boundary points on the edge to be folded (v k , v k′ ); w is a constant whose function is to ensure that the boundary edge is moderately simplified, and at the same time make the position of the target point close to Boundary edges; w ∈ [100,1000].

步骤3.2.3:通过公式(17)计算待折叠边的几何属性误差EgStep 3.2.3: Calculate the geometric attribute error E g of the edge to be folded by formula (17).

步骤3.3:通过公式(18)计算待折叠边的折叠代价(用符号cost表示)。Step 3.3: Calculate the folding cost of the edge to be folded (indicated by the symbol cost) through formula (18).

其中,S(vk)和S(vk′)是通过公式(8)计算得到。Among them, S(v k ) and S(v k′ ) are calculated by formula (8).

步骤四、依折叠代价从小到大对所有的待折叠边进行排序。Step 4: Sort all the edges to be folded according to the folding cost from small to large.

步骤五、从步骤五的结果中选择代价最小的待折叠边进行折叠操作,得到新模型。Step 5. From the results of step 5, select the edge to be folded with the least cost and perform the folding operation to obtain a new model.

步骤六、重复步骤二至步骤六的操作,直到达到简化要求为止。Step 6. Repeat steps 2 to 6 until the simplification requirements are met.

有益效果Beneficial effect

与已有技术相比较,本发明方法主要是研究对带颜色的模型的简化方法,创新性的将RGB空间做了一个变换,使得算法在简化中同时考虑到模型的颜色属性信息,从而使得模型在简化过程中不仅能保持全局几何特征,同时能够保持网格的颜色属性信息。结果表明本发明方法的算法不但能很好的实现对带属性网格的模型简化,同时能有效保持模型的显著属性特征,在简化率达到90%时依然可以保持模型的颜色显著特征。Compared with the existing technology, the method of the present invention is mainly to study the simplification method of the model with color, and innovatively transforms the RGB space, so that the algorithm takes into account the color attribute information of the model at the same time during the simplification, so that the model In the process of simplification, not only the global geometric features can be maintained, but also the color attribute information of the grid can be maintained. The results show that the algorithm of the method of the present invention can not only realize the simplification of the model with the attribute grid, but also effectively maintain the salient attribute features of the model, and can still maintain the salient features of the color of the model when the simplification rate reaches 90%.

附图说明Description of drawings

图1为本发明具体实施方式中的原始网格三维模型的主视图;Fig. 1 is the front view of the original grid three-dimensional model in the specific embodiment of the present invention;

图2为本发明具体实施方式中的原始网格三维模型的三维立体示意图;Fig. 2 is a three-dimensional schematic diagram of an original grid three-dimensional model in a specific embodiment of the present invention;

图3为本发明具体实施方式中的原始网格三维模型转化为灰度模型的示意图;Fig. 3 is the schematic diagram that the original grid three-dimensional model in the specific embodiment of the present invention is transformed into gray scale model;

图4为为本发明具体实施方式中的对应于σt为ε,2ε,3ε分别得到的模型示意图以及综合不同规格的结果后得到的模型示意图;其中,图4(a)是σt为ε时得到的模型示意图;图4(b)是σt为2ε时得到的模型示意图;图4(c)是σt为3ε时得到的模型示意图;图4(d)是综合不同规格的结果,得到的模型示意图所示;Fig. 4 is the schematic diagram of the model corresponding to ε, 2ε, and 3ε obtained respectively for σ t in the specific embodiment of the present invention and the model schematic diagram obtained after integrating the results of different specifications; wherein, Fig. 4 (a) is that σ t is ε Figure 4(b) is a schematic diagram of the model obtained when σt is 2ε; Figure 4(c) is a schematic diagram of the model obtained when σt is 3ε; Figure 4(d) is the result of combining different specifications, The schematic diagram of the obtained model is shown in;

图5为本发明汽车模型的简化效果对比示意图;其中,图5(a)为原始网格三维模型;图5(b)为是QEM方法的简化结果示意图;图5(c)是采用本发明方法的简化结果示意图。Fig. 5 is the schematic diagram of the simplified effect comparison of the automobile model of the present invention; Wherein, Fig. 5 (a) is the three-dimensional model of the original grid; Fig. 5 (b) is the simplified result schematic diagram of the QEM method; Fig. 5 (c) adopts the present invention Simplified results schematic of the method.

具体实施方式Detailed ways

根据上述技术方案,下面结合附图和实施实例对本发明进行详细说明。According to the above technical solutions, the present invention will be described in detail below in conjunction with the accompanying drawings and implementation examples.

本实施例中,使用本发明提出的基于显著颜色属性特征保持的模型简化方法对如图1和图2所示的汽车模型进行简化,该原始模型共计10474个面片,具体操作过程为:In this embodiment, the car model shown in Figure 1 and Figure 2 is simplified using the model simplification method proposed by the present invention based on the preservation of significant color attribute features. The original model has a total of 10474 patches, and the specific operation process is as follows:

步骤一、对原始网格三维模型进行规格化处理。所述原始网格三维模型包括顶点的颜色属性。具体为:Step 1: Normalize the original mesh 3D model. The original mesh 3D model includes color attributes of vertices. Specifically:

步骤1.1:对原始网格三维模型顶点的颜色属性进行处理。Step 1.1: Process the color attributes of vertices of the original mesh 3D model.

将原始网格三维模型顶点的颜色属性表示为红绿蓝(RGB)颜色分量组成的三维向量,获得顶点的颜色属性坐标。然后,采取加权颜色分量法,通过公式(1)计算原始网格三维模型的任意两个顶点的颜色差异。用符号ci和cj表示原始网格三维模型的任意两个顶点,用符号ci(ri,gi,bi)和cj(rj,gj,bj)分别表示原始网格三维模型的任意两个顶点ci和cj的颜色三维向量。Express the color attribute of the vertex of the original mesh 3D model as a 3D vector composed of red, green and blue (RGB) color components, and obtain the color attribute coordinates of the vertex. Then, the weighted color component method is adopted to calculate the color difference between any two vertices of the original mesh 3D model through formula (1). Use the symbols c i and c j to represent any two vertices of the original mesh 3D model, and use the symbols c i (r i , g i , b i ) and c j (r j , g j , b j ) to represent the original mesh The color 3D vectors of any two vertices c i and c j of the lattice 3D model.

其中,D(ci,cj)表示原始网格三维模型的任意两个顶点ci和cj的颜色差异;wr=3、wg=4、wb=2。Wherein, D( ci ,c j ) represents the color difference between any two vertices c i and c j of the original mesh 3D model; w r =3, w g =4, w b =2.

步骤1.2:将原始网格三维模型各顶点的几何坐标和颜色属性坐标规格到相同的范围内。Step 1.2: Standardize the geometric coordinates and color attribute coordinates of each vertex of the original mesh 3D model to the same range.

在步骤1.1操作基础上,原始网格三维模型各顶点的几何坐标和颜色属性坐标的坐标范围可能不同,为了使得在计算折叠代价时空间位置和颜色属性信息起到平等的作用,将原始网格三维模型各顶点的几何坐标和颜色属性坐标规格到相同的范围内,即:原始网格三维模型的顶点颜色坐标的三个分量都在[0,m]范围内,则原始网格三维模型顶点的几何坐标的三个维度需要规格到[0,m]范围内,m=2。Based on the operation in step 1.1, the coordinate ranges of the geometric coordinates and color attribute coordinates of each vertex of the original mesh 3D model may be different. In order to make the spatial position and color attribute information play an equal role in the calculation of the folding cost, the original mesh The geometric coordinates and color attribute coordinates of each vertex of the 3D model are within the same range, that is, the three components of the vertex color coordinates of the original mesh 3D model are all within the range of [0, m], then the original mesh 3D model vertices The three dimensions of the geometric coordinates of need to be specified in the range [0,m], where m=2.

设定原始网格三维模型的包围盒的三个维度的坐标范围分别为[xmin,xmax],[ymin,ymax],[zmin,zmax],则通过公式(2)计算原始网格三维模型中任意一个顶点规格化后的坐标值。Set the coordinate ranges of the three dimensions of the bounding box of the original grid 3D model to [x min , x max ], [y min , y max ], [z min , z max ] respectively, then calculate by formula (2) The normalized coordinate value of any vertex in the original mesh 3D model.

其中,(xa,ya,za)表示原始网格三维模型中任意一个顶点的几何坐标;(x′b,y′b,z′b)表示原始网格三维模型中任意一个顶点规格化后的几何坐标;d=max{xmax-xmin,ymax-ymin,zmax-zmin}。Among them, (x a , y a , z a ) represent the geometric coordinates of any vertex in the original mesh 3D model; (x′ b , y′ b , z′ b ) represent the specification of any vertex in the original mesh 3D model The geometric coordinates after transformation; d=max{x max -x min , y max -y min , z max -z min }.

经过步骤一的操作,得到规格化后的网格三维模型。After the operation in step 1, a normalized grid 3D model is obtained.

步骤二、得到规格化后的网格三维模型的所有顶点的颜色属性显著度。Step 2: Obtain the saliency of color attributes of all vertices of the normalized three-dimensional grid model.

在步骤一操作的基础上,计算规格化后的网格三维模型的所有顶点的颜色属性显著度,具体为:On the basis of the operation in step 1, the color attribute salience of all vertices of the normalized mesh 3D model is calculated, specifically:

步骤2.1:计算规格化后的网格三维模型中的每个顶点的灰度值。Step 2.1: Calculate the gray value of each vertex in the normalized grid 3D model.

用符号(ra,ga,ba)表示计算规格化后的网格三维模型中任意一个顶点的颜色属性坐标。为了便于研究,将顶点的颜色向量降为一维向量。使用灰度能够将彩色模型转换为高质量的黑白模型,RGB空间中不同的颜色对应于不同的灰度值,而不同的灰度值也对应于不同的RGB向量。用顶点的灰度值来表示原来的颜色信息,不仅可以降低原来模型的维度,同时也能不失真的表示原来的模型。通过公式(3)计算规格化后的网格三维模型中每个顶点的灰度值,用gray(a)表示。Use symbols (r a , g a , b a ) to represent the color attribute coordinates of any vertex in the normalized mesh 3D model. For the convenience of research, the color vector of the vertex is reduced to a one-dimensional vector. Using grayscale can convert the color model into a high-quality black-and-white model. Different colors in the RGB space correspond to different grayscale values, and different grayscale values also correspond to different RGB vectors. Using the gray value of the vertex to represent the original color information can not only reduce the dimension of the original model, but also represent the original model without distortion. The gray value of each vertex in the normalized grid 3D model is calculated by formula (3), represented by gray(a).

gray(a)=0.299ra+0.587ga+0.114ba (3)gray(a)=0.299r a +0.587g a +0.114b a (3)

通过该转换可以将一个彩色模型,转化为高质量的灰度模型,如图3所示。Through this conversion, a color model can be transformed into a high-quality grayscale model, as shown in Figure 3.

步骤2.2:计算规格化后的网格三维模型中的每个顶点的邻域灰度值。Step 2.2: Calculate the neighborhood gray value of each vertex in the normalized grid 3D model.

通过公式(4)计算顶点a的半径为σ的邻域,σ为一个人为设定值。顶点a的邻域使用欧氏距离来定义。Calculate the neighborhood of vertex a with radius σ by formula (4), where σ is an artificially set value. The neighborhood of vertex a is defined using Euclidean distance.

N(a,σ)={x|||x-a||<σ,x∈U} (4)N(a,σ)={x|||x-a||<σ,x∈U} (4)

其中,N(a,σ)表示顶点a的半径为σ的邻域;U表示规格化后的网格三维模型。Among them, N(a,σ) represents the neighborhood of vertex a whose radius is σ; U represents the normalized three-dimensional mesh model.

然后,通过公式(5)计算顶点a的邻域灰度值;顶点a的邻域灰度值采用顶点灰度的高斯加权平均灰度值。Then, the neighborhood gray value of vertex a is calculated by formula (5); the neighborhood gray value of vertex a adopts the Gaussian weighted average gray value of the vertex gray.

其中,G(gray(a),σ)表示顶点a的邻域灰度值;exp(·)表示自然底数e的幂次方。Among them, G(gray(a),σ) represents the neighborhood gray value of vertex a; exp( ) represents the power of the natural base e.

步骤2.3:计算规格化后的网格三维模型中的每个顶点的颜色属性显著度。通过不同半径的灰度的差值来计算顶点的颜色属性显著度,如公式(6)所示。Step 2.3: Calculate the saliency of the color attribute of each vertex in the normalized mesh 3D model. The saliency of the color attribute of the vertex is calculated by the difference of the gray values of different radii, as shown in formula (6).

S(a)=|G(gray(a),2σ)-G(gray(a),σ)| (6)S(a)=|G(gray(a),2σ)-G(gray(a),σ)| (6)

其中,S(a)表示规格化后的网格三维模型中顶点a的颜色属性显著度。Among them, S(a) represents the salience of the color attribute of vertex a in the normalized three-dimensional mesh model.

为了在不同规格邻域下计算网格属性的显著度,用公式(7)计算某一规格下顶点a的颜色属性显著度。In order to calculate the salience degree of the grid attribute in the neighborhood of different specifications, formula (7) is used to calculate the salience degree of the color attribute of vertex a under a certain specification.

St(a)=|G(gray(a),2σt)-G(gray(a),σt)| (7)S t (a)=|G(gray(a),2σ t )-G(gray(a),σ t )| (7)

其中,St(a)表示顶点a在规格t下的颜色属性显著度;σt表示顶点a在规格t下的邻域半径;t∈{1,2,3};σt∈{ε,2ε,3ε},ε的取值为规格化后的网格三维模型包围盒对角线长度的0.3%。Among them, S t (a) represents the color attribute salience of vertex a under specification t; σ t represents the neighborhood radius of vertex a under specification t; t∈{1,2,3};σ t ∈{ε, 2ε, 3ε}, the value of ε is 0.3% of the diagonal length of the bounding box of the normalized mesh 3D model.

为了综合不同规格的结果,采用非线性抑制算子综合不同规格下的顶点a的颜色属性显著度St(a),将公式(6)进一步改写为公式(8)。In order to synthesize the results of different specifications, the nonlinear suppression operator is used to synthesize the color attribute saliency S t (a) of vertex a under different specifications, and formula (6) is further rewritten as formula (8).

其中,Mt表示顶点a在规格t下计算得到的St(a)中的最大值;表示顶点a在规格t下计算得到的St(a)中,除Mt以外的平均值。Among them, M t represents the maximum value of S t (a) calculated by vertex a under specification t; Indicates the average value of vertex a except M t in S t (a) calculated under specification t.

通过公式(8),即可得到规格化后的网格三维模型的所有顶点的颜色属性显著度。By formula (8), the color attribute salience of all vertices of the normalized mesh 3D model can be obtained.

步骤三、依次计算每一条待折叠边的几何属性误差和颜色属性误差,以及待折叠边的折叠代价。Step 3: Calculate the geometric attribute error and color attribute error of each edge to be folded in turn, and the folding cost of the edge to be folded.

步骤3.1:计算待折叠边的颜色属性误差EcStep 3.1: Calculate the color attribute error E c of the edge to be folded.

步骤3.1.1:通过公式(9)计算得到规格化后的网格三维模型中各顶点的颜色二次误差测度。Step 3.1.1: Calculate the quadratic color error measure of each vertex in the normalized grid 3D model through formula (9).

Qvc(a)=ΣQfc(a) (9)Q vc (a) = ΣQ fc (a) (9)

其中,Qvc(a)表示规格化后的网格三维模型中任意一个顶点a的颜色二次误差测度;Qfc(a)表示规格化后的网格三维模型中顶点a的某一相邻三角面的颜色二次误差测度;ΣQfc(a)表示规格化后的网格三维模型中顶点a的全部相邻三角面的颜色二次误差测度之和。Among them, Q vc (a) represents the color quadratic error measure of any vertex a in the normalized mesh 3D model; Q fc (a) represents a certain neighbor of vertex a in the normalized mesh 3D model The color quadratic error measure of the triangular face; ΣQ fc (a) represents the sum of the color quadratic error measure of all adjacent triangular faces of vertex a in the normalized mesh 3D model.

在计算规格化后的网格三维模型中顶点a的某一相邻三角面的颜色二次误差测度Qfc(a)时,由于存在同一个三角面的三个顶点的颜色一样或者其中两个顶点的颜色一样的情况,此时该三角面的三个颜色矢量不能构成平面。因此对于三个顶点的颜色一样或者其中两个顶点的颜色一样的三角面,其颜色二次误差测度Qfc(a)的计算方法为:When calculating the color quadratic error measure Q fc (a) of an adjacent triangular face of vertex a in the normalized mesh 3D model, because there are three vertices of the same triangular face with the same color or two of them When the colors of the vertices are the same, the three color vectors of the triangular face cannot form a plane. Therefore, for a triangular surface whose three vertices have the same color or two of the vertices have the same color, the calculation method of the color quadratic error measure Q fc (a) is:

当一个三角面片的三个顶点的颜色一样时,其相当于在颜色空间中的一个点,用符号v1表示该点的颜色,v1=(r1,g1,b1),(r1,g1,b1)分别表示RGB空间中三个分量的值;则对于三个顶点的颜色一样的三角面的颜色二次误差测度Qfc(a)通过公式(10)计算。When the colors of the three vertices of a triangular surface are the same, it is equivalent to a point in the color space, and the color of the point is represented by the symbol v 1, v 1 = (r 1 ,g 1 ,b 1 ), ( r 1 , g 1 , b 1 ) respectively represent the values of the three components in the RGB space; then the color quadratic error measure Q fc (a) of the triangular surface with the same color of the three vertices is calculated by the formula (10).

其中,I是单位矩阵。where I is the identity matrix.

当一个三角面片中任意两个顶点的颜色一样,此时三角形所在的颜色平面退化成一条直线。用符号vc1、vc2和vc3分别表示三个顶点的颜色,vc1=(r1,g1,b1),vc2=vc3=(r2,g2,b2),(r1,g1,b1)和(r2,g2,b2)均表示RGB空间中三个分量的值;则对于两个顶点的颜色一样的三角面的颜色二次误差测度Qfc(a)通过公式(11)计算。When the colors of any two vertices in a triangular patch are the same, the color plane where the triangle is located degenerates into a straight line. Use symbols v c1 , v c2 and v c3 to represent the colors of the three vertices respectively, v c1 = (r 1 , g 1 , b 1 ), v c2 = v c3 = (r 2 , g 2 , b 2 ), ( r 1 , g 1 , b 1 ) and (r 2 , g 2 , b 2 ) both represent the values of the three components in the RGB space; then for the color quadratic error measure Q fc of a triangular surface with two vertices of the same color (a) is calculated by formula (11).

其中, in,

通过此步骤的操作,得到待折叠边(vk,vk′)上的顶点vk和vk′的颜色二次误差测度。Through the operation of this step, the color quadratic error measure of vertices v k and v k ' on the edge to be folded (v k , v k' ) is obtained.

步骤3.1.2:通过公式(12)计算待折叠边(vk,vk′)上的点vk和vk′折叠后得到的顶点的颜色二次误差测度QcStep 3.1.2: Use formula (12) to calculate the point v k on the edge to be folded (v k , v k′ ) and the vertex obtained by folding v k′ The color quadratic error measure Q c .

Qc=Qvc(k)+Qvc(k′) (12) Qc = Qvc (k) + Qvc (k') (12)

其中,Qvc(k)和Qvc(k′)可通过公式(9)计算得到。Among them, Q vc (k) and Q vc (k′) can be calculated by formula (9).

步骤3.1.3:计算待折叠边的颜色属性误差EcStep 3.1.3: Calculate the color attribute error E c of the edge to be folded.

待折叠边(vk,vk′)上的点vk和vk′折叠后得到的顶点有几何属性和颜色特征属性 (x,y,z)是顶点的三维几何坐标,(r,g,b)是顶点的颜色三维向量。通过公式(13)计算得到待折叠边的颜色属性误差EcThe vertices obtained after the points v k and v k' on the edge to be folded (v k , v k′ ) are folded have geometric properties and the color feature attribute (x,y,z) is the vertex The three-dimensional geometric coordinates of , (r, g, b) is the vertex color 3d vector. The color attribute error E c of the edge to be folded is calculated by formula (13).

步骤3.2:计算待折叠边的几何属性误差EgStep 3.2: Calculate the geometric property error E g of the edge to be folded.

步骤3.2.1:通过公式(14)计算得到规格化后的网格三维模型中各顶点的几何二次误差测度。Step 3.2.1: Calculate the geometric quadratic error measure of each vertex in the normalized grid 3D model through formula (14).

Qvg(a)=ΣQfg(a) (14)Q vg (a) = ΣQ fg (a) (14)

其中,Qvg(a)表示规格化后的网格三维模型中任意一个顶点a的几何二次误差测度;Qfg(a)表示规格化后的网格三维模型中顶点a的某一相邻三角面的几何二次误差测度;∑Qfg(a)表示规格化后的网格三维模型中顶点a的全部相邻三角面的几何二次误差测度之和。Among them, Q vg (a) represents the geometric quadratic error measure of any vertex a in the normalized three-dimensional mesh model; Q fg (a) represents an adjacent Geometric quadratic error measure of triangular faces; ∑Q fg (a) represents the sum of geometric quadratic error measures of all adjacent triangular faces of vertex a in the normalized mesh 3D model.

步骤3.2.2:通过公式(15)计算待折叠边(vk,vk′)的点vk和vk′折叠后得到的顶点的几何二次误差测度QgStep 3.2.2: Use formula (15) to calculate the point v k of the edge to be folded (v k , v k′ ) and the vertex obtained after v k′ is folded The geometric quadratic error measure Q g .

将规格化后的网格三维模型中的边分为三类:内部边、简单边和边界边;将规格化后的网格三维模型中的点分为两类:内部点和边界点。内部边的两个端点都是内部点;简单边的一个端点是内部点,另一个端点是边界点;边界边的两个端点都是边界点。边界边只有一个邻接面而其他边均有两个邻接面。The edges in the normalized mesh 3D model are divided into three types: internal edges, simple edges and boundary edges; the points in the normalized mesh 3D model are divided into two types: internal points and boundary points. Both endpoints of an interior edge are interior points; one endpoint of a simple edge is an interior point and the other endpoint is a border point; both endpoints of a border edge are border points. Boundary edges have only one contiguous face and all other edges have two contiguous faces.

如果待折叠边(vk,vk′)是简单边或内部边,则通过公式(15)计算待折叠边(vk,vk′)的点vk和vk′折叠后得到的顶点的几何二次误差测度QgIf the edge to be folded (v k , v k′ ) is a simple edge or an internal edge, the point v k of the edge to be folded (v k , v k′ ) and the vertex obtained after v k′ are calculated by formula (15) The geometric quadratic error measure Q g .

Qg=Qvg(k)+Qvg(k′) (15) Qg = Qvg (k) + Qvg (k') (15)

其中,Qvg(k)和Qvg(k′)可通过公式(14)计算得到。Among them, Q vg (k) and Q vg (k′) can be calculated by formula (14).

如果待折叠边(vk,vk′)是边界边,则待折叠边(vk,vk′)的点vk和vk′折叠后得到的顶点的几何二次误差测度Qg的计算方法为:If the edge to be folded (v k , v k′ ) is a boundary edge, then the vertex v k and v k′ of the edge to be folded (v k , v k′ ) are folded The calculation method of the geometric quadratic error measure Q g is:

对待折叠边(vk,vk′)做一个其关联平面的垂直平面,将该垂直平面的二次型矩阵Qp合并到待折叠边(vk,vk′)上边界点的二次型矩阵中,得到待折叠边(vk,vk′)的几何二次误差测度Qg,如公式(16)所示。The side to be folded (v k , v k′ ) is made a vertical plane of its associated plane, and the quadratic matrix Q p of the vertical plane is merged into the quadratic In the type matrix, the geometric quadratic error measure Q g of the edge to be folded (v k , v k′ ) is obtained, as shown in formula (16).

其中,Qt为待折叠边(vk,vk′)上任意一个边界点的二次型矩阵;t表示待折叠边(vk,vk′)上边界点的顺序编号,t为正整数;表示待折叠边(vk,vk′)上所有边界点的二次型矩阵之和;w为一常数,其作用是保证边界边被适度简化,同时使得简单边折叠时目标点的位置靠近边界边;w=100。Among them, Q t is the quadratic matrix of any border point on the side to be folded (v k , v k′ ); t represents the sequence number of the border point on the side to be folded (v k , v k′ ), and t is integer; Indicates the sum of quadratic matrices of all boundary points on the edge to be folded (v k , v k′ ); w is a constant whose function is to ensure that the boundary edge is moderately simplified, and at the same time make the position of the target point close to Boundary edges; w=100.

步骤3.2.3:通过公式(17)计算待折叠边的几何属性误差EgStep 3.2.3: Calculate the geometric attribute error E g of the edge to be folded by formula (17).

步骤3.3:通过公式(18)计算待折叠边的折叠代价cost。Step 3.3: Calculate the folding cost of the edge to be folded by formula (18).

其中,S(vk)和S(vk′)是通过公式(8)计算得到。Among them, S(v k ) and S(v k′ ) are calculated by formula (8).

步骤四、依折叠代价从小到大对所有的待折叠边进行排序。Step 4: Sort all the edges to be folded according to the folding cost from small to large.

步骤五、从步骤五的结果中选择代价最小的待折叠边进行折叠操作,得到新模型。Step 5. From the results of step 5, select the edge to be folded with the least cost and perform the folding operation to obtain a new model.

步骤六、重复步骤二至步骤六的操作,直到达到简化要求为止。Step 6. Repeat steps 2 to 6 until the simplification requirements are met.

对应于σt为ε,2ε,3ε,得到的模型示意图分别如图4(a)、图4(b)和图4(c)所示。综合不同规格的结果,得到的模型示意图分别如图4(d)所示。Corresponding to σt being ε, 2ε, 3ε, the schematic diagrams of the obtained models are shown in Fig. 4(a), Fig. 4(b) and Fig. 4(c) respectively. Combining the results of different specifications, the schematic diagrams of the obtained models are shown in Fig. 4(d).

为了说明本发明的效果,同时使用了QEM(二次误差度量,仅考虑几何特征)的方法和本发明方法对如图1和图2所示的汽车模型进行化简,得到的对比图如图5所示。In order to illustrate the effect of the present invention, the method of QEM (quadratic error measurement, only considering geometric features) and the method of the present invention are used simultaneously to simplify the automobile model as shown in Figure 1 and Figure 2, and the comparison diagram obtained is as shown in Figure 2 5.

如图5(a)是原始的带颜色的汽车模型。图5(b)和图5(c)都是简化率为90%下的模型;图5(b)是QEM方法的简化结果,其未考虑颜色属性特征;图5(c)是采用本发明方法的简化结果。不难看到,本发明方法实现了对带颜色属性模型的简化。其次,在模型颜色属性显著性的指导下,图5(c)比图5(b)更好的保持了网格的显著特征。车灯部分直到简化率90%还能被很好的保留下来。右边车门部位的车灯在图5(b)中已经消失,而在图5(c)中依然保留了下来。图5(c)中汽车的前镜部分的颜色边界也比图5(b)中更加清晰。这表明本发明方法的算法不但能很好的实现对带属性网格的网格简化,同时能有效保持网格的显著属性特征。Figure 5(a) is the original colored car model. Fig. 5 (b) and Fig. 5 (c) all are the model under 90% of simplification rate; Fig. 5 (b) is the simplified result of QEM method, and it does not consider color attribute feature; Fig. 5 (c) adopts the present invention Simplified result of the method. It is not difficult to see that the method of the present invention realizes the simplification of the color attribute model. Second, guided by the saliency of the model's color attributes, Figure 5(c) preserves the salient features of the grid better than Figure 5(b). The headlight part can be well preserved until the simplification rate is 90%. The car light at the right door has disappeared in Figure 5(b), but it still remains in Figure 5(c). The color boundary of the front mirror part of the car in Fig. 5(c) is also clearer than that in Fig. 5(b). This shows that the algorithm of the method of the present invention can not only realize the grid simplification of the grid with attributes well, but also effectively maintain the remarkable attribute characteristics of the grid.

虽然结合附图描述了本发明的实施方式,但是对于本领域技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进,这些也应视为属于本发明的保护范围。Although the embodiment of the present invention has been described in conjunction with the accompanying drawings, for those skilled in the art, some improvements can be made without departing from the principle of the present invention, and these should also be considered as belonging to the protection scope of the present invention.

Claims (2)

1.一种基于显著颜色属性特征保持的模型简化方法,其特征在于:其具体实现步骤为:1. A model simplification method based on salient color attribute feature preservation, is characterized in that: its specific implementation steps are: 步骤一、对原始网格三维模型进行规格化处理;所述原始网格三维模型包括顶点的颜色属性;具体为:Step 1. Normalize the original grid 3D model; the original grid 3D model includes the color attributes of vertices; specifically: 步骤1.1:对原始网格三维模型顶点的颜色属性进行处理;Step 1.1: process the color attribute of the vertices of the original mesh 3D model; 将原始网格三维模型顶点的颜色属性表示为红绿蓝RGB颜色分量组成的三维向量,获得顶点的颜色属性坐标;然后,采取加权颜色分量法,通过公式(1)计算原始网格三维模型的任意两个顶点的颜色差异;用符号ci和cj表示原始网格三维模型的任意两个顶点,用符号ci(ri,gi,bi)和cj(rj,gj,bj)分别表示原始网格三维模型的任意两个顶点ci和cj的颜色三维向量;Express the color attribute of the vertices of the original grid 3D model as a 3D vector composed of red, green and blue RGB color components to obtain the color attribute coordinates of the vertices; then, adopt the weighted color component method to calculate the The color difference between any two vertices; use the symbols c i and c j to represent any two vertices of the original mesh 3D model, and use the symbols c i (r i , g i , b i ) and c j (r j , g j , b j ) respectively represent the color three-dimensional vectors of any two vertices c i and c j of the original mesh three-dimensional model; 其中,D(ci,cj)表示原始网格三维模型的任意两个顶点ci和cj的颜色差异;wr、wg、wb分别表示对应红色、绿色和蓝色的加权系数,wr>wb,wg>wbAmong them, D( ci ,c j ) represents the color difference between any two vertices c i and c j of the original mesh 3D model; w r , w g , w b represent the weighting coefficients corresponding to red, green and blue respectively , w r >w b , w g >w b ; 原始网格三维模型的任意两个顶点ci和cj的颜色差异D(ci,cj)可采用顶点ci和cj之间的欧氏距离,但其前提条件是RGB空间是一个均匀颜色空间:即每个颜色的等色差颜色应在RGB空间中成一个球面;而且球面上不同位置的颜色和球心处的颜色应该表示出相同的差异;RGB空间显然不满足这一条件,在RGB空间中用欧氏距离来度量色差并不符合人的视感;研究表明,人眼对红、绿、蓝三原色的敏感度不同,对红色和绿色的更敏感一些,所以在计算色差时需要对三原色有区别对待,使计算更准确;为了补偿RGB空间的非均匀性,对色差的计算采取加权颜色分量法:即加入wr、wg、wb三个加权系数;The color difference D( ci ,c j ) between any two vertices c i and c j of the original mesh 3D model can be the Euclidean distance between vertices c i and c j , but the prerequisite is that the RGB space is a Uniform color space: that is, the equal color difference color of each color should form a sphere in RGB space; and the colors at different positions on the sphere and the color at the center of the sphere should show the same difference; RGB space obviously does not meet this condition, Using Euclidean distance to measure color difference in RGB space does not conform to human visual perception; research shows that human eyes have different sensitivities to red, green and blue primary colors, and are more sensitive to red and green, so when calculating color difference The three primary colors need to be treated differently to make the calculation more accurate; in order to compensate the non-uniformity of the RGB space, the weighted color component method is adopted for the calculation of the color difference: that is, three weighting coefficients w r , w g , and w b are added; 步骤1.2:将原始网格三维模型各顶点的几何坐标和颜色属性坐标规格到相同的范围内;Step 1.2: Standardize the geometric coordinates and color attribute coordinates of each vertex of the original grid 3D model to the same range; 在步骤1.1操作基础上,原始网格三维模型各顶点的几何坐标和颜色属性坐标的坐标范围可能不同,为了使得在计算折叠代价时空间位置和颜色属性信息起到平等的作用,将原始网格三维模型各顶点的几何坐标和颜色属性坐标规格到相同的范围内,即:原始网格三维模型的顶点颜色坐标的三个分量都在[0,m]范围内,则原始网格三维模型顶点的几何坐标的三个维度需要规格到[0,m]范围内,m∈[1,10];Based on the operation in step 1.1, the coordinate ranges of the geometric coordinates and color attribute coordinates of each vertex of the original mesh 3D model may be different. In order to make the spatial position and color attribute information play an equal role in the calculation of the folding cost, the original mesh The geometric coordinates and color attribute coordinates of each vertex of the 3D model are within the same range, that is, the three components of the vertex color coordinates of the original mesh 3D model are all within the range of [0, m], then the original mesh 3D model vertices The three dimensions of the geometric coordinates need to be specified in the range of [0,m], m∈[1,10]; 设定原始网格三维模型的包围盒的三个维度的坐标范围分别为[xmin,xmax],[ymin,ymax],[zmin,zmax],则通过公式(2)计算原始网格三维模型中任意一个顶点规格化后的坐标值;Set the coordinate ranges of the three dimensions of the bounding box of the original grid 3D model to [x min , x max ], [y min , y max ], [z min , z max ] respectively, then calculate by formula (2) The normalized coordinate value of any vertex in the original mesh 3D model; 其中,(xb,yb,zb)表示原始网格三维模型中任意一个顶点的几何坐标;(x′b,y′b,z′b)表示原始网格三维模型中任意一个顶点规格化后的几何坐标;d=max{xmax-xmin,ymax-ymin,zmax-zmin};Among them, (x b , y b , z b ) represents the geometric coordinates of any vertex in the original mesh 3D model; (x′ b , y′ b , z′ b ) represents the specification of any vertex in the original mesh 3D model The geometric coordinates after transformation; d=max{x max -x min , y max -y min , z max -z min }; 经过步骤一的操作,得到规格化后的网格三维模型;After the operation of step 1, the normalized grid 3D model is obtained; 步骤二、得到规格化后的网格三维模型的所有顶点的颜色属性显著度;Step 2, obtaining the color attribute salience of all vertices of the normalized grid three-dimensional model; 在步骤一操作的基础上,计算规格化后的网格三维模型的所有顶点的颜色属性显著度,具体为:On the basis of the operation in step 1, the color attribute salience of all vertices of the normalized mesh 3D model is calculated, specifically: 步骤2.1:计算规格化后的网格三维模型中的每个顶点的灰度值;Step 2.1: Calculating the gray value of each vertex in the normalized grid 3D model; 用符号(ra,ga,ba)表示计算规格化后的网格三维模型中任意一个顶点的颜色属性坐标;为了便于研究,将顶点的颜色向量降为一维向量;使用灰度能够将彩色模型转换为高质量的黑白模型,RGB空间中不同的颜色对应于不同的灰度值,而不同的灰度值也对应于不同的RGB向量;用顶点的灰度值来表示原来的颜色信息,不仅可以降低原来模型的维度,同时也能不失真的表示原来的模型;通过公式(3)计算规格化后的网格三维模型中每个顶点的灰度值,用gray(a)表示;Use the symbol (r a , g a , b a ) to represent the color attribute coordinates of any vertex in the normalized mesh 3D model; for the convenience of research, the color vector of the vertex is reduced to a one-dimensional vector; using grayscale can Convert the color model to a high-quality black-and-white model. Different colors in the RGB space correspond to different gray values, and different gray values also correspond to different RGB vectors; use the gray value of the vertex to represent the original color information, not only can reduce the dimension of the original model, but also represent the original model without distortion; the gray value of each vertex in the normalized grid 3D model is calculated by formula (3), represented by gray(a) ; gray(a)=0.299ra+0.587ga+0.114ba (3)gray(a)=0.299r a +0.587g a +0.114b a (3) 通过该转换可以将一个彩色模型,转化为高质量的灰度模型;Through this conversion, a color model can be converted into a high-quality grayscale model; 步骤2.2:计算规格化后的网格三维模型中的每个顶点的邻域灰度值;Step 2.2: Calculate the neighborhood gray value of each vertex in the normalized grid 3D model; 通过公式(4)计算顶点a的半径为σ的邻域,σ为一个人为设定值;顶点a的邻域使用欧氏距离来定义;Calculate the neighborhood of vertex a with radius σ by formula (4), where σ is an artificially set value; the neighborhood of vertex a is defined by Euclidean distance; N(a,σ)={x|||x-a||<σ,x∈U} (4)N(a,σ)={x|||x-a||<σ,x∈U} (4) 其中,N(a,σ)表示顶点a的半径为σ的邻域;U表示规格化后的网格三维模型;Among them, N(a,σ) represents the neighborhood of vertex a whose radius is σ; U represents the normalized three-dimensional mesh model; 然后,通过公式(5)计算顶点a的邻域灰度值;顶点a的邻域灰度值采用顶点灰度的高斯加权平均灰度值;Then, the neighborhood gray value of vertex a is calculated by formula (5); the neighborhood gray value of vertex a adopts the Gaussian weighted average gray value of the vertex gray; 其中,G(gray(a),σ)表示顶点a的邻域灰度值;exp(·)表示自然底数e的幂次方;Among them, G(gray(a),σ) represents the neighborhood gray value of vertex a; exp(·) represents the power of the natural base e; 步骤2.3:计算规格化后的网格三维模型中的每个顶点的颜色属性显著度;通过不同半径的灰度的差值来计算顶点的颜色属性显著度,如公式(6)所示;Step 2.3: Calculate the salience degree of the color attribute of each vertex in the normalized grid three-dimensional model; calculate the salience degree of the color attribute of the vertex by the difference of the gray levels of different radii, as shown in formula (6); S(a)=|G(gray(a),2σ)-G(gray(a),σ)| (6)S(a)=|G(gray(a),2σ)-G(gray(a),σ)| (6) 其中,S(a)表示规格化后的网格三维模型中顶点a的颜色属性显著度;Wherein, S(a) represents the salience degree of the color attribute of vertex a in the normalized grid three-dimensional model; 为了在不同规格邻域下计算网格属性的显著度,用公式(7)计算某一规格下顶点a的颜色属性显著度;In order to calculate the salience degree of the grid attribute in the neighborhood of different specifications, use the formula (7) to calculate the salience degree of the color attribute of the vertex a under a certain specification; St(a)=|G(gray(a),2σt)-G(gray(a),σt)| (7)S t (a)=|G(gray(a),2σ t )-G(gray(a),σ t )| (7) 其中,St(a)表示顶点a在规格t下的颜色属性显著度;σt表示顶点a在规格t下的邻域半径;t∈{1,2,3};σt∈{ε,2ε,3ε},ε的取值为规格化后的网格三维模型包围盒对角线长度的0.3%~0.8%;Among them, S t (a) represents the color attribute salience of vertex a under specification t; σ t represents the neighborhood radius of vertex a under specification t; t∈{1,2,3};σ t ∈{ε, 2ε, 3ε}, the value of ε is 0.3% to 0.8% of the diagonal length of the bounding box of the normalized grid 3D model; 为了综合不同规格的结果,采用非线性抑制算子综合不同规格下的顶点a的颜色属性显著度St(a),将公式(6)进一步改写为公式(8);In order to synthesize the results of different specifications, the nonlinear suppression operator is used to synthesize the color attribute saliency S t (a) of vertex a under different specifications, and formula (6) is further rewritten as formula (8); 其中,Mt表示顶点a在规格t下计算得到的St(a)中的最大值;表示顶点a在规格t下计算得到的St(a)中,除Mt以外的平均值;Among them, M t represents the maximum value of S t (a) calculated by vertex a under specification t; Indicates the average value of vertex a except M t in S t (a) calculated under specification t; 通过公式(8),即可得到规格化后的网格三维模型的所有顶点的颜色属性显著度;By formula (8), the color attribute salience of all vertices of the normalized grid three-dimensional model can be obtained; 步骤三、依次计算每一条待折叠边的几何属性误差和颜色属性误差,以及待折叠边的折叠代价;待折叠边用符号(vk,vk′)表示;Step 3. Calculate the geometric attribute error and color attribute error of each edge to be folded sequentially, as well as the folding cost of the edge to be folded; the edge to be folded is represented by the symbol (v k , v k′ ); 步骤3.1:计算待折叠边的颜色属性误差,用符号Ec表示;Step 3.1: Calculate the color attribute error of the edge to be folded, represented by the symbol Ec ; 步骤3.1.1:通过公式(9)计算得到规格化后的网格三维模型中各顶点的颜色二次误差测度;Step 3.1.1: Calculate the secondary error measure of the color of each vertex in the normalized grid three-dimensional model by formula (9); Qvc(a)=∑Qfc(a) (9)Q vc (a)=∑Q fc (a) (9) 其中,Qvc(a)表示规格化后的网格三维模型中任意一个顶点a的颜色二次误差测度;Qfc(a)表示规格化后的网格三维模型中顶点a的某一相邻三角面的颜色二次误差测度;∑Qfc(a)表示规格化后的网格三维模型中顶点a的全部相邻三角面的颜色二次误差测度之和;Among them, Q vc (a) represents the color quadratic error measure of any vertex a in the normalized mesh 3D model; Q fc (a) represents a certain neighbor of vertex a in the normalized mesh 3D model The color quadratic error measure of the triangular face; ∑Q fc (a) represents the sum of the color quadratic error measure of all adjacent triangular faces of vertex a in the normalized mesh three-dimensional model; 在计算规格化后的网格三维模型中顶点a的某一相邻三角面的颜色二次误差测度Qfc(a)时,由于存在同一个三角面的三个顶点的颜色一样或者其中两个顶点的颜色一样的情况,此时该三角面的三个颜色矢量不能构成平面;因此对于三个顶点的颜色一样或者其中两个顶点的颜色一样的三角面,其颜色二次误差测度Qfc(a)的计算方法为:When calculating the color quadratic error measure Q fc (a) of an adjacent triangular face of vertex a in the normalized mesh 3D model, because there are three vertices of the same triangular face with the same color or two of them When the colors of the vertices are the same, the three color vectors of the triangular face cannot form a plane; therefore, for a triangular face with the same color of three vertices or the same color of two vertices, the color quadratic error measure Q fc ( a) The calculation method is: 当一个三角面片的三个顶点的颜色一样时,其相当于在颜色空间中的一个点,用符号v1表示该点的颜色,v1=(r1,g1,b1),(r1,g1,b1)分别表示RGB空间中三个分量的值;则对于三个顶点的颜色一样的三角面的颜色二次误差测度Qfc(a)通过公式(10)计算;When the colors of the three vertices of a triangular surface are the same, it is equivalent to a point in the color space, and the color of the point is represented by the symbol v 1, v 1 = (r 1 ,g 1 ,b 1 ), ( r 1 , g 1 , b 1 ) respectively represent the values of the three components in the RGB space; then for the color quadratic error measure Q fc (a) of the triangular surface with the same color of the three vertices is calculated by the formula (10); 其中,I是单位矩阵;Wherein, I is the identity matrix; 当一个三角面片中任意两个顶点的颜色一样,此时三角形所在的颜色平面退化成一条直线;用符号vc1、vc2和vc3分别表示三个顶点的颜色,vc1=(r1,g1,b1),vc2=vc3=(r2,g2,b2),(r1,g1,b1)和(r2,g2,b2)均表示RGB空间中三个分量的值;则对于两个顶点的颜色一样的三角面的颜色二次误差测度Qfc(a)通过公式(11)计算;When the colors of any two vertices in a triangular facet are the same, the color plane where the triangle is located degenerates into a straight line; the colors of the three vertices are represented by symbols v c1 , v c2 and v c3 respectively, v c1 =(r 1 ,g 1 ,b 1 ), v c2 =v c3 =(r 2 ,g 2 ,b 2 ), (r 1 ,g 1 ,b 1 ) and (r 2 ,g 2 ,b 2 ) all represent the RGB space The value of the three components in; then for the color quadratic error measure Q fc (a) of the same triangular surface of the color of two vertices is calculated by formula (11); 其中, in, 通过此步骤的操作,得到待折叠边(vk,vk′)上的顶点vk和vk′的颜色二次误差测度;Through the operation of this step, the color quadratic error measure of the vertices v k and v k' on the side to be folded (v k , v k ' ) is obtained; 步骤3.1.2:通过公式(12)计算待折叠边(vk,vk′)上的点vk和vk′折叠后得到的顶点v表示的颜色二次误差测度QcStep 3.1.2: Calculate the quadratic error measure Q c of the color represented by the vertex v obtained by folding the point v k on the edge to be folded (v k , v k′ ) and v k′ through formula (12); Qc=Qvc(k)+Qvc(k′) (12) Qc = Qvc (k) + Qvc (k') (12) 其中,Qvc(k)和Qvc(k′)可通过公式(9)计算得到;Among them, Q vc (k) and Q vc (k′) can be calculated by formula (9); 步骤3.1.3:计算待折叠边的颜色属性误差EcStep 3.1.3: Calculate the color attribute error E c of the edge to be folded; 待折叠边(vk,vk′)上的点vk和vk′折叠后得到的顶点有几何属性表示和颜色特征属性表示,(x,y,z)是顶点的三维几何坐标,(r,g,b)是顶点的颜色三维向量;通过公式(13)计算得到待折叠边的颜色属性误差EcThe vertices obtained after the points v k and v k' on the edge to be folded (v k , v k′ ) are folded have geometric properties Representation and Color Feature Properties express, (x,y,z) is the vertex The three-dimensional geometric coordinates of , (r, g, b) is the vertex The color three-dimensional vector; the color property error E c of the edge to be folded is calculated by formula (13); 步骤3.2:计算待折叠边的几何属性误差,用符号Eg表示;Step 3.2: Calculate the geometric attribute error of the edge to be folded, represented by the symbol Eg ; 步骤3.2.1:通过公式(14)计算得到规格化后的网格三维模型中各顶点的几何二次误差测度;Step 3.2.1: Calculate the geometric quadratic error measure of each vertex in the normalized grid three-dimensional model by formula (14); Qvg(a)=∑Qfg(a) (14)Q vg (a)=∑Q fg (a) (14) 其中,Qvg(a)表示规格化后的网格三维模型中任意一个顶点a的几何二次误差测度;Qfg(a)表示规格化后的网格三维模型中顶点a的某一相邻三角面的几何二次误差测度;∑Qfg(a)表示规格化后的网格三维模型中顶点a的全部相邻三角面的几何二次误差测度之和;Among them, Q vg (a) represents the geometric quadratic error measure of any vertex a in the normalized three-dimensional mesh model; Q fg (a) represents an adjacent The geometric quadratic error measure of the triangular surface; ∑ Q f g (a) represents the sum of the geometric quadratic error measures of all adjacent triangular faces of the vertex a in the three-dimensional mesh model after normalization; 步骤3.2.2:通过公式(15)计算待折叠边(vk,vk′)的点vk和vk′折叠后得到的顶点v的几何二次误差测度,用符号Qg表示;Step 3.2.2: Calculate the geometric quadratic error measure of the point v k of the edge to be folded (v k , v k′ ) and the vertex v obtained by folding v k′ through the formula (15), expressed by the symbol Q g ; 将规格化后的网格三维模型中的边分为三类:内部边、简单边和边界边;将规格化后的网格三维模型中的点分为两类:内部点和边界点;内部边的两个端点都是内部点;简单边的一个端点是内部点,另一个端点是边界点;边界边的两个端点都是边界点;边界边只有一个邻接面而其他边均有两个邻接面;Divide the edges in the normalized mesh 3D model into three categories: internal edges, simple edges, and boundary edges; divide the points in the normalized mesh 3D model into two categories: internal points and boundary points; internal Both endpoints of an edge are interior points; one endpoint of a simple edge is an interior point and the other is a border point; both endpoints of a border edge are border points; border edges have only one adjoining face while other edges have two adjacent surface; 如果待折叠边(vk,vk′)是简单边或内部边,则通过公式(15)计算待折叠边(vk,vk′)的点vk和vk′折叠后得到的顶点v的几何二次误差测度QgIf the edge to be folded (v k , v k′ ) is a simple edge or an internal edge, the point v k of the edge to be folded (v k , v k′ ) and the vertex obtained after v k′ are calculated by formula (15) The geometric quadratic error measure Q g of v; Qg=Qvg(k)+Qvg(k′) (15) Qg = Qvg (k) + Qvg (k') (15) 其中,Qvg(k)和Qvg(k′)可通过公式(14)计算得到;Among them, Q vg (k) and Q vg (k′) can be calculated by formula (14); 如果待折叠边(vk,vk′)是边界边,则待折叠边(vk,vk′)的点vk和vk′折叠后得到的顶点v的几何二次误差测度Qg的计算方法为:If the edge to be folded (v k , v k′ ) is a boundary edge, then the geometric quadratic error measure Q g of the point v k of the edge to be folded (v k , v k′ ) and the vertex v obtained by folding v k′ The calculation method is: 对待折叠边(vk,vk′)做一个其关联平面的垂直平面,将该垂直平面的二次型矩阵Qp合并到待折叠边(vk,vk′)上边界点的二次型矩阵中,得到待折叠边(vk,vk′)的几何二次误差测度Qg,如公式(16)所示;The side to be folded (v k , v k′ ) is made a vertical plane of its associated plane, and the quadratic matrix Q p of the vertical plane is merged into the quadratic In the type matrix, the geometric quadratic error measure Q g of the edge to be folded (v k , v k′ ) is obtained, as shown in formula (16); 其中,Qt′为待折叠边(vk,vk′)上任意一个边界点的二次型矩阵;t′表示待折叠边(vk,vk′)上边界点的顺序编号,t′为正整数;表示待折叠边(vk,vk′)上所有边界点的二次型矩阵之和;w为一常数,其作用是保证边界边被适度简化,同时使得简单边折叠时目标点的位置靠近边界边;w∈[100,1000];Among them, Q t′ is the quadratic matrix of any border point on the side to be folded (v k , v k′ ); t′ represents the sequence number of the border point on the side to be folded (v k , v k′ ), t 'is a positive integer; Indicates the sum of quadratic matrices of all boundary points on the edge to be folded (v k , v k′ ); w is a constant whose function is to ensure that the boundary edge is moderately simplified, and at the same time make the position of the target point close to Boundary edge; w∈[100,1000]; 步骤3.2.3:通过公式(17)计算待折叠边的几何属性误差EgStep 3.2.3: Calculate the geometric attribute error E g of the edge to be folded by formula (17); 步骤3.3:通过公式(18)计算待折叠边的折叠代价cost。Step 3.3: Calculate the folding cost of the edge to be folded by formula (18). 其中,S(vk)和S(vk′)是通过公式(8)计算得到;Among them, S(v k ) and S(v k′ ) are calculated by formula (8); 步骤四、依折叠代价从小到大对所有的待折叠边进行排序;Step 4. Sort all the edges to be folded according to the folding cost from small to large; 步骤五、从步骤四的结果中选择代价最小的待折叠边进行折叠操作,得到新模型;Step 5. From the results of step 4, select the edge to be folded with the least cost to perform the folding operation to obtain a new model; 步骤六、重复步骤二至步骤六的操作,直到达到简化要求为止。Step 6. Repeat steps 2 to 6 until the simplification requirements are met. 2.如权利要求1所述的一种基于显著颜色属性特征保持的模型简化方法,其特征在于:wr=3、wg=4、wb=2。2. A model simplification method based on preservation of salient color attribute features as claimed in claim 1, characterized in that: w r =3, w g =4, w b =2.
CN201610150721.XA 2016-03-16 2016-03-16 A kind of Model Simplification Method kept based on notable color attribute feature Active CN105761314B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610150721.XA CN105761314B (en) 2016-03-16 2016-03-16 A kind of Model Simplification Method kept based on notable color attribute feature

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610150721.XA CN105761314B (en) 2016-03-16 2016-03-16 A kind of Model Simplification Method kept based on notable color attribute feature

Publications (2)

Publication Number Publication Date
CN105761314A CN105761314A (en) 2016-07-13
CN105761314B true CN105761314B (en) 2018-09-14

Family

ID=56332073

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610150721.XA Active CN105761314B (en) 2016-03-16 2016-03-16 A kind of Model Simplification Method kept based on notable color attribute feature

Country Status (1)

Country Link
CN (1) CN105761314B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107945258B (en) * 2017-11-03 2021-01-12 杭州群核信息技术有限公司 Automatic simplified generation method of three-dimensional graph
CN108038909A (en) * 2017-11-28 2018-05-15 河海大学 The Triangular Mesh Simplification method estimated based on angular error
CN110832548A (en) * 2018-11-08 2020-02-21 深圳市大疆创新科技有限公司 Method and device for simplifying three-dimensional grid model
CN113112604B (en) * 2020-11-25 2023-10-13 江南大学 A grid point array model construction method and application in gridded RGB color space
CN112562085A (en) * 2020-12-22 2021-03-26 广联达科技股份有限公司 A BIM model simplification method and simplification device
CN114187421B (en) * 2021-09-30 2022-09-02 北京博能科技股份有限公司 Method and system for simplifying finite element mesh model

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102306394A (en) * 2011-08-30 2012-01-04 北京理工大学 Three-dimensional model simplification method based on appearance retention
CN102881044A (en) * 2012-09-27 2013-01-16 重庆大学 Simplification method of three-dimensional grid model based on triangle folding
CN105303614A (en) * 2015-10-12 2016-02-03 中国人民解放军空军航空大学 Improved QEM three-dimensional model simplifying method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102306394A (en) * 2011-08-30 2012-01-04 北京理工大学 Three-dimensional model simplification method based on appearance retention
CN102881044A (en) * 2012-09-27 2013-01-16 重庆大学 Simplification method of three-dimensional grid model based on triangle folding
CN105303614A (en) * 2015-10-12 2016-02-03 中国人民解放军空军航空大学 Improved QEM three-dimensional model simplifying method

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
RGB 颜色空间的矢量-角度距离色差公式;杨振亚 等;《计算机工程与应用》;20101231;第46卷(第6期);第154-156页 *
Salient Global Geometry Features Preserving Mesh Simplification;Jiancheng Qiao;《IEEE International Conference on Communication technology》;20151231;第32--327页 *
Simplifying surfaces with color and texture using quadric error metrics;Garland M et al.;《IEEE Computer Society Press Proceedings of the conference on Visualization"98》;19981231;第1-8页 *
基于二次误差测度的三角网格简化算法研究;张欣;《中国优秀硕士学位论文全文数据库 信息科技辑》;20120815;第2012年卷(第8期);第1-62页 *
基于二次误差测度的带属性三角网格简化算法;赵惠芳 等;《中国铁道科学》;20050131;第26卷(第1期);第78-82页 *

Also Published As

Publication number Publication date
CN105761314A (en) 2016-07-13

Similar Documents

Publication Publication Date Title
CN105761314B (en) A kind of Model Simplification Method kept based on notable color attribute feature
US8711143B2 (en) System and method for interactive image-based modeling of curved surfaces using single-view and multi-view feature curves
Lozes et al. Partial difference operators on weighted graphs for image processing on surfaces and point clouds
CN112085836A (en) A 3D face reconstruction method based on graph convolutional neural network
CN108335352B (en) A texture mapping method for multi-view large-scale 3D scene reconstruction
WO2020165557A1 (en) 3d face reconstruction system and method
CN109166145B (en) A method and system for extracting growth parameters of fruit tree leaves based on cluster segmentation
CN103530907B (en) Complicated three-dimensional model drawing method based on images
WO2022183500A1 (en) Projection-based point cloud quality evaluation method and apparatus, device and storage medium
Maximo et al. A robust and rotationally invariant local surface descriptor with applications to non-local mesh processing
CN105303614A (en) Improved QEM three-dimensional model simplifying method
CN111951196B (en) Graph-based progressive point cloud downsampling method and device
Hu et al. Geometric feature enhanced line segment extraction from large-scale point clouds with hierarchical topological optimization
CN108416801B (en) A Har-SURF-RAN Feature Point Matching Method for Stereo Vision 3D Reconstruction
CN109741358B (en) A Superpixel Segmentation Method Based on Adaptive Hypergraph Learning
CN113409332A (en) Building plane segmentation method based on three-dimensional point cloud
CN109242854A (en) A kind of image significance detection method based on FLIC super-pixel segmentation
Dinesh et al. Point cloud video super-resolution via partial point coupling and graph smoothness
KR101191319B1 (en) Apparatus and method for painterly rendering based on objective motion information
Lozes et al. Nonlocal processing of 3d colored point clouds
Yu et al. SDG cut: 3D reconstruction of non-lambertian objects using graph cuts on surface distance grid
CN110322548B (en) Three-dimensional grid model generation method based on geometric image parameterization
Wu et al. An effective content-aware image inpainting method
CN112884884A (en) Candidate region generation method and system
US11107257B1 (en) Systems and methods of generating playful palettes from images

Legal Events

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