A quantitative evaluation method and system for drawing annotation layout

By quantitatively evaluating the position, area, and angle of annotations on drawings, and calculating scores for severe and mild confusion, the problem of lack of quantitative evaluation in existing technologies is solved, and the rationality and aesthetics of the layout of annotations on drawings are automatically evaluated.

CN114781012BActive Publication Date: 2026-03-13FOSHAN JIUZHANG INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-17
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing technologies lack quantitative evaluation methods for the layout of annotations on drawings. In particular, it is difficult to objectively evaluate the placement, angle, and aesthetics of annotations in automated layout, which may lead to problems such as overlapping or poor aesthetics in the design results.

Method used

A quantitative evaluation method for drawing annotation layout is adopted. By obtaining annotation parameters, a severe confusion score and a mild confusion score are calculated. Combining the annotation position, area, angle and relationship with other elements, a confusion score is provided to replace subjective human evaluation.

Benefits of technology

It enables quantitative evaluation of the readability, rationality, and aesthetics of drawing annotation layout, provides the ability to evaluate automated design layout, and improves the rationality and aesthetics of design drawing annotation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114781012B_ABST
    Figure CN114781012B_ABST
Patent Text Reader

Abstract

This invention relates to the field of graphic information processing, and more specifically, to a method and system for quantitatively evaluating the layout of annotations on drawings. The method includes: obtaining annotation parameters for all annotations in the drawing; and obtaining a quantitative evaluation result of the annotation layout based on the annotation parameters. This invention quantitatively evaluates the arrangement of annotations on drawings based on the annotations' own parameters, enabling a quantitative assessment of the readability, rationality, and aesthetics of the annotation layout in design drawings. It provides a rational evaluation of annotation layouts in manually or automatically designed drawings, and offers the ability to evaluate layout schemes for automated design layouts.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of graphic information processing, and more specifically, to a method and system for quantitative evaluation of drawing annotation layout. Background Technology

[0002] The construction and industrial design industries are important pillars of my country's national economy, maintaining a rapid development trend in recent years with continuously expanding scale. However, due to a lack of technological innovation, these industries have long suffered from high energy consumption, high risk, and low productivity. Regarding automated layout, professional design software such as AutoCAD, Rhino3D, and Revit, as well as automated auxiliary software built upon them, primarily focus on automating the layout of main design elements such as buildings and workpieces, rarely automating the layout of annotations. Furthermore, the resulting layouts often exhibit overlap and poor aesthetics, mainly due to the lack of quantitative evaluation methods for annotations themselves.

[0003] In existing technologies, some solutions disclose how to assess the complexity of CAD drawings. However, the evaluation of annotations in drawings typically focuses on aspects such as the correctness of annotation content, the presence of missing or incorrect annotations—issues that can be mitigated by computer input replacing human input. However, the readability, rationality, and aesthetics of the drawings still require judgment based on human experience and subjective perception. Furthermore, current evaluation methods lack objective and quantitative assessments of the placement and angle of annotations. Especially when annotations are automatically laid out using logic or artificial intelligence, the absence of standardized, calculable evaluation methods makes it difficult to achieve optimal layout. Summary of the Invention

[0004] The present invention aims to overcome at least one of the defects (deficiencies) of the prior art and provide a quantitative evaluation method and system for drawing annotation layout, which solves the problem that the arrangement of drawing annotations cannot be quantitatively evaluated.

[0005] The technical solution adopted by this invention is a quantitative evaluation method for drawing annotation layout, comprising:

[0006] Obtain the annotation parameters for all annotations from the drawing;

[0007] The quantitative evaluation results of the annotation layout are obtained based on the annotation parameters.

[0008] Furthermore, the specific steps for obtaining the quantitative evaluation results of the annotation layout based on the annotation parameters include:

[0009] The preset severe obfuscation score S_severe and / or mild obfuscation score S_mild are both set to 0 initially.

[0010] Calculate the values ​​of the severe confusion score S_severe and / or the mild confusion score S_mild based on the labeled parameters;

[0011] The values ​​of the severe confusion score S_severe and / or the mild confusion score S_mild are used as the quantitative evaluation results.

[0012] Furthermore, the specific steps for obtaining the quantitative evaluation results of the annotation layout based on the annotation parameters also include:

[0013] A preset evaluation threshold is set, and the severe confusion score S_severe and / or the mild confusion score S_mild are compared with the preset evaluation threshold to obtain the number of severe confusion labels and / or the number of mild confusion labels. The values ​​of severe confusion score S_severe, the number of severe confusion labels, and / or the value of mild confusion score S_mild and the number of mild confusion labels are used as the quantitative evaluation results.

[0014] Furthermore, the annotation parameters include the annotation location and the annotation area. Obtaining the annotation parameters from the drawing specifically includes:

[0015] Extract all annotations from the drawing and represent them using annotation boxes;

[0016] The center point of the annotation box is used as the annotation position, and the area of ​​the annotation box is used as the annotation area.

[0017] Furthermore, the severe confusion score S_severe is calculated as follows:

[0018] For any two annotations A and B on the drawing, calculate the overlapping area s1 of annotations A and B based on their annotation positions and areas. When s1 is greater than the first evaluation threshold, A and B are recorded as severely confused annotations, and the number of severely confused annotations is increased by 2. Based on the annotation areas of annotations A and B, the severe confusion score S_severe is accumulated using the first calculation formula.

[0019] Furthermore, the annotation parameters include standard annotation position / standard annotation area;

[0020] Obtaining the annotation parameters from the drawing specifically includes: obtaining the element entity corresponding to the annotation from the drawing, and obtaining the standard annotation position / standard annotation area of ​​the corresponding annotation based on the element entity.

[0021] Furthermore, the calculation methods for the severe confusion score S_severe and the mild confusion score S_mild are as follows:

[0022] Calculate the distance d between each annotation in the drawing and the corresponding standard annotation position / standard annotation area according to the annotation position of each annotation.

[0023] If d > the second evaluation threshold / 2, accumulate S_severe according to d and the second evaluation threshold using the second calculation formula, mark the corresponding annotation as a severely confused annotation, and increment the number of severely confused annotations by 1. If d ≤ the second evaluation threshold / 2, accumulate S_mild according to the second threshold and d using the third calculation formula, mark the corresponding annotation as a mildly confused annotation, and increment the number of mildly confused annotations by 1.

[0024] Furthermore, the calculation methods of the severe confusion score S_severe and the mild confusion score S_mild are as follows:

[0025] Obtain the positions and areas / lengths of other non-annotation element entities on the drawing.

[0026] Calculate the overlap degree s2 generated between all annotations and other non-annotation element entities according to the annotation positions, annotation areas of the annotations, and the positions and areas / lengths of other non-annotation element entities. If the overlapping elements are easily confused elements, accumulate S_severe according to the overlap degree s2 and the annotation area of the corresponding annotation using the fourth calculation formula, mark the corresponding annotation as a severely confused annotation, and increment the number of severely confused annotations by 1. If the overlapping elements are not easily confused elements, accumulate S_mild according to the overlap degree s2 and the annotation area of the corresponding annotation using the fifth calculation formula, mark the corresponding annotation as a mildly confused annotation, and increment the number of mildly confused annotations by 1.

[0027] Furthermore, extract specific annotations in the drawing to calculate the severe confusion score S_severe, where the specific annotations include annotations that annotate the to-be-annotated elements through relative positions:

[0028] For annotation C, calculate the distance d1 between the annotation position of annotation C and its corresponding standard annotation position.

[0029] Calculate the distance m between annotation D and annotation C according to the annotation position of other annotation D and the annotation position of annotation C.

[0030] Calculate the distance d2 between the annotation position of annotation D and its corresponding standard annotation position.

[0031] When d2 < m, mark annotation D as a severely confused annotation, increment the number of severely confused annotations by 1, and accumulate S_severe according to d2 and m using the sixth calculation formula.

[0032] When d2 < m and d1 < m, mark annotation C as a severely confused annotation, increment the number of severely confused annotations by 1, and accumulate S_severe according to d1 and m using the seventh calculation formula.

[0033] The annotation parameters also include annotation angle and standard annotation angle. The specific steps for obtaining the annotation parameters from the drawing further include:

[0034] Extract all annotations from the drawing and determine the text direction of the annotations as the direction of the corresponding annotations;

[0035] Obtain the angle between the direction of the annotation and the horizontal line as the annotation angle;

[0036] The standard annotation direction corresponding to each annotation is determined according to the preset rules, and the angle between the standard annotation direction and the horizontal line is used as the standard annotation angle or the preset standard annotation angle.

[0037] The calculation methods for the severe confusion score S_severe and the mild confusion score S_mild also include:

[0038] Convert the annotation angle and the standard annotation angle into vector values. Calculate the angle α between all annotations and their corresponding standard annotation angles based on the vector values. α is greater than or equal to 0 and less than or equal to 180 degrees.

[0039] When evaluating, the impact of angle on confusion should be similar in magnitude to the impact of area, distance, etc. Let angle confusion = (α / 180) * label height * label width. If α > a, let S_severe = S_severe + angle confusion, and denote the corresponding label as a severely confused label, incrementing the number of severely confused labels by 1. If α ≤ a, let S_mild = S_mild + angle confusion, denote the corresponding label as a mildly confused label, and increment the number of mildly confused labels by 1. Here, 'a' represents the angle weight, indicating the angle that does not affect reading, generally taken as 180 / 6.

[0040] This invention also provides a quantitative evaluation system for drawing annotation layout, comprising:

[0041] The parameter acquisition module is used to obtain the annotation parameters of all annotations from the drawing;

[0042] The results acquisition module is used to obtain the quantitative evaluation results of the annotation layout based on the annotation parameters.

[0043] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the quantitative evaluation of the drawing annotation layout described above.

[0044] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0045] This invention quantifies the layout of annotations on drawings from multiple perspectives, based on the position and rotation of the annotations themselves, the relationships between annotations, and between annotations and other non-annotated elements. This enables a quantitative assessment of the readability, rationality, and aesthetics of the annotation layout in design drawings from multiple aspects. Furthermore, this invention uses a confusion scoring method to replace the previous method that relied on human experience and subjective perception for judgment. This provides a rational assessment of the annotation layout in design drawings, whether manually or automatically designed, and offers the ability to evaluate layout schemes for automated design layouts. Attached Figure Description

[0046] Figure 1 This is a flowchart of a quantitative evaluation method for drawing annotation layout according to the present invention.

[0047] Figure 2 This is a schematic diagram illustrating the method for classifying severe and mild confusion in a specific embodiment of the present invention.

[0048] Figure 3 This is a schematic diagram illustrating the overlap between annotations in a specific embodiment of the present invention.

[0049] Figure 4 This is a schematic diagram illustrating how other annotations are closer to the position to be annotated than the original annotation in a specific embodiment of the present invention.

[0050] Figure 5 This is a schematic diagram illustrating the distance from the standard annotation area in a specific embodiment of the present invention. Detailed Implementation

[0051] The accompanying drawings are for illustrative purposes only and should not be construed as limiting the invention. To better illustrate the following embodiments, some parts in the drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions; it is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.

[0052] Example 1

[0053] The drawings described in this application are generally design drawings with text or symbols annotating the content of the drawings, including architectural design drawings, industrial part design drawings, construction drawings, etc. with text or symbols.

[0054] like Figure 1 The diagram shown is a flowchart of a quantitative evaluation method for drawing annotation layout according to a specific embodiment of this invention. (See also...) Figure 1 The specific steps of a quantitative evaluation method for drawing annotation layout in this specific embodiment include:

[0055] S1. Obtain the annotation parameters for all annotations from the drawing;

[0056] S2. Obtain the quantitative evaluation results of the annotation layout based on the annotation parameters.

[0057] like Figure 2 As shown, the annotation parameters are constructed based on one or more of the relationships between the annotation's own position and rotation, between annotations, and between annotations and other non-annotated element entities, and are quantitatively evaluated using two levels of confusion:

[0058] The first type is severe confusion, which can be understood as a situation that makes the annotations incomprehensible. This includes one or more of the following situations: overlapping between annotations, overlapping of annotations with other easily confused elements in the drawing, annotation weight deviating from the standard annotation position, other annotations being closer to the standard annotation position of the original annotation than the original annotation, and a severe deviation of the annotation from the standard annotation angle (i.e. the angle at which it should be placed).

[0059] The second type is mild confusion, which can be understood as situations that may cause reading difficulties for users. These include annotations that deviate slightly from the standard annotation position, annotations that are slightly deviated from the standard annotation angle, and annotations that overlap with other entities in the drawing that are not easily confused.

[0060] In the specific implementation process, the severe confusion and mild confusion are measured by the severe confusion score S_severe and the mild confusion score S_mild, respectively. In the specific implementation, one of the two can be selected for quantitative evaluation, or both can be used for quantitative evaluation. The initial values ​​of S_severe and S_mild are both set to 0.

[0061] The specific steps of S2 can be as follows:

[0062] S21. Calculate the values ​​of the severe confusion score S_severe and / or the mild confusion score S_mild based on the annotation parameters.

[0063] S22. The values ​​of the severe confusion score S_severe and / or the mild confusion score S_mild are used as the quantitative evaluation results.

[0064] In practice, the number of heavily obfuscated and lightly obfuscated annotations can be calculated separately based on whether the obfuscation level is severe or mild. Both the number of heavily obfuscated and lightly obfuscated annotations can be used as the results of the quantitative evaluation. Specifically, one or more evaluation thresholds can be preset. The severe obfuscation score S_severe and / or the light obfuscation score S_mild are compared with the preset evaluation thresholds to obtain the number of heavily obfuscated and / or lightly obfuscated annotations. The values ​​of the severe obfuscation score S_severe, the number of heavily obfuscated annotations, and / or the light obfuscation score S_mild and the number of lightly obfuscated annotations are used as the quantitative evaluation results.

[0065] In the specific implementation process, the annotation parameters in S1 include the annotation position and the annotation area;

[0066] The specific steps in S1 include:

[0067] S11. Extract all annotations from the drawing and represent them using annotation boxes;

[0068] S12. Obtain the center point position of the annotation box as the annotation position, and the area of ​​the annotation box as the annotation area. Preferably, a rectangle is used for the annotation box instead of the annotation characters, and the size of the annotation box is based on the size of the area covered by the annotation characters.

[0069] In the specific implementation process, the specific steps of S21 include:

[0070] S211. For any two annotations A and B on the drawing, calculate the overlapping area s1 of annotations A and B based on their annotation positions and areas. When s1 is greater than the first evaluation threshold, annotations A and B are recorded as severely confused annotations, and the number of severely confused annotations is increased by 2. Based on the annotation areas of annotations A and B, the severe confusion score S_severe is accumulated using the first calculation formula.

[0071] This step is based on the quantitative evaluation of the overlap relationship between the labels. In specific implementation, the first evaluation threshold can be set to 0, that is, when there is overlap between two labels, it can be determined that the two labels are heavily confused labels, so the number of heavily confused labels is increased by 2.

[0072] At this point, the severe confusion score S_severe can be calculated by accumulating the labels identified as severely confusing. Specifically, the first calculation formula can be: S_severe = S_severe + s / SA + s / SB, where SA and SB are the labeled areas of labels A and B, respectively. Figure 3 As shown, there is an overlap between labels A and B, and Z is the overlapping area.

[0073] In practice, the quantitative evaluation results can also be measured based on the deviation of the annotation from its standard annotation position / area. Specifically:

[0074] The annotation parameters in step S1 may include standard annotation position / standard annotation area;

[0075] S1 specific steps may include:

[0076] Obtain the element entity corresponding to the annotation from the drawing, and obtain the standard annotation position / standard annotation area of ​​the corresponding annotation based on the element entity.

[0077] The standard annotation position can be calculated using the following method: Assuming only the case exists where there is an annotation and its corresponding object to be annotated, the optimal placement position of the annotation is the standard annotation position, represented by a point. Alternatively, the standard annotation position can be represented by a region, meaning that a standard annotation region is used instead of the standard annotation position, indicating that the annotation is best placed in a certain region. In practice, the decision to calculate either the standard annotation position or the standard annotation region can be determined based on the element entity corresponding to the annotation and the annotation type.

[0078] In general, various types of drawings have standard annotation positions or standard annotation areas. For example, the standard annotation position for the reinforcement of a reinforcement drawing is the position closest to the annotation edge at a certain distance in a workpiece drawing; the standard annotation position for the area annotation in an architectural plan is the center of the annotated area, or the center of the largest convex area after decomposition of a convex area that is not in the area; the standard annotation area for the free annotation in a beam reinforcement drawing is the two continuous spaces above and below the beam; the standard annotation area for the area annotation in an architectural plan is the area formed by a certain distance inward from the annotation edge.

[0079] The method for calculating the severe confusion score S_severe and the mild confusion score S_mild based on the standard annotation location / standard annotation area is as follows:

[0080] S212. Calculate the distance d between each annotation and the standard annotation position / standard annotation area in the drawing based on the annotation position of each annotation; wherein, when the standard annotation position is a point, the distance d between the annotation and the standard annotation position is the distance from that point to the center point of the annotation frame, and the distance d between the annotation and the standard annotation area is the perpendicular distance from the center point of the annotation frame to the nearest edge of the standard annotation area. For example... Figure 4 As shown, point O1 is the standard labeling position of label C, and d1 is the distance d between the two. Figure 5 As shown, region O2 is the labeled region of P2, and d' is the distance d between the two.

