CN109764807B - 2D visual detection method and detection system for engine cylinder position calibration - Google Patents

2D visual detection method and detection system for engine cylinder position calibration Download PDF

Info

Publication number
CN109764807B
CN109764807B CN201910033056.XA CN201910033056A CN109764807B CN 109764807 B CN109764807 B CN 109764807B CN 201910033056 A CN201910033056 A CN 201910033056A CN 109764807 B CN109764807 B CN 109764807B
Authority
CN
China
Prior art keywords
cylinder body
points
cylinder
distance
point
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
CN201910033056.XA
Other languages
Chinese (zh)
Other versions
CN109764807A (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.)
Guangdong Original Point Intelligent Technology Co Ltd
Original Assignee
Guangdong Original Point Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Original Point Intelligent Technology Co Ltd filed Critical Guangdong Original Point Intelligent Technology Co Ltd
Priority to CN201910033056.XA priority Critical patent/CN109764807B/en
Publication of CN109764807A publication Critical patent/CN109764807A/en
Application granted granted Critical
Publication of CN109764807B publication Critical patent/CN109764807B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Length Measuring Devices By Optical Means (AREA)

Abstract

The invention provides a 2D visual detection method and a detection system for engine cylinder position calibration, wherein the 2D visual detection method comprises the following steps: 100. determining that the cylinder body moves to the image acquisition visual field range through shooting; 200. collecting the distance between the robot and a plurality of detection points on the cylinder body; 300. in a plurality of detection points, the central positions of four cylinder holes of the cylinder body are used as positioning and grabbing points to obtain the positioning and grabbing points P of the cylinder body1Spatial coordinate values [ X, Y, Z, alpha, beta, gamma ] in the robot tool coordinate system]. According to the invention, the acquisition of related data can be completed only by using one image acquisition device and one distance measurement sensor, the image acquisition device and the distance measurement sensor transmit the acquired data to the industrial personal computer, and the industrial personal computer processes the acquired data into the space coordinate value of the positioning grabbing point, so that the 3D visual positioning effect is realized, the algorithm is simple and reliable, and the method has the advantages of low system cost, convenience in grabbing, good reliability, high efficiency and the like.

Description

