CN110378337B - Visual input method and system for drawing identification information of metal cutting tool - Google Patents

Visual input method and system for drawing identification information of metal cutting tool Download PDF

Info

Publication number
CN110378337B
CN110378337B CN201910603403.8A CN201910603403A CN110378337B CN 110378337 B CN110378337 B CN 110378337B CN 201910603403 A CN201910603403 A CN 201910603403A CN 110378337 B CN110378337 B CN 110378337B
Authority
CN
China
Prior art keywords
identification information
size
defect
area
cutting tool
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910603403.8A
Other languages
Chinese (zh)
Other versions
CN110378337A (en
Inventor
王煜林
安庆龙
徐兴伟
陈明
马海善
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Changzhou Haili Tool Co ltd
Shanghai Jiaotong University
Original Assignee
Changzhou Haili Tool Co ltd
Shanghai Jiaotong University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Changzhou Haili Tool Co ltd, Shanghai Jiaotong University filed Critical Changzhou Haili Tool Co ltd
Priority to CN201910603403.8A priority Critical patent/CN110378337B/en
Publication of CN110378337A publication Critical patent/CN110378337A/en
Application granted granted Critical
Publication of CN110378337B publication Critical patent/CN110378337B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/146Aligning or centring of the image pick-up or image-field
    • G06V30/1475Inclination or skew detection or correction of characters or of image to be recognised
    • G06V30/1478Inclination or skew detection or correction of characters or of image to be recognised of characters or characters lines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/19Recognition using electronic means
    • G06V30/196Recognition using electronic means using sequential comparisons of the image signals with a plurality of references
    • G06V30/1983Syntactic or structural pattern recognition, e.g. symbolic string recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30176Document
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

A visual input method and a system for identification information of a metal cutting tool drawing are disclosed, wherein a candidate area of an identification information position is preliminarily extracted based on the area calculation of a connected area, and a convolution neural network is used for distinguishing an actual identification area from a background area so as to extract size identification information; then correcting the characters through a graphic image algorithm, cutting size tolerance and segmenting the adhesive characters, and classifying the characters by utilizing defect detection; and finally, identifying the integral type of the drawing through a convolutional neural network and calling a corresponding parameter table to realize matching with the identification information, thereby achieving the purpose of visually inputting the identification information. The method provided by the invention can be used for remarkably improving the accuracy of visual extraction of the drawing identification information, solving the common problems in the character recognition field such as rotary short character recognition and adhesive character segmentation, and has the advantages of no information omission, no error in information extraction and the like, the accurate extraction rate is up to more than 99.3%, and the accurate recognition rate is 96.8%.

Description

Visual input method and system for drawing identification information of metal cutting tool
Technical Field
The invention relates to the technical field of computer vision, in particular to a visual input method and a visual input system for drawing identification information of a metal cutting tool.
Background
When the parametric design and the 3D modeling design are carried out on the metal cutting tool drawing, a large number of tool parameter values need to be input, and the work is realized by manually looking up the tool parameter values in a table or label in the tool drawing and then correspondingly inputting the tool parameter values into a design platform at present. The current main input method is manual input and input through software after information is recognized based on Optical Character Recognition (OCR). The main disadvantages of the two methods are: the method has the advantages that the method has the defects of large workload, low efficiency, poor accuracy, poor user experience and the like in manual input, so a reasonable automatic input method and a reasonable automatic input system have to be designed; the OCR technology is mainly directed to recognition of a whole segment of optical characters, and a recognized character area is clearly distinguished from a background and has a small logical relationship. Drawing identification information is often scattered in each position of a drawing, and the length, the inclination angle and the position of the drawing have high randomness, so that the extraction and identification difficulty is high.
Disclosure of Invention
The invention provides a visual input method and a visual input system for identification information of a drawing of a metal cutting tool, aiming at the problems of low accuracy and poor universality in the prior art. The system adopts various graphic image algorithms to realize character correction, character adhesion segmentation and character classification by utilizing defect detection. The system identifies the integral type of the drawing through a convolutional neural network and calls a corresponding parameter table, one-to-one matching of the identification information and the parameters of the parameter table is realized, and finally searching, managing and multiplexing of the drawing in a database are realized.
The invention is realized by the following technical scheme:
the invention relates to a visual input method for identification information of a drawing of a metal cutting tool, which comprises the steps of calculating a position candidate region for preliminarily extracting identification information based on the area of a connected region, and distinguishing an actual identification region from a background region by using a convolutional neural network so as to extract size identification information; then correcting the characters through a graphic image algorithm, cutting size tolerance and segmenting the adhesive characters, and classifying the characters by utilizing defect detection; and finally, identifying the integral type of the drawing through a convolutional neural network and calling a corresponding parameter table to realize matching with the identification information, thereby achieving the purpose of visually inputting the identification information.
The drawing of the metal cutting tool is formed by taking different types of drawing formats as image format files.
The area of the connected region is extracted by adopting an eight-connected region detection algorithm for the number of pixel points contained in each connected region.
The identification information candidate regions include all connected regions with areas smaller than a threshold, which include but are not limited to: size identifying information, dotted lines, virtual lines, and other primitives with smaller areas.
The distinction refers to: classifying the background area and the identification information by using a convolutional neural network model, specifically constructing a training data set by using the extracted identification information candidate area, training the data set by using a convolutional neural network, and distinguishing the background area and the identification information area by using the trained convolutional neural network model.
The convolutional neural network model is built by adopting but not limited to a Keras deep learning platform.
The correction is realized by adopting a minimum projection distance algorithm, and specifically comprises the following steps:
i) Detecting a convex hull: a convex hull is defined as the smallest polygon that encloses a certain pixel area of the image.
ii) for the extracted convex hull, traversing each edge of the convex hull, calculating the distance from other vertexes of the convex hull to the edge, and taking the maximum distance from all other vertexes to the edge as the projection distance of the edge. The included angle between the side corresponding to the minimum projection distance and the x direction is the character inclination angle.
iii) And performing affine transformation on the characters according to the calculated inclination angles.
The cutting size tolerance comprises the following specific steps:
i) The connected regions are detected and the specific location of each connected region is obtained.
ii) as the digital area is continuous in the y direction and the size tolerance area is discontinuous in the y direction, the method traverses each row of pixels of the image, and when a certain row of pixels comprises two pixel points which belong to different connected areas, the cutting identification information can correctly remove the size tolerance before the cutting.
The method for segmenting the sticky characters comprises the following specific steps:
i) And traversing each row of pixel points of the size identification information in the x direction, and calculating the distance d from the first non-background pixel point in the row of pixel points to the upper frame of the image.
ii) constructing a discrete function between the distance d and the number of image columns, and calculating the left slope and the right slope of all points in the three pixel areas around the points.
iii) And setting a slope threshold value larger than 0, and when the absolute values of the left slope and the right slope of a certain pixel point are both larger than the slope threshold value, considering the point as a cutting point, and correctly cutting the adhesion number by cutting the picture at the point.
The defects are as follows: the image contour corresponds to the concave points generated by the convex hull, and each defect comprises four parameters, namely a defect starting point coordinate, a defect end point coordinate, a farthest point from the defect to the corresponding edge of the convex hull and a farthest distance corresponding to the farthest point.
The character classification by using the defect detection specifically comprises the following steps:
i) Classifying the defects according to the parameters, including: when the left defect is a starting point, the x components of the coordinates of the end point are all smaller than the x component of the coordinate of the farthest point; when the right defect is a starting point, the x components of the coordinates of the end point are all larger than the x component of the coordinate of the farthest point; when the defect is a starting point, the y components of the end point coordinates are all smaller than the y component of the farthest point coordinate; when the next defect is a starting point, the y-components of the end point coordinates are all larger than the defect of the y-component of the farthest point coordinate.
ii) carrying out contour detection by adopting a findContours function in OpenCV, and extracting and calculating the number of inner contours in the image contour to serve as classification features; and (3) adopting a covexityDefects function in OpenCV to detect the defects and extracting the defects as classification characteristics.
Because the characters contained in the cutter drawing identification information have the numbers of 0-9 and diameter identifiers
Figure GDA0002170650370000031
Radius identifier R, tooth number identifier Z, these 13 types of characters can all be classified based on the number and relative positions of the inner contour features and defect features. E.g., numeral 5, consisting of one right defect and one left defect, with the right defect located above the left defect; the number 6 consists of an inner contour and a right defect, which is located above the inner contour.
The mathematical symbols contained in the drawing identification information comprise decimal points, equal numbers, angle superscripts and the like, and because the symbols contain few characteristics and are fuzzy in structure, the symbols need to be detected by combining with an actual context and the detected single numbers are combined into size identification information with actual significance; meanwhile, since the diameter and angle identification information often have different orientations, the corrected result may be upside down. The two types of problems are preferably solved by post-processing judgment, including judgment of identification information combination rules based on mathematical rules, such as: the decimal point must be followed by a number, and if the number 0 is the beginning of the number, the decimal point must be followed; the angle superscript is necessarily located at the end of the number, and the specific steps are as follows:
i) A size indicator is considered illegal when any symbol in the size indicator is detected as noise.
ii) when a size identifier is considered to be legal, outputting the size identifier as a detection result; when a size indicator is detected as being illegal, it is rotated clockwise (or counterclockwise) by 90 ° for a second detection. When a size indicator still does not obtain a legal detection result after undergoing 3 rotations, the size indicator is considered to be failed to be identified, and the content of the size indicator in the detection result is marked as unidentified.
iii) Classifying the identification information according to the drawing identifier, wherein the size information following the diameter identifier is diameter information; the size information following the angle identifier is angle information or the like.
The integral type of the drawing is identified, a training set is constructed by using a metal cutting tool drawing, a convolutional neural network model is trained so as to distinguish different drawing types, and the convolutional neural network adopts but is not limited to a LeNet-5 model built by a Keras deep learning platform.
The matching is as follows: calling a corresponding parameter table from a prefabricated database, wherein the parameter table comprises each piece of size information in the corresponding metal cutting tool drawing, the relative position of each piece of size information and a parameter value range, and comparing and searching the parameter table obtained by matching with the drawing in the database to realize intelligent management and efficient reuse of the metal cutting tool drawing.
Technical effects
The invention realizes the replacement of manual input during cutter design based on the existing metal cutting cutter drawing at present, and realizes the intelligent identification and matching of the identification information of the metal cutting cutter drawing. Compared with the existing drawing identification software, the method overcomes the defects of time consumption, time and labor consumption, low accuracy, high labor cost and the like in manual cutter drawing information input.
Compared with the current identification technology, the method has the advantages of no information omission, no error information extraction and the like, the accurate extraction rate reaches over 99.3 percent, and the accurate identification rate is 96.8 percent.
Drawings
FIG. 1 is a flow chart of an embodiment;
FIG. 2 is a schematic illustration of an embodiment input drawing;
FIG. 3 is a diagram illustrating the effect of pretreatment according to an embodiment;
FIG. 4 shows the effect of extracting the candidate region of the identification information in the embodiment;
FIG. 5 is a diagram illustrating an effect of extracting the identification information of the embodiment;
FIG. 6 shows the overall tilt correction results of the example;
FIG. 7 is a diagram illustrating the segmentation effect of character blocking in the embodiment;
FIG. 8 is a flowchart of post-processing module processing in an embodiment;
FIG. 9 is a flowchart of the construction of a drawing type recognition training set in the embodiment;
FIG. 10 is a flow chart of the construction of training set in the embodiment.
Detailed Description
As shown in fig. 1, the present embodiment relates to a system for identifying drawing identification information of a metal cutting tool, including: identification information draws module, identification information identification module, post-processing module and identification information matching module, wherein: the identification information extraction module extracts an identification information candidate region, constructs a training set and trains a convolutional neural network model to distinguish a background region from an identification information region; the identification information recognition module corrects the characters in the identification information area, cuts the size tolerance and then performs sticky character segmentation, and the post-processing module classifies the single character according to mathematical rules and expression logic to realize the conversion process from the recognition result to the actual size information; the identification information matching module utilizes a large number of metal cutting tool drawings to construct a training set, the training convolutional neural network model is trained to distinguish different drawing types, different parameter tables are called according to the different drawing types, and one-to-one matching of the identification information and the parameters of the parameter tables is achieved according to the positions and the sizes of the identification information.
The embodiment realizes identification of drawing identification information of the metal cutting tool through the following steps, and specifically comprises the following steps:
step 1) obtaining a drawing file of a metal cutting tool, and converting the drawing file of the cutting tool in pdf format into an image in png format as shown in fig. 2.
Step 2) preprocessing the inputted png format drawing picture, wherein the preprocessing comprises two steps, and the cvtColor in OpenCV is adopted to carry out graying processing on the picture; the binarization processing is performed by using a threshold function in OpenCV, and the processing effect is shown in fig. 3.
Step 3) detecting the connected regions by adopting a connected components function in OpenCV, extracting all the connected regions and calculating the area of each connected region; setting a threshold value, wherein the size of the threshold value is set to be 500 in a drawing with the size of 1400 multiplied by 1000; connected regions containing pixel points larger than the threshold value are ignored, and connected regions smaller than the threshold value are extracted as size identification information candidate regions; the candidate region extraction effect is shown in fig. 4.
Step 4) manually marking the identification information candidate area pictures extracted from the plurality of drawings to construct a data set, wherein the labels are divided into two types, one type is size identification information, and the other type is background; the data set was calculated as 4:1 into a training set and a verification set; and establishing a LeNet-5 model by adopting a Keras deep learning library, training the model by using the data set to obtain a neural network model for distinguishing the identification information and the background, and screening the identification information candidate region by using the network. An example of the size identification information obtained by the filtering is shown in fig. 5.
Step 5) performing correction processing on the size identification information shown in fig. 5, specifically including:
5.1 Carrying out graying and binarization processing on the image by adopting a cvtColor function and a threshold function in OpenCV to obtain a binary image of the size identification information;
5.2 Carrying out contour detection on the binary image by using a findContours function in OpenCV;
5.3 Adopting a covexhull function in OpenCV to search a convex hull corresponding to the contour;
5.4 ) traverse each edge of the convex hull and calculate the farthest distance of all other points on the convex hull to this edge as the projected distance of the edge. After traversing is finished, extracting an edge corresponding to the small projection distance, and calculating an included angle between the edge and the x direction to obtain the inclination angle of the character;
5.5 Adopting a getlotrationmatrix 2D function in OpenCV and constructing an affine matrix according to the inclination angle obtained in the step 5.4; performing affine transformation on the binary image by adopting a warpAffine function in OpenCV; the resulting rectified binary image is shown in fig. 6.
Step 6) identifying and cutting the dimensional tolerance, which specifically comprises the following steps:
6.1 For the binary image shown in fig. 6, connected components function in OpenCV is used to perform connected region detection on it.
6.2 Go through each row of pixel points on the binary image shown in fig. 6, and when a certain row of pixel points contains two pixel points belonging to different connected regions, it is considered that the image is cut before the row of pixel points, and the size tolerance can be cut.
Step 7), adherent character segmentation, which specifically comprises the following steps:
7.1 Traverse each row of pixel points on the binary image obtained after the cutting size tolerance, calculate the distance from the 1 pixel point (white) closest to the upper edge of the image in each row of pixel points to the upper edge of the image, and store the distance in the vector a.
7.2 With the vector a as y and the distance from the pixel point to the left edge of the image as x, constructing a function of y relative to x; traversing each element in the vector a, calculating a left derivative and a right derivative of the element, and when the absolute values of the left derivative and the right derivative are both larger than a threshold value, considering that the pixel column corresponding to the element is a cutting position; in actual calculation, the method has a good segmentation effect when the threshold value is set to be 0.6. The effect of the segmentation is shown in FIG. 7
Step 8) character classification, which specifically comprises the following steps:
8.1 A findContours function in OpenCV is adopted for contour detection, and the number of inner contours is extracted and calculated to serve as classification features. Performing convex hull detection on the contour by using a convexHull in OpenCV; and finding the defect generated by the contour corresponding to the convex hull by using a covexityDefects function in OpenCV, and taking the defect as a classification characteristic.
8.2 According to four parameters of the defect: classifying the defects by a defect starting point, a defect ending point, a farthest point from the defect to a corresponding edge of the convex hull and a farthest distance corresponding to the farthest point; the left defect is a starting point, and the x components of the end point coordinates are all smaller than the x component of the farthest point coordinate; the right defect is a starting point, and the x components of the end point coordinates are all larger than the defect o of the x component of the farthest point coordinate; the upper defect is a starting point, and the y components of the end point coordinates are all smaller than the y component of the farthest point coordinate; the lower defect is a starting point, and the y components of the coordinates of the end points are all larger than the y component of the coordinate of the farthest point.
8.3 Sorting characters by feature type and number and their relative positions is shown in FIG. 8, as is a diameter identifier
Figure GDA0002170650370000061
An inner contour including two left and right positions; character 6 contains one right defect and one ring feature with the right defect located above the ring feature.
Step 9) the post-processing module is responsible for integrating the scattered single numbers into size information with practical significance, and meanwhile, the post-processing module recognizes characters which are difficult to distinguish, such as decimal points, angle superscripts and the like, and corrects rotational deviation by means of understanding of the whole size information, and specifically comprises the following steps:
9.1 Input the character classification result into a module in the form of a vector, and when a point symbol appears between two numbers, the point symbol is considered to be a decimal point; when a dot symbol appears at the end of a digit, it is considered an angular superscript.
9.2 Whether the result obtained by integration accords with semantics is judged, if the decimal point can not be used as the digital start, if the decimal point does not exist after the number 0, the decimal point can not be used as the digital start, and the like.
9.3 When a size identifier is considered legal, outputting the size identifier as a detection result; when a size indicator is detected as being illegal, it is rotated clockwise (or counterclockwise) by 90 ° for a second detection. When a size indicator still does not obtain a legal detection result after undergoing 3 rotations, the size indicator is considered to be failed to be identified, and the content of the size indicator in the detection result is marked as unidentified.
Step 10) classifying the size identification information according to the type of the size identification information: if the size information contains an angle superscript, defining the type as angle information; when the size information contains the radius identifier, defining the type of the size information as radius information; when the size information contains the tooth number identifier, the type of the size information is considered as tooth number information; when the inclination angle of the size information is 90 degrees, the type of the size information is considered as diameter information; when the inclination angle of the size information is 0 °, the type thereof is considered as length information. Each type of dimensional information is sorted by its x-coordinate size.
Step 11), predicting the type of the graph paper by using a convolutional neural network model, and calling a proper parameter table for matching, wherein the method specifically comprises the following steps:
11.1 A training set is constructed, the process is shown in fig. 10, firstly, manual labeling is performed on a plurality of drawings, in the scheme, 700 drawings are used, and the drawings contain 10 types; adopting a PyMuPDF module to convert the pdf-format drawings into png format in batches; graying and binarizing the drawing image by adopting a cvtColor function and a threshold function in OpenCV, expanding the binary image by adopting a dillate function in OpenCV to highlight effective information, and reducing the image size to 140 x 140 by adopting a resize function in OpenCV; converting the graph paper into a floating point number matrix format and carrying out normalization processing; performing one-hot encoding on the label; the data sets are scrambled sequentially; and (3) adding the following components in percentage by weight of 4:1, dividing a training set and a verification set; the data set is persisted in the Npy format.
11.2 The convolutional neural network is built by adopting a LeNet-5 model and a Keras deep learning library, and the trained model is subjected to persistent storage.
And step 12) calling a corresponding parameter table according to the identified drawing type, matching the dimension information with the parameter table according to the relative position and type of the dimension identification information, directly displaying the matching result to a user for evaluation and modification by the user, and finally realizing visual input of the cutter drawing identification information.
Through practical experiments, the system can achieve more than 99.3% accuracy in extracting the identification information of the cutter drawing; the accuracy rate of 96.8 percent on identification information identification can be achieved. The system adopts an innovative morphological segmentation and neural network screening method in the aspect of identification information extraction, so that the system has extremely high extraction accuracy, and can ensure that information is not missed and not extracted by mistake during extraction; the correction realized by the method, the post-processing method well solves the integral correction of the short characters through a detection and understanding mode, and meanwhile, the segmentation method based on the adhesion characteristics well solves the cutting problem of the adhesion characters. Therefore, the method has satisfactory accuracy despite the poor recognition situation of the drawing characters. Compared with the prior art, the method provided by the invention obviously improves the accuracy of visual extraction of the drawing identification information, and solves the common problems in the character recognition fields of rotary short character recognition, adhesive character segmentation and the like.
The foregoing embodiments may be modified in many different ways by one skilled in the art without departing from the spirit and scope of the invention, which is defined by the appended claims and not by the preceding embodiments, and all embodiments within their scope are intended to be limited by the scope of the invention.

