Edge spraying compensation control method based on intelligent visual feedback
By acquiring the spatial features of the workpiece through a multi-view vision acquisition device and performing real-time image registration, and dynamically adjusting the spray gun parameters, the problem of uneven edge coverage in existing spraying control technology is solved, achieving high-precision and consistent edge spraying control, and improving the applicability of automated spraying systems and the automation level of production lines.
Patent Information
- Application Number
- CN202511431425.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-09
- Publication Date
- 2026-01-13
Smart Images

Figure CN121329905A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of spraying control technology, and in particular to an edge spraying compensation control method based on intelligent visual feedback. Background Technology
[0002] In existing spraying processes, the edges and complex curved areas of the workpiece are typically controlled using spraying methods based on fixed trajectories or preset parameters. These methods largely rely on manual teaching, static trajectory planning, or empirical parameter compensation, achieving local thickness adjustments by setting edge deceleration zones or spray width scaling zones in the spray gun path. Some systems incorporate vision inspection devices to detect coating uniformity or defect distribution after spraying, but these inspection results are usually only used for quality assessment or offline correction, failing to form a real-time feedback loop. Existing spraying control processes are mostly executed with fixed parameters, exhibiting poor adaptability to workpiece material reflectivity, boundary curvature variations, and ambient lighting effects. Therefore, in high-precision spraying applications, maintaining spraying consistency still primarily relies on manual adjustments and post-processing.
[0003] However, when dealing with workpieces with irregular shapes, abrupt changes in boundary curvature, or complex reflective properties, existing spraying control methods are prone to problems such as insufficient edge coverage, overspraying, paint buildup, and uneven spray overlap. Because the relative posture, distance, and pressure between the spray gun and the workpiece surface cannot be corrected in real time, the thickness distribution of the sprayed area often exhibits non-linear deviations. Even when using traditional vision inspection methods, the inability to correlate the dynamic parameters of the spray gun with changes in the spraying state in real time leads to compensation lag and response delays, making it difficult to achieve precise control and automated adjustment of edge spraying.
[0004] To address the issues of uneven coating in edge areas and parameter lag correction during the spraying process, it is urgently necessary to propose an edge spraying compensation control method that can utilize visual feedback to achieve dynamic adjustment of spraying parameters. Summary of the Invention
[0005] This application provides an edge spraying compensation control method based on intelligent visual feedback to improve the uniformity and consistency of the coating on the edge of the workpiece.
[0006] This application provides an edge spraying compensation control method based on intelligent visual feedback, including: A multi-view vision acquisition device arranged near the spray gun is used to spatially scan the workpiece to be sprayed, and to acquire spraying image data including boundary curvature, surface normal direction and reflected light intensity distribution. The spatial correspondence between the spray gun motion coordinates and the workpiece surface coordinates is determined based on the spraying image data, so as to be used for the registration of the spraying image during the spraying process. Based on the spatial correspondence, the spraying images acquired in real time during the spraying process are registered to obtain edge region spraying images synchronized with the spray gun movement trajectory. Based on the edge region spraying images, the geometric boundary lines, brightness gradient changes and coating adhesion areas of the workpiece edge are identified to generate edge feature data to describe the current spraying state. Based on the difference between edge feature data and preset target spraying image, the spraying coverage deviation and boundary overlap error at the edge of the workpiece are calculated, and the difference is used as the basis for control correction. The coating thickness change trend, light density change rate and boundary direction offset are extracted to generate spray gun posture adjustment amount, spray distance correction amount, spray pressure correction amount and path speed correction amount. The angle, spray distance, spray pressure, and movement speed of the spray gun are dynamically adjusted by using the generated spray gun attitude adjustment amount, spray distance correction amount, spray pressure correction amount, and path speed correction amount, so that the coating thickness in the edge area tends to be uniform, and a new spraying image is acquired at the end of each adjustment cycle.
[0007] The beneficial effects of the technical solution provided in this application include: (1) The spatial features of the workpiece edge are acquired by a multi-view visual acquisition device, and real-time image registration and feature extraction are performed during the spraying process. This enables the spraying deviation to be identified in real time and used for dynamic correction, thereby realizing continuous feedback control of edge spraying and significantly improving spraying accuracy and consistency. (2) By linking the spray gun posture, spray distance, spray pressure and movement speed, multi-dimensional synchronous compensation is performed based on the real-time calculated spraying coverage deviation, boundary overlap error and light density change. This effectively avoids the local over-compensation or under-compensation phenomenon caused by traditional single-parameter adjustment, making the edge coating thickness more uniform. (3) This method introduces boundary curvature and surface normal direction analysis in the feature extraction stage. It can dynamically adjust the spraying trajectory and posture parameters according to the geometric changes of the workpiece. It is particularly suitable for complex workpieces with curved transition, sharp edges or reflective features, expanding the application range of the automatic spraying system. (4) Through visual feedback and adaptive adjustment mechanism, the automatic optimization and periodic update of spraying parameters are realized. It can maintain a stable spraying effect under different materials, different lighting and different batch conditions, significantly reducing the workload of manual debugging and inspection, and improving the automation level and consistency of the production line. Attached Figure Description
[0008] Figure 1 This is a flowchart of an edge spraying compensation control method based on intelligent visual feedback provided in the first embodiment of this application. Detailed Implementation
[0009] Many specific details are set forth in the following description to provide a full understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this application; therefore, this application is not limited to the specific embodiments disclosed below.
[0010] The first embodiment of this application provides an edge spraying compensation control method based on intelligent visual feedback. Please refer to... Figure 1 This figure is a schematic diagram of the first embodiment of this application. The following is in conjunction with... Figure 1 The first embodiment of this application provides a detailed description of an edge spraying compensation control method based on intelligent visual feedback.
[0011] Step S101: The workpiece to be sprayed is spatially scanned by a multi-view vision acquisition device arranged near the spray gun to obtain spraying image data including boundary curvature, surface normal direction and reflected light intensity distribution. The spatial correspondence between the spray gun motion coordinates and the workpiece surface coordinates is determined based on the spraying image data for the registration of the spraying image during the spraying process.
[0012] The implementation of step S101 aims to establish a geometric correspondence between the spray gun and the workpiece through precise visual spatial scanning, providing a reliable spatial basis for subsequent registration of sprayed images and edge feature extraction. In this step, multiple industrial-grade vision acquisition devices are first arranged around the spray gun. These devices can be binocular cameras, structured light sensors, or laser scanning units, and must be arranged at a certain angle around the spray gun's spray axis so that their fields of view collectively cover the spraying area. To ensure the accuracy of the 3D data, the observation areas of these cameras should have a significant overlap, typically no less than two-thirds, to ensure sufficient feature points for depth matching between images during spatial calculations. The vision devices should be fixed at a position no more than 15 cm from the nozzle end face to continuously acquire images of the workpiece surface within the spraying area during spraying.
[0013] Before spraying, the workpiece surface is scanned from all angles. Each vision acquisition device continuously captures images at a set frequency while the spray gun is stationary, for example, thirty images per second. The trigger signal of the acquisition device is synchronized with the spray gun control signal, ensuring that each image corresponds one-to-one with the specific position of the spray gun in space. The parallax information between the images is processed by a computer to reconstruct the three-dimensional morphology of the workpiece surface, thus obtaining a surface dataset composed of a large number of points. Through the spatial relationship of these points, the surface undulation characteristics of the workpiece can be estimated, thereby obtaining the distribution of boundary curvature. The magnitude of the boundary curvature reflects the degree of curvature of the workpiece surface. When the surface is relatively flat, the height change between adjacent points is small; when there are sharp edges or abrupt changes in curvature, the height change between adjacent points increases significantly. By comparing the height changes of adjacent areas point by point, it is possible to determine which areas of the workpiece surface are flat, and which areas are edges or corners.
[0014] When extracting the surface normal direction, it is necessary to determine the orientation of each point on the workpiece surface. During calculation, three adjacent points on the workpiece surface can be selected, and the orientation of that local surface can be determined based on their spatial relationship. For example, when three points approximately form a small plane in space, the positive direction of that plane, which is the surface normal direction, can be determined based on their relative height and orientation. To ensure overall consistency, the direction of all normals should be consistent with the direction of the light source, i.e., all pointing outwards. If the workpiece is made of a highly reflective metal, the trend of reflected light intensity variation must also be considered when determining the normal direction. In this case, the normal direction can be further corrected by observing the direction of brightness changes in adjacent areas, aligning the position of strongest brightness with the normal direction, thereby obtaining more accurate surface orientation information.
[0015] The distribution of reflected light intensity is obtained by measuring the changes in the brightness of reflected light on the workpiece surface. Under constant illumination, the vision device records the brightness value of each pixel. The differences in reflected light brightness from different materials and angles form a light intensity distribution map. The brightness value reflects the surface's light absorption or reflection characteristics. For example, plastic surfaces have more dispersed reflection and therefore a gentler brightness change, while metal surfaces have concentrated reflection and a more dramatic brightness change. To describe this difference, the brightness changes of adjacent areas in the image can be compared. A large difference in brightness between adjacent areas indicates a significant change in the surface reflection direction, i.e., the presence of a curved surface transition or boundary; a stable brightness change indicates a relatively smooth surface. To eliminate the influence of different lighting conditions, the entire image can be normalized to ensure that the brightness distribution is compared on a uniform scale.
[0016] After completing multi-view data acquisition, it is necessary to establish the spatial correspondence between the spray gun and the workpiece surface. This relationship describes the correspondence between the spray gun's spray point and the sprayed position on the workpiece surface. Specifically, the spray gun's coordinate system is based on the nozzle center as the origin and the spray direction as the vertical axis; the workpiece's coordinate system is based on the clamping reference point as the origin and the workpiece normal as the vertical direction. By calibrating the workpiece, the rotational and translational relationship between the two can be determined. For example, a calibration plate with a known geometric pattern can be placed on the workpiece, allowing a vision device to capture and identify the positions of multiple marker points on the pattern, while simultaneously recording the spatial position of the spray gun when these marker points are aligned. By comparing the pixel positions of the marker points in the image with the recorded spatial positions of the spray gun, the spatial offset and angular difference between the spray gun and the workpiece can be calculated. This process requires repeated measurements at multiple locations to ensure data stability and average accuracy. After calculation, a set of parameters describing the spatial relationship between the spray gun's motion coordinates and the workpiece surface coordinates can be obtained.
[0017] After establishing the spatial correspondence, each movement position of the spray gun can be mapped to a specific location in the workpiece surface image. In this way, the spray gun's movement trajectory corresponds one-to-one with the spraying area in the image. During subsequent spraying, the vision acquisition device registers the images in real time according to this relationship, ensuring that each frame of the acquired spraying image accurately reflects the workpiece surface area corresponding to the current spray gun. To verify the accuracy of the correspondence, a test spray method can be used. This involves spraying a small amount of test material onto the workpiece surface and then comparing the deviation between the actual spray point and the expected position using a visual image. If the error is less than a predetermined allowable value (e.g., within 0.2 mm), the calibration accuracy meets the requirements.
[0018] In practice, the spraying image data must simultaneously contain three feature information: boundary curvature, surface normal direction, and reflected light intensity distribution. The combination of these three constitutes a complete visual description of the workpiece surface: boundary curvature distinguishes between planar and edge structures, the normal direction guides the spray gun attitude adjustment, and reflected light intensity reflects surface characteristics and material differences. By uniformly storing this information as a spraying image dataset, accurate basic data can be provided for subsequent image registration, edge feature recognition, and spraying compensation calculations.
[0019] In summary, step S101 achieves precise mapping between the spray gun coordinates and the workpiece surface coordinates through spatial scanning and optical feature extraction, providing a basis for spatial registration of visual data for each frame during the spraying process. This step ensures the consistency of visual feedback and spray gun control in time and space during the spraying operation, enabling subsequent edge recognition and compensation control to be repeatable and highly accurate, and realizing a reliable connection between visual perception and motion control.
[0020] Furthermore, the step of using a multi-view vision acquisition device positioned near the spray gun to spatially scan the workpiece to be sprayed, acquiring spraying image data including boundary curvature, surface normal direction, and reflected light intensity distribution, and determining the spatial correspondence between the spray gun's motion coordinates and the workpiece's surface coordinates based on the spraying image data for registration of the spraying image during the spraying process includes: A multi-view vision acquisition device located near the spray gun is used to simultaneously image the edge area of the workpiece to be sprayed from multiple angles. The boundary point set of the workpiece edge is identified by the overlapping area of the images from different viewpoints, and the boundary curvature distribution is calculated based on the spatial difference of the boundary points in each viewpoint to characterize the geometric change features of the workpiece surface. Based on the boundary curvature distribution, the reflected light intensity of the spraying image data in the same area is compared, the relationship between the reflected light intensity and the incident angle is analyzed, the surface normal direction corresponding to each boundary point is determined, and the reflected light intensity, surface normal direction and boundary curvature are correlated to form spraying image data containing geometric and optical information. Based on the spatial correspondence between the spray gun spray center and the feature points on the workpiece surface in the spraying image data, the spatial correspondence between the spray gun motion coordinates and the workpiece surface coordinates is determined. The spray gun motion coordinates are synchronously corrected with the imaging position of the spray gun spray center as the reference, so that the spray gun motion coordinates maintain spatial stability within the workpiece surface range. The determined spatial correspondence is applied to the spraying image registration process. The spraying image acquired in real time during the spraying process is compared with the spraying image data containing boundary curvature, surface normal direction and reflected light intensity distribution. The spatial offset caused by changes in spray gun posture, atomization diffusion or light reflection is corrected so that the spraying image remains consistent with the workpiece surface under dynamic spraying conditions.
[0021] In implementing the edge spraying compensation control method based on intelligent visual feedback, the multi-view visual acquisition device arranged near the spray gun undertakes the core task of acquiring the spatial geometric and optical features of the workpiece.
[0022] During the spraying preparation stage, the multi-view vision acquisition device typically consists of two or three industrial cameras, fixed at different angles to the spray gun nozzles, ensuring their lines of sight converge at a certain angle on the workpiece edge area. The cameras should have high resolution (e.g., 2 megapixels or higher) and a global shutter function to avoid image blurring caused by spraying motion. The viewing angle difference between the cameras should be between 15° and 45° to ensure sufficient parallax for 3D reconstruction without causing light obstruction or excessive reflection. Once the workpiece enters the spraying area, the multi-view vision acquisition device synchronously triggers image capture, using high-frequency flash or structured lighting to ensure clear images are obtained under the spraying illumination environment.
[0023] After multi-view synchronous imaging, the system identifies the set of boundary points of the workpiece through the overlapping areas of the images. Boundary points are consecutive pixels where the brightness, color, or depth of the workpiece surface changes significantly, typically located at the boundary between the workpiece and the background. In practice, a pixel can be determined as a boundary point by detecting whether the grayscale gradient change rate exceeds a set threshold (e.g., a gradient change exceeding 8 bits of grayscale difference). For boundary points at the same spatial location in multi-view images, spatial matching can be performed using camera intrinsic and extrinsic parameters to obtain the 3D coordinate differences of these boundary points under different viewpoints. The boundary curvature can be calculated based on the geometric relationships between these 3D coordinate points. For example, when the included angle between three adjacent points is small and the height difference is large, the curvature value is high, indicating a significant edge bend or undulation at that location. Those skilled in the art will understand that this curvature calculation does not depend on a specific algorithm; it only requires a geometric judgment of the spatial offset trend of the points.
[0024] After obtaining the boundary curvature distribution, further analysis of the optical characteristics of the workpiece surface is needed to help determine the surface normal direction. The intensity of light reflection is closely related to the surface normal direction. If the angle between the light ray and the normal is small, the reflected light intensity is large; if the angle increases, the reflected light intensity decreases. Therefore, the change in reflected light intensity measured at the same boundary point under different camera views can be used to determine its normal direction. Specifically, the system compares the brightness differences of the same boundary point in images from different viewpoints. If the brightness is the highest at a certain viewpoint, it indicates that the angle between that viewpoint and the normal direction is the smallest, meaning that this direction is closer to the surface normal. Through this relative brightness comparison, the surface normal direction of each boundary point can be obtained. Subsequently, a correspondence is established between reflected light intensity, surface normal direction, and boundary curvature to obtain spraying image data that contains both geometric morphological information and optical characteristics.
[0025] After generating the spraying image data, it is necessary to establish the spatial correspondence between the spray gun motion coordinates and the workpiece surface coordinates. The spray gun motion coordinates are a spatial coordinate system with the spray gun spray center as the origin, used to describe the nozzle's trajectory; the workpiece surface coordinates are a coordinate system with the workpiece's geometric center or mounting surface as the origin, used to characterize the spatial position of the sprayed area. To establish this correspondence, the imaging position of the spray gun spray center in the spraying image must first be detected. The spray center is typically represented by a brightness peak area or the point of highest spray density in the image, and its pixel coordinates can be determined through brightness centroid analysis. Then, based on the camera's spatial calibration parameters, these pixel coordinates are converted into a spatial position in the spray gun coordinate system. Finally, based on the spatial positions of the workpiece surface feature points (obtained from the aforementioned multi-view reconstruction), the relative transformation matrix between the two coordinate systems is calculated, including rotation and translation components. This matrix is used to describe the spatial correspondence between the spray gun motion coordinates and the workpiece surface coordinates.
[0026] Because the spray gun experiences slight vibrations or posture deviations during the spraying process, synchronous correction of the spray gun's motion coordinates is necessary to ensure real-time accuracy of spatial correspondence. This correction is achieved by continuously monitoring the positional changes of the spray gun's spray center in the image. If the deviation from the original reference position exceeds a threshold (e.g., a pixel offset corresponding to 0.3 mm), the transformation parameters of the spray gun coordinates are adjusted to realign it with the workpiece surface coordinates. This process ensures that the spray gun's spatial position remains consistent with its visual coordinates as it moves within the workpiece surface area, preventing error accumulation caused by spray gun vibrations or atomization diffusion.
[0027] After establishing the spatial correspondence, this relationship is applied to the registration of the sprayed images. Registration refers to aligning the spatial positions of images acquired at different times or from different perspectives for comparison or fusion. During the spraying process, the real-time acquired sprayed images may experience spatial shifts due to the movement of the spray gun and changes in the workpiece shape. In this case, by comparing the images with previously acquired sprayed image data containing boundary curvature, surface normal direction, and reflected light intensity distribution, the system can identify the shifted areas caused by attitude changes, light reflection, or spray diffusion. For example, if the brightness change in a certain area of the real-time image does not match the expected light intensity distribution, it indicates that the spatial position of that area has shifted. The system will correct this according to the spatial correspondence, realigning the real-time image to the actual position on the workpiece surface.
[0028] This dynamic registration mechanism ensures that the sprayed image remains consistent with the workpiece surface throughout the spraying process. Through this process, the spraying system can continuously acquire accurate visual feedback data, providing a stable foundation for subsequent edge recognition, spray thickness assessment, and compensation control. Especially when the workpiece shape is complex or there is strong reflected light interference during spraying, this method can effectively suppress image drift and positional errors, ensuring the spatial positioning accuracy of the sprayed edges.
[0029] In summary, this step identifies and reconstructs overlapping areas from multi-view images, determines the surface normal direction by combining the light intensity variation pattern, and further establishes a dynamic correspondence mechanism using the relative spatial relationship between the spray gun's spray center and workpiece feature points. This enables high-precision mapping between the spray gun's motion coordinates and the workpiece's surface coordinates. This process not only provides a reliable geometric and optical basis for spray image registration but also forms a spatial reference that self-corrects with the spray gun's posture, ensuring that subsequent edge spray compensation control remains accurate and stable even in constantly changing spraying environments.
[0030] Step S102: Based on the spatial correspondence, the spraying images acquired in real time during the spraying process are registered to obtain edge region spraying images synchronized with the spray gun movement trajectory. Based on the edge region spraying images, the geometric boundary lines, brightness gradient changes and coating adhesion areas of the workpiece edge are identified to generate edge feature data describing the current spraying state.
[0031] In step S102, the spraying images acquired in real time during the spraying process need to be registered according to the spatial correspondence determined in step S101. This results in an edge region spraying image that is strictly synchronized with the spray gun's movement trajectory. Based on this, edge feature data that can accurately describe the spraying state is extracted. The core of this step is to ensure the spatiotemporal correspondence between the spraying image and the spray gun movement, so that every change in the spraying state can be captured by the vision system in real time and form calculable visual feedback information.
[0032] In practice, image registration refers to geometrically correcting the real-time acquired image data according to the spatial correspondence between the spray gun and the workpiece, ensuring that each pixel in the image corresponds to the actual spatial coordinates of the workpiece surface. Because the spray gun moves continuously during the spraying process, while the camera's angle of view remains relatively fixed, unregistered images will experience positional drift or deformation. To eliminate this error, the perspective of the image needs to be adjusted based on the spray gun's motion posture, spatial displacement, and the workpiece surface geometry at each moment, so that images acquired at different times are mapped to a unified workpiece coordinate system. Image registration can be achieved through a combination of feature point matching and posture calculation. Specifically, by identifying geometric feature points or artificially marked points on the workpiece surface, the relative pose between the spray gun's current position and these feature points is calculated, and then the real-time image is spatially remapped based on this pose. In this way, each pixel in the sprayed image corresponds to a specific physical position on the workpiece surface, thus achieving continuous spatial monitoring of the spraying process.
[0033] After registration, the geometric boundary lines of the workpiece need to be identified from the obtained edge area sprayed image. Geometric boundary lines refer to abrupt changes in brightness or texture termination lines in the visual image of the workpiece's shape or internal structure; they typically correspond to areas where the normal to the workpiece surface changes drastically. During identification, the boundary location can be determined by analyzing the rate of change of grayscale values in the image. When the brightness difference between adjacent areas of the image exceeds a certain threshold, the location can be identified as a boundary point. To avoid false boundaries caused by illumination or reflection, correction is needed by incorporating the workpiece's normal direction information in space. For example, a true geometric boundary can only be determined when the brightness abrupt change aligns with the trend of the normal direction change. By continuously extracting boundary points and performing smooth fitting, a complete workpiece edge line contour can be formed.
[0034] After edge recognition, it is also necessary to detect changes in brightness gradient in the image. Brightness gradient reflects the changing trend of surface reflected light intensity and can indirectly reflect coating thickness and surface smoothness. For images during the spraying process, areas with thicker coatings have lower brightness due to enhanced light absorption, while areas with thinner coatings or no coating have higher brightness. Therefore, by calculating the brightness differences between different areas in the image, the distribution of the coating at the edges can be determined. For example, if the brightness at the edges of the sprayed image is significantly higher than that of the center area, it indicates insufficient coverage; conversely, if the brightness is significantly lower than that of the surrounding areas, overspray or paint buildup may have occurred. The brightness gradient can be calculated using a sliding window method, that is, taking multiple adjacent areas on the image and comparing their average brightness differences; the areas with large brightness differences are the areas with significant coating thickness changes. By locating and statistically analyzing these areas, a preliminary distribution map of coating thickness changes can be formed.
[0035] Simultaneously, it is necessary to identify the coating adhesion areas in the sprayed images. The coating adhesion area refers to the area uniformly covered by the atomized paint during the spraying process; in the image, it typically appears as a region with high color saturation, relatively stable brightness, and weakened texture details. To facilitate identification, a blank workpiece image can be acquired at the start of spraying as a background reference, and then the images during the spraying process can be compared with the background image. If the brightness of a pixel continuously decreases and its color shifts towards the paint color in consecutive frames, it can be determined that the area has been covered by the coating. This method yields a mask image representing the coating distribution, where white areas represent covered portions and black areas represent uncovered or insufficiently covered portions.
[0036] After obtaining three types of information—geometric boundary lines, brightness gradient changes, and coating adhesion areas—it is necessary to combine them to generate edge feature data. Edge feature data is a set of descriptive information that comprehensively reflects the spraying state, typically including edge position coordinates, boundary normal direction, local brightness change rate, and coating coverage ratio. Its generation process can be understood as a quantitative description and spatial normalization of all feature points in the image. For example, sampling is performed at regular intervals near the edge line, recording the point's position, corresponding brightness value, brightness gradient direction, and coating adhesion state. Through continuous sampling and statistical analysis, a feature dataset describing the spraying state of the edge region can be formed.
[0037] To ensure the accuracy of edge feature data, temporal synchronization and filtering are necessary. Since the spray gun moves continuously during the spraying process, and visual acquisition involves frame delays, the time labels of the feature data must be aligned with the time labels of the spray gun's movement trajectory. Synchronization can be achieved through trigger pulses in the spray gun control signal; that is, the camera is triggered to capture images each time the spray gun moves to a set trajectory node, ensuring a strict correspondence between image acquisition time and the spray gun's spatial position. For image noise caused by lighting fluctuations or interference from atomized particles, a time-weighted averaging method can be used to smooth continuous frame features, ensuring that sudden outliers do not affect the overall trend judgment.
[0038] After the edge feature data is generated, its main function is to provide the basic input for subsequent spraying compensation calculations. This data not only contains edge geometric information but also reflects the current trend of spraying quality changes. By analyzing these features, it is possible to determine in real time whether the spraying is uniform, whether the coverage is complete, and whether the edge transition is natural. For example, when a continuous increase in edge brightness gradient and a shrinking boundary of the coating adhesion area are detected, it can be inferred that the spraying coverage is insufficient; when a continuous decrease in brightness gradient and an outward expansion of the boundary indicate that overspraying or sagging is beginning to form. Such feature judgments provide a reliable basis for subsequent steps of spray gun attitude adjustment and spray distance correction.
[0039] In summary, step S102, through image registration based on spatial correspondence, ensures a one-to-one correspondence between the visual information of each frame during the spraying process and the movement trajectory of the spray gun. Based on this, key features such as geometric boundaries, brightness variations, and coating adhesion are extracted, thus forming quantifiable and traceable edge feature data. This feature data accurately reflects the state of the workpiece edge area during the spraying process, laying a precise perceptual foundation for subsequent spraying deviation calculation and dynamic compensation.
[0040] Furthermore, based on the spatial correspondence, the spraying images acquired in real time during the spraying process are registered to obtain edge region spraying images synchronized with the spray gun's movement trajectory. Based on these edge region spraying images, the geometric boundary lines, brightness gradient changes, and coating adhesion areas of the workpiece edges are identified, generating edge feature data describing the current spraying state, including: Based on the spatial correspondence, each pixel in the real-time acquired spraying image is mapped to its physical position in the workpiece surface coordinate system. The time information of the spray gun movement trajectory is used as an identifier to establish a synchronous registration relationship between the spraying image and the spray gun movement trajectory, so that the spraying image in the edge area and the actual movement state of the spray gun on the workpiece surface maintain spatial consistency and temporal correspondence. Based on the brightness distribution of the registered edge area spraying image, the brightness gradient change amplitude of each pixel is calculated, and a set of continuous pixels with the same brightness gradient change direction and a change amplitude more than twice the average brightness gradient is selected as the boundary candidate region. The continuous pixel line with the largest brightness gradient change in the candidate region is determined as the geometric boundary line of the workpiece edge, and the spatial direction of the geometric boundary line and its deflection angle relative to the spray gun spraying direction are extracted. Using the geometric boundary line as the central region, an edge detection zone covering a predetermined distance on both sides is set. The rate of change of brightness gradient and the trend of brightness change over time within the detection zone are comprehensively analyzed. The region where the brightness continuously decreases and the light reflection characteristics change from specular reflection to diffuse reflection is determined as the coating adhesion region. The brightness difference and spatial offset between the coating adhesion region and the geometric boundary line are recorded to reflect the spraying coverage and adhesion thickness distribution. The position data of the geometric boundary line, the rate of change of brightness gradient, the brightness difference of the coating adhesion area and the boundary offset are correlated and processed to form edge feature data including edge position, coating thickness change trend and adhesion uniformity. This data is used to characterize the current spraying state and serves as the input basis for calculating spraying coverage deviation and boundary overlap error.
[0041] In implementing the edge spraying compensation control method based on intelligent visual feedback, in order to achieve accurate identification and real-time feedback of the spraying state of the workpiece edge area, it is necessary to perform spatial and temporal synchronous registration on the images acquired during the spraying process, and identify the geometric boundary line, brightness gradient change and coating adhesion area of the workpiece through the registered edge area spraying image, thereby generating edge feature data that can accurately characterize the spraying state.
[0042] During the spraying process, the spray gun is in continuous motion, and the spraying images acquired by the multi-view vision acquisition device near the spray gun will spatially shift due to changes in the spray gun angle, spray distance, and illumination. To ensure that the acquired spraying images are consistent with the workpiece surface coordinate system, it is first necessary to map each pixel in the real-time acquired spraying images to its actual physical position in the workpiece surface coordinate system based on spatial correspondence. The workpiece surface coordinate system is usually based on the workpiece clamping reference point as the origin, and its coordinate axis directions are determined by the workpiece boundary geometric reference. This step transforms the two-dimensional pixel coordinates in the image into three-dimensional workpiece surface coordinates through spatial remapping. For example, when the reflection point corresponding to a certain pixel is located at (x, y) in the image plane, and its depth position z is determined through spatial correspondence, then the position of this point in the workpiece surface coordinate system is (X, Y, Z). This mapping is determined by the geometric parameters obtained from the previous calibration. In this way, every brightness change point in the spraying image can correspond one-to-one with its actual position on the workpiece surface.
[0043] To ensure that the sprayed images are not only spatially aligned but also temporally synchronized with the spray gun's movement trajectory, the temporal information within the spray gun's trajectory needs to be used as an identifier to establish a temporal index relationship between sprayed image frames and spray gun trajectory points. The spray gun's movement trajectory can be recorded in real time by a built-in position sensor, typically including the spray gun's three-dimensional coordinates and attitude angles at each time point. When the frequency of sprayed image acquisition is higher than the frequency of spray gun attitude changes, interpolation can be used to ensure that each frame of the sprayed image can find a corresponding spray gun movement state, thereby maintaining spatial consistency and temporal correspondence between the sprayed image in the edge area and the actual movement state of the spray gun on the workpiece surface. In this way, each image frame carries both spatial position and temporal indexes, enabling synchronous analysis of the dynamic spraying process.
[0044] After obtaining an image of the edge area sprayed in sync with the spray gun's movement trajectory, it is necessary to identify the geometric boundary lines of the workpiece from the image. Those skilled in the art should understand that the geometric boundary line refers to the boundary curve between the workpiece surface and the background or areas of morphological change, which can be identified through changes in brightness gradient. Brightness gradient change refers to the magnitude of change in brightness values between adjacent pixels. When there are bends, boundaries, or changes in reflectivity on the workpiece surface, this brightness change will exhibit a significant peak. To ensure the stability and reliability of the identified boundary, the magnitude of the brightness gradient change of each pixel in the image needs to be calculated, and a set of consecutive pixels with a consistent brightness gradient change direction and a change magnitude more than twice the average brightness gradient is selected as the candidate boundary region. For example, when the average brightness change of the entire image is 15, and the brightness change of a certain consecutive pixel band in a local area reaches 30 or more and is consistent in direction, this pixel band can be determined to belong to the candidate boundary region. Then, the consecutive pixel line with the largest brightness gradient change is selected from the candidate region as the geometric boundary line of the workpiece. After identification, the spatial orientation of the geometric boundary line (i.e., the extension direction of the boundary in the workpiece surface coordinate system) and its deflection angle relative to the spray gun spray direction should also be extracted for subsequent spraying direction adjustment and spraying coverage determination.
[0045] To further identify the coating adhesion area formed by spraying, an edge detection zone needs to be set, centered on the geometric boundary line and covering a predetermined distance on both sides. The edge detection zone refers to an area on the workpiece surface extending a certain distance (e.g., 1 to 3 mm) along the normal direction from the geometric boundary line as the center line, used to detect spray adhesion and coating changes. This area typically includes part of the unsprayed boundary area and part of the sprayed adhesion area. Analyzing the rate of change of brightness gradient and the trend of brightness change over time within the edge detection zone can distinguish different spraying states. When the brightness within the detection zone gradually decreases in consecutive image frames, and the light reflection characteristics change from specular reflection (i.e., concentrated reflected light, obvious bright spots) to diffuse reflection (i.e., uniform brightness distribution, no obvious bright spots), it indicates that the area has been covered by a newly sprayed coating. At this time, this area can be identified as the coating adhesion area.
[0046] After determining the coating adhesion area, it is necessary to calculate the brightness difference and spatial offset between the coating adhesion area and the geometric boundary line. The brightness difference reflects the degree of change in the surface reflectivity after spraying and can be obtained by subtracting the average brightness of the uncoated area from the average brightness of the adhesion area. For example, if the average brightness near the boundary before spraying is 180 and after spraying it is 90, then the brightness difference is 90, indicating that the coating's light absorption is enhanced and its reflectivity is reduced. The spatial offset describes the extent of the coating adhesion boundary's expansion relative to the geometric boundary line and can be calculated from the difference in their spatial positions in the workpiece coordinate system. For example, if the sprayed adhesion boundary shifts 0.5 mm along the normal direction, it indicates that the coating thickness has begun to accumulate on that side, and the surface boundary has expanded. Both the brightness difference and the spatial offset are important bases for subsequently judging the coating thickness change trend and adhesion uniformity.
[0047] After identifying the geometric boundary lines, brightness gradient changes, and coating adhesion areas, this information needs to be correlated to generate edge feature data characterizing the current spraying state. Edge feature data is a set of parameters comprehensively describing the spraying edge state, including geometric information, optical information, and adhesion features. Geometric information characterizes the spatial position and morphology of the edge, optical information characterizes surface reflection and brightness distribution, and adhesion features characterize coating thickness variations and uniformity. By establishing a mapping relationship between the position data of the geometric boundary lines, the rate of change of the brightness gradient, the brightness difference of the coating adhesion area, and the boundary offset, the dynamic change characteristics of the edge within each spraying cycle can be obtained. For example, when the brightness difference continuously increases while the boundary offset tends to stabilize, it indicates that the coating thickness has reached a uniform adhesion state; conversely, when the brightness difference fluctuates and the offset is unstable, it indicates that uneven spraying or edge overlap spraying has occurred.
[0048] The generated edge feature data not only reflects the current geometric and optical state of the workpiece during spraying, but also provides direct input for calculating spray coverage deviation and boundary overlap error. This dataset allows for the assessment of the coverage degree and edge transition quality of the sprayed area, providing an accurate basis for generating subsequent spray gun attitude adjustments, spray distance corrections, and path speed corrections. This process achieves a closed-loop transformation from spray image acquisition to feature data generation, enabling the spray control system to respond to visual feedback in real time and achieve precise compensation control of the sprayed edge area.
[0049] In summary, this step ensures the consistency of the image in space and time by establishing a synchronous registration relationship between the spraying image and the spray gun's movement trajectory; identifies geometric boundary lines through brightness gradient analysis; determines the coating adhesion area through changes in reflection characteristics; and generates edge feature data through multi-dimensional parameter correlation, forming a complete visual recognition and feature extraction mechanism.
[0050] Step S103: Based on the difference between the edge feature data and the preset target spraying image, calculate the spraying coverage deviation and boundary overlap error at the edge of the workpiece, and use the difference as the basis for control correction. Extract the coating thickness change trend, light density change rate and boundary direction offset to generate spray gun attitude adjustment amount, spray distance correction amount, spray pressure correction amount and path speed correction amount.
[0051] In step S103, the edge feature data generated in step S102 is compared with the preset target spraying image. Difference analysis is used to calculate the spraying coverage deviation and boundary overlap error in the workpiece edge area. This serves as the basis for control correction. Further extraction of coating thickness variation trend, optical density variation rate, and boundary direction offset is then performed to generate spray gun attitude adjustment, spray distance correction, spray pressure correction, and path speed correction. This step is the core of this method for achieving visual closed-loop compensation control. Its purpose is to quantify the spraying state obtained from visual detection into control parameters that can directly drive spray gun adjustment, enabling real-time correction of spraying deviations.
[0052] During implementation, the first step is to determine the target coating image. The target coating image is a pre-defined image template based on the ideal coating state. It can be obtained from the visual results of a standard workpiece under optimal coating parameters, or it can be generated using simulation software. The brightness, color saturation, and reflectance distribution of each region in the target coating image represent the ideal coating thickness and coverage effect. Those skilled in the art typically collect the coating results of several standard samples during the coating system debugging phase, and after normalization, establish the target template to ensure compatibility with workpieces of different materials or colors during subsequent difference calculations.
[0053] During the comparison process, the edge region spraying image obtained in step S102 needs to be pixel-level aligned with the target spraying image in the same coordinate system. Spatial registration ensures that the edge lines of the two images are in the same position, thus allowing the difference analysis to reflect only the true deviation of the spraying state. The basic idea of difference calculation is to compare the image brightness, reflected light density, and coating adhesion characteristics at the same location to determine whether the area is undersprayed, oversprayed, or has normal coverage. For example, when the brightness of a certain area in the real-time spraying image is higher than that in the target image, it indicates that the reflected light in that area is stronger, suggesting that the coating is thinner; conversely, when the brightness is lower than that in the target image, it indicates that the surface light absorption is increased, the coating is too thick, or the spray overlaps. To avoid errors caused by changes in illumination, a local normalization method is usually used in difference calculation, that is, the average brightness of the edge neighborhood is used as a benchmark, and only local relative changes are compared. In this way, the spraying coverage deviation at the edge can be reliably detected.
[0054] The so-called coating coverage deviation refers to the spatial difference between the actual coating area and the target ideal coating area. Its magnitude can be represented by the change in the area of the effective coating region in the image. For example, in the target image, a certain edge area should appear as a uniformly wide brightness band. If the width of this band decreases or the brightness edge moves forward in the real-time image, it can be considered that under-spraying has occurred; if the band widens or the brightness edge expands outward, it is considered over-spraying. By comparing consecutive frames, the rate of change of deviation can be further calculated, thereby determining whether the coating error is tending to increase or is being corrected.
[0055] Boundary overlap error refers to the relative offset between the spray gun's spray path at the edge and the workpiece boundary. Since the spray gun's movement path is executed by a mechanical control system, and the actual position of the workpiece edge may be affected by machining or clamping errors, there is often a slight deviation between the two. If the spray gun trajectory deviates inward relative to the edge line, it can easily lead to insufficient edge thickness; if it deviates outward, it can cause paint buildup or runs. To determine this offset, the positional difference between the spray coverage boundary and the geometric edge line can be extracted from the image. The calculation method for the positional difference can be understood as measuring the distance difference between the two edge lines in the same direction. For example, when the average distance between the edge point of the sprayed area and the geometric edge point of the workpiece in the image exceeds a predetermined value (e.g., 0.3 mm), a significant boundary overlap error can be determined. By tracking the direction and magnitude of this error in consecutive frames, the angular deviation between the spray gun path and the workpiece boundary normal can also be calculated.
[0056] After calculating the coating coverage deviation and boundary overlap error, these need to be converted into executable control correction parameters. To this end, the system further extracts three types of change indicators: coating thickness variation trend, optical density variation rate, and boundary direction offset. The coating thickness variation trend reflects the rate of coating growth or thinning in the edge region, which can be obtained through brightness difference analysis of consecutive frames. When the brightness gradually decreases in adjacent frames, it indicates that the coating thickness is increasing; when the brightness gradually increases, it indicates insufficient coating. The optical density variation rate measures the rate at which the optical properties of the coating change over time. Its calculation logic is to measure the change in average brightness of the same area within a certain time interval. If the optical density variation rate is too fast, it indicates excessive spray concentration; if the rate is too slow, it indicates insufficient spray diffusion. By combining the coating thickness variation trend and the optical density variation rate, it is possible to determine whether the energy distribution is stable during the spraying process, thus providing a basis for adjusting the spray pressure and path speed.
[0057] Boundary direction offset describes the angular deviation of the spray gun's spray centerline relative to the workpiece boundary normal. In visual analysis, this can be obtained by comparing the direction difference between the extension direction of the spray coverage boundary and the workpiece boundary line. When the two directions are inconsistent, the sprayed particles will not uniformly cover the edge area, resulting in an uneven transition zone. The direction of the offset indicates the direction in which the spray gun posture needs to be corrected, and its magnitude reflects the magnitude of the correction angle. Taking a common implementation as an example, when the system detects that the spray coverage line has deviated clockwise by approximately three degrees relative to the workpiece boundary line, it will generate a corresponding spray gun posture adjustment command, causing the spray gun to rotate by the same angle in the opposite direction to restore correct alignment.
[0058] After obtaining the above three indicators, they need to be integrated and converted into spray gun attitude adjustment, spray distance correction, spray pressure correction, and path speed correction. The spray gun attitude adjustment is directly determined by the boundary direction offset, and its value represents the angle by which the spray gun needs to rotate around its own support axis. The spray distance correction is calculated based on the coating thickness variation trend. When the thickness increases too quickly, the spray distance should be appropriately increased to reduce the deposition rate; when the thickness increases too slowly, the spray distance should be decreased to increase the local spraying intensity. The spray pressure correction is mainly determined by referring to the rate of change of optical density. When a rapid decrease in optical density is detected, indicating insufficient coating, the system will increase the spray pressure; conversely, if the optical density increases too quickly, the pressure will be reduced to avoid overspray. The path speed correction is related to the coating coverage deviation and boundary overlap error. When underspray is detected at the edge, the path speed should be slowed down to extend the spraying time; when overspray is detected, the spray gun speed should be increased to reduce local deposition.
[0059] To ensure the stability of these corrections, time smoothing is typically introduced. This involves calculating the average of the correction trend using data from multiple consecutive frames to prevent control jitter caused by single-frame anomalies. For example, if the spray coverage deviation gradually decreases across three consecutive frames, the current correction trend is maintained; if the deviation fluctuates repeatedly, the correction amplitude is reduced until the system stabilizes. The four types of corrections are ultimately output as spray gun control commands, and their values are directly transmitted to the motion controller and air pressure regulation unit to guide the spraying operation in the next cycle.
[0060] Through this dynamic correlation between visual data and control parameters, step S103 achieves a closed-loop transition from perception to decision-making, enabling the system to identify uneven coating phenomena in edge areas in real time and automatically generate multi-dimensional compensation corrections, providing a clear execution basis for subsequent dynamic adjustment of the spray gun, thereby ensuring that the coating thickness distribution at the workpiece edge tends to be stable and uniform.
[0061] Furthermore, based on the difference between edge feature data and the preset target spraying image, the spraying coverage deviation and boundary overlap error at the workpiece edge are calculated, and the difference is used as the basis for control correction. The coating thickness change trend, optical density change rate, and boundary direction offset are extracted to generate spray gun attitude adjustment, spray distance correction, spray pressure correction, and path speed correction, including: Based on the registration results of edge feature data and preset target spraying image, the brightness distribution, boundary position and coating adhesion thickness information of the corresponding area at the edge of the workpiece are extracted, and the spatial difference between the target edge position in the preset target spraying image and the actual edge position in the current edge feature data is calculated. The spatial difference is decomposed into spraying coverage deviation along the spraying direction and boundary overlap error along the boundary direction, which are used to generate spraying difference data at the edge of the workpiece. The spraying coverage deviation and boundary overlap error in the spraying difference data are used as the basis for control correction. The time analysis of the light reflection brightness change in the edge area is carried out. The brightness change amplitude of the same position pixel in the continuous spraying image is extracted over time, and the brightness change rate is defined as the light density change rate to reflect the adhesion change and accumulation trend of the coating in the edge area. Based on the distribution of light density change rate, the variation law of spray coverage deviation over time is compared, the growth or thinning trend of coating thickness at different boundary positions is analyzed, and the coating thickness change trend is determined accordingly. This coating thickness change trend is combined with the boundary overlap error to determine the stability and coverage uniformity of coating adhesion at the workpiece edge. Based on the coating thickness variation trend and the spatial distribution of boundary overlap error, the boundary direction offset is extracted. The spatial direction of the current spraying boundary is compared with the direction of the workpiece geometric boundary line. If the boundary direction offset exceeds the preset deviation threshold, the required spray gun posture adjustment direction is determined. The rate of change of the boundary direction offset is used as the basis for generating the spray gun posture adjustment amount, so that the spray gun posture remains consistent with the geometric direction of the workpiece edge during the spraying process. Based on the matching relationship between the spray gun attitude adjustment amount and the rate of change of optical density, the spray distance correction amount and the spray pressure correction amount are calculated to ensure that the spray gun spray distance and spray pressure maintain a corresponding relationship in the edge area. Combined with the actual movement trajectory of the spray gun along the edge of the workpiece, the path speed correction amount is calculated to reduce the movement speed and enhance the adhesion uniformity when spraying in the edge area, and to maintain the set speed when spraying in the planar area, so as to achieve a stable and consistent coating coverage thickness and optical density distribution. This generates a set of control correction parameters including the spray gun attitude adjustment amount, spray distance correction amount, spray pressure correction amount and path speed correction amount.
[0062] When implementing the edge spraying compensation control method based on intelligent visual feedback, in order to achieve real-time dynamic correction of the spraying process in the workpiece edge area, it is necessary to determine the spraying coverage deviation and boundary overlap error based on the difference between edge feature data and the preset target spraying image, and use these differences to generate control correction parameters for spraying compensation. This process involves not only spatial registration and optical feature extraction of the image, but also comprehensive calculation of the coating thickness change trend, optical density change rate, and boundary direction offset, thereby generating spray gun attitude adjustment, spray distance correction, spray pressure correction, and path speed correction, realizing adaptive dynamic control of spraying.
[0063] In implementation, the first step is to analyze the brightness distribution, boundary position, and coating thickness of the workpiece edge region based on the registration results of edge feature data and the preset target spraying image. Edge feature data typically includes spatial coordinates generated by the vision acquisition device, brightness gradient changes, and the reflected light characteristics of the coating adhesion area. The preset target spraying image represents the desired spraying state under standard process conditions, including the spatial position of the target edge, the desired light density distribution, and a uniform adhesion thickness reference. By spatially registering the two, the actual spraying state can be correlated with the target spraying state. At this point, the spatial difference between the target edge position and the actual edge position needs to be calculated, measured using the workpiece surface coordinate system as a reference. The spatial difference can be determined by the minimum distance between two boundary curves; for example, when the average distance between the target boundary and the actual boundary is 0.4 mm, it indicates insufficient spraying coverage. To more accurately reflect the directionality of the error, this spatial difference should be further decomposed into two components: the deviation along the spraying direction is defined as the spraying coverage deviation, used to characterize insufficient or excessive spraying; the deviation along the boundary direction is defined as the boundary overlap error, used to characterize the overlap or offset of the spraying contour. This generates a set of spraying difference data, providing a quantitative basis for subsequent corrections.
[0064] After obtaining the spraying difference data, it is necessary to use this as the basis for control correction and perform time analysis on the changes in light reflection brightness in the edge area. The light reflection brightness during the spraying process can reflect the changes in optical density on the coating surface, that is, the thickness and uniformity of the sprayed coating. Therefore, time series analysis is performed on continuously acquired spraying images to extract the brightness value changes of pixels at the same location at different time points. If the brightness value at that location gradually decreases over time, it indicates that the reflectivity of the coating is decreasing, indicating that the coating is gradually thickening. To quantitatively describe this change, the brightness change rate, i.e., the optical density change rate, can be calculated. Those skilled in the art will understand that this rate can be obtained by dividing the brightness difference by the time interval. For example, when the pixel brightness decreases from 160 to 120 between two frames of images, with a sampling interval of 0.5 seconds, the optical density change rate is 80 gray values per second. A larger optical density change rate indicates that the spraying buildup is faster, while a rate close to zero indicates that the adhesion tends to stabilize.
[0065] After obtaining the rate of change of optical density, it needs to be compared with the spray coverage deviation to analyze the growth or thinning trend of coating thickness at different boundary locations. The spray coverage deviation reflects whether the spray amount is insufficient or excessive, while the rate of change of optical density reflects the temporal variation of the spraying process. By analyzing the correlation between the two, the trend of coating thickness variation can be determined. For example, when the spray coverage deviation is negative (indicating insufficient spraying) and the rate of change of optical density is low, it indicates that the coating adhesion in that area is slow, requiring increased spray pressure or reduced spray distance. If the spray coverage deviation is positive (indicating excessive spraying) and the rate of change of optical density is consistently higher than the average, it indicates that overspray has occurred in that area, requiring appropriate reduction in spraying or increase in movement speed. This trend not only helps determine the current spraying status but also provides a directional basis for subsequently generating correction parameters.
[0066] Based on the coating thickness variation trend and the spatial distribution of boundary overlap error, the boundary direction offset can be further extracted. The boundary direction offset refers to the angle of deviation of the current sprayed boundary's spatial orientation relative to the workpiece's geometric boundary line. The orientation of the sprayed boundary can be obtained by fitting the boundary point set in the edge feature data, while the workpiece's geometric boundary line is determined by design data or initial scanning. When the sprayed boundary deviates from the geometric boundary, it will lead to uneven adhesion thickness in the edge region. To determine whether this offset needs correction, a preset deviation threshold can be set, such as ±2°. When the boundary direction offset exceeds this threshold, it indicates that the spraying direction needs adjustment. At this time, the spray gun attitude adjustment amount can be determined based on the rate of change of the offset. If the sprayed boundary gradually deviates outward, the spray gun attitude needs to be tilted inward towards the workpiece; if the sprayed boundary deviates inward, the spray gun needs to fine-tune the spraying direction to expand the coverage area. Through this dynamic attitude correction based on geometric deviation, the spray gun spraying direction can be kept consistent with the workpiece edge geometry, thereby improving the matching degree of the sprayed coverage.
[0067] After obtaining the spray gun attitude adjustment amount, it is necessary to calculate the spray distance correction amount and the spray pressure correction amount to ensure that the kinetic energy and diffusion range of the sprayed particles reaching the workpiece surface are consistent with the target spraying state. The spray distance is the actual distance from the spray gun nozzle to the workpiece surface; too far a distance will result in an excessively thin coating and over-atomization, while too close a distance will easily lead to accumulation and sagging. The spray pressure determines the kinetic energy and distribution density of the sprayed particles. The spray distance correction amount and the spray pressure correction amount should maintain a coordinated relationship; that is, the spray pressure should be appropriately increased when the spray distance increases, and appropriately decreased when the spray distance decreases. For example, when a spray coverage deviation of -0.2 mm is detected (i.e., insufficient spraying), the system can appropriately reduce the spray distance by 0.5 mm and increase the spray pressure by 5% to improve the edge adhesion thickness.
[0068] Finally, to ensure overall balance in the spraying process, it is necessary to calculate the path speed correction based on the matching relationship between the spray gun posture adjustment and the rate of change of optical density, combined with the actual movement trajectory of the spray gun along the workpiece edge. The path speed correction is used to adjust the spray gun's moving speed to control the amount of coating applied per unit time. When spraying edge areas, the speed should be appropriately reduced to prolong coating adhesion time and enhance coverage uniformity; when spraying planar areas, the speed should be restored to the baseline value to maintain process efficiency. The path speed correction can be calculated based on the fluctuation range of the rate of change of optical density. When the rate of change of optical density is too high, the path speed should be reduced to prevent overspray; when the rate of change of optical density is too low, the path speed should be increased to prevent local buildup.
[0069] Through the above process, a complete set of control correction parameters can be generated, including spray gun attitude adjustment, spray distance correction, spray pressure correction, and path speed correction. These parameters are invoked in real time by the spraying control system to synchronously adjust the attitude, spray distance, spray pressure, and movement speed of the spraying execution unit, thereby achieving highly consistent spray thickness and light density distribution in complex edge areas. The entire correction process forms a closed-loop visual feedback system, enabling the spraying process to have adaptive control capabilities and automatically adjust the spraying strategy according to the dynamic changes in edge features.
[0070] Furthermore, the method of using the spraying coverage deviation and boundary overlap error in the spraying difference data as the basis for control correction, performing time analysis on the light reflection brightness change in the edge region, extracting the brightness change amplitude of pixels at the same position in continuous spraying images over time, and defining the brightness change rate as the light density change rate, is used to reflect the adhesion change and accumulation trend of the coating in the edge region, including: Based on the edge regions identified by the spraying difference data and the registration relationship of the preset target spraying image, the set of sampling positions of pixels at the same position in the continuous spraying image is determined, and the timestamp, exposure parameters and light reflection brightness are recorded for each sampling position to form a brightness original sequence with time stamp; Using the light reflection brightness of the uncoated reference strip or the reference strip with stable adhesion as a benchmark, the original brightness sequence is normalized by illumination to obtain a brightness normalized sequence that removes the influence of illumination fluctuations. Based on the difference between consecutive image frames in the normalized brightness sequence and the acquisition time interval, the average brightness change amplitude of each sampling position within a fixed frame number sliding interval is obtained, a brightness change sequence is generated, and isolated pulsation points are removed by a preset outlier removal threshold to obtain a brightness change sequence for rate conversion. Based on the brightness change sequence and the corresponding acquisition time interval, the brightness change amplitude of each sampling position is converted into the brightness change rate per unit time, forming a brightness change rate distribution containing spatial position and change direction information, which is used to characterize the thickening or thinning trend of that position during the spraying process. Based on the correspondence between brightness and optical density obtained by calibration with a reference reflective strip, the rate of change of brightness is determined as the rate of change of optical density. The positive rate of change of optical density represents the increase of coating adhesion in the edge region, the negative rate of change of optical density represents the thinning of the coating, and the absolute value of the rate of change of optical density represents the rate of deposition. The resulting data, which includes edge location, the value of the rate of change of optical density, and the direction of change, are used to reflect the changes in coating adhesion and deposition trend in the edge region.
[0071] In this implementation, to accurately reflect the adhesion changes and accumulation trends of the coating in the workpiece edge area, the system defines the rate of change of brightness as the rate of change of optical density through time-series analysis of continuous spraying images, thereby establishing a correspondence between optical signals and physical deposition behavior during the spraying process. The key to this step lies in clearly defining and calculating the temporal consistency of brightness data, illumination normalization processing, and the physical meaning of the rate of change of optical density. This allows for accurate comparison of image data from different spraying stages under the same illumination and geometric conditions, thereby achieving continuous monitoring of dynamic coating thickness.
[0072] First, based on the edge region range identified by the spraying difference data and the spatial registration results of the preset target spraying image, the system determines a set of pixel sampling positions at the same location from the continuously acquired spraying images. A pixel sampling position refers to a pixel with completely consistent spatial coordinates across multiple frames of spraying images, used to track the change of the same physical location over time. To ensure the temporal accuracy of subsequent calculations, each pixel sampling position records its corresponding timestamp, exposure parameters, and light reflection brightness value, constructing a raw brightness sequence containing a time dimension. The timestamp marks the image acquisition time with millisecond-level resolution, accurately reflecting the dynamic changes in the spraying process; the exposure parameters are used to correct brightness drift caused by automatic adjustment of the optical equipment between different frames.
[0073] After obtaining the original brightness sequence, illumination normalization is required to eliminate the influence of external illumination variations on brightness. The normalization process uses an uncoated reference zone or a reference zone that has reached a stable adhesion state as the brightness reference region. The light reflection brightness of the uncoated reference zone is typically the highest value in the initial state, while the brightness of the stably coated reference zone corresponds to the lowest value under saturated coating reflection. By calculating the ratio of the brightness value at each moment to the brightness of the reference zone, a brightness normalization sequence free from the influence of illumination fluctuations can be obtained. Each data point in this sequence corresponds to the true reflection intensity of the workpiece surface at a specific time point, reflecting the changes in optical properties caused by coating adhesion.
[0074] Next, the system performs temporal difference analysis on the brightness normalized sequence to obtain the brightness variation amplitude. By calculating the difference in brightness normalized values between consecutive image frames and combining it with the acquisition time interval, an initial value of the brightness change rate at each pixel location can be obtained. To avoid erroneous peaks introduced by sporadic light spots or image noise, the system uses a fixed frame number sliding interval (e.g., five frames) for mean smoothing and calculates the average brightness variation amplitude within this interval, thus forming a brightness variation sequence. In this sequence, each value represents the average degree of brightness change per unit time, reflecting the trend of local reflectivity changes with spraying time. In addition, the system sets an outlier removal threshold, typically three times the standard deviation of the average variation amplitude, to remove isolated brightness pulsations, ensuring the stability and continuity of subsequent calculation results.
[0075] Based on the brightness change sequence and corresponding time intervals, the magnitude of brightness change can be converted into the brightness change rate per unit time. The brightness change rate indicates not only the direction of brightness change over time but also the magnitude of the change, thus it can be used to distinguish between thickening and thinning trends during the coating process. When the brightness change rate is negative, it indicates that the brightness decreases over time, corresponding to an increase in coating thickness; when the brightness change rate is positive, it indicates that the brightness increases over time, corresponding to a decrease in coating thickness. By statistically analyzing the brightness change rates at different locations, a brightness change rate distribution containing spatial coordinates and direction of change information can be formed, which can be used to characterize the dynamic adhesion trend of the workpiece edge area.
[0076] Finally, to convert the rate of change in brightness into a physically meaningful rate of change in optical density, it is necessary to establish a correspondence between brightness and optical density. In this invention, optical density is defined as the inverse logarithmic ratio of the intensity of incident light reflected by the coating surface; its physical meaning is the light absorption capacity of the coating per unit area. By collecting brightness values corresponding to coatings of different thicknesses on a reference sample, a calibration curve of brightness versus optical density can be established. This curve is typically non-linear and can be obtained through piecewise fitting or interpolation. Based on this calibration curve, the system converts the rate of change in brightness at each sampling location into the rate of change in optical density. The sign of the rate of change in optical density represents the direction of coating thickness increase or decrease, respectively, and its absolute value reflects the rate of accumulation or erosion. For example, if the rate of change in brightness at a certain location is –0.05 units / second, and the corresponding rate of change in optical density obtained after conversion from the calibration curve is 0.012 units / second, it indicates that the coating at that location is growing at a rate of 0.012 optical density units per second.
[0077] Through the above process, the final result data, including edge position, optical density change rate, and change direction, is obtained to reflect the adhesion changes and accumulation trends of the coating in the edge region. This result can not only be used for spray coverage correction calculations within the current cycle, but also provides precise input data for subsequent spray gun attitude adjustment, spray distance correction, and spray pressure correction, thus forming the basis for cross-cycle visual feedback adjustment. By converting optical signals into quantifiable optical density change rates, this invention realizes the transformation of the spraying process from visual inspection to dynamic feedback control, enabling adaptive and time-responsive spraying control, and significantly improving the uniformity and overall stability of the coating thickness in the edge region.
[0078] Step S104: Dynamically adjust the angle, spray distance, spray pressure, and movement speed of the spray gun using the generated spray gun attitude adjustment amount, spray distance correction amount, spray pressure correction amount, and path speed correction amount, so that the coating thickness in the edge area tends to be uniform, and a new spraying image is acquired at the end of each adjustment cycle.
[0079] In step S104, the spray gun attitude adjustment, spray distance correction, spray pressure correction, and path speed correction values generated in the previous step are applied to the dynamic adjustment of the spray gun's angle, spray distance, spray pressure, and movement speed, respectively. This allows the spraying process to respond to visual feedback in real time, achieving precise and balanced coating thickness in the edge areas. The core of this step is to convert the parameter changes obtained from visual calculations into specific physical control actions, and to form continuous corrections through periodic feedback, ensuring that the spraying system maintains stable and consistent spraying quality under dynamic conditions.
[0080] In practice, the spray gun attitude adjustment is used to control the rotation angle of the spray gun, ensuring that the spray direction maintains the optimal angular relationship with the normal direction of the workpiece boundary. The normal direction at the workpiece edge often differs from the plane, exhibiting a spatial deflection. If the angle between the spray gun's spray direction and the edge normal is too large, the spray mist will tend to diffuse outside the boundary, resulting in insufficient edge coverage; if the angle is too small, the spray will concentrate on the inside of the edge, causing paint buildup or excessively thick local areas. Therefore, the spray gun attitude adjustment is typically determined based on the boundary direction offset, using a servo rotation mechanism to make micro-angle adjustments to the spray gun. For example, when the system detects a three-degree deviation between the spray coverage line and the edge normal, the spray gun can be rotated three degrees in the opposite direction around the support axis to realign the spray direction with the workpiece boundary. The speed of the adjustment action must be synchronized with the spray gun's movement speed, typically not exceeding ten degrees per second, to prevent over-correction that could cause coating distribution fluctuations.
[0081] The spray distance correction is used to adjust the distance between the nozzle and the workpiece surface, thereby controlling the deposition density of atomized particles. Too close a spray distance results in concentrated spraying areas and poor flowability, while too far a spray distance leads to excessive paint diffusion and reduced edge coverage. The spray distance correction is calculated by the system based on the coating thickness variation trend. When a continuous increase in coating thickness is detected, the spray distance should be appropriately increased to reduce deposition intensity; conversely, when the thickness change is slow or insufficient coating occurs, the spray distance should be decreased to improve local adhesion. Adjustments can be made via electric actuators or servo slides, with a typical accuracy controlled within 0.1 mm. For example, if the system detects that the edge area thickness exceeds the target value by 5%, the spray distance can be increased by 1 mm; if the thickness is less than 5% of the target value, the spray distance can be decreased by 1 mm. This fine-tuning ensures that the particle concentration distribution within the spray cone angle remains optimal, resulting in a uniform coating transition at the edges.
[0082] The spray pressure correction is used to control the atomizing air pressure or paint supply pressure inside the spray gun, thereby affecting the kinetic energy of paint particles and spray density. The direction of pressure adjustment is directly related to the rate of change of coating gloss density. Gloss density reflects the light absorption characteristics of the coating. When the system detects an excessively rapid increase in gloss density, it indicates that the coating thickness is accumulating too quickly, and the spray pressure should be reduced. If the gloss density changes slowly or even decreases, it indicates insufficient coating volume, and the pressure should be appropriately increased. Pressure adjustment can be accomplished through a proportional valve or electronic pressure regulator, with a response time typically less than 0.2 seconds. For example, when the average gloss density value of the sprayed area is detected to be 10% higher than the target value, the spray pressure can be reduced by 5% to 8%; when the gloss density value is 10% lower than the target value, the spray pressure can be increased by 5% to 10%. To avoid over-adjustment leading to airflow instability, upper and lower limit constraints can be set in the control algorithm to keep the pressure adjustment range within a safe range.
[0083] The path speed correction is used to adjust the linear speed of the spray gun moving along the workpiece surface to balance the spray coverage time and deposition rate. When a large deviation in spray coverage and insufficient thickness are detected in the edge area, the moving speed should be reduced, and the spraying time should be extended accordingly. If overspray is detected, the speed should be increased to reduce the amount of spray. The path speed correction range must match the workpiece geometry. For edge areas with large curvature, small adjustments should be made to prevent spray lag caused by fluid inertia. For example, when the spray coverage is less than 8% of the target value, the moving speed can be reduced by 5%; when the coverage is more than 8% of the target value, the speed should be increased by the same amount. The motion control system needs to receive correction commands in real time to ensure smooth and continuous path changes and avoid abrupt changes that cause broken spray bands or excessively thick streaks.
[0084] The execution of all adjustment parameters must be completed within a stable closed-loop cycle. The duration of each adjustment cycle depends on the response speed of the spraying equipment and the workpiece size, and is generally set between 0.5 and 1 second. At the end of the cycle, the system immediately acquires a new spraying image and re-evaluates the edge feature data based on the updated image. This periodic feedback ensures the real-time performance of the spraying control, enabling the system to automatically adjust the control parameters for the next round based on the latest visual information. For example, over several consecutive cycles, if the brightness change in the edge area tends to stabilize and the thickness fluctuation is less than a preset threshold (e.g., within 2%), the system will gradually reduce the correction amount, allowing the spraying process to enter steady-state control; if a new deviation is detected, the correction mode will be automatically restored, forming a continuous dynamic balance.
[0085] In practical applications, the four control actions of spray gun angle, spray distance, pressure, and speed are not executed independently, but rather collaboratively through a control algorithm. For example, increasing the spray distance usually requires a slight increase in spray pressure to maintain constant particle kinetic energy; conversely, decreasing the speed can appropriately reduce the pressure to prevent excessive buildup. This correlation between parameters can be achieved through empirical models or adaptive algorithms. The algorithm continuously optimizes the coordination of each parameter based on historical spraying data, thereby improving control stability and convergence speed. In actual operation, initial parameter ranges can be set according to equipment performance, such as a spray distance variation range of two to five millimeters, a spray pressure adjustment range of ten percent to fifteen percent, an angle adjustment range within five degrees, and a speed adjustment range of five percent to ten percent. Optimal matching can be obtained through multiple iterations.
[0086] In summary, step S104 establishes a real-time closed-loop mechanism from spraying state recognition to spraying parameter adjustment by converting various correction quantities generated by visual feedback into specific spray gun control actions. The dynamic adjustment in each cycle is based on image feedback, and the new spraying image, in turn, becomes the calculation input for the next cycle, thus enabling the entire process to possess self-correction and adaptive characteristics. This step ensures that the spraying thickness automatically tends towards uniformity on workpieces with complex shapes or significant edge variations, avoiding quality instability caused by delays in manual adjustment, and achieving truly intelligent visual feedback control spraying.
[0087] Furthermore, the method utilizes generated spray gun attitude adjustment, spray distance correction, spray pressure correction, and path speed correction to dynamically adjust the spray gun angle, spray distance, spray pressure, and movement speed, thereby making the coating thickness in the edge area more uniform. A new spraying image is acquired at the end of each adjustment cycle, including: The spray gun angle is corrected according to the spray gun posture adjustment amount so that the projected trajectory of the spray center is consistent with the geometric boundary line of the workpiece edge, thus obtaining the spray center offset. The relative distance between the spray gun and the workpiece is adjusted based on the spray center offset to generate the spray distance correction amount; The injection pressure correction is calculated based on the changing trend of the spray distance correction and the rate of change of light density in the edge region, so that the injection pressure and the spray distance form a dynamic compensation relationship. The path speed of the spray gun along the edge of the workpiece is corrected by using the spray pressure correction amount and the spray distance correction amount as joint inputs, and the path speed correction amount is generated so that the spray gun moving speed and the spray coverage rate are kept in harmony, thereby reducing overspray or underspray. The results of the spray gun attitude adjustment, spray distance correction, spray pressure correction and path speed correction are comprehensively evaluated. At the end of each adjustment cycle, the spraying image is re-acquired using a multi-view vision acquisition device located near the spray gun, new edge feature data is generated and input into the next adjustment cycle to achieve continuous visual feedback correction.
[0088] In this step, the spraying control process operates in a closed-loop manner of "dynamic feedback - real-time correction - continuous iteration." The core objective is to achieve spatial consistency and temporal stability of the coating thickness at the workpiece edge through multi-dimensional parameter linkage adjustment. This step relies on the synergistic effect of spray gun attitude adjustment, spray distance correction, spray pressure correction, and path speed correction. By using the output of each stage as the input for the next stage, dynamic adaptive spraying control is achieved.
[0089] When adjusting the spray gun angle, the pitch and yaw angles of the spray gun are first precisely corrected based on the spray gun attitude adjustment amount, ensuring that the projected trajectory of the spray gun's spray center aligns with the geometric boundary line of the workpiece edge. The geometric boundary line is the actual shape curve of the workpiece edge identified in previous steps, and it has a clear spatial definition in the workpiece surface coordinate system. Through attitude adjustment, the angle between the incident direction of the spray center and the normal direction of the workpiece surface is controlled within a preset range (usually less than 15 degrees) to ensure that the sprayed particle stream impacts the workpiece surface perpendicularly or approximately perpendicularly, thereby avoiding coating buildup shift due to oblique incidence. After attitude adjustment, the spray center offset is calculated based on the degree of deviation of the spray center. This offset describes the spatial deviation of the spray gun's spray direction relative to the ideal geometric boundary line, and its magnitude depends on the shortest distance between the spray gun's optical axis projection point and the geometric line of the workpiece edge. For example, when the workpiece edge has a curved transition, if the spray center is offset by 1 mm relative to the normal direction, the system can use this distance as a direct input for the spray distance correction stage.
[0090] During the spray distance adjustment process, the optimal distance between the spray gun and the workpiece surface is calculated based on the obtained spray center offset, and a spray distance correction is generated. The spray distance is the vertical distance from the spray gun nozzle exit to the workpiece surface, and it significantly affects the kinetic energy attenuation, atomization diffusion angle, and adhesion density of the sprayed particles. In this field, the spray distance error is typically controlled within the range of 1 to 3 mm to maintain ideal particle deposition. If an increase in the spray center offset is detected, it means the distance between the spray gun and the workpiece is too large. This is compensated by reducing the spray distance correction to enhance particle kinetic energy density; conversely, when the spray center offset decreases, the spray distance correction is appropriately increased to avoid localized overspray. The adjustment result of the spray distance correction directly affects the adjustment of the spray pressure. Therefore, in this step, the spray distance correction serves not only as a control parameter for the spray gun position but also as an input variable for the spray pressure correction stage.
[0091] The jetting pressure is adjusted based on the trend of the jetting distance correction and the rate of change of optical density in the edge region. The rate of change of optical density reflects the increase or decrease of coating thickness per unit time, and is typically obtained by real-time analysis of changes in brightness in the edge region of the sprayed image. For example, if the brightness of the edge region decreases by 5% between two consecutive frames, it indicates that the coating thickness is increasing rapidly in that area, and the jetting pressure needs to be reduced to prevent buildup; if the brightness increases, it indicates that the coating is thinner, and the jetting pressure should be increased to increase adhesion. The jetting pressure correction and the jetting distance correction thus form a dynamic complementary relationship, ensuring that the particle stream maintains similar impact kinetic energy at different jetting distances, thereby physically maintaining a constant adhesion energy density. The result of the jetting pressure correction is passed as input to the path velocity correction stage.
[0092] In path speed correction, the optimal moving speed of the spray gun along the workpiece edge is calculated using the combined inputs of spray pressure correction and spray distance correction. Path speed directly determines the coverage area and adhesion thickness per unit time. When the spray pressure increases or the spray distance decreases, the path speed should be reduced accordingly to prevent excessive local coating thickness; conversely, when the spray pressure decreases or the spray distance increases, the path speed should be increased to compensate for insufficient coverage. In this way, the path speed correction achieves real-time coordination between spraying energy density and motion trajectory, maintaining a dynamic balance between spray coverage rate and particle adhesion rate, thereby effectively reducing overspraying or underspraying. The calculation result of the path speed correction is ultimately used as an input variable for comprehensive evaluation to determine the overall uniformity of spraying in this cycle.
[0093] At the end of the adjustment cycle, the execution results of the spray gun attitude adjustment, spray distance correction, spray pressure correction, and path speed correction are comprehensively evaluated, and a new spraying image is acquired using a multi-view vision acquisition device positioned near the spray gun. The re-acquired spraying image is compared with the image from the previous cycle in terms of brightness distribution, boundary position, and reflection characteristics to generate new edge feature data. The new edge feature data includes information such as coating thickness distribution, light density change rate, and geometric boundary offset, which is used to assess whether the spraying effect meets the uniformity requirements of the target spraying image. If a deviation is detected that exceeds a preset threshold (e.g., light density deviation exceeds ±5% or boundary offset exceeds 0.5 mm), the ratio coefficient of the spray gun attitude adjustment and spray distance correction is automatically updated in the next adjustment cycle to achieve continuous visual feedback correction.
[0094] Through the aforementioned continuous feedback mechanism, the spray gun angle, spray distance, spray pressure, and movement speed form an interdependent closed-loop dynamic control relationship in each adjustment cycle. The output of each parameter not only affects the current spraying result but also serves as the input basis for subsequent cycles, thereby enabling the spraying process to possess adaptive and progressive convergence characteristics. This step allows the spraying process to automatically stabilize at the optimal spraying state after multiple cycles, ensuring that the coating thickness at the workpiece edge remains uniformly distributed even on large, complex curved surfaces, while significantly improving spraying accuracy and production consistency.
[0095] Furthermore, the edge spraying compensation control method based on intelligent visual feedback also includes: The new spraying image is compared with the edge feature data of the previous cycle to extract the edge coating stability change information, and the correction ratios of the spray gun attitude adjustment, spray distance correction, spray pressure correction and path speed correction are updated based on the edge coating stability change information. When the detected change in edge feature data exceeds the preset threshold, the recognition weight and control parameter adjustment coefficient of the edge feature data are corrected based on the latest spraying image data to form a continuous iterative visual feedback compensation process, thereby realizing adaptive spraying compensation control for the edges of workpieces with different materials and complex shapes.
[0096] In this embodiment, to achieve more stable and adaptive spraying control, the newly acquired spraying image of the current cycle is compared with the edge feature data generated in the previous cycle after each spraying adjustment cycle. The core purpose of this process is to evaluate the changing trend of the spraying state in the edge region, thereby determining whether the spraying thickness, boundary morphology, and optical features tend to stabilize. Based on this stability change information, the control correction parameters are dynamically updated, enabling the spraying system to continuously optimize the compensation effect and automatically adapt to different operating conditions.
[0097] Before comparing the sprayed image with the edge feature data, it's essential to clarify the meaning of both types of data. The new sprayed image refers to the image acquired in real-time by the vision acquisition device at the end of the latest spraying cycle; it reflects the actual spraying effect on the workpiece surface after the previous adjustment. Edge feature data, on the other hand, is a structured data set generated by the image recognition algorithm in the previous cycle, typically containing multiple parameters such as edge position, local brightness gradient, estimated coating thickness, optical density distribution, and coating adhesion ratio. The comparison process is essentially a quantitative analysis of the changes in the spraying state between two consecutive time points. To ensure the accuracy of the comparison results, the system first spatially registers the two images based on the spray gun's movement trajectory, aligning them in the same coordinate system, and then compares the parameters of the corresponding regions item by item.
[0098] During the comparison process, it is necessary to extract key indicators that reflect the stability of the spraying process. The so-called "edge coating stability change information" refers to the trend characteristics of the spraying state over time, mainly reflected in three dimensions: first, the fluctuation range of brightness or optical density in the edge area; second, the continuous change in coating thickness distribution; and third, the slight spatial offset of the boundary position. For example, in two consecutive spraying images, if the brightness change in the same area is less than 3%, it indicates that the optical reflection characteristics are stabilizing, suggesting that the coating thickness is close to the target state; conversely, if the brightness fluctuation exceeds 10%, it indicates that the coating layer is still changing and further correction is needed. The stability of the thickness distribution can be determined by comparing the thickness difference of the same edge area in different periods. When the thickness change trend slows down and the deviation gradually decreases, it represents that the spraying process is converging. The stability of the boundary position depends on the relative offset between the sprayed area and the geometric boundary line of the workpiece. When the offset remains within 0.2 mm for two consecutive periods, the boundary can be considered stable.
[0099] After extracting the edge coating stability change information, the correction ratios for the spray gun attitude adjustment, spray distance correction, spray pressure correction, and path speed correction need to be updated based on this information. The correction ratio determines the adjustment range of each control parameter in the next cycle and is a key factor in achieving progressive control of the system. For example, when the edge thickness change trend is detected to be stabilizing and the rate of change in optical density is decreasing, the system will automatically reduce the correction ratio of each parameter, making the control more fine-tuned to avoid over-correction causing new fluctuations. Conversely, when the coating thickness deviation is found to be still increasing or the brightness fluctuation has not converged, the system will increase the correction ratio, making the adjustment range larger in the next cycle to accelerate the convergence speed. The change in the correction ratio is usually achieved using a proportional weighting method, that is, when calculating new parameters, the control value of the previous cycle and the correction amount of the current cycle are weighted and summed according to stability weights. For example, under good stability conditions, the previous cycle parameter ratio can be set to 80%, while the correction amount only accounts for 20%; under conditions of large deviation, the ratio can be reversed to 50% and 50% respectively. Through this weighting mechanism, the system can achieve adaptive response adjustment while maintaining stability.
[0100] To further improve the system's robustness, when changes in edge feature data exceed a preset threshold, a deeper self-correction mechanism needs to be triggered to readjust the weights and control parameter adjustment coefficients of the recognition algorithm. The "preset threshold" refers to the numerical limit used to determine a significant change in the coating state. In this field, it is often set according to process accuracy requirements; for example, a brightness change exceeding 15%, a thickness deviation exceeding 10% of the target value, or a boundary position offset exceeding 0.3 mm can all be considered exceeding the threshold. Once the system determines that the change exceeds this range, it indicates that the current coating control model deviates from the actual characteristics of the workpiece. At this point, the recognition weights of the edge features need to be re-evaluated using the latest coating image data. Recognition weights determine the degree of attention the algorithm pays to different indicators during feature extraction. For example, in smooth metal workpieces, the weight of reflective features should be increased, while in rough plastic workpieces, the weight of brightness gradient should be increased. By reallocating recognition weights, the system can more accurately capture key features, thereby improving recognition accuracy.
[0101] Simultaneously, the adjustment coefficients of the control parameters need to be corrected. These adjustment coefficients are proportional factors used to convert visual deviations into control commands, balancing the system's sensitivity and stability. For example, if the detected spraying deviation overreacts to changes in spray distance, causing coating thickness oscillations, the spray distance adjustment coefficient can be reduced to make the spray distance change smoother. Conversely, if the detected spraying state is sluggish in response to pressure changes, the spray pressure adjustment coefficient needs to be appropriately increased to make the compensation action more agile. This correction process is achieved by analyzing response data over several consecutive cycles. The system considers the correlation between parameter changes and changes in spraying effect during calculations and accordingly optimizes the coefficients to maintain optimal response characteristics of the control logic.
[0102] The entire process forms a continuous iterative visual feedback compensation loop. After each spraying cycle, the system evaluates the control effect based on the new visual results and automatically updates the control parameters for the next round. This iteration gives the system self-learning capabilities, allowing it to continuously adjust its strategy under conditions of different materials, different reflective properties, different edge geometries, and even changes in ambient lighting. For example, when switching from a metal workpiece to a plastic workpiece, the system automatically adjusts the recognition weight allocation and correction ratio by detecting the characteristic differences in reflected light intensity and brightness gradient changes, thus quickly adapting to the new spraying object without manual readjustment.
[0103] Through the above process, the spraying control is not limited to compensating for single deviations, but forms an intelligent feedback system that evolves over time. The result of each cycle becomes the basis for the next decision, and the system gradually approaches the optimal control state. The fluctuation of the spraying thickness is continuously reduced, and the uniformity of edge coverage is gradually improved. For complex-shaped workpieces, such as surfaces with grooves, rounded corners, or multiple curvature transitions, this method can achieve stable adaptive control within several iteration cycles, enabling the coating to achieve a uniform, smooth, and non-aggregated effect throughout the boundary area. This step introduces a multi-level self-correction mechanism based on visual differences, giving the spraying process continuous self-adaptation and highly accurate dynamic balance capabilities, providing a technical foundation for achieving highly consistent edge spraying of complex workpieces.
[0104] A second embodiment of this application provides an electronic device, the electronic device comprising: processor; The memory is used to store a program, which, when read and executed by the processor, executes an edge spraying compensation control method based on intelligent visual feedback provided in the first embodiment of this application.
[0105] The third embodiment of this application provides a computer-readable storage medium storing a computer program thereon. When the program is executed by a processor, it executes an edge spraying compensation control method based on intelligent visual feedback provided in the first embodiment of this application.
[0106] Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.
Claims
1. A method for edge spraying compensation control based on intelligent visual feedback, characterized in that, include: A multi-view vision acquisition device arranged near the spray gun is used to spatially scan the workpiece to be sprayed, and to acquire spraying image data including boundary curvature, surface normal direction and reflected light intensity distribution. The spatial correspondence between the spray gun motion coordinates and the workpiece surface coordinates is determined based on the spraying image data, so as to be used for the registration of the spraying image during the spraying process. Based on the spatial correspondence, the spraying images acquired in real time during the spraying process are registered to obtain edge region spraying images synchronized with the spray gun movement trajectory. Based on the edge region spraying images, the geometric boundary lines, brightness gradient changes and coating adhesion areas of the workpiece edge are identified to generate edge feature data to describe the current spraying state. Based on the difference between edge feature data and preset target spraying image, the spraying coverage deviation and boundary overlap error at the edge of the workpiece are calculated, and the difference is used as the basis for control correction. The coating thickness change trend, light density change rate and boundary direction offset are extracted to generate spray gun posture adjustment amount, spray distance correction amount, spray pressure correction amount and path speed correction amount. The angle, spray distance, spray pressure, and movement speed of the spray gun are dynamically adjusted by using the generated spray gun attitude adjustment amount, spray distance correction amount, spray pressure correction amount, and path speed correction amount, so that the coating thickness in the edge area tends to be uniform, and a new spraying image is acquired at the end of each adjustment cycle.
2. The edge spraying compensation control method based on intelligent visual feedback according to claim 1, characterized in that, Also includes: The new spraying image is compared with the edge feature data of the previous cycle to extract the edge coating stability change information, and the correction ratios of the spray gun attitude adjustment, spray distance correction, spray pressure correction and path speed correction are updated based on the edge coating stability change information. When the detected change in edge feature data exceeds the preset threshold, the recognition weight and control parameter adjustment coefficient of the edge feature data are corrected based on the latest spraying image data to form a continuous iterative visual feedback compensation process, thereby realizing adaptive spraying compensation control for the edges of workpieces with different materials and complex shapes.
3. The edge spraying compensation control method based on intelligent visual feedback according to claim 1, characterized in that, The process involves using a multi-view vision acquisition device positioned near the spray gun to spatially scan the workpiece to be sprayed, acquiring spraying image data including boundary curvature, surface normal direction, and reflected light intensity distribution. Based on this spraying image data, the spatial correspondence between the spray gun's motion coordinates and the workpiece's surface coordinates is determined for image registration during the spraying process. This includes: A multi-view vision acquisition device located near the spray gun is used to simultaneously image the edge area of the workpiece to be sprayed from multiple angles. The boundary point set of the workpiece edge is identified by the overlapping area of the images from different viewpoints, and the boundary curvature distribution is calculated based on the spatial difference of the boundary points in each viewpoint to characterize the geometric change features of the workpiece surface. Based on the boundary curvature distribution, the reflected light intensity of the spraying image data in the same area is compared, the relationship between the reflected light intensity and the incident angle is analyzed, the surface normal direction corresponding to each boundary point is determined, and the reflected light intensity, surface normal direction and boundary curvature are correlated to form spraying image data containing geometric and optical information. Based on the spatial correspondence between the spray gun spray center and the feature points on the workpiece surface in the spraying image data, the spatial correspondence between the spray gun motion coordinates and the workpiece surface coordinates is determined. The spray gun motion coordinates are synchronously corrected with the imaging position of the spray gun spray center as the reference, so that the spray gun motion coordinates maintain spatial stability within the workpiece surface range. The determined spatial correspondence is applied to the spraying image registration process. The spraying image acquired in real time during the spraying process is compared with the spraying image data containing boundary curvature, surface normal direction and reflected light intensity distribution. The spatial offset caused by changes in spray gun posture, atomization diffusion or light reflection is corrected so that the spraying image remains consistent with the workpiece surface under dynamic spraying conditions.
4. The edge spraying compensation control method based on intelligent visual feedback according to claim 1, characterized in that, The process involves registering the spraying images acquired in real-time during the spraying process according to the spatial correspondence, obtaining edge region spraying images synchronized with the spray gun's movement trajectory, and identifying the geometric boundary lines, brightness gradient changes, and coating adhesion areas of the workpiece edges based on the edge region spraying images. This generates edge feature data describing the current spraying state, including: Based on the spatial correspondence, each pixel in the real-time acquired spraying image is mapped to its physical position in the workpiece surface coordinate system. The time information of the spray gun movement trajectory is used as an identifier to establish a synchronous registration relationship between the spraying image and the spray gun movement trajectory, so that the spraying image in the edge area and the actual movement state of the spray gun on the workpiece surface maintain spatial consistency and temporal correspondence. Based on the brightness distribution of the registered edge area spraying image, the brightness gradient change amplitude of each pixel is calculated, and a set of continuous pixels with the same brightness gradient change direction and a change amplitude more than twice the average brightness gradient is selected as the boundary candidate region. The continuous pixel line with the largest brightness gradient change in the candidate region is determined as the geometric boundary line of the workpiece edge, and the spatial direction of the geometric boundary line and its deflection angle relative to the spray gun spraying direction are extracted. Using the geometric boundary line as the central region, an edge detection zone covering a predetermined distance on both sides is set. The rate of change of brightness gradient and the trend of brightness change over time within the detection zone are comprehensively analyzed. The region where the brightness continuously decreases and the light reflection characteristics change from specular reflection to diffuse reflection is determined as the coating adhesion region. The brightness difference and spatial offset between the coating adhesion region and the geometric boundary line are recorded to reflect the spraying coverage and adhesion thickness distribution. The position data of the geometric boundary line, the rate of change of brightness gradient, the brightness difference of the coating adhesion area and the boundary offset are correlated and processed to form edge feature data including edge position, coating thickness change trend and adhesion uniformity. This data is used to characterize the current spraying state and serves as the input basis for calculating spraying coverage deviation and boundary overlap error.
5. The edge spraying compensation control method based on intelligent visual feedback according to claim 1, characterized in that, The method involves calculating the coating coverage deviation and boundary overlap error at the workpiece edge based on the difference between edge feature data and the preset target spraying image, and using this difference as a basis for control correction. It extracts the coating thickness change trend, optical density change rate, and boundary direction offset to generate spray gun attitude adjustment, spray distance correction, spray pressure correction, and path speed correction, including: Based on the registration results of edge feature data and preset target spraying image, the brightness distribution, boundary position and coating adhesion thickness information of the corresponding area at the edge of the workpiece are extracted, and the spatial difference between the target edge position in the preset target spraying image and the actual edge position in the current edge feature data is calculated. The spatial difference is decomposed into spraying coverage deviation along the spraying direction and boundary overlap error along the boundary direction, which are used to generate spraying difference data at the edge of the workpiece. The spraying coverage deviation and boundary overlap error in the spraying difference data are used as the basis for control correction. The time analysis of the light reflection brightness change in the edge area is carried out. The brightness change amplitude of the same position pixel in the continuous spraying image is extracted over time, and the brightness change rate is defined as the light density change rate to reflect the adhesion change and accumulation trend of the coating in the edge area. Based on the distribution of light density change rate, the variation law of spray coverage deviation over time is compared, the growth or thinning trend of coating thickness at different boundary positions is analyzed, and the coating thickness change trend is determined accordingly. This coating thickness change trend is combined with the boundary overlap error to determine the stability and coverage uniformity of coating adhesion at the workpiece edge. Based on the coating thickness variation trend and the spatial distribution of boundary overlap error, the boundary direction offset is extracted. The spatial direction of the current spraying boundary is compared with the direction of the workpiece geometric boundary line. If the boundary direction offset exceeds the preset deviation threshold, the required spray gun posture adjustment direction is determined. The rate of change of the boundary direction offset is used as the basis for generating the spray gun posture adjustment amount, so that the spray gun posture remains consistent with the geometric direction of the workpiece edge during the spraying process. Based on the matching relationship between the spray gun attitude adjustment amount and the rate of change of optical density, the spray distance correction amount and the spray pressure correction amount are calculated to ensure that the spray gun spray distance and spray pressure maintain a corresponding relationship in the edge area. Combined with the actual movement trajectory of the spray gun along the edge of the workpiece, the path speed correction amount is calculated to reduce the movement speed and enhance the adhesion uniformity when spraying in the edge area, and to maintain the set speed when spraying in the planar area, so as to achieve a stable and consistent coating coverage thickness and optical density distribution. This generates a set of control correction parameters including the spray gun attitude adjustment amount, spray distance correction amount, spray pressure correction amount and path speed correction amount.
6. The edge spraying compensation control method based on intelligent visual feedback according to claim 1, characterized in that, The process involves dynamically adjusting the spray gun's angle, spray distance, spray pressure, and movement speed using generated spray gun attitude adjustment, spray distance correction, spray pressure correction, and path speed correction. This aims to achieve a more uniform coating thickness in the edge areas and acquires a new spraying image at the end of each adjustment cycle. The spray gun angle is corrected according to the spray gun posture adjustment amount so that the projected trajectory of the spray center is consistent with the geometric boundary line of the workpiece edge, thus obtaining the spray center offset. The relative distance between the spray gun and the workpiece is adjusted based on the spray center offset to generate the spray distance correction amount; The injection pressure correction is calculated based on the changing trend of the spray distance correction and the rate of change of light density in the edge region, so that the injection pressure and the spray distance form a dynamic compensation relationship. The path speed of the spray gun along the edge of the workpiece is corrected by using the spray pressure correction amount and the spray distance correction amount as joint inputs, and the path speed correction amount is generated so that the spray gun moving speed and the spray coverage rate are kept in harmony, thereby reducing overspray or underspray. The results of the spray gun attitude adjustment, spray distance correction, spray pressure correction and path speed correction are comprehensively evaluated. At the end of each adjustment cycle, the spraying image is re-acquired using a multi-view vision acquisition device located near the spray gun, new edge feature data is generated and input into the next adjustment cycle to achieve continuous visual feedback correction.
7. The edge spraying compensation control method based on intelligent visual feedback according to claim 5, characterized in that, The method uses the spraying coverage deviation and boundary overlap error in the spraying difference data as the basis for control correction, performs time analysis on the light reflection brightness change in the edge area, extracts the brightness change amplitude of pixels at the same position in continuous spraying images over time, and defines the brightness change rate as the light density change rate to reflect the adhesion change and accumulation trend of the coating in the edge area, including: Based on the edge regions identified by the spraying difference data and the registration relationship of the preset target spraying image, the set of sampling positions of pixels at the same position in the continuous spraying image is determined, and the timestamp, exposure parameters and light reflection brightness are recorded for each sampling position to form a brightness original sequence with time stamp; Using the light reflection brightness of the uncoated reference strip or the reference strip with stable adhesion as a benchmark, the original brightness sequence is normalized by illumination to obtain a brightness normalized sequence that removes the influence of illumination fluctuations. Based on the difference between consecutive image frames in the normalized brightness sequence and the acquisition time interval, the average brightness change amplitude of each sampling position within a fixed frame number sliding interval is obtained, a brightness change sequence is generated, and isolated pulsation points are removed by a preset outlier removal threshold to obtain a brightness change sequence for rate conversion. Based on the brightness change sequence and the corresponding acquisition time interval, the brightness change amplitude of each sampling position is converted into the brightness change rate per unit time, forming a brightness change rate distribution containing spatial position and change direction information, which is used to characterize the thickening or thinning trend of that position during the spraying process. Based on the correspondence between brightness and optical density obtained by calibration with a reference reflective strip, the rate of change of brightness is determined as the rate of change of optical density. The positive rate of change of optical density represents the increase of coating adhesion in the edge region, the negative rate of change of optical density represents the thinning of the coating, and the absolute value of the rate of change of optical density represents the rate of deposition. The resulting data, which includes edge location, the value of the rate of change of optical density, and the direction of change, are used to reflect the changes in coating adhesion and deposition trend in the edge region.
Citation Information
Cited By
Double-valve high-precision coating system integrating visual detection and closed-loop optimization
CN121785106A
Spraying control method of waveform guardrail spraying manipulator
CN121848411A
Online measurement method for thickness image of sprayed coating of heavy structural member
CN122115427A
A method for online measurement of coating thickness of heavy structural components
CN122115427B
Deformed steel bar spraying path planning method and system based on shadow area dynamic compensation
CN122194833A