Scheme for dynamically adjusting thickness of head and tail of line

By using the combination of input module, buffer module and processing module in computer graphics processing, dynamically adjusting the line thickness, solving the problem of inflexible changes in line thickness in the prior art, and improving processing efficiency and writing experience.

CN119027548APending Publication Date: 2024-11-26合肥栈顶信息科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411121336.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

Existing computer graphics processing methods lack dynamicity in dealing with changes in line thickness when users write, resulting in fixed line thickness, unnatural senses, inefficient, and may lead to repeated calculations and waste of resources.

Method used

Using a solution including input module, buffer module and processing module, we can collect and store discrete points in real time, dynamically adjust the thickness of lines, and use the buffer to provide decision time backward and context information to achieve adaptive thickness adjustment.

Benefits of technology

It realizes dynamic adjustment of line thickness, improves processing efficiency, reduces repeated calculations, provides a more natural and flexible writing experience, and improves the efficiency and performance of graphics processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119027548A_ABST
    Figure CN119027548A_ABST
Patent Text Reader

Abstract

The invention discloses a scheme for dynamically adjusting head and tail thicknesses of lines, and relates to the technical field of computer graphic processing. The scheme for dynamically adjusting the thickness of the head and the tail of the line comprises an input module, a buffer module and a processing module, the input module is in signal transmission connection with the buffer module, and the buffer module further has decision time backward movement, context information utilization and dynamic graph adjustment capability functions; wherein the input module is used for collecting discrete points written on a screen by a user in real time; the buffer module is used for storing the collected discrete points to form a buffer area; and the processing module dynamically adjusts the thickness of the line according to the points in the cache region. According to the scheme for dynamically adjusting the thickness of the head and the tail of the line, the concept of determining the point set and the buffer point set is introduced, repeated calculation and resource waste are reduced, the graphic processing efficiency is improved, through the method, more natural and flexible writing experience can be provided for a user, and meanwhile the graphic processing efficiency and performance are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of computer graphics processing, and in particular to a solution for dynamically adjusting the thickness of the beginning and the end of a line. Background Art

[0002] In the field of computer graphics processing, when a user writes or draws on the screen, the system needs to collect and process discrete points in real time to construct lines. The thickness of the lines not only affects the visual effect, but also affects the user's writing experience and artistic expression.

[0003] Existing computer graphics processing methods usually adopt a fixed line width strategy, that is, the thickness of the line remains unchanged throughout the drawing process. Although this method is simple and direct, it lacks expressiveness and flexibility in some application scenarios. For example, in digital painting, artists may want the thickness of the line to change with the change of brush strokes to simulate the real painting effect;

[0004] Therefore, the existing technology has the following problems in processing the changes in line thickness when the user writes: Lack of dynamism: The changes in line thickness are usually fixed and cannot be adjusted dynamically according to the user's real-time writing. If a thick line is written, the line generated from the brush stroke is thick, which feels unnatural and inefficient. When processing a large number of discrete points in real time, the existing method may cause repeated calculations and waste of resources, affecting processing efficiency. Summary of the invention

[0005] The purpose of the present invention is to solve at least one of the technical problems existing in the prior art, and to provide a solution for dynamically adjusting the thickness of the beginning and end of a line, which can solve the following problems existing in the prior art in processing the thickness changes of lines when the user writes: Lack of dynamism: The thickness changes of lines are usually fixed and cannot be dynamically adjusted according to the real-time writing of the user. If thick lines are written, the lines generated from the brush strokes are thick, which feels unnatural and inefficient. When processing a large number of discrete points in real time, the existing methods may lead to repeated calculations and waste of resources, affecting processing efficiency.

[0006] To achieve the above-mentioned purpose, the present invention provides the following technical solutions: a solution for dynamically adjusting the thickness of the beginning and end of a line, comprising an input module, a buffer module and a processing module, wherein the input module is connected to the buffer module through signal transmission, and the buffer module also includes functions of decision time shifting, context information utilization, and dynamic image adjustment capability;

[0007] Among them, the input module is responsible for collecting the discrete points written by the user on the screen in real time;

[0008] The buffer module is used to store the collected discrete points to form a buffer area;

[0009] The processing module dynamically adjusts the thickness of the line according to the points in the cache area.

[0010] Preferably, the input module collects user writing data in real time through a touch screen or a digital pen, processes it, obtains a discrete point of coordinates and pressure parameters, and transmits these points to the cache module.