Claims (7)

1. A visual input method for identification information of a drawing of a metal cutting tool is characterized in that a candidate area of an identification information position is preliminarily extracted based on the area calculation of a connected area, and a convolution neural network is used for distinguishing an actual identification area from a background area so as to extract size identification information; then correcting the characters through a graphic image algorithm, cutting size tolerance and segmenting the adhesive characters, and classifying the characters by utilizing defect detection; finally, the integral type of the drawing is identified through a convolutional neural network, and a corresponding parameter table is called to realize matching with the identification information, so that the aim of visually inputting the identification information is fulfilled;
the correction is realized by adopting a minimum projection distance algorithm, and specifically comprises the following steps:
i) Detecting a convex hull: a convex hull is defined as the smallest polygon that encloses a certain pixel area of the image;
ii) traversing each edge of the extracted convex hull, calculating the distance from other vertexes of the convex hull to the edge, and taking the maximum distance from all other vertexes to the edge as the projection distance of the edge, wherein the included angle between the edge corresponding to the minimum projection distance and the x direction is the character dip angle;
iii) Performing affine transformation on the characters according to the calculated inclination angles;
the cutting size tolerance comprises the following specific steps:
i) Detecting the communication areas and obtaining the specific position of each communication area;
ii) as the digital area is continuous in the y direction and the size tolerance area is discontinuous in the y direction, traversing each row of pixels of the image by the method, and when a certain row of pixels comprises two pixel points which belong to different connected areas, considering that the size tolerance can be correctly removed by cutting the identification information before;
the method for segmenting the sticky characters comprises the following specific steps:
i) Traversing each row of pixel points of the size identification information in the x direction, and calculating the distance d from a first non-background pixel point in the row of pixel points to an upper frame of the image;
ii) constructing a discrete function between the distance d and the number of image columns, and calculating the left slope and the right slope of all points in the three pixel point areas around the points;
iii) And setting a slope threshold value larger than 0, and when the absolute values of the left slope and the right slope of a certain pixel point are both larger than the slope threshold value, considering the point as a cutting point, and correctly cutting the adhesion number by cutting the picture at the point.
2. The visual input method of drawing identification information of a metal cutting tool as set forth in claim 1, wherein said defect is: the image contour corresponds to a concave point generated by a convex hull, and each defect comprises four parameters, namely a defect starting point coordinate, a defect end point coordinate, a farthest point from the defect to a corresponding edge of the convex hull and a farthest distance corresponding to the farthest point;
the character classification by using the defect detection specifically comprises the following steps:
i) Classifying the defects according to the parameters, including: when the left defect is a starting point, the x components of the coordinates of the end point are all smaller than the x component of the coordinate of the farthest point; when the right defect is a starting point, the x components of the end point coordinates are all larger than the defect of the x component of the farthest point coordinate; when the defect is a starting point, the y components of the end point coordinates are all smaller than the y component of the farthest point coordinate; when the current defect is a starting point, the y components of the end point coordinates are all larger than the defect of the y component of the farthest point coordinate;
ii) carrying out contour detection by adopting a findContours function in OpenCV, and extracting and calculating the number of inner contours as classification features; and (3) adopting a covexityDefects function in OpenCV to detect the defects and extracting the defects as classification characteristics.
3. The visual input method of the drawing identification information of the metal cutting tool as set forth in claim 1, wherein the character classification is further followed by a post-processing judgment, including a judgment of the identification information combination rule based on a mathematical rule, comprising the steps of:
i) When any symbol in a size identifier is detected as noise, the size identifier is considered to be illegal;
ii) when a size identifier is considered to be legal, outputting the size identifier as a detection result; when one size mark is detected to be illegal, rotating the size mark clockwise or anticlockwise by 90 degrees, and carrying out second detection; when a size identifier still does not obtain a legal detection result after undergoing 3 rotations, the size identifier is considered to be failed to be identified, and the content of the size identifier is marked as unidentified in the detection result;
iii) And classifying the identification information according to the drawing identifier.
4. The visual input method of the drawing identification information of the metal cutting tool as set forth in claim 1, wherein said distinguishing is: classifying the background area and the identification information by using a convolutional neural network model, specifically constructing a training data set by using the extracted identification information candidate area, training the data set by using a convolutional neural network, and distinguishing the background area and the identification information area by using the trained convolutional neural network model.
5. The visual input method for identification information of a metal cutting tool drawing according to claim 1, wherein the integral type identification of the drawing is performed by constructing a training set using the metal cutting tool drawing and training a convolutional neural network model to distinguish different drawing types.
6. The visual input method of the drawing identification information of the metal cutting tool as set forth in claim 1, wherein the matching is: and calling a corresponding parameter table from a prefabricated database, wherein the parameter table comprises each piece of size information in the drawing of the corresponding metal cutting tool, the relative position of each piece of size information and a parameter value range, and the parameter table obtained by matching is compared with the drawing in the database for searching.
7. A metal cutting tool drawing identification information recognition system for implementing the metal cutting tool drawing identification information visual input method according to any one of claims 1 to 6, comprising: identification information draws module, identification information identification module, post processing module and identification information matching module, wherein: the identification information extraction module extracts an identification information candidate region, constructs a training set and trains a convolutional neural network model to distinguish a background region from an identification information region; the identification information recognition module corrects the characters in the identification information area, cuts the size tolerance and then performs sticky character segmentation, and the post-processing module classifies the single character according to mathematical rules and expression logic to realize the conversion process from the recognition result to the actual size information; the identification information matching module utilizes a large number of metal cutting tool drawings to construct a training set, trains the convolutional neural network model to distinguish different drawing categories, calls different parameter tables according to the different drawing categories, and realizes one-to-one matching of identification information and parameter table parameters according to the position and size of the identification information.
CN201910603403.8A 2019-07-05 2019-07-05 Visual input method and system for drawing identification information of metal cutting tool Active CN110378337B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910603403.8A CN110378337B (en) 2019-07-05 2019-07-05 Visual input method and system for drawing identification information of metal cutting tool

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910603403.8A CN110378337B (en) 2019-07-05 2019-07-05 Visual input method and system for drawing identification information of metal cutting tool

