Cutting piece visual inspection equipment and inspection method thereof

By using industrial cameras and automated detection methods in the sheet cutting inspection, the problems of large deviations and low efficiency caused by manual testing in the prior art are solved, and fast and accurate sheet cutting inspection is achieved, and the product pass rate is improved.

CN119579499APending Publication Date: 2025-03-07SHANGHAI ZHONGYUN DIGITAL TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411526255.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

The existing test methods for cutting and films rely on manual testing, resulting in large deviations in the detection results and low efficiency.

Method used

The sheet-cutting visual inspection equipment and corresponding inspection methods are used to obtain the sheet-cutting images through photographs by industrial cameras, and position correction, maximum contour extraction, CAD fitting and eye-cut feature comparison are performed to automatically detect the defects of the sheet-cutting.

Benefits of technology

Fast and accurate sheet cutting inspection is achieved, replacing manual inspection, improving inspection efficiency, reducing manual errors, and significantly improving the qualification rate of finished products.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119579499A_ABST
    Figure CN119579499A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of inspection equipment, in particular to cut-part visual inspection equipment and an inspection method thereof.The specific steps are as follows: S1, a cut-part image is obtained through photographing of an industrial camera, a deformation area is segmented, and pose correction is performed on the cut-part image by using calibration data. The method comprises the following steps: extracting a CAD eye knife, extracting a cutting piece eye knife again through the extracted CAD eye knife, comparing the central point of the CAD eye knife with the central point of the cutting piece eye knife to obtain an eye knife deviation value, taking a point, closest to the central point, of the CAD eye knife as a depth point, and calculating the distance from the depth point to the depth of a cutting piece to obtain a depth value. The cut-parts can be quickly inspected, manual repeated and error-prone inspection links are replaced, problem parts can be guided after inspection so as to facilitate later correction, the inspection time can be shortened, the inspection efficiency can be improved, manpower can be reduced, and the yield of later finished products can be greatly increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of inspection equipment, and in particular to a piece visual inspection equipment and an inspection method thereof. Background Art

[0002] There are many defects in the cut pieces. In order to ensure the quality of the cut pieces, defective cut pieces need to be eliminated. The defective cut pieces must be different from the product itself in optical properties. When light is incident on the surface of the product, various defects will be different from the surrounding in reflection and refraction. For example, when uniform light is incident vertically on the surface of the product, if there is no defect on the surface of the product, the emission direction will not change, and the detected light is uniform; when the surface of the product contains defects, the emitted light will change, and the detected image will also change accordingly. Due to the existence of defects, stress concentration and deformation are generated around them, which can be easily observed in the image. If a light-transmitting defect (such as cracks, bubbles, etc.) is encountered, the light will be refracted at the defect position, and the intensity of the light will be greater than the surrounding, so the light detected on the camera target surface will be correspondingly enhanced; if light-absorbing impurities (such as sand, etc.) are encountered, the light at the defect position will become weaker, and the light detected on the camera target surface will be weaker than the surrounding light. By analyzing the intensity changes and image features of the image signal collected by the camera, the corresponding defect information can be obtained.

[0003] At present, the inspection of cut pieces can only be done by manual inspection, which requires comparing the template with the actual object. This is time-consuming and labor-intensive, and it requires subjective judgment of OK or NG. The inspection results are highly biased and inefficient. Summary of the invention

[0004] The main purpose of the present invention is to provide a visual inspection device and an inspection method for cutting pieces, so as to solve the problems of large deviation of inspection results and low efficiency proposed in the related art.

[0005] In order to achieve the above object, according to one aspect of the present invention, a visual inspection method for cutting pieces is provided, comprising the following steps:

[0006] S1. Obtain the cut piece image by taking a photo with an industrial camera, segment the deformation area, and use the calibration data to correct the position and posture of the cut piece image;

[0007] S2, extract the largest contour, and calculate the area, perimeter and preliminarily screen similar CAD;

