A method for reinforcing bar surface binding point identification and positioning based on point cloud and pixel mapping
Patent Information
- Application Number
- CN202511313743.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-15
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2045-09-15
AI Technical Summary
[0003]目前,传统基于自然像素的钢筋绑扎点识别方法主要依赖可见光图像的边缘检测和霍夫变换进行直线提取,虽然算法成熟,但存在对环境光敏感、深度信息缺失等固有缺陷,导致在复杂施工场景下易受光照条件、钢筋模板面背景的影响
针对实际钢筋绑扎作业环境下钢筋面距离模板面标准距离小于固定偏移值(1.5cm)以及光照条件随机等情况,本发明以工业级相机的点云成像数据作为驱动,预处理利用统计滤波和RANSAC算法粗略分离模板面点云,再结合三维点云与像素之间的映射关系获取赋有物理坐标属性的自定义三通道编码图像,通过深度图像分离和深度阈值再过滤,以及归一化后得到相对于常规灰度处理后更加干净的二值化图,结合霍夫直线变换与平行角度容差阈值约束,鲁棒地识别钢筋直线并滤除干扰线,最后参数化计算出像素坐标交点后利用DBSCAN聚类精准定位钢筋交叉点,显著提升了钢筋绑扎点识别定位的鲁棒性及精度,为复杂施工场景下的钢筋绑扎点定位提供了高效可靠的解决方案。该方法摒弃以可见光图像作为处理对象,极大减弱了复杂施工环境下对钢筋绑扎点识别定位的影响。
Smart Images

