CN113178013B - Triangular mesh filtering method, triangular mesh filtering device, electronic equipment and storage medium - Google Patents

Triangular mesh filtering method, triangular mesh filtering device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113178013B
CN113178013B CN202110563560.8A CN202110563560A CN113178013B CN 113178013 B CN113178013 B CN 113178013B CN 202110563560 A CN202110563560 A CN 202110563560A CN 113178013 B CN113178013 B CN 113178013B
Authority
CN
China
Prior art keywords
triangular
patch
surface normal
patches
neighborhood
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
CN202110563560.8A
Other languages
Chinese (zh)
Other versions
CN113178013A (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.)
Guangdong OPT Machine Vision Co Ltd
Original Assignee
Guangdong OPT Machine Vision Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong OPT Machine Vision Co Ltd filed Critical Guangdong OPT Machine Vision Co Ltd
Priority to CN202110563560.8A priority Critical patent/CN113178013B/en
Publication of CN113178013A publication Critical patent/CN113178013A/en
Application granted granted Critical
Publication of CN113178013B publication Critical patent/CN113178013B/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
    • G06T5/70
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details

Abstract

The embodiment of the invention discloses a triangular mesh filtering method, a triangular mesh filtering device, electronic equipment and a storage medium. The triangular mesh filtering method comprises the following steps: acquiring triangular mesh data to be filtered, and determining the surface normal direction of each triangular patch in the triangular mesh data; traversing the triangular mesh data, carrying out weight distribution on the neighborhood triangular patches of each triangular patch, and updating the surface normal of each triangular patch based on a weight distribution result to obtain an updated surface normal after iterative updating of each triangular patch; and carrying out iterative filtering on the positions of all the vertexes in the triangular mesh data according to the updating surface normal direction of each triangular patch to obtain the triangular mesh data after filtering. The embodiment of the invention improves the quality of the triangular meshes after filtering, recovers the sharp geometric features on the triangular meshes, and simultaneously improves the recovery effect on the nonlinear smooth area.

Description

