Code spraying method and device for pipe joint

By using cameras and computer analysis to determine the feature points of pipe joints, high-speed and precise positioning and coding of irregular pipe joints were achieved, solving the coding problem of irregular pipe joints in the existing technology, reducing production changeover costs and improving coding efficiency.

CN121973554APending Publication Date: 2026-05-05浙江中财管道科技股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
浙江中财管道科技股份有限公司
Filing Date
2025-12-23
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Existing technologies cannot efficiently and cost-effectively perform precise positioning and marking on non-standard pipe fittings, especially for non-standard products such as Y-type tees, arc tees, and reducing tees, which cannot be marked using mainstream conveying methods, and the marking positions are limited.

Method used

The system uses a camera to identify the feature points of the pipe connector, uses computer analysis to determine the location of the anti-counterfeiting code, and uses a laser marking device to perform high-speed and precise positioning and marking on the conveyor belt. It adapts to different models and specifications of pipe connectors through feature point recognition and dynamic positioning technology.

Benefits of technology

It achieves high-speed and precise positioning and coding of irregular pipe fittings, reduces the switching cost of multi-product production, eliminates the need to change positioning tooling, and improves the accuracy and efficiency of coding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121973554A_ABST
    Figure CN121973554A_ABST
Patent Text Reader

Abstract

The invention discloses a pipe joint code spraying method and equipment, and the method comprises the steps: placing a pipe joint on a conveying belt of the pipe joint code spraying equipment, photographing the pipe joint below through a camera, obtaining a standard pipe fitting picture, analyzing the standard pipe fitting picture through a computer, confirming a standard pipe fitting model and an anti-counterfeiting code position, and outputting the anti-counterfeiting code position. Enabling a nozzle of the laser code spraying device to reach an initial position, enabling a camera to shoot pipe joints one by one to obtain a picture of a to-be-sprayed pipe fitting, analyzing the picture of the to-be-sprayed pipe fitting through a computer, confirming a model of the to-be-sprayed pipe fitting, comparing model differences, and constructing a virtual position of code spraying of the model of the to-be-sprayed pipe fitting; and the virtual position of the to-be-sprayed pipe fitting model is output to the laser code spraying device, a spray head of the laser code spraying device sprays codes on the corresponding pipe joint passing through the lower portion, and high-speed accurate positioning code printing can be conducted on various special-shaped products with random position angles.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of pipe fitting production equipment technology, and more specifically, to a pipe fitting inkjet marking method and equipment. Background Technology

[0002] In current production, to improve product anti-counterfeiting, anti-counterfeiting codes have been changed from paper labels to laser QR codes. Due to the special shape of pipe fittings, some pipe fittings are non-standard products, such as Y-type tees, arc tees, and reducing tees, which cannot be transported and coded using mainstream conveying methods. Secondly, the number of coding positions allowed for products is extremely limited, there is no customized positioning, and they cannot be selected arbitrarily. There are many types and sizes, and if different fixtures and equipment are used for each type, the cost will be high. Therefore, a technical solution is needed to solve the above problems. Summary of the Invention

[0003] The purpose of this invention is to overcome the shortcomings of the prior art and to solve the problem of high-speed and accurate positioning and coding of various irregularly shaped products with random positions and angles, providing a method and equipment for inkjet coding of pipe joints.

[0004] To achieve the above objectives, the present invention adopts the following technical solution:

[0005] This invention discloses a method for inkjet printing on pipe joints, comprising the following steps:

[0006] S1. Place the pipe fitting on the upper surface of the conveyor belt of the pipe fitting inkjet printer, place the pipe fitting below the camera, and take a picture of the pipe fitting below through the camera to obtain a standard pipe fitting image.

[0007] S2. Analyze the standard pipe fitting images using a computer, confirm the standard pipe fitting model and anti-counterfeiting code position, and output the anti-counterfeiting code position so that the laser marking device's nozzle reaches the initial position.