Figure CN121353897B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent construction technology, and in particular to a method for identifying and locating rebar tying points based on point cloud and pixel mapping. Background Technology
[0002] In modern civil engineering, reinforced concrete structures are the most widely used structural form. As the skeleton of the structure, the quality of the rebar tying joints directly affects the overall integrity, stability, and safety of the structure. Therefore, quality inspection (e.g., checking for missing or loose rebar ties) and quantity statistics of rebar tying points are crucial steps in the construction process. Traditional manual inspection methods are inefficient, subjective, prone to omissions, and pose safety hazards in high-altitude and densely populated work environments. Therefore, automated and intelligent rebar tying point recognition technology based on computer vision has become a hot research topic and an inevitable trend in the industry.
[0003] Currently, traditional rebar tying point recognition methods based on natural pixels mainly rely on edge detection and Hough transform in visible light images for line extraction. Although the algorithms are mature, they have inherent defects such as sensitivity to ambient light and lack of depth information, making them susceptible to the influence of lighting conditions and the background of the rebar formwork surface in complex construction scenarios. Secondly, under current construction standards, the distance between the rebar surface and the formwork surface is generally no more than 1.5 cm. This makes traditional methods highly susceptible to the influence of the formwork surface background when processing rebar surface images, resulting in insufficient 3D spatial positioning accuracy.
[0004] In summary, existing methods for identifying rebar tying points based on visible light two-dimensional imaging suffer from drawbacks due to their inherent technical limitations. These include poor resistance to interference from changes in lighting conditions, recognition confusion caused by missing depth information, and insufficient accuracy in three-dimensional spatial positioning. Therefore, there is an urgent need for a new technological solution that overcomes these shortcomings, is unaffected by lighting conditions, and can directly acquire rich three-dimensional spatial information, thereby achieving highly robust and accurate identification and positioning of rebar tying points in complex environments. Summary of the Invention
[0005] In view of this, the purpose of this invention is to propose a method for identifying and locating rebar tying points based on point cloud and pixel mapping. By creating a relationship between point cloud imaging and pixel mapping driven by an industrial-grade camera point cloud data source, and combining a highly efficient technical link for two-dimensional image domain processing, the method preserves the depth information of the target and leverages the efficiency of two-dimensional image processing through the collaborative processing of high-precision point cloud and image, thus ensuring the speed and accuracy of rebar tying point identification and location results.
[0006] To achieve the above-mentioned technical objectives, the technical solution adopted by this invention is as follows: This invention provides a method for identifying and locating rebar tying points based on point cloud and pixel mapping, comprising the following steps: Step 1: Obtain the original 3D point cloud data and remove outliers to obtain the denoised point cloud; Step 2: Perform planar fitting on the denoised point cloud, identify and remove the point cloud of the template surface, and obtain the point cloud of the rebar surface; Step 3: Based on the mapping relationship between point cloud and pixels, map the spatial physical coordinate attributes of the point cloud of the steel reinforcement surface into a custom three-channel coded image; Step 4: Separate the three-channel coded image into three single-channel images: length image, width image, and depth image; Step 5: Process the depth image to extract the initial set of straight rebar lines; Step 6: Select a set of parallel steel bar lines from the initial set of steel bar lines based on the set reference direction and parallel angle tolerance threshold; Step 7: Calculate the pixel coordinates of candidate binding points by the intersection of the lines in the set of parallel steel bars. After clustering to determine the pixel position of the representative binding point, query the coordinate information of the three single-channel images and output the three-dimensional spatial coordinates of the steel bar binding point.
[0007] Furthermore, step 1 specifically includes: Step 11: Acquire raw 3D point cloud data collected by an industrial camera; Step 12: Use statistical filtering algorithms to remove outliers and noise from the original 3D point cloud data; details are as follows: Step 121: For each point in the original 3D point cloud data Calculate all neighboring points of a point within a sphere of a given radius r. distance set ; Step 122: Calculate the distance set. average and standard deviation ; Step 123: Set the distance tolerance interval as follows ; Step 124: Calculate each point average neighborhood distance ; Step 125: Traverse all points in the original 3D point cloud data. If points... average neighborhood distance If a point is located outside the tolerance range, it is considered an outlier and removed; if a point average neighborhood distance If the point cloud is within the tolerance range of this distance, it is preserved, resulting in a denoised point cloud.
[0008] Furthermore, step 2 specifically includes: Step 21: Using the denoised point cloud as input, preset the number of iterations N and the inlier distance threshold. and the minimum sample size n; Step 22: In each iteration, the RANSAC algorithm is used to randomly select m non-collinear points to fit the template plane model, and the distance from all points in the denoised point cloud to the template plane model is calculated. Points with a distance less than or equal to... The point is denoted as an interior point; Step 23: After the iteration is complete, calculate the distance from the points in the denoised point cloud that satisfy the condition to the template plane model. The template plane model with the most interior points is selected as the optimal background plane model based on the number of interior points. Step 24: Extract all that meet the requirements The inner points form the template surface point cloud and are removed, while the remaining outer points are retained as the rebar surface point cloud.
[0009] Furthermore, step 3 specifically includes: Step 31: Using the camera intrinsic parameter matrix, project each 3D point (X,Y,Z) of the steel reinforcement surface point cloud in the camera coordinate system onto the 2D pixel plane to obtain its corresponding projected pixel coordinates (u, v). The camera intrinsic parameter matrix is as follows:
[0010] in, , represents the focal length of the camera on the x-axis of the image. This represents the camera's focal length on the y-axis of the image. This represents the distortion coefficient of the x-axis. This represents the distortion coefficient of the y-axis; The formula for calculating the perspective projection is:
[0011]
[0012] Step 32: Create a three-channel blank image I0, whose width W and height H are determined by the boundaries of the projected pixel coordinates; Step 33: Traverse all points of the steel reinforcement surface point cloud, and assign the X, Y and Z coordinate values of each three-dimensional point to the R, G and B channels of the corresponding projected pixel coordinates (u, v) in the blank image I0, respectively, to generate a three-channel coded image I0' that integrates physical space coordinate information.
[0013] Furthermore, step 4 specifically involves: The three-channel encoded image I0' is separated into three independent single-channel images: a length image I1 containing only X coordinate values, a width image I2 containing only Y coordinate values, and a depth image I3 containing only Z coordinate values.
[0014] Furthermore, step 5 specifically includes: Step 51: Set the region of interest and perform secondary filtering on the depth image I3 based on the depth threshold to separate the rebar surface and the formwork surface, thereby obtaining an optimized depth image; Step 52: After normalizing the optimized depth image, a binarized image is obtained. The pixels of the binarized image are divided into nine grids to obtain nine equal pixel regions. Then, morphological closing operations are performed on each pixel region in the grid to connect the steel reinforcement regions of neighboring pixels. Step 53: Use the Zhang-Suen skeleton extraction algorithm to refine the pixels of each rebar area sequentially to obtain a single-pixel-width skeleton image of each rebar area. Step 54: Use Hough line transform to detect line segments in the single-pixel-width skeleton image within each rebar region to obtain the initial set of rebar line segments for each pixel region in the nine-grid.
[0015] Furthermore, step 51 specifically includes: Step 511: In the extracted depth image Above, the region of interest above the rebar surface is fixed to exclude the binding ends and other components within the camera's field of view, resulting in a depth image of the region of interest containing only the rebar surface data. ; Step 512: Traverse the depth image within the region of interest. Among all depth values, find the maximum depth value Z_max, and set the depth threshold h to Z_max minus a fixed offset value, which is set according to the standard distance between the rebar surface and the formwork surface; Step 513: Transfer the depth image medium depth value Filter the pixel region with a depth threshold h to obtain the depth image. medium depth value The pixel regions with a depth threshold h are preserved to obtain the depth image. .
[0016] Furthermore, step 54 specifically includes: Step 541: Set the angle step size Δθ1 and the accumulator threshold T; Step 542: Calculate and count the accumulator array A(ρ,θ) in Hough space with the angle step size Δθ1 as the interval; Step 543: Detect all points in the accumulator array A(ρ, θ) that are greater than the accumulator threshold T as peak points. ; Step 544: For each detected peak point... Map back to image space to generate the corresponding straight line. All generated lines constitute the initial set of lines. , where each straight line By parameter pair The only certainty, This represents the i-th line. Indicates the distance from the origin to the line. vertical distance, Indicates the distance from the origin to the line. The angle between the perpendicular line and the positive x-axis. A point in Hough space uniquely corresponds to a straight line in image space.
[0017] Furthermore, step 6 specifically includes: Step 61: Set the reference direction and parallel angle tolerance threshold for the reinforcing bar axis. ; Step 62: Calculate the initial set of straight reinforcement bars. Each straight line in Angular deviation from the reference direction ; Step 62, if > If, then the corresponding line is removed. ≤ Then retain the corresponding straight line and output the set of parallel rebar straight lines. .
[0018] Furthermore, step 7 specifically includes: Step 71: Calculate the set of parallel rebar lines by parameterizing the linear equations of the parallel rebar segments using the pixel coordinates of the line segment endpoints. The pixel coordinates of the intersection points between all pairs of non-parallel line segments are obtained to form a candidate binding point set. ; Step 72: Use the DBSCAN clustering algorithm to analyze the candidate tying point set. Clustering is performed, and core points are identified by setting the neighborhood radius ε and the minimum number of points MinPts. All pixels with the cluster density connected to the core points are aggregated to form pixel clusters. Noise points are removed and the coordinates of the center pixel of each cluster are calculated. Step 73: Using the center pixel coordinates as an index, read the corresponding X_point value in the length image I1, read the Y_point value in the width image I2, and read the Z_point value in the width image I3. Output the three-dimensional coordinates (X_point, Y_point, Z_point) as the position coordinates of the rebar binding point in three-dimensional space.
[0019] By adopting the above technical solution, the present invention has the following beneficial effects compared with the prior art: To address the challenges of real-world rebar tying operations, such as the standard distance between the rebar surface and the formwork surface being less than a fixed offset (1.5cm) and random lighting conditions, this invention utilizes point cloud imaging data from an industrial-grade camera. Preprocessing involves statistical filtering and the RANSAC algorithm to roughly separate the formwork surface point cloud. Then, combining the mapping relationship between the 3D point cloud and pixels, a custom three-channel encoded image with physical coordinate attributes is obtained. Through depth image separation and depth thresholding, followed by normalization, a cleaner binarized image is obtained compared to conventional grayscale processing. By incorporating Hough line transform and parallel angle tolerance threshold constraints, straight lines of the rebar are robustly identified and interference lines are filtered out. Finally, after parameterizing the pixel coordinate intersection points, DBSCAN clustering is used to accurately locate the rebar intersection points. This significantly improves the robustness and accuracy of rebar tying point identification and positioning, providing an efficient and reliable solution for rebar tying point positioning in complex construction scenarios. This method avoids using visible light images as the processing object, greatly reducing the impact of complex construction environments on rebar tying point identification and positioning. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is an execution flowchart of a method for identifying and locating rebar tying points based on point cloud and pixel mapping provided in an embodiment of the present invention.
[0022] Figure 2 This is a comparison diagram of the pretreatment results of the reinforcing steel surface between the present invention and the traditional method.
[0023] Figure 3 This is a comparison chart of the results of linear fitting of the reinforcing bar surface by the present invention and the traditional method.
[0024] Figure 4 This is a comparison diagram of the results of the present invention and the traditional method in terms of rebar surface treatment and tying point identification and positioning. Detailed Implementation
[0025] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be particularly noted that the following embodiments are for illustrative purposes only and do not limit the scope of the invention. Similarly, the following embodiments are only some, not all, embodiments of the present invention, and all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0026] The core technical path of this invention is reflected in the following processing steps: Introducing a physical spatial point cloud-driven mechanism to replace traditional grayscale image analysis: Using 3D imaging point cloud data from an industrial-grade camera combined with the RANSAC algorithm, a preliminary template planar model is fitted, separating the external points as the rebar surface; Constructing a spatial coding method coupled with optical appearance: The physical coordinates (X,Y,Z) of the point cloud are directly bound to a custom three-channel coded image. Subsequent rebar detection relies entirely on the depth image and geometric constraints obtained from channel separation, from skeleton refinement and Hough line detection to parallel angle constraint filtering, eliminating the influence of factors such as ambient lighting conditions, template cracks, and missing depth information; Establishing a dual-threshold constraint mechanism: Pre-filtering dynamically removes outliers in the radius neighborhood, eliminating interference factors such as welding slag / dust, and then uses a second depth threshold to filter residual template surface points. This dual-barrier approach ensures a clean rebar surface point cloud, guaranteeing sufficient stability of the rebar grayscale image after channel separation and depth image normalization. The essence of this process lies in reconstructing the basis for rebar straight-line recognition and fitting from fragile optical appearance features to a relationship driven by point cloud data sources for point cloud imaging and pixel mapping. This preserves the spatial accuracy of depth information while leveraging the efficiency of 2D image processing, achieving a high degree of coupling between the stable recognition and positioning of rebar tying points. This ensures that rebar tying on the formwork surface during actual construction operations is no longer affected by factors such as ambient lighting conditions, formwork cracks, and missing depth information. Especially in typical construction site scenarios where traditional visible light methods struggle, such as low light, rebar corrosion, and partial occlusion, this method maintains stable and rapid recognition performance, providing a more reliable technical solution for construction automation. This innovative approach, deeply integrating point cloud geometric features with image processing technology, provides a new technological paradigm for rebar tying and positioning in construction robots.
[0027] Please see Figures 1-4 The present invention provides a method for identifying and locating rebar tying points based on point cloud and pixel mapping, comprising the following steps: Step 1: Obtain the original 3D point cloud data and remove outliers to obtain the denoised point cloud; The raw 3D point cloud data undergoes initial cleaning to remove discrete noise points caused by sensor noise, airborne dust, welding slag, etc. These points are unrelated to the actual template or rebar surface structure and will interfere with subsequent planar fitting and feature extraction. This step provides a "clean" initial point cloud data for subsequent processing and is the first barrier to ensure the stability of the entire process.
[0028] In this embodiment, step 1 specifically includes: Step 11: Acquire raw 3D point cloud data collected by an industrial camera; Step 12: Use statistical filtering algorithms to remove outliers and noise from the original 3D point cloud data; details are as follows: Step 121: For each point in the original 3D point cloud data Calculate all neighboring points of a point within a sphere of a given radius r. distance set ; Step 122: Calculate the distance set. average and standard deviation ; Step 123: Set the distance tolerance interval as follows ; Step 124: Calculate each point average neighborhood distance ; Step 125: Traverse all points in the original 3D point cloud data. If points... average neighborhood distance If a point is located outside the tolerance range, it is considered an outlier and removed; if a point average neighborhood distance If the point cloud is within the tolerance range of this distance, it is preserved, resulting in a denoised point cloud.
[0029] Step 2: Perform planar fitting on the denoised point cloud, identify and remove the point cloud of the template surface, and obtain the point cloud of the rebar surface; The point cloud is segmented into two main categories: "template surface" and "reinforcement surface". Leveraging the robustness of the RANSAC algorithm, the largest plane (i.e., the template surface) is fitted from the point cloud, and all points not belonging to this plane (outside points) are extracted. These outside points mainly contain reinforcement surfaces and may also contain some residual noise. This step achieves the initial separation of the reinforcement target from the background template and is a core preprocessing step.
[0030] In this embodiment, step 2 specifically includes: Step 21: Using the denoised point cloud as input, preset the number of iterations N and the inlier distance threshold. and the minimum number of samples n; where the number of iterations N and the interior point distance threshold are... The specific value of the minimum sample size n can be set by the user according to their needs; Step 22: In each iteration, the RANSAC (Random Sample Consensus) algorithm is used to randomly select m (the specific value of m can be set according to the user's needs) non-collinear points to fit the template plane model, and the distance from all points in the denoised point cloud to the template plane model is calculated. Points with a distance less than or equal to... The point is denoted as an interior point; Step 23: After the iteration is complete, calculate the distance from the points in the denoised point cloud that satisfy the condition to the template plane model. The template plane model with the most interior points is selected as the optimal background plane model based on the number of interior points. Step 24: Extract all that meet the requirements The inner points form the template surface point cloud and are removed, while the remaining outer points are retained as the rebar surface point cloud.
[0031] Step 3: Based on the mapping relationship between point cloud and pixels, map the spatial physical coordinate attributes of the point cloud of the steel reinforcement surface into a custom three-channel coded image; A "bridge" is built between 3D point clouds and 2D images. The physical coordinates (X, Y, Z) of the 3D steel point cloud are projected onto a 2D pixel plane through a camera model and cleverly encoded into the three channels of a color image. This creates a special image that preserves absolute physical coordinate information. The aim is to allow subsequent processing to be performed in an efficient image domain without losing any 3D spatial information, laying the foundation for directly recovering 3D coordinates from the image.
[0032] In this embodiment, step 3 specifically includes: Step 31: Using the camera intrinsic parameter matrix, project each 3D point (X,Y,Z) of the steel reinforcement surface point cloud in the camera coordinate system onto the 2D pixel plane to obtain its corresponding projected pixel coordinates (u, v). The camera intrinsic parameter matrix is as follows:
[0033] in, , represents the focal length of the camera on the x-axis of the image. This represents the camera's focal length on the y-axis of the image. This represents the distortion coefficient of the x-axis. This represents the distortion coefficient of the y-axis; The formula for calculating the perspective projection is:
[0034]
[0035] Step 32: Create a three-channel blank image I0, whose width W and height H are determined by the boundaries of the projected pixel coordinates; Step 33: Traverse all points of the steel reinforcement surface point cloud, and assign the X, Y and Z coordinate values of each three-dimensional point to the R (red), G (green) and B (blue) channels of the corresponding projected pixel coordinates (u, v) in the blank image I0, respectively, to generate a three-channel coded image I0' that integrates physical space coordinate information.
[0036] Step 4: Separate the three-channel coded image into three single-channel images: length image, width image, and depth image; Decoupling 3D Information: The fused 3D information is separated into three single-channel grayscale images, representing the X, Y, and Z coordinates (depth map), respectively. This allows for independent processing of different information. The depth map (Z coordinate) will be the primary basis for subsequent rebar identification, as it directly reflects the height of the rebar relative to the camera and is the best way to distinguish rebar from formwork.
[0037] In this embodiment, step 4 specifically includes: The three-channel encoded image I0' is separated into three independent single-channel images: a length image I1 containing only X coordinate values, a width image I2 containing only Y coordinate values, and a depth image I3 containing only Z coordinate values.
[0038] Step 5: Process the depth image to extract the initial set of straight rebar lines; Extracting straight lines representing rebar from the depth map. Setting the region of interest: Eliminating interference from non-rebar areas (such as vertical binding wires) within the field of view reduces computation and improves accuracy. Depth thresholding: Utilizing the prior knowledge that "rebar surface is higher than template surface" (1.5cm), a second fine separation is performed to remove template surface points that may not have been completely removed in the first and second steps, obtaining a pure rebar surface point cloud projection onto the image. Morphological operations and skeleton extraction: Connecting potentially broken rebar areas and refining the rebar width to a single pixel provides perfect input for Hough line detection, greatly improving the accuracy and robustness of line detection. Hough line transform: Detecting line segments from the skeleton map, thus accurately representing each rebar using a mathematical model (ρ,θ).
[0039] In this embodiment, step 5 specifically includes: Step 51: Set the region of interest (ROI) and perform secondary filtering on the depth image I3 based on the depth threshold to separate the rebar surface and the formwork surface, thereby obtaining an optimized depth image; Preferably, step 51 specifically includes: Step 511: In the extracted depth image Above, the region of interest above the rebar surface is fixed to exclude the binding ends and other components within the camera's field of view, resulting in a depth image of the region of interest containing only the rebar surface data. ; Step 512: Traverse the depth image within the region of interest. Among all depth values, find the maximum depth value Z_max, and set the depth threshold h to Z_max minus a fixed offset value. The offset value is set according to the standard distance between the rebar surface and the formwork surface, which is 1.5cm in this embodiment. Step 513: Transfer the depth image medium depth value Filter the pixel region with a depth threshold h to obtain the depth image. medium depth value The pixel regions with a depth threshold h are preserved to obtain the depth image. .
[0040] Step 52: After normalizing the optimized depth image (normalizing the effective depth value to the range of [0,255]), a binarized image is obtained. The pixels of the binarized image are divided into nine grids to obtain nine equal pixel regions. Then, morphological closing operations (dilation followed by erosion) are performed on each pixel region in the grid to connect the steel reinforcement regions of neighboring pixels. Step 53: Use the Zhang-Suen skeleton extraction algorithm to refine the pixels of each rebar region sequentially to obtain a single-pixel-width skeleton image for each rebar region; Definition of single-pixel width: In a two-dimensional digital image composed of pixels, "single-pixel width" means that at any point on this skeleton line, in its immediate vicinity (usually by checking its "8-neighborhood"), at any given time, there are at most two adjacent skeleton pixels in the horizontal, vertical, or diagonal directions.
[0041] Step 54: Use Hough line transform to detect line segments in the single-pixel-width skeleton image within each rebar region to obtain the initial set of rebar line segments for each pixel region in the nine-grid.
[0042] Preferably, step 54 specifically includes: Step 541: Set the angle step size Δθ1 and the accumulator threshold T; Step 542: Calculate and count the accumulator array A(ρ,θ) in Hough space with the angle step size Δθ1 as the interval; Step 543: Detect all points in the accumulator array A(ρ, θ) that are greater than the accumulator threshold T as peak points. ; Step 544: For each detected peak point... Map back to image space to generate the corresponding straight line. All generated lines constitute the initial set of lines. , where each straight line By parameter pair The only certainty, This represents the i-th line. Indicates the distance from the origin to the line. vertical distance, Indicates the distance from the origin to the line. The angle between the perpendicular line and the positive x-axis. A point in Hough space uniquely corresponds to a straight line in image space.
[0043] Step 6: Select a set of parallel steel bar lines from the initial set of steel bar lines based on the set reference direction and parallel angle tolerance threshold; The detected straight lines are logically filtered. Based on the prior knowledge that the rebar binding mesh is usually composed of two sets of parallel lines, incorrectly detected line segments that do not conform to the parallel direction (which may be straight lines formed by noise, formwork joints, or other interfering structures) are eliminated. This step further refines the straight line detection results, ensuring that only true rebar straight lines are retained.
[0044] In this embodiment, step 6 specifically includes: Step 61: Set the reference direction and parallel angle tolerance threshold for the reinforcing bar axis. ; Step 62: Calculate the initial set of straight reinforcement bars. Each straight line in Angular deviation from the reference direction ; Step 62, if > If, then the corresponding line is removed. ≤ Then retain the corresponding straight line and output the set of parallel rebar straight lines. .
[0045] Step 7: Calculate the pixel coordinates of candidate binding points by the intersection of the lines in the set of parallel steel bars. After clustering to determine the pixel position of the representative binding point, query the coordinate information of the three single-channel images and output the three-dimensional spatial coordinates of the steel bar binding point.
[0046] Calculate the precise 3D coordinates of the rebar intersections. Calculate the intersection point: By finding the intersection points of two sets of non-parallel lines, the pixel coordinates of the tying point on the image are obtained. DBSCAN clustering: Due to line fitting errors and the influence of discrete pixels, a physical intersection point may correspond to multiple adjacent pixels on the image. DBSCAN clustering can group these pixels belonging to the same physical point into one class and calculate its center, thus outputting a unique and accurate pixel coordinate for each tying point. Coordinate lookup: Using the previously constructed length image I1, width image I2, and depth image I3, the original 3D physical coordinates (X, Y, Z) of the tying point are looked up in reverse using its pixel coordinates. This is the ultimate goal of the entire process—to output the position of the tying point in real 3D space.
[0047] In this embodiment, step 7 specifically includes: Step 71: Calculate the set of parallel rebar lines by parameterizing the linear equations of the parallel rebar segments using the pixel coordinates of the line segment endpoints. The pixel coordinates of the intersection points between all pairs of non-parallel line segments are obtained to form a candidate binding point set. ; 1) Establishing the parametric equation of a straight line: For any line segment defined by two endpoints, the straight line containing it can be represented in standard form: Ax + By + C = 0. The coefficients A, B, and C are derived from the coordinates of the two endpoints to obtain the corresponding equation of the straight line.
[0048] 2) Determine if two line segments are parallel: Calculate whether the normal vectors of the two lines are parallel, that is, whether the cross product of the two line segments is zero (or the ratio is equal). If so, the two lines are parallel; if not, they are not parallel. 3) Calculate the intersection point of the two non-parallel lines; 4) Determine if the intersection point lies on the line segment. If it does, keep it; otherwise, discard it. 5) Integrate all intersections to obtain a set of candidate binding points. ; Step 72: Use the DBSCAN clustering algorithm (Density-Based Spatial Clustering of Applications with Noise) to cluster the candidate binding point set. Clustering is performed, and the core points are identified by setting the neighborhood radius ε and the minimum number of points MinPts. All pixels with the cluster density connected to the core points are aggregated to form pixel clusters. Noise points are removed and the coordinates of the center pixel of each cluster are calculated. This effectively prevents multiple pixel results from appearing at the same intersection point. The core points are identified by setting a neighborhood radius ε and a minimum number of points MinPts. The specific process is as follows: Traverse the candidate ligation point set For each pixel in the array, if the number of pixels within the neighborhood radius ε of a certain point is not less than the minimum number of points MinPts, then that point is marked as a core point. The process of aggregating pixels with all cluster densities connected to the core point to form a pixel cluster is as follows: For each core point, all its density-connected pixels are aggregated to form a pixel cluster; where density connection means that there is a direct density connection between two pixels and the same core point or a series of pixels that are core points to each other. Step 73: Using the center pixel coordinates as an index, read the corresponding X_point value in the length image I1, read the Y_point value in the width image I2, and read the Z_point value in the width image I3. Output the three-dimensional coordinates (X_point, Y_point, Z_point) as the position coordinates of the rebar binding point in three-dimensional space.
[0049] The above description is only a part of the embodiments of the present invention and does not limit the scope of protection of the present invention. Any equivalent device or equivalent process transformation made based on the content of the present invention specification and drawings, or direct or indirect application in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A method for identifying and locating rebar tying points based on point cloud and pixel mapping, characterized in that, Includes the following steps: Step 1: Obtain the original 3D point cloud data and remove outliers to obtain the denoised point cloud; Step 2: Perform planar fitting on the denoised point cloud, identify and remove the point cloud of the template surface, and obtain the point cloud of the rebar surface; Step 3: Based on the mapping relationship between point cloud and pixels, map the spatial physical coordinate attributes of the point cloud of the steel reinforcement surface into a custom three-channel coded image; Step 4: Separate the three-channel coded image into three single-channel images: length image, width image, and depth image; Step 5: Process the depth image to extract the initial set of straight rebar lines; specifically including: Step 51: Set the region of interest and perform secondary filtering on the depth image I3 based on a depth threshold to separate the rebar surface from the formwork surface, obtaining an optimized depth image; specifically including: Step 511: In the extracted depth image Above, the region of interest above the rebar surface is fixed to exclude the binding ends and other components within the camera's field of view, resulting in a depth image of the region of interest containing only the rebar surface data. ; Step 512: Traverse the depth image within the region of interest. Among all depth values, find the maximum depth value Z_max, and set the depth threshold h to Z_max minus a fixed offset value, which is set according to the standard distance between the rebar surface and the formwork surface; Step 513: Transfer the depth image medium depth value Filter the pixel region with a depth threshold h to obtain the depth image. medium depth value The pixel regions with a depth threshold h are preserved to obtain the depth image. ; Step 6: Select a set of parallel steel bar lines from the initial set of steel bar lines based on the set reference direction and parallel angle tolerance threshold; Step 7: Calculate the pixel coordinates of candidate binding points by the intersection points of the parallel rebar lines in the set of lines. After clustering to determine the pixel positions representing binding points, query the coordinate information of the three single-channel images and output the three-dimensional spatial coordinates of the rebar binding points; specifically including: Step 71: Calculate the set of parallel rebar lines by parameterizing the linear equations of the parallel rebar segments using the pixel coordinates of the line segment endpoints. The pixel coordinates of the intersection points between all pairs of non-parallel line segments are obtained to form a candidate binding point set. ; Step 72: Use the DBSCAN clustering algorithm to analyze the candidate tying point set. Clustering is performed, and core points are identified by setting the neighborhood radius ε and the minimum number of points MinPts. All pixels with the cluster density connected to the core points are aggregated to form pixel clusters. Noise points are removed and the coordinates of the center pixel of each cluster are calculated. Step 73: Using the center pixel coordinates as an index, read the corresponding X_point value in the length image I1, read the Y_point value in the width image I2, and read the Z_point value in the width image I3. Output the three-dimensional coordinates (X_point, Y_point, Z_point) as the position coordinates of the rebar binding point in three-dimensional space.
2. The method for identifying and locating rebar tying points based on point cloud and pixel mapping as described in claim 1, characterized in that, Step 1 specifically includes: Step 11: Acquire raw 3D point cloud data collected by an industrial camera; Step 12: Use statistical filtering algorithms to remove outliers and noise from the original 3D point cloud data; details are as follows: Step 121: For each point in the original 3D point cloud data Calculate all neighboring points of a point within a sphere of a given radius r. distance set ; Step 122: Calculate the distance set. average and standard deviation ; Step 123: Set the distance tolerance interval as follows ; Step 124: Calculate each point average neighborhood distance ; Step 125: Traverse all points in the original 3D point cloud data. If points... average neighborhood distance If a point is located outside the tolerance range, it is considered an outlier and removed; if a point average neighborhood distance If the point cloud is within the tolerance range of this distance, it is preserved, resulting in a denoised point cloud.
3. The method for identifying and locating rebar tying points based on point cloud and pixel mapping as described in claim 1, characterized in that, Step 2 specifically includes: Step 21: Using the denoised point cloud as input, preset the number of iterations N and the inlier distance threshold. and the minimum sample size n; Step 22: In each iteration, the RANSAC algorithm is used to randomly select m non-collinear points to fit the template plane model, and the distance from all points in the denoised point cloud to the template plane model is calculated. Points with a distance less than or equal to... The point is denoted as an interior point; Step 23: After the iteration is complete, calculate the distance from the points in the denoised point cloud that satisfy the condition to the template plane model. The template plane model with the most interior points is selected as the optimal background plane model based on the number of interior points. Step 24: Extract all that meet the requirements The inner points form the template surface point cloud and are removed, while the remaining outer points are retained as the rebar surface point cloud.
4. The method for identifying and locating rebar tying points based on point cloud and pixel mapping as described in claim 1, characterized in that, Step 3 specifically includes: Step 31: Using the camera intrinsic parameter matrix, project each 3D point (X, Y, Z) of the steel reinforcement surface point cloud in the camera coordinate system onto the 2D pixel plane to obtain its corresponding projected pixel coordinates (u, v). The camera intrinsic parameter matrix is as follows: in, , represents the focal length of the camera on the x-axis of the image. This represents the camera's focal length on the y-axis of the image. This represents the distortion coefficient of the x-axis. This represents the distortion coefficient of the y-axis; The formula for calculating the perspective projection is: Step 32: Create a three-channel blank image I0, whose width W and height H are determined by the boundaries of the projected pixel coordinates; Step 33: Traverse all points of the steel reinforcement surface point cloud, and assign the X, Y and Z coordinate values of each three-dimensional point to the R, G and B channels of the corresponding projected pixel coordinates (u, v) in the blank image I0, respectively, to generate a three-channel coded image I0' that integrates physical space coordinate information.
5. The method for identifying and locating rebar tying points based on point cloud and pixel mapping as described in claim 1, characterized in that, Step 4 specifically involves: The three-channel encoded image I0' is separated into three independent single-channel images: a length image I1 containing only X coordinate values, a width image I2 containing only Y coordinate values, and a depth image I3 containing only Z coordinate values.
6. The method for identifying and locating rebar tying points based on point cloud and pixel mapping as described in claim 1, characterized in that, Step 51 is followed by: Step 52: After normalizing the optimized depth image, a binarized image is obtained. The pixels of the binarized image are divided into nine grids to obtain nine equal pixel regions. Then, morphological closing operations are performed on each pixel region in the grid to connect the steel reinforcement regions of neighboring pixels. Step 53: Use the Zhang-Suen skeleton extraction algorithm to refine the pixels of each rebar area sequentially to obtain a single-pixel-width skeleton image of each rebar area. Step 54: Use Hough line transform to detect line segments in the single-pixel-width skeleton image within each rebar region to obtain the initial set of rebar line segments for each pixel region in the nine-grid.
7. The method for identifying and locating rebar tying points based on point cloud and pixel mapping as described in claim 6, characterized in that, Step 54 specifically includes: Step 541: Set the angle step size Δθ1 and the accumulator threshold T; Step 542: Calculate and count the accumulator array A(ρ, θ) in Hough space with the angle step size Δθ1 as the interval; Step 543: Detect all points in the accumulator array A(ρ, θ) that are greater than the accumulator threshold T as peak points. ; Step 544: For each detected peak point... Map back to image space to generate the corresponding straight line. All generated lines constitute the initial set of lines. , where each straight line By parameter pair The only certainty, This represents the i-th line. Indicates the distance from the origin to the line. vertical distance, Indicates the distance from the origin to the line. The angle between the perpendicular line and the positive x-axis. A point in Hough space uniquely corresponds to a straight line in image space.
8. The method for identifying and locating rebar tying points based on point cloud and pixel mapping as described in claim 1, characterized in that, Step 6 specifically includes: Step 61: Set the reference direction and parallel angle tolerance threshold for the reinforcing bar axis. ; Step 62: Calculate the initial set of straight reinforcement bars. Each straight line in Angular deviation from the reference direction ; Step 62, if > If, then the corresponding line is removed. ≤ Then retain the corresponding straight line and output the set of parallel rebar straight lines. .