Drawing annotation processing method and device, storage medium and electronic equipment
By using difference comparison and target character expressions, image-format CAD drawing annotations are converted into editable formats, solving the problem of uneditable CAD drawing annotations in existing technologies and improving the work efficiency of designers.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CAXA TECH
- Filing Date
- 2022-11-16
- Publication Date
- 2026-07-03
AI Technical Summary
In the existing technology, the annotation symbols of CAD drawings in image format cannot be edited and adjusted in CAD software, which cannot meet the detailed design needs of designers.
By acquiring the image of the drawing annotation to be identified and comparing its difference with the image of the drawing annotation in the target library, the target drawing annotation image is determined. Based on the image identifier and the target character expression, the image-format drawing annotation is converted into an editable format drawing annotation.
It enables the conversion of image-format drawing annotations into an editable format, improving the work efficiency of designers and saving time and labor costs.
Smart Images

Figure CN115758501B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and more specifically, to a method, apparatus, storage medium, and electronic device for processing drawing annotations. Background Technology
[0002] Currently, in CAD drawing design, designers frequently refer to other drawings for detailed design or subsequent process design. In related technologies, designers typically use the Object Linking and Embedding (OLE) function built into the CAD software or external recognition tools to insert files in formats such as PDF, JPG, PNG, and BMP into the CAD drawings as design references.
[0003] However, drawings referenced in the above way cannot be edited or adjusted in CAD software. For example, external recognition tools vectorize the content in image-format CAD drawings, that is, they convert the boundaries of the content in image-format CAD drawings into boundaries formed by discrete line segments. In this process, the engineering annotation symbols in image-format CAD drawings are also recognized as discrete line segments. These discrete engineering annotation symbols are not actually converted into internal objects of CAD software. They can only be referenced and cannot be edited or adjusted, thus failing to meet the detailed design needs of designers.
[0004] There is currently no effective solution to the above problems. Summary of the Invention
[0005] This invention provides a method, apparatus, storage medium, and electronic device for processing drawing annotations, to at least solve the technical problem in the prior art that engineering annotation symbols cannot be edited after being vectorized.
[0006] According to one aspect of the present invention, a method for processing drawing annotations is provided, comprising: acquiring a drawing annotation image to be identified; determining a target drawing annotation image from a target image library based on a first difference degree between the drawing annotation image to be identified and drawing annotation images in a target image library; acquiring an image identifier corresponding to the target drawing annotation image; determining a target character expression corresponding to the drawing annotation to be identified in the drawing annotation image to be identified based on the image identifier; and generating a target drawing annotation based on the target character expression, wherein the target drawing annotation is a drawing annotation in an editable format.
[0007] Furthermore, the method for processing drawing annotations also includes: generating a first drawing annotation based on the target character expression; performing reverse verification on the first drawing annotation; and determining the first drawing annotation as the target drawing annotation if the first drawing annotation passes the reverse verification.
[0008] Furthermore, the method for processing drawing annotations also includes: taking a screenshot of the first drawing annotation to generate a first drawing annotation image; comparing the first drawing annotation image with the drawing annotation image to be identified to obtain a second difference degree; and determining whether the first drawing annotation passes the reverse verification based on the second difference degree.
[0009] Furthermore, the method for processing drawing annotations also includes: if the second difference degree is less than or equal to the first threshold, determining that the first drawing annotation passes the reverse verification.
[0010] Furthermore, the method for processing drawing annotations also includes: obtaining a set of drawing annotations, taking a screenshot of each drawing annotation in the set, generating a drawing annotation image corresponding to each drawing annotation, and constructing a target image library based on the drawing annotation images.
[0011] Furthermore, the method for processing drawing annotations also includes: obtaining the character expression corresponding to each drawing annotation; and constructing a mapping table based on each drawing annotation, the image identifier corresponding to the drawing annotation image, and the character expression, wherein the mapping table is used to represent the correspondence between each drawing annotation and the character expression.
[0012] Furthermore, the method for processing drawing annotations also includes: acquiring a target drawing image; taking a screenshot of the area in the target drawing image that contains the drawing annotations to be identified, and obtaining an image of the drawing annotations to be identified.
[0013] According to another aspect of the present invention, a drawing annotation processing apparatus is also provided, comprising: an acquisition module for acquiring a drawing annotation image to be identified; a first determination module for determining a target drawing annotation image from a target image library based on a first difference between the drawing annotation image to be identified and drawing annotation images in a target image library; a second determination module for acquiring an image identifier corresponding to the target drawing annotation image and determining a target character expression corresponding to the drawing annotation to be identified in the drawing annotation image to be identified based on the image identifier; and a processing module for generating a target drawing annotation based on the target character expression, wherein the target drawing annotation is a drawing annotation in an editable format.
[0014] According to another aspect of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, wherein the computer program is configured to execute the above-described drawing annotation processing method when it is run.
[0015] According to another aspect of the present invention, an electronic device is also provided, the electronic device including one or more processors; a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors are configured to run the programs, wherein the programs are configured to execute the above-described drawing annotation processing method during runtime.
[0016] According to another aspect of the present invention, a computer program product is also provided, including a computer program / instruction, which, when executed by a processor, implements the above-described drawing annotation processing method.
[0017] In this embodiment of the invention, a method is adopted to convert image-format drawing annotations into editable format drawing annotations by using target character expressions. First, the drawing annotation image to be identified is obtained. Then, based on the first difference between the drawing annotation image to be identified and the drawing annotation images in the target image library, the target drawing annotation image is determined from the target image library. Then, the image identifier corresponding to the target drawing annotation image is obtained. Based on the image identifier, the target character expression corresponding to the drawing annotation to be identified in the drawing annotation image to be identified is determined. Then, the target drawing annotation is generated based on the target character expression, wherein the target drawing annotation is an editable format drawing annotation.
[0018] In the above process, by acquiring the image of the drawing annotation to be identified, a data foundation is provided for subsequently determining the target drawing annotation image from the target library. Based on the first degree of difference between the image of the drawing annotation to be identified and the drawing annotation images in the target library, the target drawing annotation image can be determined from the target library. Thus, the target character expression can be determined based on the image identifier corresponding to the target drawing annotation image. Then, the target drawing annotation is generated based on the target character expression, realizing the conversion of image-format drawing annotations into editable format drawing annotations. This greatly facilitates designers in further refining the drawing design, saves time and manpower costs, and improves the work efficiency of designers.
[0019] Therefore, the technical solution of this invention achieves the goal of converting image-format drawing annotations into editable format drawing annotations, thereby improving the efficiency of designers' drawing detailing work and solving the technical problem in the prior art that engineering annotation symbols cannot be edited after vectorization. Attached Figure Description
[0020] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0021] Figure 1 This is a flowchart of an optional drawing annotation processing method according to an embodiment of the present invention;
[0022] Figure 2 This is a flowchart of an optional drawing annotation processing system according to an embodiment of the present invention;
[0023] Figure 3 This is a flowchart of an optional method for constructing a target image library and a mapping relationship table according to an embodiment of the present invention;
[0024] Figure 4 This is a schematic diagram of an optional drawing annotation processing device according to an embodiment of the present invention. Detailed Implementation
[0025] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0027] It should be noted that all relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this invention are information and data authorized by the user or fully authorized by all parties. For example, this system has an interface with the relevant user or organization. Before obtaining relevant information, it needs to send an acquisition request to the aforementioned user or organization through the interface, and obtain the relevant information after receiving consent from the aforementioned user or organization.
[0028] Example 1
[0029] According to an embodiment of the present invention, a method embodiment for processing drawing annotations is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0030] Figure 1 This is a flowchart of an optional drawing annotation processing method according to an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:
[0031] Step S101: Obtain the drawing annotation image to be identified.
[0032] In the above steps, the image of the drawing annotation to be identified can be acquired through devices such as application systems, processors, and electronic devices. Optionally, the image of the drawing annotation to be identified can be a file image in formats such as PDF, JPG, PNG, and BMP, containing the drawing annotation to be identified. Optionally, the drawing can be a CAD drawing such as a mechanical part drawing, an architectural wall drawing, or a structural foundation drawing. Optionally, taking a mechanical part drawing as an example, the drawing annotation can be engineering annotation symbols such as straightness, flatness, and cylindricity.
[0033] Step S102: Determine the target drawing annotation image from the target image library based on the first difference between the drawing annotation image to be identified and the drawing annotation images in the target image library.
[0034] In the above steps, the target library can be a pre-built standard graphic library of engineering annotation symbols. The target library contains multiple drawing annotation images, and each drawing annotation image contains one type of drawing annotation, namely an engineering annotation symbol. The target drawing annotation image can be the same as the drawing annotation image to be identified.
[0035] Optionally, the target drawing annotation image can be determined by comparing the pixel values of two images, comparing the image to be identified with multiple drawing annotation images in the target image library. Specifically, the target drawing annotation image is determined from the target image library based on the first degree of difference between the image to be identified and the drawing annotation images in the target image library. Optionally, the target threshold can be set by the designer according to the accuracy requirements. For example, a target threshold of 5 means that if the number of different pixels between two images is less than or equal to 5, the two images are considered identical.
[0036] Optionally, if the first difference is less than or equal to the target threshold, the target drawing annotation image is determined to be the drawing annotation image to be identified. For example, if the difference between the drawing annotation image to be identified and drawing annotation image A in the target library is 4 (i.e., the first difference), meaning there are 4 different pixels between the two images; and the difference between the drawing annotation image to be identified and drawing annotation image B in the target library is 6 (i.e., there are 6 different pixels between the two images), and the target threshold is set to 5, the difference between the drawing annotation image to be identified and drawing annotation image A in the target library is 4 (i.e., the first difference) is less than the target threshold of 5. In this case, the drawing annotation image to be identified and drawing annotation image A in the target library are considered to be the same image.
[0037] Step S103: Obtain the image identifier corresponding to the target drawing annotation image, and determine the target character expression corresponding to the drawing annotation to be recognized in the drawing annotation image based on the image identifier.
[0038] In the above steps, the image identifier can be the name of the image labeled on the target drawing. For example, if the image format is JPG, the image name can be 1.jpg.
[0039] Optionally, the target character expression corresponding to the drawing annotation in the image to be identified can be determined from a pre-built mapping table. For example, the mapping table stores multiple image identifiers (image names) and multiple character expressions. By inputting the image identifier corresponding to the target drawing annotation image, the corresponding character expression (target character expression) can be obtained. For example, if the mapping table stores the image name: 1.jpg and the character expression: \#\0^, and the image identifier (image name) corresponding to the target drawing annotation image is 1.jpg, inputting 1.jpg into the mapping table will yield the target character expression \#\0^, meaning the target character expression corresponding to the drawing annotation in the image to be identified is \#\0^.
[0040] Step S104: Generate target drawing annotations based on the target character expression, wherein the target drawing annotations are drawing annotations in an editable format.
[0041] Optionally, by using target character expressions in CAD software, the drawing annotations to be recognized in the drawing annotation image can be converted into drawing annotations that can be edited in the CAD software, i.e., target drawing annotations.
[0042] Based on the scheme defined in steps S101 to S104 above, it can be understood that in this embodiment of the invention, the method of converting image-format drawing annotations into editable format drawing annotations by using target character expressions is adopted. First, the drawing annotation image to be identified is obtained. Then, based on the first difference between the drawing annotation image to be identified and the drawing annotation images in the target image library, the target drawing annotation image is determined from the target image library. Then, the image identifier corresponding to the target drawing annotation image is obtained. Based on the image identifier, the target character expression corresponding to the drawing annotation to be identified in the drawing annotation image to be identified is determined. Then, the target drawing annotation is generated based on the target character expression, wherein the target drawing annotation is an editable format drawing annotation.
[0043] It is noteworthy that, in the above process, acquiring the image of the drawing annotation to be identified provides a data foundation for subsequently determining the target drawing annotation image from the target library. Based on the first degree of difference between the image of the drawing annotation to be identified and the drawing annotation images in the target library, the target drawing annotation image can be determined from the target library. Thus, based on the image identifier corresponding to the target drawing annotation image, the target character expression can be determined, and then the target drawing annotation can be generated based on the target character expression. This realizes the conversion of image-format drawing annotations into editable format drawing annotations, which greatly facilitates designers in further refining the drawing design, saves time and manpower costs, and improves the work efficiency of designers.
[0044] Therefore, the technical solution of this invention achieves the goal of converting image-format drawing annotations into editable format drawing annotations, thereby improving the efficiency of designers' drawing detailing work and solving the technical problem in the prior art that engineering annotation symbols cannot be edited after vectorization.
[0045] In one optional embodiment, during the process of generating target drawing annotations based on target character expressions, first drawing annotations are generated based on target character expressions, then reverse verification is performed on the first drawing annotations, and if the first drawing annotations pass the reverse verification, the first drawing annotations are determined to be target drawing annotations.
[0046] Specifically, after generating the first drawing annotation based on the target character expression, it is necessary to verify whether the generated first drawing annotation is correct. For example, by inputting the target character expression \#\0^ into the CAD software, the generated first drawing annotation is straightness, and it is necessary to verify whether the straightness is the drawing annotation to be recognized.
[0047] In one optional embodiment, during the reverse verification process of the first drawing annotation, the first drawing annotation is first captured to generate a first drawing annotation image. Then, the first drawing annotation image is compared with the drawing annotation image to be identified to obtain a second difference degree. Finally, the first drawing annotation is determined to pass the reverse verification based on the second difference degree.
[0048] Optionally, after generating engineering annotation symbols (i.e., the first drawing annotations) in the CAD software using character expressions, the newly generated engineering annotation symbols are extracted to generate an image file, i.e., the first drawing annotation image. Further, this image is compared with the drawing annotation image to be identified to obtain a second difference score. Further, based on the second difference score, it is determined whether the first drawing annotation passes the reverse verification.
[0049] In one optional embodiment, during the process of determining whether the first drawing annotation passes the reverse verification based on the second difference degree, if the second difference degree is less than or equal to the first threshold, the first drawing annotation is determined to have passed the reverse verification.
[0050] Optionally, the first threshold can be set by the designer according to the accuracy requirements. For example, the first threshold can be set to 5, meaning that if the number of different pixels between two images is less than or equal to 5, the two images are considered to be the same.
[0051] For example, if the difference between the first drawing annotation image and the drawing annotation image to be identified, i.e. the second difference degree, is 4, that is, there are 4 different pixels between the two images, and the first threshold is set to 5, the difference degree between the first drawing annotation image and the drawing annotation image to be identified is 4, which is less than the first threshold of 5. At this time, it is considered that the first drawing annotation image and the drawing annotation image to be identified are the same image, that is, the first drawing annotation is determined to pass the reverse verification.
[0052] In one optional embodiment, before obtaining the drawing annotation image to be identified, a set of drawing annotations is obtained, each drawing annotation in the set is screenshotted to generate a drawing annotation image corresponding to each drawing annotation, and then a target image library is constructed based on the drawing annotation images.
[0053] Optionally, the drawing annotation set can be a collection obtained by exhaustively listing all possible drawing annotations, i.e., engineering annotation symbols, generated in CAD software. Alternatively, a screenshot tool widely used in this field can be used to process each drawing annotation in the drawing annotation set into a screenshot, generating a corresponding drawing annotation image for each annotation.
[0054] Furthermore, based on the annotated images on the drawings, a target image library is constructed, namely the pre-built standard graphic library of engineering annotation symbols mentioned above. Optionally, the target image library can be stored in a folder under the root directory of the CAD software, or it can be stored on a cloud server; this invention does not limit this.
[0055] In one optional embodiment, after constructing the target image library based on the drawing annotation images, the character expression corresponding to each drawing annotation is obtained. Then, based on each drawing annotation, the image identifier corresponding to the drawing annotation image, and the character expression, a mapping relationship table is constructed. The mapping relationship table is used to represent the correspondence between each drawing annotation and the character expression.
[0056] Optionally, each drawing annotation has a corresponding character expression. For example, the character expression for straightness is \#\0^, the character expression for flatness is \#\1^, the character expression for roundness is \#\2^, the character expression for profile is \#\3^, and the character expression for roughness is \R\0^, etc.
[0057] Optionally, the mapping table, which is the pre-constructed mapping table mentioned above, contains at least each drawing annotation, the image identifier corresponding to the drawing annotation image, and a character expression. For example, the first row of the mapping table contains the serial number, drawing annotation, image identifier, and character expression, while the second row contains the serial number 1, straightness, 1.jpg, and 0^.
[0058] In one optional embodiment, during the process of obtaining the drawing annotation image to be identified, the target drawing image is first obtained, and then the area containing the drawing annotation to be identified in the target drawing image is captured to obtain the drawing annotation image to be identified.
[0059] Optionally, the target drawing image can be a drawing that includes the entire engineering design, such as a mechanical part drawing, which includes both the part and the engineering annotation symbols.
[0060] Optional, Figure 2 This is a flowchart of an optional drawing annotation processing system according to an embodiment of the present invention, such as... Figure 2 As shown, the first step is to extract the engineering annotation symbols to be recognized and generate an image file, thus obtaining the drawing annotation image to be recognized. Specifically, through the drawing annotation processing system, the target drawing image (e.g., a JPG format drawing image) is inserted into the CAD software. Then, the area containing the drawing annotation to be recognized in the target drawing image is cropped to obtain the drawing annotation image to be recognized. At least one drawing annotation image must be obtained.
[0061] Furthermore, the captured image is standardized. Specifically, the graphic file is transformed according to the length and width ratio of graphics in a standard image library to obtain a standardized image of the engineering annotation symbol. The ratio transformation method used adopts a widely used method in this field and is not limited here.
[0062] Furthermore, the standardized drawing image is compared with the engineering annotation standard symbol graphic library. If the comparison result is within the matching range, the engineering annotation symbol is considered to have been identified, and the process proceeds to the second verification step. Optionally, if the comparison result is not within the matching range, a prompt dialog box can be generated to prompt the designer to perform manual identification.
[0063] Furthermore, the secondary verification step includes: for successfully recognized engineering annotation symbols, extracting the corresponding character expression from the mapping table, and generating the engineering annotation symbol in the CAD software using the character expression. Specifically, inputting the character expression into the CAD software generates the corresponding engineering annotation symbol. Further, capturing the newly generated engineering annotation symbol to create an image file, and comparing this image with the image file from the first step. If the comparison result is within the matching range, recognition is successful; otherwise, manual assistance is required. Before comparing this image with the image file from the first step, the captured image must also undergo standardization processing, using the same method as described above for processing the drawing annotation image to be recognized, which will not be elaborated here.
[0064] Optionally, for engineering annotation symbols that are not in the standard graphic library, such as a few non-standard engineering annotation symbols, prompt dialog boxes can be generated to prompt designers to perform manual identification.
[0065] Optional, Figure 3 This is a flowchart of an optional method for constructing a target image library and a mapping relationship table according to an embodiment of the present invention, such as... Figure 3 As shown, firstly, a standard graphic library of engineering annotation symbols is established. Specifically, in the CAD software, possible engineering annotation symbols are generated exhaustively under the standard settings, such as straightness, flatness, roundness, cylindricity, profile, coaxiality, symmetry, position, radial runout, roughness, reference target code, etc.
[0066] Furthermore, engineering annotation symbols are cropped one by one at a specified resolution and uniform size to obtain image files of engineering annotation symbols, thus constructing a standard graphic library of engineering annotation symbols. The files can be in formats such as BMP, JPG, and PNG. Cropping engineering annotation symbols one by one at a specified resolution and uniform size can be done by cropping 64*64 images at a resolution of 1024*768.
[0067] Furthermore, a mapping table is constructed. Specifically, each engineering annotation symbol is mapped to a character expression in the CAD software. For example, the character expression for straightness is \#\0^, for flatness is \#\1^, for roundness is \#\2^, for profile is \#\3^, and for roughness is \R\0^, etc. The mapping table can be a text file, a table file, a database table file, etc., and this embodiment does not impose any limitations.
[0068] Therefore, the technical solution of this invention achieves the goal of converting image-format drawing annotations into editable format drawing annotations, thereby improving the efficiency of designers' drawing detailing work and solving the technical problem in the prior art that engineering annotation symbols cannot be edited after vectorization.
[0069] Example 2
[0070] According to an embodiment of the present invention, an embodiment of a drawing annotation processing apparatus is provided, wherein, Figure 4 This is a schematic diagram of an optional drawing annotation processing apparatus according to an embodiment of the present invention, such as... Figure 4 As shown, the device includes: an acquisition module 401, used to acquire an image of a drawing annotation to be identified; a first determination module 402, used to determine a target drawing annotation image from the target image library based on a first difference between the image of the drawing annotation to be identified and the image of the drawing annotation in the target image library; a second determination module 403, used to acquire an image identifier corresponding to the target drawing annotation image, and determine a target character expression corresponding to the drawing annotation to be identified in the image of the drawing annotation to be identified based on the image identifier; and a processing module 404, used to generate a target drawing annotation based on the target character expression, wherein the target drawing annotation is a drawing annotation in an editable format.
[0071] It should be noted that the above-mentioned acquisition module 401, first determination module 402, second determination module 403 and processing module 404 correspond to steps S101 to S104 in the above embodiments. The four modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the content disclosed in the above embodiment 1.
[0072] Optionally, the processing module includes: a first processing module for generating a first drawing annotation based on a target character expression; and a second processing module for performing reverse verification on the first drawing annotation, and determining the first drawing annotation as the target drawing annotation if the first drawing annotation passes the reverse verification.
[0073] Optionally, the second processing module includes: a third processing module for taking a screenshot of the first drawing annotation to generate a first drawing annotation image; a fourth processing module for comparing the first drawing annotation image with the drawing annotation image to be identified to obtain a second difference degree; and a fifth processing module for determining whether the first drawing annotation passes the reverse verification based on the second difference degree.
[0074] Optionally, the fifth processing module includes: a third determining module, used to determine that the first drawing annotation passes the reverse verification if the second difference is less than or equal to the first threshold.
[0075] Optionally, the drawing annotation processing device further includes: a first acquisition module, used to acquire a set of drawing annotations, perform screenshot processing on each drawing annotation in the set of drawing annotations, and generate a drawing annotation image corresponding to each drawing annotation; and a sixth processing module, used to construct a target image library based on the drawing annotation images.
[0076] Optionally, the drawing annotation processing device further includes: a second acquisition module for acquiring the character expression corresponding to each drawing annotation; and a seventh processing module for constructing a mapping relationship table based on each drawing annotation, the image identifier corresponding to the drawing annotation image, and the character expression, wherein the mapping relationship table is used to represent the correspondence between each drawing annotation and the character expression.
[0077] Optionally, the acquisition module includes: a third acquisition module for acquiring the target drawing image; and an eighth processing module for taking a screenshot of the area containing the drawing annotation to be identified in the target drawing image to obtain the drawing annotation image to be identified.
[0078] Example 3
[0079] According to another aspect of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer-readable storage medium, and the computer program is configured to execute the above-described drawing annotation processing method when it is run.
[0080] Example 4
[0081] According to another aspect of the present invention, an electronic device is also provided, the electronic device including one or more processors; a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors are configured to run the programs, wherein the programs are configured to execute the above-described drawing annotation processing method during runtime.
[0082] Example 5
[0083] According to another aspect of the present invention, a computer program product is also provided, including a computer program / instruction, which, when executed by a processor, implements the above-described drawing annotation processing method.
[0084] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0085] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0086] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0087] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0088] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0089] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0090] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method of processing a drawing annotation, characterized by, include: Obtain the image of the drawing annotations to be identified; Based on the first difference between the drawing annotation image to be identified and the drawing annotation images in the target image library, the target drawing annotation image is determined from the target image library; Obtain the image identifier corresponding to the target drawing annotation image, and determine the target character expression corresponding to the drawing annotation to be identified in the drawing annotation image based on the image identifier; Based on the target character expression, a target drawing annotation is generated, wherein the target drawing annotation is an editable drawing annotation. The step of generating a target drawing annotation based on the target character expression includes: generating a first drawing annotation based on the target character expression; performing reverse verification on the first drawing annotation; and determining the first drawing annotation as the target drawing annotation if the first drawing annotation passes the reverse verification. The reverse verification process for the first drawing annotation includes: taking a screenshot of the first drawing annotation to generate a first drawing annotation image; comparing the first drawing annotation image with the drawing annotation image to be identified to obtain a second difference degree; and determining whether the first drawing annotation passes the reverse verification based on the second difference degree. Determining whether the first drawing annotation passes the reverse verification based on the second difference degree includes: determining that the first drawing annotation passes the reverse verification when the second difference degree is less than or equal to the first threshold.
2. The method of claim 1, wherein, Before acquiring the image of the drawing annotations to be identified, the method further includes: Obtain a set of drawing annotations, take a screenshot of each drawing annotation in the set, and generate a drawing annotation image corresponding to each drawing annotation. The target image library is constructed based on the annotated images of the drawings.
3. The method of claim 2, wherein, After constructing the target image library based on the annotated images of the drawings, the method further includes: Obtain the character expression corresponding to each drawing annotation; Based on each drawing annotation, the image identifier corresponding to the drawing annotation image, and the character expression, a mapping relationship table is constructed, wherein the mapping relationship table is used to represent the correspondence between each drawing annotation and the character expression.
4. The method of claim 1, wherein, Obtain the image of the drawing annotations to be identified, including: Obtain the target drawing image; A screenshot is taken of the area containing the drawing annotation to be identified in the target drawing image to obtain the drawing annotation image to be identified.
5. A processing device for technical drawing annotations, characterized in that include: The acquisition module is used to acquire images of the drawing annotations to be identified; The first determining module is used to determine the target drawing annotation image from the target image library based on a first difference degree between the drawing annotation image to be identified and the drawing annotation images in the target image library; The second determining module is used to obtain the image identifier corresponding to the target drawing annotation image, and determine the target character expression corresponding to the drawing annotation to be identified in the drawing annotation image to be identified based on the image identifier. The processing module is used to generate target drawing annotations based on the target character expression, wherein the target drawing annotations are drawing annotations in an editable format; The processing module includes: a first processing module, used to generate a first drawing annotation based on the target character expression; and a second processing module, used to perform reverse verification on the first drawing annotation, and determine the first drawing annotation as the target drawing annotation if the first drawing annotation passes the reverse verification. The second processing module includes: a third processing module for taking a screenshot of the first drawing annotation to generate a first drawing annotation image; a fourth processing module for comparing the first drawing annotation image with the drawing annotation image to be identified to obtain a second difference degree; and a fifth processing module for determining whether the first drawing annotation passes the reverse verification based on the second difference degree. The fifth processing module includes a third determining module, used to determine that the first drawing annotation passes the reverse verification when the second difference degree is less than or equal to the first threshold.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the drawing annotation processing method according to any one of claims 1 to 4 when it is run.
7. An electronic device, comprising: The electronic device includes one or more processors; A memory for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to perform the program, wherein the program is configured to execute the drawing annotation processing method as described in any one of claims 1 to 4.