CN108765378B - Machine vision detection method for workpiece contour flash bulge under guidance of G code - Google Patents

Machine vision detection method for workpiece contour flash bulge under guidance of G code Download PDF

Info

Publication number
CN108765378B
CN108765378B CN201810426396.4A CN201810426396A CN108765378B CN 108765378 B CN108765378 B CN 108765378B CN 201810426396 A CN201810426396 A CN 201810426396A CN 108765378 B CN108765378 B CN 108765378B
Authority
CN
China
Prior art keywords
flash
bulge
workpiece
point
contour
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
CN201810426396.4A
Other languages
Chinese (zh)
Other versions
CN108765378A (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.)
Puwanini Intelligent Equipment Co ltd
Original Assignee
University of Shanghai for Science and Technology
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 University of Shanghai for Science and Technology filed Critical University of Shanghai for Science and Technology
Priority to CN201810426396.4A priority Critical patent/CN108765378B/en
Publication of CN108765378A publication Critical patent/CN108765378A/en
Application granted granted Critical
Publication of CN108765378B publication Critical patent/CN108765378B/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
    • G06T7/0006Industrial image inspection using a design-rule based approach
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/60Rotation of whole images or parts thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Geometry (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The invention relates to a machine vision detection method for workpiece contour flash bulge based on G code guidance, which specifically aims to detect the workpiece contour flash bulge and comprises the following steps: analyzing and reasoning the relation of the conversion between the workpiece coordinates and the image coordinates; using the G code contour as a guide, extracting an image region of interest by combining a coordinate conversion relation, and obtaining the contour edge of the workpiece by adopting processing methods of median filtering, image binarization and edge detection on the extracted region of interest; and identifying and judging the edge bulge by taking the standard G code contour as a reference, and surrounding the contour edge bulge by adopting a minimum external rectangle method to realize the visual detection of the contour edge bulge. The method for detecting the workpiece contour flash and bulge machine vision can effectively identify the starting point, the end point and the height information of the workpiece contour flash and bulge characteristic section.

Description

Machine vision detection method for workpiece contour flash bulge under guidance of G code
Technical Field
The invention relates to a machine vision detection method, in particular to a machine vision detection method for a workpiece contour flash bulge
Background
Profile flash is inevitably generated during the manufacturing process of mechanical parts, which includes a material plastically deformed during cutting, an abnormal protrusion of a cast-forged piece, a remnant extruded by welding, and the like. The existence of the contour flash has adverse effects on the aspects of appearance quality, machining precision, assembly precision and the like of a workpiece, so that the stability and reliability of a mechanical system are reduced, and therefore, the flash removing bulge is particularly important in the machining and manufacturing processes of mechanical parts, but the premise of the flash removing is to detect and position the flash firstly. At present, the method for detecting the flash mainly utilizes a vernier caliper and a flat micrometer to measure the flash or roughly positions the flash by naked eyes, but the flash bulge has diversity and randomness, so that the manual detection is difficult to accurately position, and the detection efficiency is low. Therefore, much attention has been paid to the research on automated equipment for improving the accuracy and efficiency of detection of the flash protrusion.
The abnormal points of the workpiece outline are basic constituent units of the flash protrusion of the workpiece outline, and experts and scholars at home and abroad make more researches on the abnormal point detection of the flash protrusion, and the researches are mainly divided into two types. The first category is parametric methods, which are primarily directed to linear profile models or to profile models that can be fitted to simple non-linear combinations. The second category is non-parametric methods, which are mainly directed to stochastic complex non-linear profile models. The above-mentioned research on contour curve anomaly point detection is based on an anomaly point detection method of statistical distribution, which assumes a distribution or probability model for a data set to be detected, and then performs anomaly point detection by using an incoordination test. However, in the actual detection of the abnormal points of the flash protrusions, the abnormal points have random diversity and cannot meet the distribution or probability model assumed by the detection method, so that the abnormal point detection method based on statistical distribution has certain limitation when being applied to the detection of the abnormal points of the flash of the workpiece profile.
The invention uses the existing G code of the workpiece as the self property of the object, applies the point-to-straight line neighbor relation, and carries out contour flash bulge positioning and measurement on the workpiece. The method comprises the steps of firstly reasoning the relation of conversion between a workpiece coordinate and an image coordinate, extracting an image region of interest by taking a G code contour as a guide and combining the coordinate conversion relation, and obtaining the contour edge of the workpiece by adopting methods of median filtering, image binarization and edge detection on the extracted region of interest. And finally, recognizing and judging the edge bulge by taking the standard G code contour as a reference, and surrounding the contour edge bulge by using a minimum external rectangle to realize the visual detection of the contour edge bulge. The machine vision detection method is provided for detecting the flash bulge of the workpiece contour.
Disclosure of Invention
The invention aims to solve the technical problems and provide a machine vision detection method for workpiece contour flash bulges based on G code guidance, which aims to improve and perfect the prior technical scheme, can identify and detect workpiece flash bulges distributed randomly and diversely, can detect workpieces in any placing state and has higher detection efficiency and precision.
In order to achieve the purpose, the invention adopts the following technical scheme:
a machine vision detection method for guiding the profile flash bulge of a workpiece under the guidance of a G code is characterized in that a workpiece profile flash bulge vision detection system is adopted, the system comprises an industrial camera, a light source, a lens, a motion control card, a servo driver, a servo motor, a ball screw, a nut, a speed reducer and a detection platform, the industrial camera is connected with a two-axis servo driving mechanism consisting of an X axis and a Y axis through a platform capable of moving along the X axis and the Y axis, the servo nut and the ball screw on each axis in the two-axis servo driving mechanism are connected with the servo motor through a coupler and the speed reducer, the servo motor is connected with the servo driver through an encoder, and the servo driver is connected with an upper computer and the motion control card through a line connection; the industrial camera, the lens and the light source are arranged on the upper part of a workpiece to be detected on the detection platform, and the industrial camera is electrically connected with the upper computer, and the method comprises the following steps:
step 1, analyzing and determining a conversion relation between a workpiece coordinate system of a workpiece to be detected on a detection platform and an image coordinate system of a workpiece picture obtained by an industrial camera, wherein the workpiece coordinate system taking a G code as a characteristic has close relation with the image coordinate system based on image detection in identifying burr bumps, analyzing and reasoning the conversion relation between the platform coordinate system and the workpiece coordinate system and the conversion relation between the platform coordinate system and the image coordinate system, and obtaining the conversion relation between the workpiece coordinate system and the image coordinate system according to the two conversion relations;
step 2, extracting an interested area of a picture acquired by an industrial camera, and obtaining a contour edge to be detected by adopting an image binarization and edge detection method aiming at an interested area image;
and 3, judging and identifying the defects of the flash bulges of the outline of the region of interest based on the outline information in the G code, surrounding the bulge at the edge of the outline by adopting a minimum external rectangle method, realizing the visual detection of the bulge at the edge of the outline, completing the positioning and measurement of the bulge at the outline of the workpiece, and obtaining the initial point and the height information of the characteristic section of the bulge.
Mapping coordinates corresponding to the G code into image coordinates according to the transformation relation obtained in the step 1, and extracting the region of interest according to the line type being a line segment or a circular arc; segment type ROI extraction: drawing a rectangle with the line segment P1P2 as a median line according to a starting point P1, an end point P2 and a line segment length P1P2 of the line segment, wherein the height of the rectangle is the highest flash empirical value k; arc type ROI extraction: and connecting the arc starting point P3 and the arc end point P4, drawing a rectangle with the line segment P3P4 as a median line, and obtaining the region of interest by taking the empirical value K as the height, and obtaining the contour edge to be detected by adopting image binarization and edge detection methods for the region of interest.
And 3, judging and identifying the defects of the flash bulges of the contour of the region of interest, and setting the coordinates of the initial point of the segment, which are stored after analysis, of the G code segment judged as the segment as P1(x1, y1) and P2(x2, y2), wherein the detection algorithm of the flash bulges comprises the following steps:
1) according to two points P1 and P2 on the line segment, a general straight line equation of a straight line L where the line segment is located is deduced;
2) calculating the number of the midpoints of an edge point set V1 containing the flash;
3) taking the ith point Pi from the point set V, and calculating the distance Dist from the ith point to the straight line L;
4) judging the relation between Dist and the standard flash bulge judgment distance D deviation, if Dist > D deviation, storing the point Pi in a new point set V2;
5) extracting coordinates of 4 corner points of the rectangle by using a minimum rectangle surrounding point set V2 with one side parallel to the straight line L, and calculating the width and the height of the rectangle, wherein the unit is pixel;
6) and (3) converting the image coordinate into a world coordinate according to the camera calibration parameter, and calculating the actual width and height of the rectangle in the world coordinate, wherein the unit is mm, so that the actual width and height of the flash bulge and the position of the flash bulge can be obtained.
In step 3, the contour of the region of interest is subjected to flash and bulge defect judgment and identification, and the identification and judgment method for the arc G code segment comprises the following steps:
1) according to the coordinates P3 and P4 of the two points at the starting point of the end point and the radius R, a general circular arc equation of the circle O where the circular arc is located is deduced;
2) judging the central angle of the arc, if the central angle is larger than 15 degrees, performing arc segmentation, performing segmentation according to the standard that the central angle is not larger than 15 degrees, and dividing the edge point set containing the flash bulge into M sections;
3) setting a cyclic variable j equal to 0, and taking a Pj section from the point set M section;
4) taking the ith point Pi from the point set Vj, and calculating the distance Dist from the ith point to the circle center O;
5) judging the deviation of the distance D between Dist and a standard flash bulge, if Dist is larger than the deviation D, storing the point Pi in a new point set V2, otherwise, not processing;
6) using a rectangle with the smallest area to surround a point set V2, extracting coordinates of 4 corner points of the rectangle, and calculating the width and the height of the rectangle, wherein the unit is pixel;
7) and (3) converting the image coordinate into a world coordinate according to the camera calibration parameter, and calculating the actual width and height of the rectangle in the world coordinate, wherein the unit is mm, so that the actual width and height of the flash bulge at the Pj section and the position of the flash bulge can be obtained.
The invention has the beneficial effects that:
1. the method adopts the contour information provided by the G code as a standard template, provides a judgment standard of the complete contour, is more accurate compared with manual detection, and has higher accuracy. The detection requirement of the working condition of the randomly distributed flash workpiece is met.
2. Compared with a common image processing method, the method has the advantages that the extraction of the interested region guided by the G code is innovatively increased, the image of the region which is not concerned is eliminated, the image processing time is greatly reduced, and the image processing and the efficiency of recognizing the flash bulge are improved.
Drawings
FIG. 1 is a schematic diagram of a system platform architecture for implementing the method;
FIG. 2 is a flow chart of a method for detecting flash protrusion implemented by the method;
FIG. 3 is a schematic diagram of a camera motion profile implemented by the present method;
FIG. 4 is a diagram of a region of interest extraction model implemented by the method;
wherein: a is a line segment reference, and b is an arc reference;
FIG. 5 is a diagram illustrating the effect of image processing performed by the present method;
wherein: a is an original image, b is an ROI extraction image guided by G codes, c is a binarization image, d is an edge detection image, and e is a minimum rectangular bounding image of a flash point set.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be further clearly and completely described below with reference to the accompanying drawings and embodiments:
the invention establishes a visual detection system for the flash and bulge of the workpiece profile as shown in figure 1, which comprises three parts: the device comprises an image acquisition module, a motion control module and a host module. The image acquisition module comprises an industrial camera 4, a light source 6 and a lens 5; the motion control module comprises a motion control card 17, a servo driver, a servo motor and an actuating mechanism; the host module mainly includes the host computer 1 and a power supply device. The actuating mechanism comprises a ball screw 10, a nut 11 and a speed reducer 8. The industrial camera 4 is connected with a nut 11 and a ball screw 10 on an X axis through a platform capable of moving along the X axis and the Y axis, the nut 11 and the ball screw 10 on the X axis are connected with an X servo motor 12 through a coupler 9 and a speed reducer 8, the nut 11 and the ball screw 10 on the Y axis are connected with a Y servo motor 13 through the coupler 9 and the speed reducer 8, the X servo motor 12 is connected with an X axis servo driver 14 through an encoder 7, the Y servo motor 13 is connected with a Y axis servo driver 15 through the encoder 7, and the X axis servo driver 14 and the Y axis servo driver 15 are connected with an upper computer 1 and a control card motion 17 through a line connection terminal board 16. The industrial camera 4, the lens 5 and the light source 6 are arranged on the upper part of the workpiece 3 to be detected on the detection platform 2, and the industrial camera 4 is electrically connected with the upper computer 1.
The invention relates to a machine vision detection method of a G-code-based workpiece contour flash bulge, which adopts a workpiece contour flash bulge vision detection system and comprises the following steps:
step 1, analyzing and determining a conversion relation between a workpiece coordinate system of a workpiece to be detected on a detection platform and an image coordinate system of a workpiece picture obtained by an industrial camera, wherein the workpiece coordinate system taking a G code as a characteristic has close relation with the image coordinate system based on image detection in identifying burr bumps, analyzing and reasoning the conversion relation between the platform coordinate system and the workpiece coordinate system and the conversion relation between the platform coordinate system and the image coordinate system, and obtaining the conversion relation between the workpiece coordinate system and the image coordinate system according to the two conversion relations;
step 2, extracting an interested area of a picture acquired by an industrial camera, and obtaining a contour edge to be detected by adopting an image binarization and edge detection method aiming at an interested area image;
and 3, judging and identifying the defects of the flash bulges of the outline of the region of interest based on the outline information in the G code, surrounding the bulge at the edge of the outline by adopting a minimum external rectangle method, realizing the visual detection of the bulge at the edge of the outline, completing the positioning and measurement of the bulge at the outline of the workpiece, and obtaining the initial point and the height information of the characteristic section of the bulge.
Mapping coordinates corresponding to the G code into image coordinates according to the transformation relation obtained in the step 1, and extracting the region of interest according to the line type being a line segment or a circular arc; segment type ROI extraction: a rectangle with the segment P1P2 as a median line is drawn according to the starting point P1, the end point P2 and the segment length P1P2 of the segment, and the height of the rectangle is the highest flash empirical value k. Arc type ROI extraction: and connecting the arc starting point P3 and the arc end point P4, drawing a rectangle with the line segment P3P4 as a median line, and obtaining the region of interest by taking the empirical value K as the height, and obtaining the contour edge to be detected by adopting image binarization and edge detection methods for the region of interest.
And 3, judging and identifying the defects of the flash bulges of the contour of the region of interest, and setting the coordinates of the initial point of the segment, which are stored after analysis, of the G code segment judged as the segment as P1(x1, y1) and P2(x2, y2), wherein the detection algorithm of the flash bulges comprises the following steps:
1) from the two points P1, P2 on the line segment, the general expression for deriving the straight line L on which the line segment is located is: ax + By + C is 0;
2) calculating the number of the midpoints of an edge point set V1 containing the flash;
3) taking the ith point Pi from the point set V, and calculating the distance Dist from the ith point to the straight line L;
4) judging the relation between Dist and the standard flash bulge judgment distance D deviation, if Dist > D deviation, storing the point Pi in a new point set V2;
5) extracting coordinates of 4 corner points of the rectangle by using a minimum rectangle surrounding point set V2 with one side parallel to the straight line L, and calculating the width and the height of the rectangle, wherein the unit is pixel;
6) and (3) converting the image coordinate into a world coordinate according to the camera calibration parameter, and calculating the actual width and height of the rectangle in the world coordinate, wherein the unit is mm, so that the actual width and height of the flash bulge and the position of the flash bulge can be obtained.
In step 3, the contour of the region of interest is subjected to flash and bulge defect judgment and identification, and the identification and judgment method for the arc G code segment comprises the following steps:
1) according to the coordinates P3 and P4 of the two points at the starting point and the ending point and the radius R, the general formula of the circle O where the circular arc is located is deduced and is as follows: (x-a)2+(y-b)2=R2
2) Judging the central angle of the arc, if the central angle is larger than 15 degrees, performing arc segmentation, performing segmentation according to the standard that the central angle is not larger than 15 degrees, and dividing the edge point set containing the flash bulge into M sections;
3) setting a cyclic variable j equal to 0, and taking a Pj section from the point set M section;
4) taking the ith point Pi from the point set Vj, and calculating the distance Dist from the ith point to the circle center O;
5) judging the relation between Dist and the standard flash bulge judgment distance D deviation, if Dist is larger than D deviation, storing the point Pi in a new point set V2, otherwise, not processing;
6) using a rectangle with the smallest area to surround a point set V2, extracting coordinates of 4 corner points of the rectangle, and calculating the width and the height of the rectangle, wherein the unit is pixel;
7) and (3) converting the image coordinate into a world coordinate according to the camera calibration parameter, and calculating the actual width and height of the rectangle in the world coordinate, wherein the unit is mm, so that the actual width and height of the flash bulge at the Pj section and the position of the flash bulge can be obtained.
The detection method of the invention has the flow as shown in fig. 2 and fig. 3, firstly, an upper computer analyzes a G code to generate an industrial camera motion path; the X1 and Y1 axes of the platform are controlled to return to zero by the application host module, and the position coordinates of the industrial camera are (0, 0); when the host module is used for controlling the industrial camera to move to a position S1, the central point O3 of the industrial camera coincides with the origin of coordinates O2 of the workpiece, the operation is suspended for 20ms, the position coordinates of the industrial camera at the moment are recorded and are platform coordinates P1(X1, Y1), and photographing is carried out; the host computer module controls the industrial camera to move to a position S2 according to the direction of a dotted arrow, the center point O3 of the camera coincides with the midpoint of a line segment O2G at the moment, the industrial camera pauses for 20ms, the position coordinate of the industrial camera at the moment is recorded and is taken as a platform coordinate P2(X2, Y2), and photographing is carried out; and according to the direction of a dotted arrow, sequentially using the host module to control the industrial camera to move to the middle point position after the G code segment is analyzed, pausing for 20ms, recording the position coordinates of the industrial camera, taking pictures as platform coordinates P3(X3, Y3), and sequentially collecting each contour point picture corresponding to the G code. And extracting the interest region guided by the G code according to the conversion relation between the workpiece coordinates and the image coordinates, as shown by a and b in figure 4. And then, obtaining the contour edge to be detected by adopting an image binarization and edge detection method. And finally, positioning and measuring the workpiece contour flash bulge by applying the point-to-straight line neighbor relation based on the G code contour information to obtain the initial point and height information of the characteristic segment of the flash bulge. The image processing and effect are shown as a, b, c, d, e in fig. 5, and the positions of the flashing protrusions are identified and framed by rectangular frames.
The above embodiments are merely illustrative of the technical ideas and features of the present invention, and the purpose thereof is to enable those skilled in the art to understand the contents of the present invention and implement the present invention, and not to limit the protection scope of the present invention. All equivalent changes and modifications made according to the spirit of the present invention should be covered within the protection scope of the present invention.

