A method and system for processing process drawings digitized
The text and element information of the process drawings are extracted through high-resolution scanner and preset recognition models, and position matching is dynamically adjusted to adjust the processing parameters, which solves the problem of poor results in the existing technology in handling drawings under complex backgrounds, and achieves accurate data-based representation and efficient processing adaptability.
Patent Information
- Application Number
- CN202410996503.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2044-07-24
AI Technical Summary
The prior art does not work well when dealing with process drawings in complex contexts, especially in identifying the positional relationship between text and primitives and the density of primitives, and lacks flexible adjustment mechanisms and adaptive capabilities.
The process drawings are scanned through a high-resolution scanner, and after preprocessing, the digital image is input into the preset text recognition model and element recognition model, the text information and element information are extracted, and the data representation is formed through position matching. Dynamically adjust the binarization threshold and sliding window size to suit the drawings of different types and complexities.
It realizes accurate text and element position matching of process drawings, improves processing adaptability and flexibility, ensures the best processing effect under different conditions, and improves the accuracy and completeness of data-based representations.
Smart Images

Figure CN118942096B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method and system for processing process drawings digitized. Background Art
[0002] With the development of information technology and the digitalization of industrial production, the demand for digital processing of process drawings is increasing. Process drawings are important technical documents used to record process flows, design plans and production specifications in industrial production, involving a variety of information such as text information, graphic symbols and geometric figures. In order to improve the management and application efficiency of process drawings, they must be converted into digital form. However, traditional process drawing processing methods usually rely on manual recognition and processing, which is not only time-consuming and labor-intensive, but also prone to errors.
[0003] In the prior art, some methods generate digital images by scanning process drawings, and then process these images to extract text information and primitive information. These methods include text extraction methods based on optical character recognition (OCR) technology and primitive extraction methods based on image processing technology. However, these methods are not effective when processing drawings with complex backgrounds, especially in terms of identifying the positional relationship between text and primitives and primitive density. The processing flow in the prior art is usually fixed, lacks a flexible adjustment mechanism, and is difficult to adapt to drawings of different types and complexities. When faced with process drawings of different sizes, formats and contents, the existing methods lack effective adaptive capabilities and the processing effect is unstable. Summary of the invention
[0004] Based on the above-mentioned shortcomings of the prior art, the purpose of the present invention is to provide a method and system for processing process drawings digitized to solve the above-mentioned technical problems.
[0005] To achieve the above object, the present invention provides the following technical solution: a method for processing process drawings into data, comprising:
[0006] Scanning the process drawing with a high-resolution scanner to obtain a digital image of the process drawing, and preprocessing the digital image;
[0007] Inputting the preprocessed digital image into a preset text recognition model to extract text information, wherein the text information includes text content and text position;
[0008] Inputting the preprocessed digital image into a preset primitive recognition model to extract primitive information, wherein the primitive information includes primitive shape and primitive position;
[0009] The text information and the graphic element information are matched according to the text position and the graphic element position to form a digitized representation of the process drawing.
[0010] The present invention is further configured to pre-process the digital image, including: adjusting the digital image to a preset size, performing pixel value normalization processing, and denoising and enhancing the image.
[0011] The present invention is further configured such that the construction logic of the preset text recognition model includes:
[0012] Dividing the preprocessed digital image into a preset number of windows, and calculating local statistical information of the digital image in each window, wherein the local statistical information includes a light-shadow balance value and a light-shadow fluctuation degree;
[0013] Calculate the initial threshold value according to the local statistical information, perform preliminary binarization processing on the window, and obtain a preliminary binarization window;
[0014] According to the binarization window, the text density and contrast in the window are calculated, and according to the text density and contrast, the binarization threshold of each window is dynamically adjusted according to the dynamic threshold adjustment rule to obtain a secondary binarization window;
[0015] The text content and text position of the secondary binarization window are identified according to the OCR recognition algorithm.
[0016] The present invention is further configured such that the calculation logic of the light and shadow balance value is: Where, mean(I) is the light and shadow balance value of window I, w and h are the length and width of the window respectively, and I(i,j) represents the brightness value of the pixel in the i-th row and j-th column of the window;
[0017] The calculation logic of light and shadow fluctuation is: Where, std(I) is the light and shadow fluctuation of window I;
[0018] The present invention is further configured such that the calculation logic of the initial threshold is: T=mean(I)+k*std(I), where T is the initial threshold and k is an adjustment parameter for controlling the sensitivity of binarization;
[0019] The calculation logic of the dynamic threshold adjustment rule is: when the text density is greater than the first text density threshold and the contrast is less than the second contrast threshold, T′=T-α*den(I)+β*con(I), T′ is the dynamically adjusted binarization threshold, den(I) is the text density, and the calculation logic is: δ is the Dirac function, con(I) is the contrast, and the calculation logic is: con(I)=max(I)-min(I), max(I) and min(I) are the maximum and minimum pixel values in the window respectively.
[0020] The present invention is further configured to provide a preset primitive recognition model construction logic, including:
[0021] Use the primitive detection algorithm to detect the primitives in each window on the preprocessed digital image, and calculate the primitive pixel area in each window;
[0022] Calculate the window primitive density based on the window primitive pixel area and the window pixel area;
[0023] Dynamically adjust the size of each window according to the dynamic sliding window adjustment rules based on the window element density;
[0024] Canny edge detection and Hough transform are used on the dynamically adjusted window to extract edges and positions, and the primitive shape and primitive position are obtained based on the edges and positions.
[0025] The present invention is further configured such that the calculation logic of the window primitive density is: D is the density of the image element in window I, N object (I) is the pixel area of the image element in window I, A unit (I) is the pixel area of window I; the calculation logic of the dynamic sliding window adjustment rule is: w′=w*(1+ω d *D), h′=h*(1+ω d *D), w′ and h′ represent the length and width of the dynamically adjusted window I, w and h are the length and width of the window I, ω d is the adjustment factor.
[0026] The present invention is further configured to match the text information with the image element information according to the text position and the image element position, including:
[0027] Set the text content and the graphic shape to the same coordinate system according to the text position and the graphic position;
[0028] The center position of the text is obtained according to the text content and the text position, and the bounding box of the primitive is obtained according to the primitive shape and the primitive position. When the center position of the text is within the bounding box of the primitive, a mark is generated for manual review.
[0029] The present invention also provides a processing system for digitizing process drawings, the system comprising:
[0030] Image acquisition module: Scanning the process drawing with a high-resolution scanner to obtain a digital image of the process drawing, and preprocessing the digital image;
[0031] The first extraction module: inputs the preprocessed digital image into a preset text recognition model to extract text information, wherein the text information includes text content and text position;
[0032] The second extraction module: inputs the preprocessed digital image into a preset primitive recognition model to extract primitive information, wherein the primitive information includes primitive shape and primitive position;
[0033] Position matching module: Match the text information and graphic element information according to the text position and graphic element position to form a digital representation of the process drawing.
[0034] The present invention provides a method and system for processing process drawings in digital form. The method scans the process drawings with a high-resolution scanner to obtain a digital image of the process drawings, and pre-processes the digital image; inputs the pre-processed digital image into a preset text recognition model to extract text information, wherein the text information includes text content and text position; inputs the pre-processed digital image into a preset primitive recognition model to extract primitive information, wherein the primitive information includes primitive shape and primitive position; matches the text information with the primitive information according to the text position and the primitive position to form a digital representation of the process drawings, and the beneficial effects produced include:
[0035] 1. Dynamic adjustment mechanism: By introducing a dynamic adjustment mechanism, the processing parameters and strategies can be automatically adjusted according to drawings of different types and complexities, which improves the adaptability and flexibility of the processing method. The dynamic sliding window technology can automatically adjust the size and position of the window according to changes in the drawing content, ensuring the best processing effect under different conditions;
[0036] 2. Achieve accurate position matching of text and graphics: By establishing text recognition models and graphics recognition models, extract text information and graphics information respectively, and accurately match the text and graphics according to the position matching algorithm to generate a digitized representation of the process drawing. Based on image processing and pattern recognition technology, accurately identify and adjust the shape and position of the graphics to ensure the accuracy and completeness of the digitized drawing.
[0037] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0039] Figure 1 A flowchart of a method for processing process drawings digitized according to an exemplary embodiment of the present invention;
[0040] Figure 2 The present invention is a schematic structural diagram of a system for processing process drawings digitized according to an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0041] The following will describe the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention, not for limiting the scope of protection of the present invention.
[0042] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0043] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.
[0044] Embodiment 1
[0045] A method for processing process drawings into data, such as Figure 1 As shown, including:
[0046] Scanning the process drawing with a high-resolution scanner to obtain a digital image of the process drawing, and preprocessing the digital image;
[0047] Inputting the preprocessed digital image into a preset text recognition model to extract text information, wherein the text information includes text content and text position;
[0048] Inputting the preprocessed digital image into a preset primitive recognition model to extract primitive information, wherein the primitive information includes primitive shape and primitive position;
[0049] The text information and the graphic element information are matched according to the text position and the graphic element position to form a digitized representation of the process drawing.
[0050] Specifically, high-resolution scanners include flatbed scanners, which are scanners with flat glass, and documents or drawings are placed on the glass for scanning. Suitable for scanning documents of various sizes and thicknesses; large-format scanners, which are scanners specifically used to scan large-size drawings, maps, engineering drawings, etc., usually have a roller feed system and can handle documents with a width of more than 24 inches; drum scanners, which use a rotating drum to fix the document and perform high-resolution scanning, are usually used in situations that require extremely high resolution and color accuracy; there is no restriction on this here, and a high-resolution scanner can ensure that the details in the drawings are clearly captured.
[0051] The present invention is further configured to pre-process the digital image, including: adjusting the digital image to a preset size, normalizing the pixel values, and denoising and enhancing the image. Specifically, using methods such as bilinear interpolation or bicubic interpolation to scale the image to a preset standard size, adjusting the digital image to a preset standard size to ensure that the sizes of all input images are consistent, reducing the computational complexity in subsequent processing, and improving the stability and consistency of the model, normalizing the pixel values of the image, adjusting the pixel values to a range of 0 to 1, eliminating the brightness difference between different images, denoising the image to remove random noise in the image, and improving the clarity of the image, and enhancing the image to improve the contrast and sharpness of the image, so that the text and graphics are more clearly visible.
[0052] The present invention is further configured such that the construction logic of the preset text recognition model includes:
[0053] The preprocessed digital image is divided into a preset number of windows, and local statistical information of the digital image is calculated in each window, wherein the local statistical information includes a light and shadow balance value and a light and shadow fluctuation degree; the present invention is further configured such that the calculation logic of the light and shadow balance value is: Where, mean(I) is the light and shadow balance value of window I, w and h are the length and width of the window respectively, and I(i,j) represents the brightness value of the pixel in the i-th row and j-th column of the window; the calculation logic of light and shadow fluctuation is: Wherein, std(I) is the light and shadow fluctuation of window I; dividing the preprocessed digital image into multiple windows of fixed size is helpful for more refined processing in a local range. In a feasible embodiment of the present invention, the preset number can be set to 4, 8 and 16, which is not limited here. The light and shadow balance value reflects the brightness level of the local area, and the light and shadow fluctuation reflects the brightness change of the local area;
[0054] An initial threshold is calculated based on local statistical information, and a preliminary binarization process is performed on the window to obtain a preliminary binarization window. The present invention is further configured such that the calculation logic of the initial threshold is: T=mean(I)+k*std(I), where T is the initial threshold and k is an adjustment parameter for controlling the sensitivity of binarization. Through the preliminary binarization process, the text area in the image can be quickly separated from the background, providing a basis for subsequent processing.
[0055] According to the binarization window, the text density and contrast in the window are calculated. According to the text density and contrast, the binarization threshold of each window is dynamically adjusted according to the dynamic threshold adjustment rule to obtain a secondary binarization window. The calculation logic of the dynamic threshold adjustment rule is: when the text density is greater than the first text density threshold and the contrast is less than the second contrast threshold, T′=T-α*den(I)+β*con(I), T′ is the dynamically adjusted binarization threshold, den(I) is the text density, and the calculation logic is: δ is the Dirac function, con(I) is the contrast, and the calculation logic is: con(I) = max(I)-min(I), max(I) and min(I) are the maximum and minimum pixel values in the window respectively. The text density reflects the density of the text by calculating the proportion of white (text) pixels in each window to the total pixels. The contrast reflects the contrast of the local area by calculating the difference between the maximum and minimum pixel brightness in each window. The threshold is dynamically adjusted according to the text density and contrast, which improves the adaptability and accuracy of the binarization processing. By dynamically adjusting the threshold, text recognition in complex backgrounds can be better handled to reduce misrecognition and missed recognition.
[0056] The text content and text position of the secondary binarization window are identified according to the OCR recognition algorithm. OCR (Optical Character Recognition) is a technology for converting text in an image into machine-readable text. The OCR recognition algorithm involves text detection, character segmentation, character recognition and post-processing, which realizes the conversion of text in an image into machine-readable text. It is a prior art and will not be elaborated here.
[0057] The present invention is further configured to provide a preset primitive recognition model construction logic, including:
[0058] A primitive detection algorithm is used on the preprocessed digital image to perform primitive detection on each window, and the primitive pixel area in each window is calculated; specifically, the primitive detection algorithm includes Canny edge detection and image morphological operations, which are prior arts and are not limited here. Furthermore, primitive detection is performed here by the primitive detection algorithm to obtain an approximate primitive pixel area without requiring accuracy.
[0059] The window primitive density is calculated according to the primitive pixel area of the window and the pixel area of the window; the present invention is further configured such that the calculation logic of the window primitive density is: D is the density of the image element in window I, N object (I) is the pixel area of the image element in window I, A unit (I) is the pixel area of window I; the calculation logic of the dynamic sliding window adjustment rule is: w′=w*(1+ω d *D), h′=h*(1+ω d *D), w′ and h′ represent the length and width of the dynamically adjusted window I, w and h represent the length and width of the window I, ω d To adjust the coefficient, the distribution of the graphics elements in each window is quantified through the graphics element density calculation, which provides a basis for the dynamic sliding window adjustment.
[0060] According to the density of the window element, the size of each window is dynamically adjusted according to the dynamic sliding window adjustment rules. Dynamic adjustment of the window size can better adapt to the areas with dense and sparse elements and improve the accuracy of element detection. By adjusting the window size, the boundary effect can be reduced to ensure that each window contains complete element information.
[0061] Canny edge detection and Hough transform are used on the dynamically adjusted window to extract edges and positions, and primitive shapes and primitive positions are obtained based on the edges and positions. Specifically, Canny edge detection is used to detect edges in the image, and Hough transform is used to convert the detected edges into geometric shapes such as line segments or circles.
[0062] The present invention is further configured to match the text information with the image element information according to the text position and the image element position, including:
[0063] The text content and the primitive shape are set to the same coordinate system according to the text position and the primitive position. In order to ensure that the text and the primitive can be effectively matched, they need to be placed in the coordinate system of the same background. The text content and the primitive shape are represented by pixel coordinates on the digital image. The pixel coordinates are mapped to the background coordinate system and can be represented on the same image plane.
[0064] The center position of the text is obtained according to the text content and text position, and the bounding box of the primitive is obtained according to the primitive shape and primitive position. When the center position of the text is within the bounding box of the primitive, a mark is generated for manual review. Through the position matching step, the text content and the primitive shape can be effectively combined to generate accurate marking information. This marking information not only improves the matching accuracy of text and primitives, but also provides a solid foundation for the digital representation of process drawings. Through this method, the automatic processing and management of complex information in process drawings can be realized, and the efficiency and reliability of data processing can be improved.
[0065] Embodiment 2
[0066] See also Figure 2 , the exemplary process drawing digitization processing system includes:
[0067] Image acquisition module: Scanning the process drawing with a high-resolution scanner to obtain a digital image of the process drawing, and preprocessing the digital image;
[0068] The first extraction module: inputs the preprocessed digital image into a preset text recognition model to extract text information, wherein the text information includes text content and text position;
[0069] The second extraction module: inputs the preprocessed digital image into a preset primitive recognition model to extract primitive information, wherein the primitive information includes primitive shape and primitive position;
[0070] Position matching module: Match the text information and graphic element information according to the text position and graphic element position to form a digital representation of the process drawing.
[0071] It should be noted that the processing system for digitizing process drawings provided in the above embodiment and the processing method for digitizing process drawings provided in the above embodiment belong to the same concept, wherein the specific manner in which each module and unit performs operations has been described in detail in the method embodiment and will not be repeated here. In practical applications, the processing system for digitizing process drawings provided in the above embodiment can allocate the above functions to different functional modules as needed, that is, divide the internal structure of the system into different functional modules to complete all or part of the functions described above, and this is not limited here.
[0072] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0073] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.
[0074] In this application, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0075] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0076] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0077] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0078] In the several embodiments provided in the present application, it should be understood that the disclosed system can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0079] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0080] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0081] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.
[0082] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for processing process drawings into data, characterized in that: include: Scanning the process drawing with a high-resolution scanner to obtain a digital image of the process drawing, and preprocessing the digital image; The preprocessed digital image is input into a preset text recognition model to extract text information, wherein the text information includes text content and text position, wherein the construction logic of the preset text recognition model includes: dividing the preprocessed digital image into a preset number of windows, calculating local statistical information of the digital image in each window, wherein the local statistical information includes light and shadow balance value and light and shadow fluctuation; calculating an initial threshold value according to the local statistical information, performing preliminary binarization processing on the window, and obtaining a preliminary binarization window; calculating the text density and contrast in the window according to the binarization window, and dynamically adjusting the binarization threshold of each window according to the text density and contrast according to the dynamic threshold adjustment rule to obtain a secondary binarization window; identifying the text content and text position of the secondary binarization window according to the OCR recognition algorithm; the calculation logic of the light and shadow balance value is: Where, mean(I) is the light and shadow balance value of window I, w and h are the length and width of the window respectively, and I(i,j) represents the brightness value of the pixel in the i-th row and j-th column of the window; the calculation logic of light and shadow fluctuation is: Wherein, std(I) is the light and shadow fluctuation of window I; the calculation logic of the initial threshold is: T = mean(I) + k*std(I), T is the initial threshold, k is the adjustment parameter used to control the sensitivity of binarization; the calculation logic of the dynamic threshold adjustment rule is: when the text density is greater than the first text density threshold and the contrast is less than the second contrast threshold, T′ = T-α*den(I) + β*con(I), T′ is the dynamically adjusted binarization threshold, den(I) is the text density, and the calculation logic is: δ is the Dirac function, con(I) is the contrast, and the calculation logic is: con(I) = max(I) - min(I), max(I) and min(I) are the maximum and minimum pixel values in the window respectively; Inputting the preprocessed digital image into a preset primitive recognition model to extract primitive information, wherein the primitive information includes primitive shape and primitive position; The text information and the graphic element information are matched according to the text position and the graphic element position to form a digitized representation of the process drawing.
2. A method for processing process drawings into data according to claim 1, characterized in that: The digital image is preprocessed, including: adjusting the digital image to a preset size, normalizing pixel values, and denoising and enhancing the image.
3. The method for processing process drawings into data according to claim 1, characterized in that: The construction logic of the preset primitive recognition model includes: Use the primitive detection algorithm to detect the primitives in each window on the preprocessed digital image, and calculate the primitive pixel area in each window; Calculate the window primitive density based on the window primitive pixel area and the window pixel area; Dynamically adjust the size of each window according to the dynamic sliding window adjustment rules based on the window element density; Canny edge detection and Hough transform are used on the dynamically adjusted window to extract edges and positions, and the primitive shape and primitive position are obtained based on the edges and positions.
4. The method for processing process drawings into data according to claim 3, characterized in that: The calculation logic of window element density is: D is the density of the image element in window I, N object (I) is the pixel area of the image element in window I, A unit (I) is the pixel area of window I; the calculation logic of the dynamic sliding window adjustment rule is: w′=w*(1+ω d *D), h′=h*(1+ω d *D), w′ and h′ represent the length and width of the dynamically adjusted window I, w and h are the length and width of the window I, ω d is the adjustment factor.
5. The method for processing process drawings into data according to claim 1, characterized in that: Match the text information and the graphic element information according to the text position and the graphic element position, including: Set the text content and the graphic shape to the same coordinate system according to the text position and the graphic position; The center position of the text is obtained according to the text content and the text position, and the bounding box of the primitive is obtained according to the primitive shape and the primitive position. When the center position of the text is within the bounding box of the primitive, a mark is generated for manual review.
6. A processing system for digitizing process drawings, characterized in that: A method for digitizing a process drawing according to any one of claims 1 to 5, comprising: Image acquisition module: Scanning the process drawing with a high-resolution scanner to obtain a digital image of the process drawing, and preprocessing the digital image; The first extraction module: inputs the preprocessed digital image into a preset text recognition model to extract text information, wherein the text information includes text content and text position; The second extraction module: inputs the preprocessed digital image into a preset primitive recognition model to extract primitive information, wherein the primitive information includes primitive shape and primitive position; Position matching module: Match the text information and graphic element information according to the text position and graphic element position to form a digital representation of the process drawing.
Citation Information
Patent Citations
Track drawing digital structured processing method, system, medium and equipment
CN117315707A