Triangular mesh filtering method, triangular mesh filtering device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of image processing, in particular to a triangular mesh filtering method, a triangular mesh filtering device, electronic equipment and a storage medium.
Background
With the wide application of three-dimensional scan data in the fields of industrial detection, target recognition, artificial intelligence VR (Virtual Reality)/AR (Augmented Reality ) and the like, the improvement of the quality of three-dimensional scan data has great significance. The initial point cloud data storage amount obtained by three-dimensional scanning is huge, surface calculation is inconvenient, and the triangular mesh model obtained by surface reconstruction is the simplest and commonly used data.
In the process of scanning and surface reconstruction, the triangular mesh model is polluted by noise, the visual quality of the triangular mesh model is reduced by the noise, and the subsequent processing effect on the triangular mesh model is influenced, so that the effect of a three-dimensional scanning image is influenced.
The prior art filters the triangular mesh model by using a linear model, but the linear model easily breaks sharp geometric features in the triangular mesh model while removing noise, and has the defects of being incapable of recovering a nonlinear smooth area and the like.
Disclosure of Invention
The embodiment of the invention provides a triangular mesh filtering method, a triangular mesh filtering device, electronic equipment and a storage medium, which improve the quality of triangular mesh after filtering, recover sharp geometric features on triangular meshes to the greatest extent and improve the recovery effect on nonlinear smooth areas.
In a first aspect, an embodiment of the present invention provides a triangular mesh filtering method, including:
acquiring triangular mesh data to be filtered, and determining the surface normal direction of each triangular patch in the triangular mesh data;
traversing the triangular mesh data, carrying out weight distribution on the neighborhood triangular patches of each triangular patch, and updating the surface normal of each triangular patch based on a weight distribution result to obtain an updated surface normal after iterative updating of each triangular patch;
and carrying out iterative filtering on the positions of all the vertexes in the triangular mesh data according to the updating surface normal direction of each triangular patch to obtain the triangular mesh data after filtering.
In a second aspect, an embodiment of the present invention further provides a triangular mesh filtering apparatus, including:
the normal vector determining module is used for acquiring triangular mesh data to be filtered and determining the surface normal of each triangular patch in the triangular mesh data;
the normal vector updating module is used for traversing the triangular mesh data, carrying out weight distribution on the neighborhood triangular patches of each triangular patch, and updating the surface normal of each triangular patch based on a weight distribution result so as to obtain an updated surface normal after iterative updating of each triangular patch;
and the vertex position filtering module is used for carrying out iterative filtering on each vertex position in the triangular mesh data according to the updating surface normal direction of each triangular patch to obtain the triangular mesh data after filtering.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the triangular mesh filtering method according to any of the embodiments of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor implements a triangular mesh filtering method according to any embodiment of the present invention.
The embodiment of the invention carries out iterative updating on the surface normal direction of each triangular patch in the triangular mesh data, carries out iterative filtering on each vertex position of the triangular mesh data on the basis of updating the surface normal direction, effectively reserves boundary characteristics and details in the triangular mesh data and improves the stability of an algorithm. And when the normal direction of each triangular patch is subjected to iterative updating, the weight distribution is carried out on the neighborhood triangular patches of the triangular patch to be updated, the iterative updating is carried out on the normal direction of the triangular patch based on the weight distribution result, the sharp geometric features on the triangular mesh are recovered to the greatest extent, the recovery effect on the nonlinear smooth area is improved, and the quality of the triangular mesh after filtering is improved.
Drawings
FIG. 1 is a flowchart of a triangular mesh filtering method in a first embodiment of the present invention;
fig. 2 is a schematic structural diagram of a triangular mesh filtering device in a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device in a third embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Example 1
Fig. 1 is a flowchart of a triangular mesh filtering method in a first embodiment of the present invention, and the present embodiment is applicable to a case of removing noise from triangular mesh data. The method may be performed by a triangular mesh filtering apparatus, which may be implemented in software and/or hardware, and may be configured in an electronic device, for example, the electronic device may be a device with communication and computing capabilities, such as a background server. As shown in fig. 1, the method specifically includes:
and 101, acquiring triangular mesh data to be filtered, and determining the surface normal direction of each triangular patch in the triangular mesh data.
The method comprises the steps of scanning an object to be processed through scanning equipment to obtain initial point cloud data, and carrying out surface reconstruction algorithm on triangular mesh data to be filtered according to the initial point cloud data, wherein the generated triangular mesh data is composed of a plurality of triangular patches. The generation algorithm of the triangular mesh data is not limited in the embodiment of the invention. The triangle mesh data to be filtered can be imported through a three-dimensional algorithm library, and the imported triangle mesh data at least comprises vertex sets of all triangle patches in the triangle mesh data. The surface normal of the triangular surface patch is used for representing the direction of the triangular surface patch, and is determined according to the three vertex positions of the triangular surface patch.
Specifically, the noisy initial point cloud data obtained by the point cloud acquisition port is subjected to a surface reconstruction algorithm to obtain noisy triangular mesh data. And calculating the surface normal direction of each triangular surface patch according to the vertex position of each triangular surface patch in the triangular mesh data. Illustratively, the plane normal is obtained by cross-product and normalization operations of the triangular patches with two directions fixed in three vertices (typically right-handed anticlockwise), for example, by calculating the plane normal of the triangular patches by the following formula:
wherein ,nt Represents the surface normal of the t-th triangular patch in the triangular mesh data, (v) i ,v j ,v k ) Is the reverse direction of the right-hand system in the t-th triangular patchThree vertex positions arranged in the clockwise direction.
And 102, traversing the triangular mesh data, carrying out weight distribution on the neighborhood triangular patches of each triangular patch, and updating the surface normal of each triangular patch based on a weight distribution result to obtain an updated surface normal after iterative updating of each triangular patch.
Traversing triangular mesh data, taking any triangular patch as a target triangular patch, namely sequentially determining each triangular patch in the triangular mesh data as the target triangular patch, and updating the surface normal direction of the target triangular patch to perform iterative updating of the surface normal direction of all triangular patches in the triangular mesh data.
Specifically, in each iteration update, the triangular patches in the triangular mesh data are sequentially traversed, the triangular patches are determined to be target triangular patches, the surface normal of the target triangular patches is sequentially updated, and after one update of all triangular patches is completed, the next surface normal update iteration is performed based on the surface normal update result until the preset iteration update times are reached. In the embodiment of the present invention, the preset iteration update times may be set according to the actual situation of the triangular mesh data, and are not limited, for example, the normal update iteration times may be set to 5-20 times.
For the target triangular patches, the number of the neighborhood triangular patches is multiple, and the position relation between each neighborhood triangular patch and the target triangular patch is quite different in probability, so that the geometric characteristics contained between each neighborhood triangular patch and the target triangular patch are different. If the influence degree of the neighborhood triangular patches on the target triangular patches is updated according to a single fixed value, the position relationship between the updated target triangular patches and the neighborhood triangular patches is damaged, and sharp geometric features included in the target triangular patches are damaged.
Therefore, in the embodiment of the invention, the weight distribution is carried out on the neighborhood triangular patches of each triangular patch, and different weight values are set for different neighborhood triangular patches, so that the influence degree of different neighborhood triangular patches on the triangular patches to be processed is different when the surface normal update is carried out on the triangular patches to be processed, and the geometric features included in the triangular patches to be processed are protected.
In one possible embodiment, the weight allocation for the neighbor triangular patches of each triangular patch includes:
and based on the nonlinear structure model, carrying out weight distribution on the neighborhood triangular patches of each triangular patch.
Since a key issue in triangular mesh data filtering is to maximize protection of sharp features and restoration of non-linear smooth areas while removing noise. Therefore, anisotropy can be realized by carrying out weight distribution on the neighborhood triangular patches of each triangular patch based on the nonlinear structure model, and convergence speed can be increased when updating each triangular patch based on the neighborhood triangular patch of the nonlinear structure. Illustratively, the nonlinear structure model includes a sigmoid function model, that is, a weight value of each neighboring triangular patch in each triangular patch is determined based on a sigmoid function, and a degree of influence of the neighboring triangular patch on a normal plane of the triangular patch is determined based on the weight value.
In one possible embodiment, the nonlinear structural model comprises a sigmoid model based on a cosine trigonometric function;
wherein the sigmoid model is expressed by the following formula:
wherein ,a and b are preset parameters.
In the embodiment of the invention, a sigmoid model based on a cosine trigonometric function is used for determining the weight value of the neighborhood triangular patch of the triangular patch to be processed. The nonlinear structure defined in the sigmoid model based on the cosine trigonometric function can accelerate convergence speed, and the anisotropy can be realized by weight distribution based on the model, so that sharp geometric features in the adjacent areas of the triangular patches are protected, and nonlinear smooth areas are restored.
In the formula of the sigmoid model, a and b are preset parameters, the nonlinearity degree can be adjusted by adjusting the values of a and b, and the values of a and b can be set according to empirical values, so that the method is not limited; and x is the representation of the position relationship between the neighborhood triangular patch and the triangular patch to be processed, and can be determined by the surface normal directions of the neighborhood triangular patch and the triangular patch to be processed.
In one possible embodiment, the weights of the neighborhood triangular patches of each triangular patch are assigned by the following formula:
wherein ,wj The weight value of the j-th neighbor triangular patch of the triangular patch to be processed is represented,representation of sigmoid model based on cosine trigonometric function, n i Represents the surface normal direction of the triangular surface patch to be treated, n j Representing the surface normal of the jth neighborhood triangular patch.
Specifically, the weight value of the neighborhood triangular patch of the triangular patch to be processed is determined based on the following formula:
will beAs a representation of the positional relationship of the jth neighborhood triangular patch and the triangular patch to be processed.
In a possible embodiment, updating the surface normal of each triangular patch based on the weight distribution result to obtain an updated surface normal after iterative updating of each triangular patch includes:
the update surface normal is determined by the following formula:
wherein ,ni Representing the surface normal before updating the triangular surface patch to be processed, n' i Representing the update surface normal direction, w, of the triangular patch to be processed after update j And the weight value of the j-th neighborhood triangular patch of the triangular patches to be processed is represented, and N is the total number of the neighborhood triangular patches of the triangular patches to be processed.
After the weight value of the neighborhood triangular patch of the triangular patch to be processed is determined, the updating surface normal of the triangular patch to be processed is determined according to the weighted sum of the surface normal of the neighborhood triangular patch.
Specifically, weight values of neighbor triangular patches of the triangular patches in the triangular mesh data are sequentially determined, updated weight values of the triangular patches are determined according to weighted sum of the weight values of the neighbor triangular patches, the updating process is repeated for preset normal updating iteration times, and finally the final updating surface normal of the triangular patches in the triangular mesh data is obtained.
And 103, performing iterative filtering on the positions of all the vertexes in the triangular mesh data according to the updating surface normal direction of each triangular patch to obtain the triangular mesh data after filtering.
And on the basis of updating and smoothing the surface normal direction of each triangular surface patch, carrying out iterative filtering on each vertex position based on a vertex updating algorithm. The iteration number can be set in advance according to the actual condition of noise in the triangular mesh data, and is not limited herein, for example, the vertex update iteration number can be set to 5-20 times, and the vertex update iteration number can be increased according to requirements for large noise. In the embodiment of the invention, the surface normal of the triangular patch is updated and smoothed firstly, and then the vertex position is updated according to the updated surface normal, so that the boundary characteristics and details of triangular mesh data can be effectively reserved, and meanwhile, the stability of a filtering algorithm is improved.
In one possible embodiment, step 103 includes:
iterative filtering is performed on the positions of the vertexes in the triangular mesh data through the following formula:
wherein ,vi For the position before the filtration of the ith vertex to be filtered, v' i N is the filtered position of the ith peak to be filtered vi Representing the total number of neighbor triangular patches of the ith vertex to be filtered, n' j Updating surface normal direction of jth neighborhood triangular surface patch representing ith vertex to be filtered, c j Representing the center position of the jth neighborhood triangular patch.
And performing traversal filtering on each vertex position in the triangular mesh data according to the above, and performing the next filtering process on the basis of the vertex position obtained after the filtering of all vertex positions until the preset vertex updating iteration times are reached.
Specifically, in the traversal process, for the ith vertex to be filtered, judging whether the vertex is a boundary point in the triangular mesh data, if so, keeping the position of the vertex unchanged; and if the vertex position is not the boundary point, determining the filtered vertex position according to the vertex position filtering formula.
In one possible embodiment, the neighborhood triangular patch is a ring neighborhood triangular patch;
correspondingly, before the weight distribution is carried out on the neighborhood triangular patches of each triangular patch, the method further comprises the following steps:
and establishing an index relation between each triangular patch information and one ring of adjacent triangular patch information according to the topological relation among the triangular patches in the triangular mesh data, wherein the triangular patch information at least comprises vertex information and a surface normal of the triangular patches.
Because the surface normal direction information of the neighborhood triangular patches of each triangular patch needs to be determined in the surface normal direction iterative updating and vertex position iterative filtering processes, the updating surface normal direction of the neighborhood triangular patches of each vertex to be filtered and the vertex position information of the neighborhood triangular patches are determined. Therefore, in order to avoid redundant neighborhood searching operation, reduce the calculation amount and improve the algorithm efficiency, the neighborhood information of the vertex and the triangular patch is prestored in the embodiment of the invention.
For triangular patches and vertexes in triangular mesh data, the triangular patches and vertexes have a plurality of neighborhoods, and in the embodiment of the invention, one ring of neighborhood triangular patches of the triangular patches are used as neighborhood triangular patches, so that the interference of other neighborhood triangular patches on the updating process is avoided.
The topological relation among the triangular patches is acquired according to the triangular mesh data, namely, when the triangular mesh data is acquired, a vertex set and a topological structure among the vertexes, the edges and the triangular patches are included. According to the topology, an index sequence of a ring neighborhood vertex and a ring neighborhood triangular patch of each vertex is calculated and stored. When the neighborhood triangular patch of the triangular patch to be processed is determined, a ring neighborhood triangular patch of the triangular patch to be processed can be determined according to the vertex of the triangular patch to be processed.
The embodiment of the invention carries out iterative updating on the surface normal direction of each triangular patch in the triangular mesh data, carries out iterative filtering on each vertex position of the triangular mesh data on the basis of updating the surface normal direction, effectively reserves boundary characteristics and details in the triangular mesh data and improves the stability of an algorithm. And when the normal direction of each triangular patch is subjected to iterative updating, the weight distribution is carried out on the neighborhood triangular patches of the triangular patch to be updated, the iterative updating is carried out on the normal direction of the triangular patch based on the weight distribution result, the sharp geometric features on the triangular mesh are recovered to the greatest extent, the recovery effect on the nonlinear smooth area is improved, and the quality of the triangular mesh after filtering is improved.
Example two
Fig. 2 is a schematic structural diagram of a triangular mesh filtering apparatus in a second embodiment of the present invention, and the present embodiment is applicable to a case of removing noise from triangular mesh data. As shown in fig. 2, the apparatus includes:
the normal vector determining module 210 is configured to obtain triangular mesh data to be filtered, and determine a surface normal of each triangular patch in the triangular mesh data;
the normal vector updating module 220 is configured to traverse the triangular mesh data, perform weight distribution on a neighboring triangular patch of each triangular patch, and update a surface normal of each triangular patch based on a weight distribution result, so as to obtain an updated surface normal after iterative update of each triangular patch;
and the vertex position filtering module 230 is configured to perform iterative filtering on each vertex position in the triangular mesh data according to the update surface normal direction of each triangular patch, so as to obtain filtered triangular mesh data.
The embodiment of the invention carries out iterative updating on the surface normal direction of each triangular patch in the triangular mesh data, carries out iterative filtering on each vertex position of the triangular mesh data on the basis of updating the surface normal direction, effectively reserves boundary characteristics and details in the triangular mesh data and improves the stability of an algorithm. And when the normal direction of each triangular patch is subjected to iterative updating, the weight distribution is carried out on the neighborhood triangular patches of the triangular patch to be updated, the iterative updating is carried out on the normal direction of the triangular patch based on the weight distribution result, the sharp geometric features on the triangular mesh are recovered to the greatest extent, the recovery effect on the nonlinear smooth area is improved, and the quality of the triangular mesh after filtering is improved.
Optionally, the normal vector updating module includes a neighborhood weight allocation unit, configured to:
and based on the nonlinear structure model, carrying out weight distribution on the neighborhood triangular patches of each triangular patch.
Optionally, the nonlinear structure model includes a sigmoid model based on a cosine trigonometric function;
wherein the sigmoid model is expressed by the following formula:
wherein ,a and b are preset parameters.
Optionally, the weights of the neighbor triangular patches of each triangular patch are assigned by the following formula:
wherein ,wj The weight value of the j-th neighbor triangular patch of the triangular patch to be processed is represented,representation of sigmoid model based on cosine trigonometric function, n i Represents the surface normal direction of the triangular surface patch to be treated, n j Representing the surface normal of the jth neighborhood triangular patch.
Optionally, the normal vector updating module is specifically configured to:
the update surface normal is determined by the following formula:
wherein ,ni Representing the surface normal before updating the triangular surface patch to be processed, n' i Representing the update surface normal direction, w, of the triangular patch to be processed after update j And the weight value of the j-th neighborhood triangular patch of the triangular patches to be processed is represented, and N is the total number of the neighborhood triangular patches of the triangular patches to be processed.
Optionally, the vertex position filtering module includes:
iterative filtering is performed on each vertex position in the triangular mesh data through the following formula:
wherein ,vi For the position before the filtration of the ith vertex to be filtered, v' i N is the filtered position of the ith peak to be filtered vi Representing the total number of neighbor triangular patches of the ith vertex to be filtered, n' j The jth neighborhood representing the ith vertex to be filteredUpdating surface normal direction of triangular surface patch, c j And representing the central position of the jth neighborhood triangular patch.
Optionally, the neighborhood triangular patch is a ring neighborhood triangular patch;
correspondingly, the device further comprises an index relation establishing module, which is used for establishing an index relation between each triangular patch information and one ring of adjacent triangular patch information according to the topological relation among the triangular patches in the triangular mesh data before the weight distribution is carried out on the adjacent triangular patches of each triangular patch, wherein the triangular patch information at least comprises vertex information and a surface normal of the triangular patches.
The triangular mesh filtering device provided by the embodiment of the invention can execute the triangular mesh filtering method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the triangular mesh filtering method.
Example III
Fig. 3 is a schematic structural diagram of an electronic device according to a third embodiment of the present invention. Fig. 3 illustrates a block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention. The electronic device 12 shown in fig. 3 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 3, the electronic device 12 is in the form of a general purpose computing device. Components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory device 28, a bus 18 that connects the various system components, including the system memory device 28 and the processing unit 16.
Bus 18 represents one or more of several types of bus structures, including a memory device bus or memory device controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 12 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by electronic device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system storage 28 may include computer system readable media in the form of volatile memory such as Random Access Memory (RAM) 30 and/or cache memory 32. The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 3, commonly referred to as a "hard disk drive"). Although not shown in fig. 3, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 18 through one or more data medium interfaces. The storage device 28 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of the embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in storage 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 42 generally perform the functions and/or methods of the embodiments described herein.
The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the device 12, and/or any devices (e.g., network card, modem, etc.) that enable the device 12 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 22. Also, the electronic device 12 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through a network adapter 20. As shown in fig. 3, the network adapter 20 communicates with other modules of the electronic device 12 over the bus 18. It should be appreciated that although not shown in fig. 3, other hardware and/or software modules may be used in connection with electronic device 12, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processing unit 16 executes various functional applications and data processing by running a program stored in the system storage device 28, for example, implementing the triangular mesh filtering method provided by the embodiment of the present invention, including:
acquiring triangular mesh data to be filtered, and determining the surface normal direction of each triangular patch in the triangular mesh data;
traversing the triangular mesh data, carrying out weight distribution on the neighborhood triangular patches of each triangular patch, and updating the surface normal of each triangular patch based on a weight distribution result to obtain an updated surface normal after iterative updating of each triangular patch;
and carrying out iterative filtering on the positions of all the vertexes in the triangular mesh data according to the updating surface normal direction of each triangular patch to obtain the triangular mesh data after filtering.
Example IV
The fourth embodiment of the present invention also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the triangular mesh filtering method as provided by the embodiment of the present invention, including:
acquiring triangular mesh data to be filtered, and determining the surface normal direction of each triangular patch in the triangular mesh data;
traversing the triangular mesh data, carrying out weight distribution on the neighborhood triangular patches of each triangular patch, and updating the surface normal of each triangular patch based on a weight distribution result to obtain an updated surface normal after iterative updating of each triangular patch;
and carrying out iterative filtering on the positions of all the vertexes in the triangular mesh data according to the updating surface normal direction of each triangular patch to obtain the triangular mesh data after filtering.
The computer storage media of embodiments of the invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present invention may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (8)