[0008] S3. Start the conveyor belt. Workers place the pipes one by one on the conveyor belt. The camera takes pictures of each pipe joint passing below to obtain images of the pipes to be sprayed.

[0009] S4. Analyze the images of the nozzle to be sprayed using a computer to confirm the model of the nozzle to be sprayed;

[0010] S5. Compare the model differences and construct the virtual position for inkjet printing on the pipe fitting model to be sprayed;

[0011] S6. The computer outputs the virtual position of the model of the pipe fitting to be marked to the laser marking device, and the printhead of the laser marking device marks the corresponding pipe joint below.

[0012] Furthermore, in step S2, the standard pipe fitting image includes a shooting range, which includes a first pipe joint area. A reference point P0 is determined for the pipe joint area, and the position between the anti-counterfeiting code and the reference point P0 is locked. The anti-counterfeiting code and the reference point P0 form a whole.

[0013] Furthermore, in step S2, the first pipe joint area includes multiple right-angle endpoints, which are set as P1, P2, P3, P4, P5, and P6 in a counterclockwise direction. The connecting line between P1 and P6 is L1. A perpendicular line is drawn from the midpoint of the side where P3 and P4 are located to L1 to form L2. The intersection point between L1 and L2 is P0.

[0014] Furthermore, in step S2, the anti-counterfeiting code is located in the pipe opening area where P3 and P4 are located, and the center of the anti-counterfeiting code is located on L2.

[0015] Furthermore, in step S4, the second pipe joint area in the image of the pipe to be sprayed is confirmed, and the points P1', P2', P3', P4', P5', and P6' of the second pipe joint area are determined using the point-fixing method in step S2, thereby determining the reference point P0' of the second pipe joint area.

[0016] Furthermore, in step S5, the outer contours of the standard pipe fitting image and the pipe fitting image to be sprayed are overlapped, the coordinate displacement of the reference point P0 as it moves from the standard pipe fitting image to the pipe fitting image to be sprayed is determined, the anti-counterfeiting code and the moving direction and distance of the reference point P0 are constructed, the offset angle between L1 in the standard pipe fitting image and the pipe fitting image to be sprayed is recorded as θ1, the offset angle between L2 in the standard pipe fitting image and the pipe fitting image to be sprayed is recorded as θ2, and the overall rotation direction and angle of the anti-counterfeiting code and the reference point P0 are constructed.

[0017] Furthermore, in step S5, the nozzle displacement and rotation are simulated: the coordinate displacement in step S5 is obtained, and the anti-counterfeiting code and reference point P0 in the standard pipe fitting image are moved according to the coordinate displacement. The standard pipe fitting image is rotated according to the offset angle θ1 so that the two L1s coincide. At this time, the offset angle θ2 is 0° or 180°. If θ2 is 0°, the standard pipe fitting image does not need to be rotated further. If θ2 is 180°, the standard pipe fitting image needs to be rotated another 180°.

[0018] Furthermore, in step S2, except for the first standard pipe fitting image which is manually photographed and positioned, all subsequent standard pipe fitting images will use the previous image of the pipe fitting to be sprayed as the standard pipe fitting image.

[0019] The present invention also discloses a pipe joint inkjet printing device. To realize the above-mentioned pipe joint inkjet printing method, it is characterized by including a conveyor belt, a camera, a laser inkjet printing device, and a computer. The camera and the laser inkjet printing device are located in the conveying direction of the conveyor belt. The camera and the laser inkjet printing device are connected to the computer, and the computer processes the information of the camera and the laser inkjet printing device.

[0020] The beneficial effects of this invention are:

[0021] This invention utilizes feature point recognition and dynamic positioning technology to adapt to the coding requirements of different models and specifications of pipe fittings without changing the positioning fixture. When changing products, only a standard image needs to be re-captured, reducing the switching costs of multi-variety production. It can solve the problem of high-speed and accurate positioning and coding of various irregularly shaped products with random positions and angles. Attached Figure Description