[0008] S3, displacing the CAD, using the selected CAD to scale, mirror, fit and further select the CAD;

[0009] S4, extracting the CAD eye knife coordinates and comparing them with the eye knife feature points of the cut piece to obtain the eye knife offset and eye knife depth data.

[0010] Furthermore, in S1, the specific steps of using the calibration data to perform posture correction on the cut piece image are:

[0011] S1.1. When the camera model is a radial distortion model, the distortion model can be expressed as:

[0012] u=α u (x(1+k1r 2 +k2r 4 +…)+2p1xy+p2(r 2 +2x 2 ))+c x ;

[0013] v=α v (y(1+k1r 2 +k2r 4 +…)+2p2xy+p1(r 2 +2y 2 ))+c y ;

[0014] Where (u, v) represents the distorted image coordinates; (x, y) represents the undistorted image coordinates; (c x , c y ) represents the coordinates of the center point of the image; α u Indicates the scale factor of the x-axis; α v represents the scale factor of the y-axis; k1, k2... represent the radial distortion coefficient; r represents the distance from the pixel to the center of the image; p1, p2... represent the tangential distortion coefficient;

[0015] S1.2, find the coordinates of the undistorted image after iteration;

[0016]

[0017] Where (x′, y′) is the undistorted image coordinate after iteration; r′ represents the distance from the pixel to the center of the image after iteration;

[0018] S1.3. Use the rotation matrix R and translation vector t obtained by calibration to construct the transformation matrix H -1 , then apply the inverse transform H -1 To correct the image pose;

[0019] Among them, the inverse transform H -1 Specifically:

[0020] X w =R -1 (X c -t);

[0021] Among them, X wRepresents a point in the world coordinate system; X c Represents a point in the camera coordinate system;

[0022] S1.4. Use the inverse transformed coordinates to reconstruct the rectified image.

[0023] Furthermore, in S2, the expressions involved in extracting the maximum contour and calculating the area, perimeter and preliminary screening of similar CAD are specifically:

[0024] Maximum profile:

[0025]

[0026] Among them, C max represents the contour with the largest area; C represents the set of all contours; (x i ,y i ) represents the coordinates on the contour boundary; c i Represents an element in a contour collection;

[0027] Area calculation:

[0028]

[0029] Among them, A(C max ) represents the area of ​​the largest contour;

[0030] Maximum profile:

[0031]

[0032] Among them, P(C max ) represents the perimeter of the largest contour; Indicates the boundary of the contour; (x i +y i ) and (x i+1 ,y i+1 ) represents the coordinates of adjacent pixels on the contour boundary.

[0033] Furthermore, in S3, the specific steps of using the selected CAD for scaling, mirroring, fitting and further selecting the CAD are as follows:

[0034] S3.1. Process the inner rectangle of the outer contour and merge the scattered line segments to form the inner contour

[0035] S3.2, split the combined contour and extract its diagonal and center;

[0036] S3.3, the CAD contour is processed in the same way and compared with the center position and diagonal position of the cut piece contour;

[0037] S3.4, cycle through the CAD circular holes and select the circular holes of the cut pieces that can be fitted within the range;

[0038] S3.5, calculate the CAD circle center position and the cut piece circle center position, and obtain the offset distance;

[0039] S3.6, calculate the maximum distance between the CAD circle and the cut piece circle, and obtain the standard deviation;

[0040] S3.7. Finally, the processed CAD image, processed cut piece image, diagonal data, and coordinate data are obtained.

[0041] Furthermore, in S4, the specific steps of extracting CAD eye knife coordinates and comparing them with the eye knife feature points of the cut piece are as follows:

[0042] S4.1, extracting CAD eye knives, and extracting the cutting eye knives again through the extracted CAD eye knives;

[0043] S4.2, take the center point of the CAD eye knife, and compare it with the center point of the cutter eye knife to obtain the eye knife offset value;

[0044] S4.3. Finally, the processed CAD image, processed cut piece image, eye knife offset, and eye knife depth data are obtained.