2D visual detection method and detection system for engine cylinder position calibration
Technical Field
The invention relates to the technical field of robots, in particular to a 2D visual detection method and a detection system for engine cylinder position calibration.
Background
With the increasing degree of industrial automation, robots are used more and more widely in industry, for example, arc welding, stacking, carrying, goods sorting and the like are performed by using the robots. In the automobile industry, an engine is one of the core components of the whole automobile, and the key is to ensure stable mass production of the engine. On an engine automatic production line, the method mainly comprises five working procedures, namely engine cylinder casting, cylinder deburring, thermal stress relieving, finish machining and assembling. In the cylinder deburring process, the cylinder is from the casting process in the previous step, so that the burrs on the outer surface of the cylinder are more, and the normal operation of the subsequent processes is influenced. Consequently, need carry out the burring process, and this in-process needs robotic arm to pick the engine cylinder body from the fixed point on the feed roller way, puts into the machine tool with it, and the back is accomplished in the lathe burring, and reuse manipulator takes out it from the machine tool and places on ejection of compact roller way, accomplishes the cylinder body burring production process so far.
Because the cylinder body burr after the casting is great, lead to the unable complete horizontally stop of cylinder body on the roll table, this snatchs for the manipulator carries out the fixed point and brings very big difficulty, and conventional enterprise generally takes 3D binocular vision to snatch the fixed point, and this kind of method is with high costs, and the reliability also can't obtain fine guarantee, and later maintenance gets up comparatively difficultly.
Disclosure of Invention
In order to overcome the problems, the invention provides a 2D visual detection method and a detection system for engine cylinder position calibration, which have the advantages of low cost, convenient grasping and good reliability.
The invention has a technical scheme that: the 2D visual detection method for engine cylinder position calibration comprises the following steps:
100. determining that the cylinder body moves to the image acquisition visual field range through shooting;
200. collecting the distance between the robot and a plurality of detection points on the cylinder body;
300. in a number of detection points with four cylinder bores of the cylinder blockThe central position is used as a positioning grabbing point to obtain a positioning grabbing point P of the cylinder body1Spatial coordinate values [ X, Y, Z, alpha, beta, gamma ] in the robot tool coordinate system]。
1. The method for 2D visual inspection of engine block position calibration according to claim 1, wherein in step 100, comprising the steps of:
101. stopping moving the cylinder body after sensing the cylinder body;
102. acquiring a reference image of the cylinder body, and acquiring the diameter D of the cylinder hole in the reference imageholeLength D of cylinder bodylengthAnd width D of cylinder bodywide
103. Collecting sampling image of cylinder body, and acquiring diameter D of cylinder hole in sampling imagehole1Length D of cylinder bodylength1And width D of cylinder bodywide1
104. When in use
Figure BDA0001944919890000021
Wherein, T is an error threshold value, the cylinder body is in the image acquisition visual field range; otherwise, the cylinder body is not in the image acquisition visual field range;
105. if the cylinder is not within the image capturing visual field, the image capturing apparatus is moved by a predetermined distance, and the above steps 103 and 104 are repeated.
As an improvement of the present invention, in step 200, scanning distance measurement is performed on a plurality of detection points on the cylinder.
As a modification of the present invention, in the step 300, the following steps are included:
301. positioning grabbing point P for obtaining cylinder body1Alpha value in the robot tool coordinate system.
As a modification of the present invention, in step 301, the following steps are included:
3011. four circle center coordinates of four cylinder holes are obtained in a sampling image of the cylinder body, and the four circle center coordinates of the cylinder body are respectively as follows: o is1=[OX1,OY1],O2=[OX2,OY2],O3=[OX3,OY3],O4=[OX4,OY4](ii) a The straight lines of the coordinates of the four circle centers of the cylinder body are marked as LoThe slope is K;
3012. positioning the gripping point P in the robot tool coordinate system1An included angle alpha with the X axis is arctan (k), and a positioning and grabbing point P1The positions in the XY coordinate system are:
Figure BDA0001944919890000031
Figure BDA0001944919890000032
as a modification of the present invention, in the step 300, the following steps are included:
302. positioning grabbing point P for obtaining cylinder body1X-values and Y-values in the robot tool coordinate system.
As a modification of the present invention, in the step 302, the following steps are included:
3021. x is to beq,yqIs imported into a formula
Figure BDA0001944919890000033
Wherein w is the object distance, v is the image distance, u is the target size, and q is the image size; to obtain
Figure BDA0001944919890000034
As a modification of the present invention, in the step 300, the following steps are included:
303. positioning grabbing point P for obtaining cylinder body1Z-values, β -values and γ -values in the robot tool coordinate system.
As a modification of the present invention, in step 303, the following steps are included:
3031. acquiring a plurality of detection point sets G0={h1,h2,…hw};
3032. Eliminating useless points except the useless points with the distance value of the upper surface of the cylinder body larger than H, and sequencing from left to right from small to large to obtain new distance pointsSet G'0={h1,h2,…hjAre recorded in matrix form according to the scanning order
Figure BDA0001944919890000041
Wherein, G'0Forming one-to-one mapping with the value of the corresponding position in D, wherein H is a preset numerical value, and i and j are integers more than or equal to 2;
3033. for any point h in the matrix DlmForming a nine-square grid with the adjacent 8 points, wherein l and m are integers more than or equal to 2;
3034. h at any point according to a gradient algorithmlmThe gradient calculation is carried out with the adjacent 8 points,
Figure BDA0001944919890000042
the gradient k being greater than a threshold value ThThen h islmIs an edge point, otherwise hlmNot the edge point, calculating to obtain a set of edge points G ″)0,G″0Forming a one-to-one mapping with the values of the corresponding positions of D;
3035. assume according to G ″)0If the position of the middle element mapped to the matrix D is (x, y), mapping the adjacent element points on the same edge to the condition that the difference value between the row number and the column number of the position in the matrix D is 1 to obtain each edge set;
3036. comparing the total quantity of the element points of each side set to obtain a distance point set G of the long side 1 of the cylinder body1={h11,h22,…h2cThe distance points of the long side 2 of the cylinder are collected as G2={h11,h22,…h2dThe distance points of the short side 1 of the cylinder are collected as G3={h11,h22,…h2eThe distance points of the cylinder short side 2 are collected as G4={h11,h22,…h2f};
Figure BDA0001944919890000051
Z=median(G′0)。
The other technical scheme of the invention is as follows: A2D visual detection system for engine cylinder position calibration is provided, which comprises:
the image acquisition equipment is used for shooting and determining that the cylinder body moves to the image acquisition visual field range;
the distance measuring sensor is used for acquiring the distance from the robot to a plurality of detection points on the cylinder body;
the industrial personal computer is stored with a computer program, and the computer program is executed by the processor to complete the following steps: in a plurality of detection points, the central positions of four cylinder holes of the cylinder body are used as positioning and grabbing points to obtain the positioning and grabbing points P of the cylinder body1Spatial coordinate values [ X, Y, Z, alpha, beta, gamma ] in the robot tool coordinate system]。
According to the invention, as the image acquisition equipment, the distance measurement sensor and the industrial personal computer are adopted, the acquisition of related data can be completed only by using the image acquisition equipment and the distance measurement sensor, 3D data of a cylinder body does not need to be acquired, 3D binocular acquisition does not need to be used, the acquired data are transmitted to the industrial personal computer by the image acquisition equipment and the distance measurement sensor, and the industrial personal computer processes the acquired data into a space coordinate value of a positioning grabbing point, so that the 3D visual positioning effect is realized, the algorithm is simple and reliable, and the system has the advantages of low cost, convenience in grabbing, good reliability, high efficiency and the like.
Drawings
FIG. 1 is a schematic block diagram of the principle process of the 2D visual detection method for engine cylinder position calibration according to the present invention.
Fig. 2 is a scanning route diagram of the ranging sensor in the present invention.
FIG. 3 is a schematic block diagram of the 2D visual inspection system for engine cylinder position calibration according to the present invention.
Wherein: 1. a ranging sensor; 2. an industrial personal computer; 3. an image acquisition device; 5. a PLC controller; 4, touching a display screen; 6. a robot; 7. a cylinder body.
Detailed Description
In the description of the present invention, it is to be understood that the terms "center", "upper", "lower", "front", "rear", "left", "right", and the like, indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience in describing the present invention and simplifying the description, but do not indicate or imply that the device or assembly referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; the two components can be directly connected or indirectly connected through an intermediate medium, and the two components can be communicated with each other. The specific meaning of the above terms in the present invention can be understood in specific cases to those skilled in the art.
Referring to fig. 1 and 2, fig. 1 is a flow chart illustrating a method for 2D visual detection of engine cylinder position calibration, and fig. 2 is a scanning route diagram of a distance measuring sensor. The 2D visual detection method comprises the following steps:
100. determining that the cylinder body 7 moves to the image acquisition visual field range through shooting;
200. collecting the distance between the robot and a plurality of detection points on the cylinder body 7;
300. in the plurality of detection points, the center positions of the four cylinder holes of the cylinder body 7 are used as positioning and grabbing points, and the positioning and grabbing point P of the cylinder body 7 is obtained1Spatial coordinate values [ X, Y, Z, alpha, beta, gamma ] in the robot tool coordinate system]. In the coordinate system of the robot tool, X, Y, and Z are values on coordinate axes, α is an angle with the X-axis direction, β is an angle with the Y-axis direction, and γ is an angle with the Z-axis direction.
In the above step 100 of the method, the following steps are included:
101. after sensing the cylinder 7, the movement of the cylinder 7 is stopped. The cylinder 7 is placed on the feeder table and a photoelectric sensor is used to sense the cylinder 7. If the cylinder body 7 is sensed, the feeding roller way material chain is stopped to rotate, and the robot moves to the initial shooting top point.
102. Acquiring a reference image of the cylinder body 7, and acquiring the diameter D of the cylinder hole in the reference imageholeLength D of cylinder bodylengthAnd width D of cylinder bodywide. The reference image is an image when the cylinder 7 is placed in a standard state, that is, the robot does not need to make any angle adjustment when the robot grips the cylinder 7. How to obtain the diameter D of the cylinder hole in the reference imageholeLength D of cylinder bodylengthAnd width D of cylinder bodywideThe method comprises the following steps:
1021. acquiring and preprocessing a reference image, wherein the preprocessing step comprises the following steps: carrying out image normalization by adopting a matlab tool function Premnx; enhancing the image by a histogram equalization method; and (5) adopting a sobel operator to carry out edge detection.
1022. And collecting characteristic points of the reference image, and collecting cylinder hole diameter characteristic points, cylinder body length characteristic points and cylinder body width characteristic points.
1023. Calculating the diameter D of the engine cylinder hole by adopting a hough transformation circular detection method for the diameter characteristic point of the engine cylinder holeholeDetecting and calculating the length D of the engine cylinder body by adopting hough transformation straight linelengthAnd width D of engine cylinder bodywide
10231.hough transformation straight line detection calculation method is as follows:
(1) at the sampling image matrix TPIn the image, any point (x)i,yj) Corresponding to the expression in parameter space: ρ ═ xicosθ+yjsin θ, where ρ represents this point (x) in image spacei,yj) The distance to the center of the circle, theta, denotes this point (x)i,yj) The included angle between the straight line and the x axis.
(2) For processed image TY1Then, canny operator is adopted to carry out edge detection, and the edge points obtained by detection are stored in the set TbIn, Tb=[(x1,y1)…(xj,yj)]Wherein j represents the number of edge pointsAnd (4) counting.
(3) Quantizing rho into m parts and theta into n parts, quantizing parameter space into m multiplied by n units, and setting accumulator D for each unit processing corresponding positionmn
(4) For TbMiddle arbitrary pixel (x)j,yj) Substituted into the formula ρ ═ xicosθ+yjsin θ, the corresponding position in the quantized parameter space is added by 1, i.e. Dmn=Dmn+1;
(5) Traverse all TbAll the pixels in the middle, accumulator DmnThe first 4 maximum parameter space points are corresponding to the image space, namely four edges of the engine rigid body object detected by the invention, and the pixels of each edge are accumulated to obtain each edge Dlength,DwideThe length value of (a).
10231. The improved method for detecting the circle based on hough transformation is calculated as follows:
(1) according to the characteristics of the actual engine cylinder body, setting the quantization range of the circular diameter of the image space cylinder body as rl,rk]T was obtained in the same manner as in the 2.2.3.1 step (2)b=[(x1,y1)…(xj,yj)]。
(2) Any point (x) in the imagei,yi) The mapping relation with the parameter space is defined as (x)i-a)2+yi-b)2=r2. The parameter space (a, b, r) is quantized into mxnxJ units, each unit being provided with an accumulator DmnJ
(3) For TbMiddle arbitrary pixel (x)j,yj) Substituting into the formula (x)i-a)2+yi-b)2=r2In the quantized parameter space, the corresponding position accumulator is added with 1, i.e. Dmnj=Dmnj+1;
(4) Traverse all TbAll the pixels in the middle, accumulator DmnjThe first 4 largest parameter space points [ a ]m,bn,rj]The center coordinates and the radius of the circle in the image space are corresponding to the center coordinates and the radius in the rigid body image space of the engine detected by the invention. It is composed ofIn (a)m,bnRepresenting the coordinates of the center of a circle, rjThe radius is indicated.
103. Collecting the sampling image of the cylinder body 7, and acquiring the diameter D of the cylinder hole in the sampling imagehole1Length D of cylinder bodylength1And width D of cylinder bodywide1
104. When in use
Figure BDA0001944919890000091
Wherein, T is an error threshold value, the cylinder body 7 is in the image acquisition visual field range; otherwise, the cylinder 7 is not within the image capturing visual field. T is 5% or 4%, and the value of T may be selected as needed, and the above is merely an example.
105. The cylinder 7 is not within the image capturing visual field, the image capturing apparatus is moved by a predetermined distance, and the above steps 103 and 104 are repeated. It should be noted that the predetermined distance may be 50mm, 55mm, 45mm, 42mm, 40mm, etc., and the predetermined distance may be selected according to the requirement, which is only an example.
In the above step 200 of the method, the image capturing device performs scanning distance measurement on a plurality of detection points on the cylinder 7 (see fig. 2). The density of the detecting points is a x b, wherein, the number of the scanning points in the x-axis direction is a, the number of the scanning points in the y-axis direction is b, a and b are integers which are more than or equal to 2, and the scanning mode generally adopts back and forth scanning.
In the above step 300 of the method, the method comprises the following steps: 301. positioning and grabbing point P for obtaining cylinder body 71Alpha value in the robot tool coordinate system.
In the step 301, the following steps are included:
3011. four circle center coordinates of four cylinder holes are obtained in a sampling image of the cylinder body 7, and the four circle center coordinates of the cylinder body 7 are respectively as follows: o is1=[OX1,OY1],O2=[OX2,OY2],O3=[OX3,OY3],O4=[OX4,OY4](ii) a The straight lines of the coordinates of the four circle centers of the cylinder body 7 are marked as LoThe slope is K. It should be noted that Hough transform is adopted to circleAnd detecting and calculating to obtain the coordinates of each central point.
3012. Positioning the gripping point P in the robot tool coordinate system1An included angle alpha with the X axis is arctan (k), and a positioning and grabbing point P1The positions in the XY coordinate system are:
Figure BDA0001944919890000101
Figure BDA0001944919890000102
in the above step 300 of the method, the method comprises the following steps: 302. positioning and grabbing point P for obtaining cylinder body 71X-values and Y-values in the robot tool coordinate system.
In the step 302, the method includes the following steps: 3021. x is to beq,yqIs imported into a formula
Figure BDA0001944919890000103
Wherein w is the object distance, v is the image distance, u is the target size, and q is the image size; to obtain
Figure BDA0001944919890000104
In order to obtain the image distance v, a calibration experiment is first performed on the image distance of the camera. The specific process is as follows: keeping various parameters of the image acquisition equipment unchanged, selecting a cube as an experimental target object, and measuring the diameter u (target size) of the experimental target object; placing a lens of the image acquisition equipment and an experimental target object on the same horizontal plane, and keeping the distance between the lens and the experimental target object as w; and processing the image of the experimental target object obtained by the image acquisition equipment through image processing software to obtain the image size q of the experimental target object, and substituting the image size q into the formula to obtain the image distance v.
In the above step 300 of the method, the method comprises the following steps: 303. positioning and grabbing point P for obtaining cylinder body 71Z-values, β -values and γ -values in the robot tool coordinate system.
In the step 303, the method includes the following steps:
3031. acquiring a plurality of detection point sets G0=(h1,h2,…hw);
3032. Eliminating useless points except for the useless points with the distance value of the upper surface of the non-cylinder 7 larger than H, and sequencing from left to right in sequence from small to large to obtain a new distance point set C'0=[h1,h2,…hjAre recorded in matrix form according to the scanning order
Figure BDA0001944919890000111
Wherein, G'0Forming one-to-one mapping with the value of the corresponding position in D, wherein H is a preset numerical value, and i and j are integers more than or equal to 2;
3033. for any point h in the matrix DlmAnd forming a nine-square grid with the adjacent 8 points, wherein l and m are integers more than or equal to 2. As shown in figure a below. For the cylinder 7, the distance difference between adjacent positions of the distance points at the edge of the cylinder 7 is necessarily large, whereas the distance difference between non-edge points of the cylinder 7 is small.
h(l-1)(m-1) h(l-1)m h(l-1)(m+1)
hl(m-1) hlm hl(m+1)
h(l+1)(m-1) h(l+1)m h(l+1)(m+1)
FIG. A
3034. H at any point according to a gradient algorithmlmThe gradient calculation is carried out with the adjacent 8 points,
Figure BDA0001944919890000112
the gradient k being greater than a threshold value ThThen h islmIs an edge point, otherwise hlmNot the edge point, calculating to obtain a set of edge points G ″)0,G″0Forming a one-to-one mapping with the values of the corresponding positions of D;
3035. assume according to G ″)0If the position of the middle element mapped to the matrix D is (x, y), mapping the adjacent element points on the same edge to the condition that the difference value between the row number and the column number of the position in the matrix D is 1 to obtain each edge set;
3036. comparing the total quantity of the element points of each side set to obtain a distance point set G of the long side 1 of the cylinder body1={h11,h22,…h2cThe distance points of the long side 2 of the cylinder are collected as G2={h11,h22,…h2dThe distance points of the short side 1 of the cylinder 7 are collected as G3={h11,h22,…h2eThe distance points of the short side 2 of the cylinder 7 are collected as G4={h11,h22,…h2f};
Figure BDA0001944919890000121
Z=median(G′0)。
In conclusion, the positioning and grasping point P of the cylinder 7 is thus obtained1Spatial coordinate values { X, Y, Z, α, β, γ in the robot tool coordinate system]During the process of grabbing the cylinder 7, this P is set1Spatial coordinate values of [ X, Y, Z, alpha, beta, gamma ]]The industrial personal computer sends the information to the PLC controller, and the information is sent to the robot by the PLC controller, so that the action of the robot for grabbing the cylinder body 7 is completed. It should be noted that, in the present invention, unless otherwise specified, all images are 2D images, i.e., reference images and samplesThe images are all 2D images. The method is based on the calibration algorithm of MATLAB, the distance point set and the sampling image matrix are analyzed and processed to obtain the three-dimensional coordinates of the grabbing points, the algorithm is simple and reliable, the calculation time is saved in practical use, and the grabbing and carrying efficiency of the robot is improved.
According to the invention, as the image acquisition equipment, the distance measurement sensor and the industrial personal computer are adopted, the acquisition of related data can be completed only by using the image acquisition equipment and the distance measurement sensor, 3D data of the cylinder body 7 is not required to be acquired, 3D binocular acquisition is not required to be used, the acquired data is transmitted to the industrial personal computer by the image acquisition equipment and the distance measurement sensor, and the industrial personal computer processes the acquired data into a space coordinate value of a positioning grabbing point, so that the 3D visual positioning effect is realized, the algorithm is simple and reliable, and the system has the advantages of low cost, convenience in grabbing, good reliability, high efficiency and the like.
Referring to fig. 3, fig. 3 is a schematic block diagram of a 2D vision inspection system for calibrating the position of an engine cylinder, where the 2D vision inspection system is applied, and the 2D vision inspection system includes:
the image acquisition equipment 3 is used for shooting and determining that the cylinder body moves to the image acquisition visual field range through the image acquisition equipment 3;
the distance measuring sensor 1 is used for acquiring the distance from the robot 6 to a plurality of detection points on the cylinder body;
the industrial personal computer 2 is characterized in that the industrial personal computer 2 stores a computer program, and the computer program is executed by a processor to complete the following steps: in a plurality of detection points, the central positions of four cylinder holes of the cylinder body are used as positioning and grabbing points to obtain the positioning and grabbing points P of the cylinder body1Spatial coordinate values [ X, Y, Z, alpha, beta, gamma ] in the tool coordinate system of the robot 6]。
It should be noted that, the present invention employs one image capturing device 3, that is, a camera or a camera, etc., and the image captured by the image capturing device 3 is a 2D image; the distance measuring sensor 1 adopts a laser distance measuring sensor 1; in the 2D visual detection method, there are some software algorithms, which belong to the computer program, and the computer program is stored in the industrial personal computer 2 and completed in the industrial personal computer 2, that is, various software algorithms are stored in the industrial personal computer 2, and the industrial personal computer 2 is a computer, a tablet personal computer, a smart phone, or the like.
In this embodiment, still include PLC controller 5, touch display screen 4 and robot 6, range sensor 1 with industrial computer 2 carries out RS232 serial port communication, industrial computer 2 with through Ethernet communication between the image acquisition equipment 3, industrial computer 2 with through RS232 communication between the PLC controller 5, PLC controller 5 with communicate through CC-LINK between the robot 6, PLC controller 5 with through Ethernet communication between touch display screen 4.
The image acquisition equipment 3 and the distance measurement sensor 1 are both carried on a robot 6 grab, the industrial personal computer 2 calls a serial class of RS232 and Ethernet in a tool box and carries out data exchange between the distance measurement sensor 1 and the image acquisition equipment 3 based on an MATLAB operating environment, wherein the distance measurement sensor 1 and the image acquisition equipment 3 are used as main equipment for acquiring data by the industrial personal computer 2, and the space coordinate value of the robot 6 positioning grabbing point is obtained by analyzing and calculating the acquired data. In the touch display screen 4, in order to facilitate the operation of monitoring and operating the equipment by the operating personnel, the robot 6 is used as a main mechanism for completing the stacking action. The PLC 5 is used as an action logic control device of the stacking system, so that mutual coordination action of all devices is realized, and a cylinder stacking task is completed.
In the process of grabbing the cylinder body, the P is added1Spatial coordinate values of [ X, Y, Z, alpha, beta, gamma ]]The industrial personal computer 2 sends the cylinder body grabbing motion to the PLC controller 5, and the cylinder body grabbing motion is completed by sending the cylinder body grabbing motion to the robot 6 through the PLC controller 5.
According to the invention, as the image acquisition equipment, the distance measurement sensor and the industrial personal computer are adopted, the acquisition of related data can be completed only by using the image acquisition equipment and the distance measurement sensor, 3D data of a cylinder body does not need to be acquired, 3D binocular acquisition does not need to be used, the acquired data are transmitted to the industrial personal computer by the image acquisition equipment and the distance measurement sensor, and the industrial personal computer processes the acquired data into a space coordinate value of a positioning grabbing point, so that the 3D visual positioning effect is realized, the algorithm is simple and reliable, and the advantages of low system cost, convenience in grabbing, good reliability, high efficiency and the like are realized.
It should be noted that the detailed explanation of the above embodiments is only for the purpose of explaining the present invention so as to better explain the present invention, but the descriptions should not be construed as limiting the present invention for any reason, and particularly, the features described in the different embodiments may be arbitrarily combined with each other to constitute other embodiments, and the features should be understood as being applicable to any one embodiment and not limited to only the described embodiments except for the explicit contrary description.