[0081] If d > second evaluation threshold / 2, S_severe is accumulated using the second calculation formula based on d and the second evaluation threshold, and the corresponding label is recorded as a severely confused label, with the number of severely confused labels incremented by 1. If d ≤ second evaluation threshold / 2, S_mild is accumulated using the third calculation formula based on the second threshold and d, and the corresponding label is recorded as a mildly confused label, with the number of mildly confused labels incremented by 1. In specific implementation, the second evaluation threshold can be set as the width of the corresponding label, and the second calculation formula is: S_severe = S_severe + d * 2 / label width; the third calculation formula is: S_mild = S_mild + d * 2 / label width, where the label width is the width of the corresponding label; the label width is calculated by using the label frame, preferably a rectangle, instead of the label character, and the width of the corresponding label frame is taken as the label width. The size of the label frame is based on the size of the area covered by the label character.

[0082] If d > label width / 2, let S_severe = S_severe + d*2 / label width, and denote this label as severely confusing; if d ≤ label width / 2, let S_mild = S_mild + d*2 / label width, and denote this label as mildly confusing.

[0083] In the specific implementation process, the calculation of S_severe and S_mild in S211 and S212 is not in any particular order, and the S_severe and S_mild calculated in the two steps are accumulated respectively.

[0084] Furthermore, the calculation method for the severe confusion score S_severe and the mild confusion score S_mild also includes step S213:

[0085] Get the position and area / length of other non-labeled element entities on the drawing;

[0086] Calculate the overlap degree s2 between all annotations and other non-annotated element entities based on the annotation position, annotation area, and the position, area / length of the other non-annotated element entities. If the overlapping element is easily confused, accumulate S_severe using the fourth calculation formula based on the overlap degree s2 and the annotation area of ​​the corresponding annotation, and record the corresponding annotation as a severely confused annotation, and increment the number of severely confused annotations by 1. If the overlapping element is not easily confused, accumulate S_mild using the fifth calculation formula based on the overlap degree s2 and the annotation area of ​​the corresponding annotation, and record the corresponding annotation as a slightly confused annotation, and increment the number of slightly confused annotations by 1.

[0087] The evaluation method for easily confused and non-confusing elements is as follows: the basic criterion is whether the font of the labeled character is easily confused with other non-labeled element entities. Specifically, when the labeled character overlaps with other non-labeled element entities, the ratio of the area of ​​the non-labeled element entity with a color similar to the font color of the labeled character to the total area of ​​the element entity is used for calculation. If the ratio exceeds a set threshold, the other non-labeled element entity is considered an easily confused element; if it does not exceed the threshold, the other non-labeled element entity is considered a non-confusing element.

[0088] In specific implementation, when the other unlabeled element entity is an element entity with a certain area, the overlap degree s2 is the overlapping area generated by the label and the other unlabeled element entity. When the other unlabeled element entity is a line segment or other element without area, the overlap degree s2 is the product of the line segment width of the other unlabeled element entity and the overlapping length of the two.

[0089] The fourth calculation formula is: let S_severe = S_severe + s2 / labeled area, and the fifth calculation formula is: S_mild = S_mild + s2 / labeled area, where the labeled area is the area of ​​the labeled frame of the corresponding label.

[0090] In the specific implementation process, the calculation of S_severe and S_mild in S211, S212 and S213 is not in any particular order, and the S_severe and S_mild calculated in the three steps are all accumulated separately.

[0091] In the specific implementation process, this embodiment also applies a severe confusion score (S_severe) to specific annotations, where the specific annotation is one that marks the element to be annotated based on its relative position. Drawings typically contain other types of annotations, such as those connected to the element to be annotated by annotation lines; these are not included in the severe confusion score calculation for specific annotations.

[0092] Step S214, which calculates the severe confusion score S_severe based on specific annotations, includes:

[0093] For any annotation C, calculate the distance d1 between the annotation position of annotation C and its corresponding standard annotation position;

[0094] Calculate the distance (m) between label D and the standard label position of label C based on the label positions of other labels D and label C.

[0095] Calculate the distance d2 between the position of annotation D and its corresponding standard annotation position;

[0096] When d2 < m, mark the annotation D as a severe confusion annotation, increment the count of severe confusion annotations by 1, and accumulate S_severe according to d2 and m using the sixth calculation formula;

[0097] When d2 < m and d1 < m, mark the annotation C as a severe confusion annotation, increment the count of severe confusion annotations by 1, and accumulate S_severe according to d1 and m using the seventh calculation formula;

[0098] The sixth calculation formula is: S_severe = S_severe + d2 / m, and the seventh calculation formula is: S_severe = S_severe + d1 / m.

[0099] As Figure 4 shown, point O1 is the standard annotation position for C annotation, point O3 is the standard annotation position for D annotation. When d2 < m, mark the D annotation as severely confused, and let S_severe = S_severe + d2 / m. At the same time, as Figure 4 shown, when d2 < m and d1 < m, mark the C annotation as severely confused again, and let S_severe = S_severe + d1 / m;

[0100] In the specific implementation process, the calculation of S_severe in S211, S212, S213, and S214 is not in a specific order, and the S_severe calculated in the four steps are all accumulated.

[0101] In the specific implementation process, the annotation parameters in step S1 may include the annotation angle and the standard annotation angle;

[0102] The specific steps of S1 may further include:

[0103] Extract all annotations from the drawing and determine the text direction of the annotation as the direction of the corresponding annotation;

[0104] Obtain the angle between the direction of the annotation and the horizontal line as the annotation angle;

