Computer drawing control method and system based on artistic design
By combining variational method and Sobolev regularization B-spline curve fitting method and surface segmentation algorithm, the accuracy and efficiency problems of painting data reproduction in the existing technology are solved, and a more accurate and natural drawing effect is achieved.
Patent Information
- Application Number
- CN202411506901.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-02-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the process of reproduction of painting data, the drawing data captured by electronic drawing boards cannot be accurately reproduced. Especially in the complex curve trajectory and color filling process, the curve trajectory error is large and the color filling method is single, which limits the application of computer drawing. Scenario and accuracy.
Using a computer drawing control method based on art design, combining variational method and Sobolev regularization to establish the fitting order selection function of the B-spline curve, automatically determine the fitting order, and perform non-uniformity through the elastic energy constraint of the fitting curve. Node subdivision, color filling is performed by combining the surface subdivision algorithm.
It improves the accuracy and efficiency of the reproduction of the drawing data, ensures that the curve is both accurate and smooth, and the color filling is more natural and fine, reducing the problems of low efficiency and strong subjectivity caused by artificial intervention.
Smart Images

Figure CN119477657A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a computer drawing control method and system based on art design. Background Art
[0002] With the rapid development of computer hardware and software, many artists create art by connecting electronic drawing boards to computers. In a computer-assisted environment, special algorithms and tools are used to capture the session information of the creator's electronic drawing board, helping designers to generate curves, shapes, color fills and other content in art design on the computer. It is a drawing method that combines the needs of artistic creation with computer technology, and aims to improve the accuracy, efficiency and flexibility of painting through automation technology.
[0003] Currently, it has become a trend for artistic creation to shift from traditional hand-painting to electronic painting. By connecting an electronic drawing board to a computer and using specialized algorithms and tools, the creator's drawing information can be accurately captured. This method not only improves the accuracy and efficiency of drawing, but also automatically generates complex curves, color gradients and other effects, reduces repetitive operations, and allows creators to focus more on the creativity itself, while ensuring that the details in complex designs are preserved, greatly improving the flexibility and expressiveness of artistic creation.
[0004] However, in the process of reproducing drawing data, due to the limitations of the algorithm, it is often impossible to accurately reproduce the drawing data captured by the electronic drawing board in the computer. In particular, in the process of reproducing complex curve trajectories and color filling, the curve trajectory error is large and the color filling method is single. It can only be filled globally by computer, which is difficult to adapt to the drawing data in the art design process. It has great limitations and the painting effect is difficult to meet the creator's requirements, which limits the application scenarios and drawing accuracy of drawing through computers. Summary of the invention
[0005] In order to solve the problem that the prior art often fails to accurately reproduce the drawing data captured by the electronic drawing board in the computer due to the limitation of the algorithm during the reproduction of the drawing data, especially in the process of reproducing the complex curve trajectory and color filling, the curve trajectory error is large and the color filling method is single, and only global filling can be performed by the computer, which is difficult to adapt to the drawing data in the art design process, has great limitations, and the painting effect is difficult to meet the requirements of the creator, which limits the application scenarios of drawing by computer and the technical problem of drawing accuracy, the present invention provides a computer drawing control method and system based on art design.
[0006] The technical solution provided by the embodiment of the present invention is as follows:
[0007] First aspect
[0008] An embodiment of the present invention provides a computer drawing control method based on art design, comprising:
[0009] S1: receiving drawing data from a designer, wherein the drawing data includes a curve track and a color-filled area;
[0010] S2: Combining the calculus of variations and Sobolev regularization to establish the fitting order selection function of the B-spline curve;
[0011] S3: determining a target fitting order according to a fitting order selection function, fitting a curve trajectory using a B-spline curve having the target fitting order, and outputting a fitting curve;
[0012] S4: Combined with the elastic energy constraint of the fitting curve, a fitting control function is established to measure the fitting error between the fitting curve and the curve trajectory;
[0013] S5: Taking minimizing the fitting error in the fitting control function as the termination goal, the fitting curve is subdivided into non-uniform nodes;
[0014] S6: Fill the subdivided fitting curve with color according to the color filling area in combination with the surface subdivision algorithm;
[0015] S7: Outputting the color-filled fitting curve as a computer-drawn image corresponding to the drawing data.
[0016] Second aspect
[0017] An embodiment of the present invention provides a computer graphics control system based on art design, comprising:
[0018] processor;
[0019] A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the computer drawing control method based on art design as described in the first aspect is implemented.
[0020] The third aspect
[0021] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the computer drawing control method based on artistic design as described in the first aspect is implemented.
[0022] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0023] In the present invention, in the process of reproducing the received drawing data in the computer, firstly, the fitting order selection function of the B-spline curve is established by combining the variational method and Sobolev regularization, and the fitting order of the B-spline curve is automatically determined to improve the fitting efficiency and accuracy, and avoid the problem of large fitting deviation caused by subjective selection of the fitting order. Then, in combination with the elastic energy constraint of the fitting curve, a fitting control function that measures the fitting error between the fitting curve and the curve trajectory is established, and the fitting error in the fitting control function is minimized as the termination goal. The fitting curve is subdivided into non-uniform nodes, and the smoothness of the curve is effectively controlled by combining the elastic energy constraint of the fitting curve. More refined local adjustment is achieved through non-uniform node subdivision, which can ensure the fitting accuracy while avoiding overfitting, reducing unnecessary calculation overhead, and making the curve both accurate and smooth. Then, on the basis of accurately fitting the curve trajectory, the surface subdivision algorithm is combined to fill the color filling area with color, and the color filling area can be refined to perform fine-grained color diffusion on it, thereby improving the reproduction effect of the creator's drawing data, and then improving the reproduction accuracy of the drawing data in an automated manner, and reducing the problems of low drawing efficiency and strong subjectivity caused by frequent human intervention. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0025] Figure 1 A flowchart of a computer drawing control method based on art design provided by an embodiment of the present invention;
[0026] Figure 2 A schematic structural diagram of a computer graphics control system based on art design provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0027] The technical solution of the present invention is described below in conjunction with the accompanying drawings.
[0028] Reference Manual Attached Figure 1 , showing a flow chart of a computer drawing control method based on art design provided by an embodiment of the present invention.
[0029] The embodiment of the present invention provides a computer drawing control method based on art design, which can be implemented by a computer drawing control device based on art design, and the computer drawing control device based on art design can be a terminal or a server. The processing flow of the computer drawing control method based on art design can include the following steps:
[0030] S1: receiving drawing data from a designer, wherein the drawing data includes a curve track and a color-filled area.
[0031] Among them, drawing data is information collected from the designer's drawing process (usually using an electronic drawing board), mainly including curve trajectories and color filling areas. These data capture the geometric and color information input by the designer during the drawing process and are used to reproduce the designer's drawing intention. The curve trajectory is the curve information generated by the designer during the drawing process. It can be a uniform curve (i.e., a smooth curve generated at the same perspective and scale) or a non-uniform curve (i.e., a curve with non-uniform nodes generated by the designer when switching perspectives and scales). Non-uniform curves can better express complex curve shapes and details. The color filling area refers to the color or gradient information specified by the designer for certain areas. It describes how specific areas in the graphics should be filled with colors, such as using different colors, gradient transitions, etc. By obtaining the curve trajectory and color filling area in the drawing data, the computer can accurately reproduce the designer's drawing intention, and at the same time combine algorithms to automatically optimize curves and color transitions, reduce the workload of manual adjustments, and improve drawing efficiency and accuracy.
[0032] In a possible implementation manner, S1 specifically includes:
[0033] Collect drawing data through electronic drawing tablet.
[0034] Among them, the electronic drawing board, also known as a digital tablet, is a tool that collects the user's drawing data and transmits it to the computer, reproducing the user's drawing intention through the computer. "Collecting drawing data through an electronic drawing board" means using an electronic drawing board (digital tablet) as an input device to capture the drawing operations performed by the designer or user on the board in real time, and transmit the generated drawing data (such as curve trajectories and color fill areas) to the computer. Specifically, the designer uses a drawing pen to draw curves on the drawing board, and the drawing board captures these curve information and generates curve trajectories. At the same time, the designer can use the spray gun tool on the drawing board to define the color fill area, and these data are ultimately used to generate a complete drawing on the computer.
[0035] S2: Combining the calculus of variations and Sobolev regularization, a fitting order selection function for the B-spline curve is established.
[0036] Among them, the calculus of variations is an optimization technique in mathematics, which is mainly used to solve the problem of making a certain functional (function of function) reach an extreme value. In curve fitting, the calculus of variations is used to minimize the functional of the fitting error so that the curve is as close to the target curve as possible. Sobolev regularization is a technique for controlling the smoothness of the fitting curve. It ensures the smoothness of the curve by constraining the high-order derivatives of the curve and avoids excessive fluctuations. It adds regularization terms to the curve fitting to limit the excessive complexity of the curve, thereby maintaining a balance between smoothness and accuracy. By combining the calculus of variations and Sobolev regularization, the optimal fitting order can be automatically determined to ensure that the fitting curve can accurately approach the target curve while maintaining appropriate smoothness, thereby avoiding overfitting or underfitting.
[0037] In a possible implementation, the fitting order selection function is specifically:
[0038]
[0039] k H ≥m+1
[0040] max(K J ,K H )
[0041] Among them, J[K J ] represents the first order K J The target functional, E(s,K J ) represents the error value of the fitting curve relative to the curve trajectory at parameter s, s∈[a,b], where a and b represent the upper and lower limits of integration respectively, λ represents the regularization coefficient, represents the square norm of the second-order derivative of the fitting curve P(s), Indicates partial derivative, max indicates maximum value, H m (C) represents the curve trajectory C in the Sobolev space H m The norm of the smoothness of the m-th order derivative, represents the i-th derivative used to describe the change of the curve trajectory at parameter s, k H Represents the second order.
[0042] Specifically, the optimal order K can be obtained by solving the following equation through the Euler-Lagrange equation: J :
[0043]
[0044] Among them, H m (C) The smaller the value, the smoother the curve. In order to ensure the m-order smoothness of the curve, the order of the B-spline should be greater than or equal to m+1. This means that if Hm (C) is larger. In order to control the change of the curve and maintain smoothness, the order of the B-spline needs to be increased.
[0045] It should be noted that the advantage of selecting the fitting order of the B-spline curve by combining the variational method and Sobolev regularization is that it can achieve the best balance between fitting accuracy and curve smoothness. The variational method ensures that the curve is not overly complex while approaching the target curve by minimizing the fitting error and regularization term, and the Sobolev regularization ensures the smoothness of the curve and the continuity of the derivative by constraining the high-order derivatives. This method can avoid overfitting and underfitting and generate an accurate and smooth fitting curve. This method automatically evaluates the fitting effect under different fitting orders, improves the automation capability of drawing control, and can determine the fitting order to fit the curve trajectory in an interpretable, efficient and accurate way, avoiding the problem of large deviation and low efficiency of fitting effect caused by subjective determination of the fitting order.
[0046] S3: determining a target fitting order according to a fitting order selection function, fitting a curve trajectory using a B-spline curve having the target fitting order, and outputting a fitting curve.
[0047] Among them, the B-spline curve is a smooth curve generated by multiple control points and basis functions. It has local control characteristics, which means that modifying certain control points will only affect the local part of the curve, but not the whole part. This kind of curve is very commonly used in computer graphics and geometric design, and is particularly suitable for generating complex and smooth curves or surfaces. The fitting curve is a curve generated by mathematical methods based on given data points, that is, the curve trajectory. The purpose is to make the curve as close to the curve trajectory as possible. The purpose of the fitting curve is to convert a discrete set of points into a continuous curve for subsequent operation or analysis. By selecting a function according to the fitting order to determine the appropriate B-spline curve order, the fitting curve can accurately approximate the designer's original trajectory, maintain smoothness and local control, avoid excessive complexity, and reduce the waste of computing resources, thereby improving the fitting efficiency and the operability of the curve.
[0048] In a possible implementation, S3 specifically includes:
[0049] S301: Selecting initial control points from the curve trajectory, wherein the initial control points include a starting point, an extreme point, a curvature change point and an end point.
[0050] S302: Select multiple nodes from the curve trajectory in combination with the target fitting order, wherein each node constitutes a node vector:
[0051] n knots =n+k+1
[0052] Among them, n represents the number of initial control points minus 1, k represents the target fitting order, and n knots Indicates the length of the node vector.
[0053] S303: Based on the initial control points and the node vectors, a fitting curve is determined recursively:
[0054]
[0055] Among them, N i,k (s) represents the k-order basis function used to describe the contribution of the i-th control point to the B-spline curve at parameter s, N i,1 (s) represents the basis function of order 1, P(s) represents the basis function based on the i-th control point P i and the fitting curve obtained by k-order basis function, t i ,t i+k and t i+k-1 They represent the nodes corresponding to the i-th control point, the i+k-th control point, and the i+k-1-th control point respectively.
[0056] It should be noted that the advantage of determining the fitting curve by recursion is that it combines the distribution of the initial control points and the node vectors, so that the fitting curve can smoothly and accurately approximate the original curve trajectory, especially in areas with large curvature changes. It can provide better control and avoid excessive fluctuations or unnatural changes in the curve, thereby achieving more accurate fitting of complex shapes while maintaining high computational efficiency and flexibility.
[0057] S4: Combined with the elastic energy constraint of the fitting curve, a fitting control function is established to measure the fitting error between the fitting curve and the curve trajectory.
[0058] Among them, elastic energy constraint is a method for controlling the smoothness of the curve. It limits the curvature of the curve to ensure that the curve does not appear excessively distorted or oscillate during fitting. The greater the elastic energy, the more curvature the curve has. The smaller the elastic energy, the smoother the curve. The fitting error refers to the deviation or gap between the fitting curve and the original curve trajectory. It measures the accuracy of the fitting curve relative to the actual data input by the designer. The smaller the error, the better the fitting effect. The fitting control function is an optimization objective function used to balance the fitting error and the smoothness of the curve during the fitting process. It combines the fitting error and the elastic energy constraint to ensure that the curve is both accurate and smooth when approaching the original trajectory. By combining the elastic energy constraint, the smoothness of the curve can be ensured while minimizing the fitting error, avoiding overfitting, improving the naturalness and accuracy of the curve, and reducing unnecessary complex calculations.
[0059] In a possible implementation, the fitting control function is specifically:
[0060]
[0061] E elastic ≤E threshold
[0062]
[0063] Among them, P track,i and C(t i ) represent the parameters t at the i-th node respectively. i The fitting curve sampling points and curve trajectory sampling points, E fit represents the fitting error, E elastic represents the elastic energy of the fitting curve, E threshold represents the elastic energy threshold of the fitting curve, Represents the second-order derivative of the fitting curve P(t) with respect to node t.
[0064] It should be noted that those skilled in the art can set the threshold value of the elastic energy of the fitting curve according to actual needs, and the present invention does not limit this.
[0065] It should be noted that the fitting control function combines the fitting error and elastic energy. By minimizing the fitting error and constraining the elastic characteristics of the curve, it ensures that the curve maintains smoothness and naturalness while accurately fitting, avoiding overfitting. In addition, by introducing elastic energy threshold limits, it can also effectively reduce the consumption of computing resources, improve fitting efficiency, and maintain a balanced fitting effect in complex scenarios. While ensuring that the fitting error is minimized, it effectively reduces the excessive consumption of computing resources caused by overfitting.
[0066] S5: Taking minimizing the fitting error in the fitting control function as the termination goal, the fitting curve is subdivided into non-uniform nodes.
[0067] Among them, non-uniform node subdivision refers to adding more nodes in certain areas and keeping fewer nodes in other smooth areas according to the geometric characteristics of the curve (such as curvature or local complexity) during the subdivision process of the curve. This subdivision method can provide more control points in complex areas to capture details, and reduce nodes in smooth areas to simplify calculations. Filling more control points for complex trajectories and fewer control points for simple trajectories can improve the fitting effect while avoiding excessive consumption of computing resources. Through non-uniform node subdivision, you can increase detail control in complex curve areas and improve fitting accuracy, while reducing the amount of calculation in smooth areas, thereby optimizing calculation efficiency and ensuring the overall smoothness and accuracy of the curve.
[0068] In a possible implementation, S5 specifically includes:
[0069] S501: insert new nodes into the node vector of the fitting curve in an evenly spaced manner:
[0070]
[0071] Among them, t i and t i+1 They represent the i-th and i+1-th nodes in the node vector of the fitting curve respectively, and t′ represents a new node.
[0072] S502: Determine the subdivision control points of the fitting curve in a recursive manner according to the inserted new nodes:
[0073] P i '=α i P i +(1-α i ) i+1
[0074]
[0075] Among them, P i and P i+1 They represent the i-th control point and the i+1-th control point in the fitting curve, respectively. i ' represents the control point P i The corresponding subdivision control points after subdivision, α i Indicates that for the i-th control point P i When interpolating, measure the subdivision control points in P i and P i+1 Interpolation factor for positions between .
[0076] S503: Repeat steps S501 to S502 until the termination target is reached:
[0077] S504: updating the fitting curve based on the interpolated node vectors and the subdivided control points.
[0078] In actual application, after obtaining the interpolated node vectors and the subdivided control points, the node vectors and the control points can be updated again in step S2 to obtain a new fitting curve, thereby completing the subdivision of the original fitting curve.
[0079] Specifically, new nodes are first inserted at equal intervals, and then the control points are recursively subdivided to gradually refine the local area of the curve. This method not only accurately captures the curve details in complex areas, but also reduces the number of nodes in smooth areas, optimizes computing resources, and finally ensures the overall smoothness and fitting accuracy of the curve by interpolating the updated nodes and control points.
[0080] S6: Fill the subdivided fitting curve with color according to the color filling area in combination with the surface subdivision algorithm.
[0081] Among them, the surface subdivision algorithm is a method of generating smooth surfaces by recursively subdividing polygonal meshes (such as triangles or quadrilaterals). By continuously inserting new vertices, edge points, and face points, the originally rough surface becomes smoother while maintaining the general characteristics of the original shape. By using the surface subdivision algorithm to process the color-filled area, smooth color transitions of complex shapes can be achieved, making the color more refined in local areas, while improving the overall visual effect and the naturalness of the gradient.
[0082] In a possible implementation, S6 specifically includes:
[0083] S601: Extracting the outline boundary and color gradient information of the color filling area.
[0084] S602: Subdividing the color-filled area according to the contour boundary and color gradient information by using a surface subdivision algorithm to obtain multiple surfaces:
[0085] The curved surface is a plane with an irregular shape.
[0086] In a possible implementation manner, S602 specifically includes:
[0087] S6021: Generate an initial surface within the contour boundary according to the color gradient information in pixels.
[0088] S6022: Perform weighted averaging on the original surface points and original change points adjacent to the original vertex in the initial surface, and update the original vertex:
[0089]
[0090] Among them, V a ' represents the updated original vertex, V a represents the original vertex, u represents the number of edges adjacent to the original vertex, F represents the average value of the face points adjacent to the original vertex, and E represents the average value of the midpoints of the edges adjacent to the original vertex.
[0091] S6023: Update the edge points in the initial surface:
[0092]
[0093] Among them, V1 q and V2 q represent the first and second endpoints of the qth edge in the initial surface, respectively, and F1 q and F2 q denote the first and second face centers of the two faces adjacent to the qth edge, respectively. b′ Indicates the updated edge point coordinates.
[0094] S6024: Update the surface points in the initial surface according to the updated original vertices:
[0095]
[0096] Among them, A represents the total number of original vertices after update, V' aj represents the original vertex after the jth update.
[0097] S6025: Add 1 to the number of iterations, and return to step S6021 until the number of iterations is greater than the preset number of iterations.
[0098] It should be noted that those skilled in the art can set the preset number of iterations according to actual needs, and the present invention does not limit this.
[0099] S6026: Based on the principle that the fill color of each surface is consistent, the updated vertices are combined with the corresponding edge points and face points to obtain multiple subdivided surfaces.
[0100] Among them, the vertex is the basic unit of the surface mesh, that is, the corner point of a polygon (such as a quadrilateral, triangle, etc.). The shape of a polygon is defined by the position of the vertex. During the subdivision process, the position of the original vertex will be updated to make the surface smoother. This update method is to generate new subdivision vertices by considering the positions of the face points and edge points adjacent to the vertex. In the subdivided mesh, the vertex depends not only on its original position, but also on the information of its adjacent faces and edges. This adjustment ensures that the original rough curve or surface gradually becomes smooth. The edge point is a new point generated after subdivision, located in the middle of each edge of the mesh. The two vertices of each edge and the adjacent faces jointly determine the position of the new edge point. The introduction of edge points allows the surface to be further subdivided. After subdivision, the new edge point will be used as a vertex in the newly generated mesh and participate in the construction of the new polygonal patch. The position of the edge point is calculated by the two vertices of the original edge and the centers of the two adjacent faces. This process ensures the smoothness and boundary consistency of the edge. The face point is the center point of each polygonal face (quadrilateral or triangle). The face point is calculated by the average value of all the vertices of the face. The face point is used to help define the position of the newly generated face. As the surface is subdivided, each face will generate a new center point. These face points, edge points, and vertices together constitute the subdivided surface. The position of the face point is calculated by the average value of the vertex positions related to the face. During the subdivision process, the position of the face point will affect the adjustment of the surrounding vertices, so that the shape of the entire mesh gradually tends to be smooth.
[0101] It should be noted that the positions of vertices, edge points and face points are continuously updated through the surface subdivision algorithm, so that the surface gradually becomes smooth and fine. This method can refine the geometric structure of complex areas while maintaining the overall shape characteristics, ensuring that the subdivided surface is smooth and continuous, and supports more accurate color filling. It is suitable for processing surfaces with irregular and complex shapes, and improves visual performance and computing efficiency. S603: Fill the subdivided surfaces with color according to the color gradient information.
[0102] In actual application, each surface can be filled with color through diffusion curves. By extracting the contour boundary of the color-filled area and combining it with the color gradient information, S6 uses a surface subdivision algorithm to divide the complex area into multiple small surfaces, so that the color can smoothly transition on these surfaces. Finally, the color is filled in with the diffusion curve to ensure the naturalness and accuracy of the color gradient. It is particularly suitable for processing irregularly shaped planes, improving the visual effect and accurately reproducing the creator's drawing intention.
[0103] S7: Outputting the color-filled fitting curve as a computer-drawn image corresponding to the drawing data.
[0104] In actual application, this method based on computer drawing control can accurately capture the designer's drawing intention and generate smooth and complex curves and color transitions by combining the designer's drawing data, curve fitting, elastic energy constraints, non-uniform node subdivision and surface subdivision algorithms. This method can not only automatically optimize curves and color filling, reduce manual operations, but also improve drawing efficiency while ensuring accuracy, ensuring the flexibility and naturalness of drawing, and is particularly suitable for detail control and large-scale processing in complex art design.
[0105] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0106] In the present invention, in the process of reproducing the received drawing data in the computer, firstly, the fitting order selection function of the B-spline curve is established by combining the variational method and Sobolev regularization, and the fitting order of the B-spline curve is automatically determined to improve the fitting efficiency and accuracy, and avoid the problem of large fitting deviation caused by subjective selection of the fitting order. Then, in combination with the elastic energy constraint of the fitting curve, a fitting control function that measures the fitting error between the fitting curve and the curve trajectory is established, and the fitting error in the fitting control function is minimized as the termination goal. The fitting curve is subdivided into non-uniform nodes, and the smoothness of the curve is effectively controlled by combining the elastic energy constraint of the fitting curve. More refined local adjustment is achieved through non-uniform node subdivision, which can ensure the fitting accuracy while avoiding overfitting, reducing unnecessary calculation overhead, and making the curve both accurate and smooth. Then, on the basis of accurately fitting the curve trajectory, the surface subdivision algorithm is combined to fill the color filling area with color, and the color filling area can be refined to perform fine-grained color diffusion on it, thereby improving the reproduction effect of the creator's drawing data, and then improving the reproduction accuracy of the drawing data in an automated manner, and reducing the problems of low drawing efficiency and strong subjectivity caused by frequent human intervention.
[0107] Reference Manual Attached Figure 2 , showing a structural schematic diagram of a computer drawing control system based on art design provided by the present invention.
[0108] The present invention further provides a computer drawing control system 20 based on art design, which is applied to the above-mentioned computer drawing control method based on art design, comprising:
[0109] Processor 201.
[0110] The memory 202 stores computer-readable instructions. When the computer-readable instructions are executed by the processor 201 , the computer drawing control method based on art design as in the method embodiment is implemented.
[0111] The art design-based computer graphics control system 20 provided by the present invention can execute the above-mentioned art design-based computer graphics control method and achieve the same or similar technical effects. To avoid repetition, the present invention will not go into details.
[0112] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0113] In the present invention, in the process of reproducing the received drawing data in the computer, firstly, the fitting order selection function of the B-spline curve is established by combining the variational method and Sobolev regularization, and the fitting order of the B-spline curve is automatically determined to improve the fitting efficiency and accuracy, and avoid the problem of large fitting deviation caused by subjective selection of the fitting order. Then, in combination with the elastic energy constraint of the fitting curve, a fitting control function that measures the fitting error between the fitting curve and the curve trajectory is established, and the fitting error in the fitting control function is minimized as the termination goal. The fitting curve is subdivided into non-uniform nodes, and the smoothness of the curve is effectively controlled by combining the elastic energy constraint of the fitting curve. More refined local adjustment is achieved through non-uniform node subdivision, which can ensure the fitting accuracy while avoiding overfitting, reducing unnecessary calculation overhead, and making the curve both accurate and smooth. Then, on the basis of accurately fitting the curve trajectory, the surface subdivision algorithm is combined to fill the color filling area with color, and the color filling area can be refined to perform fine-grained color diffusion on it, thereby improving the reproduction effect of the creator's drawing data, and then improving the reproduction accuracy of the drawing data in an automated manner, and reducing the problems of low drawing efficiency and strong subjectivity caused by frequent human intervention.
[0114] It should be understood that the processor in the embodiment of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0115] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0116] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0117] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.
[0118] In the present invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0119] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0120] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0121] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0122] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0123] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0124] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0125] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0126] An embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the computer drawing control method based on art design as described in the method embodiment is implemented.
[0127] A computer-readable storage medium provided by the present invention can implement the steps and effects of the computer drawing control method based on art design in the above method embodiment. To avoid repetition, the present invention will not go into details.
[0128] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0129] In the present invention, in the process of reproducing the received drawing data in the computer, firstly, the fitting order selection function of the B-spline curve is established by combining the variational method and Sobolev regularization, and the fitting order of the B-spline curve is automatically determined to improve the fitting efficiency and accuracy, and avoid the problem of large fitting deviation caused by subjective selection of the fitting order. Then, in combination with the elastic energy constraint of the fitting curve, a fitting control function that measures the fitting error between the fitting curve and the curve trajectory is established, and the fitting error in the fitting control function is minimized as the termination goal. The fitting curve is subdivided into non-uniform nodes, and the smoothness of the curve is effectively controlled by combining the elastic energy constraint of the fitting curve. More refined local adjustment is achieved through non-uniform node subdivision, which can ensure the fitting accuracy while avoiding overfitting, reducing unnecessary calculation overhead, and making the curve both accurate and smooth. Then, on the basis of accurately fitting the curve trajectory, the surface subdivision algorithm is combined to fill the color filling area with color, and the color filling area can be refined to perform fine-grained color diffusion on it, thereby improving the reproduction effect of the creator's drawing data, and then improving the reproduction accuracy of the drawing data in an automated manner, and reducing the problems of low drawing efficiency and strong subjectivity caused by frequent human intervention.
[0130] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
[0131] There are a few points to note:
[0132] (1) The drawings of the embodiments of the present invention only relate to the structures related to the embodiments of the present invention, and other structures may refer to the general design.
[0133] (2) For the sake of clarity, in the drawings used to describe the embodiments of the present invention, the thickness of the layers or regions is exaggerated or reduced, that is, these drawings are not drawn according to the actual scale. It is understood that when an element such as a layer, film, region or substrate is referred to as being "on" or "under" another element, the element may be "directly" "on" or "under" the other element or there may be intermediate elements.
[0134] (3) In the absence of conflict, the embodiments of the present invention and the features therein may be combined with each other to obtain new embodiments.
[0135] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. The protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A computer drawing control method based on art design, characterized in that: include: S1: receiving drawing data from a designer, wherein the drawing data includes a curve track and a color-filled area; S2: Combining the calculus of variations and Sobolev regularization to establish the fitting order selection function of the B-spline curve; S3: determining a target fitting order according to the fitting order selection function, fitting the curve trajectory using a B-spline curve with the target fitting order, and outputting a fitting curve; S4: combining the elastic energy constraint of the fitting curve, establishing a fitting control function for measuring the fitting error between the fitting curve and the curve trajectory; S5: performing non-uniform node subdivision on the fitting curve with minimizing the fitting error in the fitting control function as the termination goal; S6: Filling the subdivided fitting curve with color according to the color filling area in combination with the surface subdivision algorithm; S7: Outputting the color-filled fitting curve as a computer-drawn image corresponding to the drawing data.
2. The computer graphics control method based on art design according to claim 1, characterized in that: The S1 is specifically: The drawing data is collected through an electronic drawing board.
3. The computer graphics control method based on art design according to claim 2, characterized in that: The S3 specifically includes: S301: Selecting initial control points from the curve trajectory, wherein the initial control points include a starting point, an extreme point, a curvature change point, and an end point; S302: selecting a plurality of nodes from the curve trajectory in combination with the target fitting order; S303: Determine the fitting curve in a recursive manner based on the initial control points and the node vectors.
4. The computer graphics control method based on art design according to claim 1, characterized in that: The S5 specifically includes: S501: inserting new nodes into the node vector of the fitting curve in an evenly spaced manner; S502: Determine the subdivision control points of the fitting curve in a recursive manner according to the inserted new nodes; S503: Repeat step S501 to step S502 until the termination target is reached: S504: updating the fitting curve based on the interpolated node vectors and the subdivided control points.
5. The computer graphics control method based on art design according to claim 1, characterized in that: The S6 specifically includes: S601: extracting the outline boundary and color gradient information of the color filling area; S602: Subdividing the color-filled area according to the contour boundary and the color gradient information by using a surface subdivision algorithm to obtain a plurality of surfaces: S603: Filling each subdivided surface with color according to the color gradient information.
6. The computer graphics control method based on art design according to claim 5, characterized in that: The S602 specifically includes: S6021: Generate an initial curved surface in pixels according to the color gradient information within the contour boundary; S6022: Perform weighted averaging on the original surface points and original change points adjacent to the original vertex in the initial curved surface, and update the original vertex; S6023: Update the edge points in the initial surface; S6024: updating the surface points in the initial surface according to the updated original vertices; S6025: The number of iterations is increased by 1, and the process returns to step S6021 until the number of iterations is greater than the preset number of iterations; S6026: Based on the principle that the fill color of each surface is consistent, the updated vertices are combined with the corresponding edge points and face points to obtain multiple subdivided surfaces.
7. A computer graphics control system based on art design, the system implements the method according to claims 1-6, characterized in that: include: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the computer drawing control method based on art design as claimed in any one of claims 1 to 8 is implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the computer drawing control method based on artistic design as claimed in any one of claims 1 to 6 is implemented.