[0045] On the other hand, the present invention provides a visual inspection device for cutting pieces, which performs inspection based on the above-mentioned visual inspection method for cutting pieces, including:

[0046] A machine body, wherein the machine body is used to place the cut pieces and detect the cut pieces;

[0047] A camera top layer, the camera top layer is used to install an industrial camera, a light-transmitting port No. 1 is provided at the bottom of the camera top layer, and a lens of the industrial camera faces the light-transmitting port No. 1;

[0048] Furthermore, the body includes a support group and a detection group, the detection group is arranged on the support group, the support group includes two cabinets, a plurality of pulleys, a bracket, a backlight plate and a panel, the pulleys are fixed on the bottom surface of the cabinet, a panel is fixed between the two cabinets, the backlight plate is fixed on the panel, the bracket is fixed on the side of the upper surface of the panel, and the top layer of the camera is fixed on the top of the bracket.

[0049] Furthermore, the detection group includes a main power switch, a top-level light switch, a one-key detection button, a scanner, a card reader and a touch screen. The main power switch is fixed on the front of the cabinet on one side, the top-level light switch is fixed on the front of the cabinet on the other side, the one-key detection button, the scanner and the card reader are all fixed on the right rear of the upper surface of the panel, the scanner is located on the right side of the one-key detection button, the card reader is located on the right side of the scanner, and the touch screen is fixed on the right side of the upper surface of the panel.

[0050] Compared with the prior art, the present invention has the following beneficial effects: the present invention extracts CAD eye knives through a visual inspection method, extracts the cutting piece eye knives again through the extracted CAD eye knives, compares the center point of the CAD eye knives with the center point of the cutting piece eye knives to obtain the eye knife offset value, takes the point closest to the center point of the CAD eye knife as the depth point and calculates the distance with the depth of the cutting piece to obtain the depth value, returns the processed CAD image, and obtains the eye knife offset and eye knife depth data from the processed cutting piece image. The method can be based on industrial camera sampling, and the back end is self-developed calculation and judgment logic. The cutting piece can be inspected quickly, replacing the manual repetitive and error-prone inspection links, and after the inspection, it will guide the problem parts for later correction. The visual inspection equipment uses visual inspection, shortens the inspection time, improves the inspection efficiency, reduces labor, and can greatly increase the qualified rate of finished products in the later stage. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 The present invention is generally illustrated Figure 1 ;

[0053] Figure 2 The present invention is generally illustrated Figure 2 ;

[0054] Figure 3 It is a schematic diagram of the overall structure of the present invention;

[0055] Figure 4 This is a schematic diagram of the structure of the mirror blocking part of the present invention;

[0056] Figure 5 It is a schematic diagram of the structure of the guide part of the present invention;

[0057] Figure 6 Schematic diagram of the shielding structure of the present invention Figure 1 ;

[0058] Figure 7 Schematic diagram of the shielding structure of the present invention Figure 2 ;

[0059] Figure 8 It is a schematic diagram of the structure of the limiting body of the present invention.

[0060] Illustration Description:

[0061] 1. Machine body; 10. Main power switch; 11. Cabinet; 12. Pulley; 13. Bracket; 14. Top light switch; 15. Backlight; 16. One-key detection button; 17. Scanner; 18. Card reader; 19. Touch screen; 20. Panel;

[0062] 2. Top layer of camera; 21. Light transmission port No. 1;

[0063] 3. Mirror blocking part; 31. Fixing group; 32. Shielding group; 311. Horizontal plate No. 1; 312. Fixing hole No. 1; 313. Track; 314. Horizontal rail; 315. Horizontal plate No. 2; 316. Fixing hole No. 2; 317. Light-transmitting port No. 2; 321. Shielding plate; 322. Push plate; 323. Raised strip; 324. Ball; 325. Limiting body; 3251. Connecting body No. 1; 3252. Arc top; 3253. Connecting body No. 2; 3254. Top block. DETAILED DESCRIPTION