[0105] Determine the standard annotation direction corresponding to each annotation according to a preset rule, obtain the angle between the standard annotation direction of the annotation and the horizontal line as the standard annotation angle, or preset the standard annotation angle;

[0106] The standard annotation angle can be preset in advance, or the standard annotation direction of the annotation can be determined according to a preset rule. The rule is that the direction of the annotation should be consistent with the direction of the element entity corresponding to the annotation. Then, the standard annotation direction can be determined according to the direction of the element entity of the annotation, and then the angle between the standard annotation direction of the annotation and the horizontal line is used as the standard annotation angle;

[0107] The calculation method for the severe confusion score S_severe and the mild confusion score S_mild further includes step S215:

[0108] Convert the annotation angle and the standard annotation angle into vector values, and calculate the angle α between all annotations and their corresponding standard annotation angles based on the vector values.

[0109] When evaluating, the impact of angle on confusion should be similar in magnitude to the impact of area, distance, etc. Let angle confusion = (α / 180) * label height * label width. If α > a, let S_severe = S_severe + angle confusion, and denote the corresponding label as a severely confused label, incrementing the number of severely confused labels by 1. If α ≤ a, let S_mild = S_mild + angle confusion, denote the corresponding label as a mildly confused label, and increment the number of mildly confused labels by 1. Here, 'a' represents the angle weight, which is an empirical value representing the angle that does not affect reading, generally taken as 180 / 6.

[0110] In the specific implementation process, the calculation of S_severe and S_mild in S211, S212, S213, S214, and S215 is not in any particular order, and the S_severe and S_mild calculated in the five steps are all accumulated.

[0111] After processing all annotations based on the above steps, the number of annotations marked as severely confusing is recorded as N_severe, and the number of annotations marked as mildly confusing but not marked as severely confusing is recorded as N_mild. This completes the quantitative evaluation of the drawing.

[0112] This specific embodiment constructs a quantitative evaluation method for the readability, rationality, and aesthetics of design drawing annotation layout from multiple aspects, and proposes a confusion scoring method to replace the previous method that required judgment based on human experience and subjective perception. This provides a rational evaluation of design drawing annotations for both manual and automated design layouts, and offers the ability to evaluate layout schemes for automated design annotation implementation.

[0113] Example 2

[0114] This specific embodiment also provides a quantitative evaluation system for drawing annotation layout, including:

[0115] The parameter acquisition module is used to obtain the annotation parameters of all annotations from the drawing;

[0116] The results acquisition module is used to obtain the quantitative evaluation results of the annotation layout based on the annotation parameters.

[0117] like Figure 2As shown, the annotation parameters are constructed based on one or more of the relationships between the annotation's own position and rotation, between annotations, and between annotations and other non-annotated element entities, and are quantitatively evaluated using two levels of confusion:

[0118] The first type is severe confusion, which can be understood as a situation that makes the annotations incomprehensible. This includes one or more of the following situations: overlapping between annotations, overlapping of annotations with other easily confused elements in the drawing, annotation weight deviating from the standard annotation position, other annotations being closer to the standard annotation position of the original annotation than the original annotation, and a severe deviation of the annotation from the standard annotation angle (i.e. the angle at which it should be placed).

[0119] The second type is mild confusion, which can be understood as situations that may cause reading difficulties for users. These include annotations that deviate slightly from the standard annotation position, annotations that are slightly deviated from the standard annotation angle, and annotations that overlap with other entities in the drawing that are not easily confused.

[0120] In the specific implementation process, the severe confusion and mild confusion are measured by the severe confusion score S_severe and the mild confusion score S_mild, respectively. In the specific implementation, one of the two can be selected for quantitative evaluation, or both can be used for quantitative evaluation. The initial values ​​of S_severe and S_mild are both set to 0.

[0121] The results acquisition module specifically includes:

[0122] The confusion score calculation module is used to calculate the values ​​of severe confusion score S_severe and / or mild confusion score S_mild based on the annotation parameters of the annotation.

[0123] The quantitative evaluation module is used to take the values ​​of the severe confusion score S_severe and / or the mild confusion score S_mild as the quantitative evaluation results.

[0124] In practical implementation, the obfuscation score calculation module can also calculate the number of heavily obfuscated and lightly obfuscated labels separately based on whether the obfuscation level is severe or mild. Both the number of heavily obfuscated and lightly obfuscated labels can be used as the quantitative evaluation result. Specifically, one or more evaluation thresholds can be preset. The severely obfuscated score S_severe and / or the lightly obfuscated score S_mild are compared with the preset evaluation thresholds to obtain the number of heavily obfuscated and / or lightly obfuscated labels. The values ​​of the severely obfuscated score S_severe, the number of heavily obfuscated labels, and / or the lightly obfuscated score S_mild and the number of lightly obfuscated labels are used as the quantitative evaluation result.

[0125] In the specific implementation process, the annotation parameters in the parameter acquisition module include the annotation position and the annotation area;

[0126] The parameter acquisition module specifically includes:

[0127] The annotation box setting module is used to extract all annotations from the drawing and represent them in the form of annotation boxes.

[0128] The parameter calculation module is used to obtain the center point position of the annotation box as the annotation position, and the area of ​​the annotation box as the annotation area. Preferably, a rectangle is used for the annotation box instead of the annotation characters, and the size of the annotation box is based on the size of the area covered by the annotation characters.

[0129] The confusion score calculation module is specifically used for:

[0130] For any two annotations A and B on the drawing, calculate the overlapping area s1 of annotations A and B based on their annotation positions and areas. When s1 is greater than the first evaluation threshold, annotations A and B are recorded as severely confused annotations, and the number of severely confused annotations is increased by 2. The severe confusion score S_severe is accumulated based on the annotation area of ​​annotations A and B using the first calculation formula.

[0131] This method is based on the quantitative evaluation of the overlap relationship between labels. In specific implementation, the first evaluation threshold can be set to 0, that is, when there is overlap between two labels, it can be determined that the two labels are heavily confused labels, so the number of heavily confused labels is increased by 2.