Claims (4)

1. A machine vision detection method for guiding the profile flash bulge of a workpiece under the guidance of a G code is characterized in that a workpiece profile flash bulge vision detection system is adopted, the system comprises an industrial camera, a light source, a lens, a motion control card, a servo driver, a servo motor, a ball screw, a nut, a speed reducer and a detection platform, the industrial camera is connected with a two-axis servo driving mechanism consisting of an X axis and a Y axis through a platform capable of moving along the X axis and the Y axis, the servo nut and the ball screw on each axis in the two-axis servo driving mechanism are connected with the servo motor through a coupler and the speed reducer, the servo motor is connected with the servo driver through an encoder, and the servo driver is connected with an upper computer and the motion control card through a line connection; the industrial camera, the lens and the light source are arranged on the upper part of a workpiece to be detected on the detection platform, and the industrial camera is electrically connected with the upper computer, and the industrial camera detection device is characterized by comprising the following steps of:
step 1, analyzing and determining a conversion relation between a workpiece coordinate system of a workpiece to be detected on a detection platform and an image coordinate system of a workpiece picture obtained by an industrial camera, wherein the workpiece coordinate system taking a G code as a characteristic has close relation with the image coordinate system based on image detection in identifying burr bumps, analyzing and reasoning the conversion relation between the platform coordinate system and the workpiece coordinate system and the conversion relation between the platform coordinate system and the image coordinate system, and obtaining the conversion relation between the workpiece coordinate system and the image coordinate system according to the two conversion relations;
step 2, extracting an interested area of a picture acquired by an industrial camera, and obtaining a contour edge to be detected by adopting an image binarization and edge detection method aiming at an interested area image;
and 3, judging and identifying the defects of the flash bulges of the outline of the region of interest based on the outline information in the G code, surrounding the bulge at the edge of the outline by adopting a minimum external rectangle method, realizing the visual detection of the bulge at the edge of the outline, completing the positioning and measurement of the bulge at the outline of the workpiece, and obtaining the initial point and the height information of the characteristic section of the bulge.
2. The machine vision inspection method of the G-code based guided workpiece profile flashing protrusion of claim 1, wherein: mapping coordinates corresponding to the G code into image coordinates according to the transformation relation obtained in the step 1, and extracting the region of interest according to the line type being a line segment or a circular arc; segment type ROI extraction: drawing a rectangle with the line segment P1P2 as a median line according to a starting point P1, an end point P2 and a line segment length P1P2 of the line segment, wherein the height of the rectangle is the highest flash empirical value k; arc type ROI extraction: and connecting the arc starting point P3 and the arc end point P4, drawing a rectangle with the line segment P3P4 as a median line, and obtaining the region of interest by taking the empirical value K as the height, and obtaining the contour edge to be detected by adopting image binarization and edge detection methods for the region of interest.
3. The machine vision inspection method of the G-code based guided workpiece profile flashing protrusion of claim 1, wherein: and 3, judging and identifying the defects of the flash bulges of the contour of the region of interest, and setting the coordinates of the initial point of the segment, which are stored after analysis, of the G code segment judged as the segment as P1(x1, y1) and P2(x2, y2), wherein the detection algorithm of the flash bulges comprises the following steps:
1) according to two points P1 and P2 on the line segment, a general straight line equation of a straight line L where the line segment is located is deduced;
2) calculating the number of the midpoints of an edge point set V1 containing the flash;
3) taking the ith point Pi from the point set V, and calculating the distance Dist from the ith point to the straight line L;
4) judging the relation between Dist and the standard flash bulge judgment distance D deviation, if Dist > D deviation, storing the point Pi in a new point set V2;
5) extracting coordinates of 4 corner points of the rectangle by using a minimum rectangle surrounding point set V2 with one side parallel to the straight line L, and calculating the width and the height of the rectangle, wherein the unit is pixel;
6) and (3) converting the image coordinate into a world coordinate according to the camera calibration parameter, and calculating the actual width and height of the rectangle in the world coordinate, wherein the unit is mm, so that the actual width and height of the flash bulge and the position of the flash bulge can be obtained.
4. The machine vision inspection method of the G-code based guided workpiece profile flashing protrusion of claim 1, wherein: in step 3, the contour of the region of interest is subjected to flash and bulge defect judgment and identification, and the identification and judgment method for the arc G code segment comprises the following steps:
1) according to the coordinates P3 and P4 of the two points at the starting point of the end point and the radius R, a general circular arc equation of the circle O where the circular arc is located is deduced;
2) judging the central angle of the arc, if the central angle is larger than 15 degrees, performing arc segmentation, performing segmentation according to the standard that the central angle is not larger than 15 degrees, and dividing the edge point set containing the flash bulge into M sections;
3) setting a cyclic variable j equal to 0, and taking a Pj section from the point set M section;
4) taking the ith point Pi from the point set Vj, and calculating the distance Dist from the ith point to the circle center O;
5) judging the relationship between Dist and D deviation, if Dist > D deviation, storing the point Pi in a new point set V2, otherwise, not processing;
6) using a rectangle with the smallest area to surround a point set V2, extracting coordinates of 4 corner points of the rectangle, and calculating the width and the height of the rectangle, wherein the unit is pixel;
7) and (3) converting the image coordinate into a world coordinate according to the camera calibration parameter, and calculating the actual width and height of the rectangle in the world coordinate, wherein the unit is mm, so that the actual width and height of the flash bulge at the Pj section and the position of the flash bulge can be obtained.
CN201810426396.4A 2018-05-07 2018-05-07 Machine vision detection method for workpiece contour flash bulge under guidance of G code Active CN108765378B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810426396.4A CN108765378B (en) 2018-05-07 2018-05-07 Machine vision detection method for workpiece contour flash bulge under guidance of G code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810426396.4A CN108765378B (en) 2018-05-07 2018-05-07 Machine vision detection method for workpiece contour flash bulge under guidance of G code