[0022] Figure 1 This is a schematic diagram of a process in this embodiment.

[0023] Figure 2 This is a schematic diagram of a standard pipe fitting in this embodiment.

[0024] Figure 3 This is a schematic diagram of the spray nozzle in this embodiment.

[0025] Figure 4 This is a schematic diagram of a pipe joint inkjet printing device in this embodiment.

[0026] Reference numerals: 1. Conveyor belt; 2. Camera; 3. Laser marking device; 4. Computer; 101. Shooting range; 102. First pipe joint area; 103. Anti-counterfeiting code; 104. Second pipe joint area. Detailed Implementation

[0027] The technical solutions in this embodiment will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0028] like Figures 1-3 As shown, this embodiment discloses a method for marking pipe fittings. This method can be used for automatic marking of pipe fittings such as Y-type tee pipe fittings, arc tee pipe fittings, and reducing tee pipe fittings, and includes the following steps:

[0029] S1. Standard Image Acquisition and Preprocessing: Place the pipe connector on the upper surface of the conveyor belt 1 of the pipe connector inkjet printing equipment (the pipe connector in this embodiment is an arc-shaped tee pipe connector), place the pipe connector below the camera 2, and place the pipe connector in the center positioning area of ​​the conveyor belt 1 (marked by the positioning lines on the surface of the conveyor belt). Multiple positioning frames are arranged along the length of the surface of the conveyor belt 1. The camera 2 takes a picture of the pipe connector below. Manually adjust the posture of the pipe connector sample so that the pipe opening in the middle is facing down and the axis is perpendicular to the center line of the conveyor belt, that is, the pipe opening in the middle is parallel to the center of the conveyor belt 2. Start the image acquisition process through the computer 4 to obtain a standard pipe image, trigger the camera 2 to take a picture of the standard pipe image and transmit it to the computer 4. The image preprocessing module automatically performs grayscale, Gaussian filtering and binarization on the image to eliminate noise interference and highlight the contour features of the pipe connector. The preprocessed image is saved to the specified path.

[0030] S2. The standard pipe fitting image includes a shooting range 101, which includes the first pipe joint area 102. The reference point P0 of the pipe joint area is determined, and the position between the anti-counterfeiting code 103 and the reference point P0 is locked. The anti-counterfeiting code 103 and the reference point P0 form a whole. Standard model calibration and parameter storage: The standard pipe fitting image is analyzed by computer 4. The image analysis software on computer 4 starts the calibration process. The core steps and algorithms are as follows:

[0031] 2.1 Shooting Range and Region Extraction: A threshold-based region extraction algorithm is used. Based on the difference in grayscale after binarization, the shooting range 101 is automatically identified, and the positioning frame of the shooting range and the surface of the conveyor belt 1 is defined. The contour of the first pipe joint region 102 is extracted using a contour tracking algorithm, and the contour point set is saved as (X1, Y1), (X2, Y2)...(X... x Y x );

[0032] 2.2 Right-angle endpoint recognition: A feature point detection algorithm based on contour curvature is adopted. The first pipe joint area 102 includes multiple right-angle endpoints. The curvature value of each point on the contour is calculated, and six right-angle endpoints with abrupt curvature changes are selected. The endpoints are sequentially marked as P1, P2, P3, P4, P5, and P6 (with the centroid of the contour as the pole, in a counterclockwise direction) using a polar angle sorting algorithm. The endpoint coordinates are automatically recorded.

[0033] 2.3 Calculation of reference point P0: The straight line connecting P1 and P6 is L1. The equation of the straight line L1 is obtained by fitting the coordinate points of P1 and P6 through the straight line fitting algorithm (using the least squares method): y=k1x+b1, where: b1 is the y-intercept of L1 and k1 is the slope of L1.

