Real-time centering method and device for hole-shaft interference connection axis
Through machine vision technology, the axis deviation in the hole shaft interference connection is detected and adjusted, and the real-time alignment of high precision is achieved, solving the shortcomings of traditional methods in accuracy and real-time, and is suitable for automated production lines.
Patent Information
- Application Number
- CN202510337489.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-06-24
AI Technical Summary
How to achieve high-precision real-time axis alignment of hole-axis interference connection, solve the shortcomings in accuracy and real-time performance of traditional mechanical and laser centering instruments.
Using machine vision technology, the axis positions of the inclusion and the included parts are detected by pre-set multiple shooting devices, and the displacement deviation and angular deviation of the axis are determined by image processing technology, and adjustments are made to achieve axis centering.
It realizes high-precision real-time axis centering for hole-axis interference connection, improves assembly quality and efficiency, and is suitable for automated production lines.
Smart Images

Figure CN120194632A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to, but is not limited to, mechanical engineering technology, and particularly to a method and device for real-time alignment of the axes of an interference fit between a hole and a shaft. Background Art
[0002] The interference fit between a hole and a shaft is an important form of assembly connection in the fields of aerospace, mechatronics, etc. Its excellent load-bearing capacity and impact resistance make it play an important role in high-performance assemblies. Alignment refers to the operation of making the axis of the containing part, such as a hole, coincide with the axis of the contained part, such as a shaft part, in the interference fit assembly of a hole and a shaft or other processes for forming an interference fit. Good alignment conditions during the assembly process are the key to giving full play to the advantages of the interference fit between a hole and a shaft. If the alignment is poor, it will lead to uneven stress distribution in the contact area between the hole and the shaft, excessive local contact stress, further causing problems such as extrusion deformation of the hole wall, material accumulation, and even surface scratches. And the assembly process time requirements for the interference fit between a hole and a shaft are relatively high. Under the condition of rapid assembly, the probability of poor alignment will increase. Therefore, achieving high-precision real-time alignment is the core of ensuring the assembly quality.
[0003] Traditional mechanical alignment methods mainly rely on manual operations and measure positions through dimensional measuring instruments. This method is not only restricted by the accuracy of the measuring instruments but also has the disadvantages of cumbersome operation and low efficiency, making it difficult to meet the requirements of high precision and high efficiency in modern assembly. At the same time, it is difficult to integrate such methods with automated equipment, which is not conducive to the consistency control of assembly quality in large-scale industrial production.
[0004] Laser alignment instrument technology is mainly used for the alignment detection of larger shaft systems in large equipment, especially for the alignment of couplings. Its characteristic is that it is usually carried out after the shaft system assembly is completed, and the shaft system alignment is adjusted through repair. However, this method cannot meet the requirements of the interference fit assembly of a hole and a shaft because it is difficult to disassemble and adjust after the interference fit between the hole and the shaft. At the same time, the laser alignment instrument also has certain limitations in terms of operation convenience and real-time performance.
[0005] How to achieve high-precision real-time axis alignment of the interference fit between a hole and a shaft is an urgent problem to be solved. Summary of the Invention
[0006] The present application provides a method and device for real-time alignment of the axes of an interference fit between a hole and a shaft, which can achieve high-precision real-time axis alignment of the interference fit between a hole and a shaft.
[0007] An embodiment of the present invention provides a method for real-time alignment of the axes of an interference fit between a hole and a shaft, including:
[0008] Using a pre-set first photographing device, detecting the position of the first axis of the containing part, and determining the first displacement deviation between the first axis and the reference axis through image processing technology;
[0009] Adjust the position of the housing according to the determined first displacement deviation so that the first axis coincides with the reference axis;
[0010] Use a pre-set second imaging device to detect the position of the second axis of the housed part, and determine the second displacement deviation and angular deviation between the second axis and the reference axis;
[0011] Adjust the position and angle of the housed part according to the determined second displacement deviation and angular deviation so that the second axis coincides with the reference axis, so as to achieve the centering of the first axis and the second axis.
[0012] In an exemplary example, the reference axis is the optical axis of the first imaging device; detecting the position of the first axis of the housing part, and determining the first displacement deviation between the first axis and the reference axis through image processing technology, includes:
[0013] Obtain an image of the outer circle of the hole chamfer of the housing part;
[0014] Use an edge detection algorithm to obtain the boundary of the chamfered outer circle, and calculate the center pixel coordinates of the center of the chamfered outer circle in the image pixel coordinate system;
[0015] According to the internal parameter matrix, vertical distance, and external parameter matrix of the imaging device that captures the image of the outer circle of the hole chamfer, convert the center pixel coordinates into world coordinates;
[0016] According to the world coordinates of the center of the chamfered outer circle, calculate the first displacement deviation between the first axis of the housing part and the reference axis.
[0017] In an exemplary example, after adjusting the position of the housing part according to the determined first displacement deviation, it further includes:
[0018] Judge whether the position of the adjusted housing part meets the centering deviation requirement between the first axis and the reference axis. If not, repeat the steps of detecting the position of the first axis of the housing part and adjusting the position of the housing part according to the determined first displacement deviation until the centering deviation requirement between the first axis and the reference axis is met.
[0019] In an exemplary example, detecting the position of the second axis of the housed part and determining the second displacement deviation and angular deviation between the second axis and the reference axis includes:
[0020] Capture an image including two points on the second axis of the housed part;
[0021] Through coordinate transformation, obtain the world coordinates of two points on the second axis; according to the positions of the two points on the second axis, obtain the direction vector of the second axis;
[0022] Calculate the angle between the second axis and the image plane according to the projection direction of the second imaging device;
[0023] Obtain the direction deviation and position deviation of the second axis according to the calculated angle information.
[0024] In an exemplary example, the second imaging device includes a first imaging device and a second imaging device;
[0025] The photographing of the image including two points on the second axis of the included part includes:
[0026] Use the first imaging device and the second imaging device to photograph the included part from different perspectives.
[0027] Obtain the world coordinates of the two points, including:
[0028] For the first imaging device, use the internal parameter matrix and external parameter matrix of the first imaging device to convert the pixel coordinates into world coordinates, as the position of one of the two points on the second axis of the included part in the world coordinate system;
[0029] For the second imaging device, use the internal parameter matrix and external parameter matrix of the second imaging device to convert the pixel coordinates into world coordinates, as the position of the other of the two points on the second axis of the included part in the world coordinate system.
[0030] Obtain the direction vector of the second axis, including:
[0031] Obtain the difference between the two points on the second axis of the obtained included part and the direction vector of the second axis.
[0032] Calculate the angle between the second axis and the image plane, including:
[0033] According to the projection direction vector of the second axis on the imaging plane of the first imaging device, obtain the first cosine value of the angle between the second axis and the reference axis;
[0034] According to the projection direction vector of the second axis on the imaging plane of the second imaging device, obtain the second cosine value of the angle between the second axis and the reference axis.
[0035] The obtaining of the direction deviation and position deviation of the second axis according to the calculated angle information includes:
[0036] Obtain the direction deviation and position deviation of the second axis according to the first cosine value and the second cosine value.
[0037] In an exemplary instance, after adjusting the position and angle of the included part according to the determined second displacement deviation and angle deviation, the following steps are further included:
[0038] Determine whether the position of the axis of the adjusted included part meets the requirement of the centering deviation between the second axis and the hole axis on the containing part. If it does not meet the requirement, repeat the steps of detecting the position of the second axis of the included part and the steps of adjusting the position and angle of the included part according to the determined second displacement deviation and angle deviation until the requirement of the centering deviation between the second axis and the hole axis on the containing part is met.
[0039] In an exemplary instance, the following steps are further included: Install the imaging devices in combination according to the pre-set layout positions to achieve high-precision real-time centering of the interference fit between the hole and the shaft; the imaging devices include two or more.
[0040] The embodiment of the present application further provides a device for real-time centering of the axis of an interference fit between a hole and a shaft, including: a vision detection module, a part positioning module, and a motion execution module; wherein:
[0041] The vision detection module includes a first imaging device and a second imaging device; Use the pre-set first imaging device to detect the position of the first axis of the containing part, and determine the first displacement deviation between the first axis and the reference axis through image processing technology; and, use the pre-set second imaging device to detect the position of the second axis of the included part, and determine the second displacement deviation and angle deviation between the second axis and the reference axis;
[0042] The part positioning module is used for positioning and clamping the containing part: Adjust the position of the containing part according to the determined first displacement deviation to make the first axis coincide with the reference axis; and, adjust the position and angle of the included part according to the determined second displacement deviation and angle deviation to make the second axis coincide with the reference axis, so as to achieve the centering of the first axis and the second axis;
[0043] The motion execution module is used to control the movement of the positioned containing part to make the first axis coincide with the reference axis, and control the movement of the included part to make the second axis coincide with the reference axis, so as to achieve the centering of the first axis and the second axis.
[0044] The embodiment of the present application further provides a computer-readable storage medium storing computer-executable instructions for executing the method for real-time centering of the axis of an interference fit between a hole and a shaft described in any one of the above.
[0045] The embodiment of the present application further provides a computer device including a memory and a processor, wherein the memory stores the following instructions executable by the processor: for executing the steps of the method for real-time centering of the axis of an interference fit between a hole and a shaft described in any one of the above.
[0046] The real-time axis alignment method for a hole-shaft interference joint provided in an embodiment of the present application utilizes the advantages of machine vision in assembly, which is flexible, convenient and highly accurate. By designing a specific layout combination and placing multiple shooting devices such as cameras, the angular deviation and distance deviation of the first axis located at the containing part and the second axis located at the contained part are respectively detected, calculated and corrected, thereby achieving high-precision real-time axis alignment of the hole-shaft interference joint.
[0047] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The accompanying drawings are used to provide further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.
[0049] Figure 1 It is a schematic flow chart of a method for real-time centering of the axis of a hole-shaft interference connection in an embodiment of the present application;
[0050] Figure 2 This is a schematic diagram of a functional embodiment for achieving real-time centering of the axis of the hole-shaft interference connection in an embodiment of the present application;
[0051] Figure 3 It is a schematic diagram of the composition structure of the real-time centering device for the hole-shaft interference connection axis in the embodiment of the present application. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solution and advantages of the present application more clear, the embodiments of the present application will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other arbitrarily without conflict.
[0053] In a typical configuration of the present application, a computing device includes one or more processors (CPU), an input / output interface, a network interface, and a memory.
[0054] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0055] A computer-readable medium includes permanent and non-permanent, removable and non-removable media and can implement information storage by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic disk storage or other magnetic storage devices, or any other non-transitory medium that can be used to store information accessible by a computing device. As defined herein, a computer-readable medium does not include transitory media such as modulated data signals and carrier waves.
[0056] The steps illustrated in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And, although a logical order is illustrated in the flowchart, in some cases, the steps shown or described can be executed in a different order than herein.
[0057] In recent years, the centering method based on machine vision has received attention due to its advantages such as flexibility, convenience, and high efficiency. This method can detect the centering state in real time during the assembly process and is more suitable for the requirements of an automated production line compared to traditional mechanical methods. However, the inventors of this application have found through research that the vision centering technology mainly focuses on detecting the parallel distance deviation between axes, which brings the problem of causing assembly tilt, increasing the risk of damage to the hole wall or shaft surface, and affecting the assembly quality.
[0058] To achieve high-precision real-time axis centering for interference fit of hole and shaft, the embodiments of this application propose a real-time axis centering method for interference fit of hole and shaft. The embodiments of this application utilize the advantages of machine vision in assembly, which is flexible, convenient, and has high precision. By using multiple imaging devices such as cameras with a specific layout, the angular deviation and distance deviation between the axis of the containing part and the axis of the contained part are respectively detected, calculated, and corrected to achieve high-precision real-time axis centering for interference fit of hole and shaft.
[0059] Figure 1 The flowchart schematic diagram of the real-time axis centering method for interference fit of hole and shaft in the embodiments of this application can include:
[0060] Step 100: Use the pre-set imaging device to detect the position of the first axis of the containing part, and determine the first displacement deviation between the first axis and the reference axis through image processing technology.
[0061] In an exemplary instance, before step 100, it further includes: installing a photographing device according to the layout position. The photographing device in the embodiments of the present application may include two or more; the photographing device may include, for example, a camera.
[0062] In an exemplary instance, the vertical distance between the camera for detecting the position of the axis and the positioning surface of the detected part (or component, part) can be calibrated and determined when installing the camera. That is to say, in the installation stage of the camera, the geometric position relationship of the camera, especially the vertical distance between its optical axis and the part positioning surface, is accurately determined through calibration. This calibration result lays a foundation for constructing an accurate coordinate transformation relationship (such as an external parameter matrix) and ensuring the accuracy of subsequent detection results.
[0063] Taking three photographing devices, namely camera 1, camera 2, and camera 3, as an example, combined with Figure 2 , define the plane on the side where the base (as shown by the reference numeral 26 in Figure 2 ) contacts the containing part (as shown by the reference numeral 25 in Figure 2 ) as the working plane of the base, and establish a right-handed rectangular coordinate system (X w , Y w , Z w ) as the world coordinate system. In the world coordinate system, the origin is the center of the hole of the base hole on the working plane, the positive direction of X w is a horizontal direction in the working plane of the base, Y w is in the working plane and perpendicular to X w , and Z w is the direction perpendicular to the working plane of the base and pointing to the containing part. The axis of the base hole is the reference axis.
[0064] Camera 1 (as shown by the reference numeral 21 in Figure 2 ) is used to detect the position deviation of the first axis of the containing part. The homogeneous coordinates of camera 1 in the world coordinate system are (0, 0, -z c0 , 1) T . Establish the camera coordinate system of camera 1 as (X c1 , Y c1 , Z c1 ), where X c1 , Y c1 , Z c1 are respectively parallel and in the same direction as X w , Y w , Z w . The origin of the camera coordinate system of camera 1 is the optical center of camera 1. That is to say, as shown in formula (1), the coordinates of a point in the camera coordinate system of camera 1 can be derived from the coordinates of this point in the world coordinate system:
[0065] (x c1 , y c1 , zc1 , 1) T = K out1 (x w , y w , z w , 1) T (1)
[0066] In formula (1), matrix K out1 is the external parameter matrix of camera 1 at this moment, as shown below:
[0067]
[0068] Camera 2 (as shown by label 22 in Figure 2 ) is used to detect the position deviation and angular deviation of the second axis of the included part (as shown by label 24 in Figure 2 ). The camera coordinate system of camera 2 is (X c2 , Y c2 , Z z2 ), where the X c2 axis is parallel and in the same direction as the Z w axis, and the distance to the Z w axis is R; the Y c2 axis is parallel and in the same direction as the Y w axis; the Z c2 axis is the optical axis of camera 2, which is anti-parallel to the X w axis, and the distance to the X w axis is H. That is to say, the relationship between the homogeneous coordinates of a point in the world coordinate system and the homogeneous coordinates of this point in the camera coordinate system of camera 2 is shown in formula (2):
[0069] (x c2 , y c2 , z c2 , 1) T = K out2 (x w , y w , z w , 1) T (2)
[0070] In formula (2), matrix K out2 is the external parameter matrix of camera 2 at this moment, as shown below:
[0071]
[0072] Camera 3 (as shown by label 23 in Figure 2 ) cooperates with camera 2 to detect the position deviation and angular deviation of the second axis of the included part from another perspective. Camera 3 and camera 2 have the same coordinate in the Z w direction in the world coordinate system, and camera 3 is obtained by rotating camera 2 around the Z wObtained by rotating by θ (assuming without loss of generality that θ ∈ (0, π)), that is to say, the relationship between the homogeneous coordinates of a point in the world coordinate system and the homogeneous coordinates of this point in the camera coordinate system of camera 3 is shown in formula (3):
[0073] (x c3 ,y c3 ,z c3 ,1) T =K out3 (x w ,y w ,z w ,1) T (3)
[0074] In formula (3), the matrix K out3 is the external parameter matrix of camera 3 at this moment, as shown below:
[0075]
[0076] In an exemplary instance, camera 1 is used to detect the position deviation of the first axis of the inclusion. By clearly imaging the end face and the orifice of the inclusion, camera 1 extracts the center coordinates of the outer circle of the hole chamfer, calculates the deviation of the hole axis of the inclusion relative to the reference axis, and provides a basis for adjusting the position of the inclusion to align its hole axis with the installation reference.
[0077] In an exemplary instance, camera 2 is used to detect the position deviation and angular deviation of the second axis of the included part. Camera 2 obtains the axis information of the included part from different angles, including the horizontal deviation and the angular deviation, and helps to adjust the position and attitude of the included part to align its axis with the reference axis (or the hole axis of the inclusion).
[0078] In an exemplary instance, camera 3 cooperates with camera 2 and is used to detect the position deviation and angular deviation of the second axis of the included part from another perspective. Camera 3 provides multi-angle data for calculating the comprehensive axis deviation (including translation and rotation) of the included part, further improving the detection accuracy and ensuring that the second axis of the included part is aligned with the first axis of the inclusion.
[0079] In an exemplary instance, the reference axis is the optical axis of the first imaging device. Detecting the position of the first axis of the inclusion in step 100 may include:
[0080] Obtaining an image of the outer circle of the hole chamfer of the inclusion;
[0081] Using an edge detection algorithm to obtain the boundary of the outer circle of the chamfer, and calculating the pixel coordinates (u1, v1) of the center of the outer circle of the chamfer in the image pixel coordinate system;
[0082] Convert the center pixel coordinates to world coordinates according to the internal parameter matrix, vertical distance, and external parameter matrix of the imaging device that images the outer circle of the chamfer of the shooting hole;
[0083] Calculate the first displacement deviation between the first axis of the containing part and the reference axis according to the world coordinates of the center of the outer circle of the chamfer;
[0084] In an exemplary instance, the containing part is installed on the base, and one end face of the hole of the containing part contacts and fits with the base plane (it can be considered that the distance between the two is 0). Through the depth-of-field setting of Camera 1, the image of the outer circle of the hole chamfer is clearly visible, that is, the end face of the containing part and the outer circle of the hole chamfer can be clearly imaged, ensuring the imaging quality. In this way, the image of the outer circle of the chamfer of the hole of the containing part can be captured by Camera 1. It should be noted that the relative position between the position of the camera for detecting the position of the first axis and the part positioning surface is fixed and calibrated as a known quantity.
[0085] In one embodiment, the position of the first axis is expressed by the center position of the outer circle of the chamfer at the orifice of the hole of the containing part, and the direction is expressed by the perpendicular direction of the part positioning surface.
[0086] In an exemplary instance, an edge detection algorithm, such as Canny edge detection, can be used to obtain the boundary of the outer circle of the chamfer and calculate the center pixel coordinates (u1, v1) of the center of the outer circle of the chamfer in the image pixel coordinate system. In one embodiment, if the circle in the image is not completely visible, the circular boundary can be completed by local fitting.
[0087] In an exemplary instance, according to the internal parameter matrix and vertical distance of Camera 1 that images the outer circle of the hole chamfer, the center pixel coordinates (u1, v1) can be converted into camera coordinates (x c1 , y c1 , z c1 ), expressed as follows:
[0088] z c1 = z c0 ; where u0 and v0 are the coordinates of the principal point of the optical axis in the internal parameters of Camera 1 calibrated using a calibration plate; is the value of the focal length in pixel units, f is the focal length in the internal parameters of Camera 1, (δ x , δ y ) is the pixel ratio in the internal parameters of Camera 1. z c0 is the vertical distance in the geometric relationship between the calibrated optical center of Camera 1 and the part positioning surface.
[0089] In an exemplary instance, the external parameter matrix K out1 of Camera 1 can be used to convert the coordinates (x c1 , y c1, z c1 ) Convert to the world coordinate system, that is: Thus, according to the definition of the world coordinate system, the Z coordinate of the center of the chamfered outer circle b = 0 (located on the base plane). Then, the world coordinates of the center of the chamfered outer circle in the world coordinate system are (X b , Y b , 0).
[0090] In an exemplary instance, the coordinates of the axis of the base hole (i.e., the reference axis) are (0, 0, Z w ). The horizontal deviation (X b , Y b ) of the position of the first axis of the accommodating part through the center of the chamfered outer circle can be expressed as: ΔX = X b , ΔY = Y b . Since the end face of the accommodating part is in contact with the base, the vertical deviation can be ignored. Then, the horizontal deviation (i.e., the first displacement deviation) between the first axis and the reference axis is (ΔX, ΔY).
[0091] In an embodiment, as Figure 2 shown, the depth of field of camera 1 can make the end face of the accommodating part facing the camera 1 and the orifice image clearly down to a certain depth; after the accommodating part is installed on the positioning base, the deviation between the actual position of the axis of the hole and the optical axis of camera 1 is not too large, and the orifice circle or most of its content can be seen in the image of camera 1, so that its center can be obtained by fitting through methods including but not limited to Hough circle transformation; the accuracy of the hole of the accommodating part has been guaranteed in its processing process, and geometric tolerances such as perpendicularity and roundness can be ignored. The accommodating part is installed on the base, and there is a certain deviation between the first axis of the accommodating part and the axis of the base hole, i.e., the reference axis, and one end face of the accommodating part is in contact and fits with one plane of the base (the distance is 0). The chamfer parameters of the hole of the accommodating part are: chamfer depth l d (l d > 0), and the chamfer angle is θ d .
[0092] In an embodiment, assume that the homogeneous coordinates of the center of the chamfered outer circle in the world coordinate system are represented as P w1 = (x b , y b , 0, 1) T , and the homogeneous coordinates of the hole circle in the world coordinate system are represented as P w2 = (x b , y b , l d , 1) T . |x b |, |y b | is the deviation between the axis of the hole of the accommodating part and the axis of the base hole at this time.
[0093] The center of the chamfered outer circle is at the X of the camera coordinate system of Camera 1 c1 Y c1 Z c1 The coordinates in can be expressed as: P c1 = K out1 (0,0,0,1) T = (x b , y b , z c0 , 1) T ; To determine the first displacement deviation between the first axis and the reference axis in step 100, it may include:
[0094] Establish an image physical coordinate system O xy xy, whose plane is parallel to the X c1 Y c1 plane, with a distance of the focal length f of Camera 1, and the projection of the origin of the camera coordinate system on it is the origin O of the image physical coordinate system xy , and the x and y axes are respectively parallel to the X c1 , Y c1 axis and have the same direction. Then the homogeneous coordinates of the points in the image physical coordinate system can be expressed as the following formula:
[0095]
[0096] where z c1 is the coordinate of this point along the Z c1 axis in the camera coordinate system.
[0097] Establish an image pixel coordinate system Ouv, which is coplanar with the image physical coordinate system O xy xy, the u and v axes are respectively parallel to the x and y axes and have the same direction, and the homogeneous coordinates of the origin O in the image physical coordinate system are (-u0, -v0, 1) T , where u0 and v0 are calibrated known quantities, and the physical lengths reflected by one pixel are δx1 and δy1 respectively. Then the homogeneous coordinates of the points in the image pixel coordinate system can be expressed as the following formula:
[0098]
[0099] where
[0100] The relationship between the homogeneous coordinates of the points in the image pixel coordinate system and the homogeneous coordinates of this point in the camera coordinate system is: where the matrix K in1 is the internal parameter matrix of Camera 1, which is expressed as follows, and its parameters are determined by the attributes of Camera 1.
[0101]
[0102] As described above, the relationship between the homogeneous coordinates of a point in the image pixel coordinate system and the homogeneous coordinates of a point in the world coordinate system is as follows:
[0103]
[0104] where Z c0 is the depth of the point on the image in the camera coordinate system, that is, the vertical distance between Camera 1 and the part positioning surface, which is determined by calibration.
[0105] Therefore, the homogeneous coordinates of the center of the chamfered outer circle in the image pixel coordinate system are as follows:
[0106]
[0107] In this way, the horizontal deviation (i.e., the first displacement deviation) between the first axis and the reference axis can be solved as:
[0108]
[0109] Step 101: Adjust the position of the containing part according to the determined first displacement deviation so that the first axis coincides with the optical axis of the imaging device.
[0110] In an exemplary example, the first displacement deviation value (ΔX, ΔY) can be transmitted to the adjustment device (such as a robotic arm or a servo platform) to adjust the position of the containing part so that the hole axis (i.e., the first axis) of the containing part coincides with the reference axis.
[0111] In one embodiment, the adjustment device moves the containing part along the X w axis and along the Y w axis It is considered that the first axis of the containing part is centered with the hole axis of the base, that is, the reference axis, and then the clamping element clamps the containing part. In one embodiment, to improve the centering accuracy, it may further include: after adjusting the position of the containing part according to the determined first displacement deviation, that is, after the movement of the containing part is completed, determining whether the centering deviation requirement between the first axis and the camera optical axis is met. If not, repeat Step 100 and Step 101 until the centering deviation requirement between the first axis and the camera optical axis is met. For example, the tolerances of X b and Y b are less than the specified value, and it is considered that the first axis of the containing part is centered with the hole axis of the base, that is, the reference axis, and then the clamping element clamps the containing part.
[0112] Step 102: Use the pre-set imaging device to detect the position of the second axis of the contained part and determine the second displacement deviation and the angular deviation between the second axis and the reference axis.
[0113] In an exemplary instance, detecting the axis position of the included part in step 102 may include:
[0114] Taking an image including two points on the second axis located on the included part;
[0115] Through coordinate transformation, obtaining the world coordinates of two points on the second axis of the included part;
[0116] According to the positions of the two points on the second axis, obtaining the direction vector of the second axis;
[0117] Calculating the angle between the second axis and the image plane according to the projection direction of the second imaging device;
[0118] Obtaining the direction deviation and position deviation of the second axis according to the calculated angle information.
[0119] In an exemplary instance, the second imaging device includes two imaging devices, namely the first imaging device such as camera 2 and the second imaging device such as camera 3. First, the included part will be moved so that the second axis located on the included part is approximately near the reference axis. Then, use camera 2 and camera 3 to take pictures of the included part from different perspectives to ensure that the characteristic positions of two points on the second axis can be clearly imaged in the image; obtain the pixel coordinates (u c2 , v c2 ) and (u c3 , v c3 ). Among them, the second axis located on the included part is a straight line in three-dimensional space, and this straight line can be uniquely determined by the coordinates of two points. The two points can be any two points in space on the second axis of the included part. Preferably, the two points are characteristic points that are physically easy to locate or prominent.
[0120] In an exemplary instance, using the internal parameter matrix K in2 and the external parameter matrix K out2 of camera 2, convert the pixel coordinates (u c2 , v c2 ) into the coordinates (x c2 , y c2 , z c2 ) in the camera coordinate system. The conversion relationship is as follows:
[0121]
[0122] Convert the coordinates (x c2 , y c2 , z c2 ) in the camera coordinate system into the point (x w2 , y w2 , z w2 ) in the world coordinate system. The conversion relationship is as follows:
[0123]
[0124] According to the above processing, the pixel coordinates (u c3 , v c3 ) can also be converted into the coordinates (x c3 , y c3 , z c3 ) in the camera coordinate system, and then the coordinates (x c3 , y c3 , z c3 ) in the camera coordinate system can be converted into the world coordinates (x w3 , y w3 , z w3 ). In this way, the position (x1, y1, z1) of one of the two points on the second axis of the included part in the world coordinate system, that is, (x w2 , y w2 , z w2 ) and the position (x2, y2, z2) of the other point in the world coordinate system, that is, (x w3 , y w3 , z w3 ) can be obtained.
[0125] In an exemplary instance, the differences between the two points on the second axis of the obtained included part are obtained: Δx = x2 - x1, Δy = y2 - y1, Δz = z2 - z1. In this way, the direction vector of the second axis is:
[0126]
[0127] In an exemplary instance, the normal vector of the imaging plane of camera 2 is (1, 0, 0), and the projection direction vector of the second axis on the imaging plane of camera 2 is: At this time, the cosine value cosα2 of the first included angle between the second axis and the reference axis is:
[0128] The normal vector of the imaging plane of camera 3 is (cosθ, sinθ, 0), and the projection direction vector of the second axis on the imaging plane of camera 3 is: At this time, the cosine value of the second included angle between the second axis and the reference axis is:
[0129] In an exemplary instance, according to the cosine value cosα2 of the first included angle and the cosine value cosα3 of the second included angle, calculate respectively: and is the normalized ratio component of the second axis direction vector, which actually describes the spatial orientation of the second axis direction of the included part in the world coordinate system. In the embodiments of the present application, combining the observation results of multiple cameras, an optimization algorithm (such as gradient descent) can be combined for optimization, and the position deviations: Δx, Δy, Δz, and the angle deviation: the rotation amount α are iteratively adjusted i , such that the calculated values of cosα i (i = 2, 3) converge to the target range, and finally the second axis of the included part is aligned with the reference axis
[0130] In one embodiment, the expression of a point in the world coordinate system in the image pixel coordinate system of camera 2 is:
[0131]
[0132] The expression of a point in the world coordinate system in the image pixel coordinate system of camera 3 is:
[0133]
[0134]
[0135] In this embodiment, it is assumed that Δx = x2 - x1, Δy = y2 - y1, Δz = z2 - z1 (assuming Δz > 0). In this way, the second axis can also be expressed as:
[0136] The unit normal of the imaging plane of camera 2 (or any plane parallel to this plane) is: Therefore, the direction vector of the projection of this line on the imaging plane of camera 2 (or any plane parallel to this plane) is: Therefore, the cosine value of the angle between this line and the reference axis in the image pixel coordinate system of camera 2 is cosα2; the unit normal of the imaging plane of camera 3 (or any plane parallel to this plane) is: Therefore, the direction vector of the projection of this line on the imaging plane of camera 3 (or any plane parallel to this plane) is Therefore, the cosine value of the angle between this line and the reference axis in the image pixel coordinate system of camera 3 is cosα3. In this way, cosα2 and cosα3 can be solved from the expressions
[0137] In one embodiment, in order to further improve the alignment accuracy, more cameras, i.e., camera i, can also be arranged in the horizontal plane where camera 2 and camera 3 are located. The external parameter matrix of camera i (i = 3, 4,...) is:
[0138]
[0139] where, θi is the rotation angle of Camera i and Camera 2 about the Z-axis in the horizontal plane. Similarly, it can be obtained that: w In a specific embodiment, the positive or negative nature of
[0140]
[0141] can be deduced from the observation of Camera 2. The deviation between cosα (i = 2, 3,...) and 1 can be made within the tolerance design range by optimization methods including but not limited to gradient descent, so as to obtain the corresponding movement amounts Δx, Δy, Δz and rotation amount α i . i
[0142] Step 103: Adjust the position and angle of the included part according to the determined second displacement deviation and angle deviation, so that the second axis coincides with the optical axis of the imaging device, to achieve the alignment of the first axis and the second axis.
[0143] In an exemplary example, the position and direction of the second axis of the included part can be adjusted by a servo device.
[0144] In an embodiment, the included part can be moved according to the movement amount given by the above optimization method, i.e., the position deviation, until the axis angle deviation, i.e., the angle deviation, is controlled within the tolerance design range. Thus, during the assembly process of the included part, by controlling the movement of the included part, high-precision alignment of the second axis is maintained. In an embodiment, in order to improve the alignment precision, it may further include: after adjusting the position and angle of the included part according to the determined second displacement deviation and angle deviation, that is, after adjusting the position of the included part, determining whether the axis position of the adjusted included part meets the alignment deviation requirement between the second axis and the hole axis on the containing part, i.e., the first axis. If not, repeat Step 102 and Step 103 until the alignment deviation requirement is met.
[0145] The real-time axis alignment method of the hole-shaft interference connection provided in the embodiment of the present application determines the displacement that needs to be corrected for the containing part by identifying the position of the hole axis of the containing part, i.e., the first axis, and moves the containing part according to the corrected displacement so that the hole axis of the containing part coincides with the base hole axis, i.e., the reference axis; and determines the corrected displacement and angle by identifying the position of the axis of the contained part, i.e., the second axis, so that the axis of the contained part coincides with the base hole axis, so that the hole axis of the containing part and the axis of the contained part meet the requirements of the angle deviation and the distance deviation of the parallel axes, thereby better realizing the axis alignment of the hole-shaft connection assembly. The embodiment of the present application utilizes the advantages of machine vision in terms of flexibility, convenience and high precision in assembly, and uses multiple cameras in a specific layout to respectively detect, calculate and correct the angle deviation and distance deviation of the first axis located at the containing part and the second axis located at the contained part, thereby realizing high-precision real-time axis alignment of the hole-shaft interference connection.
[0146] The embodiment of the present application provides a real-time centering method for the axis of a hole-shaft interference fit connection, using machine vision and automation technology for detection and adjustment. By first correcting the containing part and then the contained part, high-precision centering of the containing part and the contained part is effectively achieved. The embodiment of the present application is particularly aimed at the problem of centering the axis of the existing hole-shaft interference fit assembly, especially when the relative interference is large, the depth-to-diameter ratio of the hole in the connection is large, and the assembly time window is small, and a high-precision centering method is provided to ensure the stability and reliability of the assembly process.
[0147] The present application also provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute any of the above-mentioned methods for real-time centering of the axis of a hole-shaft interference fit connection.
[0148] The present application further provides a computer device, including a memory and a processor, wherein the memory stores the following instructions executable by the processor: used to execute the steps of the method for real-time centering of the axis of a hole-shaft interference connection as described in any one of the above.
[0149] Figure 3 Schematic diagram of the structure of the real-time centering device for the hole-shaft interference connection axis in the embodiment of the present application, as shown in FIG. Figure 3 As shown, it at least includes: a visual inspection module, a part positioning module, and a motion execution module; wherein,
[0150] The visual detection module includes a first camera and a second camera. The visual detection module is used to detect the position of the first axis of the containing part by using the preset first camera, and determine the first displacement deviation of the first axis from the reference axis by using image processing technology; and detect the position of the second axis of the contained part by using the preset second camera, and determine the second displacement deviation and angle deviation of the second axis from the reference axis.
[0151] A part positioning module, for positioning and clamping according to the containing part: adjusting the position of the containing part according to the determined first displacement deviation to make the first axis coincide with the reference axis; and adjusting the position and angle of the contained part according to the determined second displacement deviation and angle deviation to make the second axis coincide with the reference axis, so as to achieve the centering of the first axis and the second axis.
[0152] A motion execution module, for controlling the movement of the positioning containing part to make the first axis coincide with the reference axis, and controlling the movement of the contained part to make the second axis coincide with the reference axis, so as to achieve the centering of the first axis and the second axis.
[0153] In an exemplary example, the first photographing device is a camera, the second photographing device includes a first photographing device and a second photographing device, and the first photographing device and the second photographing device are cameras. More specifically, those skilled in the art can easily understand that the vision detection module includes, in addition to the camera and its supporting lens, a computer for controlling the camera and control software installed in the control computer, etc.
[0154] In an exemplary example, the part positioning module may include, but is not limited to, dedicated containing part positioning and clamping elements.
[0155] In an exemplary example, the motion execution module may include, but is not limited to, a guiding shaft for clamping the contained part, a robotic arm for driving the guiding shaft, and an element for driving the containing part.
[0156] The embodiment of the present application provides a device for real-time centering of the axes of interference fit between holes and shafts, in the scenario of using machine vision and automation technology for detection and adjustment. By first calibrating the containing part and then calibrating the contained part, the high-precision centering of the containing part and the contained part is effectively achieved. The embodiment of the present application specifically aims at the problem of axis centering in the existing interference fit assembly of holes and shafts, especially in the case of a relatively large interference amount, a relatively large depth-to-diameter ratio of the holes in the connection, and a small assembly time window, and provides a high-precision centering solution to ensure the stability and reliability of the assembly process.
[0157] Although the disclosed embodiments of the present application are as above, the content described is only an embodiment adopted for the convenience of understanding the present application, and is not used to limit the present application. Any person skilled in the art within the scope of the present application can make any modifications and changes in the form and details of the implementation without departing from the spirit and scope disclosed by the present application. However, the scope of patent protection of the present application shall still be subject to the scope defined by the appended claims.
Claims
1. A real-time centering method for the axis of an interference fit between a hole and a shaft, characterized in that, Including: Using a pre-set first imaging device, detecting the position of the first axis of the containing part, and determining the first displacement deviation between the first axis and the reference axis through image processing technology; Adjusting the position of the containing part according to the determined first displacement deviation to make the first axis coincide with the reference axis; Using a pre-set second imaging device, detecting the position of the second axis of the contained part, and determining the second displacement deviation and angular deviation between the second axis and the reference axis; Adjusting the position and angle of the contained part according to the determined second displacement deviation and angular deviation to make the second axis coincide with the reference axis, so as to achieve the centering of the first axis and the second axis.
2. The method according to claim 1, wherein The reference axis is the optical axis of the first imaging device; The detecting the position of the first axis of the containing part and determining the first displacement deviation between the first axis and the reference axis through image processing technology includes: Obtaining an image of the outer circle of the hole chamfer of the containing part; Using an edge detection algorithm to obtain the boundary of the chamfered outer circle, and calculating the center pixel coordinates of the chamfered outer circle in the image pixel coordinate system; Converting the center pixel coordinates into world coordinates according to the internal parameter matrix, vertical distance, and external parameter matrix of the imaging device for shooting the image of the hole chamfer outer circle; Calculating the first displacement deviation between the first axis of the containing part and the reference axis according to the world coordinates of the center of the chamfered outer circle.
3. The method according to claim 1, after adjusting the position of the containing part according to the determined first displacement deviation, further including: Judging whether the position of the adjusted containing part meets the centering deviation requirement between the first axis and the reference axis. If not, repeatedly execute the step of detecting the position of the first axis of the containing part and the step of adjusting the position of the containing part according to the determined first displacement deviation until the centering deviation requirement between the first axis and the reference axis is met.
4. The method according to claim 1, wherein The detecting the position of the second axis of the contained part and determining the second displacement deviation and angular deviation between the second axis and the reference axis includes: Shooting an image including two points on the second axis of the contained part; Through coordinate transformation, obtaining the world coordinates of the two points on the second axis; according to the positions of the two points on the second axis, obtaining the direction vector of the second axis; Calculating the angle between the second axis and the image plane according to the projection direction of the second imaging device; Obtaining the direction deviation and position deviation of the second axis according to the calculated angle information.
5. The method according to claim 4, wherein, The second imaging device includes a first imaging device and a second imaging device; The shooting an image including two points on the second axis of the contained part includes: Using the first imaging device and the second imaging device to shoot the contained part from different perspectives; Obtaining the world coordinates of the two points, including: For the first imaging device, using the internal parameter matrix and external parameter matrix of the first imaging device to convert the pixel coordinates into world coordinates, as the position of one of the two points on the second axis of the contained part in the world coordinate system; For the second imaging device, using the internal parameter matrix and external parameter matrix of the second imaging device, convert the pixel coordinates into world coordinates, which are used as the position of the other point among the two points on the second axis of the included part in the world coordinate system; Obtaining the direction vector of the second axis includes: Obtaining the difference between the two points on the second axis of the obtained included part and the direction vector of the second axis; Calculating the angle between the second axis and the image plane includes: According to the projection direction vector of the second axis on the imaging plane of the first imaging device, obtaining the first cosine value of the angle between the second axis and the reference axis; According to the projection direction vector of the second axis on the imaging plane of the second imaging device, obtaining the second cosine value of the angle between the second axis and the reference axis; The obtaining of the direction deviation and position deviation of the second axis according to the calculated angle information includes: According to the first cosine value and the second cosine value, obtaining the direction deviation and position deviation of the second axis.
6. The method according to claim 1, after adjusting the position and angle of the included part according to the determined second displacement deviation and angle deviation, further includes: Judging whether the position of the axis of the adjusted included part meets the requirement of the centering deviation between the second axis and the hole axis on the housing part. If not, repeat the steps of detecting the position of the second axis of the included part and the steps of adjusting the position and angle of the included part according to the determined second displacement deviation and angle deviation until the requirement of the centering deviation between the second axis and the hole axis on the housing part is met.
7. The method according to claim 1, further comprising: Install the imaging devices according to the pre-set layout positions in combination to achieve high-precision real-time centering of the interference fit of the hole axis; the imaging devices include two or more.
8. A real-time centering device for the axis of an interference fit between a hole and a shaft, characterized in that, Including: A visual detection module, a part positioning module, and a motion execution module; where: The visual detection module includes a first imaging device and a second imaging device; using the pre-set first imaging device, detecting the position of the first axis of the housing part, and determining the first displacement deviation between the first axis and the reference axis through image processing technology; and, using the pre-set second imaging device, detecting the position of the second axis of the included part, and determining the second displacement deviation and angle deviation between the second axis and the reference axis; The part positioning module is used for positioning and clamping the housing part: adjusting the position of the housing part according to the determined first displacement deviation to make the first axis coincide with the reference axis; and, adjusting the position and angle of the included part according to the determined second displacement deviation and angle deviation to make the second axis coincide with the reference axis, so as to achieve the centering of the first axis and the second axis; The motion execution module is used for controlling the movement of the positioned housing part to make the first axis coincide with the reference axis, and controlling the movement of the included part to make the second axis coincide with the reference axis, so as to achieve the centering of the first axis and the second axis.
9. A computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to execute the method for real-time centering of the interference fit axis of the hole shaft according to any one of claims 1-7.
10. A computer device, comprising a memory and a processor, wherein, The following instructions executable by a processor are stored in a memory: steps for performing the method for real-time alignment of the axis of a hole-shaft interference connection according to any one of claims 1-7.