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

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

Info

Publication number
CN113178013A
CN113178013A CN202110563560.8A CN202110563560A CN113178013A CN 113178013 A CN113178013 A CN 113178013A CN 202110563560 A CN202110563560 A CN 202110563560A CN 113178013 A CN113178013 A CN 113178013A
Authority
CN
China
Prior art keywords
triangular
patch
neighborhood
patches
triangular patch
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110563560.8A
Other languages
Chinese (zh)
Other versions
CN113178013B (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

Images

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 grid data to be filtered, and determining the surface normal direction of each triangular patch in the triangular grid data; traversing the triangular grid data, performing weight distribution on the neighborhood triangular patches of the triangular patches, and updating the normal directions of the triangular patches based on the weight distribution result to obtain updated normal directions after the triangular patches are updated iteratively; and carrying out iterative filtering on each vertex position in the triangular mesh data according to the normal direction of the updating surface of each triangular patch to obtain the filtered triangular mesh data. The embodiment of the invention improves the quality of the triangular mesh after filtering, recovers sharp geometric characteristics on the triangular mesh and simultaneously improves the recovery effect on a nonlinear smooth area.

Description

Triangular mesh filtering method and 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 and device, electronic equipment and a storage medium.
Background
With the wide application of three-dimensional scanning data in the fields of industrial detection, target recognition, artificial intelligence VR (Virtual Reality)/AR (Augmented Reality), and the like, it is of great significance to improve the quality of the three-dimensional scanning data. The initial point cloud data obtained by three-dimensional scanning generally has huge storage capacity and is inconvenient for surface calculation, and a triangular mesh model obtained by surface reconstruction is the simplest and most common data.
In the scanning and surface reconstruction process, the triangular mesh model is polluted by noise, the noise can reduce the visual quality of the triangular mesh model, and the subsequent processing effect on the triangular mesh model can be influenced, so that the effect of a three-dimensional scanning image is influenced.
In the prior art, a linear model is used for filtering a triangular mesh model, but the linear model is easy to destroy sharp geometric characteristics in the triangular mesh model while removing noise, and has the defects that a nonlinear smooth region cannot be recovered 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, restore sharp geometric features on the triangular mesh to the maximum extent and improve the restoring effect on a nonlinear smooth area.
In a first aspect, an embodiment of the present invention provides a triangular mesh filtering method, including:
acquiring triangular grid data to be filtered, and determining the surface normal direction of each triangular patch in the triangular grid data;
traversing the triangular grid data, performing weight distribution on the neighborhood triangular patches of the triangular patches, and updating the normal directions of the triangular patches based on the weight distribution result to obtain updated normal directions after the triangular patches are updated iteratively;
and carrying out iterative filtering on each vertex position in the triangular mesh data according to the normal direction of the updating surface of each triangular patch to obtain the filtered triangular mesh data.
In a second aspect, an embodiment of the present invention further provides a triangular mesh filtering apparatus, including:
the normal vector determination module is used for acquiring triangular grid data to be filtered and determining the surface normal direction of each triangular patch in the triangular grid data;
the normal vector updating module is used for traversing the triangular grid data, performing weight distribution on a neighborhood triangular patch of each triangular patch, and updating the normal direction of each triangular patch based on a weight distribution result so as to obtain an updated normal direction after each triangular patch is updated iteratively;
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 of each triangular patch to obtain the filtered triangular mesh data.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method of triangular mesh filtering as described in any of the embodiments of the invention.
In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the triangular mesh filtering method according to any embodiment of the present invention.
The embodiment of the invention iteratively updates the surface normal of each triangular patch in the triangular mesh data, and iteratively filters each vertex position of the triangular mesh data on the basis of updating the surface normal, thereby effectively retaining the boundary characteristics and details in the triangular mesh data and improving the stability of the algorithm. Moreover, when the face normal direction of each triangular patch is updated in an iterative manner, the weight distribution is carried out on the neighborhood triangular patch of the triangular patch to be updated, the face normal direction is updated in an iterative manner based on the weight distribution result, the sharp geometric characteristics on the triangular mesh are recovered to the maximum 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 flow chart of a triangular mesh filtering method according to a first embodiment of the present invention;
fig. 2 is a schematic structural diagram of a triangular mesh filtering apparatus according to 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 present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a triangular mesh filtering method according to a first embodiment of the present invention, which 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:
step 101, triangular grid data to be filtered are obtained, and the surface normal direction of each triangular patch in the triangular grid data is determined.
The method comprises the steps that initial point cloud data are obtained after an object to be processed is scanned through scanning equipment, triangular mesh data to be filtered are generated through a surface reconstruction algorithm according to the initial point cloud data, and the generated triangular mesh data are composed of a plurality of triangular patches. The generation algorithm of the triangular mesh data is not limited in the embodiment of the present invention. For example, the triangular mesh data to be filtered may also be imported through a three-dimensional algorithm library, where the imported triangular mesh data at least includes a vertex set of each triangular patch in the triangular mesh data. The normal direction of the triangular patch is used for representing the direction of the triangular patch, and the normal direction of the triangular patch is determined according to the positions of three vertexes of the triangular patch.
Specifically, after the initial point cloud data with noise obtained by the point cloud acquisition port is subjected to a surface reconstruction algorithm, triangular mesh data with noise is obtained. And calculating the surface normal direction of each triangular patch according to the vertex position of each triangular patch in the triangular grid data. Illustratively, the normal direction is obtained by cross product and normalization operations of two fixed directions (usually counterclockwise in the right-handed system) among three vertices in a triangular patch, for example, the normal direction of the triangular patch is calculated by the following formula:
Figure BDA0003079995780000041
wherein ,ntRepresenting the face normal of the t-th triangular patch in the triangular mesh data, (v)i,vj,vk) Three vertex positions arranged counterclockwise in the right-hand system in the t-th triangular patch.
And 102, traversing the triangular grid data, performing weight distribution on the neighborhood triangular patches of the triangular patches, and updating the normal directions of the triangular patches based on the weight distribution result to obtain updated normal directions after the triangular patches are updated iteratively.
Traversing the triangular mesh data, arbitrarily selecting one triangular patch as a target triangular patch, namely sequentially determining each triangular patch in the triangular mesh data as the target triangular patch, and performing face normal updating on the target triangular patch so as to perform face normal iterative updating on all the triangular patches in the triangular mesh data.
Specifically, in each iteration updating, the triangular patches in the triangular mesh data are sequentially traversed, the triangular patches are determined to be target triangular patches, the normal updating of the target triangular patches is sequentially performed, and after one updating of all the triangular patches is completed, the next normal updating iteration is performed based on the normal updating result until the preset iteration updating 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 to 20 times.
For the target triangular patch, a plurality of neighborhood triangular patches are provided, and the position relationship between each neighborhood triangular patch and the target triangular patch is not completely the same with a high probability, so that the geometric characteristics contained between each neighborhood triangular patch and the target triangular patch are also different. If the influence degree of the neighborhood triangular patch on the target triangular patch is updated in the normal direction according to a single fixed value, the position relation between the updated target triangular patch and the neighborhood triangular patch can be damaged, and then the sharp geometric features included in the target triangular patch are damaged.
Therefore, in the embodiment of the present invention, the weight distribution is performed on the neighborhood triangular patches of each triangular patch, and different weight values are set for different neighborhood triangular patches, so that when the triangle patch to be processed is subjected to the surface normal update, different neighborhood triangular patches have different degrees of influence on the triangle patch to be processed, and the geometric features included in the triangle patch to be processed are protected.
In one possible embodiment, the assigning weights to the neighborhood triangular patches of each triangular patch includes:
and based on the nonlinear structure model, carrying out weight distribution on the neighborhood triangular patches of all the triangular patches.
Since the key problem in triangular mesh data filtering is to remove noise while protecting sharp features to the maximum extent and restoring nonlinear smooth regions. Therefore, anisotropy can be realized by performing weight distribution on the neighborhood triangular patches of the triangular patches based on the nonlinear structure model, and the convergence speed can be accelerated when the neighborhood triangular patches based on the nonlinear structure update the triangular patches. Illustratively, the nonlinear structure model includes a sigmoid function model, that is, based on the sigmoid function, a weight value of each of the neighborhood triangular patches in each of the triangular patches is determined, and based on the weight value, a degree of influence of the neighborhood triangular patch on a normal direction of the triangular patch is determined.
In one possible embodiment, the nonlinear structural model comprises a sigmoid model based on a cosine trigonometric function;
wherein the sigmoid model is represented by the following formula:
Figure BDA0003079995780000061
wherein ,
Figure BDA0003079995780000062
a and b are preset parameters.
In the embodiment of the invention, the sigmoid model based on the cosine trigonometric function determines 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 the convergence speed, and the anisotropy can be realized by carrying out weight distribution based on the model, thereby protecting the sharp geometric characteristics in the neighborhood of each triangular surface and recovering the nonlinear smooth region.
In the formula of the sigmoid model, a and b are preset parameters, the nonlinear 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, which is not limited herein; and x is a 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 of the neighborhood triangular patch and the triangular patch to be processed.
In one possible embodiment, the weights of the neighbor triangular patches of each triangular patch are assigned by the following formula:
Figure BDA0003079995780000071
wherein ,wjRepresenting the weight value of the jth neighbor triangular patch of the triangular patch to be processed,
Figure BDA0003079995780000072
representing sigmoid models based on cosine trigonometric functions, niRepresenting the normal, n, of the triangular patch to be processedjRepresenting the face normal of the jth neighborhood triangle patch.
Specifically, the weight value of the neighborhood triangular patch of the triangular patch to be processed is determined based on the following formula:
Figure BDA0003079995780000073
will be provided with
Figure BDA0003079995780000074
And representing the position relation of the jth neighborhood triangular patch and the triangular patch to be processed.
In a possible embodiment, updating the normal direction of each triangular patch based on the weight assignment result to obtain an updated normal direction after each triangular patch is iteratively updated, includes:
the updated surface normal is determined by the following formula:
Figure BDA0003079995780000075
wherein ,niDenotes the face normal direction, n 'before the update of the triangular face sheet to be processed'iRepresenting the normal direction, w, of the updated triangular patch to be processedjAnd representing the weight value of the jth neighborhood triangular patch of the triangular patch to be processed, wherein N is the total number of the neighborhood triangular patches of the triangular patch to be processed.
And after determining the weight value of the neighborhood triangular patch of the triangular patch to be processed, determining the updated surface normal direction of the triangular patch to be processed according to the weighted sum of the surface normal directions of the neighborhood triangular patches.
Specifically, the weight values of the neighborhood triangular patches of each triangular patch in the triangular grid data are sequentially determined, the update weight values of each triangular patch are determined according to the weighted sum of the weight values of the neighborhood triangular patches, the updating process is repeated for preset normal update iteration times, and finally the final update surface normal direction of each triangular patch in the triangular grid data is obtained.
And 103, performing iterative filtering on each vertex position in the triangular mesh data according to the updating surface normal of each triangular patch to obtain filtered triangular mesh data.
And performing iterative filtering on the positions of the vertexes based on a vertex updating algorithm on the basis of updating and smoothing the normal direction of each triangular patch. The iteration number may be set in advance according to the actual situation of noise in the triangular mesh data, and is not limited herein, for example, the vertex update iteration number may be set to 5-20, and the vertex update iteration number may be increased according to the requirement for large noise. In the embodiment of the invention, the surface normal of the triangular patch is updated smoothly, and then the vertex position is updated according to the updated surface normal, so that the boundary characteristics and details of the triangular mesh data can be effectively reserved, and the stability of the filtering algorithm is improved.
In one possible embodiment, step 103 includes:
iteratively filtering each vertex position in the triangular mesh data by:
Figure BDA0003079995780000081
wherein ,viIs the position before the ith vertex to be filtered is filtered, v'iFor the ith vertex to be filtered, NviRepresenting the total number n 'of neighborhood triangular patches of the ith vertex to be filtered'jThe updated surface normal direction, c, of the jth neighborhood triangular patch representing the ith vertex to be filteredjRepresenting the center position of the jth neighborhood triangle patch.
And traversing and filtering each vertex position in the triangular grid data according to the above, and after filtering of all vertex positions is completed, performing the next round of filtering process on the basis of the vertex position obtained after the filtering until the preset vertex updating iteration times are reached.
Specifically, in the traversal process, for the ith vertex to be filtered, whether the vertex is a boundary point in the triangular grid data is judged firstly, and if the vertex is the boundary point, the position of the vertex is 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 performed on the neighborhood triangular patch of each triangular patch, the method further includes:
and establishing an index relationship between information of each triangular patch and information of a ring neighborhood triangular patch according to a topological relationship between the triangular patches in the triangular grid data, wherein the information of the triangular patches at least comprises vertex information and a normal direction of the triangular patches.
The method comprises the steps of determining the face normal information of a neighborhood triangular patch of each triangular patch in the face normal iterative updating and vertex position iterative filtering process, and determining the updated face normal of the neighborhood triangular patch of each vertex to be filtered and the vertex position information of the neighborhood triangular patch. Therefore, in order to avoid redundant neighborhood search operations, reduce the amount of computation, and improve the algorithm efficiency, the neighborhood information of the vertex and the triangular patch is pre-stored in the embodiment of the invention.
For a triangular patch and a vertex in the triangular grid data, the triangular patch and the vertex have a plurality of neighborhoods, in the embodiment of the invention, a ring of neighborhood triangular patches of the triangular patch are taken as the neighborhood triangular patches, and the interference of other neighborhood triangular patches to the updating process is avoided.
The topological relation among the triangular patches is obtained according to the triangular mesh data, namely when the triangular mesh data is obtained, a vertex set and a topological structure among the vertices, edges and the triangular patches are included. And calculating and storing index sequences of a ring neighborhood vertex and a ring neighborhood triangular patch of each vertex according to the topological structure. When a neighborhood triangular patch of the triangular patch to be processed is determined, an annular 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 iteratively updates the surface normal of each triangular patch in the triangular mesh data, and iteratively filters each vertex position of the triangular mesh data on the basis of updating the surface normal, thereby effectively retaining the boundary characteristics and details in the triangular mesh data and improving the stability of the algorithm. Moreover, when the face normal direction of each triangular patch is updated in an iterative manner, the weight distribution is carried out on the neighborhood triangular patch of the triangular patch to be updated, the face normal direction is updated in an iterative manner based on the weight distribution result, the sharp geometric characteristics on the triangular mesh are recovered to the maximum 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 according to a second embodiment of the present invention, which is applicable to the case of removing noise from triangular mesh data. As shown in fig. 2, the apparatus includes:
a normal vector determination module 210, configured to obtain triangular mesh data to be filtered, and determine a surface normal direction of each triangular patch in the triangular mesh data;
a normal vector updating module 220, configured to traverse the triangular mesh data, perform weight distribution on a neighborhood triangular patch of each triangular patch, and update a normal direction of each triangular patch based on a weight distribution result, so as to obtain an updated normal direction after each triangular patch is iteratively updated;
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 of each triangular patch, so as to obtain filtered triangular mesh data.
The embodiment of the invention iteratively updates the surface normal of each triangular patch in the triangular mesh data, and iteratively filters each vertex position of the triangular mesh data on the basis of updating the surface normal, thereby effectively retaining the boundary characteristics and details in the triangular mesh data and improving the stability of the algorithm. Moreover, when the face normal direction of each triangular patch is updated in an iterative manner, the weight distribution is carried out on the neighborhood triangular patch of the triangular patch to be updated, the face normal direction is updated in an iterative manner based on the weight distribution result, the sharp geometric characteristics on the triangular mesh are recovered to the maximum 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 allocating unit, configured to:
and based on the nonlinear structure model, carrying out weight distribution on the neighborhood triangular patches of all the triangular patches.
Optionally, the nonlinear structure model includes a sigmoid model based on a cosine trigonometric function;
wherein the sigmoid model is represented by the following formula:
Figure BDA0003079995780000111
wherein ,
Figure BDA0003079995780000112
a and b are preset parameters.
Optionally, the weight of the neighborhood triangular patch of each triangular patch is distributed by the following formula:
Figure BDA0003079995780000113
wherein ,wjRepresenting the weight value of the jth neighbor triangular patch of the triangular patch to be processed,
Figure BDA0003079995780000114
representing sigmoid models based on cosine trigonometric functions, niRepresenting the normal, n, of the triangular patch to be processedjRepresenting the face normal of the jth neighborhood triangle patch.
Optionally, the normal vector updating module is specifically configured to:
the updated surface normal is determined by the following formula:
Figure BDA0003079995780000115
wherein ,niDenotes the face normal direction, n 'before the update of the triangular face sheet to be processed'iRepresenting the normal direction, w, of the updated triangular patch to be processedjAnd representing the weight value of the jth neighborhood triangular patch of the triangular patch to be processed, wherein N is the total number of the neighborhood triangular patches of the triangular patch to be processed.
Optionally, the vertex position filtering module includes:
iteratively filtering each vertex position in the triangular mesh data by:
Figure BDA0003079995780000121
wherein ,viIs the position before the ith vertex to be filtered is filtered, v'iFor the ith vertex to be filtered, NviRepresenting the total number n 'of neighborhood triangular patches of the ith vertex to be filtered'jThe updated surface normal direction, c, of the jth neighborhood triangular patch representing the ith vertex to be filteredjRepresenting the center 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 relationship establishing module, which is used for establishing the index relationship between the information of each triangular patch and the information of a ring of neighborhood triangular patches according to the topological relationship between the triangular patches in the triangular grid data before the weight distribution is carried out on the neighborhood triangular patches of the triangular patches, wherein the information of the triangular patches at least comprises the vertex information and the normal direction 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 corresponding functional modules and beneficial effects for 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 only an example and should not bring any limitations to the function and scope of use of the embodiments of the present invention.
As shown in FIG. 3, electronic device 12 is embodied in the form of a general purpose computing device. The components of electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory device 28, and a bus 18 that couples various system components including the system memory device 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory device bus or memory device controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, 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 may 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 storage, such as Random Access Memory (RAM)30 and/or cache storage 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 and write to non-removable, nonvolatile magnetic media (not shown in FIG. 3, and commonly referred to as a "hard drive"). Although not shown in FIG. 3, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Storage 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of 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 of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with device 12, and/or with any devices (e.g., network card, modem, etc.) that enable device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the electronic device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via the network adapter 20. As shown in FIG. 3, the network adapter 20 communicates with the other modules of the electronic device 12 via the bus 18. It should be appreciated that although not shown in FIG. 3, other hardware and/or software modules may be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing by executing programs stored in the system storage device 28, for example, to implement the triangular mesh filtering method provided by the embodiment of the present invention, including:
acquiring triangular grid data to be filtered, and determining the surface normal direction of each triangular patch in the triangular grid data;
traversing the triangular grid data, performing weight distribution on the neighborhood triangular patches of the triangular patches, and updating the normal directions of the triangular patches based on the weight distribution result to obtain updated normal directions after the triangular patches are updated iteratively;
and carrying out iterative filtering on each vertex position in the triangular mesh data according to the normal direction of the updating surface of each triangular patch to obtain the filtered triangular mesh data.
Example four
The fourth embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the triangular mesh filtering method provided in the fourth embodiment of the present invention, where the computer program includes:
acquiring triangular grid data to be filtered, and determining the surface normal direction of each triangular patch in the triangular grid data;
traversing the triangular grid data, performing weight distribution on the neighborhood triangular patches of the triangular patches, and updating the normal directions of the triangular patches based on the weight distribution result to obtain updated normal directions after the triangular patches are updated iteratively;
and carrying out iterative filtering on each vertex position in the triangular mesh data according to the normal direction of the updating surface of each triangular patch to obtain the filtered triangular mesh data.
Computer storage media for embodiments of the invention may employ 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. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination 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 the context of 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.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. 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 for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or the like, as well as 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 type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. 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, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method of triangular mesh filtering, comprising:
acquiring triangular grid data to be filtered, and determining the surface normal direction of each triangular patch in the triangular grid data;
traversing the triangular grid data, performing weight distribution on the neighborhood triangular patches of the triangular patches, and updating the normal directions of the triangular patches based on the weight distribution result to obtain updated normal directions after the triangular patches are updated iteratively;
and carrying out iterative filtering on each vertex position in the triangular mesh data according to the normal direction of the updating surface of each triangular patch to obtain the filtered triangular mesh data.
2. The method of claim 1, wherein assigning weights to neighbor triangular patches of each triangular patch comprises:
and based on the nonlinear structure model, carrying out weight distribution on the neighborhood triangular patches of all the triangular patches.
3. The method of claim 2, wherein the nonlinear structural model comprises a sigmoid model based on a cosine trigonometric function;
wherein the sigmoid model is represented by the following formula:
Figure FDA0003079995770000011
wherein ,
Figure FDA0003079995770000012
a and b are preset parameters.
4. The method of claim 3, wherein the weights of the neighborhood triangular patches of each triangular patch are assigned by the following formula:
Figure FDA0003079995770000013
wherein ,wjRepresenting the weight value of the jth neighbor triangular patch of the triangular patch to be processed,
Figure FDA0003079995770000014
representing sigmoid models based on cosine trigonometric functions, niRepresenting the normal direction, n, of the triangular patch to be processedjRepresenting the face normal of the jth neighborhood triangle patch.
5. The method of claim 4, wherein updating the normal direction of each triangular patch based on the weight assignment result to obtain an updated normal direction after each triangular patch is iteratively updated, comprises:
the updated surface normal is determined by the following formula:
Figure FDA0003079995770000021
wherein ,niDenotes the face normal direction, n 'before the update of the triangular face sheet to be processed'iRepresenting the normal direction, w, of the updated triangular patch to be processedjAnd representing the weight value of the jth neighborhood triangular patch of the triangular patch to be processed, wherein N is the total number of the neighborhood triangular patches of the triangular patch to be processed.
6. The method of claim 1, wherein iteratively filtering each vertex position in the triangular mesh data according to an update surface normal of each triangular patch comprises:
iteratively filtering each vertex position in the triangular mesh data by:
Figure FDA0003079995770000022
wherein ,viFor the position before filtering of the ith vertex to be filtered,v′iFor the ith vertex to be filtered, NviRepresenting the total number n 'of neighborhood triangular patches of the ith vertex to be filtered'jThe updated surface normal direction, c, of the jth neighborhood triangular patch representing the ith vertex to be filteredjRepresenting the center position of the jth neighborhood triangular patch.
7. The method of claim 1, wherein the neighborhood triangular patch is a ring neighborhood triangular patch;
correspondingly, before the weight distribution is performed on the neighborhood triangular patch of each triangular patch, the method further includes:
and establishing an index relationship between information of each triangular patch and information of a ring neighborhood triangular patch according to a topological relationship between the triangular patches in the triangular grid data, wherein the information of the triangular patches at least comprises vertex information and a normal direction of the triangular patches.
8. A triangular mesh filtering apparatus, comprising:
the normal vector determination module is used for acquiring triangular grid data to be filtered and determining the surface normal direction of each triangular patch in the triangular grid data;
the normal vector updating module is used for traversing the triangular grid data, performing weight distribution on a neighborhood triangular patch of each triangular patch, and updating the normal direction of each triangular patch based on a weight distribution result so as to obtain an updated normal direction after each triangular patch is updated iteratively;
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 of each triangular patch to obtain the filtered triangular mesh data.
9. An electronic device, comprising:
one or more processors;
a storage device for storing 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-7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method of triangular mesh filtering according to any one of claims 1-7.
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 true CN113178013A (en) 2021-07-27
CN113178013B 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115409950A (en) * 2022-10-09 2022-11-29 卡本(深圳)医疗器械有限公司 Optimization method for surface rendering triangular mesh
WO2023024395A1 (en) * 2021-08-26 2023-03-02 深圳市慧鲤科技有限公司 Method and apparatus for model optimization, electronic device, storage medium, computer program, and computer program product

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
张王宇: "基于引导法向滤波的三角网格去噪算法", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》 *
李智琦;毛心怡;汪俊;魏明强;郭延文;: "保持特征的三角网格曲面去噪技术综述与展望" *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023024395A1 (en) * 2021-08-26 2023-03-02 深圳市慧鲤科技有限公司 Method and apparatus for model optimization, electronic device, storage medium, computer program, and computer program product
CN115409950A (en) * 2022-10-09 2022-11-29 卡本(深圳)医疗器械有限公司 Optimization method for surface rendering triangular mesh
CN115409950B (en) * 2022-10-09 2024-02-06 卡本(深圳)医疗器械有限公司 Optimization method for surface drawing triangular mesh

