CN114549344A - Graph smoothing method, graph smoothing equipment and storage medium - Google Patents

Graph smoothing method, graph smoothing equipment and storage medium Download PDF

Info

Publication number
CN114549344A
CN114549344A CN202210056521.3A CN202210056521A CN114549344A CN 114549344 A CN114549344 A CN 114549344A CN 202210056521 A CN202210056521 A CN 202210056521A CN 114549344 A CN114549344 A CN 114549344A
Authority
CN
China
Prior art keywords
line
fitting
lines
circular arc
arc
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.)
Pending
Application number
CN202210056521.3A
Other languages
Chinese (zh)
Inventor
李俊吉
朱李成
李桂胜
封雨鑫
陈焱
高云峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Han's Smart Control Technology Co ltd
Han s Laser Technology Industry Group Co Ltd
Original Assignee
Shenzhen Han's Smart Control Technology Co ltd
Han s Laser Technology Industry Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Han's Smart Control Technology Co ltd, Han s Laser Technology Industry Group Co Ltd filed Critical Shenzhen Han's Smart Control Technology Co ltd
Priority to CN202210056521.3A priority Critical patent/CN114549344A/en
Publication of CN114549344A publication Critical patent/CN114549344A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The application discloses a graph smoothing method, a graph smoothing device and a storage medium. The graph smoothing method comprises the following steps: A. decomposing a plurality of lines in the graph to obtain a set S consisting of straight lines and circular arcs; B. sequentially fitting the lines in the set S from the first section backward section by section to form a circular arc; C. if there is a line that cannot be fitted in the middle, fitting is continued from the line that cannot be fitted backward with a subsequent line. The graph smoothing method can be used for fitting each section of a multi-section line in the graph, so that the graph is smoother, control points of the graph are reduced, the graph is simplified, and the laser processing efficiency is improved.

Description