[0064] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the specific implementation mode, structure, characteristics and effects of the present invention are described in detail below in combination with the accompanying drawings and preferred embodiments.

[0065] See also Figures 1 to 8 On the one hand, this embodiment provides a piece visual inspection device, including: a body 1, the body 1 is used to place the piece and inspect the piece;

[0066] The top camera layer 2 is used to install an industrial camera. A light-transmitting port 21 is provided at the bottom of the top camera layer 2. The lens of the industrial camera faces the light-transmitting port 21.

[0067] The mirror blocking part 3 is fixedly arranged on the bottom surface of the top layer 2 of the camera and is located at the light transmission port No. 1. The mirror blocking part 3 includes a fixing group 31 and a shielding group 32. The fixing group 31 is fixedly connected to the top layer 2 of the camera, and the shielding group 32 is slidably connected to the fixing group 31. When the shielding group 32 slides to the right side of the fixing group 31, the shielding group 32 blocks the light transmission port No. 1, and the lens of the industrial camera cannot take pictures through the light transmission port No. 1. When the shielding group 32 slides to the left side of the fixing group 31, the shielding group 32 leaves the light transmission port No. 1, and the lens of the industrial camera can take pictures through the light transmission port No. 1.

[0068] The fixing group 31 includes a guide group, a limit group and a second light-transmitting port 317 . The limit group is arranged above the guide group. The shielding group 32 slides left and right along the guide group. The limit group limits the movement of the shielding group 32 .

[0069] The guide group includes two rails 313 and two transverse rails 314. The rails 313 are fixedly connected to the top layer 2 of the camera, and the transverse rails 314 are fixedly arranged inside the rails 313. The ball bearings 324 roll between the transverse rails 314 and the rails 313 to drive the shielding plate 321 to move.

[0070] The limiting group includes a No. 1 transverse plate 311, a No. 1 fixing hole 312, a No. 2 transverse plate 315 and a No. 2 fixing hole 316. The No. 1 transverse plate 311 and the No. 2 transverse plate 315 are both fixedly arranged between the two rails 313, and the No. 1 transverse plate 311 is located on the right side of the No. 2 transverse plate 315, the No. 1 fixing hole 312 is arranged on the No. 1 transverse plate 311, and the No. 2 fixing hole 316 is arranged on the No. 2 transverse plate 315.

[0071] The second light-transmitting port 317 is located between the first horizontal plate 311 and the second horizontal plate 315, and is directly opposite to the first light-transmitting port 21. When the shielding plate 321 is located at the second light-transmitting port 317, the second light-transmitting port 317 blocks the lens of the industrial camera to prevent foreign matter from contaminating the lens and affecting the shooting effect. When the shielding plate 321 leaves the second light-transmitting port 317, the lens of the industrial camera can shoot the cut pieces on the backlight plate 15 through the first light-transmitting port 21 and the second light-transmitting port 317.

[0072] The shielding group 32 includes a push-pull portion, a plurality of balls 324 and a limiting body 325 . The balls 324 are distributed on both sides of the push-pull portion, and the limiting body 325 is fixedly arranged in the middle of the right side of the top surface of the push-pull portion.

[0073] The push-pull portion includes a shielding plate 321, a push plate 322 and a plurality of convex strips 323. The push plate 322 is fixedly arranged at the middle left portion of the top surface of the shielding plate 321. The convex strips 323 are all fixedly arranged at the top of the push plate 322 to increase the friction coefficient of the push plate 322. The ball bearings 324 are rotatably connected to the shielding plate 321. Pushing the push plate 322 can drive the shielding plate 321 to move left and right. The ball bearings 324 convert the sliding friction between the shielding plate 321 and the track 313 into rolling friction, thereby reducing the friction coefficient and making it easier to move the shielding plate 321.