Also Published As

Publication number Publication date
CN113178013B (en) 2023-10-03

Similar Documents

Publication Publication Date Title
CN108898630B (en) Three-dimensional reconstruction method, device, equipment and storage medium
CN108537876B (en) Three-dimensional reconstruction method, device, equipment and storage medium
CN113178013B (en) Triangular mesh filtering method, triangular mesh filtering device, electronic equipment and storage medium
CN107729935B (en) The recognition methods of similar pictures and device, server, storage medium
CN110222703B (en) Image contour recognition method, device, equipment and medium
JP2018129036A (en) Completion of image
WO2013123636A1 (en) Method and apparatus for mesh simplification
US20200349764A1 (en) Apparatus, system and method for data generation
CN111639147B (en) Map compression method, system and computer readable storage medium
CN114419275A (en) Method for denoising triangular mesh based on dual-graph neural network
CN114677565A (en) Training method of feature extraction network and image processing method and device
CN111627119A (en) Texture mapping method, device, equipment and storage medium
CN112825199A (en) Collision detection method, device, equipment and storage medium
CN113205090B (en) Picture correction method, device, electronic equipment and computer readable storage medium
CN117058384B (en) Method and system for semantic segmentation of three-dimensional point cloud
CN112116585B (en) Image removal tampering blind detection method, system, device and storage medium
CN113409307A (en) Image denoising method, device and medium based on heterogeneous noise characteristics
CN112085842B (en) Depth value determining method and device, electronic equipment and storage medium
CN111870953A (en) Height map generation method, device, equipment and storage medium
CN116468632A (en) Grid denoising method and device based on self-adaptive feature preservation
CN110335205B (en) Landform smoothing method and device, computer equipment and storage medium
CN110837707B (en) Finite element analysis system, method, computer equipment and storage medium
WO2021014557A1 (en) Mesh structure facility detection device, mesh structure facility detection method, and program
CN111784796A (en) Terrain grid generation method, device, equipment and medium
CN113724395B (en) Multi-floor house model generation method and device, electronic equipment and 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