Graph smoothing method, graph smoothing equipment and storage medium
Technical Field
The present application relates to the field of laser processing technologies, and in particular, to a graph smoothing method, a graph smoothing apparatus, and a storage medium.
Background
Before processing a product, a laser processing apparatus needs to design a processing pattern, and process the product according to the processing pattern, for example, a pattern consistent with the pattern is printed on the product according to the pattern, or the product is cut into a shape consistent with the pattern, that is, the movement of a laser head is controlled according to the designed pattern. In the prior art, the control points on the graph for laser processing are too many and dense, so that a large memory is consumed, and meanwhile, the calculation speed is very slow, so that the laser processing efficiency is low.
Therefore, it is desirable to provide a graph smoothing method, a graph smoothing apparatus and a storage medium to solve the above problems.
Disclosure of Invention
The present application aims to provide a pattern smoothing method, a pattern smoothing apparatus, and a storage medium, which can smooth a pattern, reduce the number of control points in the pattern, and improve the efficiency of laser processing.
In order to realize the purpose, the following technical scheme is provided:
a method of smoothing a pattern, comprising the steps of:
A. decomposing a plurality of lines in the graph to obtain a set S consisting of straight lines and circular arcs;
B. sequentially fitting the lines in the set S from the first section backward section by section to form a circular arc;
C. if there is a line that cannot be fitted in the middle, fitting is continued from the line that cannot be fitted backward with a subsequent line.
As an alternative to the above-mentioned graph smoothing method, the step B specifically includes:
b1, traversing the lines in the set S from the first section of lines in the set S, if the length of the lines is less than a preset length threshold value, determining the lines as invalid sections, and continuing traversing, if the length of the lines is more than or equal to the preset length threshold value, determining the lines as valid sections, and adding the lines into the set R, wherein the lines are marked as L;
b2, fitting the line L in the set R and the line E behind the line L in the set S to obtain a fitted arc;
b3, judging whether the fitted circular arcs meet the error requirements, if so, successfully fitting, removing the line E from the set S, removing the line L from the set R, adding the fitted circular arcs into the set R, and continuously fitting the fitted circular arcs in the set R with the lines behind the line E in the set S; if not, the fitting is failed, the line L in the set R is reserved, the line E in the set S is added into the set R, and the line E in the set R and the line behind the line E in the set S are taken to continue fitting.
As an alternative to the above-mentioned graph smoothing method, the B2 specifically includes:
b21, taking a starting point p1, a middle point p2 and an end point p3 of the line L, taking a middle point p4 and an end point p5 of the line E, judging whether the p1 is equal to the p5, if so, obtaining a minimum circumscribed rectangle R of the points p1, p2, p3, p4 and p5, wherein an inscribed circle of the rectangle R is an arc formed by fitting the line L and the line E.
As an alternative to the above-described graph smoothing method, the B2 further includes:
b22, obtaining an arc with each of the points p2, p3, and p4, the point p1 and the point p5, obtaining three arcs, obtaining the convexity of each arc, calculating the average value t of the convexity, and obtaining the resulting arc with the points p1, p5, and the average value t of the convexity.
As an alternative to the above-mentioned graph smoothing method, the B3 specifically includes:
b31, judging whether the difference between the fitting circular arc and the original image meets the requirement or not, and judging whether the fitting circular arc meets the requirement of fitting precision or not;
b32, if the line E is consistent with the line E in the set S, judging that the fitting is successful, deleting the line E from the set S, removing the line L from the set R, adding the fitting circular arc into the set R, and continuously fitting the fitting circular arc in the set R with the line behind the line E in the set S;
b33, if one item is not matched, judging that the fitting is failed, keeping the line L in the set R, adding the line E in the set S into the set R, and continuously fitting the line E in the set R with the line behind the line E in the set S.
As an alternative to the above-mentioned graph smoothing method, the B31 specifically includes:
b311, judging whether the ratio of the length of the fitting circular arc to the length of the line E is larger than a ratio threshold Q, if so, indicating that the difference between the fitting result and the original image is larger, and judging that the difference between the fitting circular arc and the original image does not meet the requirement.
As an alternative to the above-described graph smoothing method, the B31 further includes:
b312, traversing the points p1, p2, p3, p4 and p5, and if the distance from one of the points to the fitting circular arc is greater than the precision M, indicating that the error of the fitting result is large, and judging that the fitting circular arc does not meet the precision requirement.
As an alternative to the above-mentioned graph smoothing method, the graph smoothing method further comprises the steps of:
b4, traversing each segment in the set R, if the segment is a circular arc, checking whether the distance from the middle point of the circular arc to the connecting line between the starting point and the end point of the circular arc is less than the precision M, if the distance is less than the precision M, indicating that the segment of the circular arc is closer to the straight line, and replacing the segment of the circular arc with the straight line.
A graphics smoothing apparatus, the graphics smoothing apparatus comprising:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a graphics smoothing method as described above.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the graphics smoothing method as described above.
Compared with the prior art, the embodiment of the application has the advantages that: the method can smooth the graph in laser processing and reduce the number of control points in the graph, specifically, a set consisting of a straight line and an arc is obtained by decomposing multiple sections of lines in the graph, then the line in the set is fitted backwards into the arc by one section, and when the situation that fitting cannot be performed is met, the fitting is continued backwards again from the line which cannot be fitted. Therefore, the graph is used for laser processing after being subjected to smoothing treatment, so that the number of control points in the graph is small, the graph is simplified, and the efficiency of laser processing can be improved.
Drawings
FIG. 1 is a block diagram of a flow chart of a graph smoothing method according to an embodiment of the present application;
FIG. 2 is a schematic illustration of the circular arc convexity calculation.
Detailed Description
The following detailed description of the embodiments of the present application, presented in the figures, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Example one
The embodiment discloses a graph smoothing method. Fig. 1 is a flowchart of a graph smoothing method according to an embodiment of the present application. As shown in fig. 1, the graph smoothing method may include the steps of:
s100, decomposing multiple lines in the graph to obtain a set S consisting of straight lines and arcs;
s200, sequentially fitting the lines in the set S from the first section backward section by section to obtain a fitting circular arc;
and S300, if the line which cannot be fitted exists in the middle, fitting is continued to the subsequent line from the line which cannot be fitted.
Specifically, the laser head processes the product according to a pre-designed pattern during laser processing. The graph is composed of a plurality of segments of lines, and because a plurality of control points are arranged on the plurality of segments of lines, the consumed memory of the graph is large, the operation speed is low, and the laser processing speed is low. In the application, the multiple lines forming the graph are exploded, the multiple lines are decomposed to obtain a set S formed by straight lines and circular arcs, then the lines in the set S are fitted to form the circular arcs, and the number of control points in the graph is reduced. The method specifically comprises the steps of fitting the lines in the set S from a first section to a second section sequentially backwards, fitting the first section of lines in the set S with the second section of lines to form a fitting circular arc, continuing to fit the fitted circular arc with a third section of lines, fitting the fitted circular arc with a fourth section of lines after the fitting to form a circular arc, and fitting the fitted circular arc with the fourth section of lines section by section backwards. If a line which cannot be fitted exists in the midway, the line which cannot be fitted is fitted with a subsequent line from the line which cannot be fitted. For example, when the first segment line is fitted with the second segment line, if the fitting is not possible, the second segment line is continuously fitted with the third segment line; if the second segment line and the third segment line can be fitted, fitting the fitted arc with the fourth segment line; and if the fitted arc cannot be fitted with the fourth segment line, continuing to fit the fourth segment line with the fifth segment line, and so on. After the fitting processing, the graph is smoother, the number of control points is less, the consumption of the memory can be reduced, and the graph processing speed is improved.
The graph processed by the graph smoothing method can be applied to laser processing equipment, and the laser processing equipment carries out laser processing on the workpiece according to the graph subjected to smoothing processing, so that the processing efficiency can be improved. It is understood that the graph smoothing method of the embodiment of the present application can also be applied to other fields, and is not limited herein.
In an embodiment, the step S200 specifically includes:
s210, traversing the lines in the set S from the first section of line in the set S, if the length of the line is less than a preset length threshold value, determining the line as an invalid section, and continuing traversing, if the length of the line is more than or equal to the preset length threshold value, determining the line as an valid section, and adding the section of line into the set R, wherein the section of line is marked as L;
s220, fitting the line L in the set R and the line E behind the line L in the set S to obtain a fitted arc if fitting is available;
s230, judging whether the fitted circular arcs meet the error requirements or not, if so, successfully fitting, deleting the line E from the set S, deleting the line L from the set R, adding the fitted circular arcs into the set R, and continuously fitting the fitted circular arcs in the set R with the lines behind the line E in the set S; if not, the fitting is failed, the line L in the set R is reserved, the line E in the set S is added into the set R, and the line E in the set R and the line behind the line E in the set S are taken to continue fitting.
Specifically, a set R is set. Firstly, traversing the lines in the set S from the first segment of lines in the set S, if the length of the line is greater than or equal to a preset length threshold value, regarding the segment of line as a valid line, and adding the segment of line into the set R. The reason for screening the lines by setting a length threshold is to screen the lines with shorter length, if the line length is shorter and is close to 0, the length of the line is directly judged to be 0, the next line is continuously traversed, and the line with the length of 0 does not participate in fitting. Simple examples are:
firstly, traversing lines in the set S from a first line in the set S, if the first line is judged not to be 0 (namely greater than a preset length threshold), adding the first line into the set R, marking the first line as L, and then marking the first line in the set S as E, namely a second line in the set S before the line L is originally added into the set R, and fitting the line L in the set R and the line E in the set S, wherein the two conditions of fitting and not fitting are as follows: 1. if fitting is available, obtaining a fitted circular arc, and judging whether the fitted circular arc meets the error requirement, wherein a specific judgment method is specifically introduced later, if the fitted circular arc meets the error requirement, the fitting is successful, the line E is removed from the set S, the line L is removed from the set R, the fitted circular arc is added into the R, a line behind the line E in the set S is assumed to be F, the fitted circular arc in the set R and the line F in the set S are continuously fitted, if the fitted circular arc does not meet the error requirement, the fitting is failed, the line L in the set R is reserved, the line E in the set S is added into the set R, and the line E in the set R and the line behind the line E in the set S are continuously fitted; 2. if the fitting can not be carried out, the line L in the set R is reserved, the line E in the set S is added into the set R, and the line E in the set R and the line F in the set S are taken to continue fitting. And continuously adding the lines in the set S into the set R according to the rule, fitting the lines in the set S section by section, and continuously circulating, wherein the newly added lines in the set R are always positioned at the last of the set R, namely, continuously fitting the last section of lines in the set R with the first section of lines in the set S, the last set S is an empty set, the set R is a set of fitting results, and the set R comprises the arcs which are subjected to fitting and the lines which cannot be fitted in the set S. And taking the set R as a result list, and putting the fitted circular arc into the set R. Meanwhile, the set R is set, so that calculation can be simplified, and the line in the set S is continuously put into the set R for fitting calculation.
Before fitting, it may also be determined whether the fitted line is 0, if so, the line is skipped and extended to the next line, for example, if E is 0, E is not fitted and is directly extended to the next line of E, that is, F and L are fitted.
In an embodiment, the step S220 specifically includes:
s221, a starting point p1, a middle point p2 and an end point p3 of the line L are taken, a middle point p4 and an end point p5 of the line E are taken, whether p1 is equal to p5 or not is judged, if the p1 is equal to the p5, a minimum circumscribed rectangle R of the points p1, p2, p3, p4 and p5 is obtained, and an inscribed circle of the rectangle R is an arc formed by fitting the line L and the line E.
S222, calculating an arc with each of the points p2, p3, and p4 and the points p1 and p5, respectively, obtaining three arcs, obtaining the convexity of each arc, calculating the average value t of the convexity, and obtaining the resulting arc with the points p1, p5, and the average value t of the convexity.
Specifically, step S221 and step S222 are specific fitting methods for fitting two lines. The fitting arc is determined by taking five points, namely, the starting point p1, the midpoint p2 and the end point p3 of the line L, the midpoint p4 and the end point p5 of the line E, because the line L and the line E are basically two adjacent lines and the line L is positioned before the line E, and the starting point p1, the midpoint p2 and the end point p3 of the line L and the midpoint p4 and the end point p5 of the line E basically represent the approximate shape and the trend of a graph formed by two lines of the line L and the line E.
In step S221, it is determined whether p1 is equal to p5 before fitting, and if so, the graph formed by line L and line E is substantially similar to a full circle, and the full circle is determined to be the arc formed by fitting line L and line E. The method for finding the circle is as follows: and finding out the minimum circumscribed rectangle R of the points p1, p2, p3, p4 and p5, wherein the inscribed circle of the rectangle R is the full circle.
If it is determined through the step S221 that the lines L and E are not full circles, the lines L and E are fitted by the method in the step S222. That is, an arc is obtained with each of the points p2, p3, and p4 and the points p1 and p5, respectively, three arcs are obtained, the convexity of each arc is obtained, the average value t of the convexity is calculated, and the resulting arc is obtained with the points p1, p5, and the average value t of the convexity. Briefly describing the definition of the convexity, the convexity is equal to the ratio of the height of the arc to the advancing distance of the arc, and referring to fig. 2, the height of the arc is H, the advancing distance of the arc is L, that is, the chord length, and the convexity is 2H/L; stated differently, the convexity can also be said to be the tangent of one of the four winds at the arc center angle, as shown in FIG. 2, the convexity of the arc is the tangent of angle β. Specifically, three points p2, p1 and p5 may define an arc, which is denoted as an arc a1, three points p3, p1 and p5 may define an arc a2, three points p4, p1 and p5 may define an arc A3, the convexity of the arc a1 is t1, the convexity of the arc a2 is t2, the convexity of the arc A3 is t3, the average convexity t of the three arcs is (t1+ t2+ t3)/3, and the resulting arc is obtained by the points p1, p5 and the average convexity t, which is an arc obtained by fitting the line L and the line E.
It is to be understood that, in the present application, step S222 may not be based on S221 as a prerequisite, that is, it is not necessary to determine whether the circle is a full circle through step S221, and then fit the line L and the line E through the method of step S222, and the line L and the line E may be directly fit through the method of step S222.
In step S221, a point set T may be set, and the points p1, p2, p3, p4, and p5 are all added to the point set T, so as to facilitate calculation, the point set T is emptied after one fitting is completed, the next fitting is continued, and the feature points for the next fitting are added to the point set T again. The set of set points T may serve to simplify the calculation.
Further, step S222 may further include a step of determining an arc, and determining that the difference between the arc and the original figure is not large. The judging step is as follows: and judging whether the ratio of the length of the obtained circular arc (the circular arc A1, the circular arc A2 and the circular arc A3) to the length of the line E is larger than a ratio threshold Q, wherein the ratio threshold Q is a preset maximum ratio, and if the ratio of the length of any circular arc to the length of the line E is larger than Q, the fitting result is larger than the original figure, the fitting is unsuccessful, and the fitting of the next segment is continued. When each arc satisfies that the ratio of the length to the length of the line E is not greater than the ratio threshold Q, the resulting arc is obtained by the method of obtaining the resulting arc by using the average value t of the convexity and the points p1 and p5 in step S222. After the result arc is obtained, it can be continuously judged whether the difference between the result arc and the original figure is large, namely, the ratio of the length of the result arc to the length of the line E is larger than the ratio threshold Q or not.
Further, step S230 specifically includes:
s231, judging whether the difference between the fitting circular arc and the original image meets the requirement or not, and judging whether the fitting circular arc meets the requirement of fitting precision or not;
s232, if the line E is consistent with the line E, judging that the fitting is successful, deleting the line E from the set S, removing the line L from the set R, adding the fitting arc into the set R, and continuously fitting the fitting arc in the set R with a line behind the line E in the set S;
and S233, if one item is not matched, judging that the fitting is failed, reserving the line L in the set R, adding the line E in the set S into the set R, and continuously fitting the line E in the set R with the line behind the line E in the set S.
Specifically, after the fitting arc is obtained in step S230, the fitting arc may be determined, the degree of difference between the fitting arc and the original image may be determined, and whether the fitting arc meets the accuracy requirement may be determined. And judging that the fitting fails when the difference between the fitting circular arc and the original image does not meet the requirement or the fitting precision of the fitting circular arc does not meet the requirement, and continuing to fit the subsequent line.
Further, step S231 specifically includes:
and S2311, judging whether the ratio of the length of the fitting circular arc to the length of the line E is greater than a ratio threshold Q, if so, indicating that the difference between the fitting result and the original image is large, and judging that the difference between the fitting circular arc and the original image does not meet the requirement.
Specifically, step S2311 is a method for determining a difference between the fitted arc and the original image, where the method also refers to whether a ratio of a length of the fitted arc to a length of the line E is greater than a ratio threshold Q, and if so, it indicates that a difference between the fitting result and the original image is large.
Step S231 further includes:
and S2312, traversing the points p1, p2, p3, p4 and p5, and if the distance from one of the points to the fitting arc is greater than the precision M, indicating that the error of the fitting result is large, and judging that the fitting arc does not meet the precision requirement.
Specifically, in step S2312, a precision M is preset to determine whether the fitted arc meets the fitting precision requirement, and if a distance from one of the points p1, p2, p3, p4, and p5 to the fitted arc is greater than the precision M, it indicates that the error of the fitting result is large and the fitted arc does not meet the precision requirement. The fitting accuracy may be 0.05, for example. The graph smoothing method can smooth the graph according to the specified precision M, and achieves the purposes of simplifying the graph and improving the processing efficiency.
In an embodiment, the graph smoothing method of the present application may further include the steps of:
s400, traversing each segment in the set R, if the segment is a circular arc, checking whether the distance from the middle point of the circular arc to the connecting line between the starting point and the end point of the circular arc is smaller than the precision M, if the distance is smaller than the precision M, indicating that the segment of the circular arc is closer to the straight line, and replacing the segment of the circular arc with the straight line.
Specifically, each arc in the set R is checked, and if the arc is closer to the straight line, the arc is directly replaced by the straight line, which can simplify the graph. Specifically, the middle point of the circular arc is denoted as H, the connecting line between the starting point and the ending point of the circular arc is denoted as I, and the line I is the chord corresponding to the circular arc. And calculating whether the distance from the point H to the line I is smaller than the precision M, if so, indicating that the arc is closer to the straight line, and directly replacing the arc with the straight line.
Example two
An embodiment of the present application further provides a graphics smoothing device, where the graphics smoothing device may include but is not limited to: one or more processors, memory.
The memory, which is a computer-readable storage medium, may be used for storing software programs, computer-executable programs, and modules, such as program instructions corresponding to the graph smoothing method in the embodiments of the present application. The processor executes various functional applications and data processing of the graphics smoothing device by running software programs, instructions and modules stored in the memory, i.e., implements the graphics smoothing method described above.
EXAMPLE III
A third embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a graph smoothing method, and the graph smoothing method includes the following steps:
s100, decomposing multiple lines in the graph to obtain a set S consisting of straight lines and arcs;
s200, sequentially fitting the lines in the set S from the first section backward section by section to obtain a fitting circular arc;
and S300, if the line which cannot be fitted exists in the middle, fitting is continued to the subsequent line from the line which cannot be fitted.
Of course, the computer-readable storage medium provided in the embodiments of the present application has computer-executable instructions that are not limited to the method operations described above, and may also perform related operations in the graph smoothing method provided in any embodiments of the present application.
From the above description of the embodiments, it is obvious for those skilled in the art that the present application can be implemented by software and necessary general hardware, and certainly can be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods described in the embodiments of the present application.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present application and the technical principles employed. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims (10)

