Label content display method, electronic equipment, readable storage medium and program product
By determining the starting point and turning point in the drawing and generating leads to display the annotation content, the problem of low drawing labeling efficiency in the prior art is solved, automatic labeling is realized, and the readability of the drawing and the accuracy of information communication are improved.
Patent Information
- Application Number
- CN202411977712.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-05-02
AI Technical Summary
In the prior art, adding labeled content in drawings is less efficient, especially in complex drawings, which requires a lot of time and effort.
By obtaining the occupied area and corresponding annotation content of the target annotated object in the drawing, determining the starting point and turning point in the associated area from the occupied area, generating a lead and displaying the annotation content at its extension, to achieve automatic annotation.
It improves the labeling efficiency, reduces the time and energy of manual labeling, and enhances the readability of the drawings and the accuracy of information communication.
Smart Images

Figure CN119918503A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to technical fields such as drawing display, and more particularly to a method for displaying annotation content, an electronic device, a readable storage medium, and a program product. Background Art
[0002] In the fields of engineering design, architectural planning, mechanical manufacturing, etc., there are strict requirements on the accuracy of drawings. Therefore, the annotation information in the drawings naturally becomes the key link in accurately conveying the drawing information.
[0003] In the existing related technologies, a common practice is for relevant professionals to manually add relevant annotation content where annotation is required in the drawings.
[0004] However, in actual scenarios, drawings are generally more complex, and the number of objects that need to be annotated is large, which requires a lot of time and effort. This situation reflects that under the existing technical environment, there are significant defects in the annotation process and the annotation efficiency is low. Summary of the invention
[0005] The present disclosure provides a method for displaying annotation content, an electronic device, a readable storage medium, and a program product.
[0006] According to one aspect of the present disclosure, a method for displaying annotation content is provided, comprising: Acquire the occupied area of the target marked object in the drawing and the target marking content corresponding to the target marked object; determining a starting point from the occupied area; determining a turning point from an associated region of the occupied area, wherein the associated region is a region covering at least a portion of the occupied area; and A lead line is generated according to the starting point and the turning point, and the target annotation content is displayed at an extended end of the lead line, wherein the lead line is drawn from the starting point and extends in a first direction when reaching the turning point.
[0007] According to at least one embodiment of the present disclosure, the method for displaying annotated content, determining a starting point from the occupied area, includes: In the case where the type of the target marked object is a point type, the point occupied by the target marked object in the drawing is used as the starting point.
[0008] According to at least one embodiment of the present disclosure, the method for displaying annotated content, determining a starting point from the occupied area, includes: In a case where the type of the target marked object is not a point type, determining feature points of the occupied area; In the case where the feature point is a known occupied point, taking a non-known occupied point in the occupied area near the feature point as the starting point; and In the case that the feature point is the unknown occupied point, the feature point is used as the starting point.
[0009] According to at least one embodiment of the present disclosure, the method for displaying annotated content, determining a turning point from an associated area of the occupied area, includes: For each target point in the associated area, one or more of the distance information, the number of intersections information, the number of overlaps information and the angle information corresponding to the target point is obtained, wherein the distance information represents the distance between the target point and the starting point, the number of intersections information represents the number of intersections between the line connecting the target point and the starting point and the known lead line, the number of overlaps information represents the number of overlaps between the target point and the known starting point or the known turning point, and the angle information represents the angle between the line and the second direction; Determine a score of the target point according to one or more of the distance information, the number of intersections, the number of overlaps, and the angle information corresponding to the target point; and Based on the score, the turning point is determined from the target points of the associated area.
[0010] According to at least one embodiment of the present disclosure, the method for displaying annotation content determines the score of the target point according to one or more of the distance information, the number of intersections, the number of overlaps, and the angle information corresponding to the target point, including: Determine a first score according to the distance information corresponding to the target point, where the first score is positively correlated with the distance; Determine a second score according to the number of intersections corresponding to the target point, where the second score is positively correlated with the number of intersections; Determine a third score according to the number of overlaps corresponding to the target point, wherein the third score is positively correlated with the number of overlaps; Determine a fourth score according to the difference between the angle information corresponding to the target point and the target expected angle, wherein the fourth score is positively correlated with the difference, and the target expected angle is the expected angle corresponding to the angle interval in which the included angle in the angle information is located; and The first score, the second score, the third score and the fourth score are weightedly summed to obtain a score of the target point.
[0011] According to at least one embodiment of the present disclosure, the method for displaying annotation content, the angle is [0 ,90 ) The expected angle corresponding to the interval is 45 , the angle is (-90 ,0 ] The expected angle corresponding to the interval is -45 , the angle is [90 ,180 ) The expected angle corresponding to the interval is 135 , the angle is (-180 ,90 ] The expected angle corresponding to the interval is -135 ; The fourth score is calculated by the following formula: ; in, is the fourth fraction, and x is the included angle.
[0012] According to the method for displaying annotated content in at least one embodiment of the present disclosure, the target point is a point in the associated area other than a known occupied point; and / or The target point is a point in the associated area where a target area exists in the first direction, and the target area is an area where the annotated content can be fully displayed.
[0013] According to the annotation content display method of at least one embodiment of the present disclosure, the length of the associated area in the first direction is smaller than the length of the drawing in the first direction, the length of the associated area in the third direction is the same as the length of the drawing in the third direction, and the third direction is perpendicular to the first direction.
[0014] According to the method for displaying annotated content in at least one embodiment of the present disclosure, the drawing includes a display diagram, and the display diagram includes a plurality of annotated objects; Before obtaining the occupied area of the target marked object in the drawing and the target marked content corresponding to the target marked object, the method further includes: sorting the multiple labeled objects; and The marked objects in the drawing are sequentially selected as the target marked objects.
[0015] According to at least one embodiment of the present disclosure, a method for displaying annotated content, sorting the plurality of annotated objects, includes: sorting the plurality of labeled objects based on types of the labeled objects; Sort the annotated objects of the same type based on the area they occupy in the drawing; and Based on a first distance, the annotated objects occupying the same area in the drawing are sorted, wherein the first distance is the distance between the position of the annotated object in the display image and the center point position of the display image.
[0016] According to at least one embodiment of the present disclosure, a method for displaying annotated content, sorting the plurality of annotated objects, includes: Dividing the plurality of labeled objects into two object groups based on a positional relationship between a center point position of the labeled object in the display image and a center point position of the display image; For each of the two object groups, sorting the labeled objects in the corresponding object group based on a second distance, wherein the second distance is a distance between a center of gravity of the labeled object in the display image and a center of gravity of the object group to which the labeled object belongs in the display image; and Based on the size of the third distance, the annotated objects with the same second distance in the same object group are sorted, wherein the third distance is the horizontal distance or vertical distance between the center of gravity of the annotated object in the display diagram and the edge of the drawing.
[0017] According to at least one embodiment of the present disclosure, a method for displaying annotated content, sorting the plurality of annotated objects, includes: Dividing the plurality of labeled objects into two object groups based on a positional relationship between a center point position of the labeled object in the display image and a center point position of the display image; For each of the two object groups, sorting the labeled objects in the corresponding object group based on a fourth distance, wherein the fourth distance is a horizontal distance or a vertical distance between a center point of the labeled object in the display diagram and an edge of the drawing; and Based on the size of the fifth distance, the labeled objects with the same fourth distance in the same object group are sorted, wherein the fifth distance is the distance between the center point position of the labeled object in the display image and the center point position of the object group to which the labeled object belongs in the display image.
[0018] According to another aspect of the present disclosure, an electronic device is provided, comprising: a display capable of displaying a drawing including lead lines and target annotation content; a memory storing execution instructions; and a processor executing the execution instructions stored in the memory, so that the processor executes the annotation content display method of any embodiment of the present disclosure.
[0019] According to another aspect of the present disclosure, a readable storage medium is provided, wherein the readable storage medium stores execution instructions, and when the execution instructions are executed by a processor, the method for displaying annotated content in any embodiment of the present disclosure is implemented.
[0020] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the method for displaying annotated content according to any embodiment of the present disclosure is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings illustrate exemplary embodiments of the present disclosure and together with the description serve to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification.
[0022] Figure 1 It is a flowchart of a method for displaying annotation content according to an embodiment of the present disclosure.
[0023] Figure 2 It is a schematic diagram of a process of determining a starting point according to an embodiment of the present disclosure.
[0024] Figure 3 Schematic diagram of a process for determining a turning point according to an embodiment of the present disclosure.
[0025] Figure 4 FIG. 4 is a schematic diagram of a process of determining a score of a target point according to an embodiment of the present disclosure.
[0026] Figure 5 is a visualization example diagram of a drawing of one embodiment of the present disclosure.
[0027] Figure 6 FIG. 4 is a visualization example diagram of a correlation region determination process according to an embodiment of the present disclosure.
[0028] Figure 7 It is a flowchart of a method for displaying annotation content according to another embodiment of the present disclosure.
[0029] Figure 8 It is a schematic diagram of a process of sorting multiple labeled objects according to an embodiment of the present disclosure.
[0030] Fig. 9 It is a schematic diagram of a process of sorting multiple labeled objects according to another embodiment of the present disclosure.
[0031] Fig.10 It is a schematic diagram of a process of sorting multiple labeled objects according to another embodiment of the present disclosure.
[0032] Fig.11It is a flowchart of a method for displaying annotation content according to another embodiment of the present disclosure.
[0033] Fig.12 It is a schematic block diagram of the structure of a marked content display device according to an embodiment of the present disclosure.
[0034] Fig.13 It is a schematic block diagram of the structure of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0035] The present disclosure is further described in detail below in conjunction with the accompanying drawings and examples. It is understood that the specific examples described herein are only used to explain the relevant content, rather than to limit the present disclosure. It should also be noted that, for ease of description, only the parts related to the present disclosure are shown in the accompanying drawings.
[0036] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present disclosure can be combined with each other. The technical solution of the present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0037] Drawings are widely used in all walks of life, and the setting of annotation content in drawings is a key link to ensure that the information in the drawings is accurately conveyed to readers. In the decoration industry, the annotation content in the floor plan is often used to understand the layout, structure and size of the house, as well as the decoration materials, furniture, construction details, etc. in various locations of the house. If the method of manually adding annotation content to the places where annotation is required in the drawings is adopted, then when the number of annotated objects included in the drawings is large, the relevant personnel need to invest a lot of time and energy, which leads to low annotation efficiency.
[0038] To this end, the present disclosure proposes a method for displaying annotated content.
[0039] The annotation content display method disclosed in the present invention can be used for an electronic device to display a drawing in which the annotated object is annotated with the corresponding annotation content when receiving the drawings and the annotation content corresponding to the annotated object, and the annotated object and the corresponding annotation content are connected together through a lead. In the present disclosure, the electronic device includes but is not limited to a mobile phone, a tablet computer, a laptop computer, a personal computer, a wearable device, an ATM, etc.
[0040] For the convenience of description and to make the technical solutions of the specific implementation methods of the present disclosure easier to understand, before describing the annotation content display method implemented by the present disclosure, the technical terms involved in the specific implementation methods of the present disclosure are explained as follows: Drawings: important documents used to convey design intent, record technical information and guide construction or production in the fields of engineering technology, architectural design, mechanical manufacturing, etc.
[0041] Annotation: refers to the process of establishing a connection between a specific object in a drawing and the annotated content.
[0042] Callouts: Graphic elements and / or text that provide additional information or explanation.
[0043] Leader: A line used to connect the annotated object and its corresponding annotation content.
[0044] Point type annotated object: that is, the annotated object is a point in the drawing.
[0045] Line type annotated object: that is, the annotated object is a line in the drawing.
[0046] The annotated object is a surface type: that is, the annotated object is a surface in the drawing.
[0047] Figure 1 FIG. 1 is a schematic diagram showing the overall process of a method M100 for displaying annotation content according to an embodiment of the present disclosure. Figure 1 The method shown includes steps S110 to S140. The method can be executed by electronic devices such as mobile phones and computers.
[0048] Specifically, Figure 1 The methods shown include: S110, obtaining the occupied area of the target marked object in the drawing and the target marked content corresponding to the target marked object; The drawings may include presentation diagrams and Figure 4 The display image can be located in the center of the drawing. The display image can include multiple annotated objects, and the target annotated object can be one of the multiple annotated objects. In one example, the display image is a floor plan, and the multiple annotated objects include a master bedroom socket, a living room socket, a second bedroom window, an entrance door, etc. The target annotated object can be a second bedroom balcony, and the target annotation content corresponding to the target annotated object can be "window sill stone".
[0049] Exemplarily, when it is necessary to mark the target annotation content on the target annotated object in the drawing, the drawing (at least one annotated object is identified in advance for identification by the electronic device) and at least one annotation content corresponding to the at least one annotated object can be input into the electronic device, so as to facilitate the electronic device to perform the steps of the annotation content display method disclosed in the present invention. The target annotated object can be one of the at least one annotated object. The target annotation content corresponding to the target annotated object can be one or more of the at least one annotation content corresponding to the target annotated object.
[0050] S120, determining a starting point from the occupied area; The starting point is the starting point of the leader. Since the target annotated object occupies a certain area in the drawing, a starting point can be determined from the occupied area of the target annotated object. The method of determining the starting point includes but is not limited to: randomly selecting a point from the occupied area as the starting point, selecting a point from the occupied area as the starting point according to a first preset rule, etc.
[0051] S130, determining a turning point from an associated region of the occupied region, wherein the associated region is a region covering at least a portion of the occupied region; The associated area can cover at least part of the occupied area, that is, the position of the associated area is determined according to the position of the occupied area. The size of the associated area can be a pre-set fixed size, so that the associated areas of different occupied areas are of the same size; the size of the associated area can also be dynamically determined according to the size of the occupied area, so that the sizes of the associated areas of different occupied areas may be the same or different, which is not limited here.
[0052] The turning point is the turning point of the lead. The method of determining the turning point includes but is not limited to: randomly selecting a point from the associated area as the turning point, selecting a point from the associated area as the turning point according to a second preset rule, etc. Exemplarily, the starting point and turning point of the same target labeled object are different points, and the starting point and turning point of different target labeled objects are also different points, so as to avoid confusion in labeling due to point overlap and reduce the readability of the drawing.
[0053] S140, generating a lead line according to the starting point and the turning point, and displaying the target annotation content at the extended end of the lead line, wherein the lead line is drawn from the starting point and extends in a first direction when reaching the turning point.
[0054] The target annotation content can be a string of characters, which can be displayed in the form of one line at the extended end of the lead, or it can be displayed in the form of multiple lines at the extended end of the lead. In the case of multiple lines of display, the first line can be opposite to the extended end of the lead, or the last line or any middle line can be opposite to the extended end of the lead, and there is no limitation here.
[0055] Optionally, the extended end of the lead extends to a blank area outside the display diagram. As a possible implementation, the first direction is the horizontal direction of the drawing. If the turning point is closer to the left edge of the drawing, the lead is extended horizontally to the left; if the turning point is closer to the right edge of the drawing, the lead is extended horizontally to the right. In this way, the target annotation contents of multiple target annotated objects can be displayed on the left and right sides of the drawing, respectively, reducing the occlusion of the target annotated objects. As another possible implementation, the first direction is the vertical direction of the drawing. If the turning point is closer to the upper edge of the drawing, the lead is extended vertically upward; if the turning point is closer to the lower edge of the drawing, the lead is extended vertically downward. In this way, the target annotation contents of multiple target annotated objects can be displayed on the upper and lower ends of the drawing, respectively, reducing the occlusion of the target annotated objects.
[0056] The annotation content display method of the disclosed embodiment automatically associates the target annotated object and its corresponding target annotation content through the starting point, turning point and leader, thereby realizing automatic annotation, avoiding manual annotation, saving annotation time and improving annotation efficiency. At the same time, since the target annotated object and its corresponding target annotation content are associated together through the leader, rather than placing the target annotation content directly on the target annotated object, it is possible to avoid the target annotation content obscuring the target annotated object to a certain extent, thereby improving the readability of the drawing and the accuracy of information transmission. In addition, the design of the turning point makes the leader not a single straight line, but a broken line, thereby improving flexibility, which is conducive to the leader better avoiding other annotated objects in the drawing, reducing the obstruction of other annotated objects in the drawing, and further improving the readability of the drawing and the accuracy of information transmission.
[0057] In some embodiments of the present disclosure, when the type of the target marked object is a point type, step S120 may include: taking the occupied point of the target marked object in the drawing as the starting point.
[0058] The method for displaying the annotation content of the above embodiment directly uses the occupied point of the point-type target annotated object as the starting point, which simplifies the process of determining the starting point, helps to reduce the amount of calculation and improve efficiency.
[0059] In some embodiments of the present disclosure, when the type of the target labeled object is not a point type, for example, a line type or a surface type, step S120 may include the following: Figure 2 Steps S121 to S123 are shown.
[0060] S121. Determine feature points of the occupied area.
[0061] For example, the feature point may be a center point or a centroid point. The feature point of the occupied area may be determined by an algorithm used in the related art for analyzing geometric objects.
[0062] S122. When the feature point is a known occupied point, a non-known occupied point located near the feature point in the occupied area is used as the starting point, thereby avoiding the overlap of the starting point of the current target marked object with other occupied points, thereby improving the readability of the drawing.
[0063] Known occupied points may include one or more of overlapping feature points, known starting points, and known turning points. Overlapping feature points are common feature points of the occupied areas of multiple target annotated objects. A known starting point is a starting point that has been determined before. A known turning point is a turning point that has been determined before. "Nearby" means that the distance between the two is less than or equal to a distance threshold. Exemplarily, a point that is not a known starting point and a non-known turning point can be randomly selected as the starting point within a certain range from the feature point of the occupied area. It is understandable that if multiple target annotation contents point to the same point through leads, it will be difficult to distinguish which target annotated object the target annotation content corresponds to, thereby increasing the difficulty of reading and understanding the drawings.
[0064] S123. When the feature point is a non-known occupied point, the feature point is used as a starting point, so that the starting point of the non-point type target labeled object can be quickly determined, which is conducive to improving efficiency.
[0065] The annotation content display method of the above-mentioned embodiment determines the starting point by the feature points of the occupied area for non-point type target annotated objects, thereby ensuring that non-point type target annotated objects can also accurately find a suitable starting point, so that target annotated objects of different shapes and sizes can all be properly annotated.
[0066] Regarding step S130, in some embodiments of the present disclosure, it may include the following steps: Figure 3 Steps S131 to S133 are shown.
[0067] S131. For each target point in the associated area, obtain one or more of the distance information, intersection number information, overlap number information and angle information corresponding to the target point, wherein the distance information represents the distance between the target point and the starting point, the intersection number information represents the number of intersections between the line connecting the target point and the starting point and the known lead line, the overlap number information represents the number of overlaps between the target point and the known starting point or the known turning point, and the angle information represents the angle between the line and the second direction.
[0068] The distance can be obtained by calculating the Euclidean distance between points. The number of intersections, the number of overlaps and the angle can be obtained by an algorithm used to analyze geometric objects in related technologies. The second direction can be the horizontal direction or the vertical direction of the drawing, which is not limited here.
[0069] S132: Determine a score of the target point according to one or more of the distance information, the number of intersections information, the number of overlaps information, and the angle information corresponding to the target point.
[0070] Exemplarily, the score of the target point can be determined only based on the distance information, or the number of intersections, or the number of overlaps, or the angle information corresponding to the target point; the score of the target point can also be determined based on any two of the distance information, the number of intersections, the number of overlaps, and the angle information corresponding to the target point; the score of the target point can also be determined based on any three of the distance information, the number of intersections, the number of overlaps, and the angle information corresponding to the target point; the score of the target point can also be determined based on the distance information, the number of intersections, the number of overlaps, and the angle information corresponding to the target point, without limitation herein. By determining the score of the target point, a suitable turning point can be selected more accurately.
[0071] S133. Based on the score, determine the turning point from the target points in the associated area.
[0072] Exemplarily, the score can characterize the difference between the target point and the expected turning point in one or more factors including distance, number of intersections, number of overlaps and angle. If the lower the score, the smaller the difference, the target point with the lowest score in the associated area can be used as the turning point; if the higher the score, the smaller the difference, the target point with the highest score in the associated area can be used as the turning point.
[0073] The annotation content display method of the above-mentioned embodiment can determine the turning point through one or more factors of distance, number of intersections, number of overlaps and angle, thereby improving the rationality of the determined turning point, which is conducive to optimizing the path of the lead line and improving the clarity of the annotation and the rationality of the layout.
[0074] Regarding step S132, in some embodiments of the present disclosure, it may include the following steps: Figure 4 Steps S1321 to S1325 are shown.
[0075] S1321. Determine a first score according to distance information corresponding to the target point, where the first score is positively correlated with the distance.
[0076] The distance corresponding to the target point can be directly used as the first score, and the greater the distance, the greater the first score, and the smaller the distance, the smaller the first score, thereby improving the efficiency of determining the first score.
[0077] S1322. Determine a second score according to the number of intersections corresponding to the target point, where the second score is positively correlated with the number of intersections.
[0078] The number of intersections corresponding to the target point can be directly used as the second score, and the greater the number of intersections, the greater the second score, and the smaller the number of intersections, the smaller the second score, thereby improving the efficiency of determining the second score.
[0079] S1323. Determine a third score according to the number of overlaps corresponding to the target point, where the third score is positively correlated with the number of overlaps.
[0080] The number of coincidences corresponding to the target point can be directly used as the second score, and the greater the number of coincidences, the greater the second score, and the fewer the number of coincidences, the smaller the second score, thereby improving the efficiency of determining the second score.
[0081] S1324. Determine a fourth score based on the difference between the angle information corresponding to the target point and the target expected angle, wherein the fourth score is positively correlated with the difference, and the target expected angle is the expected angle corresponding to the angle interval in the angle information.
[0082] For example, the angle is [0 ,90 ) The expected angle corresponding to the interval is 45 , the angle is (-90 ,0 ] The expected angle corresponding to the interval is -45 , the angle is [90 ,180 ) The expected angle corresponding to the interval is 135 , the angle is (-180 ,90 ] The expected angle corresponding to the interval is -135 Accordingly, the fourth score can be calculated by the following formula 1.
[0083] Formula 1.
[0084] In formula 1, is the fourth fraction, and x is the angle determined by the angle information. Thus, a specific formula of the fourth fraction is provided, which facilitates accurate and rapid determination of the difference between the angle information corresponding to the target point and the target expected angle.
[0085] S1325: Perform a weighted summation on the first score, the second score, the third score and the fourth score to obtain a score of the target point. The score of the target point can be calculated using the following formula 2.
[0086] Formula 2.
[0087] In formula 2, is the score of the target point, is the first score, is the second score, For the third score, is the fourth score, , , and They are weight values respectively. They can be set according to actual needs , , and The specific value of .
[0088] In other embodiments, any one of the first score, second score, third score and fourth score may be used as the score of the target point, or any two or three of the first score, second score, third score and fourth score may be weighted summed as the score of the target point, which is not limited here.
[0089] The annotation content display method of the above-mentioned implementation method determines the score of the target point based on four of the distance information, intersection number information, overlap number information and angle information corresponding to the target point. That is, the score of the target point comprehensively considers the four factors of distance, intersection number, overlap number and angle, thereby improving the scientificity and reliability of the score, which is conducive to accurately screening out the turning point that best meets expectations.
[0090] In some embodiments of the present disclosure, the target point is a point in the associated area other than a known occupied point. In this way, the known occupied points are excluded in advance, which narrows the selection range of the target point, thereby avoiding the subsequent use of the known occupied points as the turning points corresponding to the currently annotated object, and avoiding the intersection of different leads resulting in a decrease in the readability of the drawing. In addition, narrowing the selection range of the target point is conducive to saving unnecessary calculations and improving the annotation efficiency.
[0091] In some embodiments of the present disclosure, the target point is a point in the associated area that has a target area in the first direction, and the target area is an area that can fully display the target annotation content. In this way, points that do not have a target area in the first direction are excluded in advance, which narrows the selection range of the target point, thereby avoiding the subsequent reduction in the readability of the drawing due to the inability to fully display the target annotation content in the first direction. Figure 5 In one example, the first direction is the horizontal direction of the drawing, and the area occupied by the target annotated object is Figure 5The area enclosed by the red lines in the middle is the associated area covered by the grid. One grid can be regarded as one point. Since there is no target area in the first direction for the points in the associated area between the two dotted lines (blocked by the existing target annotation content "threshold stone"), the points in the associated area between the two dotted lines cannot be used as target points, while the points in the associated area outside the two dotted lines can be used as target points.
[0092] In some embodiments of the present disclosure, the target point is a point in the associated area other than the known occupied point and where there is a target area in the first direction, and the target area is an area that can fully display the target annotation content. In this way, while avoiding the subsequent use of the known starting point and the known turning point as the turning point corresponding to the current annotated object, it is ensured that the target annotation content can be fully displayed in the first direction in the subsequent process, thereby improving the readability of the drawing.
[0093] In some embodiments of the present disclosure, the length of the associated area in the first direction is less than the length of the drawing in the first direction, the length of the associated area in the third direction is the same as the length of the drawing in the third direction, and the third direction is perpendicular to the first direction.
[0094] Please combine Figure 6 In one example, the drawings include a presentation diagram and a Figure 4 The blank area around the drawing, the first direction is the horizontal direction of the drawing, and the third direction is the vertical direction of the drawing. Before determining the turning point, a global grid is generated in the drawing. The global grid covers the entire drawing, where a grid can be regarded as a point. Then, the grid range is reduced in the first direction to completely cover the occupied area of the target object to be marked ( Figure 6 The area surrounded by the red line in the middle), at this time, the area where the grid is located is the associated area of the occupied area.
[0095] In the method for displaying the annotation content of the above-mentioned embodiment, the area of the associated region is smaller than the area of the drawing, thereby narrowing the selection range of the turning point, reducing unnecessary selections, and improving the speed of determining the turning point. At the same time, the length of the associated region in the first direction is smaller than the length of the drawing in the first direction, which can ensure that the turning point is closer to the starting point in the first direction, thereby reducing the possibility of the leads crossing each other, making the annotation effect more beautiful. In addition, since the third direction is perpendicular to the first direction and the length of the associated region in the third direction is the same as the length of the drawing in the third direction, there are more choices for the turning point in the third direction. When there is no area in the first direction at a certain point in the associated region that can fully display the target annotation content, other points that meet the conditions (points in the first direction where there is an area that can fully display the target annotation content) can be selected from the third direction of the associated region as turning points, thereby ensuring that the subsequent target annotation content can be fully displayed and improving the readability of the drawing.
[0096] In some embodiments of the present disclosure, the drawings include a display diagram, and the display diagram includes a plurality of annotated objects. Accordingly, before step S110, the following is also included: Figure 7 Step S150 and step S160 shown: S150: Sort multiple labeled objects.
[0097] In the case where there are multiple annotated objects, sorting the multiple annotated objects is conducive to the orderly and accurate execution of the subsequent annotated content display method.
[0098] S160: taking the marked objects in the drawing as target marked objects in sequence.
[0099] Exemplarily, the first labeled object is first taken as the target labeled object and labeled, and after the labeling is completed, the second labeled object is taken as the target labeled object and labeled, and so on, until the labeling of all labeled objects is completed.
[0100] The annotation content display method of the above-mentioned implementation method introduces the step of sorting multiple annotated objects, first determining the order and then processing them in sequence based on the order, thereby preventing conflicts in the annotations of different annotated objects and ensuring that each annotated object can be annotated reasonably and orderly, thereby improving the readability of the drawing.
[0101] As a possible implementation, step S150 may include: Figure 8 Steps S1501 to S1503 are shown.
[0102] S1501. Sort multiple annotated objects based on their types.
[0103] Exemplarily, considering that the smaller the range of the labeled object is, the easier it is to quickly determine the starting point and the turning point, therefore, multiple labeled objects are sorted in the order of point type first, then line type, and then the latter type, so as to ensure that the point type labeled objects are labeled first, then the line type labeled objects are labeled, and finally the surface type labeled objects are labeled, thereby improving the readability of the labeled drawings.
[0104] S1502. Sort the labeled objects of the same type based on the areas occupied by the labeled objects in the drawing.
[0105] Exemplarily, the area occupied by the annotated object in the drawing can be obtained by an algorithm used in the related art to analyze geometric objects. Exemplarily, considering that the smaller the area occupied, the smaller the selectable range of the connection point of the lead on the annotated object, therefore, the annotated objects of the same type are sorted in order of the occupied area from small to large, thereby ensuring that the annotated objects with small occupied areas are processed first in the future, avoiding the annotated objects with small occupied areas having no starting point and turning point to select, and ensuring the smooth execution of the annotation content display method.
[0106] S1503. Sort the annotated objects that occupy the same area in the drawing based on the size of the first distance, wherein the first distance is the distance between the position of the annotated object in the display diagram and the center point of the display diagram.
[0107] Exemplarily, the center point position of the annotated object in the display diagram and the center point position of the display diagram can be obtained by the algorithm used to analyze geometric objects in the relevant technology. Exemplarily, considering that the smaller the first distance is, the longer the lead line required to connect the displayed annotation content and its corresponding annotated object is, and the greater the probability of the lead line crossing other leads, therefore, the annotated objects with the same area occupied in the drawing are sorted in order from small to large in the first distance, so as to ensure that the annotated objects with a small first distance are processed first in the future, so that when generating the lead line of the annotated object with a large first distance, there are more options to avoid the lead line of the annotated object with a small first distance, reduce the number of lead line crossings, and improve the readability of the annotated drawing.
[0108] The annotation content display method of the above-mentioned embodiment sorts multiple annotated objects based on three factors: the type of the annotated object, the size of the area occupied by the annotated object in the drawing, and the distance between the center point position of the annotated object in the drawing and the center point position of the display diagram, thereby improving the rationality of the sorting results, facilitating the smooth execution of the annotation content display method, and helping to improve the typesetting effect of the annotation content and leaders.
[0109] As another possible implementation, step S150 may include: Fig. 9 Steps S1511 to S1513 are shown.
[0110] S1511. Divide a plurality of labeled objects into two object groups based on a positional relationship between the center point positions of the labeled objects in the display image and the center point positions of the display image.
[0111] In an example, the two object groups include a left object group and a right object group. If the horizontal coordinate of the center point position of the labeled object in the display image is smaller than the horizontal coordinate of the center point position of the display image, the labeled object is classified into the left object group; if the horizontal coordinate of the center point position of the labeled object in the display image is greater than or equal to the horizontal coordinate of the center point position of the display image, the labeled object is classified into the right object group.
[0112] In another example, the two object groups include an upper object group and a lower object group. If the vertical coordinate of the center point position of the marked object in the display image is smaller than the vertical coordinate of the center point position of the display image, the marked object is classified into the lower object group; if the vertical coordinate of the center point position of the marked object in the display image is greater than or equal to the vertical coordinate of the center point position of the display image, the marked object is classified into the upper object group.
[0113] Dividing into two object groups facilitates better labeling. In the subsequent labeling process, the labeled objects in one of the two object groups can be labeled first, and after labeling multiple labeled objects in one object group, the labeled objects in the other object group can be labeled; the labeled objects in the two object groups can also be labeled separately at the same time, which is not limited here.
[0114] S1512. For each of the two object groups, sort the labeled objects in the corresponding object group based on the size of the second distance, wherein the second distance is the distance between the center of gravity position of the labeled object in the display image and the center of gravity position of the object group to which the labeled object belongs in the display image.
[0115] Exemplarily, considering that the smaller the second distance is, the longer the length required for the lead to extend to the blank area of the drawing, and thus the greater the probability of the lead crossing other leads, therefore, in an object group, the annotated objects in the object group are sorted in order of the second distance from small to large, so as to ensure that the annotated objects with a small second distance are processed first in the subsequent processing, so that when generating leads of annotated objects with a large second distance, there are more options to avoid the generated leads of annotated objects with a small second distance, thereby reducing the number of lead crossings and improving the readability of the annotated drawings.
[0116] S1513. Sort the annotated objects with the same second distance in the same object group based on the size of the third distance, wherein the third distance is the horizontal distance or vertical distance between the center of gravity of the annotated object in the display diagram and the edge of the drawing.
[0117] Exemplarily, considering that the smaller the third distance is, the shorter the length required for the lead line to extend to the blank area of the drawing, and thus the annotation content can be annotated at the position closest to the annotated object. Therefore, in an object group, the annotated objects with the same second distance in the object group are sorted in order of the third distance from small to large, thereby ensuring that the annotated objects with a small third distance are processed first in the subsequent processing. This is conducive to shortening the lead length, making it easier for readers to quickly find the annotation content corresponding to the annotated object on the annotated drawing, and improving the readability of the annotated drawing.
[0118] In an example, if multiple available units are distributed on the left and right sides of the drawing, the third distance is the horizontal distance between the center of gravity of the marked object in the display drawing and the edge of the drawing; if multiple available units are distributed on the upper and lower ends of the drawing, the third distance is the vertical distance between the center of gravity of the marked object in the display drawing and the edge of the drawing; if multiple available units are distributed around the drawing, the third distance is the minimum value of the horizontal distance or the vertical distance between the center of gravity of the marked object in the display drawing and the edge of the drawing.
[0119] The annotation content display method of the above-mentioned embodiment sorts multiple annotated objects based on three factors: the positional relationship of the center point position of the annotated object in the display diagram relative to the center point position of the display diagram, the distance between the center point position of the annotated object in the display diagram and the center point position of the corresponding object group, and the horizontal distance or vertical distance between the center point position of the annotated object in the display diagram and the edge of the drawing, thereby improving the rationality of the sorting results, facilitating the smooth execution of the annotation content display method, and helping to improve the typesetting effect of the annotation content and leaders.
[0120] As another possible implementation, step S150 may include: Fig.10 Steps S1521 to S1523 are shown.
[0121] S1521. Divide a plurality of labeled objects into two object groups based on a positional relationship between the center point positions of the labeled objects in the display image and the center point positions of the display image.
[0122] The relevant content of step S1521 can refer to the description of step S1511, and for the sake of brevity, it will not be repeated here.
[0123] S1522. For each of the two object groups, sort the marked objects in the corresponding object group based on the size of a fourth distance, wherein the fourth distance is the horizontal distance or vertical distance between the center point of the marked object in the display diagram and the edge of the drawing.
[0124] Exemplarily, considering that the smaller the fourth distance is, the shorter the length required for the lead line to extend to the blank area of the drawing, and thus the annotation content can be annotated at the position closest to the annotated object. Therefore, in an object group, the annotated objects in the object group are sorted in order of the fourth distance from small to large, so as to ensure that the annotated objects with a small fourth distance are processed first in the subsequent processing, which is conducive to shortening the lead length, making it easier for readers to quickly find the annotation content corresponding to the annotated object on the annotated drawing, thereby improving the readability of the annotated drawing.
[0125] S1523. Sort the labeled objects with the same fourth distance in the same object group based on the size of the fifth distance, wherein the fifth distance is the distance between the center point position of the labeled object in the display image and the center point position of the object group to which the labeled object belongs in the display image.
[0126] Exemplarily, considering that the smaller the fifth distance is, the longer the length required for the lead to extend to the blank area of the drawing, and thus the greater the probability of the lead crossing other leads, therefore, in an object group, the annotated objects with the same fourth distance in the object group are sorted in order of the fifth distance from small to large, so as to ensure that the annotated objects with a small fifth distance are processed first in the subsequent processing, so that when generating leads of annotated objects with a large fifth distance, there are more options to avoid the generated leads of annotated objects with a small fifth distance, thereby reducing the number of lead crossings and improving the readability of the annotated drawings.
[0127] In an example, if multiple available units are distributed on the left and right sides of the drawing, the fifth distance is the horizontal distance between the center point of the marked object in the display drawing and the edge of the drawing; if multiple available units are distributed on the upper and lower ends of the drawing, the fifth distance is the vertical distance between the center point of the marked object in the display drawing and the edge of the drawing; if multiple available units are distributed around the drawing, the fifth distance is the minimum value of the horizontal distance or the vertical distance between the center point of the marked object in the display drawing and the edge of the drawing.
[0128] The annotation content display method of the above-mentioned embodiment sorts multiple annotated objects based on three factors: the position of the center point of the annotated object relative to the center point of the display diagram, the minimum distance between the center point of the annotated object and the edge of the drawing in the first direction, and the distance between the center point of the annotated object and the center point of the corresponding object group. This improves the rationality of the sorting results, facilitates the smooth execution of the annotation content display method, and is beneficial to improving the typesetting effect of the annotation content and leaders.
[0129] Please combine Fig.11In one example, the annotation content display method may include the following steps S201 to S219. The contents related to steps S201 to S219 can refer to the description of the above implementation method. For the sake of brevity, they will not be repeated here.
[0130] In step S201, the drawings and the annotation contents of the annotated objects are obtained. The drawings include multiple annotated objects. The annotated objects may have multiple annotation contents.
[0131] In step S202, a global grid covering the entire drawing is generated. One grid can be regarded as one point.
[0132] In step S203, a plurality of annotated objects in the drawing are sorted.
[0133] In step S204 , a labeled object (ie, a target labeled object) is selected from the multiple labeled objects based on the order.
[0134] In step S205, it is determined whether the type of the currently selected labeled object is a point type. If so, step S206 is executed; otherwise, step S207 is executed.
[0135] In step S206, the marked object is directly used as the starting point.
[0136] In step S207, it is determined whether the feature point of the marked object is a known occupied point, if so, step S208 is executed, otherwise step S209 is executed. The known occupied point may include one or more of a coincident feature point, a known starting point and a known turning point.
[0137] In step S208, a non-known occupied point located near the feature point in the occupied area is used as a starting point.
[0138] In step S209, the feature point is used as the starting point.
[0139] In step S210, the grid range is reduced in the first direction to a degree that can completely cover the area occupied by the current annotated object in the drawing, and the associated area of the occupied area is obtained.
[0140] In step S211, a point is selected from the associated area.
[0141] In step S212, it is determined whether the currently selected point is a known occupied point. If so, step S211 is executed again, otherwise, step S213 is executed.
[0142] In step S213, it is determined whether the currently selected point is within the target area in the first direction. If so, step S214 is executed, otherwise step S211 is executed again.
[0143] In step S214, the score of the currently selected point is calculated.
[0144] In step S215, it is determined whether the points in the associated area have been traversed. If so, step S216 is executed, otherwise step S211 is executed again.
[0145] In step S216, based on the scores, turning points are determined from the associated regions.
[0146] In step S217 , a leader line is generated according to the starting point and the turning point, and the target annotation content (ie, one or more annotation contents of the target annotated object) is displayed at the extended end of the leader line.
[0147] In step S218, it is determined whether the traversal of the marked objects in the drawing is complete. If so, step S219 is executed, otherwise step S204 is executed again.
[0148] In step S219, a drawing showing the leader line and target annotation content is output.
[0149] Based on any of the above implementations, the present disclosure also provides a device for displaying annotated content.
[0150] Fig.12 It is a schematic block diagram of the structure of a marked content display device according to an embodiment of the present disclosure.
[0151] like Fig.12 As shown, the marking content display device includes: The acquisition module 110 is used to acquire the occupied area of the target marked object in the drawing and the target marking content corresponding to the target marked object.
[0152] The first determining module 120 is configured to determine a starting point from the occupied area.
[0153] The second determining module 130 is configured to determine a turning point from an associated region of the occupied region, wherein the associated region is a region covering at least a portion of the occupied region.
[0154] The display module 140 is used to generate a lead line according to the starting point and the turning point, and display the target annotation content at the extended end of the lead line, wherein the lead line is drawn from the starting point and extends in a first direction when reaching the turning point.
[0155] The above-mentioned annotation content display device may be in the form of computer software, and each module of the above-mentioned annotation content display device may be implemented by a computer software module.
[0156] In some embodiments of the present disclosure, the first determining module 120 is used to: when the type of the target marked object is a point type, take the occupied point of the target marked object in the drawing as the starting point.
[0157] In some embodiments of the present disclosure, the first determination module 120 is used to: determine the feature points of the occupied area when the type of the target labeled object is not a point type; when the feature point is a known occupied point, use a non-known occupied point in the occupied area that is located near the feature point as the starting point; and when the feature point is a non-known occupied point, use the feature point as the starting point.
[0158] In some embodiments of the present disclosure, the second determination module 130 is used to: for each target point in the associated area, obtain one or more of the distance information, intersection number information, overlap number information and angle information corresponding to the target point, wherein the distance information represents the distance between the target point and the starting point, the intersection number information represents the number of intersections between the line connecting the target point and the starting point and the known lead line, the overlap number information represents the number of overlaps between the target point and the known starting point or the known turning point, and the angle information represents the angle between the connecting line and the second direction; determine the score of the target point according to one or more of the distance information, intersection number information, overlap number information and angle information corresponding to the target point; and determine the turning point from the target points in the associated area based on the score.
[0159] In some embodiments of the present disclosure, the second determination module 130 is used to: determine a first score based on the distance information corresponding to the target point, the first score is positively correlated with the distance; determine a second score based on the number of intersections information corresponding to the target point, the second score is positively correlated with the number of intersections; determine a third score based on the number of overlaps information corresponding to the target point, the third score is positively correlated with the number of overlaps; determine a fourth score based on the difference between the angle information corresponding to the target point and the target expected angle, the fourth score is positively correlated with the difference, and the target expected angle is the expected angle corresponding to the angle interval in the angle information; perform weighted summation on the first score, the second score, the third score and the fourth score to obtain the score of the target point.
[0160] In some embodiments of the present disclosure, the angle is [0 ,90 ) The expected angle corresponding to the interval is 45 , the angle is (-90 ,0 ] The expected angle corresponding to the interval is -45 , the angle is [90 ,180 ) The expected angle corresponding to the interval is 135 , the angle is (-180 ,90 ] The expected angle corresponding to the interval is -135 ; The fourth score is calculated by the following formula: ;in, is the fourth fraction and x is the angle.
[0161] In some embodiments of the present disclosure, the target point is a point in the associated area other than a known occupied point; and / or the target point is a point in the associated area where a target area exists in the first direction, and the target area is an area that can fully display the target annotation content.
[0162] In some embodiments of the present disclosure, the length of the associated area in the first direction is less than the length of the drawing in the first direction, the length of the associated area in the third direction is the same as the length of the drawing in the third direction, and the third direction is perpendicular to the first direction.
[0163] In some embodiments of the present disclosure, the drawing includes a display diagram, which includes multiple labeled objects. Accordingly, the annotation content display device also includes a sorting module and a third determination module, wherein the sorting module is used to sort the multiple labeled objects, and the third determination module is used to sequentially select the labeled objects in the drawing as target labeled objects.
[0164] In some embodiments of the present disclosure, a sorting module is used to: sort multiple annotated objects based on the type of the annotated objects; sort annotated objects of the same type based on the area occupied by the annotated objects in the drawing; and sort annotated objects with the same area occupied in the drawing based on a first distance, wherein the first distance is the distance between the position of the annotated object in the display image and the center point position of the display image.
[0165] In some embodiments of the present disclosure, a sorting module is used to: divide a plurality of annotated objects into two object groups based on a positional relationship of a center point position of the annotated object in a display diagram relative to a center point position of the display diagram; for each of the two object groups, sort the annotated objects in the corresponding object group based on a second distance, wherein the second distance is the distance between a center point position of the annotated object in the display diagram and a center point position of the object group to which the annotated object belongs in the display diagram; and sort the annotated objects with the same second distance in the same object group based on a third distance, wherein the third distance is the horizontal distance or vertical distance between the center point position of the annotated object in the display diagram and an edge of the drawing.
[0166] In some embodiments of the present disclosure, a sorting module is used to: divide a plurality of annotated objects into two object groups based on a positional relationship of a center point position of the annotated object in a display diagram relative to a center point position of the display diagram; for each of the two object groups, sort the annotated objects in the corresponding object group based on a fourth distance, wherein the fourth distance is a horizontal distance or a vertical distance between a center point position of the annotated object in the display diagram and an edge of the drawing; and sort the annotated objects in the same object group with the same fourth distance based on a fifth distance, wherein the fifth distance is a distance between a center point position of the annotated object in the display diagram and a center point position of the object group to which the annotated object belongs in the display diagram.
[0167] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, which will not be repeated here.
[0168] The execution subject of the annotation content display method in the specific implementation manner of the present disclosure may be a mobile phone, a computer or other electronic device.
[0169] Therefore, based on any of the above embodiments, the present disclosure further provides an electronic device, which can execute the annotation content display method of any of the embodiments described above in the present disclosure.
[0170] Fig.13 1 is a schematic block diagram of the structure of an electronic device 1000 according to an embodiment of the present disclosure.
[0171] The hardware structure of the electronic device 1000 can be implemented using a bus architecture. The bus architecture can include any number of interconnecting buses and bridges, depending on the specific application and overall design constraints of the hardware. The bus 1100 connects various circuits including one or more processors 1200, memory 1300, display 1500 and / or hardware modules together. The bus 1100 can also connect various other circuits 1400 such as peripherals, voltage regulators, power management circuits, external antennas, etc.
[0172] The bus 1100 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Component (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the figure is represented by only one connecting line, but it does not mean that there is only one bus or one type of bus. The memory 1300 stores a computer program, and when the processor 1200 executes the computer program, the processor 1200 can execute the annotation content display method of any of the above-mentioned embodiments. The display 1500 can display drawings including lead lines and target annotation content.
[0173] The present disclosure also provides a readable storage medium, in which a computer program is stored, and the computer program is used to implement the above method when executed by a processor. "Readable storage medium" can be any device that can contain, store, communicate, propagate or transmit a program for use in an instruction execution system, device or equipment or in combination with these instruction execution systems, devices or equipment. More specific examples of readable storage media include the following: an electrical connection portion (electronic device) with one or more wirings, a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM), etc.
[0174] The present disclosure also provides a computer program product. The method of the present disclosure can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed, the process or function of the present disclosure is executed in whole or in part.
[0175] The computer program or instructions may be stored in a readable storage medium or transmitted from one readable storage medium to another readable storage medium, for example, the computer program or instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired or wireless means. The readable storage medium may be any available medium that can be accessed or a data storage device such as a server, data center, etc. that integrates one or more available media. The available medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it may also be an optical medium, such as a digital video disk; it may also be a semiconductor medium, such as a solid state drive. The computer readable storage medium may be a volatile or non-volatile storage medium, or may include both volatile and non-volatile types of storage media.
[0176] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0177] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0178] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0179] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0180] In the description of this specification, the description with reference to the terms "one embodiment / method", "some embodiments / methods", "example", "specific example", or "some examples" etc. means that the specific features, structures, or characteristics described in conjunction with the embodiment / method or example are included in at least one embodiment / method or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment / method or example. Moreover, the specific features, structures, or characteristics described may be combined in any one or more embodiments / methods or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments / methods or examples described in this specification and features of different embodiments / methods or examples, unless they are contradictory.
[0181] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0182] Those skilled in the art should understand that the above embodiments are only for the purpose of clearly illustrating the present disclosure, and are not intended to limit the scope of the present disclosure. For those skilled in the art, other changes or modifications may be made based on the above disclosure, and these changes or modifications are still within the scope of the present disclosure.
Claims
1. A method for displaying annotated content, characterized in that: include: Acquire the occupied area of the target marked object in the drawing and the target marking content corresponding to the target marked object; determining a starting point from the occupied area; determining a turning point from an associated region of the occupied area, wherein the associated region is a region covering at least a portion of the occupied area; and A lead line is generated according to the starting point and the turning point, and the target annotation content is displayed at an extended end of the lead line, wherein the lead line is drawn from the starting point and extends in a first direction when reaching the turning point.
2. The method for displaying annotation content according to claim 1, characterized in that: Determining a starting point from the occupied area includes: In the case where the type of the target marked object is a point type, the point occupied by the target marked object in the drawing is used as the starting point.
3. The method for displaying annotation content according to claim 1, characterized in that: Determining a starting point from the occupied area includes: In a case where the type of the target marked object is not a point type, determining feature points of the occupied area; In the case where the feature point is a known occupied point, taking a non-known occupied point in the occupied area near the feature point as the starting point; and In the case that the feature point is the unknown occupied point, the feature point is used as the starting point.
4. The method for displaying annotation content according to claim 1, characterized in that: Determining a turning point from a correlation region of the occupied region comprises: For each target point in the associated area, one or more of the distance information, the number of intersections information, the number of overlaps information and the angle information corresponding to the target point is obtained, wherein the distance information represents the distance between the target point and the starting point, the number of intersections information represents the number of intersections between the line connecting the target point and the starting point and the known lead line, the number of overlaps information represents the number of overlaps between the target point and the known starting point or the known turning point, and the angle information represents the angle between the line and the second direction; Determine a score of the target point according to one or more of the distance information, the number of intersections, the number of overlaps, and the angle information corresponding to the target point; and Based on the score, the turning point is determined from the target points of the associated area.
5. The method for displaying annotation content according to claim 4, characterized in that: Determining a score of the target point according to one or more of distance information, intersection number information, overlap number information, and angle information corresponding to the target point includes: Determine a first score according to the distance information corresponding to the target point, where the first score is positively correlated with the distance; Determine a second score according to the number of intersections corresponding to the target point, where the second score is positively correlated with the number of intersections; Determine a third score according to the number of overlaps corresponding to the target point, wherein the third score is positively correlated with the number of overlaps; Determine a fourth score according to the difference between the angle information corresponding to the target point and the target expected angle, wherein the fourth score is positively correlated with the difference, and the target expected angle is the expected angle corresponding to the angle interval in which the included angle in the angle information is located; and The first score, the second score, the third score and the fourth score are weightedly summed to obtain a score of the target point.
6. The method for displaying annotation content according to claim 4, characterized in that: The target point is a point in the associated area other than a known occupied point; and / or The target point is a point in the associated area where a target area exists in the first direction, and the target area is an area that can fully display the target annotation content.
7. The method for displaying annotation content according to any one of claims 1 to 6, characterized in that: The length of the associated area in the first direction is less than the length of the drawing in the first direction, the length of the associated area in the third direction is the same as the length of the drawing in the third direction, and the third direction is perpendicular to the first direction.
8. An electronic device, characterized in that: include: A display capable of displaying drawings including leader and target annotation contents; A memory storing execution instructions; as well as A processor, wherein the processor executes the execution instruction stored in the memory, so that the processor executes the annotation content display method according to any one of claims 1 to 7.
9. A readable storage medium, characterized in that: The readable storage medium stores execution instructions, and when the execution instructions are executed by the processor, they are used to implement the annotation content display method according to any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the annotation content display method according to any one of claims 1 to 7 is implemented.