Valve spraying intelligent identification and positioning method based on neural network
By using a neural network-based intelligent identification and positioning method for valve spraying, the problem of difficult valve spraying trajectory matching in existing technologies has been solved, realizing the automation, intelligence and flexibility of the valve spraying process, and improving production efficiency and spraying quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YANCHENG INST OF TECH
- Filing Date
- 2026-04-23
- Publication Date
- 2026-05-19
AI Technical Summary
Existing automated spraying methods for industrial robots are insufficient to meet the flexible production needs of valve products, which require small batches, multiple specifications, and multiple batches. They cannot achieve automatic matching and rapid recall of spraying trajectories, and lack environmental perception capabilities, resulting in deviations between the spraying trajectory and the actual workpiece.
A neural network-based intelligent identification and positioning method for valve spraying is adopted. The original point cloud data of the valve is collected by a 3D industrial camera, preprocessed and standardized, and then input into the point cloud recognition neural network for model identification. The model is then accurately registered and positioned by combining the template point cloud, and the spraying trajectory is automatically called for correction. Finally, the robot performs the spraying operation.
It has achieved automation, intelligence and flexibility in the valve spraying process, improved production efficiency, reduced the labor intensity and occupational health risks caused by manual spraying, and ensured the quality and precision of spraying.
Smart Images