[0034] Draw a perpendicular line from the midpoint of the side containing P3 and P4 towards L1 to form L2. Calculate the midpoint M ((X3+X4) / 2, (Y3+Y4) / 2) of the side containing P3 and P4. Use the perpendicular line equation solving algorithm to obtain the equation of the line L2 passing through point M and perpendicular to L1: y=k2x+b2 (k2=-1 / k1), where b2 is the y-intercept of L2 and k2 is the slope of L2. The intersection point between L1 and L2 is P0. Solving for the coordinates of the intersection point of L1 and L2 gives the reference point P0 (X0, Y0).

[0035] 2.4 Confirm the standard anti-counterfeiting code position calibration: Anti-counterfeiting code 103 is located in the pipe opening area where P3 and P4 are located. The center of anti-counterfeiting code 103 is located on L2. The offset of the upper left corner coordinate of the anti-counterfeiting code relative to P0 is set to (-Amm, Bmm), and the offset of the lower right corner coordinate is set to (Amm, B+2amm), forming a rectangular inkjet printing area.

[0036] 2.5 Initial Position Calibration: Lock the pipe fitting model and the position of anti-counterfeiting code 103. Computer 4 sends a calibration command to laser marking device 3. The printhead moves to the physical position corresponding to the marking area under the drive of the three-axis motion platform. At this time, the center of the printhead is aligned with the center of the anti-counterfeiting code, and the initial position calibration is completed. All calibration parameters are saved to the database.

[0037] 2.6 To improve the consistency of continuous inkjet printing, in this step, except for the first standard pipe fitting image which requires manual adjustment of the pipe joint position before manual shooting and positioning, the standard pipe fitting images in the subsequent production process will automatically use the previous inkjet-printed pipe fitting image as the new standard pipe fitting image, realizing dynamic updating of the reference point, offsetting the impact of the cumulative error of the conveyor belt on the inkjet printing accuracy, and at the same time, the printhead does not need to return to the corresponding position, resulting in a shorter travel and faster movement.

[0038] S3. Start conveyor belt 1. Workers place pipe fittings one by one on conveyor belt 1, ensuring that the position of each pipe fitting does not exceed the positioning frame of conveyor belt 1. When the pipe fitting moves with the conveyor belt to the shooting area of ​​camera 2, the photoelectric sensor on the side of the conveyor belt triggers a signal to computer 4. Computer 4 immediately sends a shooting command to camera 2. Camera 2 takes pictures of the pipe fittings passing below one by one to obtain pictures of the pipe fittings to be sprayed.

[0039] S4. Analyze the image of the nozzle to be sprayed using computer 4 to confirm the nozzle model. Extract the contour of the second nozzle joint area 104 using a contour tracking algorithm. Using the fixed-point method in step S2, identify six right-angle endpoints using curvature detection and polar angle sorting algorithms and mark them as P1', P2', P3', P4', P5', and P6'. Calculate the reference point P0' (X0', Y0') of the second nozzle joint area 104 using a straight-line fitting and perpendicular line solving algorithm.

[0040] S5. Compare the model differences, determine the coordinate displacement of the reference point P0 from the standard pipe fitting image to the pipe fitting image to be sprayed, construct the anti-counterfeiting code 103 and the moving direction and distance of the reference point P0, and construct the virtual position of the inkjet code on the pipe fitting model to be sprayed:

[0041] 5.1 Align the outer contours of the standard pipe fitting image and the pipe fitting image to be sprayed;

[0042] 5.2 Contour Registration and Displacement Calculation: The iterative nearest point algorithm is used to register the contour of the standard pipe fitting and the contour of the pipe fitting to be sprayed. The number of iterations is set to 20, and the convergence threshold is set to 0.001mm. After registration, the coordinate displacement ΔX=X0'-X0 and ΔY=Y0'-Y0 from the reference point P0 to P0' are calculated.