[0074] The limiting body 325 includes a No. 1 connecting body 3251, an arc-shaped top 3252, a No. 2 connecting body 3253 and a top block 3254. The No. 1 connecting body 3251 is fixedly arranged on the top surface of the shielding plate 321, the arc-shaped top 3252 fixedly connects the No. 1 connecting body 3251 and the No. 2 connecting body 3253, and the top block 3254 is fixedly arranged on the end of the No. 2 connecting body 3253.

[0075] The body 1 includes a support group and a detection group. The detection group is arranged on the support group. The support group includes two cabinets 11, a plurality of pulleys 12, a bracket 13, a backlight panel 15 and a panel 20. The cabinet 11 is used to load equipment components such as industrial computers and PLCs. In this embodiment, four pulleys 12 are preferably used to stably support and facilitate the movement of equipment. The pulleys 12 are all fixed on the bottom surface of the cabinet 11. A panel 20 is fixed between the two cabinets 11. The backlight panel 15 is fixed on the panel 20. The backlight panel 15 highlights the outer contour of the cut piece and the internal holes and rectangles. The bracket 13 is fixed on the side of the upper surface of the panel 20. The camera top layer 2 is fixed on the top of the bracket 13. The bracket 13 keeps the distance from the industrial camera lens to the cut piece constant.

[0076] The detection group includes a main power switch 10, a top-level light switch 14, a one-key detection button 16, a scanner 17, a card reader 18 and a touch screen 19. The main power switch 10 is fixed on the front of a cabinet 11 on one side to control the power on and off status of the equipment. The top-level light switch 14 is fixed on the front of the cabinet 11 on the other side to control the top-level light source. The one-key detection button 16, the scanner 17 and the card reader 18 are all fixed on the right rear of the upper surface of the panel 20. The scanner 17 is located on the right side of the one-key detection button 16, and the card reader 18 is located on the right side of the scanner 17. The touch screen 19 is fixed on the right side of the upper surface of the panel 20. The program is operated through the touch screen 19. The one-key detection button 16 is equivalent to the detection button of the touch screen 19. During the detection process, the scanner 17 is used to scan the code to read the cutting piece information. The card reader 18 is used to read the work number and confirm the operator.

[0077] Turn on the main power switch 10 to power the inspection device, turn on the top light switch 14 to provide light for the top layer 2 of the camera, put the cut piece to be inspected at a suitable position on the backlight plate 15, press and hold the push plate 322 to push to the left, the ball 324 rolls to the left along the track 313, and the push plate 322 drives the shielding plate 321 and the limiting body 325 to move to the left. Since the limiting body 325 protrudes from the No. 1 fixing hole 312, as the limiting body 325 moves to the left, the left edge of the No. 1 fixing hole 312 The first horizontal plate 311 squeezes the arc top 3252, and the arc top 3252 is deformed under pressure and extends to both sides, while the first connecting body 3251 is fixed on the upper surface of the shielding plate 321 and cannot move to the right. The arc top 3252 pushes the second connecting body 3253 to move downward and leftward, and the top block 3254 is squeezed to the upper surface of the shielding plate 321 and slides to the left. The cross section of the top block 3254 is triangular, and its lower surface is parallel to the upper surface of the shielding plate 321, which increases the contact area between the two and reduces The pressure on the upper surface of the shielding plate 321 prevents the top block 3254 from breaking the shielding plate 321 under the action of pressure. When the arc top 3252 is squeezed out of the No. 1 fixing hole 312, the limiting body 325 is separated from the No. 1 fixing hole 312, and the No. 1 fixing hole 312 loses the restriction on the shielding group 32. The shielding group 32 continues to move to the left and leaves the No. 2 light-transmitting opening 317. Then the limiting body 325 is squeezed downward by the No. 2 cross plate 315 and deformed. The arc top 3252 enters the No. 2 fixing hole 312. In the fixing hole 316, the No. 2 fixing hole 316 limits the shielding group 32 to the left side of the No. 2 light-transmitting port 317 to prevent the shielding group 32 from moving rightward to block the No. 2 light-transmitting port 317. The lens of the industrial camera installed in the top layer 2 of the camera shoots the cut piece placed on the backlight panel 15 through the No. 1 light-transmitting port 21 and the No. 2 light-transmitting port 317. After shooting, the photographed cut piece information is detected and compared through the touch screen 19 or by pressing the one-key detection button 16 to determine whether the cut piece is qualified. After the detection is completed, turn off the top light switch 14 and the main power switch 10 in turn, press and hold the push plate 322 to push to the right, the ball 324 rolls to the right along the track 313, the push plate 322 drives the shielding plate 321 and the limit body 325 to move to the right, the limit body 325 leaves the second fixing hole 316 and enters the first fixing hole 312, and fixes the shielding group 32 at the second light-transmitting port 317 again to block the lens of the industrial camera to prevent foreign objects from damaging the lens, affecting the shooting effect, and causing inaccurate detection results.