[0132] At this point, the severe confusion score S_severe can be calculated by accumulating the labels identified as severely confusing. Specifically, the first calculation formula can be: S_severe = S_severe + s / SA + s / SB, where SA and SB are the labeled areas of labels A and B, respectively. Figure 3 As shown, there is an overlap between labels A and B, and Z is the overlapping area.

[0133] In practice, the quantitative evaluation results can also be measured based on the deviation of the annotation from its standard annotation position / area. Specifically:

[0134] The annotation parameters in the parameter acquisition module may include standard annotation positions / standard annotation areas;

[0135] The parameter calculation module is also used to obtain the element entities corresponding to the annotations from the drawings, and to obtain the standard annotation position / standard annotation area of ​​the corresponding annotations based on the element entities.

[0136] The standard annotation position can be calculated using the following method: Assuming only the case exists where there is an annotation and its corresponding object to be annotated, the optimal placement position of the annotation is the standard annotation position, represented by a point. Alternatively, the standard annotation position can be represented by a region, meaning that a standard annotation region is used instead of the standard annotation position, indicating that the annotation is best placed in a certain region. In practice, the decision to calculate either the standard annotation position or the standard annotation region can be determined based on the element entity corresponding to the annotation and the annotation type.

[0137] In general, various types of drawings have standard annotation positions or standard annotation areas. For example, the standard annotation position for the reinforcement of a reinforcement drawing is the position closest to the annotation edge at a certain distance in a workpiece drawing; the standard annotation position for the area annotation in an architectural plan is the center of the annotated area, or the center of the largest convex area after decomposition of a convex area that is not in the area; the standard annotation area for the free annotation in a beam reinforcement drawing is the two continuous spaces above and below the beam; the standard annotation area for the area annotation in an architectural plan is the area formed by a certain distance inward from the annotation edge.

[0138] The confusion score calculation module is also used to calculate the severe confusion score S_severe and the mild confusion score S_mild based on the standard annotation location / standard annotation area, as follows:

[0139] Calculate the distance d between each annotation and the corresponding standard annotation position / standard annotation area in the drawing based on the annotation position of each annotation; where, when the standard annotation position is a point, the distance d between the annotation and the corresponding standard annotation position is the distance from that point to the center point of the annotation frame, and the distance d between the annotation and the corresponding standard annotation area is the perpendicular distance from the center point of the annotation frame to the nearest edge of the standard annotation area. For example... Figure 4 As shown, point O1 is the standard labeling position of label C, and d1 is the distance d between the two. Figure 5 As shown, region O2 is the labeled region of P2, and d' is the distance d between the two.

[0140] If d > second evaluation threshold / 2, S_severe is accumulated using the second calculation formula based on d and the second evaluation threshold, and the corresponding label is recorded as a severely confused label, with the number of severely confused labels incremented by 1. If d ≤ second evaluation threshold / 2, S_mild is accumulated using the third calculation formula based on the second threshold and d, and the corresponding label is recorded as a mildly confused label, with the number of mildly confused labels incremented by 1. In specific implementation, the second evaluation threshold can be set as the width of the corresponding label, and the second calculation formula is: S_severe = S_severe + d * 2 / label width; the third calculation formula is: S_mild = S_mild + d * 2 / label width, where the label width is the width of the corresponding label; the label width is calculated by using the label frame, preferably a rectangle, instead of the label character, and the width of the corresponding label frame is taken as the label width. The size of the label frame is based on the size of the area covered by the label character.

[0141] If d > label width / 2, let S_severe = S_severe + d*2 / label width, and denote this label as severely confusing; if d ≤ label width / 2, let S_mild = S_mild + d*2 / label width, and denote this label as mildly confusing.

[0142] Furthermore, the confusion scoring module is also used for:

[0143] Get the position and area / length of other non-labeled element entities on the drawing;

[0144] Calculate the overlap degree s2 between all annotations and other non-annotated element entities based on the annotation position, annotation area, and the position, area / length of the other non-annotated element entities. If the overlapping element is easily confused, accumulate S_severe using the fourth calculation formula based on the overlap degree s2 and the annotation area of ​​the corresponding annotation, and record the corresponding annotation as a severely confused annotation, and increment the number of severely confused annotations by 1. If the overlapping element is not easily confused, accumulate S_mild using the fifth calculation formula based on the overlap degree s2 and the annotation area of ​​the corresponding annotation, and record the corresponding annotation as a slightly confused annotation, and increment the number of slightly confused annotations by 1.

[0145] The evaluation method for easily confused and non-confusing elements is as follows: the basic criterion is whether the font of the labeled character is easily confused with other non-labeled element entities. Specifically, when the labeled character overlaps with other non-labeled element entities, the ratio of the area of ​​the non-labeled element entity with a color similar to the font color of the labeled character to the total area of ​​the element entity is used for calculation. If the ratio exceeds a set threshold, the other non-labeled element entity is considered an easily confused element; if it does not exceed the threshold, the other non-labeled element entity is considered a non-confusing element.

[0146] In the specific implementation process, when the other unannotated element entity is an element entity with a certain area, the overlap degree s2 is the overlapping area generated by the annotation and the other unannotated element entity. When the other unannotated element entity is a line segment or other element without area, the overlap degree s2 is the product of the line segment width of the other unannotated element entity and the overlapping length between the two.

[0147] The fourth calculation formula is: Let S_severe = S_severe + s2 / annotation area. The fifth calculation formula is: S_mild = S_mild + s2 / annotation area. The annotation area is the area of the annotation box corresponding to the annotation.

[0148] In the specific implementation process, the confusion score calculation module in this specific embodiment is also used to calculate the severe confusion score S_severe for a specific annotation. The specific annotation is an annotation that annotates the to-be-annotated element through relative position. Usually, there are other types of annotations in the drawing, such as annotations connected to the to-be-annotated element through annotation lines. Such annotations are not used for calculating the severe confusion score of the specific annotation.