1. A triangular mesh filtering method, comprising:
acquiring triangular mesh data to be filtered, and determining the surface normal direction of each triangular patch in the triangular mesh data;
traversing the triangular mesh data, carrying out weight distribution on the neighborhood triangular patches of each triangular patch, and updating the surface normal of each triangular patch based on a weight distribution result to obtain an updated surface normal after iterative updating of each triangular patch;
performing iterative filtering on each vertex position in the triangular mesh data according to the updating surface normal direction of each triangular patch to obtain filtered triangular mesh data;
wherein the neighborhood triangular patches are ring neighborhood triangular patches;
correspondingly, before the weight distribution is carried out on the neighborhood triangular patches of each triangular patch, the method further comprises the following steps:
establishing an index relation between each triangular patch information and one ring of adjacent triangular patch information according to the topological relation among the triangular patches in the triangular mesh data, wherein the triangular patch information at least comprises vertex information and a surface normal of the triangular patches;
the weights of the neighborhood triangular patches of each triangular patch are distributed according to the following formula:
wherein ,wj The weight value of the j-th neighbor triangular patch of the triangular patch to be processed is represented,representation of sigmoid model based on cosine trigonometric function, n i Representing the surface normal direction before updating the triangular surface patch to be processed, n j Representing the surface normal of the jth neighborhood triangular patch.
2. The method of claim 1, wherein assigning weights to neighboring triangular patches of each triangular patch comprises:
and based on the nonlinear structure model, carrying out weight distribution on the neighborhood triangular patches of each triangular patch.
3. The method of claim 2, wherein the nonlinear structure model comprises a sigmoid model based on a cosine trigonometric function;
wherein the sigmoid model is expressed by the following formula:
wherein ,a and b are preset parameters.
4. The method of claim 1, wherein updating the surface normal of each triangular patch based on the weight distribution result to obtain an updated surface normal of each triangular patch after iterative updating comprises:
the update surface normal is determined by the following formula:
wherein ,ni Representing the update surface normal direction, w, of the triangular patch to be processed after update j And the weight value of the j-th neighborhood triangular patch of the triangular patches to be processed is represented, and N is the total number of the neighborhood triangular patches of the triangular patches to be processed.
5. The method of claim 1, wherein iteratively filtering each vertex position in the triangular mesh data according to an update plane normal of each triangular patch comprises:
iterative filtering is performed on each vertex position in the triangular mesh data through the following formula:
wherein ,vi V for the position before filtering of the ith vertex to be filtered i N is the filtered position of the ith peak to be filtered vi Representing the total number of neighbor triangular patches of the ith vertex to be filtered, n j Representing the ith waitUpdating surface normal direction of jth neighborhood triangular patch of filtering vertex, c j And representing the central position of the jth neighborhood triangular patch.
6. A triangular mesh filtering apparatus, comprising:
the normal vector determining module is used for acquiring triangular mesh data to be filtered and determining the surface normal of each triangular patch in the triangular mesh data;
the normal vector updating module is used for traversing the triangular mesh data, carrying out weight distribution on the neighborhood triangular patches of each triangular patch, and updating the surface normal of each triangular patch based on a weight distribution result so as to obtain an updated surface normal after iterative updating of each triangular patch;
the vertex position filtering module is used for carrying out iterative filtering on each vertex position in the triangular mesh data according to the updating surface normal direction of each triangular patch to obtain filtered triangular mesh data;
wherein the neighborhood triangular patches are ring neighborhood triangular patches;
correspondingly, the device further comprises an index relation establishing module, which is used for establishing an index relation between each triangular patch information and one ring of adjacent triangular patch information according to the topological relation among the triangular patches in the triangular mesh data before the weight distribution is carried out on the adjacent triangular patches of each triangular patch, wherein the triangular patch information at least comprises vertex information and a surface normal of the triangular patches;
the weights of the neighborhood triangular patches of each triangular patch are distributed according to the following formula:
wherein ,wj The weight value of the j-th neighbor triangular patch of the triangular patch to be processed is represented,representation ofSigmoid model based on cosine trigonometric function, n i Representing the surface normal direction before updating the triangular surface patch to be processed, n j Representing the surface normal of the jth neighborhood triangular patch.
7. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the triangular mesh filtering method of any of claims 1-5.
8. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the triangular mesh filtering method according to any one of claims 1-5.
CN202110563560.8A 2021-05-24 2021-05-24 Triangular mesh filtering method, triangular mesh filtering device, electronic equipment and storage medium Active CN113178013B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110563560.8A CN113178013B (en) 2021-05-24 2021-05-24 Triangular mesh filtering method, triangular mesh filtering device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110563560.8A CN113178013B (en) 2021-05-24 2021-05-24 Triangular mesh filtering method, triangular mesh filtering device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113178013A CN113178013A (en) 2021-07-27
CN113178013B true CN113178013B (en) 2023-10-03