Publications (2)

Publication Number Publication Date
CN110378337A CN110378337A (en) 2019-10-25
CN110378337B true CN110378337B (en) 2023-03-31

Family

ID=68252072

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910603403.8A Active CN110378337B (en) 2019-07-05 2019-07-05 Visual input method and system for drawing identification information of metal cutting tool

Country Status (1)

Country Link
CN (1) CN110378337B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111859805B (en) * 2020-07-21 2023-08-29 国网山东省电力公司青岛供电公司 Method for detecting topological relation of electric power drawing based on artificial intelligence
CN113160192B (en) * 2021-04-28 2022-09-16 北京科技大学 Visual sense-based snow pressing vehicle appearance defect detection method and device under complex background

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102779275A (en) * 2012-07-04 2012-11-14 广州广电运通金融电子股份有限公司 Paper characteristic identification method and relative device
CN103927534A (en) * 2014-04-26 2014-07-16 无锡信捷电气股份有限公司 Sprayed character online visual detection method based on convolutional neural network
CN104200210A (en) * 2014-08-12 2014-12-10 合肥工业大学 License plate character segmentation method based on parts
WO2017020723A1 (en) * 2015-08-04 2017-02-09 阿里巴巴集团控股有限公司 Character segmentation method and device and electronic device
CN107247950A (en) * 2017-06-06 2017-10-13 电子科技大学 A kind of ID Card Image text recognition method based on machine learning
CN108256575A (en) * 2018-01-17 2018-07-06 广东顺德工业设计研究院(广东顺德创新设计研究院) Image-recognizing method, device, computer equipment and storage medium
CN108548820A (en) * 2018-03-28 2018-09-18 浙江理工大学 Cosmetics paper labels defect inspection method
CN108596066A (en) * 2018-04-13 2018-09-28 武汉大学 A kind of character identifying method based on convolutional neural networks
CN108875735A (en) * 2018-05-25 2018-11-23 昆山湖大机器人技术有限公司 Plate Production line lattice coding character automatic testing method
CN108921163A (en) * 2018-06-08 2018-11-30 南京大学 A kind of packaging coding detection method based on deep learning
CN108982508A (en) * 2018-05-23 2018-12-11 江苏农林职业技术学院 A kind of plastic-sealed body IC chip defect inspection method based on feature templates matching and deep learning
CN109002824A (en) * 2018-06-27 2018-12-14 淮阴工学院 A kind of architectural drawing label information detection method based on OpenCV
CN109815956A (en) * 2018-12-28 2019-05-28 安徽清新互联信息科技有限公司 A kind of license plate character recognition method based on adaptive location segmentation
CN109871938A (en) * 2019-01-21 2019-06-11 重庆大学 A kind of components coding detection method based on convolutional neural networks

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102779275A (en) * 2012-07-04 2012-11-14 广州广电运通金融电子股份有限公司 Paper characteristic identification method and relative device
WO2014005456A1 (en) * 2012-07-04 2014-01-09 广州广电运通金融电子股份有限公司 Paper character recognition method and related device
CN103927534A (en) * 2014-04-26 2014-07-16 无锡信捷电气股份有限公司 Sprayed character online visual detection method based on convolutional neural network
CN104200210A (en) * 2014-08-12 2014-12-10 合肥工业大学 License plate character segmentation method based on parts
WO2017020723A1 (en) * 2015-08-04 2017-02-09 阿里巴巴集团控股有限公司 Character segmentation method and device and electronic device
CN107247950A (en) * 2017-06-06 2017-10-13 电子科技大学 A kind of ID Card Image text recognition method based on machine learning
CN108256575A (en) * 2018-01-17 2018-07-06 广东顺德工业设计研究院(广东顺德创新设计研究院) Image-recognizing method, device, computer equipment and storage medium
CN108548820A (en) * 2018-03-28 2018-09-18 浙江理工大学 Cosmetics paper labels defect inspection method
CN108596066A (en) * 2018-04-13 2018-09-28 武汉大学 A kind of character identifying method based on convolutional neural networks
CN108982508A (en) * 2018-05-23 2018-12-11 江苏农林职业技术学院 A kind of plastic-sealed body IC chip defect inspection method based on feature templates matching and deep learning
CN108875735A (en) * 2018-05-25 2018-11-23 昆山湖大机器人技术有限公司 Plate Production line lattice coding character automatic testing method
CN108921163A (en) * 2018-06-08 2018-11-30 南京大学 A kind of packaging coding detection method based on deep learning
CN109002824A (en) * 2018-06-27 2018-12-14 淮阴工学院 A kind of architectural drawing label information detection method based on OpenCV
CN109815956A (en) * 2018-12-28 2019-05-28 安徽清新互联信息科技有限公司 A kind of license plate character recognition method based on adaptive location segmentation
CN109871938A (en) * 2019-01-21 2019-06-11 重庆大学 A kind of components coding detection method based on convolutional neural networks

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
IC芯片印刷字符识别算法研究与应用;胡洋;《中国优秀硕士学位论文全文数据库信息科技辑》;20170615(第6期) *
基于改进的连通域算法与垂直投影相结合的车牌字符分割;路敬祎等;《自动化技术与应用》;20151231;第34卷(第12期);全文 *
复杂背景下字符图像的预处理及分割算法研究;陈志强;《中国优秀硕士学位论文全文数据库信息科技辑》;20131115(第11期);全文 *