[0149] The specific method for the confusion score calculation module to calculate the severe confusion score S_severe based on the specific annotation includes:

[0150] For any annotation C, calculate the distance d1 between the annotation position of annotation C and its corresponding standard annotation position;

[0151] According to the annotation position of other annotation D and the standard annotation position of annotation C, calculate the distance m of annotation D from the standard annotation position of annotation C;

[0152] Calculate the distance d2 between the annotation position of annotation D and its corresponding standard annotation position;

[0153] When d2 < m, record annotation D as a severely confused annotation, increment the number of severely confused annotations by 1, and accumulate S_severe according to d2 and m using the sixth calculation formula;

[0154] When d2 < m and d1 < m, record annotation C as a severely confused annotation, increment the number of severely confused annotations by 1, and accumulate S_severe according to d1 and m using the seventh calculation formula;

[0155] The sixth calculation formula is: S_severe = S_severe + d2 / m. The seventh calculation formula is: S_severe = S_severe + d1 / m.

[0156] Such as Figure 4As shown, point O1 is the standard annotation position marked by C, and point O3 is the standard annotation position marked by D. When d2 < m, mark the D annotation as severe confusion, and let S_severe = S_severe + d2 / m. At the same time, as Figure 4 shown, when d2 < m and d1 < m, mark the C annotation as severe confusion again, and let S_severe = S_severe + d1 / m;

[0157] In the specific implementation process, the annotation parameters in the parameter acquisition module may include the annotation angle and the standard annotation angle;

[0158] The parameter calculation module may further include:

[0159] Extract all the annotations from the drawing and determine the text direction of the annotation as the direction of the corresponding annotation;

[0160] Obtain the angle between the direction of the annotation and the horizontal line as the annotation angle;

[0161] Determine the standard annotation direction corresponding to each annotation according to the preset rules, and obtain the angle between the standard annotation direction of the obtained annotation and the horizontal line as the standard annotation angle, or preset the standard annotation angle; where the standard annotation angle can be set in advance, or the standard annotation direction of the annotation can be determined according to a preset rule. The set rule is that the direction of the annotation should be consistent with the direction of the element entity corresponding to the annotation. Then, the standard annotation direction can be determined according to the direction of the element entity of the annotation, and then the angle between the standard annotation direction of the annotation and the horizontal line is used as the standard annotation angle;

[0162] The calculation methods of the severe confusion score S_severe and the mild confusion score S_mild further include step S215:

[0163] Convert the annotation angle and the standard annotation angle into vector values, and calculate the included angle α between all the annotations and the standard annotation angles of their corresponding vector values according to the annotation angle of the vector value;

[0164] During evaluation, the influence of the angle on the confusion degree should be similar to the magnitudes of the influences of area, distance, etc. Let the angle confusion degree = (α / 180) * annotation height * annotation width. If α > a, let S_severe = S_severe + angle confusion degree, mark the corresponding annotation as a severely confused annotation, and increment the number of severely confused annotations by 1. If α ≤ a, S_mild = S_mild + angle confusion degree, mark the corresponding annotation as a mildly confused annotation, and increment the number of mildly confused annotations by 1; where a represents the angle weight, which is an empirical value representing the angle that does not affect reading, generally taking the value of 180 / 6.

[0165] In the specific implementation process, the confusion scoring calculation module calculates S_severe and S_mild in no particular order based on different annotation parameters, and the calculated S_severe and S_mild are all accumulated.

[0166] After processing all annotations based on the implementation method, the number of annotations marked as severely confusing is recorded as N_severe, and the number of annotations marked as mildly confusing but not marked as severely confusing is recorded as N_mild. This completes the quantitative evaluation of the drawing.

[0167] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the technical solution of the present invention, and are not intended to limit the specific implementation of the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the claims of the present invention should be included within the protection scope of the claims of the present invention.

Claims

1. A method for quantitatively evaluating a layout of a drawing annotation, characterized by, The method comprises the following steps: obtaining all the labeling parameters of the annotations from the drawing; obtaining a quantitative evaluation result of the annotation layout according to the labeling parameters of the annotations; the step of obtaining the quantitative evaluation result of the annotation layout according to the labeling parameters of the annotations comprises: presetting a severe confusion score S_severe and / or a mild confusion score S_mild, and setting the initial values of the scores as 0; calculating the values of the severe confusion score S_severe and / or the mild confusion score S_mild according to the labeling parameters of the annotations; taking the values of the severe confusion score S_severe and / or the mild confusion score S_mild as the quantitative evaluation result; the labeling parameters comprise a labeling angle and a standard labeling angle; the step of obtaining all the labeling parameters of the annotations from the drawing comprises: extracting all the annotations from the drawing, and determining the direction of the annotations as the direction of the corresponding annotations; obtaining the angle between the direction of the annotations and a horizontal line as the labeling angle; determining the standard labeling direction corresponding to each annotation according to a preset rule, and obtaining the angle between the standard labeling direction of the annotations and the horizontal line as the standard labeling angle or a preset standard labeling angle; the calculation method of the severe confusion score S_severe and the mild confusion score S_mild comprises: converting the labeling angle and the standard labeling angle into vector values, and calculating the included angle a between the labeling angle of the vector values and the standard labeling angle of the vector values according to the vector values; letting the angle confusion degree be (a / 180)*labeling height*labeling width, if a>a, letting S_severe=S_severe+angle confusion degree, recording the corresponding annotation as a severe confusion annotation, and increasing the number of severe confusion annotations by 1, if a≤a, letting S_mild=S_mild+angle confusion degree, recording the corresponding annotation as a mild confusion annotation, and increasing the number of mild confusion annotations by 1; wherein a represents an angle weight.

