A safety anti-collision method and system for a table of a laser cutting machine
Patent Information
- Application Number
- CN202510708644.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2045-05-29
AI Technical Summary
然而,在激光切割机的运行过程中,尤其是在切割完成后进行交换平台操作时,存在如下安全隐患:如果台面上存在人员或障碍物,激光切割机的运动部件可能会与之发生碰撞,从而引发安全事故,造成设备损坏或人员伤亡
本申请提供的激光切割机的台面安全防撞方法及系统中,通过在台面两侧布设视觉装置,精准标定物理与图像坐标映射关系,并经图像预处理、透视变换、拼接及障碍物识别的步骤,能及时准确判断台面状况,自动决定激光切割机是否停机,有效避免台面交换时碰撞,保障人员和设备安全,提升生产效率与自动化程度,降低人工检查成本和出错率,适应复杂多变的工业生产环境。
Smart Images

Figure CN120572169B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of visual inspection technology for laser cutting machines, specifically relating to a method and system for preventing collisions on the table of a laser cutting machine. Background Technology
[0002] With the development of industrial automation, laser cutting, as a high-precision and high-efficiency processing equipment, has been widely used in manufacturing. From the processing of large mechanical parts to the manufacturing of precision electronic components, laser cutting machines have become a key link in many production processes due to their advantages in cutting quality and speed. However, during the operation of laser cutting machines, especially when changing platforms after cutting, the following safety hazards exist: if there are personnel or obstacles on the table, the moving parts of the laser cutting machine may collide with them, causing safety accidents, resulting in equipment damage or personal injury.
[0003] Currently, the industry commonly uses manual inspection to address this issue. Before the exchange platform is used, operators manually check the platform for people or obstacles. This method is not only inefficient, severely hindering the overall speed of the production process, but also prone to misjudgment due to human error. For example, in complex production environments, operators may fail to spot obstacles on the platform in time due to fatigue or inattention, or they may misjudge the height and location of obstacles. If the height of an obstacle exceeds the safe passage range of the lifting window, the laser cutting machine will collide with it during the exchange process, causing equipment damage and potentially triggering a chain reaction, resulting in a more serious production accident. Summary of the Invention
[0004] In a first aspect, embodiments of this application provide a method for preventing collisions on the table of a laser cutting machine, comprising the following steps: S1. A vision device is installed on each side of the laser cutting machine table in the direction of movement. The height and angle of the vision device are adjusted to cover the entire surface of the laser cutting machine table. The vision device includes a camera and a light source. S2. Calibrate the physical coordinates and image coordinates of the four corners of the laser cutting machine table, and establish the mapping relationship between the physical coordinates and the image coordinates; S3. Capture tabletop images using two cameras, perform image preprocessing on the two tabletop images, execute dense perspective transformation based on the mapping relationship between physical coordinates and image coordinates, then stitch the two tabletop images after dense perspective transformation, and finally perform obstacle recognition on the stitched image. S4. Determine whether to stop the laser cutting machine based on the obstacle recognition results.
[0005] Furthermore, the specific steps of step S1 are as follows: S11. Based on the movement direction of the laser cutting machine table, a vision device is set on the sheet metal of the laser cutting machine on both sides; each vision device has a camera and two light sources; S12. Adjust the height and angle of the camera of each vision device according to the pre-calibrated installation range so that the table of the laser cutting machine is within the field of view of the two cameras; S13. Using the vertical direction between the vision device and the table of the laser cutting machine as a baseline, adjust the angle of the two light sources away from the baseline, and adjust the angle to a preset angle threshold. S14. Install a diffuser around the light source.
[0006] Furthermore, the calibration of the installation range in step S12 is performed in the following manner: Obtain the table size of the laser cutting machine, the camera parameters, and the installable area of the sheet metal of the laser cutting machine as input parameters; The minimum installation height, maximum installation height, and installation angle of the camera are calculated using the input parameters. The camera is loaded using a calibration tool to obtain a manually added virtual calibration frame. The virtual calibration frame is then compared with the calculated minimum and maximum installation heights of the camera, and a prompt is given indicating whether the virtual calibration frame is compliant. The system simulates and calculates the camera's installation angle, and prompts for adjustment when the deviation between the installation angle and the preset angle threshold exceeds the preset angle tolerance. The calibration process also includes calculating the smallest pixel point as the pixel size; If the field of view is length x and width y, and the camera resolution is z×e, then the minimum pixel is .
[0007] Furthermore, the specific steps of step S2 are as follows: S21. Place calibration targets at the four corners of the laser cutting machine table, determine the physical coordinates of the calibration targets, and take images of the laser cutting machine table using a camera; S22. Extract the image coordinates of the calibration target from the table image, and calculate the homography matrix H that maps the physical coordinates of the calibration target to the image coordinates;
[0008]
[0009] Where u and v represent the image coordinates of the calibration target, X and Y represent the physical coordinates of the calibration target, and w represents the normalization parameter used to correct image distortion caused by camera tilt. in, , , , This represents a linear transformation of the captured image of the tabletop, used for scaling and rotating the captured image. , This represents a translation operation on the tabletop image, used to move the image within a plane. , Used to control the perspective effect of an image during perspective transformation. Normalization used in perspective transformations; S23. Calculate the length of the platform pixels in the image based on the image coordinates of the four calibration targets, and calculate the image ratio based on the length of the platform pixels and the actual length of the platform. S24. Select any point on the table of the laser cutting machine and determine its physical coordinates. Use the homography matrix to calculate the image coordinates and calculate the Euclidean distance between the calculated image coordinates of the selected point and the actual image coordinates of the selected point in the table image. If the calculated Euclidean distance is less than or equal to the preset pixel threshold, proceed to step S3; If the calculated Euclidean distance is greater than the preset pixel threshold, recalibration is triggered, and the process returns to step S21.
[0010] Furthermore, the specific steps of step S3 are as follows: S31. Simultaneously capture tabletop images using two cameras, and perform image preprocessing on the two tabletop images, including grayscale conversion, noise reduction, and edge enhancement respectively; S32. Perform dense perspective transformation on the two preprocessed tabletop images using the homography matrix, thereby mapping the pixel coordinates of the tabletop images to the physical coordinates of the tabletop, and obtaining the perspective-transformed images. S33. Use SIFT to perform feature matching on the perspective-transformed images from the two cameras to determine the overlapping area, and then use an image fusion algorithm to perform image stitching on the two perspective-transformed images in the overlapping area to obtain the stitched tabletop image. S34. Perform adaptive binarization segmentation on the stitched tabletop image, extract closed contours with an area greater than the pixel threshold, and calculate the closed contour features; S35. Use the OpenPose algorithm to identify human key points for each closed contour, and perform human pose recognition when a human body is identified. Closed contours where no human body is identified are marked as general obstacles, and the height of the obstacles is recorded.
[0011] Furthermore, the specific steps of image preprocessing in step S31 are as follows: Convert the RGB format tabletop images captured by the two cameras to grayscale images using the following weighting method. :
[0012] in, Represents the grayscale value of the image, where R, G, and B are the red, green, and blue channel values of a pixel in an RGB format tabletop image, respectively. Use Gaussian filtering to remove noise from grayscale images:
[0013] in, Represents the pixel value at coordinates (x+i, y+j) in a grayscale image; This represents the grayscale value before filtering; represents the filtered grayscale value; a and b represent the radius parameters of the convolution kernel, controlling the filtering range; G(i,j) is the Gaussian weight function;
[0014] in, i ∈[− a , a ], j ∈[− b , b ]; Edge features of grayscale values in the filtered background image are extracted using the Sobel operator. The Sobel operator is used to calculate the horizontal and vertical gradients of the grayscale values of the filtered background image. The gradient magnitude is calculated based on the horizontal and vertical gradients of the grayscale values of the filtered background image, resulting in a gradient magnitude map. Edge enhancement is achieved by converting the gradient magnitude map into a black-and-white binary map through thresholding.
[0015] in, This is a preset gradient magnitude threshold; The specific steps of step S32 are as follows: S321. For the images captured by the two cameras, perform perspective transformation using the following homography matrices respectively;
[0016] in,( , (x, y) represents the image coordinates, and (x, y) are the physical coordinates; , , , This represents a linear transformation of the captured image of the tabletop, used for scaling and rotating the captured image. , This represents a translation operation on the tabletop image, used to move the image within a plane. , Used to control the perspective effect of an image during perspective transformation. Normalization used in perspective transformations; S322. For each image captured by a camera, calculate the intermediate homogeneous coordinates using the homography matrix: ; S323. Calculate the normalized image coordinates based on the intermediate homogeneous coordinates: .
[0017] Furthermore, the specific steps of step S33 are as follows: S331. Using the perspective-transformed images from the two cameras as reference images, mark the key points from the two reference images and construct descriptive features for each key point; S332. Calculate the distance between the key points of one reference map and the descriptive features of key points in another reference map, until the distance calculation of the descriptive features of all key points is completed; S333. Locate a baseline map and find the nearest and second nearest neighbors of each key point in the located baseline map in another baseline map; S334. Record the distance between each key point in the positioning reference map and its nearest neighbor as the minimum distance, and record the distance between each key point in the positioning reference map and its nearest neighbor as the secondary distance. S335. Determine whether the next distance is less than the minimum distance by a set ratio; If so, the key point and its nearest neighbor are considered to be matching points; If not, it is determined that the key point does not match the nearest neighbor point; S336. Determine the overlapping area and the width of the overlapping area based on the matching points in the two reference maps; S337. The Laplacian pyramid algorithm is used to fuse the two reference images in the overlapping area to obtain a seamlessly stitched fused platform image.
[0018] Furthermore, step S34 is detailed as follows: The adaptive binarization segmentation is calculated using the following formula on the stitched tabletop image:
[0019] in, Local threshold; Specifically, the local threshold is in pixels ( x , y Centered on , take a neighborhood window of (2N+1) × (2N+1) . Calculate the average gray value within the neighborhood window :
[0020] Set threshold Where C is a constant. All closed contours are detected using connected component analysis, and closed contours with an area smaller than the pixel threshold are filtered out. Calculate the contour features for the remaining closed contour; the contour features include area, aspect ratio, Hu moment, and coordinates of the center of the minimum circumscribed rectangle. The specific steps of step S35 are as follows: For each closed contour, the OpenPose algorithm is applied to detect skeletal key points within its minimum bounding rectangle region; A substance is considered a human body if it meets the following conditions: The following key skeletal points were examined: neck, left shoulder, right shoulder, left hip, and right hip. The confidence level of the detected skeletal keypoints is greater than the confidence threshold; The detected skeletal keypoints are converted into physical coordinates using a homography matrix to calculate the torso height; Posture classification based on torso height; If the number of skeletal key points is insufficient or the confidence level is not met, it is judged as a general obstacle. The height of a typical obstacle is calculated using the following steps: The image of the closed contour region is processed by grayscale conversion and binarization. Extracting the vertical pixel span of the body ; actual height ,in This refers to the pixel size in the vertical direction.
[0021] Furthermore, the specific steps of step S4 are as follows: S41. Obtain the result of closed contour recognition of the stitched image; If a human body is detected, proceed to step S44; If no human body is detected, but a common obstacle is detected, proceed to step S42; If no human body or ordinary obstacle is detected, proceed to step S44; S42. Determine whether the height of a common obstacle is less than the height of the lifting window of the laser cutting machine; If so, proceed to step S43; If not, proceed to step S44; S43. Determine if the table movement of the laser cutting machine is permitted, then terminate; S44. Determine to stop the laser cutting machine, prohibit table movement, and end.
[0022] Secondly, embodiments of this application also provide a tabletop safety anti-collision system for a laser cutting machine, comprising: A vision device safety module is used to install a vision device on each side of the laser cutting machine table in the direction of movement, and to adjust the height and angle of the vision device to cover the entire surface of the laser cutting machine table; the vision device includes a camera and a light source. The coordinate mapping relationship construction module is used to calibrate the physical coordinates and image coordinates of the four corners of the laser cutting machine table and establish the mapping relationship between the physical coordinates and image coordinates. The image processing and element recognition module is used to capture tabletop images through two cameras, perform image preprocessing on the two tabletop images, perform dense perspective transformation according to the mapping relationship between physical coordinates and image coordinates, perform image stitching on the two tabletop images after dense perspective transformation, and then perform element recognition on the stitched image. The motion interference judgment module is used to determine whether to stop the laser cutting machine based on the element recognition results.
[0023] As can be seen from the above technical solutions, this application has the following advantages: The laser cutting machine table safety anti-collision method and system provided in this application, by arranging vision devices on both sides of the table, accurately calibrates the physical and image coordinate mapping relationship, and through image preprocessing, perspective transformation, splicing and obstacle recognition steps, can timely and accurately judge the table condition, automatically decide whether the laser cutting machine should stop, effectively avoid collisions during table exchange, ensure the safety of personnel and equipment, improve production efficiency and automation, reduce manual inspection costs and error rates, and adapt to complex and ever-changing industrial production environments. Attached Figure Description
[0024] To more clearly illustrate the technical solution of this application, the accompanying drawings used in the description will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 This is a flowchart illustrating the tabletop safety anti-collision method for the laser cutting machine of the present invention.
[0026] Figure 2 This is a schematic diagram showing the installation of the camera of the present invention relative to the table of the laser cutting machine.
[0027] Figure 3 This is a schematic diagram of the table safety anti-collision system of the laser cutting machine of the present invention.
[0028] Among them, 1-the table of the laser cutting machine; 2-the camera. Detailed Implementation
[0029] The various embodiments of this disclosure will be described more fully in the following detailed steps of the method for preventing collisions on the table of a laser cutting machine. This disclosure may have various embodiments, and adjustments and changes may be made therein. However, it should be understood that there is no intention to limit the various embodiments of this disclosure to the specific embodiments disclosed herein, but rather this disclosure should be understood to cover all adjustments, equivalents, and / or alternatives falling within the spirit and scope of the various embodiments of this disclosure.
[0030] For example, with the development of industrial automation, laser cutting, as a high-precision and high-efficiency processing equipment, has been widely used in the manufacturing industry. From the processing of large mechanical parts to the manufacturing of precision electronic components, laser cutting machines have become a key link in many production processes due to their advantages in cutting quality and speed. However, during the operation of laser cutting machines, especially when exchanging platforms after cutting, the following safety hazards exist: if there are personnel or obstacles on the table, the moving parts of the laser cutting machine may collide with them, thereby causing safety accidents, resulting in equipment damage or personal injury.
[0031] Currently, the industry commonly uses manual inspection to address this issue. Before the exchange platform is used, operators manually check the platform for people or obstacles. This method is not only inefficient, severely hindering the overall speed of the production process, but also prone to misjudgment due to human error. For example, in complex production environments, operators may fail to spot obstacles on the platform in time due to fatigue or inattention, or they may misjudge the height and location of obstacles. If the height of an obstacle exceeds the safe passage range of the lifting window, the laser cutting machine will collide with it during the exchange process, causing equipment damage and potentially triggering a chain reaction, resulting in a more serious production accident.
[0032] To address the aforementioned issues, this embodiment provides a method for preventing collisions on the table of a laser cutting machine. By deploying visual devices on both sides to cover the entire table surface and calibrating the mapping relationship between physical and image coordinates, the system determines whether to stop the machine through image processing and obstacle recognition, effectively avoiding collisions, ensuring safety, and improving efficiency.
[0033] The technical solutions of the embodiments of the present invention 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.
[0034] Please see Figure 1The diagram shows a flowchart of a method for preventing collisions on the table of a laser cutting machine in a specific embodiment. The method includes the following steps: S1. A vision device is installed on each side of the laser cutting machine table in the direction of movement. The height and angle of the vision device are adjusted to cover the entire surface of the laser cutting machine table. The vision device includes a camera and a light source. It should be noted that by setting up vision devices on both sides of the table and adjusting their height and angle, full coverage of the table is ensured, providing a foundation for subsequent image acquisition and obstacle recognition, and guaranteeing the range and quality of visual detection. S2. Calibrate the physical coordinates and image coordinates of the four corners of the laser cutting machine table, and establish the mapping relationship between the physical coordinates and the image coordinates; It should be noted that by calibrating the physical coordinates of the four corners of the calibration platform and establishing a mapping relationship with the image coordinates, a coordinate transformation basis is provided for subsequent image processing, thereby improving the accuracy of image processing. S3. Capture tabletop images using two cameras, perform image preprocessing on the two tabletop images, execute dense perspective transformation based on the mapping relationship between physical coordinates and image coordinates, then stitch the two tabletop images after dense perspective transformation, and finally perform obstacle recognition on the stitched image. It should be noted that by capturing images through two cameras, and after preprocessing, perspective transformation, image stitching and obstacle recognition, the image information is integrated to accurately identify elements on the table, providing a basis for determining whether to stop the machine; S4. Determine whether to stop the laser cutting machine based on the obstacle recognition results; It should be noted that the laser cutting machine can be stopped based on obstacle recognition results, thus achieving automatic control, effectively avoiding collisions, and ensuring the safety of personnel and equipment.
[0035] This embodiment ensures comprehensive coverage of the laser cutting machine table by deploying vision devices on both sides of the table's movement direction. This layout effectively monitors all areas of the table, avoiding safety hazards caused by blind spots. By calibrating the physical coordinates and image coordinates of the four corners of the laser cutting machine table, a mapping relationship is established, providing a coordinate transformation basis for subsequent image processing and obstacle recognition. By simultaneously capturing table images with two cameras and performing preprocessing, dense perspective transformation, and image stitching, a complete table view can be generated. Based on the obstacle recognition results, the system automatically determines whether to stop the laser cutting machine's movement, achieving automated safety control. This effectively reduces human intervention and lowers the risk of safety accidents caused by human negligence.
[0036] Furthermore, as a refinement and extension of the specific implementation of the above embodiments, in order to fully illustrate the specific implementation process in this embodiment, another method for preventing collisions on the table of a laser cutting machine is provided, which includes the following steps: S1. A vision device is installed on each side of the laser cutting machine table in the direction of movement. The height and angle of the vision device are adjusted to cover the entire surface of the laser cutting machine table. The vision device includes a camera and a light source. The specific steps of step S1 are as follows: S11. Based on the movement direction of the laser cutting machine table, a vision device is set on the sheet metal of the laser cutting machine on both sides; each vision device has a camera and two light sources; The camera 2 is mounted relative to the table 1 of the laser cutting machine as follows: Figure 2 As shown; S12. Adjust the height and angle of the camera of each vision device according to the pre-calibrated installation range so that the table of the laser cutting machine is within the field of view of the two cameras; the calibration of the installation range in step S12 is performed in the following way: Obtain the table size of the laser cutting machine, the camera parameters, and the installable area of the sheet metal of the laser cutting machine as input parameters; Specifically, the dimensions of the laser cutting machine include length × width, such as 2000mm × 1500mm, and the parameters of the camera include resolution, focal length and field of view, such as a resolution of 1280 × 1024 pixels and a field of view of 60°. The minimum installation height, maximum installation height, and installation angle of the camera are calculated using the input parameters. Specifically, the minimum installation height of the camera H_min = (table width / 2) / tan(field of view / 2). For example, based on a table width of 1.5m and a field of view of 60°, the minimum installation height of the camera H_min is calculated to be approximately 1.3m, thus ensuring that a single camera covers half of the table. The camera is loaded using a calibration tool to obtain a manually added virtual calibration frame. The virtual calibration frame is then compared with the calculated minimum and maximum installation heights of the camera, and a prompt is given indicating whether the virtual calibration frame is compliant. The system simulates and calculates the camera's installation angle, and prompts for adjustment when the deviation between the installation angle and the preset angle threshold exceeds the preset angle tolerance. For example, the preset angle tolerance can be set to ±5°; The calibration process also includes calculating the smallest pixel point as the pixel size; If the field of view is length x and width y, and the camera resolution is z×e, then the minimum pixel is ; It should be noted that a pixel coordinate system is established based on the pixel size for subsequent object height measurement; S13. Using the vertical direction between the vision device and the table of the laser cutting machine as a baseline, adjust the angle of the two light sources away from the baseline, and adjust the angle to a preset angle threshold. S14. Install a diffuse reflector around the light source; It should be noted that the diffuse reflector is wrapped around the infrared light source, forming an optical path structure of light source-diffuse reflector-table. It is about 5-10mm away from the light source to avoid direct contact that could cause overheating. The diffuse reflector converts point / line light sources into uniform surface light sources, avoiding local overexposure or shadows on the table. It also provides supplementary lighting through diffuse reflection to cover dark areas at the edge of the camera's field of view. S2. Calibrate the physical coordinates and image coordinates of the four corners of the laser cutting machine's table, and establish the mapping relationship between the physical coordinates and image coordinates; the specific steps of step S2 are as follows: S21. Place calibration targets at the four corners of the laser cutting machine table, determine the physical coordinates of the calibration targets, and take images of the laser cutting machine table using a camera; S22. Extract the image coordinates of the calibration target from the table image, and calculate the homography matrix H that maps the physical coordinates of the calibration target to the image coordinates;
[0037]
[0038] Where u and v represent the image coordinates of the calibration target, X and Y represent the physical coordinates of the calibration target, and w represents the normalization parameter used to correct image distortion caused by camera tilt. in, , , , This represents a linear transformation of the captured image of the tabletop, used for scaling and rotating the captured image. , This represents a translation operation on the tabletop image, used to move the image within a plane. , Used to control the perspective effects of an image during perspective transformations, such as image tilting and distortion. Normalization used in perspective transformations; S23. Calculate the length of the platform pixels in the image based on the image coordinates of the four calibration targets, and calculate the image ratio based on the length of the platform pixels and the actual length of the platform. S24. Select any point on the table of the laser cutting machine and determine its physical coordinates. Use the homography matrix to calculate the image coordinates and calculate the Euclidean distance between the calculated image coordinates of the selected point and the actual image coordinates of the selected point in the table image. If the calculated Euclidean distance is less than or equal to the preset pixel threshold, proceed to step S3; If the calculated Euclidean distance is greater than the preset pixel threshold, recalibration is triggered, and the process returns to step S21. S3. Capture images of the tabletop using two cameras. After preprocessing the two tabletop images, perform dense perspective transformation based on the mapping relationship between physical coordinates and image coordinates. Then, stitch the two tabletop images after the dense perspective transformation together, and finally perform obstacle recognition on the stitched image. The specific steps of step S3 are as follows: S31. Simultaneously capture tabletop images using two cameras, and perform image preprocessing on the two tabletop images respectively, including grayscale conversion, noise reduction, and edge enhancement; the specific steps of image preprocessing in step S31 are as follows: Convert the RGB format tabletop images captured by the two cameras to grayscale images using the following weighting method. :
[0039] in, Represents the grayscale value of the image, where R, G, and B are the red, green, and blue channel values of a pixel in an RGB format tabletop image, respectively. Use Gaussian filtering to remove noise from grayscale images:
[0040] in, Represents the pixel value at coordinates (x+i, y+j) in a grayscale image; This represents the grayscale value before filtering; represents the filtered grayscale value; a and b represent the radius parameters of the convolution kernel, controlling the filtering range; G(i,j) is the Gaussian weight function;
[0041] in, i ∈[− a , a ], j ∈[− b , b ]; It should be noted that if the kernel is symmetric, it can be simplified to a single parameter a, i.e., a = b; If the kernel is asymmetric, then a and b need to be set independently, that is, kernels with different widths and heights; Edge features of grayscale values in the filtered background image are extracted using the Sobel operator. The Sobel operator is used to calculate the horizontal and vertical gradients of the grayscale values of the filtered background image.
[0042] in, For horizontal gradient, This is to filter the grayscale values of the background image;
[0043] in, For vertical gradient, This is to filter the grayscale values of the background image; Calculate the gradient magnitude based on the horizontal and vertical gradients of the grayscale values in the filtered background image. This yields the gradient magnitude map;
[0044] in, For horizontal gradient, The vertical gradient; Edge enhancement is achieved by converting the gradient magnitude map into a black-and-white binary map through thresholding.
[0045] in, This is a preset gradient magnitude threshold; S32. Perform dense perspective transformation on the two preprocessed tabletop images using the homography matrix, thereby mapping the pixel coordinates of the tabletop images to the physical coordinates of the tabletop, and obtaining the perspective-transformed image; the specific steps of step S32 are as follows: S321. For the images captured by the two cameras, perform perspective transformation using the following homography matrices respectively;
[0046] in,( , (x, y) represents the image coordinates, and (x, y) are the physical coordinates; , , , This represents a linear transformation of the captured image of the tabletop, used for scaling and rotating the captured image. , This represents a translation operation on the tabletop image, used to move the image within a plane. , Used to control the perspective effects of an image during perspective transformations, such as image tilting and distortion. Normalization used in perspective transformations; S322. For each image captured by a camera, calculate the intermediate homogeneous coordinates using the homography matrix: ; S323. Calculate the normalized image coordinates based on the intermediate homogeneous coordinates: ; S33. Perform SIFT feature matching on the perspective-transformed images from the two cameras to determine the overlapping area. Then, use an image fusion algorithm to stitch the two perspective-transformed images together in the overlapping area to obtain the stitched tabletop image. The specific steps of step S33 are as follows: S331. Using the perspective-transformed images from the two cameras as reference images, mark the key points from the two reference images and construct descriptive features for each key point; Specifically, the key points are the points at the four corners or the intersection of the edges in the reference diagram. For example, the key points can be the screw points at the four corners of the table or the intersection of the calibration target. Specifically, using the perspective-transformed image as the baseline image, candidate key point regions are extracted from the two baseline images to generate a probability map; Perform the following operations for each candidate keypoint region: Extract the region contour and generate a binary mask; Multiplying the probability map by the binary mask yields the local probability distribution; Detecting local probability response peaks as precise key point locations; It should be noted that the local response peaks of the detection probability map are as follows: Within a 3×3 neighborhood, the probability value of the center point is strictly greater than that of all its neighbors, and low-response noise is suppressed. Construct SIFT descriptive features for the key points of localization: Calculate the gradient magnitude of pixels within the neighborhood of keypoints (e.g., a 16×16 window). and direction ;
[0047]
[0048] Generate a 36-bin orientation histogram and take the main peak value as the orientation of the key point; The neighborhood of the key point is rotated to the main direction and divided into 4×4 sub-regions. An 8-directional gradient histogram is calculated for each sub-region and then concatenated into a 128-dimensional vector as the descriptive feature. Then, the descriptive features are normalized to enhance illumination invariance; S332. Calculate the distance between the key points of one reference map and the descriptive features of key points in another reference map, until the distance calculation of the descriptive features of all key points is completed; S333. Locate a baseline map and find the nearest and second nearest neighbors of each key point in the located baseline map in another baseline map; It should be noted that the nearest neighbor is the key point with the smallest descriptive feature distance to the key point in the positioning reference map, and the second nearest neighbor is the key point with a descriptive feature distance smaller than the nearest neighbor but larger than the other key points; S334. Record the distance between each key point in the positioning reference map and its nearest neighbor as the minimum distance, and record the distance between each key point in the positioning reference map and its nearest neighbor as the secondary distance. S335. Determine whether the next distance is less than the minimum distance by a set ratio; If so, the key point and its nearest neighbor are considered to be matching points; If not, it is determined that the key point does not match the nearest neighbor point; For example, if D < 0.7 ⋅ Dmin, it is determined to be a valid match, where D represents the second distance and Dmin represents the minimum distance; S336. Determine the overlapping area and the width of the overlapping area based on the matching points in the two reference maps; Specifically, the overlapping region is obtained by intersecting the boundaries of the projected images of matching points in the two reference images, and the width of the overlapping region is determined. S337. The Laplacian pyramid algorithm is used to fuse the two reference images in the overlapping area to obtain a seamlessly stitched fused platform image; Specifically, Gaussian pyramids are constructed for the two baseline plots respectively: The original images of the two reference maps are respectively taken as the 0th layer, denoted as G0; Construct the Gaussian pyramid using the following formula:
[0049] in, For Gaussian kernel, standard deviation Core size 5×5; k Layer Image G k By examining the first k -1 layer image G k−1 Generates by Gaussian blur and downsampling; Repeat this process up to the Nth layer to form a Gaussian pyramid. Construct the Laplace pyramid based on two Gaussian pyramids: The high-frequency components of each layer in the Gaussian pyramid are preserved using the following formula:
[0050] Where UpSample is the bilinear interpolation upsampling function, after sampling... L k Including the k The layer's unique edge and texture information; High-frequency feature fusion of overlapping regions based on two Laplacian pyramids: Calculate the weights of two baseline graphs, one of which is labeled as Another label is ;
[0051]
[0052] Where W represents the width of the overlapping region; Perform high-frequency feature fusion layer by layer in the Laplace pyramid:
[0053] in, This represents the high-frequency features of a baseline graph at layer k. This represents the high-frequency features of another baseline plot at layer k. This represents the high-frequency features after fusion at the k-th layer; Performing Gaussian pyramid reconstruction yields the final stitched image of the platform: Construct the bottom layer N of the merged Gaussian pyramid:
[0054] Upsample and overlay details layer by layer, for the k-th layer; k =N−1,N−2,…,0:
[0055] Until output For the final seamlessly stitched countertop image; S34. Perform adaptive binarization segmentation on the stitched tabletop image, extract closed contours with an area greater than the pixel threshold, and calculate the closed contour features; the specific steps of step S34 are as follows: The adaptive binarization segmentation is calculated using the following formula on the stitched tabletop image:
[0056] in, Local threshold; Specifically, the local threshold is in pixels ( x , yCentered on , take a (2N+1)×(2N+1) neighborhood window; for example, N can be 15; Calculate the average gray value within the neighborhood window :
[0057] Set threshold Where C is a constant, for example, C can be 15; All closed contours are detected using 8-connected component analysis, and closed contours with an area smaller than the pixel threshold are filtered out. Calculate the contour features for the remaining closed contour; the contour features include area, aspect ratio, Hu moment, and coordinates of the center of the minimum circumscribed rectangle. It should be noted that during the image fusion process, transparent pixels in the foreground image need to be detected. If a transparent pixel is found, the operation on that pixel is skipped to avoid covering the effective pixels of the background image. S35. For each closed contour, use the OpenPose algorithm to identify human key points, and perform human pose recognition when a human body is identified. Closed contours where no human body is identified are marked as general obstacles, and the obstacle height is recorded. The specific steps of step S35 are as follows: For each closed contour, the OpenPose algorithm is applied within its minimum bounding rectangle region to detect 18 skeletal key points; A substance is considered a human body if it meets the following conditions: The following key skeletal points were examined: neck, left shoulder, right shoulder, left hip, and right hip. The confidence level of the detected skeletal keypoints is greater than the confidence threshold; The detected skeletal keypoints are converted into physical coordinates using a homography matrix to calculate the torso height; Posture classification based on torso height: If H ≥ 800 mm, it is determined to be a standing posture; If 500mm ≤ H < 800mm, it is determined to be a squatting posture; If the number of skeletal key points is insufficient or the confidence level is not met, it is judged as a general obstacle. The height of a typical obstacle is calculated using the following steps: The image of the closed contour region is processed by grayscale conversion and binarization. Extracting the vertical pixel span of the body ; actual height ,in The pixel size is in the vertical direction; S4. Determine whether to stop the laser cutting machine based on the obstacle recognition result; the specific steps of step S4 are as follows: S41. Obtain the result of closed contour recognition of the stitched image; If a human body is detected, proceed to step S44; If no human body is detected, but a common obstacle is detected, proceed to step S42; If no human body or ordinary obstacle is detected, proceed to step S44; S42. Determine whether the height of a common obstacle is less than the height of the lifting window of the laser cutting machine; If so, proceed to step S43; If not, proceed to step S44; S43. Determine if the table movement of the laser cutting machine is permitted, then terminate; S44. Determine to stop the laser cutting machine, prohibit table movement, and end.
[0058] In one embodiment of the present invention, based on human posture recognition, unlike the embodiments described above, The tabletop image is pre-divided into safe and dangerous areas; In step S41, If a human body is detected, but the human body is in a standing posture, proceed to step S44; If a human body is detected, but the human body is in a squatting or sitting posture, proceed to step S45; S45. Determine the area where the human body is located; If it is a dangerous area, proceed to step S44; If it is a safe area, proceed to step S46; S46. Determine that the laser cutting machine is operating at reduced speed.
[0059] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0060] like Figure 3 As shown, the following are embodiments of the tabletop safety anti-collision system for laser cutting machines provided in this disclosure. This system and the tabletop safety anti-collision methods for laser cutting machines in the above embodiments belong to the same inventive concept. For details not described in detail in the embodiments of the tabletop safety anti-collision system for laser cutting machines, please refer to the embodiments of the tabletop safety anti-collision methods for laser cutting machines described above.
[0061] The system includes: A vision device safety module is used to install a vision device on each side of the laser cutting machine table in the direction of movement, and to adjust the height and angle of the vision device to cover the entire surface of the laser cutting machine table; the vision device includes a camera and a light source. The coordinate mapping relationship construction module is used to calibrate the physical coordinates and image coordinates of the four corners of the laser cutting machine table and establish the mapping relationship between the physical coordinates and image coordinates. The image processing and element recognition module is used to capture tabletop images through two cameras, perform image preprocessing on the two tabletop images, perform dense perspective transformation according to the mapping relationship between physical coordinates and image coordinates, perform image stitching on the two tabletop images after dense perspective transformation, and then perform element recognition on the stitched image. The motion interference judgment module is used to determine whether to stop the laser cutting machine based on the element recognition results.
[0062] This embodiment effectively avoids collisions during the operation of the laser cutting machine table by coordinating the vision device safety module, coordinate mapping relationship construction module, image processing and element recognition module, and motion interference judgment module, thus ensuring safety and improving efficiency.
[0063] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for preventing collisions on the table of a laser cutting machine, characterized in that, Includes the following steps: S1. A vision device is installed on each side of the laser cutting machine table in the direction of movement. The height and angle of the vision device are adjusted to cover the entire surface of the laser cutting machine table. The vision device includes a camera and a light source. S2. Calibrate the physical coordinates and image coordinates of the four corners of the laser cutting machine table, and establish the mapping relationship between the physical coordinates and the image coordinates; S3. Capture tabletop images using two cameras, perform image preprocessing on the two tabletop images, execute dense perspective transformation based on the mapping relationship between physical coordinates and image coordinates, then stitch the two tabletop images after dense perspective transformation, and finally perform obstacle recognition on the stitched image. The specific steps of step S3 are as follows: S31. Simultaneously capture tabletop images using two cameras, and perform image preprocessing on the two tabletop images, including grayscale conversion, noise reduction, and edge enhancement respectively; S32. Perform dense perspective transformation on the two preprocessed tabletop images using the homography matrix, thereby mapping the pixel coordinates of the tabletop images to the physical coordinates of the tabletop, and obtaining the perspective-transformed images. S33. Use SIFT to perform feature matching on the perspective-transformed images from the two cameras to determine the overlapping area, and then use an image fusion algorithm to perform image stitching on the two perspective-transformed images in the overlapping area to obtain the stitched tabletop image. S34. Perform adaptive binarization segmentation on the stitched tabletop image, extract closed contours with an area greater than the pixel threshold, and calculate the closed contour features; S35. Use the OpenPose algorithm to identify human key points for each closed contour, and perform human pose recognition when a human body is identified. Closed contours where no human body is identified are marked as general obstacles, and the height of the obstacles is recorded. S4. Determine whether to stop the laser cutting machine based on the obstacle recognition results; The specific steps of step S4 are as follows: S41. Obtain the result of closed contour recognition of the stitched image; If a human body is detected, proceed to step S44; If no human body is detected, but a common obstacle is detected, proceed to step S42; If no human body or ordinary obstacle is detected, proceed to step S44; S42. Determine whether the height of a common obstacle is less than the height of the lifting window of the laser cutting machine; If so, proceed to step S43; If not, proceed to step S44; S43. Determine if the table movement of the laser cutting machine is permitted, then terminate; S44. Determine to stop the laser cutting machine, prohibit table movement, and end.
2. The method for preventing collisions on the table of a laser cutting machine according to claim 1, characterized in that, The specific steps of step S1 are as follows: S11. Based on the movement direction of the laser cutting machine table, a vision device is set on the sheet metal of the laser cutting machine on both sides; each vision device has a camera and two light sources; S12. Adjust the height and angle of the camera of each vision device according to the pre-calibrated installation range so that the table of the laser cutting machine is within the field of view of the two cameras; S13. Using the vertical direction between the vision device and the table of the laser cutting machine as a baseline, adjust the angle of the two light sources away from the baseline, and adjust the angle to a preset angle threshold. S14. Install a diffuser around the light source.
3. The method for preventing collisions on the table of a laser cutting machine according to claim 2, characterized in that, The installation range is calibrated in step S12 as follows: Obtain the table size of the laser cutting machine, the camera parameters, and the installable area of the sheet metal of the laser cutting machine as input parameters; The minimum installation height, maximum installation height, and installation angle of the camera are calculated using the input parameters. The camera is loaded using a calibration tool to obtain a manually added virtual calibration frame. The virtual calibration frame is then compared with the calculated minimum and maximum installation heights of the camera, and a prompt is given indicating whether the virtual calibration frame is compliant. The system simulates and calculates the camera's installation angle, and prompts for adjustment when the deviation between the installation angle and the preset angle threshold exceeds the preset angle tolerance. The calibration process also includes calculating the smallest pixel as the cell size; If the field of view is length x and width y, and the camera resolution is z×e, then the minimum pixel is .
4. The method for preventing collisions on the table of a laser cutting machine according to claim 1, characterized in that, The specific steps of step S2 are as follows: S21. Place calibration targets at the four corners of the laser cutting machine table, determine the physical coordinates of the calibration targets, and take images of the laser cutting machine table using a camera; S22. Extract the image coordinates of the calibration target from the table image, and calculate the homography matrix H that maps the physical coordinates of the calibration target to the image coordinates; Where u and v represent the image coordinates of the calibration target, X and Y represent the physical coordinates of the calibration target, and w represents the normalization parameter used to correct image distortion caused by camera tilt. in, , , , This represents a linear transformation of the captured image of the tabletop, used for scaling and rotating the captured image. , This represents a translation operation on the tabletop image, used to move the image within a plane. , Used to control the perspective effect of an image during perspective transformation. Normalization used in perspective transformations; S23. Calculate the length of the platform pixels in the image based on the image coordinates of the four calibration targets, and calculate the image ratio based on the length of the platform pixels and the actual length of the platform. S24. Select any point on the table of the laser cutting machine and determine its physical coordinates. Use the homography matrix to calculate the image coordinates and calculate the Euclidean distance between the calculated image coordinates of the selected point and the actual image coordinates of the selected point in the table image. If the calculated Euclidean distance is less than or equal to the preset pixel threshold, proceed to step S3; If the calculated Euclidean distance is greater than the preset pixel threshold, recalibration is triggered, and the process returns to step S21.
5. The method for preventing collisions on the table of a laser cutting machine according to claim 4, characterized in that, The specific steps of image preprocessing in step S31 are as follows: Convert the RGB format tabletop images captured by the two cameras to grayscale images using the following weighting method. : in, Represents the grayscale value of the image, where R, G, and B are the red, green, and blue channel values of a pixel in an RGB format image, respectively. Use Gaussian filtering to remove noise from grayscale images: in, Represents the pixel value at coordinates (x+i, y+j) in a grayscale image; This represents the grayscale value before filtering; represents the filtered grayscale value; a and b represent the radius parameters of the convolution kernel, controlling the filtering range; G(i,j) is the Gaussian weight function; in, i ∈[ a , a ], j ∈[ b , b ]; Edge features of grayscale values in the filtered background image are extracted using the Sobel operator. The Sobel operator is used to calculate the horizontal and vertical gradients of the grayscale values of the filtered background image. The gradient magnitude is calculated based on the horizontal and vertical gradients of the grayscale values of the filtered background image, resulting in a gradient magnitude map. Edge enhancement is achieved by converting the gradient magnitude map into a black-and-white binary map through thresholding. in, This is a preset gradient magnitude threshold; The specific steps of step S32 are as follows: S321. For the images captured by the two cameras, perform perspective transformation using the following homography matrices respectively; in,( , (x, y) represents the image coordinates, and (x, y) are the physical coordinates; , , , This represents a linear transformation of the captured image of the tabletop, used for scaling and rotating the captured image. , This represents a translation operation on the tabletop image, used to move the image within a plane. , Used to control the perspective effect of an image during perspective transformation. Normalization used in perspective transformations; S322. For each image captured by a camera, calculate the intermediate homogeneous coordinates using the homography matrix: ; S323. Calculate the normalized image coordinates based on the intermediate homogeneous coordinates: 。 6. The method for preventing collisions on the table of a laser cutting machine according to claim 4, characterized in that, The specific steps of step S33 are as follows: S331. Using the perspective-transformed images from the two cameras as reference images, mark the key points from the two reference images and construct descriptive features for each key point; S332. Calculate the distance between the key points of one reference map and the descriptive features of key points in another reference map, until the distance calculation of the descriptive features of all key points is completed; S333. Locate a baseline map and find the nearest and second nearest neighbors of each key point in the located baseline map in another baseline map; S334. Record the distance between each key point in the positioning reference map and its nearest neighbor as the minimum distance, and record the distance between each key point in the positioning reference map and its second nearest neighbor as the secondary distance; S335. Determine whether the next distance is less than the minimum distance by a set ratio; If so, the key point and its nearest neighbor are considered to be matching points; If not, it is determined that the key point does not match the nearest neighbor point; S336. Determine the overlapping area and the width of the overlapping area based on the matching points in the two reference maps; S337. The Laplacian pyramid algorithm is used to fuse the two reference images in the overlapping area to obtain a seamlessly stitched fused platform image.
7. The method for preventing collisions on the table of a laser cutting machine according to claim 4, characterized in that, The specific steps of step S34 are as follows: The adaptive binarization segmentation is calculated using the following formula on the stitched tabletop image: in, Local threshold; Specifically, the local threshold is in pixels ( x , y Centered on , take a neighborhood window of (2N+1) × (2N+1) . Calculate the average gray value within the neighborhood window : Set threshold Where C is a constant. All closed contours are detected using connected component analysis, and closed contours with an area smaller than the pixel threshold are filtered out. Calculate the contour features for the remaining closed contour; the contour features include area, aspect ratio, Hu moment, and coordinates of the center of the minimum circumscribed rectangle. The specific steps of step S35 are as follows: For each closed contour, the OpenPose algorithm is applied to detect skeletal key points within its minimum bounding rectangle region; A substance is considered a human body if it meets the following conditions: The following key skeletal points were examined: neck, left shoulder, right shoulder, left hip, and right hip. The confidence level of the detected skeletal keypoints is greater than the confidence threshold; The detected skeletal keypoints are converted into physical coordinates using a homography matrix to calculate the torso height; Posture classification based on torso height; If the number of skeletal key points is insufficient or the confidence level is not met, it is judged as a general obstacle. The height of a typical obstacle is calculated using the following steps: The image of the closed contour region is processed by grayscale conversion and binarization. Extracting the vertical pixel span of the body ; actual height ,in This refers to the pixel size in the vertical direction.
8. A tabletop safety anti-collision system for a laser cutting machine, comprising the method described in any one of claims 1-7, characterized in that, include: A vision device safety module is used to install a vision device on each side of the laser cutting machine table in the direction of movement, and to adjust the height and angle of the vision device to cover the entire surface of the laser cutting machine table; the vision device includes a camera and a light source. The coordinate mapping relationship construction module is used to calibrate the physical coordinates and image coordinates of the four corners of the laser cutting machine table and establish the mapping relationship between the physical coordinates and image coordinates. The image processing and element recognition module is used to capture tabletop images through two cameras, perform image preprocessing on the two tabletop images, perform dense perspective transformation according to the mapping relationship between physical coordinates and image coordinates, perform image stitching on the two tabletop images after dense perspective transformation, and then perform element recognition on the stitched image. The motion interference judgment module is used to determine whether to stop the laser cutting machine based on the element recognition results.
Citation Information
Patent Citations
Method for measuring distance from and height of ship with binocular vision systems
CN107884767A
Structured-light-based laser cutting head anticollision early warning system and method
CN109702321A