[0078] On the other hand, this embodiment also provides a method for visual inspection of cut pieces, comprising the following steps:

[0079] S1. Obtain the cut piece image by taking a photo with an industrial camera, segment the deformation area, and use the calibration data to correct the position and posture of the cut piece image;

[0080] In this example, the specific steps of using calibration data to correct the position and posture of the cut piece image are as follows:

[0081] S1.1. When the camera model is a radial distortion model, the distortion model can be expressed as:

[0082] u=α u (x(1+k1r 2 +k2r 4 +…)+2p1xy+p2(r 2 +2x 2 ))+c x ;

[0083] v=α v (y(1+k1r 2 +k2r 4 +…)+2p2xy+p1(r 2 +2y 2 ))+c y ;

[0084] Where (u, v) represents the distorted image coordinates; (x, y) represents the undistorted image coordinates;

[0085] (c x , c y ) represents the coordinates of the center point of the image; α u Indicates the scale factor of the x-axis; α v represents the scale factor of the y-axis; k1, k2... represent the radial distortion coefficient; r represents the distance from the pixel to the center of the image; p1, p2... represent the tangential distortion coefficient;

[0086] S1.2, find the coordinates of the undistorted image after iteration;

[0087]

[0088] Where (x′, y′) is the undistorted image coordinate after iteration; r′ represents the distance from the pixel to the center of the image after iteration;

[0089] S1.3. Use the rotation matrix R and translation vector t obtained by calibration to construct the transformation matrix H -1 , then apply the inverse transform H -1 To correct the image pose;

[0090] Among them, the inverse transform H -1 Specifically:

[0091] X w =R -1 (X c -t);

[0092] Among them, X w Represents a point in the world coordinate system; X cRepresents a point in the camera coordinate system;

[0093] S1.4. Use the inverse transformed coordinates to reconstruct the rectified image.

[0094] S2, extract the largest contour, and calculate the area, perimeter and preliminarily screen similar CAD;

[0095] In this example, the expressions involved in extracting the largest contour and calculating the area, perimeter, and preliminary screening of similar CAD are as follows:

[0096] Maximum profile:

[0097]

[0098] Among them, C max represents the contour with the largest area; C represents the set of all contours; (x i ,y i ) represents the coordinates on the contour boundary; c i Represents an element in a contour collection;

[0099] Area calculation:

[0100]

[0101] Among them, A(C max ) represents the area of ​​the largest contour;

[0102] Maximum profile:

[0103]

[0104] Among them, P(C max ) represents the perimeter of the largest contour; Indicates the boundary of the contour; (x i +y i ) and (x i+1 ,y i+1 ) represents the coordinates of adjacent pixels on the contour boundary.

[0105] S3, displacing the CAD, using the selected CAD to scale, mirror, fit and further select the CAD;

[0106] In this example, the selected CAD is used for scaling, mirroring, and fitting. The specific steps for further selecting CAD are as follows:

[0107] S3.1. Process the inner rectangle of the outer contour and merge the scattered line segments to form the inner contour

[0108] S3.2, split the combined contour and extract its diagonal and center;

[0109] Specifically, the four vertices of the rectangle are: (x1, y1), (x2, y2), (x3, y3), (x4, y4);