2. The quantitative evaluation method of drawing annotation layout according to claim 1, characterized in that, The specific steps of obtaining the quantitative evaluation result of the annotation layout according to the labeling parameters of the annotations further comprise: presetting an evaluation threshold, comparing the severe confusion score S_severe and / or the mild confusion score S_mild with the preset evaluation threshold to obtain the number of severe confusion annotations and / or the number of mild confusion annotations, and taking the values of the severe confusion score S_severe, the number of severe confusion annotations, and / or the values of the mild confusion score S_mild, the number of mild confusion annotations as the quantitative evaluation result.

3. The quantitative evaluation method of a drawing annotation layout according to claim 2, characterized in that, the labeling parameters comprise a labeling position and a labeling area, and the step of obtaining the labeling parameters of the annotations from the drawing comprises: extracting all the annotations from the drawing, and representing the annotations in the form of an annotation box; obtaining the center position of the annotation box as the labeling position, and obtaining the area of the annotation box as the labeling area.

4. The quantitative evaluation method of a drawing annotation layout according to claim 3, characterized in that, The calculation method of the severe confusion score S_severe is as follows: for any two annotations A and B on the drawing, calculating the overlapping area s1 of the annotations A and B according to the labeling positions and the labeling areas of the annotations A and B, when s1 is greater than a first evaluation threshold, recording A and B as severe confusion annotations, increasing the number of severe confusion annotations by 2, and using a first calculation formula based on the labeling areas of the annotations A and B to accumulate the severe confusion score S_severe.

5. The quantitative evaluation method of a layout of a drawing according to claim 3 or 4, characterized in that, The marking parameters include standard marking positions / standard marking areas; The marking parameters of the marking obtained from the drawing specifically include: obtaining element entities corresponding to the marking from the drawing, and obtaining standard marking positions / standard marking areas of the corresponding marking according to the element entities.

6. The quantitative evaluation method of a drawing annotation layout according to claim 5, characterized in that, The calculation methods of the severe confusion score S_severe and the mild confusion score S_mild are as follows: According to the marking positions of each marking, the distance d between the standard marking position / standard marking area corresponding to each marking and the marking position of each marking is calculated. If d> the second evaluation threshold / 2, the second calculation formula is used to accumulate S_severe according to d and the second evaluation threshold, the corresponding marking is recorded as a severe confusion marking, and the number of severe confusion markings is increased by 1; if d≤ the second evaluation threshold / 2, the third calculation formula is used to accumulate S_mild according to the second threshold and d, the corresponding marking is recorded as a mild confusion marking, and the number of mild confusion markings is increased by 1.

7. The method for quantitatively evaluating a layout of a drawing according to any one of claims 3, 4 or 6, wherein The calculation methods of the severe confusion score S_severe and the mild confusion score S_mild are as follows: The positions and areas / lengths of other non-marking element entities in the drawing are obtained. According to the marking positions, marking areas and positions and areas / lengths of other non-marking element entities, the coincidence degree s2 between all markings and other non-marking element entities is calculated; if the coincident element is an easily confused element, the fourth calculation formula is used to accumulate S_severe according to the coincidence degree s2 and the marking area of the corresponding marking, the corresponding marking is recorded as a severe confusion marking, and the number of severe confusion markings is increased by 1; if the coincident element is a non-easily confused element, the fifth calculation formula is used to accumulate S_mild according to the coincidence degree s2 and the marking area of the corresponding marking, the corresponding marking is recorded as a mild confusion marking, and the number of mild confusion markings is increased by 1.

8. The method for quantitatively evaluating a layout of a drawing according to any one of claims 3, 4 or 6, wherein The severe confusion score S_severe is calculated by extracting specific markings in the drawing, and the specific markings include markings for marking elements to be marked by relative positions: For marking C, the distance d1 between the marking position of marking C and the standard marking position corresponding thereto is calculated. The distance m between the standard marking position of marking C and the marking position of other marking D is calculated according to the marking position of marking D and the standard marking position of marking C. The distance d2 between the marking position of marking D and the standard marking position corresponding thereto is calculated. When d2 When d2 9. A quantitative evaluation system for a drawing annotation layout, characterized by, The method comprises the steps of: The parameter acquisition module is configured to obtain the marking parameters of all markings from the drawing. The result acquisition module is configured to obtain the quantitative evaluation result of the marking layout according to the marking parameters of the markings. The quantitative evaluation result of the marking layout obtained according to the marking parameters of the markings comprises: The initial values of the preset severe confusion score S_severe and / or the mild confusion score S_mild are both 0. According to the labeled annotation parameters, a value of a severe confusion score S_severe and / or a mild confusion score S_mild is calculated; The value of the severe confusion score S_severe and / or the mild confusion score S_mild is taken as the quantitative evaluation result; The labeled annotation parameters include a labeled angle and a standard labeled angle; The labeled annotation parameters obtained from the drawing include: All the labels are extracted from the drawing, and the direction of the label is determined as the direction of the corresponding label; An angle between the direction of the label and a horizontal line is obtained as the labeled angle; According to a preset rule, a standard labeled direction corresponding to each label is determined, and an angle between the standard labeled direction of the label and the horizontal line is obtained as the standard labeled angle or a preset standard labeled angle; The calculation method of the severe confusion score S_severe and the mild confusion score S_mild includes: The labeled angle and the standard labeled angle are converted into vector values, and an included angle a between all the labels and the standard labeled angle of the corresponding vector value is calculated according to the vector value; Let angle confusion degree=(a / 180)*label height*label width, if a>a, let S_severe=S_severe+angle confusion degree, record the corresponding label as a severe confusion label, and the number of severe confusion labels is increased by 1, if a≤a, let S_mild=S_mild+angle confusion degree, record the corresponding label as a mild confusion label, and the number of mild confusion labels is increased by 1; wherein a represents an angle weight.