CN115511884B - Punching compound die surface quality detection method based on computer vision - Google Patents

Punching compound die surface quality detection method based on computer vision Download PDF

Info

Publication number
CN115511884B
CN115511884B CN202211420216.4A CN202211420216A CN115511884B CN 115511884 B CN115511884 B CN 115511884B CN 202211420216 A CN202211420216 A CN 202211420216A CN 115511884 B CN115511884 B CN 115511884B
Authority
CN
China
Prior art keywords
matching
closed
die
point
edge
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
CN202211420216.4A
Other languages
Chinese (zh)
Other versions
CN115511884A (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.)
Wuxi Luoyu Intelligent Manufacturing Co ltd
Jiangsu Huishan New Energy Group Co ltd
Original Assignee
Wuxi Luoyu Intelligent Manufacturing Co ltd
Jiangsu Huishan New Energy Group Co ltd
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 Wuxi Luoyu Intelligent Manufacturing Co ltd, Jiangsu Huishan New Energy Group Co ltd filed Critical Wuxi Luoyu Intelligent Manufacturing Co ltd
Priority to CN202211420216.4A priority Critical patent/CN115511884B/en
Publication of CN115511884A publication Critical patent/CN115511884A/en
Application granted granted Critical
Publication of CN115511884B publication Critical patent/CN115511884B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • 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/60Analysis of geometric attributes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/66Analysis of geometric attributes of image moments or centre of gravity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20076Probabilistic image processing
    • 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/30108Industrial image inspection
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Geometry (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to the technical field of data processing, in particular to a punching compound die surface quality detection method based on computer vision, which comprises the following steps: acquiring a gray image of the surface of the punching compound die and carrying out edge detection to obtain all closed edges; acquiring the central point of each closed edge and the central point of each hole site in the standard image of the surface of the punching compound die to obtain hole site offset; respectively obtaining closed boundary images of an upper die and a lower die of the punching compound die, carrying out characteristic point analysis on each closed edge to obtain a corresponding characteristic point sequence, obtaining a matching matrix according to the characteristic point sequence of the corresponding closed edge, and further obtaining the matching degree between the corresponding closed edges; obtaining all hole site matching pairs in the upper die and the lower die according to the matching degree; and obtaining the abnormal probability according to the number of all hole site matching pairs in the upper die and the lower die, and performing quality judgment based on the abnormal probability, thereby effectively improving the accuracy of surface quality detection of the counter-punching composite die.

Description

Punching compound die surface quality detection method based on computer vision
Technical Field
The invention relates to the technical field of data processing, in particular to a punching compound die surface quality detection method based on computer vision.
Background
The common production processing machinery device of life such as car, boats and ships, lathe needs multiple mechanical parts in production assembling process, these spare parts have different requirements to material and structure according to in the scene of difference and device, in order to satisfy the spare part requirement of different sizes, traditional spare part processing production process need treat the coarse fodder of processing and carry out multiple processes such as blanking, turn-ups, punch a hole, every process all needs specific mold processing, but link up production between the multiple process and probably lead to the material position transform, cause the processing skew and then influence the spare part quality.
In the modern processing process, the machining of mechanical parts is usually realized by using a composite die, and the production and manufacturing efficiency is higher; the punching composite die comprises an upper die and a lower die, wherein groove hole sites between the dies are in one-to-one correspondence to enable processed parts to meet production quality requirements, but due to the complexity of the production process and errors of production mechanical devices, material position deviation and even damage to the hole sites of the punching composite die or rigid deformation of the hole sites can be caused, so that the punching composite die needs to be periodically detected, but the quality is often judged based on the comparison of the current dies and standards, the influence of deformation in different degrees is ignored, and the accuracy of a judgment result is low.
Disclosure of Invention
In order to solve the technical problems, the invention aims to provide a punching compound die surface quality detection method based on computer vision, and the adopted technical scheme is as follows:
one embodiment of the invention provides a punching compound die surface quality detection method based on computer vision, which comprises the following steps: acquiring a gray image of the surface of the punching compound die;
performing edge detection on the gray level image to obtain all closed edges in the gray level image; acquiring a central point of each closed edge and a central point of each hole site in a standard image of the surface of the punching compound die, and acquiring hole site offset according to the Euclidean distance between the central point of each closed edge and the central point of the corresponding hole site in the standard image;
respectively acquiring closed boundary images of an upper die and a lower die of the punching composite die, and respectively performing characteristic point analysis on corresponding closed edges in the closed boundary images of the upper die and the lower die to obtain a first characteristic point sequence and a second characteristic point sequence; acquiring a matching matrix according to the first characteristic point sequence and the second characteristic point sequence, acquiring a matching value between the first characteristic point and the second characteristic point based on the matching matrix, and acquiring a matching degree between corresponding closed edges according to the matching value;
obtaining all hole site matching pairs in the upper die and the lower die according to the matching degree; and counting the number of all hole site matching pairs in the upper die and the lower die to obtain the abnormal probability of the punching composite die, and judging the quality based on the abnormal probability.
Preferably, the step of obtaining a matching value between the first feature point and the second feature point based on the matching matrix includes:
acquiring an HSV image corresponding to the gray image, and acquiring the brightness value of each pixel point based on the HSV image;
and constructing a mapping coefficient based on the matching matrix and the coordinate of the first characteristic point, acquiring a first ratio of the abscissa and the ordinate of the second characteristic point and a second ratio of the brightness value of the first characteristic point and the brightness value of the second characteristic point, and obtaining a matching value between the first characteristic point and the second characteristic point by the product of the first ratio, the second ratio and the mapping coefficient.
Preferably, the step of obtaining the matching degree between the corresponding closed edges according to the matching value includes:
judging whether the matching value of the first feature point and the corresponding second feature point is within a preset matching range, if so, successfully matching the first feature point and the second feature point;
and calculating the cumulative sum of the matching values between the first characteristic points and the second characteristic points which are successfully matched on the corresponding closed edges, and normalizing the cumulative sum to obtain the matching degree between the corresponding closed edges.
Preferably, the step of obtaining a matching matrix according to the first feature point sequence and the second feature point sequence includes:
correspondingly selecting F first characteristic points and F second characteristic points from the first characteristic point sequence and the second characteristic point sequence, wherein F is a positive integer;
and respectively constructing a first matrix and a second matrix by using the F first characteristic points and the F second characteristic points, taking a multiplication result of the matching matrix and the first matrix as the second matrix, and obtaining each element in the matching matrix based on matrix operation.
Preferably, the step of constructing a mapping coefficient based on the matching matrix and the coordinates of the first feature point includes:
the expression of the mapping coefficient is:
Figure DEST_PATH_IMAGE001
wherein the content of the first and second substances,
Figure 819287DEST_PATH_IMAGE002
coordinates representing the first feature point;
Figure 571342DEST_PATH_IMAGE003
respectively representing elements in the matching matrix.
Preferably, the step of obtaining the hole site offset according to the euclidean distance between the central point of each closed edge and the central point of the corresponding hole site in the standard image includes:
straight lines in different directions are constructed through the center point of the closed edge, each straight line and the closed edge are intersected at two points to form a corresponding line segment, and the length of the line segment formed by the straight lines in different directions is obtained;
selecting the maximum value and the minimum value of the lengths of all line segments, and obtaining an offset factor according to the difference value of the maximum value and the minimum value, wherein the offset factor and the difference value are in positive correlation;
and taking the product of the Euclidean distance between the central point of the closed edge and the central point of the corresponding hole site in the standard image and the offset factor as the hole site offset of the closed edge.
Preferably, the step of counting the number of all the hole site matching pairs in the upper die and the lower die to obtain the abnormal probability of the punching composite die includes:
acquiring the number of all unmatched feature points on the two closed edges in each hole site matching pair and the sum of the number of all feature points on the two closed edges in the hole site matching pair, and taking the ratio result of the number of all unmatched feature points on the two closed edges and the sum of the number of all feature points on the two closed edges as an unmatched ratio;
calculating the product result between the unmatched ratio and the reciprocal of the matching degree of the hole site matching pairs, wherein the sum of the product results corresponding to all the hole site matching pairs is an abnormal factor;
and acquiring the sum of hole site offsets of all closed edges in all the hole site matching pairs, calculating the product of the sum of the hole site offsets and the abnormal factor, and performing normalization processing to obtain the abnormal probability.
Preferably, the step of determining the quality based on the abnormal probability includes:
and when the abnormal probability is greater than a preset abnormal threshold value, the surface quality of the punching compound die is poor.
Preferably, the step of acquiring all the closed edges in the grayscale image includes:
performing traversal search on each edge pixel point in the gray image, wherein the direction of the traversal search is the eight neighborhood directions of the edge pixel points;
when the edge pixel point of the nth traversal search and the edge pixel point of the second traversal search are the same pixel point, and the edge pixel point of the (n-1) th traversal search and the edge pixel point of the first traversal search are also the same pixel point, the traversal search edge is a closed edge; wherein n is a positive integer.
Preferably, the closed boundary image is an image including all closed edges.
The invention has the following beneficial effects: in the embodiment of the invention, through analyzing the gray level image on the surface of the punching compound die, all closed edges in the gray level image are obtained firstly so as to screen out the interference of other false edges and reduce the calculated amount; calculating the Euclidean distance between the position of each central point on the closed edge and the position of the corresponding hole site in the standard image to obtain the hole site offset, and quantizing the offset degree through actual data to make analysis more intuitive; and then analyzing the corresponding closed edges in the upper die and the lower die of the punching composite die, constructing a corresponding characteristic point sequence through the characteristic points on each closed edge, further obtaining a matching matrix for auxiliary analysis to obtain a matching value between every two corresponding characteristic points, further obtaining the matching degree of the closed edges, wherein the calculation of the matching degree is more reasonable and accurate, hole site matching pairs are obtained based on the more accurate matching degree for analysis, the abnormal probability of the punching composite die is obtained by combining the hole site offset, the accuracy of the calculation of the abnormal probability is ensured, and the characteristics are more comprehensive through the combination analysis of the offset and the matching degree, the judgment of the surface quality is carried out according to the more accurate abnormal probability, the result is more reliable, and the accuracy is higher.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flowchart of a method for detecting the surface quality of a punching compound die based on computer vision according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a closed edge and a non-closed edge according to an embodiment of the present invention.
Detailed Description
To further illustrate the technical means and effects of the present invention adopted to achieve the predetermined objects, the following detailed description will be given to a method for detecting surface quality of a punching compound die based on computer vision according to the present invention, with reference to the accompanying drawings and preferred embodiments, and its specific implementation, structure, features and effects. In the following description, different "one embodiment" or "another embodiment" refers to not necessarily the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The method and the device are suitable for detecting the surface quality of the punching compound die, and the obtained abnormal probability is more accurate through the hole site offset of each closed edge in the corresponding gray level image of the punching compound die and the matching degree combination analysis between the corresponding hole sites of the upper die and the lower die of the punching compound die, and the surface quality based on more accurate abnormal probability analysis is more accurate.
The following describes a specific scheme of the punching compound die surface quality detection method based on computer vision in detail with reference to the accompanying drawings.
Referring to fig. 1, a flow chart of a method for detecting surface quality of a punching compound die based on computer vision according to an embodiment of the present invention is shown, the method including the following steps:
and S100, acquiring a gray image of the surface of the punching compound die.
When the punching compound die works, the quality of each hole site is the basis for ensuring normal use and production, and the quality of the punching compound die is poor due to the fact that the hole sites on the punching compound die are not matched or deformed due to the problems of mechanical devices or the errors of operators, and a large quality problem exists for produced parts, so that the surface quality of the punching compound die needs to be detected.
Considering that the CCD camera has the advantages of high sensitivity, clear imaging and no smear, the CCD camera is adopted to collect images of the punching compound die in the embodiment of the invention to obtain RGB images corresponding to the punching compound die, and the punching compound die is divided into an upper die and a lower die, so the RGB images of the punching compound die collected in the embodiment of the invention are the RGB images of the upper die and the RGB images of the lower die; in order to facilitate subsequent analysis of the image, the RGB image is processed by using a maximum method to obtain a corresponding gray-scale image, and means for obtaining the gray-scale image by using the maximum method is known in the art and is not described in detail.
In order to improve the accuracy of subsequent analysis based on the gray level image and reduce the influence of noise errors in the image, the method of gaussian filtering is used as a common means for removing noise points in the gray level image, and the method is not described in detail, and the gray level image after gaussian filtering is used for processing when the gray level image is analyzed and calculated subsequently.
Further, in order to facilitate the analysis of different color information on the surface of the counter-punching composite die, the gray level image is converted into an HSV color space to obtain a corresponding HSV image, and a brightness value corresponding to each pixel point in the gray level image can be obtained according to the HSV image; meanwhile, in order to facilitate the comparative analysis of the punching compound die, the embodiment of the invention also correspondingly obtains a standard CAD image of the punching compound die, wherein the standard CAD image comprises the standard position and the standard shape of each punching hole of the punching compound die; and the standard CAD image is consistent with the gray level image in size, and the standard CAD image is marked as a standard image for subsequent analysis.
Step S200, carrying out edge detection on the gray level image to obtain all closed edges in the gray level image; and acquiring the central point of each closed edge and the central point of each hole site in the standard image of the surface of the punching compound die, and acquiring the hole site offset according to the Euclidean distance between the central point of each closed edge and the central point of the corresponding hole site in the standard image.
In order to analyze each punched hole in the gray image on the surface of the punching composite die, the approximate position of each punched hole is firstly obtained to divide the position of each punched hole for facilitating subsequent analysis and processing, so that in the embodiment of the invention, canny operators are adopted to carry out edge detection on the gray image of the punching composite die to obtain all edge pixel points and all edge contours in the gray image, and the edge image obtained by edge detection of the gray image is a binary image only containing the edge pixel points and a black background area.
However, errors may exist in all edges in the gray-scale image detected by the Canny operator, false edge information exists, and the amount of subsequent analysis calculation is increased, so that all the edges in the gray-scale image are preliminarily screened: all hole sites on the punching compound die are generally circular and are closed-shaped areas, so that the edges corresponding to the hole sites also need to be closed edges, and all pixel points in the binary images of the edges are subjected to traversal search based on the closed edges to judge whether all the edges are closed edges or not, so that preliminary screening is completed; the method for judging the closed edge specifically comprises the following steps:
taking any edge pixel point in the binary image as a starting point, searching edge pixel points in eight neighborhood directions of the edge pixel point one by one, and assuming that the edge pixel point is reached after n times of searching
Figure 580755DEST_PATH_IMAGE004
If the edge pixel point is searched at the moment
Figure 988734DEST_PATH_IMAGE004
And the second edge pixel point traversed at the beginning of the search
Figure 876050DEST_PATH_IMAGE005
If the pixel point is the same pixel point, the edge pixel point in the n-1 searching is judged
Figure 482611DEST_PATH_IMAGE006
Whether or not to match the starting point at the time of search
Figure 662926DEST_PATH_IMAGE007
If the searched edge pixels are the same pixels, the edge pixels which are searched for at this time are shown to finally return to the edge pixels of the initial position, namely the edge formed by the edge pixels is a closed edge; referring to FIG. 2, a schematic diagram of a closed edge and a non-closed edge is shown.
By analogy, all edge pixel points in the binary image are subjected to traversal search, whether the edge formed by the edge pixel points is a closed edge is judged according to a judgment method of the closed edge, all closed edges in the binary image are obtained, and correspondingly, all closed edges in the gray image are obtained based on the positions of all the closed edges in the binary image; edges which do not meet the closed edge are regarded as false edges, edge pixel points corresponding to all the false edges are abandoned, and subsequent analysis and calculation are not participated in any more.
All closed edges in the gray level image are obtained, and each closed edge corresponds to different hole positions on the punching compound die; in the actual working process of the punching compound die, the punching compound die is possibly improperly operated when some mechanical devices are processed, so that the hole positions are damaged or deformed, the original shapes of the hole positions can be damaged, but the number of the hole positions cannot be changed, and therefore, the number of the obtained closed edges is also the number of the hole positions; all hole sites on the upper die and the lower die of the punching compound die are generally regular geometric shapes, so that the shape of the closed edge is analyzed to preliminarily judge whether the shape of each hole site on the punching compound die deviates.
Specifically, a central point of each hole site shape in the standard image obtained in step S100 is obtained, and the position of the central point is marked; the positions of the hole sites on the punching composite die are fixed, so that the hole sites are deformed in the actual working process, but the positions of the hole sites are fixedly distributed on the punching composite die, different hole sites are respectively marked in the standard image, the gray image corresponds to the position of each hole site in the standard image, the mark of each hole site in the gray image is correspondingly obtained, and therefore the positions of the central points of the shapes of all the hole sites in the obtained standard image are respectively marked as the positions of the central points
Figure 620518DEST_PATH_IMAGE008
Wherein s represents the number of hole sites in the standard image; because the number of hole sites cannot be changed, the coordinates of the center points of all the closed edges in the gray scale image are further acquired, and the coordinates of the center points of all the closed edges are respectively recorded as
Figure 45945DEST_PATH_IMAGE009
Wherein, s represents the number of all closed edges in the gray level image and is consistent with the number of hole sites in the standard image; and analyzing and calculating according to the coordinates of the center point of each closed edge and the position of the center point of each hole site in the standard image, so that the hole site offset of each closed edge with deviation is quantized, and the result is more visual.
Specifically, the method for obtaining the hole site offset of each closed edge comprises the following steps:
considering that the hole site represented by the punching composite die is regular in shape, the circular hole site is defaulted in the embodiment of the invention, so that when a technician operates improperly or the parameters of a processing device set error in the processing and manufacturing process, the surface of the punching composite die is subjected to high-strength mechanical external force, rigid deformation occurs, and the deformed position has great influence on the hole site on the surface of the punching composite die; when the hole position deforms, the hole position can generate large deformation offset in different directions, so that straight lines in different directions are constructed by passing through the center point of each closed edge, the direction in the embodiment of the invention is that every 1 degree in 360 degrees is one direction, 360 straight lines are obtained according to the center point, two intersection points exist between each straight line and the closed edge, the length of a line segment between every two intersection points is obtained, the length of the line segment in the embodiment of the invention is also the Euclidean distance between the two intersection points, the maximum value and the minimum value of the lengths of the line segments corresponding to the straight lines in all directions are selected, the offset factor of the closed edge is judged according to the difference between the maximum value and the minimum value, and the calculation method of the offset factor comprises the following steps:
Figure 507013DEST_PATH_IMAGE010
wherein, the first and the second end of the pipe are connected with each other,
Figure DEST_PATH_IMAGE011
is shown as
Figure 61491DEST_PATH_IMAGE012
Deviation of individual closure edges;
Figure 979814DEST_PATH_IMAGE013
the length of a line segment in the 1 st direction corresponding to the central point is represented;
Figure 645150DEST_PATH_IMAGE014
representing the length of the line segment in the 360 th direction corresponding to the central point;
Figure 226304DEST_PATH_IMAGE015
represents a maximum function;
Figure 249886DEST_PATH_IMAGE016
represents a minimum function;
Figure 713229DEST_PATH_IMAGE017
is shown as
Figure 182256DEST_PATH_IMAGE012
The perimeter of each closed edge and the perimeter acquisition are known technologies, which are not described in detail, and the deviation of each closed edge is uniformly quantified by the perimeter.
By analogy, the offset factor corresponding to each closed edge is obtained, and the larger the difference between line segments formed by intersection points of straight lines constructed by the center points of the closed edges and the closed edges is, the larger the difference of the shapes of the closed edges is, the larger the deviation degree from the circular shape is, the larger the corresponding offset factor is, and the smaller the regularity of the shapes corresponding to the closed edges is.
Further, calculating the difference between the coordinates of the center point of the closed edge and the position of the center point of the corresponding hole site in the standard image, wherein the larger the difference is, the shape difference between the shape of the closed edge and the shape of the corresponding hole site in the standard image is, and the Euclidean distance between the coordinates of the center point of the closed edge and the position of the center point of the corresponding hole site in the standard image is taken as the measurement of the difference, and the calculation of the Euclidean distance is a common means and is not described in detail; will be first
Figure 617917DEST_PATH_IMAGE012
Coordinates of the center point of each closed edge and the corresponding hole in the standard imageThe Euclidean distance between the positions of the center points of the bits is recorded as
Figure 77979DEST_PATH_IMAGE018
Then according to the first
Figure 966301DEST_PATH_IMAGE012
Obtaining the offset factor of each closed edge and the Euclidean distance between the coordinate of the central point of the closed edge and the central point position of the corresponding hole position in the standard image
Figure 35757DEST_PATH_IMAGE012
Hole site offset for each closed edge, calculated as:
Figure 591503DEST_PATH_IMAGE019
wherein, the first and the second end of the pipe are connected with each other,
Figure 222467DEST_PATH_IMAGE020
is shown as
Figure 598084DEST_PATH_IMAGE012
Hole site offset of each closed edge;
Figure 205652DEST_PATH_IMAGE011
denotes the first
Figure 615905DEST_PATH_IMAGE012
An offset factor for each closed edge;
Figure 417770DEST_PATH_IMAGE018
denotes the first
Figure 483946DEST_PATH_IMAGE012
Coordinates of the center point of each closed edge
Figure DEST_PATH_IMAGE021
The position of the central point of the corresponding hole site in the standard image
Figure 832888DEST_PATH_IMAGE022
The euclidean distance between them.
The larger the offset factor of the closed edge is, and the larger the Euclidean distance between the closed edge and the central point between the corresponding hole sites in the standard image is, the larger the shape deformation degree and the offset degree of the closed edge are, and the more serious the hole site deformation is, so the larger the hole site offset corresponding to the closed edge is.
Step S300, respectively acquiring closed boundary images of an upper die and a lower die of the punching compound die, and respectively performing characteristic point analysis on corresponding closed edges in the closed boundary images of the upper die and the lower die to obtain a first characteristic point sequence and a second characteristic point sequence; and obtaining a matching matrix according to the first characteristic point sequence and the second characteristic point sequence, obtaining a matching value between the first characteristic point and the second characteristic point based on the matching matrix, and obtaining the matching degree between the corresponding closed edges according to the matching value.
In the process of machining mechanical parts by using the punching compound die, a coarse material to be machined is generally placed between an upper die and a lower die of the punching compound die, and then is subjected to stamping forging on a punch press; therefore, the hole site matching between the upper die and the lower die of the punching compound die has a great influence on parts in the processing process, when the hole site is deformed due to mechanical external force, the hole site between the corresponding upper die and the corresponding lower die may not be complete or have poor shape consistency, the quality of processing by using the punching compound die at the moment cannot be guaranteed, and therefore, the corresponding analysis needs to be performed on the closed edges in the upper die and the lower die of the punching compound die.
Since the grayscale images acquired in step S100 include the grayscale images of the upper die and the lower die of the stamping compound die, the closed boundary image of the grayscale image of the upper die and the closed boundary image of the grayscale image of the lower die, which are the images marked with all the closed edges, can be obtained based on the same method as in step S200; the standard image also includes a standard image of the upper mold and a standard image of the lower mold, and the standard image includes a mark for each hole position, it should be noted thatThe upper die and the lower die are correspondingly matched in the working process, so that the mark of each hole position of the upper die and the mark of the same hole position of the lower die in the standard image are correspondingly matched, and the mark of each closed edge in the upper die is obtained according to the mark of each hole position in the standard image of the upper die and recorded as
Figure 582800DEST_PATH_IMAGE023
Correspondingly, the corresponding mark number of each hole position in the lower die is obtained according to the mark number of each hole position in the standard image of the lower die
Figure 804834DEST_PATH_IMAGE024
Closing edge
Figure 404311DEST_PATH_IMAGE025
And closing edge
Figure 369993DEST_PATH_IMAGE026
A closed edge corresponding to the matched hole site; the characteristic shapes of the matched closed edges are analyzed to determine the correlation matching degree between the two closed edges at the moment, and whether the hole positions corresponding to the two closed edges can be well matched or not is further analyzed to work.
Specifically, feature point analysis is performed on each closed edge in the closed boundary image corresponding to the upper die to obtain feature points of the closed edge, and the feature points corresponding to each closed edge in the closed boundary image corresponding to the upper die form a first feature point sequence; correspondingly, analyzing the characteristic points of each closed edge in the closed boundary image corresponding to the lower die to obtain the characteristic points of the closed edge, and forming a second characteristic point sequence by the characteristic points corresponding to each closed edge in the closed boundary image corresponding to the lower die; in the method for extracting the feature points in the embodiment of the invention, the existing SURF algorithm is adopted, and different feature point extraction methods can be selected in other embodiments, so that a first feature point sequence of each closed edge in the closed boundary image of the upper die and a second feature point sequence of each closed edge in the closed boundary image of the lower die are obtained.
When the upper die and the lower die are normally matched to work, a certain relationship exists between the hole sites of the upper die and the hole sites of the lower die, for example, the hole sites of the upper die and the hole sites of the lower die are equal or are enlarged and reduced in equal proportion, so that a corresponding relationship exists between the hole sites of the upper die and the hole sites of the lower die, and the matching degree between the hole sites of the upper die and the hole sites of the lower die is analyzed based on the relationship between the corresponding hole sites of the upper die and the lower die, namely the matching degree between the closed edge in the closed boundary image of the upper die and the corresponding closed edge in the closed boundary image of the lower die is analyzed.
Closed edges in the closed boundary image of the above mold
Figure 505571DEST_PATH_IMAGE025
Closed edge in closed boundary image with lower die
Figure 632927DEST_PATH_IMAGE026
For example, assume a closed edge
Figure 719700DEST_PATH_IMAGE025
The corresponding first characteristic point sequence is
Figure 177489DEST_PATH_IMAGE027
Wherein, in the process,
Figure 416840DEST_PATH_IMAGE028
indicating a closed edge
Figure 964365DEST_PATH_IMAGE025
The first 1 st feature point is set as the feature point,
Figure 289167DEST_PATH_IMAGE029
indicating a closed edge
Figure 359103DEST_PATH_IMAGE025
Go to the first
Figure 187382DEST_PATH_IMAGE030
The number of the characteristic points is one,
Figure 436966DEST_PATH_IMAGE030
to close the edge
Figure 983485DEST_PATH_IMAGE025
The number of all the characteristic points; closure edge
Figure 845393DEST_PATH_IMAGE026
The corresponding second characteristic point sequence is
Figure 793758DEST_PATH_IMAGE031
Wherein, in the step (A),
Figure 948664DEST_PATH_IMAGE032
indicating a closed edge
Figure 982479DEST_PATH_IMAGE026
The first 1 st characteristic point is set as the characteristic point,
Figure 585761DEST_PATH_IMAGE033
indicating a closed edge
Figure 388632DEST_PATH_IMAGE026
To go to
Figure 714440DEST_PATH_IMAGE034
The number of the characteristic points is one,
Figure 235551DEST_PATH_IMAGE034
indicating a closed edge
Figure 173683DEST_PATH_IMAGE026
The number of all the characteristic points; if the surface of the punching compound die is normal, the closed edge of the upper die
Figure 96639DEST_PATH_IMAGE025
Closing edge with lower die
Figure 593349DEST_PATH_IMAGE026
There must be a corresponding relationship between them, then use the closed edgeThe characteristic point sequence corresponding to the edge is expressed, namely the closed edge
Figure 601756DEST_PATH_IMAGE025
First feature point sequence and closed edge of
Figure 343578DEST_PATH_IMAGE026
The following affine transformation relationship exists between the second feature point sequences:
Figure 121041DEST_PATH_IMAGE035
wherein the content of the first and second substances,
Figure 788652DEST_PATH_IMAGE036
indicating a closed edge
Figure 284355DEST_PATH_IMAGE025
The first sequence of feature points of (1);
Figure 829868DEST_PATH_IMAGE037
indicating a closed edge
Figure 461838DEST_PATH_IMAGE026
The second feature point sequence of (1);
Figure 503612DEST_PATH_IMAGE038
a matching matrix is represented.
It should be noted that, in the embodiment of the present invention, analyzing the feature points is based on the coordinate information of the feature points, and a matching matrix is set in the embodiment of the present invention
Figure 237344DEST_PATH_IMAGE038
Is 3 x 3, then the matrix is matched
Figure 835816DEST_PATH_IMAGE038
Can be expressed as:
Figure 571559DEST_PATH_IMAGE039
wherein the matching matrix
Figure 800547DEST_PATH_IMAGE038
9 elements of
Figure 21575DEST_PATH_IMAGE040
Respectively, represent the matching coefficients.
Then, each matching coefficient in the matching matrix needs to be obtained by fitting, F first characteristic points and F second characteristic points are correspondingly selected from the first characteristic point sequence and the second characteristic point sequence, and F is a positive integer; and respectively constructing a first matrix and a second matrix by using the F first characteristic points and the F second characteristic points, taking a multiplication result of the matching matrix and the first matrix as the second matrix, and obtaining each element in the matching matrix based on matrix operation.
In the embodiment of the invention, the coordinate positions of continuous 9 characteristic points in the first characteristic point sequence and the second characteristic point sequence are respectively selected to form a first matrix and a second matrix, and corresponding matching matrixes are obtained based on the first matrix and the second matrix
Figure 158158DEST_PATH_IMAGE038
For each matching coefficient, the specific calculation method is matrix operation in mathematics, and is not repeated; and obtaining each matching coefficient in the matching matrix according to the first matrix corresponding to the first characteristic point sequence and the second matrix corresponding to the second characteristic sequence.
Then, a closed edge may be calculated based on the matching matrix
Figure 748408DEST_PATH_IMAGE025
And closing edge
Figure 945034DEST_PATH_IMAGE026
The matching degree between the first characteristic point and the second characteristic point is based on the matching matrix and the coordinate construction mapping coefficient of the first characteristic point, a first ratio of the abscissa and the ordinate of the second characteristic point is obtained, and the brightness value of the first characteristic point and the brightness of the second characteristic point are obtainedAnd obtaining a matching value between the first characteristic point and the second characteristic point by the product of the first ratio, the second ratio and the mapping coefficient. Judging whether the matching value of the first feature point and the corresponding second feature point is within a preset matching range, if so, successfully matching the first feature point with the second feature point; and calculating the cumulative sum of the matching values between the first feature points and the second feature points which are successfully matched on the corresponding closed edges, and normalizing the cumulative sum to obtain the matching degree between the corresponding closed edges.
First calculate the closure edge
Figure 579323DEST_PATH_IMAGE025
And closing edge
Figure 503285DEST_PATH_IMAGE026
Matching values between corresponding feature points, and obtaining a closed edge by summing the matching values between a plurality of pairs of successfully matched feature points
Figure 964354DEST_PATH_IMAGE025
And closing edge
Figure 82613DEST_PATH_IMAGE026
The matching degree between the characteristic points and the matching value between the characteristic points are calculated according to the following formula:
Figure 996343DEST_PATH_IMAGE041
wherein, the first and the second end of the pipe are connected with each other,
Figure 989575DEST_PATH_IMAGE042
indicating the closing edge of the upper moulds
Figure 570729DEST_PATH_IMAGE025
Middle first characteristic point
Figure DEST_PATH_IMAGE043
Closing edge with lower die
Figure 531994DEST_PATH_IMAGE026
Middle second characteristic point
Figure 447867DEST_PATH_IMAGE044
A match value therebetween;
Figure 464364DEST_PATH_IMAGE045
first characteristic point of upper mold
Figure 650757DEST_PATH_IMAGE043
The brightness value of (a);
Figure 94508DEST_PATH_IMAGE046
second characteristic point of lower die
Figure 497676DEST_PATH_IMAGE044
The brightness value of (a);
Figure 317865DEST_PATH_IMAGE002
first characteristic point of upper mold
Figure 358764DEST_PATH_IMAGE043
The position coordinates of (a);
Figure 442258DEST_PATH_IMAGE047
second characteristic point of lower die
Figure 67143DEST_PATH_IMAGE044
The position coordinates of (a);
Figure 425443DEST_PATH_IMAGE003
respectively, represent the matching coefficients in the matching matrix.
The brightness values of the positions of the pixel points on the punching compound die are consistent, and when the punching compound die is worn or deformed, the color characteristics are different, so that the difference of the color characteristics is reflected by the ratio of the brightness values of the characteristic points, namely the second ratio
Figure 586429DEST_PATH_IMAGE048
The closer the value of (1) is, the closer the color characteristic between the two characteristic points is; from the affine transformation relationship between the first feature point and the second feature point, the coordinates of the first feature point are found
Figure 371982DEST_PATH_IMAGE002
And coordinates of the second feature point
Figure 484163DEST_PATH_IMAGE047
If the first feature point corresponds to the second feature point, the coordinate relationship between the feature points should conform to the affine transformation relationship, and in order to conform to the operation between the matrices, the coordinate vector is set
Figure 646154DEST_PATH_IMAGE002
And
Figure 661646DEST_PATH_IMAGE047
respectively complementing 0 and transposing to obtain the coordinate matrix of the first characteristic point
Figure 883680DEST_PATH_IMAGE049
And a coordinate matrix of the second feature point
Figure 483157DEST_PATH_IMAGE050
The transposition process is the prior known technology and is not described again; then the coordinate matrix for the first feature point
Figure 183260DEST_PATH_IMAGE049
And a coordinate matrix of the second feature point
Figure 53258DEST_PATH_IMAGE050
It should satisfy:
Figure 446194DEST_PATH_IMAGE051
then, according to the calculation principle of the matrix, it can be deduced that:
Figure 532967DEST_PATH_IMAGE052
Figure 36761DEST_PATH_IMAGE053
(ii) a Thus, the product of the first ratio and the mapping coefficient in the matching value calculation formula
Figure 772984DEST_PATH_IMAGE054
When the value of (A) is 1, that is to say
Figure 336821DEST_PATH_IMAGE052
Figure 707628DEST_PATH_IMAGE053
Two equalities hold, then
Figure 952796DEST_PATH_IMAGE055
When the matching value is calculated
Figure 797386DEST_PATH_IMAGE054
The larger the difference between the value of (1) and (1), the more dissimilar and unmatched the features between the two feature points.
By analogy, a matching value between feature points in the corresponding closed edge in the closed boundary image of the upper die and the closed boundary image of the lower die is obtained, the larger the matching value is, the more likely the two feature points are to be corresponding feature points and the more similar the feature information is, for more intuitive analysis, a matching range is set in the embodiment, and when the matching value between the two feature points is
Figure 532124DEST_PATH_IMAGE056
When the matching range is within the matching range, the matching of the two feature points is successful, and as a preferred example, the matching range is set as
Figure DEST_PATH_IMAGE057
Counting the number of all successfully matched feature points between the two closed edges, and accumulating the matching values of all successfully matched feature points to obtain the matching degree between the corresponding closed edges, namely the matching degree between the corresponding hole positions of the upper die and the lower die; in order to facilitate subsequent analysis and quantification, the matching degree is subjected to normalization processing, and the normalization processing method is the existing means and is not explained; the lower the matching degree is, the more difficult the matching work among hole positions is, and the more possible problems occur to the quality of the punching compound die; therefore, in the embodiment of the present invention, the hole locations with the matching degree greater than the preset threshold are recorded as successful matching hole locations, that is, the matching edge pair is obtained according to the matching degree between the closing edge of the upper die and the closing edge of the corresponding lower die, and the two successfully matched closing edges are one matching edge pair.
As a preferable example, the preset threshold value is set to 0.8 in the embodiment of the present invention.
S400, obtaining all hole site matching pairs in the upper die and the lower die according to the matching degree; and counting the number of all hole site matching pairs in the upper die and the lower die to obtain the abnormal probability of the punching composite die, and judging the quality based on the abnormal probability.
In step S300, the matching degree of the closed edge in the closed boundary image corresponding to the upper die and the closed edge in the closed boundary image corresponding to the lower die is obtained, and a plurality of groups of matched edge pairs are correspondingly obtained, where each group of matched edge pairs is also a group of hole site matched pairs, and the quality condition of the hole punching composite die is further analyzed according to all the hole site matched pairs.
Acquiring the number of all unmatched feature points on two closed edges in each hole site matching pair and the sum of the number of all feature points on two closed edges in each hole site matching pair, and taking the ratio result of the number of all unmatched feature points on the two closed edges and the sum of the number of all feature points on the two closed edges as an unmatched ratio; calculating the product result between the unmatched ratio and the reciprocal of the matching degree of the hole site matching pairs, wherein the sum of the product results corresponding to all the hole site matching pairs is an abnormal factor; and acquiring the sum of hole site offsets of all closed edges in all hole site matching pairs, calculating the product of the sum of the hole site offsets and the abnormal factor, and performing normalization processing to obtain the abnormal probability.
Specifically, the number of the feature points which are not successfully matched on each closed edge in all hole site matching pairs of the punching compound die is counted, and the number of the first feature points which are not successfully matched on the closed edge corresponding to the upper die in the hole site matching pairs is recorded as the number
Figure 265594DEST_PATH_IMAGE058
Correspondingly, the number of the second feature points of the corresponding closing edge of the lower die which are not successfully matched is recorded as
Figure 127501DEST_PATH_IMAGE059
Then, obtaining an abnormal factor according to the number of all the feature points which are not successfully matched in all the hole site matching pairs in the upper die and the lower die and the matching degree corresponding to the hole site matching, wherein the abnormal factor is specifically calculated as follows:
Figure 75866DEST_PATH_IMAGE060
wherein the content of the first and second substances,
Figure 230773DEST_PATH_IMAGE061
representing abnormal factors of the punching compound die;
Figure 530167DEST_PATH_IMAGE062
is shown as
Figure 664607DEST_PATH_IMAGE063
Matching degree of the hole position matching pairs;
Figure 185587DEST_PATH_IMAGE064
denotes the first
Figure 262128DEST_PATH_IMAGE063
The number of the first feature points which are not successfully matched on the upper die by the group hole position matching pair;
Figure 533971DEST_PATH_IMAGE065
is shown as
Figure 721370DEST_PATH_IMAGE063
The number of the second characteristic points of the group hole position matching pair which are not successfully matched on the lower die is larger than the number of the second characteristic points;
Figure 893594DEST_PATH_IMAGE030
representing the quantity of the first characteristic points of the hole site matching pairs on the upper die;
Figure 406615DEST_PATH_IMAGE034
representing the number of second characteristic points of the hole position matching pairs on the lower die;
Figure 165755DEST_PATH_IMAGE066
the number of all hole site matching pairs on the punching compound die is shown.
Figure DEST_PATH_IMAGE067
The larger the value of (A) is, the smaller the matching degree of the hole site matching pair is, the smaller the matching degree between two hole sites is, and the quality problem possibly exists, so the larger the corresponding abnormal factor is;
Figure 343796DEST_PATH_IMAGE068
the larger the value of (2) is, the more the number of feature points which are not successfully matched in the two corresponding hole sites is, although the matching degree meets a preset threshold value, the difference between the actual hole sites still possibly exists, and therefore the larger the abnormal factor is.
Further, the relative offset of the punching compound die is obtained according to the hole site offset of each closed edge, for convenience of analysis, the relative offset is obtained only according to the hole site offset of the hole site matching pair successfully matched in the embodiment of the invention, and the specific relative offset is calculated as follows:
Figure 121259DEST_PATH_IMAGE069
wherein the content of the first and second substances,
Figure 290334DEST_PATH_IMAGE070
representing the relative offset of the punching compound die;
Figure 520458DEST_PATH_IMAGE066
representing the number of hole site matching pairs of an upper die and a lower die of the punching compound die;
Figure 298927DEST_PATH_IMAGE020
denotes the first
Figure 196476DEST_PATH_IMAGE012
Hole site offset of each closure edge.
When the relative offset corresponding to the punching compound die is larger, the larger the hole site offset corresponding to each closed edge is, the larger the hole site offset is, the larger the deformation condition of the closed edge is, and the worse the quality is, so that the larger the relative offset of the punching compound die is, the worse the quality of the punching compound die is.
According to the relative offset and the abnormal factor of the punching compound die, the quality evaluation index of the punching compound die is constructed, in the embodiment of the invention, the abnormal probability is used as the basis of quality evaluation, and the calculation method of the abnormal probability comprises the following steps:
Figure 536453DEST_PATH_IMAGE071
wherein, the first and the second end of the pipe are connected with each other,
Figure 519452DEST_PATH_IMAGE072
representing the abnormal probability of the punching compound die;
Figure 101612DEST_PATH_IMAGE061
representing an anomaly factor;
Figure 588088DEST_PATH_IMAGE070
represents a relative offset;
Figure 352827DEST_PATH_IMAGE073
expressing a range normalization function in order to make the result of the anomaly probability
Figure 557543DEST_PATH_IMAGE074
The larger the abnormal factor is, the worse the quality of the corresponding punching compound die is, the larger the relative offset is, the more serious the deformation of the punching compound die is, and the worse the quality is, so that the larger the value of the abnormal probability is, the worse the quality of the punching compound die is, and the existence of defects of the punching compound die is judged; in the embodiment of the invention, an abnormal threshold value is set for judgment, and when the abnormal probability is greater than the abnormal threshold value, the quality of the punching compound die is judged to be poor; as a preferable example, the abnormality threshold value is set to take an empirical value of 0.85 in the present embodiment.
In summary, in the embodiment of the present invention, the gray image of the surface of the punching compound die is obtained; carrying out edge detection on the gray level image to obtain all closed edges in the gray level image; acquiring the central point of each closed edge and the central point of each hole site in a standard image of the surface of the punching compound die, and acquiring the hole site offset according to the Euclidean distance between the central point of each closed edge and the central point of the corresponding hole site in the standard image; respectively acquiring closed boundary images of an upper die and a lower die of the punching composite die, and respectively performing characteristic point analysis on corresponding closed edges in the closed boundary images of the upper die and the lower die to obtain a first characteristic point sequence and a second characteristic point sequence; acquiring a matching matrix according to the first characteristic point sequence and the second characteristic point sequence, acquiring a matching value between the first characteristic point and the second characteristic point based on the matching matrix, and acquiring a matching degree between corresponding closed edges according to the matching value; obtaining all hole site matching pairs in the upper die and the lower die according to the matching degree; and counting the number of all hole site matching pairs in the upper die and the lower die to obtain the abnormal probability of the punching composite die, and performing quality judgment based on the abnormal probability to improve the accuracy of surface quality detection of the punching composite die.
It should be noted that: the sequence of the above embodiments of the present invention is only for description, and does not represent the advantages or disadvantages of the embodiments. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that are within the spirit of the present invention are intended to be included therein.

Claims (6)

1. A punching compound die surface quality detection method based on computer vision is characterized by comprising the following steps:
acquiring a gray image of the surface of the punching compound die;
performing edge detection on the gray level image to obtain all closed edges in the gray level image; acquiring the central point of each closed edge and the central point of each hole site in a standard image of the surface of the punching compound die, and acquiring hole site offset according to the Euclidean distance between the central point of each closed edge and the central point of the corresponding hole site in the standard image;
respectively acquiring closed boundary images of an upper die and a lower die of the punching composite die, and respectively performing characteristic point analysis on corresponding closed edges in the closed boundary images of the upper die and the lower die to obtain a first characteristic point sequence and a second characteristic point sequence; acquiring a matching matrix according to the first characteristic point sequence and the second characteristic point sequence, acquiring a matching value between the first characteristic point and the second characteristic point based on the matching matrix, and acquiring a matching degree between corresponding closed edges according to the matching value;
obtaining all hole site matching pairs in the upper die and the lower die according to the matching degree; counting the number of all hole site matching pairs in the upper die and the lower die to obtain the abnormal probability of the punching composite die, and judging the quality based on the abnormal probability;
the step of obtaining a matching value between the first feature point and the second feature point based on the matching matrix includes:
acquiring an HSV image corresponding to the gray image, and acquiring the brightness value of each pixel point based on the HSV image;
constructing a mapping coefficient based on the matching matrix and the coordinate of the first characteristic point, obtaining a first ratio of the abscissa and the ordinate of the second characteristic point and a second ratio of the brightness value of the first characteristic point and the brightness value of the second characteristic point, and obtaining a matching value between the first characteristic point and the second characteristic point by the product of the first ratio, the second ratio and the mapping coefficient;
the step of obtaining the matching degree between the corresponding closed edges according to the matching value comprises the following steps:
judging whether the matching value of the first feature point and the corresponding second feature point is within a preset matching range, if so, successfully matching the first feature point and the second feature point;
calculating the cumulative sum of matching values between all successfully matched first feature points and second feature points on the corresponding closed edges, and normalizing the cumulative sum to obtain the matching degree between the corresponding closed edges;
the step of obtaining the hole site offset according to the Euclidean distance between the central point of each closed edge and the central point of the corresponding hole site in the standard image comprises the following steps:
straight lines in different directions are constructed through the center point of the closed edge, each straight line and the closed edge are intersected at two points to form a corresponding line segment, and the length of the line segment formed by the straight lines in different directions is obtained;
selecting the maximum value and the minimum value of the lengths of all line segments, and obtaining an offset factor according to the difference value of the maximum value and the minimum value, wherein the offset factor and the difference value are in positive correlation;
taking the product of the Euclidean distance between the central point of the closed edge and the central point of the corresponding hole site in the standard image and the offset factor as the hole site offset of the closed edge;
the step of counting the number of all the hole site matching pairs in the upper die and the lower die to obtain the abnormal probability of the punching compound die comprises the following steps:
acquiring the number of all unmatched feature points on the two closed edges in each hole position matching pair and the sum of the number of all feature points on the two closed edges in the hole position matching pair, and taking the ratio result of the number of all unmatched feature points on the two closed edges and the sum of the number of all feature points on the two closed edges as an unmatched ratio;
calculating the product result between the unmatched ratio and the reciprocal of the matching degree of the hole site matching pairs, wherein the sum of the product results corresponding to all the hole site matching pairs is an abnormal factor;
and acquiring the sum of hole site offsets of all closed edges in all the hole site matching pairs, calculating the product of the sum of the hole site offsets and the abnormal factor, and performing normalization processing to obtain the abnormal probability.
2. The method for detecting the surface quality of the punching compound die based on the computer vision as claimed in the claim 1, wherein the step of obtaining the matching matrix according to the first characteristic point sequence and the second characteristic point sequence comprises:
correspondingly selecting F first characteristic points and second characteristic points from the first characteristic point sequence and the second characteristic point sequence, wherein F is a positive integer;
and respectively constructing a first matrix and a second matrix by using the F first characteristic points and the F second characteristic points, taking a multiplication result of the matching matrix and the first matrix as the second matrix, and obtaining each element in the matching matrix based on matrix operation.
3. A method as claimed in claim 2, wherein the step of constructing mapping coefficients based on the matching matrix and the coordinates of the first feature point comprises:
the expression of the mapping coefficient is:
Figure 998974DEST_PATH_IMAGE002
wherein, the first and the second end of the pipe are connected with each other,
Figure DEST_PATH_IMAGE003
coordinates representing the first feature point;
Figure 965049DEST_PATH_IMAGE004
respectively representing elements in the matching matrix.
4. The method for detecting the surface quality of the punching compound die based on the computer vision as claimed in claim 1, wherein the step of performing the quality judgment based on the abnormal probability comprises:
and when the abnormal probability is greater than a preset abnormal threshold value, the surface quality of the punching compound die is poor.
5. A computer vision based method for inspecting surface quality of a punching compound die according to claim 1, characterized in that the step of obtaining all closed edges in the gray scale image comprises:
traversing search is carried out on each edge pixel point in the gray level image, and the traversing search direction is the eight neighborhood direction of the edge pixel point;
when the edge pixel point of the nth traversal search and the edge pixel point of the second traversal search are the same pixel point, and the edge pixel point of the n-1 traversal search and the edge pixel point of the first traversal search are also the same pixel point, the edge of the traversal search is a closed edge; wherein n is a positive integer.
6. A computer vision based method for inspecting the surface quality of a punching compound die according to claim 1, characterized in that the closed boundary image is an image including all closed edges.
CN202211420216.4A 2022-11-15 2022-11-15 Punching compound die surface quality detection method based on computer vision Active CN115511884B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211420216.4A CN115511884B (en) 2022-11-15 2022-11-15 Punching compound die surface quality detection method based on computer vision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211420216.4A CN115511884B (en) 2022-11-15 2022-11-15 Punching compound die surface quality detection method based on computer vision

Publications (2)

Publication Number Publication Date
CN115511884A CN115511884A (en) 2022-12-23
CN115511884B true CN115511884B (en) 2023-03-07

Family

ID=84514595

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211420216.4A Active CN115511884B (en) 2022-11-15 2022-11-15 Punching compound die surface quality detection method based on computer vision

Country Status (1)

Country Link
CN (1) CN115511884B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116503413B (en) * 2023-06-29 2023-09-08 常熟林芝电子技术有限公司 Filament quality intelligent detection method based on computer vision

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115294338A (en) * 2022-09-29 2022-11-04 中威泵业(江苏)有限公司 Impeller surface defect identification method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111062927A (en) * 2019-12-18 2020-04-24 广东电网有限责任公司 Method, system and equipment for detecting image quality of unmanned aerial vehicle
CN112466404B (en) * 2020-12-14 2024-02-02 浙江师范大学 Metagenome contig unsupervised clustering method and system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115294338A (en) * 2022-09-29 2022-11-04 中威泵业(江苏)有限公司 Impeller surface defect identification method

Also Published As

Publication number Publication date
CN115511884A (en) 2022-12-23

Similar Documents

Publication Publication Date Title
CN109087274B (en) Electronic device defect detection method and device based on multi-dimensional fusion and semantic segmentation
CN115345885B (en) Appearance quality detection method for metal fitness equipment
CN112330628A (en) Metal workpiece surface defect image detection method
CN114820773B (en) Silo transport vehicle carriage position detection method based on computer vision
CN107085846A (en) Surface Flaw image-recognizing method
CN109658391B (en) Circle radius measuring method based on contour merging and convex hull fitting
CN114549981A (en) Intelligent inspection pointer type instrument recognition and reading method based on deep learning
CN113793337B (en) Locomotive accessory surface abnormal degree evaluation method based on artificial intelligence
CN115511884B (en) Punching compound die surface quality detection method based on computer vision
CN116758067B (en) Metal structural member detection method based on feature matching
CN113256624A (en) Continuous casting round billet defect detection method and device, electronic equipment and readable storage medium
CN115272336A (en) Metal part defect accurate detection method based on gradient vector
CN115272350A (en) Method for detecting production quality of computer PCB mainboard
CN115018835A (en) Automobile starter gear detection method
CN117314901B (en) Scale-adaptive chip detection neural network system
CN111539951B (en) Visual detection method for outline size of ceramic grinding wheel head
CN113643290B (en) Straw counting method and device based on image processing and storage medium
CN116823708A (en) PC component side mold identification and positioning research based on machine vision
CN115311287A (en) Method for detecting production abnormity of common rail oil injector
CN113020428B (en) Progressive die machining monitoring method, device, equipment and storage medium
CN115471684A (en) Injection molding workpiece template matching method, electronic equipment and storage medium
CN110827272B (en) Tire X-ray image defect detection method based on image processing
CN114266748A (en) Method and device for judging integrity of surface of process plate in rail transit maintenance field
CN111854617A (en) Micro drill bit size detection method based on machine vision
CN114897827B (en) Tobacco leaf packing box state detection method based on machine vision

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