[0110] The length of the diagonal is expressed as:

[0111] The coordinates of the midpoint of the rectangle are:

[0112] S3.3, the CAD contour is processed in the same way and compared with the center position and diagonal position of the cut piece contour;

[0113] Specifically, the center position difference:

[0114]

[0115] in, Indicates the center position of the CAD contour; Indicates the center position of the circle of the cut piece outline;

[0116] Diagonal length difference:

[0117] Δd=|d CAD -d 裁片 |;

[0118] Among them, d CAD Indicates the diagonal length of the CAD contour; d 裁片 Indicates the diagonal length of the cut piece outline;

[0119] S3.4, cycle through the CAD circular holes and select the circular holes of the cut pieces that can be fitted within the range;

[0120] S3.5, calculate the CAD circle center position and the cut piece circle center position, and obtain the offset distance;

[0121] S3.6, calculate the maximum distance between the CAD circle and the cut piece circle, and obtain the standard deviation;

[0122] Specifically, the maximum position difference:

[0123]

[0124] S3.7. Finally, the processed CAD image, processed cut piece image, diagonal data, and coordinate data are obtained.

[0125] S4, extracting the CAD eye knife coordinates and comparing them with the eye knife feature points of the cut piece to obtain the eye knife offset and eye knife depth data.

[0126] In this example, the specific steps for extracting CAD eye knife coordinates and comparing them with the eye knife feature points of the cutter are as follows:

[0127] S4.1, extracting CAD eye knives, and extracting the cutting eye knives again through the extracted CAD eye knives;

[0128] S4.2, take the center point of the CAD eye knife, and compare it with the center point of the cutter eye knife to obtain the eye knife offset value;

[0129] Specifically, the offset between the center points is:

[0130]

[0131] in, Indicates the coordinates of the center point of the CAD eye knife; Indicates the coordinates of the center point of the cutting eye;

[0132] S4.3. Finally, the processed CAD image, processed cut piece image, eye knife offset, and eye knife depth data are obtained.

[0133] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technical personnel in this field can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present invention. However, any brief modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of the technical solution of the present invention.

Claims

1. A visual inspection method for cutting pieces, characterized in that: The specific steps are as follows: S1. Obtain the cut piece image by taking a photo with an industrial camera, segment the deformation area, and use the calibration data to correct the position and posture of the cut piece image; S2, extract the largest contour, and calculate the area, perimeter and preliminarily screen similar CAD; S3, displacing the CAD, using the selected CAD to scale, mirror, fit and further select the CAD; S4, extracting the CAD eye knife coordinates and comparing them with the eye knife feature points of the cut piece to obtain the eye knife offset and eye knife depth data.

2. The visual inspection method for cutting pieces according to claim 1, characterized in that: In S1, the specific steps of using the calibration data to perform posture correction on the cut piece image are: S1.

1. When the camera model is a radial distortion model, the distortion model can be expressed as: u=α u (x(1+k1r 2 +k2r 4 +…)+2p1xy+p2(r 2 +2x 2 ))+c x ; v=α v (y(1+k1r 2 +k2r 4 +…)+2p2xy+p1(r 2 +2y 2 ))+c y ; Where (u, v) represents the distorted image coordinates; (x, y) represents the undistorted image coordinates; (c x , c y ) represents the coordinates of the center point of the image; α u Indicates the scale factor of the x-axis; α v represents the scale factor of the y-axis; k1, k2... represent the radial distortion coefficient; r represents the distance from the pixel to the center of the image; p1, p2... represent the tangential distortion coefficient; S1.2, find the coordinates of the undistorted image after iteration; Where (x′, y′) is the undistorted image coordinate after iteration; r′ represents the distance from the pixel to the center of the image after iteration; S1.

3. Use the rotation matrix R and translation vector t obtained by calibration to construct the transformation matrix H -1 , then apply the inverse transform H -1 To correct the image pose; Among them, the inverse transform H -1 Specifically: X w =R -1 (X c -t); Among them, X w Represents a point in the world coordinate system; X c Represents a point in the camera coordinate system; S1.