[0043] 5.3 Angle Offset Calculation: Construct the overall rotation direction and angle of the anti-counterfeiting code 103 and the reference point P0. Use the straight line slope calculation algorithm to obtain the slope k1 of the standard straight line L1 and the slope k1' of the straight line to be sprayed L1' respectively. Calculate the offset angle θ1 between L1 and L1'. Similarly, calculate the offset angle θ2 between L2 and L2'. Record the offset angles as θ1 and θ2.

[0044] 5.4 Nozzle Posture Adjustment Calculation: Generate the nozzle's X / Y axis movement command based on the coordinate displacement (ΔX, ΔY); generate the R-axis rotation command based on θ1, controlling the nozzle to first rotate by the angle θ1 so that L1 coincides with L1'. At this time, the actual offset angle between L2 and L2' becomes θ2' = θ2 - θ1 = 180°; since θ2' = 180°, it is necessary to generate an additional command to rotate the R-axis by 180° to ensure the anti-counterfeiting code is in the correct direction. Rotate the standard pipe fitting image based on the offset angle θ1 so that the two L1s coincide. At this time, the offset angle θ2 is 0° or 180°. If θ2 is 0°, the standard pipe fitting image does not need to be rotated further; if θ2 is 180°, the standard pipe fitting image needs to be rotated by another 180°.

[0045] 5.5 Virtual Position Verification: The software's built-in simulation module simulates the inkjet printing position after the nozzle adjustment and verifies its overlap with the outline of the pipe to be printed. This confirms that the inkjet printing area is completely within the P3-P4 pipe opening area. After successful verification, the final inkjet printing position instruction is generated.

[0046] S6. Computer 4 outputs the virtual position of the spray nozzle model to the laser marking device 3. The printhead of the laser marking device 3 marks the corresponding pipe joint below. When the pipe joint to be marked moves to the underside of the printhead with the conveyor belt, the sensor under the printhead detects the pipe joint and sends a trigger signal. The printhead immediately adjusts its posture according to the instruction. Then the laser generator starts and prints the QR code anti-counterfeiting code. After the marking is completed, the pipe joint moves with the conveyor belt to the visual inspection station at the discharge end. The auxiliary camera takes a picture of the marked image and verifies the clarity and integrity of the marking through the QR code recognition algorithm. Products that pass the inspection enter the subsequent packaging process, while unqualified products are rejected by the pneumatic pusher and sent to the waste bin.

[0047] This invention also discloses a pipe joint marking device. To implement the pipe joint marking method described in the claims, it includes a conveyor belt 1, a camera 2, a laser marking device 3, and a computer 4. The camera 2 and the laser marking device 3 are located in the conveying direction of the conveyor belt 1. The camera 2 and the laser marking device 3 are connected to the computer 4. The computer 4 processes the information from the camera 2 and the laser marking device 3. The computer 4 is an industrial control computer with a built-in image analysis module and a device control module. The image analysis module integrates feature point recognition algorithms, coordinate conversion programs, and angle detection algorithms to process the image data transmitted by the camera 2, calculate the reference point position, and the dynamic marking position. The device control module sends control signals to the stepper motor of the conveyor belt 1, the fill light of the camera 2, and the drive module of the laser marking device 3 to realize the coordinated operation of each device. The computer 4 is also equipped with a touch screen display, which can display the captured image, marking position parameters, and device operating status in real time, facilitating monitoring and debugging by operators.

[0048] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.

Claims

1. A method for inkjet printing on pipe fittings, characterized in that, Includes the following steps: S1. Place the pipe fitting on the upper surface of the conveyor belt (1) of the pipe fitting inkjet printer and place the pipe fitting below the camera (2). Take a picture of the pipe fitting below through the camera (2) to obtain a standard pipe fitting image. S2. Analyze the standard pipe fitting image using computer (4), confirm the standard pipe fitting model and the position of anti-counterfeiting code (103), and output the position of anti-counterfeiting code (103) so that the nozzle of the laser marking device (3) reaches the initial position. S3. Start the conveyor belt (1), and the workers place the pipes one by one on the conveyor belt (1). The camera (2) takes pictures of the pipe joints passing below one by one to obtain pictures of the pipes to be sprayed. S4. Analyze the images of the nozzle to be sprayed using a computer (4) to confirm the model of the nozzle to be sprayed. S5. Compare the model differences and construct the virtual position for inkjet printing on the pipe fitting model to be sprayed; S6. The computer (4) outputs the virtual position of the model of the pipe fitting to be printed to the laser printing device (3). The nozzle of the laser printing device (3) prints the corresponding pipe joint below.