1. A method of smoothing a pattern, comprising the steps of:
A. decomposing a plurality of lines in the graph to obtain a set S consisting of straight lines and circular arcs;
B. fitting the lines in the set S from the first section to the back section by section in sequence to form a circular arc;
C. if there is a line that cannot be fitted in the middle, fitting is continued from the line that cannot be fitted backward with a subsequent line.
2. The method for smoothing a picture according to claim 1, wherein the step B specifically comprises:
b1, traversing the lines in the set S from the first section of lines in the set S, if the length of the lines is less than a preset length threshold value, determining the lines as invalid sections, and continuing traversing, if the length of the lines is more than or equal to the preset length threshold value, determining the lines as valid sections, and adding the lines into the set R, wherein the lines are marked as L;
b2, fitting the line L in the set R and the line E behind the line L in the set S, and if fitting is available, obtaining a fitted arc;
b3, judging whether the fitted circular arcs meet the error requirements, if so, successfully fitting, removing the line E from the set S, removing the line L from the set R, adding the fitted circular arcs into the set R, and continuously fitting the fitted circular arcs in the set R with the lines behind the line E in the set S; if not, the fitting is failed, the line L in the set R is reserved, the line E in the set S is added into the set R, and the line E in the set R and the line behind the line E in the set S are taken to continue fitting.
3. The method according to claim 2, wherein B2 specifically includes:
b21, taking a starting point p1, a middle point p2 and an end point p3 of the line L, taking a middle point p4 and an end point p5 of the line E, judging whether the p1 is equal to the p5, if so, obtaining a minimum circumscribed rectangle R of the points p1, p2, p3, p4 and p5, wherein an inscribed circle of the rectangle R is an arc formed by fitting the line L and the line E.
4. The graphics smoothing method of claim 3, wherein the B2 further comprises:
b22, obtaining an arc with each of the points p2, p3, and p4, the point p1 and the point p5, obtaining three arcs, obtaining the convexity of each arc, calculating the average value t of the convexity, and obtaining the resulting arc with the points p1, p5, and the average value t of the convexity.
5. The method according to claim 4, wherein the B3 specifically includes:
b31, judging whether the difference between the fitting circular arc and the original image meets the requirement or not, and judging whether the fitting circular arc meets the requirement of fitting precision or not;
b32, if the line E is consistent with the line E in the set S, judging that the fitting is successful, deleting the line E from the set S, removing the line L from the set R, adding the fitting circular arc into the set R, and continuously fitting the fitting circular arc in the set R with the line behind the line E in the set S;
b33, if one item is not matched, judging that the fitting is failed, keeping the line L in the set R, adding the line E in the set S into the set R, and continuously fitting the line E in the set R with the line behind the line E in the set S.
6. The method according to claim 5, wherein the B31 specifically comprises:
b311, judging whether the ratio of the length of the fitting circular arc to the length of the line E is larger than a ratio threshold Q, if so, indicating that the difference between the fitting result and the original image is larger, and judging that the difference between the fitting circular arc and the original image does not meet the requirement.
7. The graphics smoothing method of claim 5, wherein the B31 further comprises:
b312, traversing the points p1, p2, p3, p4 and p5, and if the distance from one of the points to the fitting circular arc is greater than the precision M, indicating that the error of the fitting result is large, and judging that the fitting circular arc does not meet the precision requirement.
8. The image smoothing method of claim 2, further comprising the steps of:
b4, traversing each segment in the set R, if the segment is a circular arc, checking whether the distance from the middle point of the circular arc to the connecting line between the starting point and the end point of the circular arc is less than the precision M, if the distance is less than the precision M, indicating that the segment of the circular arc is closer to the straight line, and replacing the segment of the circular arc with the straight line.
9. A graphics smoothing device, characterized in that the graphics smoothing device comprises:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the graphics smoothing method of any one of claims 1-8.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a method of graph smoothing as claimed in any one of claims 1 to 8.
CN202210056521.3A 2022-01-18 2022-01-18 Graph smoothing method, graph smoothing equipment and storage medium Pending CN114549344A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210056521.3A CN114549344A (en) 2022-01-18 2022-01-18 Graph smoothing method, graph smoothing equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210056521.3A CN114549344A (en) 2022-01-18 2022-01-18 Graph smoothing method, graph smoothing equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114549344A true CN114549344A (en) 2022-05-27