Publications (2)

Publication Number Publication Date
CN108765378A CN108765378A (en) 2018-11-06
CN108765378B true CN108765378B (en) 2021-07-09

Family

ID=64010017

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810426396.4A Active CN108765378B (en) 2018-05-07 2018-05-07 Machine vision detection method for workpiece contour flash bulge under guidance of G code

Country Status (1)

Country Link
CN (1) CN108765378B (en)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108765378B (en) * 2018-05-07 2021-07-09 上海理工大学 Machine vision detection method for workpiece contour flash bulge under guidance of G code
CN109978874B (en) * 2019-04-02 2023-03-14 湖南大学 Visual detection device and identification method for surface defects of steel rail
CN110163853B (en) * 2019-05-14 2021-05-25 广东奥普特科技股份有限公司 Edge defect detection method
CN110263204A (en) * 2019-06-05 2019-09-20 广州文冲船厂有限责任公司 A kind of component contour coding method, device and equipment
CN110455182B (en) * 2019-07-23 2021-02-09 中广核检测技术有限公司 Method for measuring abrasion loss of control rod guide card based on image recognition technology
CN112329501A (en) * 2020-01-08 2021-02-05 沈阳和研科技有限公司 Method for detecting workpiece shape by dicing saw
CN112215891B (en) * 2020-07-13 2022-12-13 浙江大学山东工业技术研究院 Visual positioning method and system for glue injection hole and pin hole of aluminum profile door and window
CN111915581B (en) * 2020-07-27 2021-07-13 青岛大学 Method for detecting defects of smooth metal cambered surface
CN112017232B (en) * 2020-08-31 2024-03-15 浙江水晶光电科技股份有限公司 Positioning method, device and equipment for circular patterns in image
CN112233063B (en) * 2020-09-14 2024-02-13 东南大学 Circle center positioning method for large-size round object
CN112489009B (en) * 2020-11-27 2022-07-26 芜湖哈特机器人产业技术研究院有限公司 Pump body mouth ring pose detection method based on visual image
CN113139943B (en) * 2021-04-22 2022-08-12 苏州华兴源创科技股份有限公司 Method and system for detecting appearance defects of open circular ring workpiece and computer storage medium
CN114022483B (en) * 2022-01-08 2022-03-25 南通欣斯特机械制造有限公司 Injection molding flash area identification method based on edge characteristics
CN114441499B (en) * 2022-04-11 2022-07-12 天津美腾科技股份有限公司 Grade detection method and device, identification equipment, ore pulp grade instrument and storage medium
CN115308222B (en) * 2022-07-11 2024-02-09 江苏汤谷智能科技有限公司 System and method for identifying poor chip appearance based on machine vision
CN115753791B (en) * 2022-11-10 2024-03-01 哈尔滨耐是智能科技有限公司 Defect detection method, device and system based on machine vision

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0292644A1 (en) * 1987-05-21 1988-11-30 VDO Adolf Schindling AG Method of programming a digital control device
CN103733223A (en) * 2011-08-04 2014-04-16 三菱电机株式会社 Method and system for determining defect of surface of model of object
CN104933220A (en) * 2015-05-11 2015-09-23 东莞市凌英模具塑胶有限公司 High precision manufacturing method and injection mold for plastic injection mold for complex curved surface
CN106020120A (en) * 2016-07-29 2016-10-12 芜湖哈特机器人产业技术研究院有限公司 Method for generating G code by using image based on ios system
CN106709911A (en) * 2016-12-26 2017-05-24 西北工业大学 High-speed rail fastener detection and counting method and system based on machine vision
CN107533769A (en) * 2015-03-16 2018-01-02 彩滋公司 Prepare the automatic computing engine Computer Aided Design in cutting heat bonding film
CN108765378A (en) * 2018-05-07 2018-11-06 上海理工大学 The machine vision detection method of lower workpiece profile overlap protrusion is guided based on G code

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7204417B2 (en) * 2004-11-03 2007-04-17 The Code Corporation Graphical code reader that is configured for efficient decoder management

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0292644A1 (en) * 1987-05-21 1988-11-30 VDO Adolf Schindling AG Method of programming a digital control device
CN103733223A (en) * 2011-08-04 2014-04-16 三菱电机株式会社 Method and system for determining defect of surface of model of object
CN107533769A (en) * 2015-03-16 2018-01-02 彩滋公司 Prepare the automatic computing engine Computer Aided Design in cutting heat bonding film
CN104933220A (en) * 2015-05-11 2015-09-23 东莞市凌英模具塑胶有限公司 High precision manufacturing method and injection mold for plastic injection mold for complex curved surface
CN106020120A (en) * 2016-07-29 2016-10-12 芜湖哈特机器人产业技术研究院有限公司 Method for generating G code by using image based on ios system
CN106709911A (en) * 2016-12-26 2017-05-24 西北工业大学 High-speed rail fastener detection and counting method and system based on machine vision
CN108765378A (en) * 2018-05-07 2018-11-06 上海理工大学 The machine vision detection method of lower workpiece profile overlap protrusion is guided based on G code

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"MACHINE VISION IMPLEMENTATION IN RAPID PCB PROTOTYPING IMPLEMENTASI MACHINE VISION PADA PEMBUATAN DUPLIKASI PCB";Yosafat Surya Murijanto等;《Journal of Mechatronics, Electrical Power, and Vehicular Technology》;20111222;第2卷(第2期);第79-84页 *
"铸件自动循迹浮动磨边的研究";冯勋壮等;《现代制造技术与装备》;20180430(第257期);第14-15页 *