[0011] Preferably, the buffer module receives discrete points from the input module and stores them in a buffer area, and the size of the buffer area can be adjusted according to actual needs to ensure that there are enough points for subsequent processing.

[0012] Preferably, the processing module dynamically adjusts the thickness of the line according to the points in the buffer area. The specific steps are as follows:

[0013] Step 1, point analysis: Analyze the points in the buffer area and extract key parameters, such as writing speed, pressure changes, etc.

[0014] Step 2, thickness adjustment: dynamically adjust the thickness of the line according to the extracted parameters. The adjustment algorithm can adopt an adaptive algorithm to adjust the width of the line according to different parameter values.

[0015] Step 3, path construction: construct the line path according to the adjusted line width.

[0016] Preferably, the implementation scheme of the input module is that the user writes on the screen, and the input module can receive touch events and convert these events into our own data structure;

[0017] It contains at least the following members: point coordinates, original pressure coefficient (indicating the actual thickness of the current point coordinates), repaired pressure coefficient (adjusting the coefficient of the point coordinates according to the context). The point data is passed to the buffer module, which is the implementation method of the buffer module.

[0018] Preferably, the buffer module first divides a fixed memory area to store a fixed number of point data. When the point data does not fill this area, the data is pushed into this area in sequence. When it is full, the first-in-first-out logic is used to push out the first-in point data. Figure 1 ;

[0019] The data of the entire buffer will serve as the context for deciding the data of each point. Under this premise, we can make smoother adjustments to the point data in the buffer.

[0020] Preferably, the implementation scheme of the processing module is as follows: first, the processing module is based on the data structure of the buffer module and relies on the point data provided by the input module (taking the buffer size of 5 and the minimum line thickness of 1 as an example);

[0021] When the input module receives point data, it first pushes the point data into the buffer, and constructs a line change from thin to thick / from thick to thin based on the beginning taper / end taper;

[0022] Calculate the step size of the thickness change:

[0023] (Last pushed point data thickness - minimum line thickness) / buffer size;

[0024] The thickness of the head buffer point data is: minimum line thickness + (step length * sequence);

[0025] The thickness of the tail buffer point data is: the last determined point - (step length * sequence);

[0026] Assuming the header thickness is 3, the header buffer has the following limits:

[0027] Step size: 0.4;

[0028] The thickness of the first point cannot exceed 1.0, the thickness of the second point cannot exceed 1.4, the thickness of the third point cannot exceed 1.8, the thickness of the fourth point cannot exceed 2.2, and the thickness of the fifth point cannot exceed 2.6. When it is finally pushed out of the buffer, its thickness is restored to 3;

[0029] This limits the thickness of the first few points to a conical range, completing the change from thin to thick.

[0030] Preferably, the step size of the tail taper is determined by the last point in the determined point set. Assuming that the thickness of this point is 4, the limiting thickness of the tail buffer is as follows:

[0031] Step size: 0.6;

[0032] The thickness of the first point cannot exceed 3.4, the thickness of the second point cannot exceed 2.8, the thickness of the third point cannot exceed 2.2, the thickness of the fourth point cannot exceed 1.6, and the thickness of the fifth point cannot exceed 1.0. This completes the taper of the tail.

[0033] As the user keeps writing, the point set keeps being added, and the last point keeps changing. The taper of the tail also changes with the user's writing, so each point changes from thin to thick, visually simulating the effect of ink smudges when writing on paper.

[0034] At the same time, since a lot of calculations are involved, we introduced a buffer to limit a lot of calculations to the limited controls of the buffer without affecting the determined point set, which greatly improves the calculation efficiency when processing the tail taper.

[0035] Preferably, the buffer area provides the system with more decision time and context information, thereby enhancing the flexibility and decision-making ability of the system. The specific advantages are as follows:

[0036] Decision time is shifted back: After the introduction of the buffer point set, the determination time of the point parameters is shifted from the moment the point is collected to the moment when the buffer is full / the determination condition is met.

[0037] Context information utilization: Points in the cache area can utilize more context information, such as user writing speed, pressure changes, etc., to more accurately adjust the thickness of the line.

[0038] Dynamic adjustment capability: The buffer area enables the system to dynamically adjust the thickness of the line according to the real-time writing situation, achieving a more natural and flexible writing experience.

[0039] Compared with the prior art, the present invention has the following beneficial effects:

[0040] (1) The scheme for dynamically adjusting the thickness of the beginning and end of a line, dynamically adjusting the thickness of a line: dynamically adjusting the thickness of a line according to the user's real-time writing, achieving a visual change from thin to thick, and improving processing efficiency. By introducing the concepts of a fixed point set and a buffer point set, repeated calculations and resource waste are reduced, and the efficiency of graphics processing is improved. Through the above method, the present invention can provide users with a more natural and flexible writing experience, while improving the efficiency and performance of graphics processing.

[0041] (2) The scheme for dynamically adjusting the thickness of the beginning and end of the line moves the decision time backward: after introducing the buffer point set, the determination time of the point parameters is moved back from the moment the point is collected to the moment when the buffer is full / the determination condition is met;

[0042] Contextual information utilization: Points in the cache area can utilize more contextual information, such as the user's writing speed and pressure changes, so as to more accurately adjust the thickness of the line;

[0043] Dynamic adjustment capability: The buffer area enables the system to dynamically adjust the thickness of the line according to the real-time writing situation, achieving a more natural and flexible writing experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The present invention is further described below in conjunction with the accompanying drawings and embodiments:

[0045] Figure 1 This is a schematic diagram of the first-in-first-out buffer zone of the present invention;

[0046] Figure 2 This is a schematic diagram of the change in the taper of the head in the writing direction of the present invention;

[0047] Figure 3 This is a schematic diagram of the taper of the tail in the writing direction of the present invention;

[0048] Figure 4 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION

[0049] This section will describe in detail the specific embodiments of the present invention. The preferred embodiments of the present invention are shown in the accompanying drawings. The purpose of the accompanying drawings is to supplement the description of the text part of the specification with graphics, so that people can intuitively and vividly understand each technical feature and the overall technical solution of the present invention, but it cannot be understood as a limitation on the scope of protection of the present invention.

[0050] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., and orientations or positional relationships indicated are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.

[0051] In the description of the present invention, "greater than", "less than", "exceed" etc. are understood as not including the number itself, and "above", "below", "within" etc. are understood as including the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.

[0052] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.

[0053] See also Figure 1-4 ,The present invention provides a technical solution: a solution for dynamically adjusting the thickness of the beginning and end of a line, comprising an input module, a buffer module and a processing module, wherein the input module is connected to the buffer module for signal transmission;

[0054] The buffer module is connected with the processing module for signal transmission;

[0055] The buffer module also includes functions such as decision time shifting, context information utilization, and dynamic image adjustment capabilities;

[0056] Among them, the input module is responsible for collecting the discrete points written by the user on the screen in real time;

[0057] The buffer module is used to store the collected discrete points to form a buffer area;

[0058] The processing module dynamically adjusts the thickness of the line according to the points in the cache area;

[0059] Furthermore, the input module collects the user's writing data in real time through the touch screen or digital pen, processes it, obtains a discrete point of coordinates and pressure parameters, and transmits these points to the cache module;

[0060] The buffer module receives discrete points from the input module and stores them in the buffer area. The size of the buffer area can be adjusted according to actual needs to ensure that there are enough points for subsequent processing;

[0061] The processing module dynamically adjusts the thickness of the line according to the points in the cache area. The specific steps are as follows:

[0062] Step 1, point analysis: Analyze the points in the buffer area and extract key parameters, such as writing speed, pressure changes, etc.

[0063] Step 2, thickness adjustment: dynamically adjust the thickness of the line according to the extracted parameters. The adjustment algorithm can adopt an adaptive algorithm to adjust the width of the line according to different parameter values.

[0064] Step 3: Path construction: construct the line path according to the adjusted line width;

[0065] Furthermore, the implementation of the input module is that the user writes on the screen, and the input module can receive touch events and convert these events into our own data structure;

[0066] It contains at least the following members: point coordinates, original pressure coefficient (indicates the actual thickness of the current point coordinates), repaired pressure coefficient (adjusts the coefficient of the point coordinates according to the context) This point data is passed to the buffer module. The implementation method of the buffer module;

[0067] The buffer module first divides a fixed memory area to store a fixed number of point data. When the point data does not fill this area, the data is pushed into this area in order. When it is full, the first-in-first-out logic is used to push out the first-in point data. For details, see Figure 1 ;

[0068] The data of the entire buffer will serve as the context for deciding the data of each point. Under this premise, we can make smoother adjustments to the point data in the buffer.