Family

ID=76929711

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110563560.8A Active CN113178013B (en) 2021-05-24 2021-05-24 Triangular mesh filtering method, triangular mesh filtering device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113178013B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113706431B (en) * 2021-08-26 2022-10-21 深圳市慧鲤科技有限公司 Model optimization method and related device, electronic equipment and storage medium
CN115409950B (en) * 2022-10-09 2024-02-06 卡本(深圳)医疗器械有限公司 Optimization method for surface drawing triangular mesh

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8830235B1 (en) * 1999-09-13 2014-09-09 Alcatel Lucent Non-uniform relaxation procedure for multiresolution mesh processing
CN106780697A (en) * 2016-12-07 2017-05-31 珠海金山网络游戏科技有限公司 It is a kind of based on normal direction, geometry, uv factors lattice simplified method
CN107341768A (en) * 2016-04-29 2017-11-10 微软技术许可有限责任公司 Grid noise reduction
CN108492370A (en) * 2018-03-02 2018-09-04 中国地质大学(武汉) Triangle gridding filtering method based on TV and anisotropy Laplacian regular terms
CN109242972A (en) * 2018-08-14 2019-01-18 重庆大学 A kind of double normal mesh model method for fairing based on apex feature
CN110120069A (en) * 2019-03-26 2019-08-13 深圳大学 Triangle gridding filtering method and terminal device based on Laplace operator

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8830235B1 (en) * 1999-09-13 2014-09-09 Alcatel Lucent Non-uniform relaxation procedure for multiresolution mesh processing
CN107341768A (en) * 2016-04-29 2017-11-10 微软技术许可有限责任公司 Grid noise reduction
CN106780697A (en) * 2016-12-07 2017-05-31 珠海金山网络游戏科技有限公司 It is a kind of based on normal direction, geometry, uv factors lattice simplified method
CN108492370A (en) * 2018-03-02 2018-09-04 中国地质大学(武汉) Triangle gridding filtering method based on TV and anisotropy Laplacian regular terms
CN109242972A (en) * 2018-08-14 2019-01-18 重庆大学 A kind of double normal mesh model method for fairing based on apex feature
CN110120069A (en) * 2019-03-26 2019-08-13 深圳大学 Triangle gridding filtering method and terminal device based on Laplace operator

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于引导法向滤波的三角网格去噪算法;张王宇;《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》;20170115;第3章第25-31页 *
李智琦 ; 毛心怡 ; 汪俊 ; 魏明强 ; 郭延文 ; .保持特征的三角网格曲面去噪技术综述与展望.计算机辅助设计与图形学学报.2020,(01),第4-18页. *

