CN115359209A - Image processing apparatus and method - Google Patents
Image processing apparatus and method Download PDFInfo
- Publication number
- CN115359209A CN115359209A CN202210823173.8A CN202210823173A CN115359209A CN 115359209 A CN115359209 A CN 115359209A CN 202210823173 A CN202210823173 A CN 202210823173A CN 115359209 A CN115359209 A CN 115359209A
- Authority
- CN
- China
- Prior art keywords
- curve
- triangular
- grid
- image
- triangle
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 44
- 238000012545 processing Methods 0.000 title claims abstract description 27
- 238000005457 optimization Methods 0.000 claims abstract description 15
- 230000008569 process Effects 0.000 claims abstract description 9
- 238000003672 processing method Methods 0.000 claims abstract 2
- 238000003860 storage Methods 0.000 claims description 13
- 238000005516 engineering process Methods 0.000 claims description 8
- 238000004364 calculation method Methods 0.000 claims description 4
- 238000004590 computer program Methods 0.000 claims description 4
- 238000013507 mapping Methods 0.000 claims description 4
- 230000010354 integration Effects 0.000 claims description 3
- 239000011159 matrix material Substances 0.000 claims description 3
- 238000004088 simulation Methods 0.000 abstract description 6
- 238000004458 analytical method Methods 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 8
- 230000005540 biological transmission Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 4
- 230000001788 irregular Effects 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000007781 pre-processing Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 241000287196 Asthenes Species 0.000 description 1
- RYGMFSIKBFXOCR-UHFFFAOYSA-N Copper Chemical compound [Cu] RYGMFSIKBFXOCR-UHFFFAOYSA-N 0.000 description 1
- 230000004075 alteration Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 229910052802 copper Inorganic materials 0.000 description 1
- 239000010949 copper Substances 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 239000012530 fluid Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
- G06T17/20—Finite element generation, e.g. wire-frame surface description, tesselation
Abstract
The invention discloses an image processing method, which comprises the following steps: reading an image and identifying control points and weights of curves in the image; subdividing the curve into feasible; based on the control points and the weights, arranging triangular envelopes around the curve until the triangular envelopes are not intersected, and continuously subdividing the curve if the triangular envelopes are intersected; taking the triangular envelopes as holes, carrying out linear triangulation on an external area to obtain triangular meshes, and placing control vertexes in all triangles of the triangular meshes; and optimizing the grid connection relation and the vertex position according to the grid obtained by controlling the vertex, and keeping the grid regular in the optimization process, thereby obtaining a final high-order triangular grid conforming to the curve in the image for image processing. The method disclosed by the invention is used for generating the high-order grid which accurately accords with the 2D graph, simultaneously meets the accurate conformity of a rational Bezier curve and the strict monojectivity of the grid compared with the traditional method, does not need professional skills, and is suitable for generating the grid of plane numerical simulation and finite element analysis.
Description
Technical Field
The present invention relates to the technical field of image processing, and in particular, to an apparatus and method for processing an image by generating a high-order triangular mesh conforming to a 2D rational curve.
Background
When processing an image, it is often necessary to process the image provided by a user, which often requires a triangular mesh to simulate various lines as close to the image as possible, which is convenient for subsequent image processing. Since various lines of the image are not typical shapes such as straight lines, perfect circles, ellipses and the like, in order to perform simulation by using a triangular grid, generally speaking, triangular gridding is performed on a given pattern region, different partial differential equations are solved on the grid, different rendering effects on the pattern can be obtained, and a fluid simulation effect graph of the pattern can be obtained by simply applying the method such as solving the Stokes equation on the grid. In the traditional plane triangular meshing technology, linear triangles are used for dividing regions, on one hand, artifacts can be generated as a result due to the fact that linear elements cannot accurately fit a curved edge pattern, on the other hand, in the application requiring accurate solution of an equation, the method has large numerical errors, and if the errors are reduced by subdividing meshes, calculation becomes complex. The problem can be effectively solved by using high-order triangular meshes to divide the regions, but the finite element technology used by the subsequent solution equation needs the meshes to meet good properties: the mesh elements are regular (i.e., the jacobian at each point of each triangle is greater than 0), the mesh conforms to the region pattern, and the mesh quality is good (i.e., the mesh elements have little distortion). The widespread use of rational curves such as circles, cones, etc. makes meshing involving them more practical.
For this case, the mesh generation method needs to satisfy the following condition: the generated grid can accurately accord with rational polynomial curves of 2 degrees, 3 degrees and irrational polynomial curves of any order of the region; each triangular element in the mesh is regular; the above conditions are met while the quality of the grid is as good as possible.
No relevant software or relevant solution is currently available to achieve a high-order mesh generation method that meets the above requirements.
Disclosure of Invention
The invention aims to provide a novel high-order grid generation method, which can generate triangular grid of an image meeting the user's expectation and allow non-professionals to directly generate grids so as to obtain various lines which are very close to the user image and be used for image processing.
The technical scheme adopted by the invention for solving the corresponding problems is as follows: and generating a 2D high-order grid conforming to the region curve by computer software. The method mainly comprises the following steps: reading an image and identifying control points and weights of curves in the image; subdividing the curve into feasible; based on the control points and the weights, arranging triangular envelopes around the curve until the triangular envelopes are not intersected, and continuously subdividing the curve if the triangular envelopes are intersected; taking the triangular envelopes as holes, carrying out linear triangulation on an external area to obtain triangular meshes, and placing control vertexes in all triangles of the triangular meshes; and optimizing the grid connection relation and the vertex position according to the grid obtained by controlling the vertex, and keeping the grid regular in the optimization process, thereby obtaining a final high-order triangular grid conforming to the curve in the image for image processing.
According to the technical scheme provided by the invention, the high-order triangular mesh generation of the coincidence region is carried out by using computer software, so that the defects that the conventional scheme cannot accurately coincide and does not strictly meet the requirement of the unishot property are effectively avoided, and a user does not need to have related professional knowledge. The invention can conveniently generate the desired curved edge grid, and is particularly suitable for carrying out plane numerical simulation and image processing on the grid.
For example, if an irregular headwear appears in an image, by using the image processing apparatus and method of the present invention, it is possible to perfectly distinguish the irregular lines of the headwear from the irregular lines of a human head and an irregular background and simulate them with a triangular mesh, so that it is possible to easily perform image processing on the headwear, such as changing the color thereof, or changing the shape of the outline thereof, or the like. The technical scheme has very wide application in the fields of video processing and image processing.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
FIG. 1 is a flowchart of an algorithm for providing high-order mesh generation consistent with rational curves according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a process for generating a strictly complete high-level mesh according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a high-order triangle generation process according to an embodiment of the present invention;
fig. 4 is a comparison of the results of processing an image according to the present invention and the prior art.
Detailed Description
Preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While the preferred embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms without being limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The term "include" and variations thereof as used herein is meant to be inclusive in an open-ended manner, i.e., "including but not limited to". The term "or" means "and/or" unless specifically stated otherwise. The term "based on" means "based at least in part on". The terms "one example embodiment" and "one embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". The terms "first," "second," and the like may refer to different or the same objects, are used for descriptive purposes only, and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. Other explicit and implicit definitions are also possible below.
The order of process steps set forth herein does not necessarily indicate that the process must be performed in this order of occurrence. The order of steps should only be limited as it is clear to one of ordinary skill in the art (e.g., a programmer) after reading this document that the steps of the technique should be performed in a particular order. In a modern computer system, method steps may be performed in parallel, or in a different order than presented herein, as desired.
According to computer software protection regulations, software includes computer programs and their associated documents. Computer program refers to a coded instruction sequence that can be executed by a computer to obtain a certain result, or a symbolic instruction sequence or symbolic statement sequence that can be automatically converted into a coded instruction sequence; the document refers to the text data and diagrams used to describe the content, composition, design, functional specification, development situation, test result and usage of the program.
Rather than strictly distinguish between the above-described regulations, the terms software and program may be used interchangeably herein, depending upon the context in which the judgment is made. The code described herein is a string of characters representing information in a discrete form, and may or may not form part of the software. The code may or may not run independently. The code is typically smaller in length and complexity than software or programs.
Examples
This embodiment dissembles some steps to describe the technical solution more clearly. The images of the invention include static photos, pictures, dynamic videos, animations and the like. The high order of the invention is greater than 1 order, and the curve of the invention comprises a rational curve, an irrational curve and a straight line.
In the reading step, a reading unit of the computer reads the image, recognizes information such as control points and weights of the curve in the image, and may perform preprocessing.
The user first inputs an image. The image includes a shapeThe shape is a rational B zier curve of order 2, 3, and may also include an irrational B zier curve, where the input curves intersect at the endpoints. Analyzing the input grids and control points, setting the input curves as C, belonging to each curve C and marking the control points and the weights as p l And w i I =0,1 \ 8230n, wherein p i Is a two-dimensional point, w i Real numbers greater than 0. Further, each input curve may be preprocessed such that the weight at the end point of each curve is 1. The preprocessing mode is reparameterization:
wherein t is ∈ [0,1 ]]If a is set toAnd b is set asThen the reparameterization obtains the end point weightAs shown in fig. 2 (a).
In the arranging step, an arranging unit of the computer arranges a triangular envelope around the curve based on information such as control points and weights. From the read curves, triangular envelopes were constructed on both sides of the curve. The control vector of the Bezier curve is s i =p i+1 -p i I =0, \ 8230, n-1. Further, in the subdividing step, a subdividing unit of the computer subdivides the curve into feasible. It is feasible to refer to a Bezier curve when there is a 2-dimensional vector d such that d T s i >0 holds for all i and d is called the axis of this curve. By subdividing the input curve, a feasible curve is always obtained, which is obtained by the subdivision properties of the Bezier curve. After the subdivision, a preprocessing mode is also used to keep the weight of the rational B zier curve endpoint as 1. For the feasible curves obtained, take s + And s - Respectively in the counterclockwise direction along dIn the up and down-clockwise direction such that d T s i Minimized control vector, take L + Is represented by s + Is direction passing through p 0 Straight line of (A), L - Is given by s - Is a direction passing through p n Is marked as L + And L - Point of intersection of, L + =L - When simply taking x as p 0 And p n The midpoint of (a). For each side of the feasible curve c, offset x a distance in the normal direction to obtain a pointWherein w = | p 0 -p n Ii is the width of the current curve,is the width of the original curve before subdivision and n is the unit normal vector perpendicular to d.And curve c form a curved triangle called the envelope of curve c. If the envelopes of different curves are intersected, the curve surrounded by the larger envelope is subdivided, and finally the envelope of the intersected surrounding curve is obtained.
In the triangularization step, a triangularization unit of the computer regards the triangular envelope as a hole, and Delaunay triangularization with constraint is performed on a polygon formed in the background area to obtain a linear triangularization result (triangular mesh). As shown in fig. 2 (b). And, control vertices are placed in all triangles of each triangular mesh.
The mode of placing the control vertex by the n-order irrational triangle is as follows: order V-shaped i Is at a point p i Is a vertex with a direction of-s - And s + The cone of (2). Let r be the boundary of the coneAnd p no . Consider a straight line with d as the direction, n as the normal, and separating o and control polygons and r. Then L has two intersections with the two straight edges of the envelope, denoted as q 0 And q is n-1 . On this line segment, the selection is made againn-2 points q 1 ,…,q n-2 Composition q 0 To q n-1 . Note the line segment S i =L∩∨ i Let L (t) be a linear parameterization of L, L (0) = q 0 And l (1) = q n-1 (ii) a Then S i Corresponding to parameter interval [ l i ,r i ]. Get q i =l(t i ) Wherein They increase from i =1 to n-2. Finally, take straight line K i Parallel toAnd passes through point q i And L is i Passing through the point parallel to LTake x i,j =intersect(K i ,L j ) Note x i,n-1 =q i And x 0,0 As shown in fig. 3 (a).
The way in which the rational triangles place control vertices is based on one principle: and a triangle formed by any three control vertexes on the parameter domain has the same steering as a triangle formed by corresponding control points on the calculation domain. The specific implementation method for placing the control vertex is not unique, and the step results in a triangle according to the above principle.
For a rational quadratic Bezier triangle, at the straight sideTo select a point such that it is at the control vector s 0 And s 1 On the left hand side of (1), denoted as q 1 Also at straight sidesThe upper selection point is marked as q 2 . A selection mode is q 1 =0.8i 1 +0.2o,q 2 =0.8i 2 +0.2o, wherein i 2 Is thatAndpoint of intersection of i 1 Is thatAndthe intersection point of (a). Q is to be 1 ,q 2 And o is weighted to 1. As shown in fig. 3 (b).
For a rational cubic Bezier triangle, the positions of 5 additional control points need to be determined. At straight edgesTo select a point such that it is at the control vector s 0 、s 1 And s 2 On the left hand side of (1), denoted as q 1 Likewise on straight sidesUpper selection point q 3 This choice is similar to the quadratic case. Line segmentAnd line segmentHaving an intersection, line segmentAnd line segmentThere is an intersection point, and a point is selected from the connection line of the two intersection points and marked as q 2 Remember q 4 Is a line segmentAnd a straight line p 2 q 2 Let q be the intersection point of 5 Is a line segmentAnd a straight line p 1 q 2 Point of intersection of (a) q 1 、q 3 、q 4 、q 5 O is weighted to 1,q 2 The weight of (d) may be arbitrarily selected, and is herein set to the average of other weights. As shown in fig. 3 (c).
Furthermore, control vertices can be placed in each of the straight-sided triangles.
For a straight-sided triangle, there are three cases, one adjacent to each of the 2,1,0 envelopes.
If a straight-sided triangle is adjacent to a curved-sided triangle (i.e., the envelope) (adjacent sides would only be straight sides), then the common side takes the control vertex on the curved-sided triangle. Since one straight-sided triangle is adjacent to at most two curved-sided triangles. And setting the angular points of the straight-edge triangles as a, b and c. If the straight-side triangle is not adjacent to the curved-side triangle, the control vertexes are uniformly placed in the straight-side triangle. If only one side (a, b) is adjacent to a curved triangle, the side has non-uniform control vertices p 0 ,…,p n (p 0 =a,p n = b), the remaining vertices are still placed in a uniform manner.
As shown in fig. 3 (d).
If another side is adjacent to the triangle with curved side, it is marked as q 0 ,…,q n (q 0 =a=p 0 ,q n = c), let K i Is passing through point q i ,1≤i<n, and is parallel toA straight line of (1), r i Is K i Andat a point of intersection ofThe control points are uniformly arranged as the internal control points. The placement of the control points is as follows:
as shown in fig. 3 (e). The weights of the control points are all set to 1. After the control point is placed, it is shown in fig. 2 (c).
If the straight-sided triangle is not adjacent to the curved-sided triangle, the control vertices are placed evenly.
In the optimization step, an optimization unit of the computer performs mesh connection relation optimization and geometric optimization to optimize distortion according to the mesh obtained by placing the control vertex.
The optimization of the grid connection relation is carried out based on a target side length strategy, the length of a side taking p and q as a vertex is approximately l (p, q) = | p-q |, and the target side length is marked as l. If it is
According to the method, triangles adjacent to the edge are subdivided by using a Bezier triangle subdivision technology, and after subdivision, re-parameterization is needed to enable the weight of an end point of each triangle to be 1. If it is
The invention carries out collapse on the side, and the collapse on the side is noticed not to cause the movement of the area curve. For example, the end points of the area curve will not collapse, and the interior of the area curve will only collapse along the area curve. The invention performs edge flipping and, if this operation reduces the vertex degree deviation (e.g., 6 for the inside degree and 4 for the boundary degree), the region curve is likewise not flipped.
The geometric optimization is to optimize the vertex position by optimizing the conformal distortion energy of the mapping, and the vertex position is calculated by the Jacobian matrix (singular value sigma, sigma) of the mapping:
E conf =(Σ 2 +σ 2 )/Σσ,
and gaussian-like numerical integration is performed over the entire triangle. The unijectivity is checked after line search by newton's method during optimization to ensure the unijectivity of the whole process. All sides can be bent to better reduce twisting. As shown in fig. 2 (d).
The lower left corner of fig. 4 is the image input by the user, and the lower right corner is the image processed by the triangular mesh method of the present invention. The upper left corner is the result of image processing in the prior art, so that it can be seen that the curve in the image is not smooth, but the image input by the user is smooth, and the degree of simulation between the prior art and the image input by the user is poor. The upper right corner is the result of image processing by the invention, the curve in the visible image is smooth, and the simulation degree of the image input by the user is better.
Through the description of the above embodiments, it is clear to those skilled in the art that the above embodiments may be implemented by software, or by software plus a necessary general hardware platform. Based on such understanding, the technical solutions of the embodiments may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods according to the embodiments of the present invention.
Disclosed herein may be methods, apparatus, systems, storage media and program products. The program product may be stored in a readable storage medium having computer instructions for performing various aspects of the present disclosure. Which when executed by a processing unit of a computer or other programmable data processing apparatus, produce an apparatus that implements the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer-readable program instructions described herein may be downloaded to various computing processing devices from a computer-readable storage medium, or to an external computer or external storage device over a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing processing device. The wireless transmission may use a solution for wireless communication such as Wireless Local Area Network (WLAN) of wireless fidelity (Wi-Fi) network, bluetooth (BT), global Navigation Satellite System (GNSS), frequency Modulation (FM), near field wireless communication technology (NFC), infrared technology (IR), and the like.
Computer program instructions for carrying out operations of the present disclosure may be assembler instructions, instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the C language or similar programming languages. The computer-readable program instructions 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 latter scenario, 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). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the present disclosure by utilizing the state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus, systems, storage media and program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer readable program instructions.
In the embodiments described herein, it should be understood that the disclosed apparatus and methods may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, for example, a module or a unit may be divided into only one logical functional division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another device, or some features may be omitted, or not executed. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed to a plurality of different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented as a software functional unit and sold or used as a separate product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially or partially contributed to by the prior art, or all or part of the technical solutions may be embodied in the form of a software product, where the software product is stored in a storage medium and includes several instructions to enable a device (which may be a single chip microcomputer, a chip, or the like) or a processor to execute all or part of the steps of the methods of the embodiments of the present application.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein. Various modifications and alterations to this disclosure will become apparent to those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present disclosure should be included in the protection scope of the present disclosure.
Claims (10)
1. An image processing method, characterized in that an image is processed by generating a high-order triangular mesh conforming to a curve,
the method comprises the following steps:
reading an image and identifying control points and weights of curves in the image;
subdividing the curve into feasible;
based on the control points and the weights, arranging triangular envelopes around the curve until the triangular envelopes do not intersect, and if the triangular envelopes intersect, continuing to subdivide the curve;
taking the triangular envelopes as holes, carrying out linear triangulation on an external area to obtain triangular meshes, and placing control vertexes in all triangles of the triangular meshes;
and optimizing the grid connection relation and the vertex position according to the grid obtained by controlling the vertex, and keeping the grid regular in the optimization process, thereby obtaining a final high-order triangular grid conforming to the curve in the image for image processing.
2. The method of claim 1, wherein the triangular envelope is arranged around the curve in a manner such that: obtaining a feasible curve c, where s + And s - In the counter-clockwise and clockwise directions of d, respectively, such that d T s i Minimized control vector, L + Is given by s + Is direction passing through p 0 Straight line of (A), L - Is given by s - Is a direction passing through p n X is L + And L - Point of intersection of, L + =L - When x is taken as p 0 And p n For each side of the feasible curve c, offsetting x a distance in the normal direction to obtain a pointWherein w = | p 0 -p n Is the width of the current curve,is the width of the original curve before subdivision, n is the unit normal vector perpendicular to d,and curve c form a curved triangle.
3. The method of claim 1, wherein the control vertices are placed in all triangles of the triangular mesh by:
and for a triangle formed by any three control vertexes on the parameter domain, the triangle formed by the corresponding control points on the calculation domain has the same steering.
4. The method of claim 1, wherein the generated mesh connectivity relationships and vertex positions are optimized by:
optimizing the connection relation of the grids based on a target side length strategy, wherein the length of the side with the vertex p and q is approximate to l (p, q) = | -p-q |, the target side length is l, and if the length of the side with the vertex p and q is approximate to l (p, q) = |, the target side length is l
By usingSubdividing the triangles adjacent to the edge by using a triangle subdividing technology, and then re-parameterizing to enable the end point weight of each triangle to be 1 if the end point weight of each triangle is 1
Performing side collapse on the side, wherein the end point of the area curve cannot be collapsed, the inner part of the area curve only collapses along the area curve, each side is turned, if the operation reduces the deviation of the vertex degree, the area curve is not turned, and if the operation violates the unijectivity, the operation is not performed every time;
vertex position optimization based on optimizing conformal distortion energy: jacobian matrix (singular value sigma, sigma) computation by mapping
E conf =(Σ 2 +σ 2 )/Σσ,
And performing Gaussian numerical integration on the whole triangle to obtain target energy, and checking the regularity posteriorly by a line search method of a Newton method during optimization.
5. An image processing apparatus, characterized in that an image is processed by generating a high-order triangular mesh conforming to a curve,
the method comprises the following steps:
a reading unit that reads the image and identifies a control point and a weight of a curve in the image;
subdividing the curve into feasible subdivision units;
an arrangement unit that arranges triangular envelopes around the curve based on the control points and the weights until the triangular envelopes do not intersect, and continues to subdivide the curve if the triangular envelopes intersect;
taking the triangular envelopes as holes, carrying out linear triangulation on an external area to obtain a triangular mesh, and placing triangularization units for controlling vertexes in all triangles of the triangular mesh;
and optimizing the grid connection relation and the vertex position according to the grid obtained by controlling the vertex, and keeping the grid regular in the optimization process, thereby obtaining a final high-order triangular grid which accords with the curve in the image and is used for image processing.
6. The apparatus of claim 5, wherein the triangular envelope is arranged around the curve in a manner such that: obtaining a feasible curve c, where s + And s - In the counter-clockwise and clockwise directions of d, respectively, such that d T s i Minimized control vector, L + Is given by s + Is direction passing through p 0 Straight line of (A), L - Is represented by s - Is direction passing through p n X is L + And L - Point of intersection of, L + =L - When x is taken as p 0 And p n For each side of the feasible curve c, offset x by a distance in the normal direction to obtain a pointWherein w = | p 0 -p n Is the width of the current curve,is the width of the original curve before subdivision, n is the unit normal vector perpendicular to d,and curve c form a curved triangle.
7. The apparatus of claim 5, wherein the control vertices are placed in all triangles of the triangular mesh by:
and for the triangle formed by any three control vertexes on the parameter domain, the triangle formed by the corresponding control points on the calculation domain has the same steering.
8. The apparatus of claim 5, wherein the generated mesh connectivity and vertex positions are optimized by:
optimizing the connection relation of the grids based on a target side length strategy, wherein the length of a side with p and q as vertexes is approximately l (p, q) = | p-q |, the target side length is l, and if the target side length is l
Subdividing triangles with adjacent edges by using Bezier triangle subdivision technology, and re-parameterizing after subdivision to enable the weight of an endpoint of each triangle to be 1 if
Performing side collapse on the side, wherein the end point of the area curve cannot be collapsed, the inner part of the area curve only collapses along the area curve, each side is turned, if the operation reduces the deviation of the vertex degree, the area curve is not turned, and if the operation violates the unijectivity, the operation is not performed every time;
vertex position optimization based on optimizing conformal distortion energy: jacobian matrix (singular value sigma, sigma) computation by mapping
E conf =(Σ 2 +σ 2 )/Σσ,
And performing Gaussian numerical integration on the whole triangle to obtain target energy, and checking the regularity a posteriori by a line search method of a Newton method during optimization.
9. A computer system comprising a processor and a memory interconnected with the processor, the memory having stored therein instructions that, when executed by the processor, implement the method of any of claims 1-4.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, implements the method of any of the preceding claims 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210823173.8A CN115359209B (en) | 2022-07-14 | 2022-07-14 | Image processing apparatus and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210823173.8A CN115359209B (en) | 2022-07-14 | 2022-07-14 | Image processing apparatus and method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115359209A true CN115359209A (en) | 2022-11-18 |
CN115359209B CN115359209B (en) | 2024-01-19 |
Family
ID=84031809
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210823173.8A Active CN115359209B (en) | 2022-07-14 | 2022-07-14 | Image processing apparatus and method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115359209B (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6633669B1 (en) * | 1999-10-21 | 2003-10-14 | 3M Innovative Properties Company | Autogrid analysis |
US20070002043A1 (en) * | 2005-06-30 | 2007-01-04 | Microsoft Corporation | Triangulating procedural geometric objects |
US20070158014A1 (en) * | 2005-10-06 | 2007-07-12 | Schwenn Peter T | Weave, a utility method for designing and fabricating 3D structural shells, solids and their assemblages, without limitations on shape, scale, strength or material |
CN101872488A (en) * | 2009-04-27 | 2010-10-27 | 鸿富锦精密工业(深圳)有限公司 | Curved surface rendering system and method |
CN107256557A (en) * | 2017-05-03 | 2017-10-17 | 华南理工大学 | A kind of controllable subdivision curved surface image vector method of error |
CN107767452A (en) * | 2017-10-10 | 2018-03-06 | 上海理工大学 | The AMF general file generation methods of heterogeneous solid parameterized model |
CN110009721A (en) * | 2018-01-04 | 2019-07-12 | 奥多比公司 | Generate the triangle gridding of the image indicated by curve |
CN113689566A (en) * | 2021-07-16 | 2021-11-23 | 淮阴工学院 | Triangular mesh optimization method based on feature constraint |
CN113706711A (en) * | 2021-08-12 | 2021-11-26 | 南昌大学 | Variational generation method of optimal curved edge grid |
-
2022
- 2022-07-14 CN CN202210823173.8A patent/CN115359209B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6633669B1 (en) * | 1999-10-21 | 2003-10-14 | 3M Innovative Properties Company | Autogrid analysis |
US20070002043A1 (en) * | 2005-06-30 | 2007-01-04 | Microsoft Corporation | Triangulating procedural geometric objects |
US20070158014A1 (en) * | 2005-10-06 | 2007-07-12 | Schwenn Peter T | Weave, a utility method for designing and fabricating 3D structural shells, solids and their assemblages, without limitations on shape, scale, strength or material |
CN101872488A (en) * | 2009-04-27 | 2010-10-27 | 鸿富锦精密工业(深圳)有限公司 | Curved surface rendering system and method |
CN107256557A (en) * | 2017-05-03 | 2017-10-17 | 华南理工大学 | A kind of controllable subdivision curved surface image vector method of error |
CN107767452A (en) * | 2017-10-10 | 2018-03-06 | 上海理工大学 | The AMF general file generation methods of heterogeneous solid parameterized model |
CN110009721A (en) * | 2018-01-04 | 2019-07-12 | 奥多比公司 | Generate the triangle gridding of the image indicated by curve |
CN113689566A (en) * | 2021-07-16 | 2021-11-23 | 淮阴工学院 | Triangular mesh optimization method based on feature constraint |
CN113706711A (en) * | 2021-08-12 | 2021-11-26 | 南昌大学 | Variational generation method of optimal curved edge grid |
Non-Patent Citations (3)
Title |
---|
ZHEN-YU YANG; YU-HUA ZHOU; WEI-YONG WU, THE 2ND INTERNATIONAL CONFERENCE ON INFORMATION SCIENCE AND ENGINEERING * |
周海;周来水;: "三角网格模型的细分曲面拟合", 南京航空航天大学学报, no. 02 * |
张军;戴霞;: "一种针对基于图像的3D重建网格的简化算法", 计算机工程与应用, no. 08 * |
Also Published As
Publication number | Publication date |
---|---|
CN115359209B (en) | 2024-01-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Thomas et al. | Bézier projection: a unified approach for local projection and quadrature-free refinement and coarsening of NURBS and T-splines with particular application to isogeometric design and analysis | |
US8773439B2 (en) | Approximation of stroked higher-order curved segments by quadratic bèzier curve segments | |
CN101116111B (en) | 2d/3d line rendering using 3d rasterization algorithms | |
JP5721358B2 (en) | Graphics processing system | |
Litke et al. | Trimming for subdivision surfaces | |
US9916684B2 (en) | Generating portable three-dimensional print-preview renderings of three-dimensional models | |
WO2000002165A1 (en) | Method for generating polygon data and image display using the same | |
US20100097383A1 (en) | Graphics processing systems | |
CN104933749B (en) | Clipping of graphics primitives | |
US8384715B2 (en) | View-dependent rendering of parametric surfaces | |
US8471852B1 (en) | Method and system for tessellation of subdivision surfaces | |
CN101714259B (en) | Graphics processing systems | |
Auer et al. | Real‐time fluid effects on surfaces using the closest point method | |
US11087511B1 (en) | Automated vectorization of a raster image using a gradient mesh with arbitrary topology | |
Stahl et al. | Post-processing and visualization techniques for isogeometric analysis results | |
JP5916758B2 (en) | Direct rendering of CAD models on GPU | |
Herholz et al. | Efficient computation of smoothed exponential maps | |
Stanko et al. | Surfacing curve networks with normal control | |
CN115359209A (en) | Image processing apparatus and method | |
KR101919085B1 (en) | Apparatus and method for simplification of 3D mesh data | |
Fuchs et al. | Interactive Isogeometric Volume Visualization with Pixel-Accurate Geometry | |
Mizrahi et al. | Minkowski sum computation of B-spline surfaces | |
Sussner et al. | Interactive examination of surface quality on car bodies | |
Liao et al. | Subdivision Surface Modeling Technology | |
Kiciak | Spline surfaces of arbitrary topology with continuous curvature and optimized shape |
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 |