Also Published As

Publication number Publication date
CN108765378A (en) 2018-11-06

Similar Documents

Publication Publication Date Title
CN108765378B (en) Machine vision detection method for workpiece contour flash bulge under guidance of G code
WO2015120734A1 (en) Special testing device and method for correcting welding track based on machine vision
CN113465511B (en) Steel coil size online measurement and omnibearing end surface defect online detection method
CN109974582B (en) Device and method for non-contact visual detection of core wire size of automobile wire harness
CN108917593B (en) Intelligent measurement system and method based on element configuration of workpiece to be measured
CN102519400B (en) Large slenderness ratio shaft part straightness error detection method based on machine vision
CN103868929A (en) Three-dimensional detection method for defects of sealing surface
CN109211110A (en) A kind of flat-type workpiece size detection system and method based on machine vision
CN107703513B (en) Non-contact net relative position detection method based on image processing
CN113340909B (en) Glue line defect detection method based on machine vision
CN109540918B (en) Hot-rolled coil edge defect detection device and method
CN112497219A (en) Columnar workpiece classification positioning method based on target detection and machine vision
CN113724193A (en) PCBA part size and clearance high-precision visual measurement method
CN115131268A (en) Automatic welding system based on image feature extraction and three-dimensional model matching
Yang et al. Detection of weld groove edge based on multilayer convolution neural network
CN104316530A (en) Part detection method and application
CN105023018A (en) Jet code detection method and system
Yan et al. Multi-line laser structured light fast visual positioning system with assist of TOF and CAD
CN115861217A (en) System and method for detecting defects of circuit board of backlight plate based on vision
CN208042989U (en) A kind of large-scale sheet metal works almost T-stable automatic detection device
CN112819894A (en) Collecting card guiding and positioning system and method, computer storage medium and gantry crane
CN117250206A (en) Conductive wire abnormality detection method and device based on visible light and infrared light fusion
CN115984197A (en) Defect detection method based on standard PCB image and related device
Qian et al. The autonomous detection of sheet metal parts using imageprocessing
CN110021027B (en) Edge cutting point calculation method based on binocular 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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20231116

Address after: 239000 No. 857, Shanghai South Road, Chengdong Industrial Park, Chuzhou City, Anhui Province

Patentee after: Puwanini Intelligent Equipment Co.,Ltd.

Address before: 200093 No. 516, military road, Shanghai, Yangpu District

Patentee before: University of Shanghai for Science and Technology