2. The pipe joint inkjet printing method according to claim 1, characterized in that, In step S2, the standard pipe fitting image includes a shooting range (101), which includes a first pipe joint area (102). The reference point P0 of the pipe joint area is determined, and the position between the anti-counterfeiting code (103) and the reference point P0 is locked. The anti-counterfeiting code (103) and the reference point P0 form a whole.

3. The pipe joint inkjet printing method according to claim 2, characterized in that, In step S2, the first pipe joint area (102) includes multiple right-angle endpoints, which are set as P1, P2, P3, P4, P5, and P6 in a counterclockwise direction. The connecting line between P1 and P6 is L1. A perpendicular line is drawn from the midpoint of the side where P3 and P4 are located to L1 to form L2. The intersection point between L1 and L2 is P0.

4. The pipe joint inkjet printing method according to claim 3, characterized in that, In step S2, the anti-counterfeiting code (103) is located in the pipe opening area where P3 and P4 are located, and the center of the anti-counterfeiting code (103) is located on L2.

5. The pipe joint inkjet printing method according to claim 3, characterized in that, In step S4, the second pipe joint area (104) in the image of the pipe to be sprayed is confirmed, and P1', P2', P3', P4', P5', and P6' of the second pipe joint area (104) are determined using the fixed-point method in step S2, thereby determining the reference point P0 of the second pipe joint area (104).

6. The pipe joint inkjet printing method according to claim 5, characterized in that, In step S5, the outer contours of the standard pipe fitting image and the pipe fitting image to be sprayed are overlapped. The coordinate displacement of the reference point P0 as it moves from the standard pipe fitting image to the pipe fitting image to be sprayed is determined. The anti-counterfeiting code (103) and the moving direction and distance of the reference point P0 are constructed. The offset angle between L1 in the standard pipe fitting image and the pipe fitting image to be sprayed is recorded as θ1, and the offset angle between L2 in the standard pipe fitting image and the pipe fitting image to be sprayed is recorded as θ2. The rotation direction and angle of the anti-counterfeiting code (103) and the reference point P0 as a whole are constructed.

7. The pipe joint inkjet printing method according to claim 6, characterized in that, In step S5, simulate nozzle displacement and rotation: obtain the coordinate displacement in step S5, move the anti-counterfeiting code (103) and reference point P0 in the standard pipe fitting image according to the coordinate displacement, rotate the standard pipe fitting image according to the offset angle θ1 so that the two L1 coincide. At this time, the offset angle θ2 is 0° or 180°. If θ2 is 0°, the standard pipe fitting image does not need to be rotated further. If θ2 is 180°, the standard pipe fitting image needs to be rotated 180° again.

8. The pipe joint inkjet printing method according to claim 1, characterized in that, In step S2, except for the first standard pipe fitting image which is manually photographed and positioned, all subsequent standard pipe fitting images will use the previous image of the pipe fitting to be sprayed as the standard pipe fitting image.

9. A pipe joint inkjet printing device, characterized in that, in order to implement the pipe joint inkjet printing method according to any one of claims 1-8, The system includes a conveyor belt (1), a camera (2), a laser marking device (3), and a computer (4). The camera (2) and the laser marking device (3) are located in the conveying direction of the conveyor belt (1). The camera (2) and the laser marking device (3) are connected to the computer (4). The computer (4) processes the information from the camera (2) and the laser marking device (3).