[0069] Implementation scheme of the processing module: First, the processing module is based on the data structure of the buffer module and relies on the point data provided by the input module (taking the buffer size of 5 and the minimum line thickness of 1 as an example);

[0070] When the input module receives point data, it first pushes the point data into the buffer, and constructs a line change from thin to thick / from thick to thin based on the beginning taper / end taper;

[0071] Calculate the step size of the thickness change:

[0072] (Last pushed point data thickness - minimum line thickness) / buffer size;

[0073] The thickness of the head buffer point data is: minimum line thickness + (step length * sequence);

[0074] The thickness of the tail buffer point data is: the last determined point - (step length * sequence);

[0075] Assuming the header thickness is 3, the header buffer has the following limits:

[0076] Step size: 0.4;

[0077] The thickness of the first point cannot exceed 1.0, the thickness of the second point cannot exceed 1.4, the thickness of the third point cannot exceed 1.8, the thickness of the fourth point cannot exceed 2.2, and the thickness of the fifth point cannot exceed 2.6. When it is finally pushed out of the buffer, its thickness is restored to 3;

[0078] In this way, the thickness of the first few points is limited to a cone range, completing the change from thin to thick. Figure 2 ;

[0079] The following example uses the tail taper to explain how to reflect the dynamic changes and the role of the buffer zone. Figure 3 ;

[0080] The step size of the tail taper is determined by the last point in the determined point set. Assuming that the thickness of this point is 4, the limiting thickness of the tail buffer is as follows:

[0081] Step size: 0.6;

[0082] The thickness of the first point cannot exceed 3.4, the thickness of the second point cannot exceed 2.8, the thickness of the third point cannot exceed 2.2, the thickness of the fourth point cannot exceed 1.6, and the thickness of the fifth point cannot exceed 1.0. This completes the taper of the tail.

[0083] As the user keeps writing, the point set keeps being added, and the last point keeps changing. The taper of the tail also changes with the user's writing, so each point changes from thin to thick, visually simulating the effect of ink smudges when writing on paper.

[0084] At the same time, since a lot of calculations are involved, we introduced a buffer to limit a lot of calculations to the limited controls of the buffer without affecting the determined point set, which greatly improves the calculation efficiency when processing the tail taper.

[0085] And by introducing the buffer area, the system is provided with more decision-making time and contextual information, thereby enhancing the flexibility and decision-making ability of the system. The specific advantages are as follows:

[0086] Decision time is shifted back: After the introduction of the buffer point set, the determination time of the point parameters is shifted from the moment the point is collected to the moment when the buffer is full / the determination condition is met.

[0087] Context information utilization: Points in the cache area can utilize more context information, such as user writing speed, pressure changes, etc., to more accurately adjust the thickness of the line.

[0088] Dynamic adjustment capability: The buffer area enables the system to dynamically adjust the thickness of the line according to the real-time writing situation, achieving a more natural and flexible writing experience.

[0089] Working principle: Dynamically adjust line thickness: According to the user's real-time writing, dynamically adjust the thickness of the line to achieve a visual change from thin to thick, improve processing efficiency, and introduce the concepts of determining point sets and buffering point sets to reduce repeated calculations and resource waste, thereby improving the efficiency of graphics processing. Through the above method, the present invention can provide users with a more natural and flexible writing experience while improving the efficiency and performance of graphics processing.

[0090] The embodiments of the present invention are described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Various changes can be made within the knowledge scope of ordinary technicians in the technical field without departing from the purpose of the present invention.

Claims

1. A solution for dynamically adjusting the thickness of the beginning and end of a line, comprising an input module, a buffer module and a processing module, wherein the input module is connected to the buffer module for signal transmission, and is characterized in that: The buffer module also includes decision time shift, context information utilization, and dynamic image adjustment capabilities; Among them, the input module is responsible for collecting the discrete points written by the user on the screen in real time; The buffer module is used to store the collected discrete points to form a buffer area; The processing module dynamically adjusts the thickness of the line according to the points in the cache area.

2. A solution for dynamically adjusting the thickness of the beginning and end of a line according to claim 1, characterized in that: The input module collects user writing data in real time through a touch screen or a digital pen, obtains a discrete point of coordinates and pressure parameters after processing, and transmits these points to the cache module.

3. A solution for dynamically adjusting the thickness of the beginning and end of a line according to claim 1, characterized in that: The buffer module receives discrete points from the input module and stores them in a buffer area. The size of the buffer area can be adjusted according to actual needs to ensure that there are enough points for subsequent processing.

