A dual camera positioning method
By using a dual-camera positioning method, the camera position is automatically calibrated using a mobile servo mechanism and a CCD camera, which solves the problem of welding machine misalignment and enables rapid model changeover and automatic monitoring of camera position.
Patent Information
- Application Number
- CN202211603924.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-13
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2042-12-13
AI Technical Summary
In the welding process in the new energy field, the change of camera position causes the welding machine to deviate. Existing technology requires manual repositioning of the camera center, resulting in long changeover time and the inability to automatically monitor changes in camera position.
A dual-camera positioning method is adopted, which uses a mobile servo mechanism and a CCD camera together. By identifying the coordinate values and scale relationships of reference points, the camera position is automatically calibrated, and a new calibration position is calculated to adapt to changes in the position of the servo mechanism.
This solved the welding misalignment problem caused by camera position changes, reduced changeover time, and enabled automatic calibration of the camera and servo in linkage, thus avoiding welding deviations.
Smart Images

Figure CN115965694B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of mechanical manufacturing technology, and in particular to a positioning method using dual cameras. Background Technology
[0002] In security systems, images are currently primarily generated by CCD cameras. CCD stands for charge-coupled device, which can convert light into electrical charges and store and transfer those charges. It can also retrieve the stored charges to change the voltage, making it an ideal component for CCD cameras.
[0003] Currently, in the welding field of the new energy sector, cameras are used for positioning welding, with the camera and galvanometer in fixed positions. If the product type does not match the camera's field of view, the camera's position needs to be changed. This requires recalibrating the camera center and galvanometer center. Besides slowing down product changeover times, the lack of automatic camera position monitoring means that if the camera's center position is not updated promptly after a change, it can cause weld misalignment, leading to product scrap. Summary of the Invention
[0004] To overcome the above problems, the purpose of this invention is to provide a dual-camera positioning method that solves the problem of welding machine misalignment caused by changes in camera position.
[0005] This invention employs the following scheme: a dual-camera positioning method applied to a welding machine equipped with a dual-camera motion servo mechanism. The dual cameras include a CCD1 camera and a CCD2 camera. Utilizing the straight-line movement characteristic of the motion servo mechanism, the extreme positions at both ends of the motion servo mechanism are selected as the starting and ending points. A fixed identification object on the welding table of the welding machine is selected as a reference point, and the coordinate values of the reference object at the starting and ending points are identified using the CCD1 and CCD2 cameras in conjunction with the motion servo mechanism. The starting and ending coordinate values of the reference object are correlated with the starting and coordinate values of the motion servo mechanism to form a proportional relationship. When the position of the motion servo mechanism changes, a new calibration position is calculated based on the change, thereby achieving automatic calibration of the dual-camera position.
[0006] Furthermore, a fixed identification object is selected on the welding table of the selected welding machine as a reference point, and the coordinate values of the reference object at the start and end points are identified using CCD1 and CCD2 cameras in conjunction with a motion servo mechanism. Specifically, the CCD1 and CCD2 cameras are calibrated, that is, the pixel coordinates of the CCD1 and CCD2 cameras are converted into coordinates of the welding table xy coordinate system; the reference point is identified using the camera so that the offset position of the reference point from the camera can be identified when the reference point is located in different fields of view of the camera.
[0007] Furthermore, the starting and ending coordinates of the reference object are correlated with the starting and coordinates of the moving servo mechanism to form a proportional relationship. When the position of the moving servo mechanism changes, a new calibration position is calculated based on the change, thereby achieving automatic calibration of the dual-camera position. Specifically: S1: The moving servo mechanism controls the camera to move to its maximum negative stroke, denoted as L_AXIS; the moving servo mechanism moves the CCD1 camera until the reference point appears within the field of view, triggering the CCD1 camera's image capture function. The coordinates of the reference point are denoted as (CCD1_S_X, CCD1_S_Y). At this time, the coordinate range of the moving servo mechanism is (ROBOT1_S_X, ROBOT1_S_Y).
[0008] Initial CCD1_X coordinate = CCD1_S_X + ROBOT1_S_X;
[0009] Initial CCD1_Y coordinate = CCD1_S_Y + ROBOT1_S_Y;
[0010] S2: The mobile servo mechanism moves the CCD2 camera within the field of view of the reference point, triggering the CCD2 camera's image capture function. The coordinates of the reference point are denoted as (CCD2_S_X, CCD2_S_Y). At this time, the coordinate range of the mechanism is (ROBOT2_S_X, ROBOT2_S_Y).
[0011] Initial CCD2_X coordinates = CCD2_S_X + ROBOT2_S_X;
[0012] Initial CCD2_Y coordinates = CCD2_S_Y + ROBOT2_S_Y;
[0013] S3: Control the camera to move to its maximum positive stroke via the motion servo mechanism, denoted as P_AXIS; move the CCD1 camera to the reference point within the field of view via the motion servo mechanism; trigger the CCD1 camera's image capture function, denoted as (CCD1_E_X, CCD1_E_Y), and the coordinate range of the mechanism at this time is (ROBOT1_E_X, ROBOT1_E_Y); (Note:)
[0014] Ending CCD1_X coordinate = CCD1_E_X + ROBOT1_E_X;
[0015] Ending CCD1_Y coordinate = CCD1_E_Y + ROBOT1_E_Y;
[0016] S4: The mobile servo mechanism moves the CCD2 camera within the field of view of the reference point, triggering the CCD2 camera's image capture function. The coordinates of the reference point are recorded as (CCD2_E_X, CCD2_E_Y). At this time, the coordinate range of the mechanism is (ROBOT2_E_X, ROBOT2_E_Y).
[0017] Ending CCD2_X coordinate = CCD2_E_X + ROBOT2_E_X;
[0018] Ending CCD2_Y coordinate = CCD2_E_Y + ROBOT2_E_Y;
[0019] S5: When the moving servo mechanism moves, the real-time position of the servo is denoted as C_AXIS; the offsets between CCD1 and CCD2 cameras are respectively: CCD1_starting point offset_X, CCD1_starting point offset_Y, CCD2_starting point offset_X, and CCD2_starting point offset_Y, with the following calculation formulas:
[0020] K:=(C_AXIS-L_AXIS) / (P_AXIS-L_AXIS);
[0021] CCD1_starting point offset_X:=(ending CCD1_X coordinate - starting CCD1_X coordinate)*K;
[0022] CCD1_starting point offset_Y:=(ending CCD1_Y coordinate - starting CCD1_Y coordinate)*K;
[0023] CCD2_starting point offset_X:=(ending CCD2_X coordinate - starting CCD2_X coordinate)*K;
[0024] CCD2_starting point offset_Y:=(ending CCD2_Y coordinate - starting CCD2_Y coordinate)*K;
[0025] S6: Let the center coordinates of CCD1 and CCD2 after the movement be: CCD1_center position_X, CCD1_center position_Y, CCD2_center position_X, CCD2_center position_Y; the calculation formula is:
[0026] CCD1_center_position_X:=CCD1_starting_point_offset_X+starting_CCD1_X coordinate;
[0027] CCD1_center position_Y:=CCD1_starting point offset_Y+starting CCD1_Y coordinate;
[0028] CCD2_center_position_X:=CCD2_starting_point_offset_X+starting_CCD2_X coordinate;
[0029] CCD2_center_position_Y:=CCD2_starting_point_offset_Y+starting_CCD2_Y coordinate;
[0030] S7: Since there are two camera center values and a galvanometer center, we take CCD1 camera as the only center value. Then, the center of CCD2 camera and the galvanometer center are both offset values of CCD1 camera. The offset values of the CCDs are denoted as CD1_CCD2_X and CCD1_CCD2_Y, and their calculation formula is:
[0031] CCD1_CCD2_X:=CCD1_center_position_X–CCD2_center_position_X;
[0032] CCD1_CCD2_Y:=CCD1_center_position_Y–CCD2_center_position_Y;
[0033] S8: The offset value of the galvanometer center is denoted as: CCD1-galvanometer center distance_X, CCD1-galvanometer center distance_Y, and its calculation formula is:
[0034] CCD1-Galvanometer center distance_X:=CCD1_center position_X-Galvanometer center_X coordinate;
[0035] CCD1 - Distance between galvanometer centers_Y:=CCD1_Center position_Y-Galvanometer center_Y coordinate;
[0036] The entire moving mechanism of the welding machine can be regarded as a structure centered on the CCD1 camera. When the position of the moving servo mechanism changes, the calibration position of the camera center also changes, thus achieving the purpose of automatic calibration.
[0037] The beneficial effects of this invention are as follows: This invention mainly addresses the problems of long changeover time and lack of linkage between the camera and servo during dual-camera product model changes. By identifying changes in the servo position, the change in the camera center is calculated. This solves the problem of recalibration required during product model changes. Furthermore, because the servo and camera positions are linked, this method can calculate a new calibration position after the servo position changes, thus solving the problem of soldering misalignment caused by changes in camera position. Attached Figure Description
[0038] Figure 1 This is a schematic diagram of the overall structure of the welding machine of the present invention.
[0039] Figure 2 This is a schematic diagram of the starting point of CCD1 when the moving servo mechanism of the present invention controls the camera to move to the maximum negative stroke.
[0040] Figure 3This is a schematic diagram of the starting point of CCD2 when the camera is moved to its maximum negative stroke by the mobile servo mechanism of the present invention.
[0041] Figure 4 This is a schematic diagram of the end point of CCD1 when the camera is moved to its maximum positive stroke by the mobile servo mechanism of the present invention.
[0042] Figure 5 This is a schematic diagram of the end point of CCD2 when the camera is moved to its maximum positive stroke by the mobile servo mechanism of the present invention.
[0043] Figure 6 This is a schematic diagram of the centers of the two cameras and the center of the galvanometer in this invention. Detailed Implementation
[0044] The invention will now be further described with reference to the accompanying drawings.
[0045] Please see Figure 1 As shown, this invention discloses a dual-camera positioning method applied to a welding machine 1. The welding machine 1 is equipped with a dual-camera motion servo mechanism 2. The dual cameras include a CCD1 camera 3 and a CCD2 camera 4. Utilizing the straight-line movement characteristic of the motion servo mechanism 2, the extreme positions at both ends of the motion servo mechanism 2 are selected as the starting and ending points. A fixed identification object on the welding table 11 of the welding machine 1 is selected as a reference point 5, and the coordinate values of the reference object at the starting and ending points are identified using the CCD1 and CCD2 cameras in conjunction with the motion servo mechanism. The starting and ending coordinate values of the reference object are correlated with the starting and coordinate values of the motion servo mechanism to form a proportional relationship. When the position of the motion servo mechanism changes, a new calibration position is calculated based on the change, thereby achieving automatic calibration of the dual-camera position.
[0046] The present invention will be further described below with reference to a specific embodiment.
[0047] like Figure 1 As shown, the present invention discloses a dual-camera positioning method, which is applied to a welding machine 1. The welding machine 1 is equipped with a dual-camera motion servo mechanism 2. The dual cameras include a CCD1 camera 3 and a CCD2 camera 4. Utilizing the straight-line movement characteristic of the motion servo mechanism 2, the extreme positions at both ends of the position of the motion servo mechanism 2 are selected as the starting point and the ending point. The present invention comprises: a welding machine 1 with a dual-camera motion servo mechanism, a galvanometer 6 mounted on the welding machine, a CCD1 camera, a CCD2 camera, and a reference position point.
[0048] Location method:
[0049] S1: Perform calibration of CCD1 and CCD2 cameras, that is, convert the pixel coordinates of CCD1 and CCD2 cameras into coordinates of the welding table xy coordinate system;
[0050] S2: Use the camera to identify reference points so that the offset position of the reference point relative to the camera can be identified when the reference point is located in different fields of view of the camera.
[0051] S3: Control the camera to move to its maximum negative travel using the motion servo mechanism, denoted as L_AXIS; Move the CCD1 camera to the reference point within the field of view using the motion servo mechanism (e.g., ...). Figure 2 As shown), the CCD1 camera's image capture function is triggered. The coordinates of the identification reference point are denoted as (CCD1_S_X, CCD1_S_Y). The coordinate range of the moving servo mechanism at this time is (ROBOT1_S_X, ROBOT1_S_Y). Then:
[0052] Initial CCD1_X coordinate = CCD1_S_X + ROBOT1_S_X;
[0053] Initial CCD1_Y coordinate = CCD1_S_Y + ROBOT1_S_Y;
[0054] S4: The moving servo mechanism moves the CCD2 camera within the field of view of the reference point (e.g., ...). Figure 3 As shown), the CCD2 camera's image capture function is triggered. The coordinates of the identification reference point are recorded as (CCD2_S_X, CCD2_S_Y). At this time, the coordinate range of the moving servo mechanism is (ROBOT2_S_X, ROBOT2_S_Y). Let:
[0055] Initial CCD2_X coordinates = CCD2_S_X + ROBOT2_S_X;
[0056] Initial CCD2_Y coordinates = CCD2_S_Y + ROBOT2_S_Y;
[0057] S5: Control the camera to move to its maximum positive travel using the motion servo mechanism, denoted as P_AXIS; Move the CCD1 camera to the reference point within the field of view using the motion servo mechanism (e.g., ...). Figure 4 (As shown); trigger the CCD1 camera's image capture function, and record the coordinates of the identification reference point as: (CCD1_E_X, CCD1_E_Y). At this time, the coordinate range of the moving servo mechanism is (ROBOT1_E_X, ROBOT1_E_Y); record:
[0058] Ending CCD1_X coordinate = CCD1_E_X + ROBOT1_E_X;
[0059] Ending CCD1_Y coordinate = CCD1_E_Y + ROBOT1_E_Y;
[0060] S6: The moving servo mechanism moves the CCD2 camera to within the field of view of the reference point (e.g., ...). Figure 5 As shown), the CCD2 camera's image capture function is triggered, and the coordinates of the identification reference point are recorded as (CCD2_E_X, CCD2_E_Y). At this time, the coordinate range of the moving servo mechanism is (ROBOT2_E_X, ROBOT2_E_Y). Note:
[0061] Ending CCD2_X coordinate = CCD2_E_X + ROBOT2_E_X;
[0062] Ending CCD2_Y coordinate = CCD2_E_Y + ROBOT2_E_Y;
[0063] S7: When the moving servo mechanism moves, the real-time position of the servo is denoted as C_AXIS; the offsets between CCD1 and CCD2 cameras are respectively: CCD1_starting point offset_X, CCD1_starting point offset_Y, CCD2_starting point offset_X, and CCD2_starting point offset_Y, with the following calculation formulas:
[0064] K:=(C_AXIS-L_AXIS) / (P_AXIS-L_AXIS);
[0065] CCD1_starting point offset_X:=(ending CCD1_X coordinate - starting CCD1_X coordinate)*K;
[0066] CCD1_starting point offset_Y:=(ending CCD1_Y coordinate - starting CCD1_Y coordinate)*K;
[0067] CCD2_starting point offset_X:=(ending CCD2_X coordinate - starting CCD2_X coordinate)*K;
[0068] CCD2_starting point offset_Y:=(ending CCD2_Y coordinate - starting CCD2_Y coordinate)*K;
[0069] S8: Let the center coordinates of CCD1 and CCD2 after the movement be: CCD1_center position_X, CCD1_center position_Y, CCD2_center position_X, CCD2_center position_Y; the calculation formula is:
[0070] CCD1_center_position_X:=CCD1_starting_point_offset_X+starting_CCD1_X coordinate;
[0071] CCD1_center position_Y:=CCD1_starting point offset_Y+starting CCD1_Y coordinate;
[0072] CCD2_center_position_X:=CCD2_starting_point_offset_X+starting_CCD2_X coordinate;
[0073] CCD2_center_position_Y:=CCD2_starting_point_offset_Y+starting_CCD2_Y coordinate;
[0074] S9: Due to the existence of two camera center values and the center of galvanometer 6 (see...) Figure 6 As shown), if CCD1 is taken as the unique center value, then the centers of CCD2 and the galvanometer are both offset values of CCD1. The offset values of the CCDs are denoted as CD1_CCD2_X and CCD1_CCD2_Y, and their calculation formulas are as follows:
[0075] CCD1_CCD2_X:=CCD1_center_position_X–CCD2_center_position_X;
[0076] CCD1_CCD2_Y:=CCD1_center_position_Y–CCD2_center_position_Y;
[0077] S10: The offset value of the galvanometer center is denoted as: CCD1-galvanometer center distance_X, CCD1-galvanometer center distance_Y, and its calculation formula is:
[0078] CCD1-Galvanometer center distance_X:=CCD1_center position_X-Galvanometer center_X coordinate;
[0079] CCD1 - Distance between galvanometer centers_Y:=CCD1_Center position_Y-Galvanometer center_Y coordinate;
[0080] The entire moving mechanism of the welding machine can be regarded as a structure centered on the CCD1 camera. When the position of the moving servo mechanism changes, the calibration position of the camera center also changes, thus achieving the purpose of automatic calibration.
[0081] In summary, this invention primarily addresses the issues of long changeover times and lack of linkage between the camera and servo during dual-camera product redesigns. By identifying changes in the servo's position, it calculates changes in the camera's center. This solves the problem of needing to recalibrate during product redesigns. Furthermore, because the servo and camera positions are linked, this method can calculate a new calibration position after the servo position changes, thus resolving the issue of solder misalignment caused by changes in camera position.
[0082] The above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made within the scope of the claims of the present invention should be included in the scope of the present invention.
Claims
1. A dual-camera positioning method, characterized in that: The method is applied to a welding machine equipped with a dual-camera motion servo mechanism. The dual cameras include a CCD1 camera and a CCD2 camera. Utilizing the straight-line movement of the motion servo mechanism, the extreme positions at both ends of the mechanism are selected as the starting and ending points. A fixed reference point is selected on the welding table surface as the reference point, and the CCD1 and CCD2 cameras, in conjunction with the motion servo mechanism, identify the coordinate values of the reference point at the starting and ending points. The starting and ending coordinate values of the reference point are then correlated with the starting and ending coordinate values of the motion servo mechanism to establish a proportional relationship. When the position of the motion servo mechanism changes, a new calibration position is calculated based on the change, thereby achieving automatic calibration of the dual-camera position. The method further involves correlating the starting and ending coordinate values of the reference point with the coordinate values of the motion servo mechanism. The coordinate values correspond to the initial values and coordinate values of the moving servo mechanism to form a proportional relationship. When the position of the moving servo mechanism changes, the new calibration position is calculated by the change, thereby realizing automatic calibration of the dual camera position. Specifically: S1: The moving servo mechanism controls the camera to move to the maximum negative stroke, denoted as L_AXIS; The moving servo mechanism moves the CCD1 camera to the point where the reference point appears in the field of view, triggering the CCD1 camera's shooting function. The coordinates of the reference point are denoted as (CCD1_S_X, CCD1_S_Y). At this time, the coordinate range position of the moving servo mechanism is (ROBOT1_S_X, ROBOT1_S_Y). Then: the initial CCD1_X coordinate = CCD1_S_X + ROBOT1_S_X. Initial CCD1_Y coordinate = CCD1_S_Y + ROBOT1_S_Y; S2: The mobile servo mechanism moves the CCD2 camera within the field of view of the reference point, triggering the CCD2 camera's image capture function. The coordinates of the reference point are denoted as (CCD2_S_X, CCD2_S_Y). At this time, the coordinate range of the mechanism is (ROBOT2_S_X, ROBOT2_S_Y). Initial CCD2_X coordinates = CCD2_S_X + ROBOT2_S_X; Initial CCD2_Y coordinates = CCD2_S_Y + ROBOT2_S_Y; S3: Control the camera to move to its maximum positive stroke via the motion servo mechanism, denoted as P_AXIS; move the CCD1 camera to the reference point within the field of view via the motion servo mechanism; trigger the CCD1 camera's image capture function, denoted as (CCD1_E_X, CCD1_E_Y), and the coordinate range of the mechanism at this time is (ROBOT1_E_X, ROBOT1_E_Y); (Note:) Ending CCD1_X coordinate = CCD1_E_X + ROBOT1_E_X; Ending CCD1_Y coordinate = CCD1_E_Y + ROBOT1_E_Y; S4: The mobile servo mechanism moves the CCD2 camera within the field of view of the reference point, triggering the CCD2 camera's image capture function. The coordinates of the reference point are recorded as (CCD2_E_X, CCD2_E_Y). At this time, the coordinate range of the mechanism is (ROBOT2_E_X, ROBOT2_E_Y). Ending CCD2_X coordinate = CCD2_E_X + ROBOT2_E_X; Ending CCD2_Y coordinate = CCD2_E_Y + ROBOT2_E_Y; S5: When the moving servo mechanism moves, the real-time position of the servo is denoted as C_AXIS; the offsets between CCD1 and CCD2 cameras are respectively: CCD1_starting point offset_X, CCD1_starting point offset_Y, CCD2_starting point offset_X, and CCD2_starting point offset_Y, with the following calculation formulas: K:=(C_AXIS-L_AXIS) / (P_AXIS-L_AXIS); CCD1_starting point offset_X:=(ending CCD1_X coordinate - starting CCD1_X coordinate)*K; CCD1_starting point offset_Y:=(ending CCD1_Y coordinate - starting CCD1_Y coordinate)*K; CCD2_starting point offset_X:=(ending CCD2_X coordinate - starting CCD2_X coordinate)*K; CCD2_starting point offset_Y:=(ending CCD2_Y coordinate - starting CCD2_Y coordinate)*K; S6: Let the center coordinates of CCD1 and CCD2 after the movement be: CCD1_center position_X, CCD1_center position_Y, CCD2_center position_X, CCD2_center position_Y; the calculation formula is: CCD1_center_position_X:=CCD1_starting_point_offset_X+starting_CCD1_X coordinate; CCD1_center position_Y:=CCD1_starting point offset_Y+starting CCD1_Y coordinate; CCD2_center_position_X:=CCD2_starting_point_offset_X+starting_CCD2_X coordinate; CCD2_center_position_Y:=CCD2_starting_point_offset_Y+starting_CCD2_Y coordinate; S7: Since there are two camera center values and a galvanometer center, we take CCD1 camera as the only center value. Then, the center of CCD2 camera and the galvanometer center are both offset values of CCD1 camera. The offset values of the CCDs are denoted as CD1_CCD2_X and CCD1_CCD2_Y, and their calculation formula is: CCD1_CCD2_X:=CCD1_center_position_X–CCD2_center_position_X; CCD1_CCD2_Y:=CCD1_center_position_Y–CCD2_center_position_Y; S8: The offset value of the galvanometer center is denoted as: CCD1-galvanometer center distance_X, CCD1-galvanometer center distance_Y, and its calculation formula is: CCD1-Galvanometer center distance_X:=CCD1_center position_X-Galvanometer center_X coordinate; CCD1 - Distance between galvanometer centers_Y:=CCD1_Center position_Y-Galvanometer center_Y coordinate; The entire moving mechanism of the welding machine can be regarded as a structure centered on the CCD1 camera. When the position of the moving servo mechanism changes, the calibration position of the camera center also changes, thus achieving the purpose of automatic calibration.
2. The dual-camera positioning method according to claim 1, characterized in that: The selected welding machine uses a fixed reference point on its welding table. CCD1 and CCD2 cameras, along with a motion servo mechanism, are used to identify the coordinates of the reference point at the start and end points. Specifically, CCD1 and CCD2 cameras are calibrated by converting their pixel coordinates into xy coordinates of the welding table. The cameras are used to identify the reference point so that the offset position of the reference point relative to the camera can be identified even when the reference point is located in different fields of view.
Citation Information
Patent Citations
Double-camera positioning welding method and device
CN115272485A