Figure CN122067073A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of industrial automation technology, specifically relating to an intelligent spraying method that integrates 3D machine vision, point cloud data processing, deep learning recognition and robot motion control, and particularly to an intelligent positioning method based on neural networks for automatic identification of valve workpieces, spatial pose analysis and adaptive generation and correction of spraying trajectories. Background Technology
[0002] In current industrial production, the surface coating of valve products is typically done manually or semi-automatically. Manual coating relies on the operator's experience and manual control, which presents the following problems: 1. Poor spraying consistency, prone to uneven thickness, drips, or missed spraying; 2. The spray gun's posture and movement trajectory are difficult to control stably, affecting the coating quality; 3. Operators are exposed to environments containing volatile organic compounds and particulate matter for extended periods, posing occupational health risks. 4. Production efficiency is constrained by human factors, making it difficult to meet the needs of large-scale production.
[0003] While some companies have introduced industrial robots to automate spraying, most existing robotic spraying systems rely on teach-and-write programming, meaning that automatic operation is achieved by manually pre-setting spraying paths. This mode is highly dependent on workpiece consistency, and the spraying trajectory is usually designed for workpieces of fixed models and fixed placement postures. Once the workpiece model or placement changes, re-teaching is required. Furthermore, changeover costs are high. For multi-specification valve products, frequent model changes lead to long trajectory reconstruction cycles, high debugging costs, and increased production line downtime. In addition, existing automated spraying processes lack environmental awareness, failing to perceive the actual spatial position and posture of the workpiece in real time. This open-loop control results in deviations between the spraying trajectory and the actual workpiece.
[0004] Furthermore, valves, as typical complex curved surface workpieces, exhibit significant differences between different models in terms of valve body contour, flange dimensions, valve stem structure, and connection points. Without accurate valve identification and acquisition of their spatial orientation information, automatic matching and rapid recall of spraying trajectories are impossible. Therefore, there is an urgent need to propose an intelligent method capable of automatically identifying and accurately locating valves, and linking them with a spraying robot to complete the operation, thereby improving the automation level, identification accuracy, and production efficiency of the valve spraying process. Summary of the Invention
[0005] To address the aforementioned shortcomings of existing technologies, this invention aims to solve the problem that most current automated spraying methods for industrial robots rely on manual teaching to pre-set spraying trajectories. This approach struggles to meet the flexible production demands of small-batch, multi-specification, and multi-batch production in the valve manufacturing industry, and it also fails to achieve automatic matching and rapid recall of spraying trajectories. The purpose of this invention is to provide a neural network-based intelligent identification and positioning method for valve spraying, enabling automatic valve model identification, automatic spatial pose determination, and automatic recall of spraying trajectories, thereby improving the flexibility, intelligence, and automation level of spraying operations.
[0006] This invention adopts the following technical solution: a valve spraying intelligent recognition and positioning method based on neural networks, comprising the following steps: The first step is to collect the original point cloud data of the valve. Before the spraying operation begins, a 3D industrial camera is used to perform a spatial scan of the valves to be sprayed in the spraying work area to obtain the corresponding original 3D point cloud data.
[0007] The original point cloud data is a set of spatial points expressed in a unified coordinate system, which includes not only the geometric information of the valve body, but also interference point clouds introduced by the environmental background, light reflection, suspended particles and surrounding equipment.
[0008] This step enables a complete digital representation of the valve's spatial morphology under actual operating conditions, providing basic data input for subsequent identification and positioning.
[0009] The second step is point cloud preprocessing. The raw point cloud data obtained in the first step is preprocessed to reduce data redundancy and improve point cloud quality.
[0010] The preprocessing includes at least the following steps: 1) Downsampling: The point cloud is sparsified by using Poisson disk sampling, uniform sampling or voxel downsampling to make the point cloud more uniformly distributed in space, while preserving the key geometric features of the valve. 2) Spatial area clipping: Based on the preset spraying work area range, the point cloud is constrained and filtered to remove irrelevant point clouds located outside the work area; 3) Noise removal: Remove isolated points and environmental noise point clouds by using threshold constraints or neighborhood statistical analysis methods.
[0011] Through the above processing, the point cloud data is transformed from a state of high redundancy and strong noise into an effective point cloud with clear structure and preserved features, providing high-quality input for subsequent neural network recognition.
[0012] The third step is coarse standardization of the point cloud. The preprocessed point cloud data is standardized to reduce the differences in spatial location, orientation, and scale of point clouds under different acquisition conditions.
[0013] The coarse normalization process includes at least one of the following: 1) Centralization processing: Calculate the geometric center of the point cloud and translate the entire point cloud to a local coordinate system with the geometric center as the origin; 2) Point count unification: The point cloud is unified into a fixed number of point sets through resampling; 3) Scale normalization: The point cloud is scaled proportionally to represent valves of different sizes within a uniform scale range; 4) Coarse Alignment of Principal Directions: Principal component analysis is used to estimate the principal directions of the point cloud, and the overall pose of the point cloud is initially aligned. It should be noted that this step is only used to reduce the variability of the input data and improve the stability of subsequent recognition algorithms, and is not the final pose solution.
[0014] The fourth step is valve model identification based on neural networks. The standardized point cloud processed in the third step is input into a 3D point cloud recognition neural network to automatically identify the valve model.
[0015] Specifically, it includes: A standard valve point cloud dataset was constructed and trained offline to obtain a stable recognition model; During the online phase, the point cloud to be identified is input into the trained model, and the valve model or category number is output. Based on the feature similarity determination mechanism, the recognition results are screened for confidence level to improve the reliability of recognition.
[0016] This step enables the conversion from geometric point cloud data to semantic category information.
[0017] The fifth step is precise registration and localization based on the template point cloud. After obtaining the valve model identification result, the standard valve point cloud template corresponding to the model is retrieved from the pre-established standard template library.
[0018] The template point cloud is registered with the current measured point cloud to solve the optimal rigid body transformation relationship between the two, thereby obtaining the precise spatial pose information of the current valve.
[0019] Step 6: Automatic matching and correction of the spraying trajectory. Based on the valve model identification results obtained in the fourth step, the standard spraying trajectory program corresponding to the model is automatically called from the pre-built spraying trajectory database; Based on the spatial pose information obtained in the fifth step, coordinate transformation and attitude correction are performed on the standard spraying trajectory to ensure that the spraying path is consistent with the actual spatial position of the current valve. The correction process includes at least: trajectory point coordinate mapping, spray gun attitude direction adjustment, and compensation for the positions of the starting and ending spraying points.
[0020] This step enables the adaptive conversion of the spraying trajectory from the offline standard state to the online actual working condition.
[0021] Step 7: The robot performs automated spraying. The spraying trajectory, corrected in step six, is sent to the spraying robot control system, driving the robot to perform the spraying operation according to the target trajectory.
[0022] The robot first moves to the preset starting position, and then performs continuous spraying according to the corrected trajectory path, while maintaining the spray gun posture and matching the geometric features of the valve surface during the spraying process.
[0023] This completes the fully automated control of the entire process, from point cloud acquisition, target recognition, spatial positioning, trajectory matching to spraying execution.
[0024] According to another embodiment of the invention or any of the foregoing embodiments, the path planning and task allocation method, in the first step, uses initial valve point cloud data acquired by a 3D industrial camera, and processes it through a Poisson disk sampling algorithm in the second step to achieve point cloud simplification and noise reduction. The specific implementation is as follows: The initial point cloud data acquired by 3D industrial cameras suffers from disorder and redundancy, increasing the computational burden and prolonging recognition time in subsequent point cloud processing. It also easily leads to recognition errors in single-algorithm vision systems. The Poisson disk sampling algorithm specifically addresses these issues, effectively preserving the outer contour structure of the valve workpiece while achieving ordered and simplified point cloud processing. To facilitate subsequent point cloud data processing, the acquired point cloud data needs to be defined in terms of coordinates. The origin of this three-dimensional coordinate system can be flexibly set, for example, using the origin of the camera coordinate system or any spatial point. Its expression is:
[0025] in A 3D coordinate dataset representing a point cloud; p1 express Point cloud 3D spatial coordinates of points.
[0026] After processing, each point in the point cloud data possesses three-dimensional coordinates in the same spatial coordinate system; however, although the coordinates of the point cloud have been defined, downsampling processing has not yet been performed, and the overall distribution remains relatively dense. This dense distribution will significantly prolong the recognition time of the actual system, therefore, downsampling operation in preprocessing is required. Through this operation, the point clouds can maintain an equidistant or relatively large spacing distribution with spheres of the same radius as constraints, the formula of which is:
[0027] in This represents the distance between controllable spatial point clouds.
[0028] After downsampling, the point cloud distribution becomes more uniform, avoiding local clustering issues. However, the point cloud still contains interfering point clouds unrelated to the valve workpiece (such as dust in the working environment, point clouds of surrounding unrelated workpieces, etc.). A large number of these unrelated interfering point clouds significantly reduces the recognition efficiency of the vision system. Therefore, this step requires point cloud denoising to filter out these unrelated interfering point clouds, ensuring that the valve workpiece's point cloud data is retained singularly and completely within the recognition area. The formula is:
[0029] in This indicates the calibrated work area of the workpiece.
[0030] According to another embodiment of the invention or any of the foregoing embodiments, in the path planning and task allocation method, in the third step, the principal component analysis method is used to estimate the main direction of the point cloud to achieve coarse alignment processing of the valve point cloud under a unified coordinate expression. This step is only used to improve the consistency and stability of the recognition model input.
[0031] According to another embodiment of the invention or any of the foregoing embodiments, the path planning and task allocation method, in the third step, employs a 3D principal component analysis (PCA) algorithm. This algorithm can establish target spatial coordinates for point cloud data that still lacks a clear pose reference after the second step processing, adapting them to the valve spraying scenario. This can both replace the temporary coordinates set in step one and ensure that the coordinate vector relationships between the point clouds remain unchanged. The specific implementation is as follows: Extract the point cloud dataset P*={p*1 after the second preprocessing step ,in This represents the three-dimensional coordinates of the i-th point (including key valve feature points such as flanges and valve stems). At this point, the point cloud is still in a disordered state with an undefined origin and no unified pose reference, but the relative vector relationships between the point clouds remain unchanged. The core purpose of this step is to obtain a standardized initial point cloud dataset, providing a data foundation for subsequent point cloud orientation calibration processing.
[0032] After obtaining the point cloud dataset preprocessed in step three, the mean values of its x, y, and z coordinates need to be calculated to eliminate the overall offset interference of the point cloud in each dimension. The temporary coordinate origin set in step two can be the origin of the camera coordinate system or any spatial point within the camera's field of view. This is not the optimal coordinate scheme for valve spraying operations, as the temporary coordinates cannot focus the coordinate origin and spatial vector relationships on the valve body. To concentrate the coordinate system on the dense point cloud area corresponding to the valve, i.e., the area where the valve entity is located, the offset of the preprocessed point cloud data in step two needs to be eliminated by calculating the three-dimensional mean values of x, y, and z, making the point cloud data more concentrated in the valve area. The formula is as follows:
[0033] in This represents the total number of points in the valve point cloud. This represents the geometric center of the valve point cloud.
[0034] Based on the mean values of the x, y, and z 3D coordinates of the valve point cloud dataset after offset elimination, the variance of each dimension and the covariance between dimensions are further calculated. The variance characterizes the degree of dispersion of the valve point cloud data within a single dimension from its mean, while the covariance characterizes the correlation between the deviations of point cloud data from their respective means in two dimensions of the valve point cloud space. This lays the foundation for subsequent matrix quantization to describe the discrete distribution characteristics of the valve point cloud in each spatial direction. The formula is as follows:
[0035] The same applies to the remaining elements. Represents the variance in the x-dimensional dimension. This represents the covariance of the two dimensions x and y.
[0036] Based on the calculated x, y, and z three-dimensional variances and inter-dimensional covariances, a covariance matrix C is constructed to characterize the spatial discreteness of the valve point cloud. All elements of this matrix are derived from the aforementioned variances and covariances: the diagonal elements represent the variances of each dimension, quantifying the degree of discreteness of the point cloud in a single dimension; the off-diagonal elements represent the inter-dimensional covariances, characterizing the correlation between the discreteness of point clouds in different dimensions. This matrix representation of the point cloud spatial distribution characteristics provides crucial mathematical model support for subsequent 3D principal component analysis to extract the valve's principal direction and complete coordinate calibration. The formula is:
[0037] Where C represents the covariance matrix of the valve's spatial point cloud.
[0038] Diagonalize the covariance matrix C to obtain the eigenvalues. With corresponding feature vectors This yields new three-dimensional coordinates, with the origin being the coordinate system defined in step 302. .
[0039] Diagonalizing the covariance matrix C yields the result that satisfies eigenvalues and corresponding eigenvectors This leads to the establishment of a new three-dimensional coordinate system adapted to the valve spraying posture requirements. The origin of this coordinate system is the mean of the three-dimensional coordinates calculated in step 302. The formula is:
[0040] Where D represents a diagonal matrix, and the diagonal elements are eigenvalues; This represents an orthogonal matrix formed by eigenvectors. This indicates the dominant geometric direction of the valve, such as the valve stem axis.
[0041] According to another embodiment of the invention or any of the foregoing embodiments, in the path planning and task allocation method, in the fourth step, the neural network adopts a PointNet++ structure (a deep learning network structure for 3D point cloud data), and achieves the fusion extraction of local geometric features and overall structural features by performing hierarchical feature learning on the point cloud data, and outputs the corresponding valve category label. The specific method is as follows: Point cloud input standardization and adaptation. The PointNet++ network requires the input point cloud to have a fixed number of points and a uniform data format to ensure the stability and comparability of feature extraction. The standardized point cloud output in step three may have different point numbers due to differences in valve model and scanning accuracy, requiring further standardization processing: a uniform sampling strategy is adopted to uniformly sample the point clouds of different valves to a fixed number of points N (preferably N=1024 in this invention, balancing feature integrity and computational efficiency); during the sampling process, the point cloud density of key feature regions of the valve is preserved to avoid the loss of key geometric information. The standardized point cloud input can be represented as:
[0042] in, This represents the set of input points for the PointNet++ network. Let i be the standardized coordinates of the i-th point cloud. These are the three-dimensional coordinates in the standardized coordinate system of step three; N=1024 is the fixed number of input points.
[0043] PointNet++ network feature extraction: This step utilizes PointNet++'s three-level structure of point-level feature transformation, local feature aggregation, and global feature pooling to transform the disordered point cloud into a fixed-length global feature vector that can represent the valve model. The specific process is as follows: Point-level feature transformation: To address the issue of point cloud disorder, a learnable 3×3 transformation matrix M (point cloud alignment matrix) is introduced for each input point. Spatial alignment and feature enhancement are performed to ensure consistency in the point cloud features of the same valve model under different orientations. The formula is as follows:
[0044] Where M is the 3×3 point cloud alignment matrix learned by the PointNet++ network training, with 9 learnable parameters used to correct the spatial pose deviation of the point cloud. The coordinates of the aligned points; For input points The transpose of .
[0045] Local feature aggregation: aligning the coordinates of points The input is a multilayer perceptron (MLP), which extracts local geometric features of each point through nonlinear transformations, such as the point's curvature, neighborhood density, and relative distance to the valve center, thus transforming coordinate information into feature information. The MLP structure is set to 3 to 64 to 128 dimensions, and its formula is as follows:
[0046] in, Let be the 128-dimensional local feature vector of the i-th point; The weight matrix is a 3×64 matrix. The weight matrix is 64×128. It is a non-linear activation function used to enhance feature representation capabilities.
[0047] Global Feature Pooling: Max-pooling is used to aggregate N local feature vectors into a single fixed-length global feature vector. This vector contains comprehensive information about the valve's overall geometry and key local features, essentially forming the valve's "feature fingerprint." The formula is as follows:
[0048] Where F is a 128-dimensional global feature vector, which is also the core feature representation of the valve model; This means taking the maximum value of the k-th dimension local feature for all points, ensuring that the global feature can cover the key geometric attributes of the valve.
[0049] Feature matching and valve model recognition. A pre-trained feature library containing various standard valve models is pre-built. This library uses a large number of standard valve samples, covering point cloud data of gate valves, ball valves, globe valves, etc. of different specifications and models. After training with a PointNet++ network, the global feature vectors of each standard model are extracted and stored. , (Total number of standard models). The model identification process is as follows: 1. Calculate the global feature vector F of the valve to be identified and the standard feature vectors in the feature library. The cosine similarity quantifies the degree of feature matching between two pairs. The similarity formula is:
[0050] in, The similarity between the feature to be identified and the kth standard feature is denoted as , with a value range of [0,1]. It is the dot product of two vectors; , Let be the norms of the two vectors, respectively. 2. Set the similarity threshold T: If a unique standard eigenvector exists satisfy If T ≥ T, then the valve to be identified is determined to be of the same model as the feature corresponding to that feature; If there are multiple satisfy If the similarity is greater than or equal to T, then the model corresponding to the maximum similarity is taken as the recognition result; If all If the value is less than T, the output will indicate that no matching model was found, prompting manual verification.
[0051] According to another embodiment of the invention or any of the foregoing embodiments, the path planning and task allocation method, wherein in the fifth step, the registration process employs an iterative nearest-point method, including: Establish the correspondence between template point clouds and measured point clouds; Construct the error function and solve for the optimal rotation matrix and translation vector; Output the homogeneous transformation matrix describing the spatial pose.
[0052] This step enables the conversion from category recognition results to precise spatial positioning.
[0053] According to another embodiment of the invention or any of the foregoing embodiments, in the path planning and task allocation method, in the fifth step, after identifying the valve type, the standard template point cloud corresponding to the type is called, and then the template point cloud is aligned with the valve point cloud that is actually captured, and finally the accurate position and attitude of the current valve in space are calculated.
[0054] Based on the valve model identification result output in step four, retrieve the standard valve point cloud template corresponding to that model from the standard template library. Let:
[0055] in, It is a pre-built standard valve point cloud in the database; It is the actual valve point cloud obtained by current industrial camera scanning and after previous preprocessing.
[0056] The template point cloud and the measured point cloud are initially normalized to significantly reduce the distance deviation in subsequent ICP point cloud registration. Through centering, the two sets of point clouds are translated to a coordinate system with their own geometric centers as the origin, reducing the adverse effects of large-scale positional offsets on the subsequent registration process. The centering formula is as follows:
[0057] in, It is the geometric center of the template point cloud; It is the measured geometric center of the point cloud: These are the coordinate systems of the template valve and the actual valve point cloud, respectively, after centralized processing.
[0058] Establish the correspondence between the template point cloud and the measured point cloud. In the ICP algorithm, it is necessary to first find the nearest neighbor point in the measured point cloud for each point in the template point cloud and establish a corresponding point pair. Let the nth point in the template point cloud be denoted as . 𝑖 Then, find the point 𝑝 that is closest to it in the measured point cloud. 𝑖 The formula is as follows:
[0059] in, Represents the set of measured point clouds; Represents a set Any candidate point in the; This represents the nearest neighbor point that was ultimately selected.
[0060] To align the template point cloud and the measured point cloud as closely as possible, an optimal rigid body transformation needs to be found, including the rotation matrix R and the translation vector t, to minimize the error between the two sets of point clouds. The goal is to find the most suitable rotation and translation so that the transformed template point cloud coincides with the measured point cloud as closely as possible. The specific formula is as follows:
[0061] in, It is a rotation matrix; It is a translation vector; The number of corresponding point pairs participating in the registration.
[0062] The optimal rotation matrix is obtained by minimizing the above error function. Translation vector First, we need to find the center of the template and its actual corresponding points. Then, we construct a decentralized point set, consistent with the 502 step. Next, we construct the covariance matrix and perform singular value decomposition on the covariance matrix to obtain the rotation matrix and translation vector. The specific formulas are as follows:
[0063] in, The covariance matrix is composed of two centralized point cloud sets; To solve the left singular value matrix of SVD; To solve the right singular value matrix of SVD.
[0064] The obtained rotation matrix R and translation vector t are further combined into a homogeneous transformation matrix, which is used to uniformly describe the rotation and translation relationships of the target in space. The specific expression is as follows:
[0065] This allows us to obtain the complete pose transformation relationship.
[0066] According to another embodiment of the invention or any of the foregoing embodiments, in the path planning and task allocation method, in step six, after the vision system completes the type matching between the target valve and the preset valve library, it triggers the spraying industrial robot to execute the corresponding spraying operation. Since the actual pose of the target valve may deviate from the preset spraying trajectory in actual working conditions, to ensure spraying accuracy, the vision system needs to first calculate the offset distance and the starting point coordinates of the offset vector, and then accurately calibrate the preset spraying trajectory. Specifically, after obtaining the valve model identification result and accurate spatial pose information, the system automatically calls the corresponding standard spraying program from the pre-established spraying trajectory database according to the valve identification category, and performs coordinate mapping, position compensation, and posture correction on the standard spraying trajectory based on the pose transformation relationship obtained in step five, so that the corrected spraying trajectory matches the actual spatial position and posture of the valve to be sprayed. Subsequently, the corrected spraying trajectory is sent to the spraying robot control system, and the spraying robot moves to the starting spraying position according to the preset control instructions and completes the automatic spraying operation on the valve surface along the corrected spraying path.
[0067] The beneficial effects of this invention are: 1. This invention realizes a complete closed-loop process from valve recognition, posture positioning, automatic matching and correction of spraying trajectory to automatic robot spraying execution, which can effectively improve the automation level, flexibility level, and practical engineering application efficiency of valve spraying process. By directly sending the corrected spraying trajectory to the robot control system, an automatic closed-loop process from visual recognition, spatial positioning, trajectory compensation to robot spraying execution is formed, which can effectively improve the automation level, intelligence level, and production efficiency of valve spraying operation, and help reduce the labor intensity and occupational health risks caused by manual spraying.
[0068] 2. This invention utilizes a 3D industrial camera to acquire the original point cloud information of the valve, and combines it with preprocessing methods such as downsampling, cropping, and noise reduction. This can reduce the interference of irrelevant background points and redundant points while preserving the key geometric features of the valve, thereby significantly reducing the computational complexity of subsequent identification and positioning processes and improving the overall operating efficiency of the system.
[0069] 3. This invention performs centering, point number unification, scale normalization, and coarse alignment of point cloud data, making valve point cloud data obtained under different acquisition locations, different placement postures, and different point cloud densities more consistent and comparable, thereby improving the stability and accuracy of the neural network model in identifying valve models in complex industrial environments.
[0070] 4. This invention uses a neural network model oriented towards three-dimensional disordered point clouds to identify valves. It can directly learn geometric features such as flange edges, valve stem connection areas, and valve body contour curvature from valve point clouds without having to convert the three-dimensional point cloud into a two-dimensional image or regular voxels. This reduces information loss caused by data conversion and helps improve the accuracy and robustness of complex valve model identification.
[0071] 5. After identifying the valve model, this invention retrieves a standard template point cloud from the corresponding template library and performs precise registration and positioning, solving the problem of traditional methods that only identify the category but lack accurate pose calculation. Through rigid body registration between the template point cloud and the measured point cloud, the current spatial position and attitude of the valve can be accurately determined, providing a reliable basis for the dynamic correction of the subsequent spraying trajectory, which helps to improve the spraying coverage quality and trajectory execution accuracy.
[0072] 6. This invention automatically links valve identification results, precise position information, and spray trajectory database. It can quickly call the corresponding spraying program after identifying the valve model and correct the spray trajectory online according to the actual placement of the valve. This significantly reduces the workload of manual teaching, repeated debugging, and offline trajectory reconstruction, and improves the system's flexibility to adapt to multiple models and specifications of valves. Attached Figure Description
[0073] Figure 1 A flowchart illustrating the intelligent identification and positioning method for valve spraying based on neural networks as described in the invention; Figure 2 A schematic diagram of the structure of the valve spraying experimental platform described in the invention; Figure 3 This is a schematic diagram of the disordered pose offset of the valve working area as described in the invention. Figure 4 A schematic diagram of the working layout of the industrial camera and valve workpiece described in the invention; Figure 5 A schematic diagram of the unprocessed raw point cloud captured by the 3D industrial camera described in the invention; Figure 6 This is an actual schematic diagram of the unprocessed point cloud with a disordered three-dimensional distribution as described in the invention. Figure 7 This is an actual schematic diagram of the point cloud after processing to achieve a three-dimensional uniform distribution of the point cloud as described in the invention. Figure 8 This is a schematic diagram of the red-highlighted area of the valve workpiece point cloud in the working environment after point cloud processing, as described in the invention. Figure 9 This is a schematic diagram of the preprocessed valve point cloud coordinates as described in the invention. Figure 10 This is a schematic diagram of the pre-processed valve point cloud effect described in the invention. Detailed Implementation
[0074] 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.
[0075] In this embodiment, such as Figure 1 , 2 As shown, a 3D industrial camera, industrial robot, spray gun actuator, valve delivery device, and computer control system are first arranged on the spraying workstation. This invention employs an "eye-on-hand" camera mounting method, fixing the industrial camera to the arm of the industrial robot. This mounting scheme was chosen based on multiple core considerations: first, to ensure ease of on-site installation; second, to ensure the camera is at the optimal working distance and that the valve is accurately positioned directly in front of the camera, optimizing the viewing angle adaptation for 3D data acquisition; and third, to guarantee the accuracy and stability of point cloud data acquisition. Therefore, this boom-mounted mounting design is adopted. A schematic diagram is shown below. Figure 2As shown. When the valves are transported to the vision system work area via the production line, they are suspended by production line hooks. Upon arrival at the work area, the valves are placed randomly, exhibiting positional deviations such as lateral offsets. Figure 3 As shown. Ordinary 2D vision systems, limited by their two-dimensional information acquisition capabilities, cannot provide industrial robots with precise spatial distance and pose data. Therefore, 3D vision equipment is needed to acquire the three-dimensional spatial coordinates and distance information of the valve, providing reliable data support for subsequent identification and positioning, such as... Figure 4 As shown, after the valve to be coated is transported to the preset working area, a 3D industrial camera is activated to scan the valve, obtaining raw 3D point cloud data including the valve body, environmental background, and noise information. The collected point cloud data is represented as a 3D spatial point set in a unified coordinate system, which is used for subsequent identification and positioning calculations. Figure 5 As shown.
[0076] After obtaining the raw point cloud, preprocessing is first performed. Specifically, Poisson disk sampling, uniform sampling, or voxel downsampling is used to downsample the point cloud to reduce the number of points and improve the uniformity of point cloud distribution. At the same time, the point cloud is cropped according to the preset working area range, retaining only the point cloud data located within the valve's working area. Furthermore, threshold constraints or neighborhood analysis methods are used to remove noise point clouds corresponding to dust, background equipment, and irrelevant workpieces, thereby obtaining a relatively clean valve body point cloud.
[0077] The specific implementation steps are as follows: After the valve to be coated enters the preset working area via the conveying device, a 3D industrial camera is activated to scan the valve and acquire its original 3D point cloud data. The original point cloud data can be represented as:
[0078] in, This represents the original 3D point cloud set obtained from the current acquisition. Represents the first point in the point cloud Coordinates of a point in three-dimensional space. This indicates the total number of point clouds currently. The original point cloud, in addition to the valve body point cloud, may also include background equipment, conveying devices, environmental reflections, and noise point clouds introduced by flying dust particles; therefore, further point cloud preprocessing is required.
[0079] In the point cloud preprocessing stage, the original point cloud is first processed... Downsampling is performed. This implementation preferably uses the Poisson disk sampling algorithm to reduce the number of point clouds and ensure that the retained points are distributed as evenly as possible in space, while preserving key structural features such as the valve outline, flange edges, and valve stem connection area. The constraints of Poisson disk sampling can be expressed as follows:
[0080] in, The minimum sampling interval threshold is set. This represents the Euclidean distance between any two retained points. Through this constraint, it can be ensured that the downsampled point cloud does not excessively cluster in space, thus reducing data redundancy while better preserving the geometric characteristics of the valve. For example... Figure 6 , 7 As shown.
[0081] After downsampling, the point cloud is further cropped according to the pre-defined workpiece working area, retaining only the point cloud within the valve's operating area. Let the working area be... Point clouds that satisfy the following formula are retained:
[0082] This step filters out background and irrelevant point clouds located outside the working area. Subsequently, threshold constraints or neighborhood analysis methods are used to remove isolated and noisy points, thus obtaining effective point cloud data containing only valve body information. Figure 8 As shown.
[0083] After point cloud preprocessing, the valve point cloud undergoes coarse normalization to reduce differences in position, orientation, and point count under different acquisition conditions. First, the point cloud is calculated. Geometric center:
[0084] in, This represents the geometric center of the current valve point cloud. Then, the coordinates of the geometric center are subtracted from the coordinates of each point in the original point cloud to obtain the centered point cloud:
[0085] in, Represents the centralized first Each point cloud can be centralized to a local coordinate system with its geometric center as the origin, thereby reducing the impact of overall positional deviation on subsequent neural network recognition and point cloud registration. For example... Figure 9 , Figure 10 As shown.
[0086] Furthermore, to estimate the principal orientation of the point cloud and perform coarse alignment, the covariance matrix of the centered point cloud is constructed:
[0087] in, This represents the covariance matrix of the valve point cloud. Eigenvalue decomposition is performed on the covariance matrix to obtain its eigenvalues and corresponding eigenvectors. The eigenvector corresponding to the largest eigenvalue is selected as the principal direction of the point cloud, and coarse alignment of the current valve point cloud is performed accordingly. This step aims to ensure that similar valve point clouds acquired under different placement orientations maintain as consistent an overall orientation as possible, thereby improving the consistency and stability of subsequent neural network input data. It should be noted that this coarse alignment process is only used for point cloud standardization and is not considered as the final accurate pose solution.
[0088] After coarse normalization, the processed valve point cloud is input into a 3D point cloud recognition neural network for automatic valve model identification. This implementation preferably uses the PointNet++ neural network model. To accommodate network input requirements, a uniform point count sampling process is performed on the coarsely normalized point cloud, organizing the input samples into a point set with a fixed number of points. The network first extracts features from each point in the input point cloud; the point-level feature extraction process can be represented as follows:
[0089] in, Indicates the first Local feature vectors extracted from each point, This is the network weight matrix. This is a non-linear activation function. Through this process, the network can learn local geometric features related to the valve category from the input point coordinates.
[0090] Furthermore, symmetric pooling is performed on the local features of all points to construct a global feature vector representing the overall geometry of the valve:
[0091] in, It is a 128-dimensional global feature vector, which is also the core feature representation of the valve model; This means taking the maximum value of the k-th dimension local feature for all points, ensuring that the global feature can cover the key geometric attributes of the valve.
[0092] In this embodiment, a standard valve sample database can be pre-constructed, and the neural network can be trained using point cloud samples of various valve models collected offline to obtain the feature representations corresponding to each valve model. During the online recognition stage, the global feature vector of the valve to be recognized is... Similarity matching with standard sample feature vectors is performed, preferably using cosine similarity as the criterion, and its expression is:
[0093] in, Indicates the valve to be identified and the first Feature similarity between standard valves. By comparing the similarity scores of different categories, the final identification result of the current valve can be output.
[0094] After obtaining the valve model identification result, the standard valve point cloud template corresponding to that model is retrieved from the standard template library based on the identification result. Let the retrieved standard template point cloud be:
[0095] in, This represents the set of standard template point clouds corresponding to the currently identified model. The first point in the template point cloud One point, This represents the total number of template point clouds. At this point, the measured valve point cloud currently to be registered is still recorded as... .
[0096] To obtain the precise spatial pose information of the current valve, the template point cloud is analyzed. Compared with measured point cloud Fine registration calculations are performed. This implementation preferably employs an iterative nearest-neighbor registration method. First, a nearest-neighbor correspondence is established between the template point cloud and the measured point cloud. For any point in the template point cloud, In the measured point cloud set Search for the point with the smallest Euclidean distance. Its expression is:
[0097] in Represents any candidate point in the measured point cloud. Indicates the final selected point relative to the template. The corresponding nearest neighbor points. By repeatedly performing the above nearest neighbor search on each point in the template point cloud, the corresponding point set between the template point cloud and the measured point cloud can be obtained.
[0098] After establishing the corresponding point set, in order to obtain the optimal rigid body transformation between the template point cloud and the measured point cloud, an overall error function is constructed:
[0099] in, For rotation matrix, It is a translation vector. This represents the number of corresponding point pairs involved in the registration. This error function describes the overall registration error between the template point cloud and the current measured point cloud after rotation and translation transformations. By minimizing this error function, the optimal rigid body transformation parameters between the template point cloud and the measured point cloud can be obtained.
[0100] To further solve for the optimal rotation matrix and translation vector, we first construct the covariance matrix between the corresponding point sets:
[0101] Subsequently, the covariance matrix Perform singular value decomposition:
[0102] in, and The orthogonal matrix obtained from singular value decomposition. Let be a singular value diagonal matrix. Based on the singular value decomposition results, the optimal rotation matrix can be obtained:
[0103] Furthermore, the translation vector can be obtained from the positional relationship between the template point cloud and the measured point cloud:
[0104] in, Represents the measured point cloud Geometric center, Represents a template point cloud The geometric center is then determined. At this point, the optimal rotation and translation parameters of the template point cloud relative to the current measured point cloud can be obtained.
[0105] Then, the rotation matrix With translation vector Combining them to form a homogeneous transformation matrix:
[0106] Among them, the homogeneous transformation moments The pose transformation matrix is used to uniformly represent the rotational and translational relationships between the template point cloud and the currently measured valve point cloud, thereby establishing a complete pose transformation relationship. This pose transformation matrix is the accurate spatial pose description result of the current valve relative to the standard template coordinate system.
[0107] After obtaining the valve model identification result and pose transformation matrix Subsequently, based on the recognition results, the system automatically retrieves the standard spraying trajectory program corresponding to the current valve model from the pre-established spraying trajectory database. The spraying trajectory database pre-stores path point information, spray gun attitude parameters, and spraying process parameters for different valve models. Since the valve's placement and attitude in actual working conditions usually deviate from the standard template state, the pose transformation matrix obtained in step five needs to be used. Coordinate mapping and pose correction are performed on the standard spraying trajectory. Let a point on the standard trajectory be represented using homogeneous coordinates:
[0108] The corrected spray trajectory points can then be represented as:
[0109] in, This represents the target spray trajectory points after pose transformation. By sequentially performing the above transformation on each path point in the standard trajectory, the corrected spray trajectory can be matched with the actual spatial position and orientation of the valve to be sprayed. Simultaneously, corresponding corrections can be made to the spray gun's normal direction, starting spray position, and ending spray position to ensure that the spray gun maintains a spatial orientation adapted to the valve surface throughout the spraying process.
[0110] In summary, this implementation method achieves a complete closed-loop process from 3D point cloud acquisition, point cloud preprocessing, point cloud coarse standardization, neural network recognition, template point cloud fine registration, automatic matching and correction of spraying trajectory, to automatic robot spraying execution. The overall flowchart is shown below. Figure 1 As shown.
[0111] Working principle of the invention: First, a 3D industrial camera is used to spatially scan the valve to be painted, acquiring raw point cloud data including information about the valve body and environmental interference. Preprocessing techniques such as downsampling, spatial cropping, and noise removal are used to extract structurally complete and uniformly distributed effective point clouds. Subsequently, the point clouds are centered, scale-normalized, and coarsely aligned along the principal direction to eliminate differences caused by varying placement and acquisition conditions, ensuring a unified representation of the point cloud data. Based on this, the standardized point cloud is input into a 3D point cloud neural network model. A hierarchical feature extraction mechanism is used to obtain the valve's local geometric features and overall structural features, which are then matched with a pre-trained feature library to achieve automatic valve model identification, providing a category basis for subsequent positioning and painting control.
[0112] After completing model identification, this invention further retrieves the standard point cloud model of the corresponding valve from the template library and uses a point cloud registration algorithm to solve the optimal rigid body transformation relationship between the template point cloud and the measured point cloud, obtaining the valve's precise spatial pose information under the current operating conditions. Based on this pose information, coordinate mapping and attitude correction are performed on the preset spraying trajectory, enabling the spraying path to dynamically adapt to the valve's actual position and orientation. The industrial robot then executes the spraying operation according to the corrected trajectory. Through the above process, a closed-loop control mechanism is constructed, encompassing point cloud perception, intelligent identification, precise positioning, trajectory adaptive adjustment, and automatic spraying execution. This transforms the valve spraying process from manual teaching-driven to data-driven and intelligent decision-driven, significantly improving the system's flexibility, spraying accuracy, and production efficiency.
[0113] The key technical point of this invention lies in the integrated design of target identification, spatial positioning, trajectory recall, and trajectory correction in the automatic valve spraying process, constructing a complete technical chain based on 3D point cloud processing, neural network recognition, template precision registration, and robotic automatic spraying execution. Unlike existing spraying methods that rely on manual teaching or solely on 2D visual recognition, this invention acquires the original point cloud data of the valve using a 3D industrial camera and performs downsampling, working area clipping, and noise removal on the point cloud. This reduces redundant data while preserving the valve's key geometric features, laying a data foundation for subsequent identification and positioning.
[0114] Another key technical aspect of this invention lies in the coarse standardization processing performed on the preprocessed valve point cloud, including centering, point count unification, scale normalization, and coarse alignment of the main direction. This reduces the differences in acquisition location, orientation, and point count among different valves, improving the consistency and robustness of the neural network input data. Furthermore, this invention employs a neural network recognition model based on 3D point clouds for valve model identification, preferably using the PointNet++ network structure. Through ensemble sampling, neighborhood grouping, and hierarchical feature extraction, it fully learns the local geometric features and overall structural features of the valve point cloud, achieving accurate identification of complex valve models.
[0115] Another key technical aspect of this invention lies in the fact that, after valve model identification, spraying is not performed directly. Instead, based on the identification results, a standard template point cloud matching the current valve model is retrieved from a standard template library. Then, a fine registration method based on iterative nearest points is used to register the standard template point cloud with the current measured point cloud, solving for the rotation matrix, translation vector, and homogeneous pose transformation matrix between the template point cloud and the measured point cloud, thereby obtaining the precise spatial pose information of the current valve. This step realizes the transformation from category recognition to precise positioning and is an important foundation for subsequent spraying trajectory correction.
[0116] This invention also associates the valve model identification result obtained in step four with a pre-established spraying trajectory database. After identifying the valve model, it automatically calls the corresponding standard spraying program and, combined with the pose transformation relationship obtained in step five, performs coordinate mapping, position compensation, and attitude correction on the standard spraying trajectory, so that the corrected spraying trajectory matches the actual spatial position and attitude of the valve to be sprayed. This forms a closed-loop control scheme from point cloud acquisition, target recognition, precise positioning to automatic spraying trajectory correction and robot spraying execution.
[0117] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the above embodiments are merely illustrative of the technical concept and characteristics of the present invention, intended to enable those skilled in the art to understand and implement the invention, and should not be construed as limiting the scope of protection of the present invention. All equivalent changes or modifications made in accordance with the spirit and essence of the present invention should be covered within the scope of protection of the present invention.
Claims
1. A method for intelligent identification and positioning of valve spraying based on neural networks, characterized in that: Includes the following steps: S1. Original point cloud acquisition for valves Before the spraying operation begins, a 3D industrial camera is used to perform a spatial scan of the valves to be sprayed in the spraying work area to obtain the corresponding original 3D point cloud data. The original point cloud data is a set of spatial points expressed in a unified coordinate system, which includes not only the geometric information of the valve body, but also the interference point cloud introduced by the environmental background, light reflection, suspended particles and surrounding equipment. S2. Point cloud preprocessing, Preprocessing is performed on the raw point cloud data obtained in step S1 to reduce data redundancy and improve point cloud quality. The preprocessing includes at least the following steps: 1) Downsampling: The point cloud is sparsified by using Poisson disk sampling, uniform sampling or voxel downsampling to make the point cloud more uniformly distributed in space, while preserving the key geometric features of the valve. 2) Spatial area clipping: Based on the preset spraying work area range, the point cloud is constrained and filtered to remove irrelevant point clouds located outside the work area; 3) Noise Removal: Remove isolated points and environmental noise point clouds through threshold constraints or neighborhood statistical analysis methods; S3. Point cloud coarse standardization processing. The preprocessed point cloud data is standardized to reduce the differences in spatial location, orientation and scale of point clouds under different acquisition conditions; The coarse normalization process includes at least one of the following: 1) Centralization processing: Calculate the geometric center of the point cloud and translate the entire point cloud to a local coordinate system with the geometric center as the origin; 2) Point count unification: The point cloud is unified into a fixed number of point sets through resampling; 3) Scale normalization: The point cloud is scaled proportionally to represent valves of different sizes within a uniform scale range; 4) Coarse alignment of principal orientation: The principal orientation of the point cloud is estimated based on the principal component analysis method, and the overall pose of the point cloud is initially aligned; S4. Valve model recognition based on neural network. The standardized point cloud processed in step S3 is input into a 3D point cloud recognition neural network to automatically identify the valve model. Specifically, it includes: A standard valve point cloud dataset was constructed and trained offline to obtain a stable recognition model; During the online phase, the point cloud to be identified is input into the trained model, and the valve model or category number is output. Based on the feature similarity determination mechanism, the recognition results are screened for confidence level to improve the reliability of recognition. S5. Precise registration and localization based on template point clouds. After obtaining the valve model identification result, retrieve the standard valve point cloud template corresponding to the model from the pre-established standard template library; The template point cloud is registered with the current measured point cloud to solve the optimal rigid body transformation relationship between the two, thereby obtaining the accurate spatial pose information of the current valve. S6. Automatic matching and correction of spraying trajectory Based on the valve model identification result obtained in step S4, the standard spraying trajectory program corresponding to the model is automatically called from the pre-built spraying trajectory database; Based on the spatial pose information obtained in step S5, coordinate transformation and attitude correction are performed on the standard spraying trajectory to ensure that the spraying path is consistent with the actual spatial position of the current valve; the correction process includes at least: trajectory point coordinate mapping, spray gun attitude direction adjustment, and compensation for the positions of the starting and ending spray points. S7. The robot performs automatic spraying. The spraying trajectory, corrected by step S6, is sent to the spraying robot control system, which drives the robot to perform the spraying operation according to the target trajectory. The robot first moves to the preset starting position, and then performs continuous spraying according to the corrected trajectory path, while maintaining the spray gun posture and matching the geometric features of the valve surface during the spraying process.
2. The intelligent identification and positioning method for valve spraying based on neural networks according to claim 1, characterized in that: In step S1, the initial valve point cloud data acquired using a 3D industrial camera is processed by the Poisson disk sampling algorithm in step S2 to achieve point cloud simplification and noise reduction. The specific implementation is as follows: The initial point cloud data acquired by 3D industrial cameras suffers from disorder and redundancy, which not only increases the computational burden of subsequent point cloud processing and prolongs recognition time, but also easily leads to recognition errors in single-algorithm vision systems. The Poisson disk sampling algorithm can specifically address these issues, effectively preserving the outer contour structure of the valve workpiece while achieving ordered and simplified point cloud processing. To facilitate subsequent point cloud data processing, the acquired point cloud data needs to be defined in terms of coordinates. The origin of this three-dimensional coordinate system can be flexibly set, for example, using the origin of the camera coordinate system or any spatial point as the origin, and its expression is: ; in A 3D coordinate dataset representing a point cloud; p1 express Point cloud 3D spatial point coordinates; After processing, each point in the point cloud data has three-dimensional coordinates in the same spatial coordinate system; however, although the coordinates of the point cloud have been defined, downsampling processing has not yet been performed, and the overall distribution is still relatively dense. Downsampling is performed during preprocessing to ensure that each point cloud point maintains an equidistant or relatively large spacing constrained by spheres of the same radius. The formula is as follows: ; in Indicates the distance between controllable spatial point clouds; After downsampling, the point cloud distribution becomes more uniform, avoiding local clustering issues. However, the point cloud still contains interfering point clouds unrelated to the valve workpiece (such as dust in the working environment, point clouds of unrelated surrounding workpieces, etc.). Filtering out these irrelevant interfering point clouds ensures that the valve workpiece's point cloud data is retained singularly and completely within the recognition area. The formula is as follows: ; in This indicates the calibrated work area of the workpiece.
3. The intelligent identification and positioning method for valve spraying based on neural networks according to claim 1, characterized in that: In step S3, principal component analysis is used to estimate the principal orientation of the point cloud to achieve coarse alignment of the valve point cloud under a unified coordinate representation. This step is only used to improve the consistency and stability of the recognition model input.
4. The intelligent identification and positioning method for valve spraying based on neural networks according to claim 3, characterized in that: In step S3, the 3D Principal Component Analysis (PCA) algorithm is used. This algorithm can establish target spatial coordinates for point cloud data that still lacks a clear pose reference after processing in step S2, adapting them to the valve spraying scenario. This replaces the temporary coordinates set in step one, ensuring that the coordinate vector relationships between point clouds remain unchanged. The specific implementation is as follows: Extract the point cloud dataset P*={p*1 after preprocessing in step S2. ,in Represents the three-dimensional coordinates of the i-th point (including key valve feature points such as flanges and valve stems); at this time, the point cloud is still in a disordered state with an undefined origin and no unified pose reference, but the relative vector relationship between each point cloud remains unchanged; After obtaining the point cloud dataset preprocessed in step S3, the mean values of its x, y, and z coordinates need to be calculated to eliminate the overall offset interference of the point cloud in each dimension. The temporary coordinate origin set in step two can be the origin of the camera coordinate system or any spatial point within the camera's field of view. It is not the optimal coordinate scheme for valve spraying operations, and this temporary coordinate cannot focus the coordinate origin and spatial vector relationship on the valve body. In order to concentrate the coordinate system on the dense area of the point cloud corresponding to the valve, that is, the area where the valve body is located, the offset of the point cloud data preprocessed in step two needs to be eliminated by calculating the three-dimensional mean values of x, y, and z, so that the point cloud data is more concentrated in the valve area. The formula is as follows: ; in This represents the total number of points in the valve point cloud. Indicates the geometric center of the valve point cloud; Based on the mean values of the x, y, and z 3D coordinates of the valve point cloud dataset after offset elimination, the variance of each dimension and the covariance between dimensions are further calculated. The variance characterizes the degree of dispersion of the point cloud data within a single dimension from its mean, while the covariance characterizes the correlation between the point cloud data in two dimensions of the valve point cloud space and their respective mean deviations. This lays the foundation for subsequent matrix quantization to describe the discrete distribution characteristics of the valve point cloud in each spatial direction. The formula is as follows: ; The same applies to the other elements; among which Represents the variance in the x-dimensional dimension. This represents the covariance of the x and y dimensions; Based on the calculated three-dimensional variances of x, y, and z, and the inter-dimensional covariance, a covariance matrix C is constructed to characterize the spatial discreteness of the valve point cloud. All elements of this matrix are derived from the aforementioned variances and covariances: the diagonal elements represent the variances of each dimension, quantifying the degree of discreteness of the point cloud in a single dimension; the off-diagonal elements represent the inter-dimensional covariances, characterizing the correlation between the discreteness of point clouds in different dimensions. This matrix representation of the point cloud's spatial distribution characteristics provides crucial mathematical model support for subsequent 3D principal component analysis to extract the valve's principal direction and complete coordinate calibration. The formula is as follows: ; Where C represents the covariance matrix of the valve spatial point cloud; Diagonalizing the covariance matrix C yields eigenvalues and their corresponding eigenvectors; this creates a new three-dimensional coordinate system with the origin at C. ; Diagonalizing the covariance matrix C yields the result that satisfies eigenvalues and corresponding eigenvectors This leads to the establishment of a new three-dimensional coordinate system adapted to the valve spraying posture requirements. The origin of this coordinate system is the mean of the three-dimensional coordinates calculated in step 302. Its formula is: ; Where D represents a diagonal matrix with diagonal elements being eigenvalues; represents an orthogonal matrix formed by eigenvectors; and represents the dominant geometric directions of the valve, such as the valve stem axis.
5. The intelligent identification and positioning method for valve spraying based on neural networks according to claim 1, characterized in that: In step S4, the neural network adopts the PointNet++ structure (a deep learning network structure for 3D point cloud data). Through hierarchical feature learning of the point cloud data, it achieves the fusion and extraction of local geometric features and overall structural features, and outputs the corresponding valve category label. The specific method is as follows: Point cloud input standardization adaptation; PointNet++ network requires the input point cloud to have a fixed number of points and a unified data format to ensure the stability and comparability of feature extraction; the standardized point cloud output in step three may have different point numbers due to different valve models and scanning accuracies, requiring further standardization processing: a uniform sampling strategy is adopted to uniformly sample the point clouds of different valves to a fixed number of points N (preferably N=1024 in this invention, balancing feature integrity and computational efficiency); during the sampling process, the point cloud density of key feature regions of the valve is preserved to avoid the loss of key geometric information; the standardized point cloud input can be represented as: ; in, This represents the set of input points for the PointNet++ network. Let i be the standardized coordinates of the i-th point cloud. These are the three-dimensional coordinates in the standardized coordinate system of step three; N=1024 is the fixed number of input points; PointNet++ network feature extraction: This step utilizes PointNet++'s three-level structure of point-level feature transformation, local feature aggregation, and global feature pooling to transform the disordered point cloud into a fixed-length global feature vector that can represent the valve model. The specific process is as follows: Point-level feature transformation: To address the issue of point cloud disorder, a learnable 3×3 transformation matrix M (point cloud alignment matrix) is introduced for each input point. Spatial alignment and feature enhancement are performed to ensure consistency in the point cloud features of the same valve model under different poses; the formula is as follows: ; Where M is the 3×3 point cloud alignment matrix learned by the PointNet++ network training, with 9 learnable parameters used to correct the spatial pose deviation of the point cloud. The coordinates of the aligned points; For input points The transpose of ; Local feature aggregation: aligning the coordinates of points The input is a multilayer perceptron (MLP), which extracts local geometric features of each point through nonlinear transformations, such as the point's curvature, neighborhood density, and relative distance to the valve center, thus transforming coordinate information into feature information. The MLP structure is set to 3-dimensional, 64-dimensional, or 128-dimensional, and its formula is as follows: ; in, Let be the 128-dimensional local feature vector of the i-th point; The weight matrix is a "3×64" matrix. The weight matrix is "64×128"; It is a non-linear activation function used to enhance feature representation capabilities; Global Feature Pooling: Max-pooling is used to aggregate N local feature vectors into a single fixed-length global feature vector. This vector contains comprehensive information about the valve's overall geometry and key local features, representing the valve model's feature fingerprint. The formula is as follows: ; Where F is a 128-dimensional global feature vector, which is also the core feature representation of the valve model; This means taking the maximum value of the k-th local feature of all points to ensure that the global feature can cover the key geometric properties of the valve; Feature matching and valve model recognition are performed by pre-constructing a "pre-trained feature library" containing various standard valve models. This library uses a large number of standard valve samples, covering point cloud data of gate valves, ball valves, globe valves, etc. of different specifications and models. After training with a PointNet++ network, the global feature vectors of each standard model are extracted and stored. , (Total number of standard models); the model identification process is as follows:
1. Calculate the global feature vector F of the valve to be identified and the standard feature vectors in the feature library. The cosine similarity quantifies the degree of feature matching between two pairs. The similarity formula is: ; in, The similarity between the feature to be identified and the kth standard feature is denoted as , with a value range of [0,1]. The dot product of two vectors; Let be the norms of the two vectors, respectively.
2. Set the similarity threshold T: If a unique standard eigenvector exists satisfy If T ≥ T, then the valve to be identified is determined to be of the same model as the feature corresponding to that feature; If there are multiple satisfy If the similarity is greater than or equal to T, then the model corresponding to the maximum similarity is taken as the recognition result; If all If the value is less than T, the output will indicate that no matching model was found, prompting manual verification.
6. The intelligent identification and positioning method for valve spraying based on neural networks according to claim 1, characterized in that: In step S5, the registration process employs an iterative nearest-point method, including: Establish the correspondence between template point clouds and measured point clouds; Construct the error function and solve for the optimal rotation matrix and translation vector; Output the homogeneous transformation matrix describing the spatial pose; This step enables the conversion from category recognition results to precise spatial positioning.
7. The intelligent identification and positioning method for valve spraying based on neural networks according to claim 1, characterized in that: In step S5, after identifying the valve type, the standard template point cloud corresponding to that type is called, and then the template point cloud is aligned with the valve point cloud that is actually captured in the current image, so as to finally determine the accurate position and attitude of the valve in space. Based on the valve model identification result output in step S4, retrieve the standard valve point cloud template corresponding to that model from the standard template library. Let: ; in, It is a pre-built standard valve point cloud in the database; It is the actual valve point cloud obtained by current industrial camera scanning and after the previous preprocessing; The template point cloud and the measured point cloud are initially normalized to significantly reduce the distance deviation in subsequent ICP point cloud registration. Through centering, the two sets of point clouds are translated to a coordinate system with their own geometric centers as the origin, reducing the adverse effects of large-scale positional shifts on the subsequent registration process. The centering formula is as follows: ; in, It is the geometric center of the template point cloud; It is the measured geometric center of the point cloud: These are the coordinate systems of the centralized template valve and the actual valve point cloud; Establish the correspondence between the template point cloud and the measured point cloud; in the ICP algorithm, it is necessary to first find the nearest neighbor point in the measured point cloud for each point in the template point cloud and establish a corresponding point pair; let the nth point in the template point cloud be n. 𝑖 Then, find the point 𝑝 that is closest to it in the measured point cloud. 𝑖 The formula is as follows: ; in, Represents the set of measured point clouds; Represents a set Any candidate point in the; This represents the finally selected nearest neighbor. To align the template point cloud and the measured point cloud as closely as possible, it is necessary to solve for an optimal rigid body transformation, including the rotation matrix R and the translation vector t, to minimize the error between the two sets of point clouds. The goal is to find the most suitable rotation and translation so that the transformed template point cloud coincides with the measured point cloud as closely as possible. The specific formula is as follows: ; in, It is a rotation matrix; It is a translation vector; The number of corresponding point pairs participating in the registration; The optimal rotation matrix is obtained by minimizing the above error function. Translation vector First, we need to find the center of the template and the actual corresponding points. Then, we construct a decentralized point set, consistent with the 502 step. Next, we construct the covariance matrix and perform singular value decomposition on the covariance matrix to obtain the rotation matrix and translation vector. The specific formulas are as follows: ; in, The covariance matrix is composed of two centralized point cloud sets; To solve the left singular value matrix of SVD; To solve the right singular value matrix of SVD; The obtained rotation matrix R and translation vector t are further combined into a homogeneous transformation matrix, which is used to uniformly describe the rotation and translation relationships of the target in space. The specific expression is as follows: ; This allows us to obtain the complete pose transformation relationship.
8. The intelligent identification and positioning method for valve spraying based on neural networks according to claim 1, characterized in that: In step S6, after the vision system completes the type matching between the target valve and the preset valve library, it triggers the spraying industrial robot to perform the corresponding spraying operation. The vision system first calculates the offset distance and the starting point coordinates of the offset vector, and then performs precise calibration on the preset spraying trajectory. The specific implementation is as follows: After obtaining the valve model identification result and accurate spatial pose information, the corresponding standard spraying program is automatically called from the pre-established spraying trajectory database according to the valve identification category. Based on the pose transformation relationship obtained in step five, the standard spraying trajectory is subjected to coordinate mapping, position compensation and posture correction so that the corrected spraying trajectory matches the actual spatial position and posture of the valve to be sprayed. The corrected spraying trajectory is sent to the spraying robot control system, and the spraying robot moves to the starting position according to the preset control instructions and completes the automatic spraying operation on the valve surface along the corrected spraying path.