4. The method for dynamically adjusting the thickness of the beginning and the end of a line according to claim 1, characterized in that: The processing module dynamically adjusts the thickness of the line according to the points in the buffer area. The specific steps are as follows: Step 1, point analysis: Analyze the points in the buffer area and extract key parameters, such as writing speed, pressure changes, etc. Step 2, thickness adjustment: dynamically adjust the thickness of the line according to the extracted parameters. The adjustment algorithm can adopt an adaptive algorithm to adjust the width of the line according to different parameter values. Step 3, path construction: construct the line path according to the adjusted line width.

5. The method for dynamically adjusting the thickness of the beginning and the end of a line according to claim 1, characterized in that: The implementation scheme of the input module is that the user writes on the screen, and the input module can receive touch events and convert these events into our own data structure; It contains at least the following members: point coordinates, original pressure coefficient (indicating the actual thickness of the current point coordinates), repaired pressure coefficient (adjusting the coefficient of the point coordinates according to the context). The point data is passed to the buffer module, which is the implementation method of the buffer module.

6. The method for dynamically adjusting the thickness of the beginning and the end of a line according to claim 1, characterized in that: The buffer module first divides a fixed memory area to store a fixed number of point data. When the point data does not fill this area, the data is pushed into this area in sequence. When it is full, the first-in-first-out logic is used to push out the first-in point data, as shown in Figure 1; The data of the entire buffer will serve as the context for deciding the data of each point. Under this premise, we can make smoother adjustments to the point data in the buffer.

7. The method for dynamically adjusting the thickness of the beginning and the end of a line according to claim 1, characterized in that: The implementation scheme of the processing module is as follows: first, the processing module is based on the data structure of the buffer module and relies on the point data provided by the input module (taking the buffer size of 5 and the minimum line thickness of 1 as an example); When the input module receives point data, it first pushes the point data into the buffer, and constructs a line change from thin to thick / from thick to thin based on the beginning taper / end taper; Calculate the step size of the thickness change: (Last pushed point data thickness - minimum line thickness) / buffer size; The thickness of the head buffer point data is: minimum line thickness + (step length * sequence); The thickness of the tail buffer point data is: the last determined point - (step length * sequence); Assuming the header thickness is 3, the header buffer has the following limits: Step size: 0.4; The thickness of the first point cannot exceed 1.0, the thickness of the second point cannot exceed 1.4, the thickness of the third point cannot exceed 1.8, the thickness of the fourth point cannot exceed 2.2, and the thickness of the fifth point cannot exceed 2.

6. When it is finally pushed out of the buffer, its thickness is restored to 3; This limits the thickness of the first few points to a conical range, completing the change from thin to thick.

8. A solution for dynamically adjusting the thickness of the beginning and end of a line according to claim 7, characterized in that: The step size of the tail taper is determined by the last point in the determined point set. Assuming that the thickness of this point is 4, the limiting thickness of the tail buffer is as follows: Step size: 0.6; The thickness of the first point cannot exceed 3.4, the thickness of the second point cannot exceed 2.8, the thickness of the third point cannot exceed 2.2, the thickness of the fourth point cannot exceed 1.6, and the thickness of the fifth point cannot exceed 1.

0. This completes the taper of the tail. As the user keeps writing, the point set keeps being added, and the last point keeps changing. The taper of the tail also changes with the user's writing, so each point changes from thin to thick, visually simulating the effect of ink smudges when writing on paper. At the same time, since a lot of calculations are involved, we introduced a buffer to limit a lot of calculations to the limited controls of the buffer without affecting the determined point set, which greatly improves the calculation efficiency when processing the tail taper.

9. The method for dynamically adjusting the thickness of the beginning and the end of a line according to claim 1, characterized in that: The buffer area provides the system with more decision-making time and context information, thereby enhancing the flexibility and decision-making ability of the system. The specific advantages are as follows: Decision time is shifted back: After the introduction of the buffer point set, the determination time of the point parameters is shifted from the moment the point is collected to the moment when the buffer is full / the determination condition is met. Context information utilization: Points in the cache area can utilize more context information, such as user writing speed, pressure changes, etc., to more accurately adjust the thickness of the line. Dynamic adjustment capability: The buffer area enables the system to dynamically adjust the thickness of the line according to the real-time writing situation, achieving a more natural and flexible writing experience.