Also Published As

Publication number Publication date
CN110378337A (en) 2019-10-25

Similar Documents

Publication Publication Date Title
CN108596066B (en) Character recognition method based on convolutional neural network
CN110210409B (en) Method and system for detecting form frame lines in form document
CN109816644B (en) Bearing defect automatic detection system based on multi-angle light source image
TWI384408B (en) Method and system for identifying image and outputting identification result
CN104751142B (en) A kind of natural scene Method for text detection based on stroke feature
CN111626146B (en) Merging cell table segmentation recognition method based on template matching
CN106203539B (en) Method and device for identifying container number
CN101122953A (en) Picture words segmentation method
CN111582294A (en) Method for constructing convolutional neural network model for surface defect detection and application thereof
CN111091124B (en) Spine character recognition method
CN104156730B (en) A kind of antinoise Research of Chinese Feature Extraction method based on skeleton
CN113723330B (en) Method and system for understanding chart document information
CN110378337B (en) Visual input method and system for drawing identification information of metal cutting tool
Gilly et al. A survey on license plate recognition systems
CN112364834A (en) Form identification restoration method based on deep learning and image processing
CN114359538A (en) Water meter reading positioning and identifying method
CN112686265A (en) Hierarchic contour extraction-based pictograph segmentation method
CN110046618B (en) License plate recognition method based on machine learning and maximum extremum stable region
CN109977714B (en) Multi-QR-code integrated visual positioning method for warehoused goods
Siddique et al. Development of an automatic vehicle license plate detection and recognition system for Bangladesh
Chiang et al. A method for automatically extracting road layers from raster maps
CN115830359A (en) Workpiece identification and counting method based on target detection and template matching in complex scene
Liu et al. A prototype system of courtesy amount recognition for Chinese Bank checks
CN112418210B (en) Intelligent classification method for tower inspection information
Mishchenko et al. Model-Based Recognition and Extraction of Information from Chart Images.

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant