Dispensing track optimization control system based on visual template conversion
Through visual template analysis and multi-particle linkage feedback optimization of the dispensing trajectory, the problems of trajectory deviation and resource waste in the existing technology are solved, and efficient and stable control of the dispensing process is achieved.
Patent Information
- Application Number
- CN202510454484.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-11
- Publication Date
- 2025-08-19
AI Technical Summary
The existing technology does not fully consider dynamic deformation factors under complex geometric constraints during the dispensing process, resulting in local trajectory deviations easily during path reconstruction, and lacks a multi-dimensional parameter linkage feedback mechanism, resulting in the trajectory optimization process relying on manual intervention, and there is a problem of glue overflow or glue breakage. The path planning does not consider tool size and pressure feedback parameters, resulting in waste of resources and wear of equipment.
The boundary points are extracted through the visual template analysis module, the contour point correction module corrects the offset points, the trajectory vector generation module optimizes the trajectory weights based on tool parameters, and the multi-access linkage feedback module integrates speed and grayscale parameters to generate real-time trajectory adjustment vectors. The optimal path planning module filters the minimum cumulative distance path, and comprehensively considers the tool physical properties and environmental parameters.
It improves the matching and stability of the dispensing trajectory, reduces the impact of environmental interference on the path, optimizes resource consumption, and improves the robustness and execution economy of the system.
Smart Images

Figure CN120510175A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image analysis, and in particular to a dispensing trajectory optimization control system based on visual template conversion. Background Art
[0002] The field of image analysis technology encompasses processes such as identifying, extracting, segmenting, and understanding information within images. Core aspects of this field include image feature recognition, image target location, image matching and tracking, motion analysis, edge detection, and region segmentation. The goal is to extract useful information from static or dynamic images and analyze and judge them through algorithms and processing flows. Image analysis is widely used in a variety of industries, including intelligent manufacturing, medical imaging, security monitoring, and autonomous driving. It involves the entire technical process from image data acquisition to analysis and judgment, typically relying on image acquisition equipment, feature extraction methods, pattern recognition processes, and image processing programs to complete systematic data analysis tasks.
[0003] Among them, the dispensing trajectory optimization control system based on visual template conversion refers to an image analysis method that obtains and adjusts the dispensing path through visual template recognition and conversion. This patent subject addresses the accuracy and efficiency of trajectory control during the dispensing process, covering specific contents such as standardized processing of image templates, visual positioning information extraction, path reconstruction and trajectory optimization. The system first collects the image of the dispensing object and extracts key feature point information. It matches the actual target image to the standard template through template conversion technology, and then constructs the trajectory path based on the standard template. It dynamically adjusts the dispensing trajectory in combination with the geometric constraint relationship in the image to complete the optimization control process of the dispensing path. This process does not rely on module division, and directly performs template comparison and path generation based on visual image information.
[0004] Existing technologies rely on static matching between standard templates and actual targets during image template conversion, and fail to fully consider dynamic deformation factors under complex geometric constraints. This results in local trajectory deviations during path reconstruction, requiring manual intervention for correction. The existing trajectory optimization process lacks a multi-dimensional parameter linkage feedback mechanism and only adjusts the path based on a single visual data, ignoring the impact of physical parameters such as dispensing head pressure, movement speed, and ambient temperature on trajectory accuracy. This can easily lead to glue overflow or glue breakage in high-speed dispensing scenarios. Existing path planning methods use a single geometric feature as a benchmark and do not introduce energy consumption evaluation and cumulative distance optimization mechanisms. The path generation results suffer from redundant movement or resource waste. For example, in curved surface dispensing tasks, traditional methods fail to integrate tool size and pressure feedback parameters, resulting in uneven contact pressure between the needle and the surface and insufficient consistency in glue line width. In multi-target dispensing scenarios, path planning does not consider the energy consumption of actuator movement, and excessive trajectory turning points cause energy loss and equipment wear. Summary of the Invention
[0005] The purpose of the present invention is to solve the shortcomings of the prior art and propose a dispensing trajectory optimization control system based on visual template conversion.
[0006] In order to achieve the above-mentioned purpose, the present invention adopts the following technical solution: a dispensing trajectory optimization control system based on visual template conversion includes:
[0007] The visual template parsing module obtains the two-dimensional pixel matrix of the imported graphic data, clusters the pixels to extract directional features, superimposes the brightness and color channel weights to obtain boundary points, counts the number of line segment occurrences, selects the extension trajectory, and establishes a baseline feature set;
[0008] The contour point correction module calls the baseline feature set, sorts the gradient direction to segment the boundary segments, selects the maximum offset point to calculate the deviation value, interpolates and repositions the tangent points before and after the deformation point, and generates a preliminary correction point set;
[0009] The trajectory vector generation module connects trajectory points based on the preliminary correction point set, calculates the change in the angle between adjacent point vectors as a directional eigenvalue, collects tool parameters including needle size and pressure feedback strength, combines the directional eigenvalue with the tool parameter normalization operation to obtain a trajectory weight factor, applies the weight factor to generate point correction increments, and superimposes the correction increments with the preliminary correction point set to obtain an optimized trajectory reference point set;
[0010] The multi-parameter linkage feedback module collects speed and grayscale mean difference, calculates the center of mass coordinate difference to obtain the visual offset vector, establishes a speed floating factor sequence, fuses the visual offset vector and the floating factor weight, and generates a real-time trajectory adjustment vector.
[0011] As a further solution of the present invention, the baseline feature set includes line segment length, normal vector, boundary point coordinates, and trajectory frequency; the preliminary correction point set includes deformation offset value, corrected coordinates, and interpolation function coefficients; the optimized trajectory baseline point set specifically includes optimized point coordinates and weighted direction vector; and the real-time trajectory adjustment vector includes visual offset and speed floating factor.
[0012] As a further solution of the present invention, the visual template parsing module includes:
[0013] The pixel clustering and direction extraction submodule detects a two-dimensional pixel matrix, clusters adjacent pixels based on Euclidean distance, calculates the horizontal and vertical gradient amplitudes, constructs a directional gradient histogram, counts the peak frequency of the main direction angle distribution, and generates a directional density distribution set;
[0014] The boundary weight superposition submodule calls the directional density distribution set, assigns dynamic weights to the gradient amplitude of the brightness channel, combines the color difference difference values of the color channel with weighted fusion, calculates the comprehensive edge response value of the pixel point, and screens the pixel points with response values higher than the background noise according to the adaptive threshold to generate a boundary point set;
[0015] The reference trajectory screening submodule counts the number of consecutive distributions of line segments in the 8-neighborhood directions based on the boundary point set, using the formula:
[0016]
[0017] The extended trajectory scores are obtained by calculation, and the three trajectories with the highest scores are selected to construct the baseline feature set;
[0018] Among them, S ext Represents the extension trajectory score, which is used to quantify the directional density and distribution continuity of candidate trajectories. Represents the main direction density value of the area in row i and column j in the direction density distribution concentration, represents the frequency of occurrence of the qth line segment in the neighborhood direction, B lum is the average brightness contrast of adjacent pixels in the boundary point set, Q clr is the quality factor calculated based on the hue difference in the HSV color space, and n is the total number of candidate line segments.
[0019] As a further solution of the present invention, the contour point correction module includes:
[0020] The gradient segmentation submodule calls the baseline feature set, extracts the gradient direction feature value of the boundary segment, calculates the gradient direction angle change rate of each point, sorts the absolute value of the change rate from high to low to generate an index sequence, and divides consecutive adjacent points into the same segment according to the index sequence to generate a gradient ordered boundary segment;
[0021] The offset calculation submodule traverses the coordinate points in each segment based on the gradient ordered boundary segment, calculates the Euclidean distance between each point and the mean value of the baseline feature, and superimposes the difference weight between the gradient direction angle of the coordinate point and the reference gradient direction angle, using the formula:
[0022]
[0023] The calculation obtains the comprehensive offset of each point, and compares it with the preset offset threshold point by point, filters out the set of points that exceed the standard, and generates the set of abnormal offset points;
[0024] Among them, Δ q Represents the comprehensive offset of the current point, x q 、y q Represents the current point coordinates, μ x 、μ yrepresents the mean of the baseline characteristic coordinates, θ q Represents the gradient direction angle of the current point, θ base Represents the reference gradient direction angle, θ max Represents the maximum gradient direction angle in the current segment;
[0025] The interpolation relocation submodule calls the abnormal offset point set, searches for the two nearest non-abnormal points in both directions forward and backward along the boundary segment for each abnormal point, calculates the cosine value of the vector angle between the three points, constructs an interpolation matrix of position coordinates and angle weights, and generates a preliminary correction point set.
[0026] As a further solution of the present invention, the trajectory vector generation module includes:
[0027] The directional feature analysis submodule obtains the preliminary correction point set, constructs a continuous vector sequence based on the Euclidean distance between adjacent points, calculates the radian value of the angle between adjacent vectors, and extracts the absolute value of the radian change as the directional feature value;
[0028] The parameter normalization submodule calls the directional eigenvalue, collects the needle diameter parameter and the pressure sensor feedback intensity parameter, and uses the formula:
[0029]
[0030] The directional feature weight component and the tool parameter weight component are obtained by calculation, and the two components are superimposed and normalized to generate the trajectory weight factor;
[0031] Among them, Δφ i represents the radian change of the angle between adjacent vectors at the i-th trajectory point, N represents the total number of points in the preliminary correction point set after coordinate correction, F represents the scalar value of the needle axial pressure feedback intensity collected in real time by the pressure sensor, R represents the measured needle cylinder radius value in the needle tool size parameter, λ represents the minimum positive real number interference factor to avoid the denominator being zero, and W i Represents the normalized weight factor of the i-th trajectory point;
[0032] The reference point optimization submodule calls the trajectory weight factor, calculates the coordinate offset of multiple points based on the product of the weight value and the preset correction scale coefficient, and algebraically superimposes the offset vector with the coordinates of the preliminary correction point set point by point to generate an optimized trajectory reference point set.
[0033] As a further solution of the present invention, the multi-parameter linkage feedback module includes:
[0034] The data acquisition and centroid calculation submodule collects the speed parameters and image grayscale mean parameters from the multi-channel linkage feedback signal, calculates the grayscale mean difference between adjacent frames and extracts the pixel coordinates of the corresponding area, performs weighted centroid positioning operation on the coordinate difference, and generates the centroid offset coordinate value;
[0035] The floating factor sequence generation submodule calls the centroid offset coordinate value, extracts the speed parameter fluctuation interval and divides the time window, normalizes the speed standard deviation and range within the window, and constructs a speed floating factor sequence associated with the visual offset;
[0036] The trajectory adjustment vector fusion submodule performs time-series matching on the offset vector components based on the center of mass offset coordinate value and the speed floating factor sequence, adds the floating factor as a weight coefficient to the vector amplitude, and generates a real-time trajectory adjustment vector after fusion.
[0037] As a further embodiment of the present invention, the system further comprises:
[0038] The optimal path planning module calls the optimized trajectory reference point set and superimposes the real-time trajectory adjustment vector to obtain the execution point position, calculates the distance between points to generate a distance matrix, selects the minimum cumulative distance point to plan the path, calculates the energy consumption coefficient to sort the path, and screens to obtain the optimal energy consumption path sequence;
[0039] The optimal energy consumption path sequence specifically refers to the execution point coordinates, point access sequence, road section energy consumption coefficient, and overall energy consumption evaluation value.
[0040] As a further solution of the present invention, the optimal path planning module includes:
[0041] The point superposition submodule extracts the X-axis coordinates, Y-axis coordinates and elevation data of the optimized trajectory reference point set, calls the horizontal offset component and the vertical offset component of the real-time trajectory adjustment vector, performs algebraic superposition operation on the reference point coordinate components and the adjustment vector components according to the point sequence number, and generates an execution point set that integrates the dynamic adjustment parameters;
[0042] The energy consumption screening submodule calculates the Euclidean distance difference between the three-dimensional coordinates of adjacent points based on the execution point set, constructs an inter-point distance matrix containing the path branch topology relationship, traverses the matrix nodes, and uses the formula:
[0043]
[0044] Calculate and obtain the quantitative indicators of multi-path energy consumption, sort them in ascending order according to the indicator values, and generate a candidate path sequence;
[0045] Among them, E represents the quantitative index of path energy consumption, l r represents the Euclidean distance of the rth path, Δz r represents the absolute value of the elevation difference of the rth path, v r represents the average rate of the rth path segment, γ is the rate compensation factor, m represents the total number of path segments, and r is the path segment index;
[0046] The energy consumption optimal sequence generation submodule calls the path node set with the lowest energy consumption quantitative index in the candidate path sequence, verifies the cosine value of the angle between the azimuth angle of the real-time trajectory adjustment vector and the tangent direction of the path node, and selects the optimal energy consumption path sequence that meets the cosine threshold and has continuous path curvature.
[0047] Compared with the prior art, the advantages and positive effects of the present invention are:
[0048] In this invention, boundary points are extracted by clustering pixels and overlaying brightness and color channel weights. The extended trajectory is filtered by combining statistical line segment frequency, and a baseline feature set is constructed to enhance the stability and accuracy of feature recognition. Gradient directions are sorted to segment boundary segments and the maximum offset point deviation is calculated. Contour points are repositioned and corrected based on interpolation of tangent points before and after the deformation point. The geometric deformation correction capability improves the match between the trajectory and the actual target. The change in the angle between adjacent point vectors and the tool parameters is normalized to generate a trajectory weight factor. The trajectory baseline point set is optimized after overlaying point correction increments. The path generation process incorporates tool physical properties, and the trajectory adaptability is dynamically adjusted with the parameters. Multidimensional parameters such as speed, pressure, and temperature are collected and integrated with visual offset vectors and floating factor weights. Real-time trajectory adjustment vectors are used to reduce the impact of environmental interference on path stability. After overlaying the execution points and adjustment vectors, the inter-point distance matrix is calculated. The optimal path sequence is selected based on the minimum cumulative distance and energy consumption coefficient. Path planning balances execution efficiency and resource consumption, significantly improving the overall robustness and execution economy of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 is a system flow chart of the present invention;
[0050] Figure 2 This is a flow chart of the visual template parsing module of the present invention;
[0051] Figure 3 This is a flow chart of the contour point correction module of the present invention;
[0052] Figure 4 This is a flow chart of the trajectory vector generation module of the present invention;
[0053] Figure 5 This is a flow chart of the multi-parameter linkage feedback module of the present invention;
[0054] Figure 6 This is the flow chart of the optimal path planning module of the present invention. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0056] In the description of the present invention, it should be understood that the terms "length," "width," "up," "down," "front," "back," "left," "right," "vertical," "horizontal," "top," "bottom," "inside," "outside," and the like, indicating positions or relationships, are based on the positions or relationships shown in the accompanying drawings and are intended only to facilitate the description of the present invention and simplify the description. They do not indicate or imply that the devices or elements referred to must have a specific orientation, be constructed, or operate in a specific orientation. Therefore, they should not be construed as limiting the present invention. Furthermore, in the description of the present invention, "plurality" means two or more, unless otherwise expressly and specifically defined.
[0057] Example 1
[0058] See also Figure 1 , the dispensing trajectory optimization control system based on visual template conversion includes:
[0059] The visual template parsing module obtains the two-dimensional pixel matrix of the imported graphic data, clusters the pixels to extract directional features, superimposes the brightness and color channel weights to obtain boundary points, counts the number of line segment occurrences, selects the extension trajectory, and establishes a baseline feature set;
[0060] The contour point correction module calls the baseline feature set, sorts the gradient direction to segment the boundary segment, selects the maximum offset point to calculate the deviation value, interpolates and repositions the tangent points before and after the deformation point, and generates a preliminary correction point set;
[0061] The trajectory vector generation module connects trajectory points based on the preliminary correction point set, calculates the change in the angle between adjacent point vectors as the directional eigenvalue, collects tool parameters including needle size and pressure feedback intensity, combines the directional eigenvalue with the tool parameter normalization operation to obtain the trajectory weight factor, applies the weight factor to generate point correction increments, and superimposes the correction increments with the preliminary correction point set to obtain the optimized trajectory reference point set;
[0062] The multi-parameter linkage feedback module collects speed and grayscale mean difference, calculates the center of mass coordinate difference to obtain the visual offset vector, establishes a speed floating factor sequence, and fuses the visual offset vector with the floating factor weight to generate a real-time trajectory adjustment vector.
[0063] The optimal path planning module calls the optimized trajectory reference point set and the real-time trajectory adjustment vector to obtain the execution point position, calculates the distance between points to generate a distance matrix, selects the minimum cumulative distance point to plan the path, calculates the energy consumption coefficient to sort the path, and screens the optimal energy consumption path sequence.
[0064] The baseline feature set includes line segment length, normal vector, boundary point coordinates, and trajectory frequency. The preliminary correction point set includes deformation offset value, corrected coordinates, and interpolation function coefficients. The optimized trajectory baseline point set specifically includes optimized point coordinates and weighted direction vectors. The real-time trajectory adjustment vector includes visual offset and speed floating factor. The optimal energy consumption path sequence specifically refers to the execution point coordinates, point access order, road section energy consumption coefficient, and overall energy consumption evaluation value.
[0065] See also Figure 2 , the visual template parsing module includes:
[0066] The pixel clustering and direction extraction submodule detects a two-dimensional pixel matrix, clusters adjacent pixels based on Euclidean distance, calculates the horizontal and vertical gradient amplitudes, constructs a directional gradient histogram, counts the peak frequency of the main direction angle distribution, and generates a directional density distribution set;
[0067] The work of the visual template parsing module begins with the pixel clustering and direction extraction submodule. This submodule receives the acquired two-dimensional image matrix, whose resolution is set to 1920x1080 pixels. For each pixel in the image, for example, the pixel at coordinates (100,100), whose grayscale value is 145, the submodule calculates the Euclidean distance between it and each pixel in the 8-neighborhood (coordinates from (99,99) to (101,101)). Consider the pixel (100,101), whose grayscale value is 150, and its spatial distance to (100,100) is calculated as The clustering distance threshold is set to 3 pixels. This threshold is determined based on an analysis of image noise characteristics and target structure size. It aims to group closely adjacent pixels with similar characteristics together. Because the calculated distance 1 is less than the threshold 3, pixels (100, 101) and (100, 100) are assigned to the same initial cluster. This process is repeated across all pixels in the image, forming multiple pixel clusters based on spatial proximity.
[0068] Then, for each pixel, the Sobel operator is used to calculate its horizontal and vertical gradients. x The vertical gradient G is calculated by the convolution kernel [-1, 0, 1; -2, 0, 2; -1, 0, 1]. y Calculated by convolution kernel [-1,-2,-1; 0,0,0; 1,2,1]. For pixel (100,100), G is calculated. x =50 and G y =-30. Based on these two gradient values, calculate the gradient amplitude of the point And the gradient direction angle arctan(G y / G x)=arctan(-30 / 50)=arctan(-0.6)≈-30.96°. The gradient direction angles of all pixels are quantized into 36 preset intervals (one interval every 10 degrees, from -180° to +180°). Construct a histogram of directional gradients (HOG) covering the entire image. The specific method is to divide the image into several sub-regions (cells), and count the sum of the gradient amplitudes falling into each direction interval in each sub-region. The statistical results show that in the sub-region containing the pixel (100,100), the cumulative gradient amplitude in the direction interval of -30° to -40° is the highest, reaching 5800. This value is determined as the main direction density of the sub-region, and the dominant direction of the region is set to -35°. The main direction density values of all sub-regions and their corresponding main direction angles are summarized to generate a direction density distribution set. This set is stored in matrix form, and the elements of the matrix in row i and column j are That is the main direction density value of the i,jth sub-region.
[0069] The boundary weight superposition submodule calls the directional density distribution set, assigns dynamic weights to the gradient amplitude of the brightness channel, combines the color difference difference values of the color channel with weighted fusion, calculates the comprehensive edge response value of the pixel point, and filters the pixels with response values higher than the background noise according to the adaptive threshold to generate a boundary point set;
[0070] The boundary weight overlay submodule calls the directional density distribution set. For each pixel in the image brightness channel (Y channel, extracted from the YUV color space), such as (150,200) here, its brightness gradient amplitude is originally calculated to be 60. According to the directional density value of the sub-region where the point is located (obtained by querying the direction density distribution set, set to 4500), and assigning dynamic weights to its brightness gradient amplitude. The weight calculation method is The basic weight w0 is set to 0.5, and the density adjustment coefficient k d Set to 10 -4 The setting of w0 ensures that there is a basic response even in areas with low directional density, k d The value of is based on experimental tuning, aiming to keep the contribution of directional density to weight within a reasonable range. The dynamic weight w is calculated lum =0.5+10 -4 ×4500=0.5+0.45=0.95. The weighted brightness gradient response is 60×0.95=57. At the same time, calculate the mean square error of the color difference between this point and its 3x3 neighboring pixels on the color channel (U, V channel), and the value is 25. Set the color difference weight w c= 0.8, the weight is set according to the importance of color information in target recognition. The color channel contribution value is 25 × 0.8 = 20. The weighted brightness gradient response and color contribution value are linearly fused to calculate the comprehensive edge response value: E resp =w lum_resp +w clr_resp =57+20=77. Set the adaptive edge response threshold T edge , the threshold is set according to the overall gradient statistical characteristics of the image, and is 1.5 times the global gradient amplitude mean. If the global gradient amplitude mean is 40, then T edge =1.5×40=60. Compare the integrated edge response value 77 of pixel (150,200) with the threshold 60. Since 77>60, the pixel is determined to be a boundary point. A response value higher than 60 indicates that there is a significant difference in brightness, color and gradient direction consistency between the pixel and its surrounding environment. A value lower than 60 is considered to be background noise or an internal flat area. Filter out all E resp >T edge The pixel points constitute the boundary point set.
[0071] The benchmark trajectory screening submodule counts the number of consecutive distributions of line segments in the 8-neighborhood directions based on the boundary point set, using the formula:
[0072]
[0073] The extended trajectory scores are obtained by calculation, and the three trajectories with the highest scores are selected to construct the baseline feature set;
[0074] Among them, S ext Represents the extension trajectory score, which is used to quantify the directional density and distribution continuity of candidate trajectories. Represents the main direction density value of the area in row i and column j in the direction density distribution concentration, represents the frequency of occurrence of the qth line segment in the neighborhood direction, B lum is the average brightness contrast of adjacent pixels in the boundary point set, Q clr is the quality factor calculated based on the hue difference in the HSV color space, and n is the total number of candidate line segments.
[0075] The baseline trajectory screening submodule processes the boundary point set. This submodule identifies and evaluates potential line segments formed by boundary points. For each candidate line segment, the number of times it appears in 8 neighboring directions (0°, 45°, 90°, 135°, 180°, 225°, 270°, 315°) is counted. A candidate line segment q, with a length of 15 pixels, appears 12 times in a row in the 45° direction. Its frequency is recorded. Calculate the absolute difference in brightness of all adjacent pixel pairs in the boundary point set and take the average value to obtain the average brightness contrast B lum=35.5. B lum Reflects the average brightness difference on both sides of the boundary. Calculates the difference quality factor Q based on the hue component in the HSV color space clr This factor is obtained by comparing the difference between the average hue value of the points on the line segment and the average hue value of the adjacent background area, and normalized so that its value range is [0,1]. Set Q clr =0.7, indicating that the color of the line segment is well distinguishable from its background. Query the direction density distribution set to obtain the main direction density value of the area covered by the line segment (assuming index i=5, j=8) Assume that n=20 candidate line segments are identified in total. Calculate the extension trajectory score S of each candidate line segment q ext_q , apply the formula:
[0076]
[0077] Here S ext_q represents the score of the qth line segment. Calculate the score for line segment q=5:
[0078]
[0079] Formula Detailed description of parameters: S ext_q : The score of the qth extension trajectory. Direction density distribution concentrated line segment q in the region (i, j) where the main direction density value The number of times the qth line segment is continuously distributed in its main direction B lum : The average brightness contrast absolute value of adjacent pixels in the boundary point set (B lum =35.5). Q clr : Quality factor (Q) calculated based on hue difference in HSV color space clr =0.7).
[0080] Calculate the scores of all 20 candidate line segments and get the score list [8500.10, 10576.27, 9200.50, 7800.90, 8800.00, 9500.30, 10100.80, 7500.20, 9900.60, 8200.40, 9100.70, 10300.15, 7900.25, 9600.95, 8700.55, 10050.45, 8100.35, 9350.65, 8950.75, 9750.85]. Select the three trajectories with the highest scores.
[0081] Table 1 Example of candidate trajectory scores (top five)
[0082] Track number Main direction density value Continuous distribution times Extension trajectory scoring 1 4800 10 8500.10 5 5200 12 10576.27 12 5100 12 10300.15 7 5000 12 10100.80 16 4980 12 10050.45
[0083] Table 1 lists the key parameters of the five highest-scoring candidate trajectories and their calculated extended trajectory scores. The three trajectories with the highest scores (numbers 5, 12, and 7) are selected. The geometric features of these three trajectories (coordinate sequence of constituent points, total length, and average orientation angle) are extracted to construct a baseline feature set for subsequent processing. The score of 10576.27 indicates that trajectory 5 performs best in terms of directional consistency, length continuity, and visual saliency, and is therefore selected as one of the baselines.
[0084] See also Figure 3 , the contour point correction module includes:
[0085] The gradient segmentation submodule calls the baseline feature set, extracts the gradient direction feature value of the boundary segment, calculates the gradient direction angle change rate of each point, and generates an index sequence by sorting the absolute value of the change rate from high to low. Based on the index sequence, continuous adjacent points are divided into the same segment to generate gradient ordered boundary segments;
[0086] The contour point correction module begins with the gradient segmentation submodule. This submodule receives the baseline feature set output by the previous module (including the three highest-scoring trajectory point sequences). For each trajectory, the gradient direction angles of all its boundary points are extracted (already calculated in the pixel clustering and direction extraction submodule, for example, the angle of point k is -30.96° and the angle of point k+1 is -35.00°). The absolute value of the difference in the gradient direction angles between adjacent points k and k+1 is calculated, i.e., |θ k+1 -θ k |=|-35.00-(-30.96)|=|-4.04|=4.04°. Calculate this change for all pairs of adjacent points on the trajectory, obtaining a sequence of changes, for example, [8.1°, 2.5°, 15.3°, 5.0°, 1.8°, 12.1°, 3.2°]. Sort these changes from high to low by value: [15.3°, 12.1°, 8.1°, 5.0°, 3.2°, 2.5°, 1.8°], and record the corresponding point index (the change that occurs after that point).
[0087] Set a gradient direction angle change threshold T angle_change = 10°. This threshold is set based on the analysis of normal contour smoothness and typical corner angle changes. Changes above this threshold usually indicate that the contour has a significant turn here. Traversing the trajectory points, when the absolute value of the angle change between consecutive adjacent points is less than T angle_change, they are divided into the same segment. When encountering a point with a change of greater than or equal to 10° (such as a change of 15.3° and 12.1°), the segment is split at this point and a new segment is started. In this way, the original reference trajectory is segmented into several boundary segments with relatively consistent gradient directions, generating a gradient-ordered boundary segment set.
[0088] The offset calculation submodule is based on the gradient ordered boundary segment, traverses the coordinate points in each segment, calculates the Euclidean distance between each point and the mean value of the baseline feature, and superimposes the difference weight between the gradient direction angle of the coordinate point and the reference gradient direction angle, using the formula:
[0089]
[0090] The calculation obtains the comprehensive offset of each point, and compares it with the preset offset threshold point by point, filters out the set of points that exceed the standard, and generates the set of abnormal offset points;
[0091] Among them, Δ q Represents the comprehensive offset of the current point, x q 、y q Represents the current point coordinates, μ x 、μ y represents the mean of the baseline characteristic coordinates, θ q Represents the gradient direction angle of the current point, θ base Represents the reference gradient direction angle, θ max Represents the maximum gradient direction angle in the current segment;
[0092] The offset calculation submodule processes each gradient ordered boundary segment. For a segment, it traverses each coordinate point q in it, and its coordinate is marked as (x q ,y q ). Calculate the arithmetic mean of the coordinates of all m points in the segment to obtain the mean of the baseline feature coordinates of the segment (μ x ,μ y ),in and A segment containing the points [(10.0,20.0),(11.0,21.0),(12.0,22.0)] has a mean of
[0093] Calculate the Euclidean distance between the current point q = (10.0, 20.0) and the baseline mean of the segment (11.0, 21.0):
[0094] Pixel unit.
[0095] Get the gradient direction angle θ of the current point q q=-30.96°, and calculate the average value of the gradient direction angles of all points in the segment as the reference gradient direction angle θ base , set to -33.00°. Determine the maximum absolute value of the gradient direction angle θ of all points in the segment max , set to 40.00°. Calculate the difference weight between the current point gradient direction angle and the reference gradient direction angle:
[0096]
[0097] Apply the formula to calculate the comprehensive offset of the point Δ q :
[0098]
[0099] Formula Detailed description of parameters: Δ q : The comprehensive offset of the current point q. q ,y q : The coordinates of the current point q ((10.0, 20.0)). μ x ,μ y : The mean value of the baseline feature coordinates of the segment to which the current point q belongs ((11.0, 21.0)). θ q : The gradient direction angle of the current point q (-30.96°). base : The reference gradient direction angle of the current segment (-33.00°). max : The maximum absolute value of the gradient direction angle in the current segment (40.00°).
[0100] Substitute the values into the calculation:
[0101]
[0102] Set a preset offset threshold T offset = 0.5 pixel unit. This threshold is set based on the acceptable positioning error range. A deviation below 0.5 is considered to be within the normal fluctuation range, while a deviation above or equal to 0.5 is considered to be a significant deviation. q ≈0.0721 and T offset =0.5. Since 0.0721<0.5, the offset of point q is not significant. If we calculate the comprehensive offset Δ of another adjacent point q′ q′ =0.6, then because 0.6>0.5, point q′ is determined to be an over-standard point, that is, an abnormal offset point. Filter out all segments that meet Δ q ≥T offset The points constitute the abnormal offset point set.
[0103] The interpolation relocation submodule calls the abnormal offset point set, searches for the two nearest non-abnormal points in both directions forward and backward along the boundary segment for each abnormal point, calculates the cosine value of the vector angle between the three points, constructs the interpolation matrix of position coordinates and angle weights, and generates a preliminary correction point set.
[0104] The interpolation relocation submodule processes the abnormal offset point set. For each abnormal point p err (such as point q′), search forward and backward along the gradient ordered boundary segment to which it belongs, and find the two non-abnormal points closest to it (i.e., Δ q <T offset point), denoted as p prev and p next . Calculate the two vectors formed by these three points and The angle α between them is calculated, and the cosine of the angle is calculated. Using p prev 、p next The coordinates of the angle and the cosine value cos(α) (reflecting the local curvature) are calculated by weighted interpolation. err The new position p′ err . Interpolation weights w1, w2 and point to p prev ,p next The distance and cos(α) are related, satisfying w1+w2=1. A simple implementation is linear interpolation p′ err =0.5p prev +0.5p next , but a more sophisticated approach is to adjust the weights according to the curvature, such as p′ err =w(cosα,dist1)p prev +w(cosα,dist2)p next , so that in places with large curvature (cosα is small), the points closer to each other are more likely to be located. This relocation operation is performed on all abnormal points, and the original coordinates are replaced with the calculated new coordinates to generate a preliminary correction point set. The calculated Δ q ≈0.0721 indicates that the position and direction of point q are highly consistent with the overall characteristics of its segment and no adjustment is required; while Δ q′ =0.6 indicates that point q′ deviates significantly, and its coordinates are corrected by interpolation. The final generated preliminary correction point set is the point sequence of the original reference trajectory after the local outlier correction.
[0105] See also Figure 4 , the trajectory vector generation module includes:
[0106] The directional feature analysis submodule obtains a preliminary correction point set, constructs a continuous vector sequence based on the Euclidean distance between adjacent points, calculates the radian value of the angle between adjacent vectors, and extracts the absolute value of the radian change as the directional feature value;
[0107] First, the directional feature analysis submodule processes the preliminary correction point set output by the previous module, which is a series of ordered coordinate points [P1, P2, ..., P N ], where P i =(x i ,y i ,z i ) (Here we consider three-dimensional coordinates). The submodule first constructs a vector sequence connecting adjacent points in Next, calculate each pair of adjacent vectors and The angle φ between i , in radians. The calculation method is Then, calculate the absolute value of the difference Δφ between these angles as the sequence number i changes i =|φ i+1 -φ i |. This value Δφ i Represents the trajectory at point P i+1 The degree of change of local curvature near the edge. Extract the Δφ corresponding to all i i values, forming a directional eigenvalue sequence.
[0108] The parameter normalization submodule calls the directional eigenvalue, collects the needle diameter parameter and the pressure sensor feedback intensity parameter, and uses the formula:
[0109]
[0110] The directional feature weight component and the tool parameter weight component are obtained by calculation, and the two components are superimposed and normalized to generate the trajectory weight factor;
[0111] Among them, Δφ i represents the radian change of the angle between adjacent vectors at the i-th trajectory point, N represents the total number of points in the preliminary correction point set after coordinate correction, F represents the scalar value of the needle axial pressure feedback intensity collected in real time by the pressure sensor, R represents the measured needle cylinder radius value in the needle tool size parameter, λ represents the minimum positive real number interference factor to avoid the denominator being zero, and W i Represents the normalized weight factor of the i-th trajectory point;
[0112] The parameter normalization submodule calls this directional eigenvalue sequence [Δφ1,Δφ2,...,Δφ N-2]. At the same time, two external parameters are collected: the needle diameter parameter and the pressure sensor feedback strength parameter. The needle radius R is measured by a precision measuring tool (such as a micrometer), and its actual measured value is R = 0.15 mm. The pressure sensor monitors the axial pressure F exerted on the needle during operation in real time. At a specific time t, the sensor reading is F = 0.8 N. The total number of points N of the preliminary calibration point set is obtained, where N = 150. A small positive real number interference factor λ = 10 is set. -6 , the purpose of which is to avoid division by zero in the calculation. Apply the formula to calculate the (unnormalized) weight factor W of the i-th trajectory point i :
[0113]
[0114] Before entering the calculation, it is necessary to unify the units of each parameter. The unit of pressure F is Newton (N), the unit of radius R is millimeter (mm), and the unit of angle change Δφ is i is radians (rad, dimensionless), and the number of points N is a dimensionless integer. In order to make the two terms in the formula additive or consistent, unit conversion is required. Usually, the unit of length is unified as meter (m). Set the conversion rule: 1mm = 10 -3 m. Therefore, the needle radius R = 0.15 mm = 0.15 × 10 -3 m=0.00015m. Now, the unit of the numerator F·R in the second term of the formula is N·m (Newton meter, i.e. joule J), and the denominator is It's rad 2 (dimensionless). The first term It is dimensionless. Combining physical quantities (force, size) and geometric quantities (angle change) in a weight formula means that the weight combines factors of different properties. The unit combination here is N·m / rad 2 It represents a certain specific relationship between physical action and geometric change, and its numerical value reflects the comprehensive importance of the point.
[0115] Formula Detailed description of parameters: W i : The (unnormalized) weight factor of the i-th trajectory point. Δφ i : The absolute value of the change in the angle between adjacent vectors at the i-th trajectory point. When i=10, Δφ 10 = 0.05rad. N: Total number of points in the preliminary calibration point set (N = 150). F: Axial pressure collected in real time by the pressure sensor (F = 0.8N). R: Radius of the needle tool, converted to meters (R = 0.00015m). λ: Interference factor to avoid zero denominator (λ = 10 -6 ).
[0116] Substitute the values into the calculation W10 :
[0117]
[0118] Calculate the weight factor W of all points in the sequence i , get the weight sequence
[0119] [0.04512, 0.06134, …, 0.05206, …, 0.03987]. Then, this weight sequence is normalized, for example, using the Min-Max normalization method to normalize all W i Map to the interval [0,1]. Let the minimum value in the sequence be W min , the maximum value is W max , then the normalized weight Assume W min =0.02, W max =0.08.
[0120] Table 2 Example of trajectory point weight factor calculation and normalization
[0121] Point Index Angle change Unnormalized weights Normalized weights 1 0.04 0.04512 0.4187 2 0.08 0.06134 0.6890 10 0.05 0.05206 0.5343 N-2 0.03 0.03987 0.3312
[0122] Table 2 shows the angle change values of some trajectory points (indexed 1, 2, 10, N-2) and the calculated unnormalized weight factor W i , and the normalized weight factor W′ obtained after assuming the minimum and maximum values i For example, the normalized weight of point 10 is Generate the normalized trajectory weight factor sequence W′=[W′1,W′2,...,W′ N-2 ].
[0123] The reference point optimization submodule calls the trajectory weight factor, calculates the coordinate offset of multiple points based on the product of the weight value and the preset correction scale coefficient, and algebraically superimposes the offset vector with the coordinates of the preliminary correction point set point by point to generate the optimized trajectory reference point set.
[0124] The benchmark optimization submodule calls the normalized trajectory weight factor sequence W′. Set a correction coefficient k adjust =0.2. This coefficient is set according to the desired adjustment range in actual application to control the influence of weight on coordinate offset. Calculate each point P i The coordinate offset of the point (except the first and last points). The offset direction is set to the normal direction of the trajectory at that point. (unit vector). The offset vector is calculated as For point P 10, whose coordinates are (50.50, 60.30, 10.10), the calculated normalized weight W′ 10 ≈0.5343, its normal vector The calculation is (0.60, 0.80, 0.00) (assuming the trajectory is near the XY plane). Calculate the offset vector: Concatenate this offset vector with point P 10 The original coordinates are algebraically superimposed to obtain the optimized coordinates P′ 10 =(50.50,60.30,10.10)+(0.0641,0.0855,0.00)=(50.5641,60.3855,10.10); perform this optimization operation on all applicable points in the preliminary correction point set (usually points other than the endpoints) to generate the final optimized trajectory reference point set P′=[P′1,P′2,...,P′ N ]. The calculated W 10 ≈0.05206 (unnormalized) or W′ 10 ≈0.5343 (normalized) quantizes point P 10 The combined influence of geometric characteristics and physical parameters determines the amplitude of its coordinate adjustment The output optimized trajectory reference point set P′ is a trajectory point sequence that has been fine-tuned based on the dynamic weight of each point after preliminary correction.
[0125] See also Figure 5 , the multi-parameter linkage feedback module includes:
[0126] The data acquisition and centroid calculation submodule collects the speed parameters and image grayscale mean parameters from the multi-channel linkage feedback signal, calculates the grayscale mean difference between adjacent frames and extracts the pixel coordinates of the corresponding area, performs weighted centroid positioning operation on the coordinate difference, and generates the centroid offset coordinate value;
[0127] The speed parameters and image grayscale mean parameters in the multi-channel linkage feedback signal are collected to obtain speed sampling data of 10 consecutive time points during the operation of the equipment, as shown in Table 3. The grayscale images at the corresponding time points are synchronously collected, and the grayscale mean of the 20×20 pixel matrix in the central area of the image is extracted. For example, the grayscale mean is 128 at time point t=5 and 135 at time point t=6. The difference between adjacent frames is calculated as 135-128=7. According to the pixel coordinate difference matrix (the difference in the x direction is 3 and the difference in the y direction is -2), the speed parameter v=0.8m / s is used as the weight to perform weighted summation of the coordinate differences:
[0128]
[0129] Generates the center of mass offset coordinate value (2.4, -1.6).
[0130] Table 3 Speed parameters and grayscale mean values
[0131]
[0132] As shown in Table 3, the velocity parameter fluctuation range is 0.5≤v≤1.8m / s, and the grayscale mean range is 120≤G≤145.
[0133] The floating factor sequence generation submodule calls the centroid offset coordinate value, extracts the speed parameter fluctuation interval and divides it into time windows, normalizes the speed standard deviation and range within the window, and constructs a speed floating factor sequence associated with the visual offset;
[0134] Call the center of mass offset coordinate value (2.4, -1.6), divide the velocity parameter into time windows T = 5s (window 1: t = 1-5, window 2: t = 6-10), the velocity data in window 1 is [0.5, 0.7, 0.9, 1.2, 0.8], and calculate the standard deviation:
[0135]
[0136] Range R = 1.2-0.5 = 0.7, normalized processing:
[0137]
[0138] where σ max =0.3 (preset standard deviation threshold), R max =0.8 (extreme difference threshold), substitute:
[0139] Window 1
[0140] Window 2 velocity data [1.5, 1.0, 0.6, 1.8, 1.4], calculate σ = 0.46, R = 1.8-0.6 = 1.2, and get:
[0141]
[0142] Generates a sequence of velocity float factors [1.0, 1.0].
[0143] The trajectory adjustment vector fusion submodule performs time-series matching on the offset vector components based on the center of mass offset coordinate value and the velocity floating factor sequence, adds the floating factor as a weight coefficient to the vector amplitude, and generates a real-time trajectory adjustment vector after fusion.
[0144] Based on the center of mass offset coordinate value (2.4, -1.6) and the velocity floating factor sequence [1.0, 1.0], calculate the window 1 offset vector:
[0145]
[0146] Direction The adjusted amplitude is 2.88×1.0=2.88. For window 2, assuming the centroid offset is (3.1, -2.0), calculate:
[0147]
[0148] The direction angle θ = -32.9°, and the adjusted amplitude is 3.7 × 1.0 = 3.7, generating a real-time trajectory adjustment vector sequence:
[0149] [(2.88,-33.7°),(3.7,-32.9°)].
[0150] See also Figure 6 , the optimal path planning module includes:
[0151] The point overlay submodule extracts the X-axis coordinates, Y-axis coordinates, and elevation data of the optimized trajectory reference point set, calls the horizontal and vertical offset components of the real-time trajectory adjustment vector, and performs algebraic overlay operations on the reference point coordinate components and the adjustment vector components according to the point sequence number to generate an execution point set that integrates the dynamic adjustment parameters.
[0152] The optimal path planning module integrates the reference trajectory and real-time adjustment information and performs energy consumption optimization. First, the point superposition submodule extracts the optimized trajectory reference point set P′=[P′1,P′2,...,P′ N ], the point set contains the X-axis coordinate, Y-axis coordinate and elevation data P′ of each point i =(x′ i ,y′ i ,z′ i ). At the same time, the real-time trajectory adjustment vector generated by the previous module (multi-parameter linkage feedback module) is called This vector has a lateral offset component A x and the longitudinal offset component A y (may also include elevation adjustment component A z ). The coordinate components of the optimized reference point and the corresponding components of the real-time adjustment vector are algebraically superimposed one by one according to the sequence number i of the point. The corrected execution point coordinates are Perform this operation on all points to generate an execution point set P″=[P″1,P″2,...,P″] that incorporates dynamic adjustment parameters. N ].
[0153] The energy consumption screening submodule calculates the Euclidean distance difference between the three-dimensional coordinates of adjacent points based on the execution point set, constructs the point distance matrix containing the path branch topology relationship, traverses the matrix nodes, and uses the formula:
[0154]
[0155] Calculate and obtain the quantitative indicators of multi-path energy consumption, sort them in ascending order according to the indicator values, and generate a candidate path sequence;
[0156] Among them, E represents the quantitative index of path energy consumption, l r represents the Euclidean distance of the rth path, Δz r represents the absolute value of the elevation difference of the rth path, v r represents the average rate of the rth path segment, γ is the rate compensation factor, m represents the total number of path segments, and r is the path segment index;
[0157] The energy consumption screening submodule evaluates the path energy consumption based on the execution point set P″. First, the adjacent execution points P″ are calculated. r and P″ r+1 The three-dimensional Euclidean distance between
[0158] At the same time, record the absolute value of the elevation difference of the rth path |Δz r |=|z″ r+1 -z″ r |. Get or set the average execution rate v of the rth path r . Construct a topological relationship containing all path segments r (from 1 to m = N-1) and related parameters (distance l r , elevation difference |Δz r |, rate v r ) point relationship data structure. Set a rate compensation factor γ, which is a small positive number (e.g. γ = 0.01m / s) to avoid the rate v r When it is zero, the denominator is zero and may reflect the relative energy consumption of low-speed movement. Traverse all possible paths (if there is a branch choice) or calculate the total energy consumption of a single path, and apply the formula to calculate the quantitative index E of path energy consumption: Before calculation, make sure the units are consistent. r and elevation difference |Δz r |Unit is meter (m), speed v r The unit of compensation factor γ is meter per second (m / s). Then the energy consumption of a single section is The unit is This unit combination can be understood as a measure of the product of time and distance required to overcome the elevation change, or a quantity related to impulse (force multiplied by time). The total energy consumption E is the cumulative sum of this indicator for all road sections.
[0159] Formula Detailed description of the parameters: E: Quantitative index of path energy consumption. r: Index of the path segment, from 1 to m. m: Total number of path segments (m=N-1). r : The three-dimensional Euclidean distance of the rth path (m). |Δz r |: Absolute value of elevation difference of the rth path (m). r : Average execution rate of the rth path (m / s). γ: Rate compensation factor (0.01m / s).
[0160] Consider a simple path consisting of 3 points (2 segments): P″1 = (0, 0, 0), P″2 = (3, 4, 1), P″3 = (3, 8, 0.5).
[0161] Segment 1 (r=1):
[0162] |Δz1|=|1-0|=1m;
[0163] Set v1 = 0.5m / s, energy consumption of segment 1:
[0164] Segment 2 (r=2):
[0165] |Δz2|=|0.5-1|=0.5m;
[0166] Set v2 = 0.4 m / s
[0167] Energy consumption in section 2:
[0168] Total energy consumption E = E1 + E2 ≈ 9.998 + 4.916 = 14.914 m·s.
[0169] If there are multiple optional paths to reach the target in the system, calculate the total energy consumption E for each path. Arrange all candidate paths in ascending order according to the calculated E values to generate a candidate path sequence.
[0170] The energy consumption optimal sequence generation submodule calls the set of path nodes with the lowest energy consumption quantitative index in the candidate path sequence, verifies the cosine value of the angle between the azimuth angle of the real-time trajectory adjustment vector and the tangent direction of the path node, and selects the optimal energy consumption path sequence that meets the cosine threshold and has continuous path curvature.
[0171] The energy consumption optimal sequence generation submodule processes the candidate path sequence. It selects one or several paths with the lowest energy consumption quantitative index E in the sequence. For the selected optimal (or near-optimal) energy consumption path, it further verifies its compliance with the real-time adjustment requirements. It calculates the real-time trajectory adjustment vector The azimuth angle (projection direction on the XY plane) of the path is calculated, and the tangent direction of each node (or path segment) on the path is calculated. Verify the cosine value of the angle between the direction of the adjustment vector and the tangent direction of the path. Set a cosine threshold T cos , for example, T cos =0.8, requiring the angle cosine value to be greater than the threshold (indicating that the directions are basically consistent). At the same time, check whether the curvature of the path is continuous to avoid sudden turns that do not conform to physical constraints. Filter out paths that meet the requirements of minimum energy consumption (or sufficiently low) and direction (cosine value greater than T cos ) and a sequence of optimal energy-efficient paths with continuous path curvature are output as the final execution path. The calculated total energy consumption, E = 14.914 m·s, quantifies the energy consumption level of this example path. If this is the lowest energy path among the candidate paths and its path points satisfy the direction and curvature continuity constraints, then the sequence consisting of points P″1, P″2, P″3 is selected as the optimal path.
[0172] The above are merely preferred embodiments of the present invention and do not limit the present invention in any other form. Any technician familiar with the profession may use the technical content disclosed above to change or modify it into an equivalent embodiment with equivalent changes and apply it to other fields. However, any simple modification, equivalent change and modification made to the above embodiment based on the technical essence of the present invention without departing from the content of the technical solution of the present invention shall still fall within the scope of protection of the technical solution of the present invention.
Claims
1. The dispensing trajectory optimization control system based on visual template conversion is characterized by: The system comprises: The visual template parsing module obtains the two-dimensional pixel matrix of the imported graphic data, clusters the pixels to extract directional features, superimposes the brightness and color channel weights to obtain boundary points, counts the number of line segment occurrences, selects the extension trajectory, and establishes a baseline feature set; The contour point correction module calls the baseline feature set, sorts the gradient direction to segment the boundary segments, selects the maximum offset point to calculate the deviation value, interpolates and repositions the tangent points before and after the deformation point, and generates a preliminary correction point set; The trajectory vector generation module connects trajectory points based on the preliminary correction point set, calculates the change in the angle between adjacent point vectors as a directional eigenvalue, collects tool parameters including needle size and pressure feedback strength, combines the directional eigenvalue with the tool parameter normalization operation to obtain a trajectory weight factor, applies the weight factor to generate point correction increments, and superimposes the correction increments with the preliminary correction point set to obtain an optimized trajectory reference point set; The multi-parameter linkage feedback module collects speed and grayscale mean difference, calculates the center of mass coordinate difference to obtain the visual offset vector, establishes a speed floating factor sequence, fuses the visual offset vector and the floating factor weight, and generates a real-time trajectory adjustment vector.
2. The dispensing trajectory optimization control system based on visual template conversion according to claim 1 is characterized in that: The baseline feature set includes line segment length, normal vector, boundary point coordinates, and trajectory frequency; the preliminary correction point set includes deformation offset value, corrected coordinates, and interpolation function coefficients; the optimized trajectory baseline point set specifically includes optimized point coordinates and weighted direction vector; and the real-time trajectory adjustment vector includes visual offset and speed floating factor.
3. The dispensing trajectory optimization control system based on visual template conversion according to claim 2 is characterized in that: The visual template parsing module includes: The pixel clustering and direction extraction submodule detects a two-dimensional pixel matrix, clusters adjacent pixels based on Euclidean distance, calculates the horizontal and vertical gradient amplitudes, constructs a directional gradient histogram, counts the peak frequency of the main direction angle distribution, and generates a directional density distribution set; The boundary weight superposition submodule calls the directional density distribution set, assigns dynamic weights to the gradient amplitude of the brightness channel, combines the color difference difference values of the color channel with weighted fusion, calculates the comprehensive edge response value of the pixel point, and screens the pixel points with response values higher than the background noise according to the adaptive threshold to generate a boundary point set; The reference trajectory screening submodule counts the number of consecutive distributions of line segments in the 8-neighborhood directions based on the boundary point set, using the formula: The extended trajectory scores are obtained by calculation, and the three trajectories with the highest scores are selected to construct the baseline feature set; Among them, S ext Represents the extension trajectory score, which is used to quantify the directional density and distribution continuity of candidate trajectories. Represents the main direction density value of the area in row i and column j in the direction density distribution concentration, represents the frequency of occurrence of the qth line segment in the neighborhood direction, B lum is the average brightness contrast of adjacent pixels in the boundary point set, Q clr is the quality factor calculated based on the hue difference in the HSV color space, and n is the total number of candidate line segments.
4. The dispensing trajectory optimization control system based on visual template conversion according to claim 3 is characterized in that: The contour point correction module includes: The gradient segmentation submodule calls the baseline feature set, extracts the gradient direction feature value of the boundary segment, calculates the gradient direction angle change rate of each point, sorts the absolute value of the change rate from high to low to generate an index sequence, and divides consecutive adjacent points into the same segment according to the index sequence to generate a gradient ordered boundary segment; The offset calculation submodule traverses the coordinate points in each segment based on the gradient ordered boundary segment, calculates the Euclidean distance between each point and the mean value of the baseline feature, and superimposes the difference weight between the gradient direction angle of the coordinate point and the reference gradient direction angle, using the formula: The calculation obtains the comprehensive offset of each point, and compares it with the preset offset threshold point by point, filters out the set of points that exceed the standard, and generates the set of abnormal offset points; Among them, Δ q Represents the comprehensive offset of the current point, x q 、y q Represents the current point coordinates, μ x 、μ y represents the mean of the baseline characteristic coordinates, θ q Represents the gradient direction angle of the current point, θ base Represents the reference gradient direction angle, θ max Represents the maximum gradient direction angle in the current segment; The interpolation relocation submodule calls the abnormal offset point set, searches for the two nearest non-abnormal points in both directions forward and backward along the boundary segment for each abnormal point, calculates the cosine value of the vector angle between the three points, constructs an interpolation matrix of position coordinates and angle weights, and generates a preliminary correction point set.
5. The dispensing trajectory optimization control system based on visual template conversion according to claim 4 is characterized in that: The trajectory vector generation module includes: The directional feature analysis submodule obtains the preliminary correction point set, constructs a continuous vector sequence based on the Euclidean distance between adjacent points, calculates the radian value of the angle between adjacent vectors, and extracts the absolute value of the radian change as the directional feature value; The parameter normalization submodule calls the directional eigenvalue, collects the needle diameter parameter and the pressure sensor feedback intensity parameter, and uses the formula: The directional feature weight component and the tool parameter weight component are obtained by calculation, and the two components are superimposed and normalized to generate the trajectory weight factor; Among them, Δφ i represents the radian change of the angle between adjacent vectors at the i-th trajectory point, N represents the total number of points in the preliminary correction point set after coordinate correction, F represents the scalar value of the needle axial pressure feedback intensity collected in real time by the pressure sensor, R represents the measured needle cylinder radius value in the needle tool size parameter, λ represents the minimum positive real number interference factor to avoid the denominator being zero, and W i Represents the normalized weight factor of the i-th trajectory point; The reference point optimization submodule calls the trajectory weight factor, calculates the coordinate offset of multiple points based on the product of the weight value and the preset correction scale coefficient, and algebraically superimposes the offset vector with the coordinates of the preliminary correction point set point by point to generate an optimized trajectory reference point set.
6. The dispensing trajectory optimization control system based on visual template conversion according to claim 5 is characterized in that: The multi-parameter linkage feedback module includes: The data acquisition and centroid calculation submodule collects the speed parameters and image grayscale mean parameters from the multi-channel linkage feedback signal, calculates the grayscale mean difference between adjacent frames and extracts the pixel coordinates of the corresponding area, performs weighted centroid positioning operation on the coordinate difference, and generates the centroid offset coordinate value; The floating factor sequence generation submodule calls the centroid offset coordinate value, extracts the speed parameter fluctuation interval and divides the time window, normalizes the speed standard deviation and range within the window, and constructs a speed floating factor sequence associated with the visual offset; The trajectory adjustment vector fusion submodule performs time-series matching on the offset vector components based on the center of mass offset coordinate value and the speed floating factor sequence, adds the floating factor as a weight coefficient to the vector amplitude, and generates a real-time trajectory adjustment vector after fusion.
7. The dispensing trajectory optimization control system based on visual template conversion according to claim 6 is characterized in that: The system further comprises: The optimal path planning module calls the optimized trajectory reference point set and superimposes the real-time trajectory adjustment vector to obtain the execution point position, calculates the distance between points to generate a distance matrix, selects the minimum cumulative distance point to plan the path, calculates the energy consumption coefficient to sort the path, and screens to obtain the optimal energy consumption path sequence; The optimal energy consumption path sequence specifically refers to the execution point coordinates, point access sequence, road section energy consumption coefficient, and overall energy consumption evaluation value.
8. The dispensing trajectory optimization control system based on visual template conversion according to claim 7 is characterized in that: The optimal path planning module includes: The point superposition submodule extracts the X-axis coordinates, Y-axis coordinates and elevation data of the optimized trajectory reference point set, calls the horizontal offset component and the vertical offset component of the real-time trajectory adjustment vector, performs algebraic superposition operation on the reference point coordinate components and the adjustment vector components according to the point sequence number, and generates an execution point set that integrates the dynamic adjustment parameters; The energy consumption screening submodule calculates the Euclidean distance difference between the three-dimensional coordinates of adjacent points based on the execution point set, constructs an inter-point distance matrix containing the path branch topology relationship, traverses the matrix nodes, and uses the formula: Calculate and obtain the quantitative indicators of multi-path energy consumption, sort them in ascending order according to the indicator values, and generate a candidate path sequence; Among them, E represents the quantitative index of path energy consumption, l r represents the Euclidean distance of the rth path, Δz r represents the absolute value of the elevation difference of the rth path, v r represents the average rate of the rth path segment, γ is the rate compensation factor, m represents the total number of path segments, and r is the path segment index; The energy consumption optimal sequence generation submodule calls the path node set with the lowest energy consumption quantitative index in the candidate path sequence, verifies the cosine value of the angle between the azimuth angle of the real-time trajectory adjustment vector and the tangent direction of the path node, and selects the optimal energy consumption path sequence that meets the cosine threshold and has continuous path curvature.
Citation Information
Cited By
Automatic setting control method and system based on real-time image acquisition
CN121209283A
Self-adaptive image segmentation method and system based on visual template engine
CN121392289A
Radian matching method and system for automatic labeling
CN122156239A
A method and system for automatic labeling with arc matching
CN122156239B
Dispensing path planning method and system for random bulk materials
CN122239581A
