Graphic data creation device, graphic data creation method, and graphic data creation program
The graphic data creation device automates the extraction of line segments and corner points from drawing images, reducing operator workload and enabling efficient generation of vector data.
Patent Information
- Application Number
- JP2024080043
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-05-16
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2044-05-16
AI Technical Summary
Existing graphic data creation devices require manual drawing of objects by operators, increasing their workload.
A graphic data creation device that automatically extracts horizontal and vertical line segments from a drawing image, generates guide lines, identifies outline corner points, and generates tracing lines to represent the object, reducing the need for manual drawing.
Reduces the operator's workload by automating the process of creating graphic data, allowing for efficient generation of vector data representing objects.
Smart Images

Figure 2025174045000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to a graphic data creation device, a graphic data creation method, and a graphic data creation program. [Background technology]
[0002] Patent Document 1 describes a graphic data creation device that creates graphic data made up of vector data based on a drawing image formed from raster data depicting a part. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] International Publication No. 2023 / 120432 Summary of the Invention [Problem to be solved by the invention]
[0004] In the graphic data creation device described in Patent Document 1, a computer recognizes a component as an object depicted in a drawing image and superimposes horizontal and vertical guide lines on the drawing image that overlap with the horizontal and vertical line segments of the component. In the graphic data creation device described in Patent Document 1, an operator draws a component by selecting the line segments of the guide lines that surround the component while viewing the drawing image on which the guide lines are superimposed. This allows the graphic data creation device to create graphic data representing the drawn component.
[0005] In the graphic data creation device described in Patent Document 1, an operator must manually draw the objects depicted in the drawing image. There is a need for a graphic data creation device, a graphic data creation method, and a graphic data creation program that can reduce the operator's workload. [Means for solving the problem]
[0006] A first aspect of one or more embodiments provides a graphic data creation device comprising a non-transitory storage medium storing a graphic data creation program and a central processing unit, wherein the central processing unit executes the graphic data creation program to extract horizontal and vertical line segments that constitute the outline of an arbitrary object drawn in a drawing image read by the central processing unit, generate horizontal and vertical guide lines that overlap with the horizontal and vertical line segments, extract outline corner points that indicate the positions of the outline corners of the object based on the intersections of the horizontal and vertical guide lines, generate tracing lines that connect the extracted outline corner points, and generate graphic data representing the object based on the tracing lines.
[0007] A second aspect of one or more embodiments provides a graphic data creation method in which a computer device reads a drawing image on which an arbitrary object is drawn, extracts horizontal and vertical line segments that constitute the outline of the object drawn in the drawing image, generates horizontal and vertical guide lines that overlap with the horizontal and vertical line segments, extracts outline corner points that indicate the positions of the outline corners of the object based on the intersections of the horizontal and vertical guide lines, generates tracing lines that connect the extracted outline corner points, and generates graphic data representing the object based on the tracing lines.
[0008] A third aspect of one or more embodiments provides a graphic data creation program that causes a computer device to execute the steps of reading a drawing image in which an arbitrary object is drawn, extracting horizontal and vertical line segments that constitute the outline of the object drawn in the drawing image, generating horizontal and vertical guide lines that overlap with the horizontal and vertical line segments, extracting outline corner points that indicate the positions of the outline corners of the object based on the intersections of the horizontal and vertical guide lines, generating tracing lines that connect the extracted outline corner points, and generating graphic data representing the object based on the tracing lines. [Effects of the Invention]
[0009] According to one or more embodiments of the graphic data creation device, the graphic data creation method, and the graphic data creation program, the workload of the operator can be reduced. [Brief explanation of the drawings]
[0010] [Figure 1] FIG. 1 is a block diagram illustrating a graphics data generation device according to one or more embodiments. [Figure 2] FIG. 2 is a block diagram showing an example of the functional configuration of a graphic data creation device according to one or more embodiments, which is realized by a central processing unit of a computer device executing a graphic data creation program according to one or more embodiments. [Figure 3] FIG. 3 is a diagram showing an example of a drawing image. [Figure 4] FIG. 4 is a diagram showing a state in which guide lines are superimposed on the object depicted in the drawing image shown in FIG. [Figure 5] FIG. 5 is a conceptual diagram showing in three dimensions a drawing image layer on which a drawing image is drawn and a guide line layer on which guide lines are drawn. [Figure 6] FIG. 6 is a diagram showing intersections of guide lines. [Figure 7A] FIG. 7A is a diagram showing an example in which object pixels exist in the periphery of the intersection of the guide lines. [Figure 7B] FIG. 7B is a diagram showing an example in which no object pixels exist in the periphery of the intersection of the guide lines. [Figure 8A] FIG. 8A is a diagram showing an example of an upper corner of an object determined based on an upper / lower determination region set in the periphery of an intersection of guide lines. [Figure 8B] FIG. 8B is a diagram showing an example of a lower corner of an object determined based on an upper / lower determination region set in the periphery of the intersection of the guide lines. [Figure 8C] FIG. 8C is a diagram showing an example of a continuous vertical line of an object determined based on an up-down determination region set in the periphery of the intersection of the guide lines. [Figure 8D]FIG. 8D is a diagram showing an example of the absence of object pixels in the vertical direction determined based on the up / down determination region set in the periphery of the intersection of the guide lines. [Figure 9A] FIG. 9A is a diagram showing an example of the left corner of an object determined based on a left / right determination region set in the periphery of the intersection of the guide lines. [Figure 9B] FIG. 9B is a diagram showing an example of a right corner of an object determined based on a left / right determination region set in the periphery of the intersection of the guide lines. [Figure 9C] FIG. 9C is a diagram showing an example of a horizontal continuous line of an object determined based on a left-right determination region set in the periphery of the intersection of the guide lines. [Figure 9D] FIG. 9D is a diagram showing an example of the absence of object pixels in the horizontal direction determined based on a left / right determination region set in the periphery of the intersection of the guide lines. [Figure 10] FIG. 10 is a conceptual diagram showing a state in which intersections of guide lines indicating corners of an object are extracted as contour corners. [Figure 11] FIG. 11 is a diagram showing guide line segments obtained by dividing a guide line. [Figure 12A] FIG. 12A is a diagram showing an example of a guide line segment that does not constitute an outline line segment of an object. [Figure 12B] FIG. 12B is a diagram showing an example of guide line segments that form the outline line segments of an object. [Figure 13] FIG. 13 is a diagram showing guide line segments that overlap with the outline line segments of an object. [Figure 14] FIG. 14 is a diagram showing a state in which intersections of guide lines indicating corners of an object are extracted as outline corners based on guide line segments that overlap with the outline line segments of the object shown in FIG. [Figure 15] FIG. 15 is a conceptual diagram showing a state in which trace lines indicating an object are drawn on the trace line layer based on the contour corner points shown in FIG. 10 or 14. In FIG. [Figure 16] FIG. 16 is a diagram showing an example in which the corners of an object are rounded. [Figure 17A] FIG. 17A is a diagram showing a trace line generated based on the object with rounded corners shown in FIG. [Figure 17B] FIG. 17B is a diagram showing the trace line shown in FIG. 17A after being corrected to have rounded corners by R-chamfering. [Figure 18] FIG. 18 is a diagram showing an example of an object with large C-chamfered corners. [Figure 19] FIG. 19 is a diagram showing corner points of the outer shape of an object extracted based on the intersection points of the guide lines superimposed on the drawing image shown in FIG. [Figure 20] FIG. 20 is a conceptual diagram showing a state in which the corner points of the outer shape of the object shown in FIG. 19 are divided into upper and lower corners and left and right corners. [Figure 21] FIG. 21 is a diagram showing a state in which the unextracted outer corner points in FIG. 19 have been filled in. [Figure 22] FIG. 22 is a diagram showing a trace line generated based on the four contour corner points shown in FIG. [Figure 23] FIG. 23 is a diagram showing a state in which the trace line shown in FIG. 22 has been corrected to match the shape of an actual object with C-chamfered corners shown in FIG. [Figure 24] FIG. 24 is a flowchart showing a process executed by a computer device according to one or more embodiments of a graphic data creation method or one or more embodiments of a graphic data creation program. DETAILED DESCRIPTION OF THE INVENTION
[0011] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A graphic data creation device, a graphic data creation method, and a graphic data creation program according to one or more embodiments will be specifically described below with reference to the accompanying drawings.
[0012] As shown in FIG. 1, a graphic data creation device 100 according to one or more embodiments includes a central processing unit 1, a non-transitory storage medium 2, an operation unit 3, and a display unit 4. The non-transitory storage medium 2 stores a graphic data creation program 20 according to one or more embodiments. The graphic data creation device 100 can be configured as a computer device. The non-transitory storage medium 2 is a storage medium readable by the computer device. The central processing unit 1 executes the graphic data creation program 20. When the central processing unit 1 executes the graphic data creation program 20, a working memory (not shown) may be used.
[0013] As shown in Figure 2, when the central processing unit 1 executes the graphic data creation program 20, the central processing unit 1 is virtually configured to include an arrow detection unit 11, a line detection unit 12, a guide line generation unit 13, an outline corner extraction unit 14, a trace line generation unit 15, a graphic correction unit 16, a graphic data generation unit 17, and an editing unit 18.
[0014] The operation of the graphic data creation device 100 when creating graphic data based on the drawing image 50 shown in Fig. 3 will be described. The graphic data creation device 100 reads the drawing image 50 shown in Fig. 3. The editing unit 18 displays the read drawing image 50 on the display unit 4. The graphic data of the drawing image 50 may be any graphic data formed from raster data such as a PDF file, PNG file, or JPEG file.
[0015] In FIG. 3, a part 51 is drawn in a drawing image 50 as an example of an arbitrary object. The part 51 has horizontal line segments 511, 513, and 515 and vertical line segments 512, 514, and 516. The part 51 has a closed shape formed by connecting the line segments 511 to 516. The part 51 has corners C1 to C6. The line segments 511 to 516 form the outer shape of the part 51.
[0016] Near corners C2 and C3, extension lines 61 and 62 are drawn on lines extending from line segments 512 and 514, respectively, and extend downward of part 51. Near corners C6 and C4, extension lines 63 and 64 are drawn on lines extending from line segments 516 and 514, respectively, and extend upward of part 51. Near corners C6, C4, and C3, extension lines 65, 66, and 67 are drawn on lines extending from line segments 511, 515, and 513, respectively, and extend to the right of part 51.
[0017] Between extension lines 61 and 62, a dimension line 71 consisting of a double-headed arrow is drawn, parallel to line segment 513. Between extension lines 63 and 64, a dimension line 72 consisting of a double-headed arrow is drawn, parallel to line segment 515. Between extension lines 65 and 66, a dimension line 73 consisting of a double-headed arrow is drawn, parallel to line segment 516. Between extension lines 66 and 67, a dimension line 74 consisting of a double-headed arrow is drawn, parallel to line segment 514. Numerals indicating dimensions are written near dimension lines 71 to 74. The dimension between corners C2 and C3 is 90 mm. The dimension between corners C4 and C5 is 30 mm. The dimension between corners C5 and C6 is 20 mm. The dimension between corners C3 and C4 is 30 mm.
[0018] The arrow detection unit 11 detects arrows and their directions in the drawing image 50. The line detection unit 12 detects lines in the drawing image 50. The arrow detection unit 11 learns arrows based on pre-given training data for arrows. Therefore, the arrow detection unit 11 can accurately detect arrows. As an example, the line detection unit 12 recognizes a line segment to which an arrow detected by the arrow detection unit 11 is added and a line segment that contacts and intersects with the line segment to which an arrow is added as a line segment different from the line segments (external line segments) that make up the outer shape of the component 51. As a result, in the example shown in FIG. 3, the line detection unit 12 recognizes line segments 511 to 516 as outer shape line segments.
[0019] As shown in FIG. 4, the guide line generation unit 13 generates vertical guide lines 81, 82, and 83 that overlap with line segments 512, 516, and 514 of the component 51, respectively, and horizontal guide lines 84, 85, and 86 that overlap with line segments 511, 515, and 513, respectively, and superimposes these on the drawing image 50. The guide lines 81 to 86 are thinner than the line segments 511 to 516, pass through the tips of the arrows detected by the arrow detection unit 11, and are drawn perpendicular to the line segments to which the arrows are added. The editing unit 18 displays the drawing image 50 on which the guide lines 81 to 86 are superimposed on the display unit 4. In the example shown in FIG. 4, the guide lines 81 to 86 are generated so as to connect the top and bottom or the left and right of the outer frame surrounding the component 51.
[0020] As conceptually shown in Fig. 5, the drawing image 50 is drawn on a drawing image layer, and the guide lines 81 to 86 are drawn on a guide line layer different from the drawing image layer. In Figs. 4 and 5, the guide lines 81 to 86 are drawn as dashed lines to distinguish them from the line segments 511 to 516 of the component 51, but they do not have to be dashed lines and may be solid lines. Because the drawing image 50 is typically drawn in black, it is preferable to draw the guide lines 81 to 86 in a color different from the color of the drawing image 50, such as blue.
[0021] The outer corner extraction unit 14 extracts the outer corners of the component 51 as follows: As shown in Fig. 6, the guide lines 81 to 86 have intersections i14, i15, and i16 between the guide line 81 and the guide lines 84 to 86, intersections i24, i25, and i26 between the guide line 82 and the guide lines 84 to 86, and intersections i34, i35, and i36 between the guide line 83 and the guide lines 84 to 86.
[0022] FIG. 7A shows an enlarged view of the vicinity of intersection i14 of drawing image 50 on which guide lines 81 to 86 are superimposed. A circle of a predetermined radius centered at intersection i14 of guide lines 81 and 84 is defined as the periphery of intersection i14. Black pixels exist within the periphery of intersection i14. FIG. 7B shows an enlarged view of the vicinity of intersection i34 of drawing image 50 on which guide lines 81 to 86 are superimposed. No black pixels exist within the periphery of the circle of a predetermined radius centered at intersection i34 of guide lines 83 and 84. The outer corner extraction unit 14 determines whether intersections i14 to i36 overlap with line segments of component 51 based on whether pixels of the color of component 51 exist within the periphery of each intersection.
[0023] In detail, the outer corner extraction unit 14 determines the upper corners, lower corners, vertical continuous lines, and absence of object pixels in the vertical direction of the component 51 based on FIGS. 8A to 8D. As shown in FIGS. 8A to 8D, the outer corner extraction unit 14 sets an upper judgment area Da1 above each of the intersections i14 to i36 and a lower judgment area Da2 below each of the intersections. The upper judgment area Da1 and the lower judgment area Da2 are, for example, rectangular. The upper judgment area Da1 and the lower judgment area Da2 constitute upper and lower judgment areas. The upper and lower judgment areas are located within the periphery formed by the circle shown in FIGS. 7A and 7B.
[0024] In this way, the upper judgment region Da1 and the lower judgment region Da2 are located on the vertical guide lines 81 to 83, with the intersections i14 to i36 sandwiched between them, and at a distance from the intersections i14 to i36. A gap wider than the width of the line segment of the component 51 is provided between the upper judgment region Da1 and the lower judgment region Da2.
[0025] Furthermore, the outer corner extraction unit 14 determines the left and right corners of the component 51, horizontal continuous lines, and the absence of object pixels in the horizontal direction based on FIGS. 9A to 9D. As shown in FIGS. 9A to 9D, the outer corner extraction unit 14 sets a left determination area Da3 to the left of each intersection and a right determination area Da4 to the right of each intersection. The left determination area Da3 and the right determination area Da4 are, for example, rectangular. The left determination area Da3 and the right determination area Da4 constitute a left-right determination area. The left-right determination area is located within the periphery formed by the circle shown in FIGS. 7A and 7B.
[0026] In this way, the left judgment region Da3 and the right judgment region Da4 are located on the horizontal guide lines 84 to 86, with the intersections i14 to i36 sandwiched between them and spaced apart from the intersections i14 to i36. A gap wider than the width of the line segment of the component 51 is provided between the left judgment region Da3 and the right judgment region Da4.
[0027] In Fig. 8A, the outer corner extraction unit 14 determines that the intersection i14 is an upper corner of the component 51 because there are no black pixels in the upper judgment area Da1 and there are black pixels in the lower judgment area Da2. In Fig. 8B, the outer corner extraction unit 14 determines that the intersection i16 is a lower corner of the component 51 because there are black pixels in the upper judgment area Da1 and there are no black pixels in the lower judgment area Da2.
[0028] In Fig. 8C, because there are black pixels in the upper judgment area Da1 and there are also black pixels in the lower judgment area Da2, the outer corner extraction unit 14 determines that the intersection i15 is not a corner of the component 51 but a continuous vertical line of the component 51. In Fig. 8D, because there are no black pixels in the upper judgment area Da1 and there are also no black pixels in the lower judgment area Da2, the outer corner extraction unit 14 determines that there is no object pixel in the vertical direction at the intersection i34, which means that there are no black pixels of the component 51 in the vertical direction.
[0029] Similarly, the outer corner extraction unit 14 determines that intersection i24 is an upper corner, intersection i25 is a lower corner, intersection i26 is a point where no object pixel exists in the vertical direction, intersection i35 is an upper corner, and intersection i36 is a lower corner.
[0030] In Fig. 9A, the outline corner extraction unit 14 determines that the intersection i16 is a left corner of the component 51 because there are no black pixels in the left judgment region Da3 and there are black pixels in the right judgment region Da4. In Fig. 9B, the outline corner extraction unit 14 determines that the intersection i36 is a right corner of the component 51 because there are black pixels in the left judgment region Da3 and there are no black pixels in the right judgment region Da4.
[0031] 9C, because there are black pixels in the left determination area Da3 and there are also black pixels in the right determination area Da4, the outline corner extraction unit 14 determines that the intersection i26 is not a corner of the component 51 but a horizontal continuous line of the component 51. In FIG. 9D, because there are no black pixels in the left determination area Da3 and there are no black pixels in the right determination area Da4, the outline corner extraction unit 14 determines that there is no horizontal object pixel at the intersection i34, which means that there are no black pixels of the component 51 in the horizontal direction.
[0032] Similarly, the outer corner extraction unit 14 determines that intersection i14 is a left corner, intersection i15 is a point where no object pixel exists in the horizontal direction, intersection i24 is a right corner, intersection i25 is a left corner, and intersection i35 is a right corner.
[0033] From the above, the outline corner extraction unit 14 determines that the intersections i14, i16, i24, i25, i35, and i36 are corners of the component 51. In addition, the outline corner extraction unit 14 determines that the intersections i15 and i26 are located on the line segments of the component 51 but are not corners, and that the intersection i34 is off the line segments of the component 51. The intersections i14, i16, i24, i25, i35, and i36 are outline corners that indicate the positions of the outline corners of the component 51. The outline corner extraction unit 14 extracts the outline corners based on the guide lines 81-86.
[0034] As shown in FIG. 10, the contour corner extraction unit 14 superimposes contour corners 8C1 to 8C6 at the positions of intersections i14, i16, i24, i25, i35, and i36 of guide lines 81 to 86 drawn on the guide line layer, respectively.
[0035] The outline corners 8C1-8C6 can be easily extracted by employing a method for extracting the outline corners 8C1-8C6 based on whether pixels of the color of the component 51 are present within the periphery centered on the above intersections i14-i36. Furthermore, by employing a method for extracting the outline corners 8C1-8C6 based on whether pixels of the color of the component 51 are present within the upper judgment region Da1, lower judgment region Da2, left judgment region Da3, and right judgment region Da4, the outline corners 8C1-8C6 can be extracted after distinguishing between the upper corners, lower corners, left corners, and right corners. By setting the upper judgment region Da1, lower judgment region Da2, left judgment region Da3, and right judgment region Da4 at positions away from the intersections i14-i36, it becomes possible to accommodate small corners R and C, which will be described later.
[0036] In addition to extracting the contour corners of component 51 using the up / down determination regions shown in Figures 8A to 8D and the left / right determination regions shown in Figures 9A to 9D, contour corner extraction unit 14 may also extract the contour corners of component 51 as follows. As shown in Figure 11, contour corner extraction unit 14 divides guide lines 81 to 86 at intersections i14, i15, i16, i24, i25, i26, i34, i35, and i36, thereby dividing them into guide line segments Ls1 to Ls24. In this case, there are 24 guide line segments, which is a predetermined number.
[0037] FIG. 12A shows the relationship between guide line segment Ls1 and component 51. As shown in FIG. 12A, most of guide line segment Ls1 does not overlap with line segment 511 of component 51, but it does overlap with line segment 511 in a small portion at the right end. The number of pixels of guide line segment Ls1 is Px1, and the number of pixels in the portion of guide line segment Ls1 that overlaps with line segment 511 at the right end is Pbk. The outline corner extraction unit 14 determines that guide line segment Ls1 does not overlap with the outline line segments that make up the outline of component 51 when the proportion of the number of pixels Pbk that overlaps with line segment 511 among the number of pixels Px1 is equal to or less than a predetermined threshold. The threshold is, for example, 90%.
[0038] FIG. 12B shows the relationship between guide line segment Ls8 and component 51. As shown in FIG. 12B, the entire guide line segment Ls8 overlaps with line segment 511. The number of pixels of guide line segment Ls8 is Px8, and the number of pixels of the portion of guide line segment Ls8 that overlaps with line segment 511 is Pbk. The number of pixels Px8 and the number of pixels Pbk are the same. The outline corner extraction unit 14 determines that guide line segment Ls8 overlaps with an outline line segment of component 51 because the proportion of the number of pixels Pbk that overlaps with line segment 511 out of the number of pixels Px8 exceeds a threshold value.
[0039] 13, based on the above principle, the outline corner extraction unit 14 extracts guide line segments Ls5, Ls6, Ls8, Ls10, Ls12, Ls16, Ls17, and Ls20, indicated by thick dashed lines, that overlap with the outline line segments of the component 51. As shown in Fig. 14, the outline corner extraction unit 14 superimposes outline corner points 8C1 to 8C6 on the ends of the guide line segments Ls5, Ls6, Ls8, Ls10, Ls12, Ls16, Ls17, and Ls20, excluding the connecting portion of two guide line segments that are connected in a straight line. The ends of guide segments Ls5, Ls6, Ls8, Ls10, Ls12, Ls16, Ls17, and Ls20 are the intersections of guide line 81 with guide lines 84 and 86, the intersections of guide line 82 with guide lines 84 to 86, and the intersections of guide line 83 with guide lines 85 and 86. The positions of outline corner points 8C1 to 8C6 shown in Figure 14 are the same as the positions of outline corner points 8C1 to 8C6 shown in Figure 10.
[0040] In this way, the outline corner extraction unit 14 can extract guide line segments that overlap with the line segments 511-516 based on the degree to which the guide line segments Ls1-Ls24 overlap with the line segments 511-516 of the component 51. The outline corner extraction unit 14 can extract the outline corner points 8C1-8C6 based on the overlapping guide line segments. Even when this method is adopted, the outline corner extraction unit 14 can easily extract the outline corner points 8C1-8C6. Note that even when the outline corner extraction unit 14 extracts the outline corner points 8C1-8C6 based on the overlapping guide line segments, this is essentially equivalent to extracting the outline corner points 8C1-8C6 based on the intersection points i14-i36 of the guide lines 81-86.
[0041] After the outline corner extraction unit 14 extracts the outline corner points 8C1 to 8C6 that indicate the positions of the outline corners of the component 51 as described above, the trace line generation unit 15 connects the outline corner points 8C1 to 8C6. As conceptually shown in FIG. 15, the trace line generation unit 15 generates a trace line 91 that connects the corner points 9C1 to 9C6 on a trace line layer that is different from the drawing image layer and the guide line layer. The corner points 9C1 to 9C6 on the trace line 91 are located at positions that correspond to the outline corner points 8C1 to 8C6, respectively. The trace line 91 indicates the outline shape of the component 51.
[0042] The editing unit 18 may display on the display unit 4 the drawing image 50 in which the tracing line 91 is further superimposed on the drawing image 50 on which the guide lines 81 to 86 are superimposed. When the editing unit 18 displays the guide lines 81 to 86 in blue, it is preferable that the tracing line 91 be drawn in a line of a color different from the colors of the drawing image 50 and the guide lines 81 to 86, such as red.
[0043] In this way, in the graphic data creation device 100, the contour corner extraction unit 14 automatically extracts contour corner points 8C1 to 8C6 that indicate the positions of the contour corners of the component 51, and the trace line generation unit 15 generates a trace line 91 that indicates the contour shape of the component 51. According to the graphic data creation device 100, the operator does not need to manually draw the objects depicted in the drawing image, thereby reducing the operator's workload.
[0044] As shown in FIG. 16, part 51 may have at least some corners that are rounded, referred to as corner R. FIG. 16 shows a case where corner C1 is rounded. If the rounded corner is equal to or smaller than a predetermined size, outline corner extraction unit 14 can determine that a black pixel of a line segment of part 51 exists within the top-bottom determination area or the left-right determination area. Therefore, in the example shown in FIG. 16, just as in the case where corner C1 is not rounded, outline corner extraction unit 14 determines that an upper left corner exists at intersection i14 of guide lines 81 and 84, and superimposes outline corner 8C1 at the position of intersection i14.
[0045] Therefore, as shown in Fig. 17A, trace line 91 generated by trace line generation unit 15 has corner point 9C1, just as in the case where corner C1 is not rounded. The operator uses a corner R creation command and operates figure correction unit 16 with operation unit 3, whereby figure correction unit 16 rounds off the corner where corner point 9C1 is located, correcting the trace line to 91' with corner RC1R, as shown in Fig. 17B. The operator can specify the radius of corner RC1R with operation unit 3 to correct the trace line to 91' with a corner RC1R of any radius.
[0046] Although not shown in the figure, part 51 may have at least some corners that are C-chamfered, referred to as corners C. Similarly, when a C-chamfer is applied, if the C-chamfer is equal to or smaller than a predetermined size, outer corner extraction unit 14 can determine that a black pixel of a line segment of part 51 exists within the top / bottom determination area or the left / right determination area. Even when any corner of part 51 is C-chamfered, trace line 91 generated by trace line generation unit 15 will be the same as when the corner is not C-chamfered. The operator can use a corner C creation command to operate figure correction unit 16 via operation unit 3, which causes figure correction unit 16 to C-chamfer the corner and correct it into a trace line having a corner C.
[0047] FIG. 18 shows part 52, one of whose corners is largely C-chamfered. Part 52 has horizontal line segments 521 and 523, vertical line segments 522 and 524, and, for example, diagonal line segment 52C, which is C-chamfered at a distance of 30 mm. The distance from the corner without C-chamfer, which is the intersection i013 (shown in FIG. 19) between guide lines 801 and 803, to the left end of line segment 521 and the top end of line segment 522 is 30 mm. Part 52 has a closed shape in which line segments 521 to 524 and 52C are connected. Part 52 has corners C21 to C23. If the corner is largely C-chamfered as shown in FIG. 18, the outer corner extraction unit 14 cannot determine that black pixels of the line segment of part 52 exist within the top-bottom determination area or the left-right determination area.
[0048] 18, the guide line generation unit 13 generates vertical guide lines 801 and 802 that overlap with line segments 522 and 524 of the component 52, respectively, and horizontal guide lines 803 and 804 that overlap with line segments 521 and 523, respectively, and superimposes these on the drawing image on which the component 52 is drawn. In FIG. 19, the outline corner extraction unit 14 determines that no object pixel exists at the intersection i013 between the guide lines 801 and 803. The outline corner extraction unit 14 determines that the intersection i014 between the guide lines 801 and 804, the intersection i023 between the guide lines 802 and 803, and the intersection i024 between the guide lines 802 and 804 are the lower left corner, the upper right corner, and the lower right corner, respectively.
[0049] 19, the outline corner extraction unit 14 extracts the positions of the intersections i014, i023, and i024 as outline corners, and superimposes the outline corners 8C21 to 8C23 at the respective positions. The trace line generation unit 15 cannot generate a trace line that indicates the outline shape of the part 52 using only the outline corners 8C21 to 8C23.
[0050] Therefore, the outline corner extraction unit 14 determines whether there are any unextracted outline corners as follows, and if there are any, fills in the unextracted outline corners. Figure 20 illustrates the outline corners 8C21 to 8C23, divided into upper and lower corners and left and right corners. Ideally, the upper and lower corners should be paired, and the left and right corners should be paired. However, as shown in Figure 20, the lower corner of the outline corner 8C21 does not have a paired upper corner. The right corner of the outline corner 8C23 does not have a paired left corner. The outline corner extraction unit 14 determines that there are unextracted outline corners when there is an outline corner that does not have one of its paired upper and lower corners and an outline corner that does not have one of its paired left and right corners.
[0051] As shown in Fig. 21, the outline corner extraction unit 14 interpolates an outline corner point 8C24 at an intersection i013 between a guide line 801 passing through an outline corner point 8C21 (first outline corner point) that has no paired top corner and a guide line 803 passing through an outline corner point 8C23 (second outline corner point) that has no paired left corner. As shown in Fig. 22, the trace line generation unit 15 generates a trace line 92 that connects corner points 9C21 to 9C24 on the trace line layer by connecting the outline corner points 8C21 to 8C23 that were initially extracted by the outline corner extraction unit 14 with the interpolated outline corner point 8C24. Corner points 9C21 to 9C24 are located at positions that correspond to the outline corner points 8C21 to 8C24, respectively.
[0052] In this way, the contour corner extraction unit 14 can fill in the contour corner points when there are unextracted contour corner points, and the trace line generation unit 15 can generate a trace line that shows the contour shape of the object in a state where C-chamfering has not been performed.
[0053] The trace line 92 shown in FIG. 22 does not show the outer shape of the part 52, which has a C-chamfered diagonal line segment 52C. Therefore, the operator uses a corner C creation command and operates the figure correction unit 16 with the operation unit 3, so that the figure correction unit 16 C-chamfers the corner where the corner point 9C24 is located, and corrects the trace line 92' to have a diagonal line segment 92C, as shown in FIG. 23. In FIG. 23, line segments 921 to 924 of the trace line 92' correspond to the line segments 521 to 524 of the part 52. The operator can correct the trace line 92' to have a corner C at any distance by specifying the distance from the corner point 9C24 of the corner C to the ends of the line segments 921 and 922 with the operation unit 3.
[0054] Although not shown, if the corners of a part are significantly rounded, as in FIG. 19, it is not possible to superimpose contour corners on the rounded corners. Even in such cases, the contour corner extraction unit 14 can determine that an unextracted contour corner exists when one of the paired upper and lower corners, or one of the paired left and right corners, is missing. The contour corner extraction unit 14 can fill in the unextracted contour corners. The trace line generation unit 15 can generate a trace line corresponding to a part without rounded corners. The operator can modify the trace line to include a corner radius using a corner radius creation command, as in FIG. 17B.
[0055] Taking the case where the trace line generating unit 15 generates a trace line 91 shown in Fig. 15 that indicates the outer shape of the part 51 as an example, the graphic data generating unit 17 generates graphic data made up of vector data that indicates the part 51 based on the trace line 91. The graphic data that indicates the part 51 is used, for example, by a laser processing machine to cut a shape corresponding to the part 51 from a metal sheet.
[0056] A flowchart shown in Fig. 24 will be used to explain a graphic data creation method according to one or more embodiments, or a process executed by a computer device by a graphic data creation program according to one or more embodiments. In Fig. 24, when the process of the computer device starts, the computer device reads a drawing image in which an object is drawn in step S1. The computer device extracts horizontal and vertical line segments that make up the object in step S2. The computer device generates horizontal and vertical guide lines that overlap the horizontal and vertical line segments in step S3.
[0057] In step S4, the computer device extracts contour corners that indicate the positions of the contour corners of the object based on the intersections of the horizontal and vertical guide lines. In step S5, the computer device determines whether there are any unextracted contour corners. If there are no unextracted contour corners (NO), the computer device proceeds to step S7. If there are unextracted contour corners (YES), the computer device fills in the contour corners in step S6 and proceeds to step S7.
[0058] In step S7, the computer generates a tracing line connecting the corner points of the outline. In step S8, the computer generates graphic data representing the object and ends the process. Although not shown in Fig. 24, the computer may modify the tracing line in response to an operation by the operator between steps S7 and S8.
[0059] As described above, according to the graphic data creation device 100, the graphic data creation method executed by the graphic data creation device 100 (computer equipment), and the graphic data creation program 20 stored in the non-transitory storage medium 2 and executed by the central processing unit 1, the operator does not need to manually draw the objects depicted in the drawing image, thereby reducing the operator's workload.
[0060] The present invention is not limited to one or more of the above-described embodiments, and various modifications are possible within the scope of the present invention. The method of extracting the outer corner points of an object is not limited to the method using the peripheral area (upper / lower determination area and lower / right determination area) centered on the intersection point of the guide lines, or the method using the degree of overlap between the guide line segments and the object's line segments. The drawing image may be a drawing image of a product commercial drawing, a building-related plan or elevation drawing, a foundation drawing, a roof drawing, an electrical drawing, or a cutting drawing. The object depicted in the drawing image is not limited to a part.
[0061] The operator can visually recognize the drawing image, guide lines, and tracing lines by displaying them on the display unit 4. Therefore, it is preferable to display the drawing image, guide lines, and tracing lines on the display unit 4, but it is not essential to display the drawing image, guide lines, and tracing lines on the display unit 4. [Explanation of symbols]
[0062] 1. Central Processing Unit 2 Non-transitory storage medium 3 Control section 4 Display section 11 Arrow detection unit 12 Line detection unit 13 Guide line generation unit 14 External corner extraction part 15 Trace line generation section 16 Shape correction section 17 Graphic data generation section 18 Editorial Department 20 Graphic data creation program 50 Drawing images 51,52 parts 91,92 trace lines
Claims
1. a non-transitory storage medium for storing a graphic data creation program; a central processing unit; Equipped with The central processing unit executes the graphic data creation program, extracting horizontal and vertical line segments that form the outline of an arbitrary object depicted in the drawing image read by the central processing unit; generating horizontal and vertical guide lines that overlap the horizontal and vertical line segments; extracting contour corner points indicating positions of contour corners of the object based on intersections of the horizontal and vertical guide lines; generating a trace line connecting the extracted corner points of the contour; Generate graphic data representing the object based on the traced line. Graphic data creation device.
2. The central processing unit executes the graphic data creation program, The corner points of the outline are extracted based on whether or not pixels of the color of the object depicted in the drawing image exist within a periphery of a predetermined size centered on the intersection point of the guide lines.
2. The graphic data creation device according to claim 1.
3. The central processing unit executes the graphic data creation program, a left judgment region and a right judgment region are set on the horizontal guide line, the left judgment region being positioned on either side of the intersection point and spaced apart from the intersection point, and an upper judgment region and a lower judgment region are set on the vertical guide line, the upper judgment region being positioned on either side of the intersection point and spaced apart from the intersection point; The corner points of the outer shape are extracted based on whether or not pixels of the object color exist within the left determination area, the right determination area, the upper determination area, and the lower determination area.
3. The graphic data creation device according to claim 2.
4. The central processing unit executes the graphic data creation program, Dividing the horizontal and vertical guide lines into a plurality of guide line segments at each intersection point; extracting guide line segments that overlap with the horizontal line segments or the vertical line segments based on the degree to which each of the plurality of guide line segments overlaps with the horizontal line segments or the vertical line segments of the object; The outer corner points are extracted based on the extracted guide line segments.
2. The graphic data creation device according to claim 1.
5. The central processing unit executes the graphic data creation program, determining that an unextracted outer corner point of the object exists when there exists a first outer corner point that is not present at one of a pair of an upper corner and a pair of a lower corner of the object, and a second outer corner point that is not present at one of a pair of a left corner and a pair of a right corner of the object; Filling in the outline corner points at the intersections of the guide lines passing through the first outline corner points and the guide lines passing through the second outline corner points; Generate a trace line connecting the extracted corner points of the outer shape and the filled corner points of the outer shape.
5. The graphic data creation device according to claim 1.
6. Computer equipment, Load a drawing image of any object, extracting horizontal and vertical line segments that form the outline of the object depicted in the drawing image; generating horizontal and vertical guide lines that overlap the horizontal and vertical line segments; extracting contour corner points indicating positions of contour corners of the object based on intersections of the horizontal and vertical guide lines; generating a trace line connecting the extracted corner points of the contour; Generate graphic data representing the object based on the traced line. How to create shape data.
7. the computer device: The corner points of the outline are extracted based on whether or not pixels of the color of the object depicted in the drawing image exist within a periphery of a predetermined size centered on the intersection point of the guide lines.
7. The method for creating graphic data according to claim 6.
8. the computer device: a left judgment region and a right judgment region are set on the horizontal guide line, the left judgment region being positioned on either side of the intersection point and spaced apart from the intersection point, and an upper judgment region and a lower judgment region are set on the vertical guide line, the upper judgment region being positioned on either side of the intersection point and spaced apart from the intersection point; The corner points of the outer shape are extracted based on whether or not pixels of the object color exist within the left determination area, the right determination area, the upper determination area, and the lower determination area.
8. The method for creating graphic data according to claim 7.
9. the computer device: Dividing the horizontal and vertical guide lines into a plurality of guide line segments at each intersection point; extracting guide line segments that overlap with the horizontal line segments or the vertical line segments based on the degree to which each of the plurality of guide line segments overlaps with the horizontal line segments or the vertical line segments of the object; The outer corner points are extracted based on the extracted guide line segments.
7. The method for creating graphic data according to claim 6.
10. the computer device: determining that an unextracted outer corner point of the object exists when there exists a first outer corner point that is not present at one of a pair of an upper corner and a pair of a lower corner of the object, and a second outer corner point that is not present at one of a pair of a left corner and a pair of a right corner of the object; Filling in the outline corner points at the intersections of the guide lines passing through the first outline corner points and the guide lines passing through the second outline corner points; Generate a trace line connecting the extracted corner points of the outer shape and the filled corner points of the outer shape. The method for creating graphic data according to any one of claims 6 to 9.
11. For computer equipment, A step of reading a drawing image in which an arbitrary object is drawn; extracting horizontal and vertical line segments that form the outline of the object depicted in the drawing image; generating horizontal and vertical guide lines that overlap the horizontal and vertical line segments; extracting contour corner points indicating positions of contour corners of the object based on intersections of the horizontal and vertical guide lines; generating a trace line connecting the extracted contour corner points; generating graphic data representing the object based on the traced line; A graphic data creation program that executes the above.
12. The computer device, As a step of extracting the outer corners, a step of extracting the outer corners is executed based on whether or not pixels of the color of the object drawn in the drawing image exist within a periphery of a predetermined size centered on the intersection of the guide lines.
12. The graphic data creation program according to claim 11.
13. The computer device, The step of extracting the contour corner points includes: setting a left judgment region and a right judgment region on the horizontal guide line, the left judgment region and the right judgment region being positioned at positions separated from the intersection point on either side of the intersection point, and setting an upper judgment region and a lower judgment region on the vertical guide line, the left judgment region and the right judgment region being positioned at positions separated from the intersection point on either side of the intersection point; extracting the contour corner points based on whether or not pixels of the object color exist within the left determination area, the right determination area, the upper determination area, and the lower determination area; Run 13. The graphic data creation program according to claim 12.
14. The computer device, The step of extracting the contour corner points includes: Dividing the horizontal and vertical guide lines into a plurality of guide line segments by dividing the horizontal and vertical guide lines at each intersection point; extracting guide line segments that overlap with the horizontal line segments or the vertical line segments based on the degree to which each guide line segment of the plurality of guide line segments overlaps with the horizontal line segments or the vertical line segments of the object; extracting the contour corner points based on the extracted guide line segments; Run 12. The graphic data creation program according to claim 11.
15. The computer device, determining that there are unextracted contour corners of the object when there are a first contour corner point that is not present at one of a pair of an upper corner of the object and a pair of a lower corner of the object, and a second contour corner point that is not present at one of a pair of a left corner of the object and a pair of a right corner of the object; a step of filling in an outline corner point at an intersection of a guide line passing through the first outline corner point and a guide line passing through the second outline corner point; Then run The step of generating the trace line includes a step of generating a trace line connecting the extracted corner points of the outer contour and the filled corner points of the outer contour. The graphic data creation program according to any one of claims 11 to 14.
Citation Information
Patent Citations
Polygon correction method and device
CN117788298A
Method and device for editing graphic
JP1994251118A
Device and method for recognizing business document
JP1996221506A
Building drawing recognizing method
JP1998124547A
Device, method, program for processing two-dimensional CAD data and closed area identification method
JP2007115238A