Method, device and system for crimping of air conditioning condenser tube rings
By combining a binocular camera and a robotic arm, the depth and position of the center point of the condenser ring are automatically calculated, achieving high-precision air conditioner condenser ring crimping. This solves the problem of low yield rate in manual crimping and improves the crimping quality.
Patent Information
- Application Number
- CN202411177811.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2044-08-26
AI Technical Summary
The crimping process of traditional air conditioner condenser rings relies on manual operation, resulting in uncontrollable yield and susceptibility to subjective factors, leading to unstable crimping quality.
Images of the condenser ring are acquired using a binocular camera, and the depth and position of the center point are calculated using a binocular ranging algorithm to control the robotic arm to automatically perform the pressing.
It achieves high-precision automatic crimping, improves the crimping yield of condenser rings, and reduces the impact of human interference.
Smart Images

Figure CN119036447B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of automatic assembly of air conditioning devices, in particular to a crimping method and device for an air conditioner condenser pipe ring, a computer readable storage medium, a computer program product and a crimping system. BACKGROUND
[0002] Visual positioning technology is a technology that uses cameras or sensors to obtain target position information and locates the target through image processing algorithms. With the development of visual technology, more and more practical applications are in life and work, greatly facilitating people's life. Visual technology completes positioning in various industrial scenes, helps complex work such as automation production and detection. And realize the automatic positioning, identification and control of products, greatly reduce the production cost, improve the work efficiency and product yield.
[0003] Traditional refrigerator condenser pipe ring connection is usually crimped by manual operation, which requires high technical operation of personnel, and the yield is uncontrollable and easily disturbed by subjective factors. SUMMARY
[0004] The main purpose of the present application is to provide a crimping method, device, computer readable storage medium, computer program product and crimping system for an air conditioner condenser pipe ring, to at least solve the problem of low yield of manual crimping of the condenser pipe ring in the prior art.
[0005] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a crimping method for an air conditioner condenser pipe ring is provided, comprising: acquiring a first image and a second image of the condenser pipe ring, the first image and the second image being two images of the condenser pipe ring captured by a binocular camera respectively; identifying a center point of the condenser pipe ring in the first image to obtain a center point position; calculating a depth corresponding to the center point position by using a binocular ranging algorithm according to the first image and the second image, the depth corresponding to the center point position being a distance from the actual position of the center point position to the binocular camera; determining the actual position of the center point of the condenser pipe ring according to the center point position and the depth corresponding to the center point position; and controlling the end of a mechanical arm to move to the actual position for crimping.
[0006] Optionally, identifying the center point of the condenser pipe ring in the first image to obtain a center point position comprises: identifying a corner point in the first image to obtain four first corner points, the corner point being an edge point of the contact position of the condenser pipe ring and the condenser pipe; establishing a plane coordinate system on the first image and determining the coordinates of the four first corner points in the plane coordinate system; and calculating the average of the coordinates of the four first corner points to obtain the center point position, the center point position being the coordinates of the center point of the condenser pipe ring in the first image.
[0007] Optionally, the corner points in the first image are identified to obtain four first corner points, comprising: identifying the condenser ring in the first image to obtain a ROI region, the ROI region being a minimum region containing the condenser ring in the first image; performing edge detection on the condenser ring and the condenser in the ROI region to obtain a plurality of edge points; performing straight line fitting on the plurality of edge points by using a least square method to obtain two straight lines; determining the edge points with a distance greater than a predetermined distance from the two straight lines as candidate corner points; and determining four candidate corner points on the condenser ring as the four first corner points.
[0008] Optionally, the depth corresponding to the center point position is calculated by using a binocular distance measurement algorithm according to the first image and the second image, comprising: identifying corner points in the second image to obtain four second corner points, the corner points being edge points at the contact positions of the condenser ring and the condenser; determining the coordinates of the four second corner points in the plane coordinate system; calculating the parallax according to the coordinates of the four first corner points and the corresponding four second corner points; and calculating the depth corresponding to the center point position according to the parallax and parameters of the binocular camera, the parameters of the binocular camera including a focal length and a baseline distance, the baseline distance being the distance between the two optical centers of the binocular camera.
[0009] Optionally, the corner points in the second image are identified to obtain four second corner points, comprising: identifying corner points in the second image to obtain four candidate corner points; determining that the candidate corner points match the first corner points when the correlation degree between the matching window of the candidate corner points and the matching window of the corresponding first corner points is greater than or equal to a predetermined threshold, the matching window being a square window with a predetermined point as the center and containing a predetermined number of pixel points; determining that the candidate corner points fail to match the first corner points when the correlation degree between the matching window of the candidate corner points and the matching window of the corresponding first corner points is less than the predetermined threshold; adjusting the position of the candidate corner points until the four candidate corner points all successfully match the corresponding first corner points; and determining the four candidate corner points that successfully match the first corner points as the second corner points.
[0010] Optionally, determining the actual position of the center point of the condenser pipe ring according to the center point position and the depth corresponding to the center point position comprises: establishing an end-of-arm coordinate system, a Z-axis of the end-of-arm coordinate system being parallel to a direction of the depth; calibrating a plane coordinate system on the first image with an XOY plane of the end-of-arm coordinate system to obtain a rotation matrix and a translation vector; performing coordinate transformation on the center point position according to the rotation matrix and the translation vector to obtain an X-axis coordinate and a Y-axis coordinate of the center point of the condenser pipe ring in the end-of-arm coordinate system; determining a Z-axis coordinate of the center point of the condenser pipe ring in the end-of-arm coordinate system according to the depth corresponding to the center point position; and determining the X-axis coordinate, the Y-axis coordinate and the Z-axis coordinate of the center point of the condenser pipe ring in the end-of-arm coordinate system as the actual position of the center point of the condenser pipe ring.
[0011] According to another aspect of the present application, there is provided a crimping device for a condenser pipe ring of an air conditioner, comprising: an acquisition unit configured to acquire a first image and a second image of the condenser pipe ring, the first image and the second image being two images of the condenser pipe ring captured by a binocular camera; an identification unit configured to identify a center point of the condenser pipe ring in the first image to obtain a center point position; a calculation unit configured to calculate a depth corresponding to the center point position by using a binocular distance measurement algorithm according to the first image and the second image, the depth corresponding to the center point position being a distance from an actual position of the center point position to the binocular camera; a determination unit configured to determine the actual position of the center point of the condenser pipe ring according to the center point position and the depth corresponding to the center point position; and a control unit configured to control an end of an arm to move to the actual position for crimping.
[0012] According to still another aspect of the present application, there is provided a computer readable storage medium comprising a stored program, wherein the program, when executed, controls a device in which the computer readable storage medium is located to perform any of the methods.
[0013] According to yet another aspect of the present application, there is provided a computer program product comprising a computer program, which, when executed by a processor, implements any of the methods.
[0014] According to still another aspect of the present application, there is provided a crimping system, comprising: an arm, a binocular camera, one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs comprise instructions for performing any of the methods.
[0015] According to the technical solution of the present application, in the crimping method of the air conditioner condenser pipe ring, the depth corresponding to the center point of the condenser pipe ring in the image can be determined by comparing the first image and the second image of the binocular camera, that is, the depth corresponding to the position of the center point, and the actual position of the center point of the condenser pipe ring in the three-dimensional space is obtained by transforming the position and depth of the center point of the condenser pipe ring, so that the end of the mechanical arm can be controlled to move to the actual position for crimping, without manual crimping, and the positioning accuracy is high, resulting in a high yield of crimping, solving the problem of low yield of manual crimping of the condenser pipe ring in the prior art. BRIEF DESCRIPTION OF DRAWINGS
[0016] Figure 1 A hardware structure block diagram of a mobile terminal for performing a crimping method of an air conditioner condenser pipe ring is shown according to an embodiment of the present application;
[0017] Figure 2 A flowchart of a crimping method of an air conditioner condenser pipe ring is shown according to an embodiment of the present application;
[0018] Figure 3 A schematic diagram of an air conditioner condenser pipe ring is shown according to an embodiment of the present application;
[0019] Figure 4 A structure block diagram of a crimping device of an air conditioner condenser pipe ring is shown according to an embodiment of the present application.
[0020] Among them, the above-mentioned drawings include the following reference signs:
[0021] 01, edge point; 02, corner point; 102, processor; 104, memory; 106, transmission device; 108, input and output device. DETAILED DESCRIPTION
[0022] It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict. The technical solutions in the embodiments of the present application will be described in detail below with reference to the drawings and in combination with the embodiments.
[0023] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described in detail below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should be within the scope of protection of the present application.
[0024] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0025] As described in the background section, the yield rate of manual crimping of condenser rings in the prior art is low. To solve this technical problem, embodiments of this application provide a crimping method, apparatus, computer-readable storage medium, computer program product, and crimping system for air conditioning condenser rings.
[0026] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0027] The methods and embodiments provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal for a method of crimping an air conditioner condenser pipe ring according to an embodiment of the present invention. (See diagram below.) Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0028] The memory 104 can be used to store computer programs, such as software programs of application software and modules, such as a computer program corresponding to the device information display method in the embodiments of the present application. The processor 102 executes various functional applications and data processing, i.e., implements the above method, by running the computer programs stored in the memory 104. The memory 104 can include a high-speed random access memory, and can further include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 104 can further include memories disposed remotely with respect to the processor 102, which can be connected to the mobile terminal through a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof. The transmission device 106 is used to receive or send data via a network. The specific examples of the above network can include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet in a wireless manner.
[0029] In the present embodiment, a method for crimping an air conditioner condenser pipe ring running on a mobile terminal, a computer terminal or the like is provided. It should be noted that the steps shown 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 shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that shown herein.
[0030] Figure 2 is a flowchart of a method for crimping an air conditioner condenser pipe ring according to an embodiment of the present application. As shown in Figure 2 the method includes the following steps:
[0031] Step S201, acquiring a first image and a second image of a condenser pipe ring, the first image and the second image being two images of the condenser pipe ring captured by a binocular camera respectively;
[0032] Step S202, identifying a center point of the condenser pipe ring in the first image to obtain a center point position;
[0033] Step S203, calculating a depth corresponding to the center point position by using a binocular ranging algorithm according to the first image and the second image, the depth corresponding to the center point position being a distance from the actual position of the center point position to the binocular camera;
[0034] Step S204: Determine the actual position of the center point of the condenser ring based on the center point position and the depth corresponding to the center point position.
[0035] Step S205: Control the end of the robotic arm to move to the above-mentioned actual position for pressing.
[0036] In the above-mentioned method for crimping air conditioner condenser rings, the depth corresponding to the center point of the condenser ring in the image can be determined by comparing the first and second images of the binocular camera. That is, the depth corresponding to the center point position is obtained by transforming the position and depth of the condenser ring center point to obtain the actual position of the condenser ring center point in three-dimensional space. The end of the robotic arm can then be controlled to move to the actual position for crimping, eliminating the need for manual crimping. The high positioning accuracy leads to a high crimping yield, solving the problem of low yield of manual crimping of condenser rings in the prior art.
[0037] In an optional implementation, to detect the coordinates of the center point of the condenser ring, step S202 includes:
[0038] Step S2021: Identify the corner points in the first image above to obtain four first corner points. The corner points are the edge points of the contact position between the condenser ring and the condenser.
[0039] Step S2022: Establish a planar coordinate system on the first image and determine the coordinates of the four first corner points in the planar coordinate system;
[0040] Step S2023: Calculate the average of the coordinates of the four first corner points to obtain the center point position, which is the coordinate of the center point of the condenser ring in the first image.
[0041] In the above embodiments, such as Figure 3 As shown in the figure, the location of the center point of the condenser ring cannot be clearly defined. By identifying the four corner points, four first corner points are obtained. The center of the rectangle formed by the four first corner points is the center point of the condenser ring. Therefore, in the planar coordinate system on the first image, the average value of the coordinates of the four first corner points is the coordinate of the center point of the condenser ring, i.e., the location of the center point.
[0042] To obtain the accurate coordinates of the first corner point, in one optional implementation, step S2021 includes:
[0043] Step S20211: Identify the condenser ring in the first image to obtain the ROI region, where the ROI region is the smallest region in the first image that contains the condenser ring.
[0044] Step S20212: Perform edge detection on the condenser ring and the condenser in the ROI region to obtain multiple edge points;
[0045] Step S20213: Use the least squares method to fit lines to multiple edge points to obtain two lines;
[0046] Step S20214: The edge points whose distances from both of the above-mentioned lines are greater than a predetermined distance are determined as candidate corner points;
[0047] Step S20215: The four candidate corner points located on the condenser ring are determined as the four first corner points.
[0048] In the above embodiment, the background of the first image is removed, and only the area containing the condenser ring is retained, such as... Figure 3 As shown, edge detection was performed on the aforementioned condenser ring and condenser in the ROI region, resulting in multiple edge points 01 with coordinates (x, y, y). i y i Substitute into d=min∑[y i -(ax i +b)] 2 The minimum distance d is calculated, and the corresponding values a and b are obtained, where a and b are the slope and intercept of the line, respectively. Calculate edge points (x) i y i The distance to the straight line is used to determine the edge points that are both more than a predetermined distance from the two straight lines as candidate corner points. That is, edge points that are farther away from the straight lines are determined as candidate corner points. The four candidate corner points located on the condenser ring are determined as four corner points O2, that is, four first corner points.
[0049] In order to calculate the depth corresponding to the center point, in one optional implementation, step S203 above includes:
[0050] Step S2031: Identify the corner points in the second image above to obtain four second corner points. The corner points are the edge points of the contact position between the condenser ring and the condenser.
[0051] Step S2032: Determine the coordinates of the four second corner points in the above-mentioned planar coordinate system;
[0052] Step S2033: Calculate the disparity based on the coordinates of the four first corner points and the corresponding coordinates of the four second corner points.
[0053] Step S2034: Calculate the depth corresponding to the center point position based on the parallax and the parameters of the binocular camera. The parameters of the binocular camera include focal length and baseline distance. The baseline distance is the distance between the two optical centers of the binocular camera.
[0054] In the above embodiment, the second image is calculated in the same way as the first image to obtain the coordinates of the center point of the condenser tube ring in the second image, i.e., the second center point position. The center point position and the second center point position are the same coordinate system coordinates. The distance between the four first corner points and the corresponding four second corner points is calculated and substituted into the parallax formula to calculate the multiple parallaxes. The average is calculated with a smaller error. According to the geometric relationship of the projection imaging, the depth corresponding to the center point position can be calculated according to the parallax and the parameters of the binocular camera.
[0055] In order to reduce the error, in an optional embodiment, the step S2031 comprises:
[0056] Step S20311, identifying the corner points in the second image to obtain four candidate corner points;
[0057] Step S20312, in the case where the correlation degree between the matching window of the candidate corner point and the corresponding first corner point is greater than or equal to a predetermined threshold, it is determined that the candidate corner point is matched with the first corner point. The matching window is a square window with a predetermined point as the center and containing a predetermined number of pixel points.
[0058] Step S20313, in the case where the correlation degree between the matching window of the candidate corner point and the corresponding first corner point is less than the predetermined threshold, it is determined that the candidate corner point fails to match with the first corner point.
[0059] Step S20314, adjusting the position of the candidate corner point until the four candidate corner points are successfully matched with the corresponding first corner points. The four candidate corner points that are successfully matched are determined as the second corner points.
[0060] In the above embodiment, the center point position and the second center point position are matched points in the two images, which can ensure the accuracy of positioning. To ensure this point, the first corner point and the second corner point must be matched points. The matching window method is used to determine whether the candidate corner point matches the first corner point. wherein, W p is the matching window, I is the pixel value of the original image, is the average value of the pixels in the original window, I i (px+d,y) is the pixel value of the corresponding point position of the original image on the target image after shifting d in the direction. If NCC=-1, it means that the two matching windows are completely unrelated. On the contrary, if NCC=1, it means that the correlation degree of the two matching windows is very high. If not matched, the adjustment is made until the matching is successful to ensure that the four first corner points and the four second corner points are successfully matched to ensure the positioning accuracy. However, if the adjustment is too large during the matching, the image needs to be re-shot and the positioning needs to be re-performed.
[0061] To achieve coordinate transformation, in one optional implementation, step S204 includes:
[0062] Step S2041: Establish the coordinate system of the robotic arm end effector, wherein the Z-axis of the robotic arm end effector coordinate system is parallel to the direction of the depth.
[0063] Step S2042: The planar coordinate system on the first image is calibrated with the XOY plane of the end-effector coordinate system to obtain the rotation matrix and translation vector.
[0064] Step S2043: Perform coordinate transformation on the center point position according to the above rotation matrix and the above translation vector to obtain the X-axis coordinates and Y-axis coordinates of the center point of the condenser ring in the coordinate system of the end of the robotic arm.
[0065] Step S2044: Determine the Z-axis coordinate of the center point of the condenser ring in the coordinate system of the end of the robotic arm based on the depth corresponding to the center point position.
[0066] Step S2045: Determine the X-axis coordinates, Y-axis coordinates, and Z-axis coordinates of the center point of the condenser ring in the above-mentioned robotic arm end coordinate system as the actual position of the center point of the condenser ring.
[0067] In the above embodiment, the coordinate transformation of the center point position is performed according to the rotation matrix and the translation vector to obtain the X-axis and Y-axis coordinates of the center point of the condenser ring in the coordinate system of the robotic arm end effector. Where θ is the rotation matrix, (v, w) is the position of the center point before the change, and t x , t y Let (x, y) be the translation vector, where (x, y) are the X-axis and Y-axis coordinates of the center point of the condenser ring after transformation. The Z-axis coordinate of the center point of the condenser ring can be obtained by summing the Z-axis coordinate of the optical center of the binocular camera and the depth, thus obtaining the actual position of the center point of the condenser ring.
[0068] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0069] The embodiment of the present application also provides a crimping device for a condenser pipe ring of an air conditioner. It should be noted that the crimping device for the condenser pipe ring of the air conditioner can be used to execute the crimping method for the condenser pipe ring of the air conditioner provided by the embodiment of the present application. The device is used to realize the above-mentioned embodiment and preferred embodiment, and the description is not repeated. As used below, the term "module" can be a combination of software and / or hardware that realizes a predetermined function. Although the device described in the following embodiment is preferably realized in software, the realization of hardware or a combination of software and hardware is also possible and conceived.
[0070] The crimping device for the condenser pipe ring of the air conditioner provided by the embodiment of the present application is introduced below.
[0071] Figure 4 is a structural block diagram of the crimping device for the condenser pipe ring of the air conditioner according to the embodiment of the present application. As shown in Figure 4 , the device comprises:
[0072] The acquisition unit 10 is configured to acquire a first image and a second image of the condenser pipe ring, wherein the first image and the second image are two images of the condenser pipe ring captured by a binocular camera.
[0073] The recognition unit 20 is configured to recognize a center point of the condenser pipe ring in the first image to obtain a center point position.
[0074] The calculation unit 30 is configured to calculate a depth corresponding to the center point position by using a binocular ranging algorithm according to the first image and the second image, wherein the depth corresponding to the center point position is a distance from the actual position of the center point position to the binocular camera.
[0075] The determination unit 40 is configured to determine an actual position of the center point of the condenser pipe ring according to the center point position and the depth corresponding to the center point position.
[0076] The control unit 50 is configured to control the end of the mechanical arm to move to the actual position for crimping.
[0077] In the crimping device for the condenser pipe ring of the air conditioner, the method can determine the depth corresponding to the center point of the condenser pipe ring in the image, i.e. the depth corresponding to the center point position, by comparing the first image and the second image of the binocular camera. The actual position of the center point of the condenser pipe ring in the three-dimensional space is obtained by transforming the position and the depth of the center point of the condenser pipe ring. The end of the mechanical arm is controlled to move to the actual position for crimping. Artificial crimping is not required, and the positioning accuracy is high, which leads to a high yield of crimping, thereby solving the problem of low yield of artificial crimping of the condenser pipe ring in the prior art.
[0078] In order to detect the coordinates of the center point of the condenser pipe ring, in an optional embodiment, the recognition unit comprises:
[0079] The first recognition module is used to recognize corner points in the first image above, and obtain four first corner points, which are the edge points of the contact position between the condenser ring and the condenser.
[0080] The first determining module is used to establish a planar coordinate system on the first image and determine the coordinates of the four first corner points in the planar coordinate system.
[0081] The first calculation module is used to calculate the average of the coordinates of the four first corner points to obtain the position of the center point, which is the coordinate of the center point of the condenser ring in the first image.
[0082] In the above embodiments, such as Figure 3 As shown in the figure, the location of the center point of the condenser ring cannot be clearly defined. By identifying the four corner points, four first corner points are obtained. The center of the rectangle formed by the four first corner points is the center point of the condenser ring. Therefore, in the planar coordinate system on the first image, the average value of the coordinates of the four first corner points is the coordinate of the center point of the condenser ring, i.e., the location of the center point.
[0083] To obtain accurate coordinates of the first corner point, in one optional implementation, the first identification module includes:
[0084] The first identification submodule is used to identify the condenser ring in the first image and obtain the ROI region, wherein the ROI region is the smallest region in the first image that contains the condenser ring.
[0085] The detection submodule is used to perform edge detection on the condenser ring and condenser in the ROI area to obtain multiple edge points.
[0086] The fitting submodule is used to perform line fitting on multiple of the above edge points using the least squares method to obtain two lines;
[0087] The first determining submodule is used to determine the edge points whose distances from both of the above-mentioned straight lines are greater than a predetermined distance as candidate corner points;
[0088] The second determining submodule is used to determine the four candidate corner points located on the condenser ring as the four first corner points.
[0089] In the above embodiment, the background of the first image is removed, and only the area containing the condenser ring is retained, such as... Figure 3 As shown, edge detection was performed on the aforementioned condenser ring and condenser in the ROI region, resulting in multiple edge points 01 with coordinates (x, y, y). i y i Substitute into d=min∑[y i-(ax i +b)] 2 The minimum distance d corresponds to a and b, which are the slope and intercept of the straight line, which are calculated by The distance from the edge point (x i , y i ) to the straight line is calculated, and the edge point whose distance to the two straight lines is greater than a predetermined distance is determined as a candidate corner point, that is, the edge point far away from the straight line is determined as a candidate corner point, and the four candidate corner points on the condenser ring are determined as the four corner points 02, that is, the four first corner points.
[0090] In order to calculate the depth corresponding to the center point, in an optional embodiment, the calculation unit comprises:
[0091] A second identification module is configured to identify the corner points in the second image to obtain four second corner points, wherein the corner points are the edge points of the contact positions between the condenser ring and the condenser.
[0092] A second determination module is configured to determine the coordinates of the four second corner points in the plane coordinate system.
[0093] A second calculation module is configured to calculate the parallax according to the coordinates of the four first corner points and the corresponding four second corner points.
[0094] A third calculation module is configured to calculate the depth corresponding to the center point position according to the parallax and the parameters of the binocular camera, wherein the parameters of the binocular camera include the focal length and the baseline distance, and the baseline distance is the distance between the two optical centers of the binocular camera.
[0095] In the above embodiment, the second image is calculated in the same way as the first image to obtain the coordinates of the center point of the condenser ring in the second image, that is, the second center point position, and the center point position and the second center point position are the coordinates of the same coordinate system. The distance between the four first corner points and the corresponding four second corner points is substituted into the parallax formula to calculate a plurality of parallaxes, and the average is taken to reduce the error. According to the geometric relationship of projection imaging, the depth corresponding to the center point position can be calculated according to the parallax and the parameters of the binocular camera.
[0096] In order to reduce the error, in an optional embodiment, the second identification module comprises:
[0097] A second identification sub-module is configured to identify the corner points in the second image to obtain four alternative corner points.
[0098] The third determining sub-module is configured to determine that the candidate corner point matches the first corner point when a correlation degree between a matching window of the candidate corner point and the corresponding first corner point is greater than or equal to a predetermined threshold, the matching window being a square window with a predetermined point as a center and containing a predetermined number of pixel points;
[0099] The fourth determining sub-module is configured to determine that the candidate corner point fails to match the first corner point when the correlation degree between the matching window of the candidate corner point and the corresponding first corner point is less than the predetermined threshold.
[0100] The fifth determining sub-module is configured to adjust the position of the candidate corner point until the four candidate corner points all successfully match the corresponding first corner points, and determine the four candidate corner points that successfully match the first corner points as the second corner points.
[0101] In the embodiment, the center point position and the second center point position are matched points in the two images, which ensures the accuracy of positioning. To ensure this, the first corner point and the second corner point are matched points, and the matching window method is used to determine whether the candidate corner point matches the first corner point. wherein, W p is a matching window, I is a pixel value of an original image, is a mean value of pixels in the original window, I i (px+d, y) is a pixel value of a corresponding point position of the original image on the target image after a shift of d in the direction. If NCC = -1, it indicates that the two matching windows are completely irrelevant. On the contrary, if NCC = 1, it indicates that the correlation degree of the two matching windows is very high. If the matching is unsuccessful, the adjustment is performed until the matching is successful, which ensures that the four first corner points and the four second corner points are successfully matched, and the positioning accuracy is ensured. However, if the adjustment is too large during the matching, the image needs to be re-shot and the positioning needs to be performed again.
[0102] To realize the coordinate conversion, in an optional embodiment, the determining unit comprises:
[0103] The establishing module is configured to establish an end-of-arm coordinate system of the robot arm, wherein a Z-axis of the end-of-arm coordinate system is parallel to the direction of the depth;
[0104] The calibrating module is configured to calibrate a plane coordinate system on the first image with an XOY plane of the end-of-arm coordinate system of the robot arm to obtain a rotation matrix and a translation vector;
[0105] The changing module is configured to perform coordinate transformation on the center point position according to the rotation matrix and the translation vector to obtain an X-axis coordinate and a Y-axis coordinate of the center point of the condenser tube ring in the end-of-arm coordinate system of the robot arm.
[0106] The third determining module is used to determine the Z-axis coordinate of the center point of the condenser ring in the coordinate system of the end of the robotic arm based on the depth corresponding to the center point position.
[0107] The fourth determining module is used to determine the X-axis coordinates, Y-axis coordinates, and Z-axis coordinates of the center point of the condenser ring in the coordinate system of the robotic arm end effector as the actual position of the center point of the condenser ring.
[0108] In the above embodiment, the coordinate transformation of the center point position is performed according to the rotation matrix and the translation vector to obtain the X-axis and Y-axis coordinates of the center point of the condenser ring in the coordinate system of the robotic arm end effector. Where θ is the rotation matrix, (v, w) is the position of the center point before the change, and t x , t y Let (x, y) be the translation vector, where (x, y) are the X-axis and Y-axis coordinates of the center point of the condenser ring after transformation. The Z-axis coordinate of the center point of the condenser ring can be obtained by summing the Z-axis coordinate of the optical center of the binocular camera and the depth, thus obtaining the actual position of the center point of the condenser ring.
[0109] The aforementioned air conditioner condenser ring crimping device includes a processor and a memory. The acquisition unit, identification unit, calculation unit, determination unit, and control unit are all stored as program units in the memory. The processor executes these program units stored in the memory to achieve the corresponding functions. All of the above modules are located in the same processor; alternatively, the modules may be located in different processors in any combination.
[0110] The processor contains a kernel, which retrieves the corresponding program unit from memory. One or more kernels can be configured, and adjusting kernel parameters can address the low yield rate of manual crimping of condenser rings in existing technologies.
[0111] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0112] This invention provides a computer-readable storage medium including a stored program, wherein, when the program is executed, it controls the device containing the computer-readable storage medium to perform the air conditioner condenser ring crimping method.
[0113] Specifically, the crimping methods for air conditioner condenser rings include:
[0114] Step S201, acquiring a first image and a second image of the condenser pipe ring, the first image and the second image being two images of the condenser pipe ring captured by the binocular camera respectively;
[0115] Step S202, identifying a center point of the condenser pipe ring in the first image to obtain a center point position;
[0116] Step S203, calculating a depth corresponding to the center point position by using a binocular distance measurement algorithm according to the first image and the second image, the depth corresponding to the center point position being a distance from an actual position of the center point position to the binocular camera;
[0117] Step S204, determining the actual position of the center point of the condenser pipe ring according to the center point position and the depth corresponding to the center point position;
[0118] Step S205, controlling a terminal of the mechanical arm to move to the actual position to perform crimping.
[0119] An embodiment of the present application provides a processor, which is used for running a program, wherein the processor executes the crimping method of the condenser pipe ring of the air conditioner when the program is running.
[0120] Specifically, the crimping method of the condenser pipe ring of the air conditioner comprises the following steps.
[0121] Step S201, acquiring a first image and a second image of the condenser pipe ring, the first image and the second image being two images of the condenser pipe ring captured by the binocular camera respectively;
[0122] Step S202, identifying a center point of the condenser pipe ring in the first image to obtain a center point position;
[0123] Step S203, calculating a depth corresponding to the center point position by using a binocular distance measurement algorithm according to the first image and the second image, the depth corresponding to the center point position being a distance from an actual position of the center point position to the binocular camera;
[0124] Step S204, determining the actual position of the center point of the condenser pipe ring according to the center point position and the depth corresponding to the center point position;
[0125] Step S205, controlling a terminal of the mechanical arm to move to the actual position to perform crimping.
[0126] An embodiment of the present application provides a crimping system, which comprises a mechanical arm, a binocular camera, a processor, a memory, and a program stored in the memory and capable of running on the processor, and the processor executes the program to implement at least the following steps:
[0127] Step S201, acquiring a first image and a second image of the condenser pipe ring, the first image and the second image being two images of the condenser pipe ring captured by the binocular camera respectively;
[0128] Step S202, identifying a center point of the condenser pipe ring in the first image to obtain a center point position;
[0129] Step S203, calculating a depth corresponding to the center point position according to the first image and the second image by using a binocular distance measurement algorithm, the depth corresponding to the center point position being a distance from an actual position of the center point position to the binocular camera;
[0130] Step S204, determining the actual position of the center point of the condenser pipe ring according to the center point position and the depth corresponding to the center point position;
[0131] Step S205, controlling a terminal of a mechanical arm to move to the actual position for crimping.
[0132] The application also provides a computer program product adapted to execute a program of at least the following method steps when executed on a data processing device:
[0133] Step S201, acquiring a first image and a second image of the condenser pipe ring, the first image and the second image being two images of the condenser pipe ring captured by the binocular camera respectively;
[0134] Step S202, identifying a center point of the condenser pipe ring in the first image to obtain a center point position;
[0135] Step S203, calculating a depth corresponding to the center point position according to the first image and the second image by using a binocular distance measurement algorithm, the depth corresponding to the center point position being a distance from an actual position of the center point position to the binocular camera;
[0136] Step S204, determining the actual position of the center point of the condenser pipe ring according to the center point position and the depth corresponding to the center point position;
[0137] Step S205, controlling a terminal of a mechanical arm to move to the actual position for crimping.
[0138] It should be apparent to those skilled in the art that the modules or steps of the application described above can be implemented with a general purpose computer, and can be centralized in a single computer or distributed among a network of computers, and can be implemented with program code executable by a computer, and thus can be stored in a storage device and executed by a computer, and in some cases, the steps shown or described can be executed in a different order than shown or described, or can be implemented as separate integrated circuit modules or as a single integrated circuit module, and thus the application is not limited to any particular combination of hardware and software.
[0139] Those skilled in the art will appreciate that embodiments of the application can be devised for a method, a system, or a computer program product. Accordingly, the application can be embodied in the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the application can be in the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk memory, CD-ROMs, optical storage media, etc.) embodying computer readable program code.
[0140] The present application is described in reference to the flowchart illustrations and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.
[0141] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.
[0142] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart illustrations and / or block diagrams.Figure 1 one or more processes and / or functions specified in one or more blocks Figure 1 one or more processes and / or functions specified in one or more blocks
[0143] In one typical arrangement, the computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0144] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) and / or cache memory, non-volatile memory, such as read-only memory (ROM), EPROM, and / or flash memory, etc. The memory is an example of computer readable media.
[0145] Computer readable media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for storage of information such as 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 technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD), or other optical storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer readable media does not include transitory media, such as modulated data signals and carrier waves.
[0146] It should also be noted that the terms "comprising", "containing", or any other variant thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article or apparatus that comprises a list of elements does not only include those elements, but can also include other elements not expressly listed or inherent to such process, method, article or apparatus. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.
[0147] From the above description, it can be seen that the above-mentioned embodiments of the present application achieve the following technical effects:
[0148] 1) In the crimping method of the air conditioner condenser pipe ring of the present application, the method can determine the depth corresponding to the center point of the condenser pipe ring in the image by comparing the first image and the second image of the binocular camera, that is, the depth corresponding to the center point position, and the actual position of the center point of the condenser pipe ring in the three-dimensional space is obtained by transforming the position and depth of the center point of the condenser pipe ring, that is, the end of the mechanical arm can be controlled to move to the actual position for crimping, without manual crimping, and the positioning accuracy is high, resulting in a high yield of crimping, solving the problem of low yield of manual crimping of the condenser pipe ring in the prior art.
[0149] 2) In the crimping device of the air conditioner condenser pipe ring of the present application, the method can determine the depth corresponding to the center point of the condenser pipe ring in the image by comparing the first image and the second image of the binocular camera, that is, the depth corresponding to the center point position, and the actual position of the center point of the condenser pipe ring in the three-dimensional space is obtained by transforming the position and depth of the center point of the condenser pipe ring, that is, the end of the mechanical arm can be controlled to move to the actual position for crimping, without manual crimping, and the positioning accuracy is high, resulting in a high yield of crimping, solving the problem of low yield of manual crimping of the condenser pipe ring in the prior art.
[0150] The above is only the preferred embodiment of the present application and is not used to limit the present application. For those skilled in the art, the present application can have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A crimping method of an air conditioner condenser pipe ring, characterized by, The method comprises the following steps: acquiring a first image and a second image of a condenser ring, the first image and the second image being two images of the condenser ring captured by a binocular camera respectively; identifying a center point of the condenser ring in the first image to obtain a center point position; calculating a depth corresponding to the center point position by using a binocular ranging algorithm based on the first image and the second image, the depth corresponding to the center point position being a distance from an actual position of the center point position to the binocular camera; determining the actual position of the center point of the condenser ring based on the center point position and the depth corresponding to the center point position; controlling a robot arm to move to the actual position for crimping.
2. The method of claim 1, wherein, The method for identifying a center point of the condenser ring in the first image to obtain a center point position comprises the following steps: identifying corner points in the first image to obtain four first corner points, the corner points being edge points of contact positions between the condenser ring and a condenser tube; establishing a plane coordinate system on the first image and determining coordinates of the four first corner points in the plane coordinate system; calculating an average value of the coordinates of the four first corner points to obtain the center point position, the center point position being coordinates of the center point of the condenser ring in the first image.
3. The method of claim 2, wherein, The method for identifying corner points in the first image to obtain four first corner points comprises the following steps: identifying the condenser ring in the first image to obtain an ROI region, the ROI region being a minimum region containing the condenser ring in the first image; performing edge detection on the condenser ring and the condenser tube in the ROI region to obtain a plurality of edge points; performing linear fitting on the plurality of edge points by using a least square method to obtain two straight lines; determining the edge points having a distance greater than a predetermined distance from the two straight lines as candidate corner points; determining four candidate corner points located on the condenser ring as the four first corner points.
4. The method of claim 2, wherein, The method for calculating a depth corresponding to the center point position by using a binocular ranging algorithm based on the first image and the second image comprises the following steps: identifying corner points in the second image to obtain four second corner points, the corner points being edge points of contact positions between the condenser ring and a condenser tube; determining coordinates of the four second corner points in the plane coordinate system; calculating a parallax based on the coordinates of the four first corner points and the coordinates of the corresponding four second corner points; calculating the depth corresponding to the center point position based on the parallax and parameters of the binocular camera, the parameters of the binocular camera including a focal length and a baseline distance, the baseline distance being a distance between two optical centers of the binocular camera.
5. The method of claim 4, wherein, The method for identifying corner points in the second image to obtain four second corner points comprises the following steps: identifying corner points in the second image to obtain four candidate corner points; in a case where a correlation degree between a matching window of the candidate corner point and a matching window of the corresponding first corner point is greater than or equal to a predetermined threshold, determining that the candidate corner point and the first corner point are matched, the matching window being a square window with a predetermined point as a center and containing a predetermined number of pixel points; determining that the alternative corner point fails to match with the first corner point in a case where a correlation degree of a matching window of the alternative corner point and a matching window of the corresponding first corner point is less than the predetermined threshold value; adjusting a position of the alternative corner point until four of the alternative corner points all successfully match with the corresponding first corner points, and determining the four alternative corner points that successfully match as the second corner points.
6. The method of claim 1, wherein, determining the actual position of the center point of the condenser pipe ring according to the center point position and the depth corresponding to the center point position, comprising: establishing an end coordinate system of a mechanical arm, a Z axis of the end coordinate system of the mechanical arm being parallel to a direction of the depth; calibrating a plane coordinate system on the first image with an XOY plane of the end coordinate system of the mechanical arm to obtain a rotation matrix and a translation vector; performing coordinate transformation on the center point position according to the rotation matrix and the translation vector to obtain X axis coordinates and Y axis coordinates of the center point of the condenser pipe ring in the end coordinate system of the mechanical arm; determining a Z axis coordinate of the center point of the condenser pipe ring in the end coordinate system of the mechanical arm according to the depth corresponding to the center point position; determining the X axis coordinates, the Y axis coordinates and the Z axis coordinates of the center point of the condenser pipe ring in the end coordinate system of the mechanical arm as the actual position of the center point of the condenser pipe ring.
7. A crimping device for an air conditioner condenser tube ring, characterized by, comprising: an acquisition unit configured to acquire a first image and a second image of a condenser pipe ring, the first image and the second image being two images of the condenser pipe ring captured by a binocular camera; an identification unit configured to identify a center point of the condenser pipe ring in the first image to obtain a center point position; a calculation unit configured to calculate a depth corresponding to the center point position by using a binocular distance measurement algorithm according to the first image and the second image, the depth corresponding to the center point position being a distance from the actual position of the center point position to the binocular camera; a determination unit configured to determine an actual position of the center point of the condenser pipe ring according to the center point position and the depth corresponding to the center point position; a control unit configured to control an end of a mechanical arm to move to the actual position for crimping.
8. A computer-readable storage medium, characterized in that, The computer readable storage medium comprises a stored program, wherein the program controls the device where the computer readable storage medium is located to execute the method of any one of claims 1 to 6 when the program is running.
9. A computer program product comprising a computer program, characterized in that, The computer program is executed by a processor to implement the method of any one of claims 1 to 6.
10. A crimping system characterized by, comprising: a mechanical arm, a binocular camera, one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs comprise instructions for executing the method of any one of claims 1 to 6.
Citation Information
Patent Citations
Grabbing positioning method of robot
CN111645074A
Vehicle-mounted intelligent inspection method and system fused with target recognition
CN113963254A