Engineering drawing automatic processing method
A technology for automatic processing and engineering drawings, applied in the field of image processing, can solve problems such as waste of resources, rework, unclear stamping, etc., to achieve the effect of improving work efficiency and saving labor costs
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0036] like figure 1 As shown, an automatic processing method for engineering drawings includes the following steps:
[0037] S1. Obtain an image to be processed, and the image to be processed in this embodiment is a scan of an engineering drawing;
[0038] S2, preprocessing the to-be-processed image: performing grayscale processing and inversion processing on the to-be-processed image;
[0039] S3, extracting foreground information in the to-be-processed image to obtain a foreground image;
[0040] S4, identify several tables in the foreground image: extract the horizontal lines and vertical lines in the foreground image to obtain several table frame lines;
[0041] S5. Identify the target table in the several tables: identify several cells formed by the several table frame lines; traverse each cell, if the characters in the cell contain preset keywords, then the cell is Determine the target cell; determine the table where the target cell is located as the target table;
...
Embodiment 2
[0046] Step S3 described in the implementation one is specifically:
[0047] Calculate the adaptive threshold of each pixel in the image to be processed after preprocessing; if the value of the pixel in the image to be processed is higher than its corresponding adaptive threshold, set the value of the pixel to 255, otherwise set the value of the pixel to is 0, so as to separate the frame from the background and obtain the foreground image. The formula is expressed as:
[0048] x ij '=255*Ι[x ij >threshold]
[0049] In the formula, x ij represents the pixel in the image to be processed; x ij ' represents the pixel in the foreground image; I represents the indicative function, if x ij >threshold, then I is 1, otherwise I is 0; threshold represents the adaptive threshold, which is expressed by the formula as:
[0050]
[0051] In the formula, C represents the offset parameter; w ij Represents the pixel x in the image to be processed ij The Gaussian mean of the neighbo...
Embodiment 3
[0055] Steps S4 and S5 described in the implementation one are specifically:
[0056] S4, extracting the horizontal and vertical lines in the foreground image to obtain several table frame lines:
[0057] S41. Extract the horizontal line:
[0058] Structural element B is set as a horizontal line, the width of the horizontal line is one pixel, and the length is 1 / 20 of the width of the foreground image (for the convenience of description, the foreground image is denoted as Figure A).
[0059] Slide the structural element B on the graph A, if the structural element B is entirely included in the foreground of the graph A (such as Figure 4 The white part in the image is the foreground), then set the value of the pixel of the image A corresponding to the center of the structural element B to 255; otherwise, set it to 0, thereby removing the non-horizontal line structure or noise in the image, and obtaining the image V. The formula is expressed as:
[0060]
[0061] In the fo...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


