Device for optically detecting undercut grooves and optical detection system for undercut grooves
By designing a device for optical detection of the sinking grooves, using a binocular optical lens module and a robot control system, efficient and accurate measurement of the sinking grooves of the shaft-type parts is achieved, which solves the cumbersome problems of traditional artificial quality inspection and improves the measurement efficiency and the accuracy of data analysis.
Patent Information
- Application Number
- CN202111419573.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-26
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2041-11-26
AI Technical Summary
Traditional shaft parts quality inspection relies on manual sampling, which is cumbersome and labor-intensive, and cannot form formatted data storage, affecting product quality traceability and production line improvement.
A device for optical detection of the sinking groove is designed, including a robot, a measurement system, a binocular optical lens module and a robot control system, to realize non-contact and efficient measurement of the sinking groove of the shaft-type parts, and the measurement data can be quantified and analyzed.
It realizes high flexibility and high precision measurement, adapts to various types of shaft parts, eliminates robot positioning errors, supports automated production lines, and improves measurement efficiency and data analysis accuracy.
Smart Images

Figure CN114152202B_ABST
Abstract
Description
Technical Field
[0001] The invention discloses a device for optically detecting undercut grooves, belongs to the technical field of shaft parts detection, and specifically discloses a device for optically detecting undercut grooves and an optical detection system for undercut grooves. Background Art
[0002] Shaft parts are widely used in various industries, especially in automobile assembly production. In the manufacture of some shaft parts, the final products shipped out of the factory need to be measured in size and evaluated for product quality according to strict standards, and the records are recorded and analyzed to guide subsequent production. Traditional measurements use manual sampling and handheld instruments for operation, and data recording is mainly manual transcription. So far, this is still the quality inspection method for most shaft parts manufacturers. Manual quality inspection is cumbersome and labor-intensive, and requires high standards for quality inspectors. In addition, the personal subjectivity of quality inspectors will have a certain impact on measurement and quality evaluation. Quality inspection data cannot be stored in formatted data, which is not conducive to subsequent product quality traceability and improvement of production lines based on quality inspection data to improve product qualification rate. Summary of the invention
[0003] In view of the technical problems existing in the prior art, the present invention provides a device for optically detecting undercut grooves and an optical detection system for undercut grooves, which have high measurement flexibility and high measurement accuracy, are compatible with various automatic production lines, and are suitable for non-contact and efficient measurement of undercut grooves of various types of shaft parts, and the measurement data can be quantified and analyzed.
[0004] The present invention discloses a device for optically detecting undercut grooves, comprising a manipulator, a measuring system, a binocular optical lens module, and a manipulator control system, wherein the manipulator control system is electrically connected to the manipulator, and the binocular optical lens module is connected to the moving end of the manipulator; the binocular optical lens module comprises a frame for connecting the manipulator, the frame is provided with V-shaped positioning blocks and U-shaped cantilevers which are arranged at intervals along the axial direction of a shaft part to be measured, the U-shaped cantilever is provided with two groups of shooting units which are arranged at intervals up and down and are used for shooting the undercut grooves on the shaft part to be measured, each shooting unit comprises a coaxially arranged camera and an illumination light source, the camera and the illumination light source are symmetrically arranged on both sides of the shaft part to be measured, and the camera is electrically connected to the measuring system.
[0005] In a preferred embodiment of the present invention, the symmetry axis of the V-shaped positioning block coincides with the symmetry axis of the U-shaped cantilever.
[0006] In a preferred embodiment of the present invention, the V-shaped positioning block includes two positioning inclined surfaces which are symmetrically arranged relative to the central axis of the shaft part to be measured.
[0007] In a preferred embodiment of the present invention, a quick-change connector for connecting to the robot is provided on the frame.
[0008] The present invention also discloses a device for optically detecting undercut grooves, which comprises a support frame for positioning and carrying shaft parts to be measured, a three-axis motion unit is arranged next to the support frame, and the mobile end of the three-axis motion unit is connected to an image acquisition and processing unit; the three-axis motion unit comprises a fixed gantry, and a processing unit is arranged on the fixed gantry, and a first linear module arranged along the axial direction of the shaft parts to be measured is arranged on the fixed gantry, the mobile end of the first linear module is connected to a second linear module arranged perpendicularly thereto, and the mobile end of the second linear module is provided with a third linear module arranged in a vertical direction, and a connecting cantilever is symmetrically arranged on the mobile end of the third linear module, and two groups of image acquisition and processing units arranged in an upper and lower interval are arranged on the connecting cantilever, each image acquisition and processing unit comprises a shooting camera, a light source and a data processing unit, the shooting camera and the light source are coaxially arranged, the shooting camera and the data processing unit are electrically connected, and the shooting camera and the light source are symmetrically arranged on both sides of the shaft parts to be measured.
[0009] In a preferred embodiment of the present invention, the support frame is connected with a stepping transmission unit for driving it to move along the axial direction of the shaft part to be measured.
[0010] In a preferred embodiment of the present invention, an infrared trigger unit for triggering a camera to take pictures is arranged next to the support stand.
[0011] In a preferred embodiment of the present invention, the connecting cantilever is H-shaped.
[0012] In a preferred embodiment of the present invention, the fixed gantry includes bases symmetrically arranged on both sides of the supporting platform and a gantry connected to the two bases.
[0013] The invention also discloses an optical detection system for undercut grooves, which comprises a device for optically detecting undercut grooves.
[0014] The beneficial effects of the present invention are as follows: the present invention has a simple structure and is easy to use. It realizes automatic measurement of shaft countersunk grooves by using a binocular optical system module. It has high measurement flexibility and high measurement accuracy. It can be deployed online and is suitable for non-contact and efficient measurement of countersunk grooves of various types of shaft parts. The measurement data can be quantified and analyzed, and it has good foresight. Future products may develop in this direction. Furthermore, the V-shaped positioning block of the present invention can eliminate the mechanical positioning error of the manipulator, thereby automatically, highly accurately and flexibly measuring parameters such as the countersunk groove radius, the countersunk groove center distance, and the countersunk groove bottom edge spacing of shaft parts. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is a schematic diagram of a device for optically detecting undercut grooves of the present invention;
[0016] Figure 2 It is a front view of a device for optically detecting undercut grooves of the present invention;
[0017] Figure 3 This is a side view of a device for optically detecting undercut grooves of the present invention.
[0018] Figure 4 It is a schematic diagram of a device for optically detecting undercut grooves of the present invention;
[0019] Figure 5 This is a working flow chart of a device for optically detecting undercut grooves of the present invention;
[0020] Figure 6 It is a schematic diagram of the shooting state of a device for optically detecting undercut grooves of the present invention;
[0021] Figure 7 It is a schematic diagram of a coordinate system of a device for optically detecting undercut grooves of the present invention;
[0022] Figure 8 It is a camera schematic diagram of a device for optically detecting undercut grooves of the present invention;
[0023] Fig. 9 It is a measurement schematic diagram of a device for optically detecting undercut grooves of the present invention;
[0024] In the figure: 1-manipulator; 2-measuring system; 3-binocular optical lens module; 4-manipulator control system; 5-axis parts to be measured; 6-supporting stand; 7-stepping transmission unit; 8-three-axis motion unit; 9-infrared trigger unit; 10-image acquisition and processing unit; 31-frame; 32-V-type positioning block; 33-U-type cantilever; 34-camera; 35-illumination light source; 51-cutting groove; 81-fixed gantry; 82-first linear module; 83-second linear module; 84-third linear module; 85-connecting cantilever; 101-shooting camera; 102-light source. DETAILED DESCRIPTION
[0025] The technical solution of the present invention (including the preferred technical solution) is further described in detail below by means of the accompanying drawings and by listing some optional embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0026] In the description of the present application, it should be noted that the terms "upper", "lower", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application. Unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be a connection between the two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances.
[0027] Further, in this application, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0028] The present invention discloses a device for optically detecting undercut grooves, comprising a manipulator 1, a measuring system 2, a binocular optical lens module 3, and a manipulator control system 4, wherein the manipulator control system 4 is electrically connected to the manipulator 1, and the binocular optical lens module 3 is connected to the moving end of the manipulator 1; the binocular optical lens module 3 comprises a frame 31 for connecting the manipulator 1, and the frame 31 is provided with V-shaped positioning blocks 32 and U-shaped cantilever 33 arranged along the axial direction of the shaft part 5 to be measured, and the U-shaped cantilever 33 is provided with two groups of shooting units arranged in an upper and lower interval for shooting the undercut grooves on the shaft part 5 to be measured, each shooting unit comprises a coaxially arranged camera 34 and an illumination light source 35, the camera 34 and the illumination light source 35 are symmetrically arranged on both sides of the shaft part 5 to be measured, and the camera 34 is electrically connected to the measuring system 2.
[0029] In a preferred embodiment of the present invention, the symmetry axis of the V-shaped positioning block 32 coincides with the symmetry axis of the U-shaped cantilever 33 .
[0030] In a preferred embodiment of the present invention, the V-shaped positioning block 32 includes two positioning inclined surfaces that are symmetrically arranged relative to the central axis of the shaft-like part 5 to be measured.
[0031] In a preferred embodiment of the present invention, a quick-change connector for connecting the robot 1 is provided on the frame 31 .
[0032] In a preferred embodiment of the present invention, the binocular optical lens module 3 can move along the axis of the shaft part 5 to be measured, adjust the focal length, and perform 180-degree rotation and reversal along the quick-change joint under the control of the robot 1.
[0033] The working steps of the present invention include:
[0034] Step 1: Fix the binocular optical system and the motion control manipulator through a quick-change joint;
[0035] Step 2: Fix the shaft parts, or deploy the manipulator to the line so that the shaft parts are within the range of the manipulator;
[0036] Step 3: Use the calibration board to calibrate the binocular optical system, adjust the lens focal length and light source distance to make the image clear, eliminate lens distortion and determine the world coordinate system;
[0037] Step 4: By teaching the motion control system or inputting the coordinates of the undercut groove according to the drawing, the manipulator can automatically move with the binocular optical system to the top of each position of the shaft part where the size of the undercut groove needs to be measured, so that the lens axis and the center of the undercut groove are on the same vertical plane;
[0038] Step 5: The robot arm determines whether to rotate the optical module and the V-shaped block 180 degrees along the Z axis according to whether the undercut groove is on the left or right side, so that the V-shaped positioning block will not interfere with the undercut groove;
[0039] Step 6: The manipulator descends to make the V-shaped positioning block stuck on the crankshaft, and the V-shaped positioning block ensures that the center line of the optical path of the optical system is perpendicular to the axis and the image of the sunken groove taken by the binocular lens is clear and sharp;
[0040] Step 7. When running to each countersink groove position, the measurement software takes pictures of the upper and lower countersink grooves, and after the distortion elimination algorithm and image stitching synthesis, the countersink groove center distance, bottom edge distance, countersink groove radius and other measurement values are calculated by circle fitting, line search, angle calculation and other operators;
[0041] Step 6: Each measurement data is saved to the database for analysis by the user;
[0042] Step 7. The motion control system records the coordinate schemes of different products and saves them as product formula programs. Different products can be executed by calling different formula programs with just one click, which can achieve fast and efficient production change.
[0043] The present invention also discloses a device for optically detecting undercut grooves, which includes a support stand 6 for positioning and carrying a shaft part 5 to be measured, a three-axis motion unit 8 is arranged next to the support stand 6, and the mobile end of the three-axis motion unit 8 is connected to an image acquisition and processing unit 10; the three-axis motion unit 8 includes a fixed gantry 81, a processing unit is arranged on the fixed gantry 81, a first linear module 82 arranged along the axial direction of the shaft part 5 to be measured is arranged on the fixed gantry 81, the mobile end of the first linear module 82 is connected to a second linear module 83 arranged perpendicularly thereto, and the mobile end of the second linear module 83 is provided with A third linear module 84 is arranged in the vertical direction, and a connecting cantilever 85 is symmetrically arranged on the movable end of the third linear module 84. Two groups of image acquisition and processing units 10 are arranged in an upper and lower interval on the connecting cantilever 85. Each image acquisition and processing unit 10 includes a shooting camera 101, a light source 102 and a data processing unit. The shooting camera 101 and the light source 102 are coaxially arranged, and the shooting camera 101 is electrically connected to the data processing unit. The two image acquisition and processing units 10 can share one data processing unit. The shooting camera 101 and the light source 102 are symmetrically arranged on both sides of the shaft part 5 to be measured.
[0044] In a preferred embodiment of the present invention, the first linear module 82, the second linear module 83, and the third linear module 84 can use slide modules, and any two of the first linear module 82, the second linear module 83, and the third linear module 84 are arranged perpendicular to each other.
[0045] In a preferred embodiment of the present invention, the image acquisition and processing unit 10 can be used to acquire and process part images and obtain processing results, and the obtained results include the shaft diameter dimensions of each section of the shaft parts and the contour modeling dot matrix information.
[0046] In a preferred embodiment of the present invention, a stepping transmission unit 7 is connected to the support stand 6 for driving it to move axially along the shaft part 5 to be tested. The stepping transmission unit 7 may include a stepping motor, a stepping motor controller, and a transmission structure. The stepping transmission unit 7 communicates with the industrial computer through a PLC, and the industrial computer sends a speed control signal to the motor controller to control the transmission of the part to be tested on the support stand 6.
[0047] In a preferred embodiment of the present invention, an infrared trigger unit 9 for triggering a camera to take pictures is arranged next to the support stand 6. The infrared trigger unit 9 includes an infrared transmitting and receiving device. The infrared transmitting port is aligned with the receiving port, and the connection line between the transmitting device and the receiving device is perpendicular to the longitudinal axis of the support stand 6. When the shaft part 5 to be measured is transmitted to a preset area, the infrared light is blocked, and the infrared trigger unit 9 generates a pulse signal, which is transmitted to the industrial computer through the IO interface board. The industrial computer triggers the shooting camera 84 to capture pictures.
[0048] In a preferred embodiment of the present invention, the camera 84 can be a 10 million pixel array industrial camera; the end of the camera 84 is equipped with an industrial lens with good anti-distortion performance, and the light source 85 is a high-collimation industrial light source. The part to be tested triggers the infrared trigger unit 9 to generate a photo pulse signal and sends it to the industrial computer, which triggers the camera 84 to take a photo of the part and processes it to obtain the result.
[0049] In a preferred embodiment of the present invention, the connecting cantilever 85 is H-shaped.
[0050] In a preferred embodiment of the present invention, the fixed gantry 81 includes bases symmetrically arranged on both sides of the support frame 6 and a gantry connected to the two bases.
[0051] The invention also discloses an optical detection system for undercut grooves, which comprises a device for optically detecting undercut grooves.
[0052] The operating method of the present invention is further explained below in conjunction with the accompanying drawings:
[0053] Advanced calibration, the calibration steps are:
[0054] Step 1: Fix the lens and light source, and adjust the center lines of the single set of lens and light source so that they are in a straight line.
[0055] Step 2: Adjust the center lines of the two optical lens systems to collimate, and adjust the distance between the two lens systems according to the length of the calibration plate so that the midpoints of the boundaries on both sides of the measured object fall on the center line of the optical system as much as possible.
[0056] Step 3: Adjust the calibration plate or binocular vision system to make the pictures taken by both cameras as clear as possible.
[0057] Step 4: Start the image processing unit, take projection photos of the upper and lower ends of the calibration part, eliminate the radial distortion of the two lenses, eliminate the tangential distortion, and calculate the coefficients of the elimination equations of radial distortion and tangential distortion.
[0058] The steps to eliminate distortion are:
[0059] k1, k2 are radial distortion parameters, p1, p2 are tangential distortion parameters, r 2 is the known radius of the distortion circle, (x, y) is the coordinate point of the image before distortion, (x^, y^) is the coordinate point after correction, because (x^, y^) is a checkerboard or dot calibration map, its coordinates are known, (x, y) is the coordinate of the actual image, therefore, the k1, k2 and p1, p2 parameters of each pixel can be calculated through (x^, y^) and (x, y).
[0060] For mirror distortion, substitute the captured image into formulas 1 and 2 for calculation:
[0061] x^=x+x[k1(x 2 +y 2 ) 2 +k2(x 2 +y 2 ) 2 ] (1)
[0062] y^=y+y[k1(x 2 +y 2 ) 2 +k2(x 2 +y 2 ) 2 ] (2)
[0063] For tangential distortion, as shown in formulas 3 and 4:
[0064] x^=x+[2p1xy+p2(r 2 +2x 2 )] (3)
[0065] y^=y+[2p1(r 2 +2y 2 )+2p2xy] (4)
[0066] Step 5: De-distort the image together with the width W of the calibration plate a and length L a Calculation is performed to obtain the rotation angle θ1, θ2 of each camera relative to the calibration plate, the unit pixel μ1, μ2 and the midpoints P1, P2 of the upper and lower image calibration plates through edge search, line segment measurement and two-dimensional coordinate transformation. p1 ,y p1 ) and P2(x p2 ,y p2 ) coordinates according to the known size of the calibration plate, according to W a The mapping points of P1 and P2 in the world coordinate system are:
[0067] x wp1 =x wp2 =0 (5)
[0068]
[0069]
[0070] The pixel width of the calibration plate measured by the upper camera is recorded as W U , the pixel width value measured by the lower camera is recorded as W L , then the calculation method of μ1 and μ2 is as follows:
[0071]
[0072]
[0073] Through the above steps, the coordinate axis direction, the origin, and the mapping point of each point in the upper and lower cameras in the world coordinate system can be obtained.
[0074] For the upper camera, its internal point is (x u ,y u ), the corresponding point in the world coordinate system is (x world ,y world ):
[0075] x world =cosθ1μ1(x u -x p1 ) (8)
[0076] y world = sinθ1μ1(y u -y wp1 ) (9)
[0077] For the lower camera, its internal point is (x l ,y l ), the corresponding point in the world coordinate system is (x world ,y world ):
[0078] x world =cosθ1μ2(x u -x p2 ) (10)
[0079] y world =cosθ1μ2(y u +y wp2 ) (11)
[0080] Step 6: After the calibration plate image is recalculated and outputted through the radial distortion and tangential distortion equations with determined coefficients, the world coordinate system based on the calibration plate and the center line of the binocular vision system is calculated on this basis.
[0081] The measurement is performed on the calibrated parameters. The measurement steps are as follows:
[0082] Step 1: Based on the calibrated camera lens and frame, place the shaft part between the two sets of lenses, so that one set of lenses can clearly capture the projection of the undercut groove of the shaft part, and the other set of lenses can clearly capture the projection of the undercut groove on the other side.
[0083] Step 2: Use a camera to take two photos of the undercut grooves of shaft parts, and input them into the visual processing unit for image calculation.
[0084] Step 3: The visual processing system maps the two images according to the calibrated world coordinate system, and then synthesizes and outputs them into one image.
[0085] Step 4: On this stitched image, Figure 3 , fit the center of the sinking groove by the least square method, find the center of the upper sinking groove and the lower sinking groove and record it as C u (x u ,y u ), C l (x l ,y l ), and converted into points C1(x1, y1) and C2(x2, y2) in the world coordinate system according to formulas (8), (9), (10), (11), then the center distance D1 of the undercut groove is:
[0086]
[0087] Because the line connecting the two circle centers may not be the axis of the vertical axis, its x1 and x2 may not be equal, so the center of the upper and lower sinking grooves may be offset.
[0088] Step 5: Fit the upper and lower camera lines to the contours, determine the upper and lower outer diameter line equations, select two points at the contour fitting points, and convert them into points in the world coordinate system using formulas (8), (9), (10), (11), where:
[0089] The upper camera point is denoted as: a u1 (x1, y1)a u2 (x2, y2)
[0090] The lower camera point is recorded as: a l1 (x3, y4)a l2 (x3, y4)
[0091] The equation of the line is:
[0092]
[0093] Since the two lines are not necessarily parallel, the upper camera point a is used.u1 (x1, y1) to solve the distance to the lower camera straight line, and then find the axis diameter, recorded as D2:
[0094] Assume the fitted straight line of the following camera is:
[0095] ax+by+c=0 (14)
[0096] in
[0097]
[0098] but
[0099]
[0100] Those skilled in the art will readily appreciate that the above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, combinations, replacements, improvements, etc. made within the spirit and principles of the present invention are included within the protection scope of the present invention.
Claims
1. A device for optically detecting undercut grooves, characterized in that: The invention comprises a manipulator (1), a measuring system (2), a binocular optical lens module (3), and a manipulator control system (4); the manipulator control system (4) is electrically connected to the manipulator (1); the binocular optical lens module (3) is connected to the moving end of the manipulator (1); the binocular optical lens module (3) comprises a frame (31) for connecting to the manipulator (1); the frame (31) is provided with V-shaped positioning blocks (32) and a U-shaped cantilever (33) arranged at intervals along the axial direction of the shaft part (5) to be measured; the U-shaped cantilever (33) is provided with two groups of upper and lower spaced-apart positioning blocks for photographing the shaft part to be measured. The measuring system (2) comprises a camera unit for measuring a groove on a shaft part (5), each of the camera units comprising a coaxially arranged camera (34) and an illumination light source (35), the camera (34) and the illumination light source (35) being symmetrically arranged on both sides of the shaft part (5) to be measured, the camera (34) being electrically connected to the measuring system (2); the symmetry axis of the V-shaped positioning block (32) coincides with the symmetry axis of the U-shaped cantilever (33); the V-shaped positioning block (32) comprises two positioning inclined surfaces symmetrically arranged relative to the central axis of the shaft part (5) to be measured; the frame (31) is provided with a quick-change joint for connecting the manipulator (1); The working steps of the device for optically detecting undercut grooves include: Step 1: Fix the binocular optical system and the motion control manipulator through a quick-change joint; Step 2: Fix the shaft parts, or deploy the manipulator to the line so that the shaft parts are within the range of the manipulator; Step 3: Use the calibration board to calibrate the binocular optical system, adjust the lens focal length and light source distance to make the image clear, eliminate lens distortion and determine the world coordinate system; Step 4: By teaching the motion control system or inputting the coordinates of the undercut groove according to the drawing, the manipulator can automatically move with the binocular optical system to the top of each position of the shaft part where the size of the undercut groove needs to be measured, so that the lens axis and the center of the undercut groove are on the same vertical plane; Step 5: The robot arm determines whether to rotate the optical module and the V-shaped block 180 degrees along the Z axis according to whether the undercut groove is on the left or right side, so that the V-shaped positioning block will not interfere with the undercut groove; Step 6: The manipulator descends to make the V-shaped positioning block stuck on the crankshaft, and the V-shaped positioning block ensures that the center line of the optical path of the optical system is perpendicular to the axis and the image of the sunken groove taken by the binocular lens is clear and sharp; Step 7. When running to each countersink groove position, the measurement software takes pictures of the upper and lower countersink grooves, and after the distortion elimination algorithm and image stitching synthesis, the countersink groove center distance, bottom edge distance, countersink groove radius and other measurement values are calculated by circle fitting, line search, angle calculation and other operators; Step 6: Each measurement data is saved to the database for analysis by the user; Step 7. The motion control system records the coordinate schemes of different products and saves them as product formula programs. Different products can be executed by calling different formula programs with one click, realizing fast and efficient production change; The calibration steps include: Step 1: Fix the lens and light source, and adjust the center lines of the single set of lens and light source so that they are in a straight line; Step 2: Adjust the center lines of the two optical lens systems to collimate, and adjust the distance between the two lens systems according to the length of the calibration plate so that the midpoints of the boundaries on both sides of the measured object fall on the center line of the optical system; Step 3: Adjust the calibration plate or binocular vision system to make the pictures taken by both cameras as clear as possible; Step 4: Start the image processing unit, take the projection photos of the upper and lower ends of the calibration object, eliminate the radial distortion of the two lenses, eliminate the tangential distortion, and calculate the coefficients of the elimination equations of radial distortion and tangential distortion. The steps to eliminate distortion are: k1, k2 are radial distortion parameters, p1, p2 are tangential distortion parameters, r 2 is the known radius of the distortion circle, (x, y) is the coordinate point of the image before distortion, (x ^ ,y ^ ) is the corrected coordinate point, because (x ^ ,y ^ ) is a checkerboard or dot calibration image, whose coordinates are known, and (x, y) is the coordinates of the actual image. Therefore, through (x ^ ,y ^ ) and (x, y) can calculate the k1, k2 and p1, p2 parameters for each pixel For mirror distortion, substitute the captured image into formula 1 and 2 for calculation: x ^ =x+x[k1(x 2 +y 2 ) 2 +k2(x 2 +y 2 ) 2 ] (1) and ^ =y+y[k1(x 2 +y 2 ) 2 +k2(x 2 +y 2 ) 2 ] (2) For tangential distortion, as shown in formulas 3 and 4: x^=x+[2p1xy+p2(r 2 +2x 2 )] (3) <h2 style=";text-align:left;direction:ltr">y^=y+[2p1(r<h2 style=";text-align:left;direction:ltr"> 2 <h2 style=";text-align:left;direction:ltr"> +2y<h2 style=";text-align:left;direction:ltr"> 2 <h2 style=";text-align:left;direction:ltr"> )+2p2xy] (4) Step 5: De-distort the image together with the width W of the calibration plate a and length L a Calculation is performed to obtain the rotation angle θ1, θ2 of each camera relative to the calibration plate, the unit pixel μ1, μ2 and the midpoints P1, P2 of the upper and lower image calibration plates through edge search, line segment measurement and two-dimensional coordinate transformation. p1 ,y p1 ) and P2(x p2 ,y p2 ) coordinates according to the known size of the calibration plate, according to W a The mapping points of P1 and P2 in the world coordinate system are: P1(x p1 ,y p1 )The coordinates of the mapping point in the world coordinate system are (x wp1 ,y wp1 ), P2(x p2 ,y p2 )The coordinates of the mapping point in the world coordinate system are (x wp2 ,y wp2 ): x wp1 =x wp2 =0 (5) The pixel width of the calibration plate measured by the upper camera is recorded as W U , the pixel width value measured by the lower camera is recorded as W L , then the calculation method of μ1 and μ2 is as follows: Through the above steps, the coordinate axis direction and origin of the world coordinate system, as well as the mapping of each point in the upper and lower cameras in the world coordinate system can be obtained; For the upper camera, its internal point is (x u ,y u ), the corresponding point in the world coordinate system is (x world ,y world ): x world =cosθ1μ1(x u -x p1 ) (8) and world =sinθ1μ1(and u -and wp1 ) (9) For the lower camera, its internal point is (x l ,y l ), the corresponding point in the world coordinate system is (x world ,y world ): x world =cosθ2μ2(x u -x p2 ) (10) and world =cosθ2μ2(and u +y wp2 ) (11) Step 6: After the calibration plate image is recalculated and outputted through the radial distortion and tangential distortion equations with determined coefficients, the world coordinate system based on the calibration plate and the center line of the binocular vision system is calculated on this basis; The measurement is performed on the calibrated parameters. The measurement steps are as follows: Step 1: Based on the calibrated camera lens and frame, place the shaft part between two sets of lenses, so that one set of lenses can clearly capture the projection of the undercut groove of the shaft part, and the other set of lenses can clearly capture the projection of the undercut groove on the other side; Step 2: Use a camera to take 2 photos of the undercut grooves of shaft parts, and input them into the visual processing unit for image calculation; Step 3: The visual processing system maps the two images into a world coordinate system according to the calibrated world coordinate system, and then synthesizes and outputs them into one image. Step 4: On this stitched image, as shown in Figure 3, the center of the sunken groove is fitted by the least square method, and the center of the upper sunken groove and the lower sunken groove is found and recorded as C u (x u ,y u ), C l (x l ,y l ), and converted into points C1(x1,y1) and C2(x2,y2) in the world coordinate system according to formulas (8), (9), (10), (11), then the center distance D1 of the undercut groove is: Because the line connecting the two circle centers may not be the axis of the vertical axis, when x1 and x2 are not equal, the center of the upper and lower sinking grooves will be offset; Step 5: Fit the upper and lower camera lines to the contours, determine the upper and lower outer diameter line equations, select two points at the contour fitting points, and convert them into points in the world coordinate system using formulas (8), (9), (10), (11), where: The upper camera point is denoted as: a u1 (x1,y1)a u2 (x2,y2) The lower camera point is recorded as: a l1 (x3,y4)a l2 (x3,y4) The equation of the line is: Since the two lines are not necessarily parallel, the upper camera point a is used. u1 (x1, y1) to solve the distance to the lower camera straight line, and then find the axis diameter, which is recorded as D2: Assume the fitted straight line of the following camera is: ax+by+c=0 (14) in but 2. An optical detection system for undercut grooves, characterized in that: A device for optically detecting undercut grooves as claimed in claim 1.
Citation Information
Patent Citations
Image collecting system of shaft detecting device and image collecting method of image collecting system
CN109883322A
Shaft part diameter measuring device
CN210741395U
Vacuum cup size measuring device based on vision
CN212567278U