Claims (8)

1. A2D visual detection method for engine cylinder position calibration is characterized by comprising the following steps:
100. determining that the cylinder body moves to the image acquisition visual field range through shooting;
200. collecting the distance between the robot and a plurality of detection points on the cylinder body;
300. in a plurality of detection points, the central positions of four cylinder holes of the cylinder body are used as positioning and grabbing points to obtain the positioning and grabbing points P of the cylinder body1Spatial coordinate values [ X, Y, Z, alpha, beta, gamma ] in the robot tool coordinate system];
The step 300 comprises the steps of:
303. positioning grabbing point P for obtaining cylinder body1Z, β and γ values in the robot tool coordinate system;
the step 303 includes the following steps:
3031. acquiring a plurality of detection point sets G0=(h1,h2,…hw);
3032. Eliminating useless points with the distance value of the upper surface of the non-cylinder body larger than H, and sequencing from left to right from small to large to obtain a new distance point setG′0={h1,h2,…hjAre recorded in matrix form according to the scanning order
Figure FDA0002737259730000011
Wherein, G'0Forming one-to-one mapping with the value of the corresponding position in D, wherein H is a preset numerical value, and i and j are integers more than or equal to 2;
3033. for any point h in the matrix DlmForming a nine-square grid with the adjacent 8 points, wherein l and m are integers more than or equal to 2;
3034. h at any point according to a gradient algorithmlmThe gradient calculation is carried out with the adjacent 8 points,
Figure FDA0002737259730000021
the gradient k being greater than a threshold value ThThen h islmIs an edge point, otherwise hlmNot the edge point, calculating to obtain a set of edge points G ″)0,G″0Forming a one-to-one mapping with the values of the corresponding positions of D;
3035. assume according to G ″)0If the position of the middle element mapped to the matrix D is (x, y), mapping the adjacent element points on the same edge to the condition that the difference value between the row number and the column number of the position in the matrix D is 1 to obtain each edge set;
3036. comparing the total quantity of the element points of each side set to obtain a distance point set G of the long side 1 of the cylinder body1={h11,h22,…h2cThe distance points of the long side 2 of the cylinder are collected as G2={h11,h22,…h2dThe distance points of the short side 1 of the cylinder are collected as G3={h11,h22,…h2eThe distance points of the cylinder short side 2 are collected as G4={h11,h22,…h2f};
Figure FDA0002737259730000022
Z=median(G′0)。
2. The method for 2D visual inspection of engine block position calibration according to claim 1, wherein in step 100, comprising the steps of:
101. stopping moving the cylinder body after sensing the cylinder body;
102. acquiring a reference image of the cylinder body, and acquiring the diameter D of the cylinder hole in the reference imageholeLength D of cylinder bodylengthAnd width D of cylinder bodywide
103. Collecting sampling image of cylinder body, and acquiring diameter D of cylinder hole in sampling imagehole1Length D of cylinder bodylength1And width D of cylinder bodywide1
104. When in use
Figure FDA0002737259730000023
Wherein, T is an error threshold value, the cylinder body is in the image acquisition visual field range; otherwise, the cylinder body is not in the image acquisition visual field range;
105. if the cylinder is not within the image capturing visual field, the image capturing apparatus is moved by a predetermined distance, and the above steps 103 and 104 are repeated.
3. The method for 2D visual inspection of engine cylinder position calibration according to claim 1 or 2, wherein in step 200, scanning ranging is performed on a plurality of inspection points on the cylinder.
4. A method for 2D visual inspection of engine block position calibration according to claim 1 or 2, wherein in step 300, comprising the steps of:
301. positioning grabbing point P for obtaining cylinder body1Alpha value in the robot tool coordinate system.
5. The method for 2D visual inspection of engine cylinder position calibration according to claim 4, wherein in step 301, the method comprises the following steps:
3011. four circle center coordinates of four cylinder holes are obtained in a sampling image of the cylinder body,the coordinates of the four circle centers of the cylinder body are respectively as follows: o is1=[OX1,OY1],O2=[OX2,OY2],O3=[OX3,OY3],O4=[OX4,OY4];
The straight lines of the coordinates of the four circle centers of the cylinder body are marked as LoThe slope is K;
3012. positioning the gripping point P in the robot tool coordinate system1An included angle alpha with the X axis is arctan (k), and a positioning and grabbing point P1The positions in the XY coordinate system are:
Figure FDA0002737259730000031
Figure FDA0002737259730000032
6. the method for 2D visual inspection of engine block position calibration according to claim 5, wherein in step 300, comprising the steps of:
302. positioning grabbing point P for obtaining cylinder body1X-values and Y-values in the robot tool coordinate system.
7. The method for 2D visual inspection of engine block position calibration according to claim 6, wherein in step 302, comprising the steps of:
3021. x is to beq,yqIs imported into a formula
Figure FDA0002737259730000041
Wherein w is the object distance, v is the image distance, u is the target size, and q is the image size; to obtain
Figure FDA0002737259730000042
8. A2D visual detection system for engine cylinder position calibration, comprising:
the image acquisition equipment is used for shooting and determining that the cylinder body moves to the image acquisition visual field range;
the distance measuring sensor is used for acquiring the distance from the robot to a plurality of detection points on the cylinder body;
the industrial personal computer is stored with a computer program, and the computer program is executed by the processor to complete the following steps: in a plurality of detection points, the central positions of four cylinder holes of the cylinder body are used as positioning and grabbing points to obtain the positioning and grabbing points P of the cylinder body1Spatial coordinate values [ X, Y, Z, alpha, beta, gamma ] in the robot tool coordinate system];
The steps further include:
positioning grabbing point P for obtaining cylinder body1Z, β and γ values in the robot tool coordinate system;
acquiring a plurality of detection point sets G0=(h1,h2,…hw);
Eliminating useless points except for the useless points with the distance value of the upper surface of the cylinder body larger than H, and sequencing from left to right in sequence from small to large to obtain a new distance point set G'0={h1,h2,…hjAre recorded in matrix form according to the scanning order
Figure FDA0002737259730000043
Wherein, G'0Forming one-to-one mapping with the value of the corresponding position in D, wherein H is a preset numerical value, and i and j are integers more than or equal to 2;
for any point h in the matrix DlmForming a nine-square grid with the adjacent 8 points, wherein l and m are integers more than or equal to 2;
h at any point according to a gradient algorithmlmThe gradient calculation is carried out with the adjacent 8 points,
Figure FDA0002737259730000051
Figure FDA0002737259730000052
the gradient k being greater than a threshold value ThThen h islmIs an edge point, otherwise hlmNot the edge point, calculating to obtain a set of edge points G ″)0,G″0Forming a one-to-one mapping with the values of the corresponding positions of D;
assume according to G ″)0If the position of the middle element mapped to the matrix D is (x, y), mapping the adjacent element points on the same edge to the condition that the difference value between the row number and the column number of the position in the matrix D is 1 to obtain each edge set;
comparing the total quantity of the element points of each side set to obtain a distance point set G of the long side 1 of the cylinder body1={h11,h22,…h2cThe distance points of the long side 2 of the cylinder are collected as G2={h11,h22,…h2dThe distance points of the short side 1 of the cylinder are collected as G3={h11,h22,…h2eThe distance points of the cylinder short side 2 are collected as G4={h11,h22,…h2f};
Figure FDA0002737259730000053
Z=median(G′0)。
CN201910033056.XA 2019-01-14 2019-01-14 2D visual detection method and detection system for engine cylinder position calibration Active CN109764807B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910033056.XA CN109764807B (en) 2019-01-14 2019-01-14 2D visual detection method and detection system for engine cylinder position calibration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910033056.XA CN109764807B (en) 2019-01-14 2019-01-14 2D visual detection method and detection system for engine cylinder position calibration

Publications (2)

Publication Number Publication Date
CN109764807A CN109764807A (en) 2019-05-17
CN109764807B true CN109764807B (en) 2021-03-05

Family

ID=66453754

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910033056.XA Active CN109764807B (en) 2019-01-14 2019-01-14 2D visual detection method and detection system for engine cylinder position calibration

Country Status (1)

Country Link
CN (1) CN109764807B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110737253B (en) * 2019-10-15 2021-09-07 浙江隐齿丽医学技术有限公司 Film preparation device with automatic adaptation function, automatic adaptation system and method
CN112729117B (en) * 2020-12-30 2022-07-08 郑州大学 Compressor barrel electric box threaded hole detection device based on machine vision
CN116221231B (en) * 2023-05-09 2023-08-15 湖南奥通智能研究院有限公司 High-precision oil cylinder displacement detection method and hydraulic oil cylinder

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107584263A (en) * 2017-10-18 2018-01-16 上海文什数据科技有限公司 A kind of vision positioning guide device and bootstrap technique
CN108759773A (en) * 2018-05-07 2018-11-06 深圳市三宝创新智能有限公司 A kind of monocular vision distance measuring method applied to robot crawl

Family Cites Families (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB9515311D0 (en) * 1995-07-26 1995-09-20 3D Scanners Ltd Stripe scanners and methods of scanning
JP3930482B2 (en) * 2004-01-19 2007-06-13 ファナック株式会社 3D visual sensor
EP2075096A1 (en) * 2007-12-27 2009-07-01 Leica Geosystems AG Method and system for extremely precise positioning of at least one object in the end position of a space
CN101357687B (en) * 2008-09-26 2010-06-02 浙江大学 Multitask aircraft auxiliary assembly system based on industrial robot
CN101913076B (en) * 2010-06-23 2012-09-05 中国科学院自动化研究所 Industrial robot-based assembly method and device of piston, piston pin and connecting rod
CN104123540B (en) * 2014-07-15 2015-09-30 北京天智航医疗科技股份有限公司 Operating robot position mark point automatic identifying method
CN104690551B (en) * 2015-03-18 2017-03-01 中国科学院自动化研究所 A kind of robot automation's assembly system
CN204868885U (en) * 2015-03-26 2015-12-16 库卡系统有限责任公司 A robot system for controlling work piece
CN105182905B (en) * 2015-08-12 2017-08-04 西安费斯达自动化工程有限公司 The large-sized structural parts mobile mechanical arm multi-axis machining center implementation method of view-based access control model
CN105252251B (en) * 2015-11-02 2018-01-09 西北工业大学 A kind of device and method for realizing aircraft heat shield and capturing and be precisely bonded automatically
CN106097323B (en) * 2016-06-03 2020-11-03 江苏大学 Engine cylinder block casting positioning method based on machine vision
CN105965519A (en) * 2016-06-22 2016-09-28 江南大学 Vision-guided discharging positioning method of clutch
CN107972026B (en) * 2016-10-25 2021-05-04 河北亿超机械制造股份有限公司 Robot, mechanical arm and control method and device thereof
CN106645182A (en) * 2017-03-01 2017-05-10 河北省科学院应用数学研究所 Three-point automatic visual detection apparatus for inner side surface of inner cap of automotive armrest
CN107009357B (en) * 2017-04-05 2019-03-26 武汉科技大学 A method of object is grabbed based on NAO robot
CN107009391B (en) * 2017-04-24 2023-05-12 珠海格力智能装备有限公司 Robot grabbing method
CN106956263B (en) * 2017-04-28 2023-05-16 广州瑞松北斗汽车装备有限公司 Automobile part vision guiding gripper
CN207053346U (en) * 2017-07-28 2018-02-27 上海科致电气自动化股份有限公司 A kind of motor case heats automatic charging device
CN108857330A (en) * 2018-03-21 2018-11-23 南京理工大学 A kind of wheel hub valve port automatic stopper device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107584263A (en) * 2017-10-18 2018-01-16 上海文什数据科技有限公司 A kind of vision positioning guide device and bootstrap technique
CN108759773A (en) * 2018-05-07 2018-11-06 深圳市三宝创新智能有限公司 A kind of monocular vision distance measuring method applied to robot crawl

Also Published As

Publication number Publication date
CN109764807A (en) 2019-05-17

Similar Documents

Publication Publication Date Title
CN109764807B (en) 2D visual detection method and detection system for engine cylinder position calibration
CN111537517B (en) Unmanned intelligent stamping defect identification method
EP1607194B1 (en) Robot system comprising a plurality of robots provided with means for calibrating their relative position
DE102013018222B4 (en) Object-taking device and method for picking up an object
CN110969660B (en) Robot feeding system based on three-dimensional vision and point cloud deep learning
JP6088563B2 (en) Work picking robot system having position and orientation conversion operation function, and work picking method
CN113196337B (en) Image processing device, work robot, substrate inspection device, and specimen inspection device
CN107009391B (en) Robot grabbing method
CN104002602B (en) The laser activation device and laser activation method of function are corrected with machining accuracy
CN110980276A (en) Method for implementing automatic casting blanking by three-dimensional vision in cooperation with robot
CN110888348B (en) Robot stacking control method and robot stacking control system based on laser SLAM
CN108500979A (en) A kind of robot grasping means and its system based on camera communication connection
Xia et al. Workpieces sorting system based on industrial robot of machine vision
CN112079078B (en) Full-automatic unordered feeding system of robot based on binocular vision
Fan et al. A combined 2D-3D vision system for automatic robot picking
CN113386122A (en) Method and device for optimizing measurement parameters and computer-readable storage medium
KR20110095700A (en) Industrial robot control method for workpiece object pickup
CN110977939A (en) Target workpiece identification and positioning system
CN113538459A (en) Multi-mode grabbing obstacle avoidance detection optimization method based on drop point area detection
CN114074331A (en) Disordered grabbing method based on vision and robot
Xu et al. Industrial robot base assembly based on improved Hough transform of circle detection algorithm
CN115214135A (en) Full-automatic feeding system and method for forging line based on 3D vision
TWM530201U (en) Collision avoidance simulation system
CN111007818A (en) Valve production system based on machine vision and intelligent robot
CN114322752B (en) Method, device and equipment for automatically transmitting glass

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