Family

ID=81671826

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210056521.3A Pending CN114549344A (en) 2022-01-18 2022-01-18 Graph smoothing method, graph smoothing equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114549344A (en)

Similar Documents

Publication Publication Date Title
CN111709092B (en) Radial tire tread pattern finite element automatic modeling method based on finite element unit nodes
WO2020107326A1 (en) Lane line detection method, device and computer readale storage medium
CN107895173B (en) Method, device and equipment for labeling image target and readable storage medium
CN110689492B (en) Image edge smoothing method and device
CN116738579B (en) Automatic construction method and system for parting line of automobile panel
CN112733318A (en) Self-adaptive mesh subdivision method, device, equipment and storage medium
CN112935575A (en) Cutting path optimization method and device and computer readable storage medium
CN113191311A (en) Filling boundary identification method, device and equipment of vector PDF drawing and storage medium
CN111444573B (en) Ship symmetric segment model generation method and device, storage medium and terminal
CN113715338A (en) Three-dimensional model slicing method, printing method and related equipment
CN115525951A (en) Regularization method and device for building contour optimization and feature edge reconstruction
CN110136092B (en) Image processing method, device and storage medium
CN114092906B (en) Lane line segmentation fitting method, system, electronic equipment and storage medium
CN113312872B (en) Gong belt manufacturing method and device, gong belt manufacturing equipment and storage medium
CN111122222A (en) Sample point position determining method and system
CN114779209A (en) Laser radar point cloud voxelization method and device
CN114549344A (en) Graph smoothing method, graph smoothing equipment and storage medium
CN113947668A (en) Model simplification method and related equipment thereof
CN116186571B (en) Vehicle clustering method, device, computer equipment and storage medium
CN115330971B (en) Geometric model lightweight method oriented to rendering performance optimization
CN114445570A (en) Method for rapidly extracting strip-shaped local map elements from high-precision map
CN111259806B (en) Face area identification method, device and storage medium
CN115049028A (en) Construction area partitioning method, system, terminal and medium based on unsupervised learning
US7439971B2 (en) Mesh generation method for numerical simulation
CN107292812A (en) A kind of method and electronic equipment of migration of expressing one's feelings

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