Also Published As

Publication number Publication date
CN113178013A (en) 2021-07-27

Similar Documents

Publication Publication Date Title
CN113178013B (en) Triangular mesh filtering method, triangular mesh filtering device, electronic equipment and storage medium
CN109118542B (en) Calibration method, device, equipment and storage medium between laser radar and camera
CN110222703B (en) Image contour recognition method, device, equipment and medium
CN114842123B (en) Three-dimensional face reconstruction model training and three-dimensional face image generation method and device
CN112668588B (en) Parking space information generation method, device, equipment and computer readable medium
CN111553215A (en) Personnel association method and device, and graph convolution network training method and device
JP2022045893A (en) Mesh noise removing method based on graph convolution network
WO2023154006A2 (en) Method and system for a high-frequency attention network for efficient single image super-resolution
Xi et al. Super resolution reconstruction algorithm of video image based on deep self encoding learning
CN113205090B (en) Picture correction method, device, electronic equipment and computer readable storage medium
CN112446231A (en) Pedestrian crossing detection method and device, computer equipment and storage medium
CN111429450B (en) Corner point detection method, system, equipment and storage medium
CN113781653B (en) Object model generation method and device, electronic equipment and storage medium
CN113688928B (en) Image matching method and device, electronic equipment and computer readable medium
CN113554057B (en) Graph segmentation method and device and electronic equipment
CN110335205B (en) Landform smoothing method and device, computer equipment and storage medium
CN108197536B (en) Image processing method and device, computer device and readable storage medium
CN112465692A (en) Image processing method, device, equipment and storage medium
CN116030192B (en) Bone segment pretreatment method and device based on dynamic characteristics
CN112446946A (en) Depth reconstruction method, system, device and medium based on sparse depth and boundary
CN112053300B (en) Correction method, device and equipment for illumination non-uniform image
CN115661802A (en) Recognition method and system based on OCR technology
CN114299233A (en) Method and device for extracting slope unit, electronic equipment and storage medium
CN117974939A (en) Grid model simplification method and device and related equipment
CN112907594A (en) Non-target object auxiliary separation method and system, medical robot and storage medium

Legal Events

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