4. Use the inverse transformed coordinates to reconstruct the rectified image.

3. The visual inspection method for cutting pieces according to claim 2, characterized in that: In S2, the maximum contour is extracted, and the area, perimeter and the initial screening of similar CAD are calculated. The expressions involved are specifically: Maximum profile: Among them, C max represents the contour with the largest area; C represents the set of all contours; (x i ,y i ) represents the coordinates on the contour boundary; c i Represents an element in a contour collection; Area calculation: Among them, A(C max ) represents the area of ​​the largest contour; Maximum profile: Among them, P(C max ) represents the perimeter of the largest contour; Indicates the boundary of the contour; (x i +y i ) and (x i+1 ,y i+1 ) represents the coordinates of adjacent pixels on the contour boundary.

4. The visual inspection method for cutting pieces according to claim 3, characterized in that: In S3, the selected CAD is used for scaling, mirroring, fitting and further selecting the CAD. The specific steps are: S3.

1. Process the inner rectangle of the outer contour and merge the scattered line segments to form the inner contour S3.2, split the combined contour and extract its diagonal and center; S3.3, the CAD contour is processed in the same way and compared with the center position and diagonal position of the cut piece contour; S3.4, cycle through the CAD circular holes and select the circular holes of the cut pieces that can be fitted within the range; S3.5, calculate the CAD circle center position and the cut piece circle center position, and obtain the offset distance; S3.6, calculate the maximum distance between the CAD circle and the cut piece circle, and obtain the standard deviation; S3.7, finally obtaining the processed CAD image, processed cut piece image, diagonal data, and coordinate data; In S4, the specific steps of extracting the CAD eye knife coordinates and comparing them with the cut piece eye knife feature points are as follows: S4.1, extracting CAD eye knives, and extracting the cutting eye knives again through the extracted CAD eye knives; S4.2, take the center point of the CAD eye knife, and compare it with the center point of the cutter eye knife to obtain the eye knife offset value; S4.

3. Finally, the processed CAD image, processed cut piece image, eye knife offset, and eye knife depth data are obtained.

5. A visual inspection device for cutting pieces, which performs inspection based on the visual inspection method for cutting pieces according to any one of claims 1 to 4, characterized in that: include: A machine body (1), wherein the machine body (1) is used to place cut pieces; A camera top layer (2), the camera top layer (2) is used to install an industrial camera, a light-transmitting port (21) is provided at the bottom of the camera top layer (2), and a lens of the industrial camera faces the light-transmitting port (21).

6. The cut piece visual inspection device according to claim 5, characterized in that: The machine body (1) comprises a support group and a detection group, wherein the detection group is arranged on the support group, and the support group comprises two cabinets (11), a plurality of pulleys (12), a bracket (13), a backlight plate (15) and a panel (20), wherein the pulleys (12) are fixedly arranged on the bottom surface of the cabinets (11), a panel (20) is fixedly arranged between the two cabinets (11), the backlight plate (15) is fixedly arranged on the panel (20), the bracket (13) is fixedly arranged on the side of the upper surface of the panel (20), and the top layer (2) of the camera is fixedly arranged on the top of the bracket (13).

7. The cut piece visual inspection device according to claim 6, characterized in that: The detection group comprises a main power switch (10), a top light switch (14), a one-key detection button (16), a scanner (17), a card reader (18) and a touch screen (19); the main power switch (10) is fixedly arranged on the front of a cabinet (11) on one side; the top light switch (14) is fixedly arranged on the front of a cabinet (11) on the other side; the one-key detection button (16), the scanner (17) and the card reader (18) are all fixedly arranged on the right rear of the upper surface of a panel (20); the scanner (17) is located on the right side of the one-key detection button (16); the card reader (18) is located on the right side of the scanner (17); and the touch screen (19) is fixedly arranged on the right side of the upper surface of the panel (20).