Pigtail wishbone cutting path automatic adjusting method

Through three-dimensional model extraction and real-time data registration, the cutting path of pig tail fork bones is automatically adjusted, which solves the problem of difficulty in adjusting cutting paths in the existing technology and improves the efficiency and accuracy of the bone removal process.

CN119741435AActive Publication Date: 2025-04-01HENAN INST OF SCI & TECH

Patent Information

Application Number
CN202510259109.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-06
Publication Date
2025-04-01
Estimated Expiration
2045-03-06

AI Technical Summary

Technical Problem

During the removal of pig tail fork bones, due to the complex intertwining of bones and muscles, it is difficult for the existing technology to achieve autonomous adjustment of the cutting path, resulting in low cutting efficiency and accuracy.

Method used

By obtaining the three-dimensional segmentation surface model and bone model of pig tail fork bones, the cutting path is extracted layer by layer, and combining real-time point cloud data and optimization algorithms, the cutting path is adjusted to avoid bone obstacles and generate the final smooth cutting path.

Benefits of technology

Accurate positioning and real-time path adjustment of the pig tail fork bone cutting area is achieved, which significantly improves the efficiency and accuracy of the automated bone removal process and reduces the risks of meat waste and product quality reduction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119741435A_ABST
    Figure CN119741435A_ABST
Patent Text Reader

Abstract

The invention provides an automatic adjustment method for a pigtail wishbone cutting path. The method comprises the following steps that a three-dimensional segmentation curved surface model and a three-dimensional skeleton model of a pigtail wishbone are obtained; performing layer-by-layer extraction on the three-dimensional segmentation curved surface model to generate a corresponding rough cutting path; registering the three-dimensional skeleton model with the real-time point cloud data to obtain integral three-dimensional information of the pigtail wishbone structure, and then obtaining registered skeleton model points; obtaining obstacles encountered by the rough cutting path according to the relative relation between the skeleton model points and the rough cutting path; avoiding an obstacle through path offset, and forming an offset path; smoothing the offset path to obtain a smooth offset path; fusing and smoothing all the smooth offset paths to obtain a complete offset path; and the complete offset path and the rough cutting path are fused to obtain a final cutting path, so that the efficiency and precision of the automatic deboning process are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of meat processing automation, and in particular to a method for autonomously adjusting a cutting path of a pigtail wishbone. Background Art

[0002] As consumers' specific demands for pork quality and different parts continue to increase, refined segmentation has gradually become a key solution to meet market demand. Domestic consumers' unique preferences for various parts of pork and diversified cooking needs have further promoted the importance of refined segmentation. Among them, the removal of the pig's tail forkbone is a key step in refined segmentation. Due to the complex structure of the pig's tail forkbone, the bones and muscles are closely intertwined, and the position of the bones is invisible during the cutting process, making it extremely difficult to remove the pig's tail forkbone. At present, domestic slaughterhouses mainly rely on manual cutting to remove the tail forkbone. However, even experienced workers often cannot accurately locate the cutting position, resulting in meat waste and reduced product quality. In order to overcome the limitations of manual deboning, automated deboning technology has gradually been introduced into the slaughtering process. The main challenge of automated deboning in practical applications lies in the autonomous adjustment of the cutting path. First, the deboning segmentation surface obtained based on 3D scanning technology is usually a curved surface, which requires the robot to generate and adjust the cutting path in real time during the cutting process. However, since the cutting path may encounter bone obstructions, especially in areas where bones and muscles are complexly intertwined, this will make it difficult for the cutting tool to pass smoothly, thereby affecting the cutting efficiency and accuracy. Summary of the invention

[0003] In view of the problems in the prior art, the present invention provides a method for autonomously adjusting the cutting path of a pigtail wishbone, which aims to achieve precise positioning of the cutting area and real-time path adjustment, thereby providing a basis for the subsequent precise removal of the pigtail wishbone.

[0004] A method for autonomously adjusting a cutting path of a pigtail wishbone comprises the following steps: Step 1: Obtain a 3D segmented surface model and a 3D bone model of the pigtail furcula; Step 2: Extract the three-dimensional segmentation surface model layer by layer to generate a corresponding rough cutting path; Step 3: align the 3D bone model with the real-time point cloud data to obtain the overall 3D information of the pigtail furcula structure, and then obtain the aligned bone model points; Step 4: Obstacles encountered by the rough cutting path are obtained according to the relative relationship between the skeleton model points and the rough cutting path; Step 5: Avoid obstacles by path deviation and form a deviation path; Step 6: The offset path is smoothed to obtain a smooth offset path; Step 7: All smooth offset paths are merged and smoothed to obtain a complete offset path; Step 8: Merge the complete offset path and the rough cutting path to obtain the final cutting path.

[0005] Further: Step 2 includes the following steps: Step 2.1: Obtain the three-dimensional mesh model of the pigtail wishbone through the three-dimensional segmentation surface model and record it as , 3D mesh model Include mesh patches, and the node coordinates of each mesh patch are ,in ; 3D mesh model It is expressed as: Then calculate the normal vector of the mesh patch and determine the cutting layer. For each mesh patch , calculate its normal vector , obtained through the vector product formula: in, and They are two vectors on the mesh surface; according to the normal vector , set the cutting layer interval ,exist The depth of the cutting layer is set in the direction of the axis or perpendicular to the normal vector. The depth of the layer cutting is , then the depth of the cutting layer The formula is: in, is the depth of the initial cutting layer, is the level index, and ,in, is the maximum number of cutting layers; For each layer , the cutting layer intersects with the three-dimensional surface, and the boundary line of the intersection is the cutting path of the layer; set the cutting layer to: in, is the normal vector component of the cutting plane, is the depth of the cutting layer; through the three-dimensional mesh model Perform Boolean operations to extract the boundary path of the intersection, i.e. the cutting path ; in, For each node on the intersection path; Step 2.2: After connecting the cutting paths extracted layer by layer, smooth them through the B-spline curve; First extract the cutting path layer by layer Connect them sequentially to form a series of continuous cutting paths; then use spline curves to smooth the continuous cutting paths, and use the B-spline curve fitting method to smooth the continuous cutting paths: in, for Spline basis functions, is the waypoint, is the path parameter; Step 2.3: Optimize the smoothed cutting path through genetic algorithm and adjust the path node normal vector smoothness and node spacing; Assume that each cutting path All need to be optimized, and the optimization objectives are: in, and Path nodes and The normal vector of is the adjustment coefficient used to balance the optimization of normal vector smoothness and path node spacing. For path The number of nodes on ; Get the optimized cutting path , connect and optimize the cutting paths of all cutting layers, and finally generate a rough cutting path , which is expressed as: in, For the The cutting path of the layer is smoothed by B-spline curve and optimized by genetic algorithm.

[0006] Further: In step 4, first, calculate each cutting path point in the rough cutting path Corresponding points in the skeleton model The Euclidean distance : Among them, the cutting path point Points with bone model The corresponding relationship is determined by the spatial mapping relationship between the cutting path and the bone model; Secondly, obstacle detection is performed, the formula is: Judgment conditions: If the distance , then determine the cutting path point There is a bone obstruction at the location, where is the preset distance threshold; In step 5, first, the lateral offset direction and offset distance as well as the coordinates of the offset path points are calculated; the lateral offset direction of the cutting path point is determined by its normal vector Determine; Normal vector The tangent vector through the path The calculation results are: in, For the cutting path at the cutting path point The tangent vector at is the normal vector direction of the skeleton model, Represents the cross product operation; The horizontal offset distance of the cutting path point Depending on the size of the obstacle and the width of the tool The calculation formula is as follows: in, is the experience adjustment coefficient; Then, an offset path is generated for all original cutting path points on the cutting path that need to avoid obstacles. , perform offset processing one by one to generate an offset path , which is expressed as: In step 6, the fitting formula of the Bezier curve is: in, Represents path points and includes key points for offset paths, represents the Bessel basis function, represents the smoothed path; Combine the offset path and the smoothed path to generate the final smooth offset path , which is expressed as: in, Represents a smoothing function, which is used to perform Bezier fitting and smooth optimization on the offset path.

[0007] Further, in step 4, the curvature of the rough cutting path at the turning point is compared with the curvature of the corresponding position of the skeleton model, and when the comparison value is greater than a set threshold, it is determined that there is an obstacle at the turning point of the rough cutting path; Curvature Used to describe the curvature of the rough cutting path. The calculation formula is: in, and is the first-order derivative of the path on the plane, and is the second-order derivative of the path; by calculating the local curvature of the rough cutting path and comparing it with the curvature of the corresponding position in the bone model, if the change in curvature exceeds the set threshold , it is considered that there is an obstacle at the turn; In step 5, first, the rough cutting path is represented as a parameter curve : in, is the path parameter, For the path in the parameter Where coordinate; For the path in the parameter Where coordinate; At any point on the rough cutting path , calculate the unit normal vector : in, and The rough cutting paths are Pointed and The derivative of the coordinates represents the tangent vector of the rough cutting path, the normal vector is the perpendicular direction of the tangent vector; For the rough cutting path, in the parameters The unit normal vector at , indicating the offset direction; After obtaining the unit normal vector, according to the size of the tool and safe distance , calculate the total offset distance : Offset Direction Set along the normal vector direction, and select the positive or negative direction of the normal vector according to the position of the obstacle: Then, offset the path The formula is: in, is the new path after the offset, and are the unit normal vectors exist and Directional component; Limit the minimum distance between the offset path and obstacles: ; in, Offset path point Distance to obstacles; For safe distance; In step 6, the offset path Calculating curvature : in, Offset Path In the parameters The curvature at , which indicates the curvature of the path; and The offset paths are Pointed and The derivative of the coordinates, representing the tangent vector of the offset path; are the second-order derivatives of the offset path, representing the curvature of the offset path; Ensure curvature Satisfy the optimization goal, that is, the curvature changes smoothly: in, is the rate of change of curvature, and the optimization goal is to make the curvature change smoothly; indicates that the integration is performed along the offset path; Calculate the corrected turning angle : in, and are the vertical and horizontal displacements between the start and end points of the turn, respectively; Ensure that the corrected turning angle is close to the ideal turning angle : Here, the ideal turning angle Determined according to the maximum allowable rotation angle of the tool; Finally, the curvature optimization and turning angle correction are combined to generate the final smooth offset path. : in, and For the final path in the parameter Where and coordinate; Indicates the original path Coordinate plus along The offset of the direction, Indicates the original path Coordinate plus along Direction offset; and It is the further adjustment of the original offset path after smoothing and curvature optimization.

[0008] Further, in step 4, for the obstruction between the coccyx and the sacrum, a fine bone model is first obtained based on the three-dimensional bone model, the fine bone model is aligned with the real-time point cloud data, and then the point cloud segmentation algorithm is used to separate the bone area from the gap area. When the newly added point cloud data is detected in the gap area, , and these points belong to the bone area, it is judged that there is an obstacle at this position; the mathematical expression is as follows: Set the gap area to , that is, the gap part in the bone model: in, Represents the points in the skeleton model, belonging to the gap area ; Use the RANSAC algorithm to segment the real-time point cloud data and distinguish the gap area from the bone area; if new point cloud data is detected in the gap area , and these points belong to the bone area, then it is determined that there is a bone obstacle at this location: in, It is the newly added point cloud data, belonging to the bone area , and does not belong to the void area , if the condition is met, the position is judged to be a bone obstacle; In step 5, the rough cutting path is first expressed as a parameter curve: in, is the path parameter, For the path in the parameter Where coordinate; For the path in the parameter Where coordinate; The optimization goal is: in, is a point on the rough cutting path, is the ideal center position of the point, and the goal is to keep the point on the rough cutting path in the center of the bone joint; The fast gradient descent method is used to iteratively update the position of the points on the rough cutting path. The specific update formula is: in, is the learning rate, is the number of iterations; Then, set up "safety belt" areas on both sides of the rough cutting path, with the width of the safety belt Through tool width and possible errors To calculate: in, Represents the function for calculating the width of the seat belt: in, is a constant coefficient used to adjust the sensitivity of the seat belt width; Control signal to adjust path deviation for: in, is the path deviation, i.e., the error between the current path position and the ideal center path; , ,and are the proportional, integral and differential coefficients respectively; Finally, the final path is generated, combining the center channel optimization with the dynamic adjustment of the seat belt to generate the final smooth cutting path The specific formula is as follows: in, and is the path offset obtained by center channel optimization; and It is a further adjustment obtained through dynamic adjustment of the seat belt.

[0009] Further: In step 7, the specific process is as follows: First, select control points. At the endpoints of every two adjacent paths, select control points to define the Bezier curve. The control points include the endpoints of the path segments and a certain offset in the normal direction to control the shape and direction of the curve. The Bezier curve is generated using control points, and its parametric equation is: in, is the control point, is a path parameter, ; Next, the generated Bezier curve is concatenated with the adjacent offset path, and the curvature of the transition section is checked by calculating the curvature change. The curvature change formula is: in, is the tangent vector of the path, is a parameterized representation of the path; Then, the control points are optimized by the gradient descent method to minimize the change in the curvature of the path, and the objective function is defined as: in, For the The curvature of the segment, is the average curvature of all segments; Define the fitness function to minimize the total path length and curvature fluctuation: in, is the total path length, and is the weight coefficient, which is used to balance the length and curvature smoothness of the path; Full offset path for: in, Represents the path fusion function, which uses Bezier curves to cut the path in the final Create smooth transitions between them.

[0010] Further: In step 8, the rough cutting path obtained in step 2 is fitted repeatedly by weighted least squares. and the complete offset path obtained in step 7 to integrate; First, the weighted least squares method is used to calculate the rough cutting path. and the full offset path Perform preliminary fusion to obtain the initial fitting path. The specific steps and formulas are as follows: in, is the weight of the sampling point, and Rough cutting path In the parameters Where and coordinate, and Full offset path In the parameters Where and coordinate; and The path parameters of the fitting curve are Next and Estimated value; is a parameterized variable; Optimize the fitting function and , to minimize the weighted error function ; By adjusting and , find Minimum fitting curve; After each path fit, the error between the fitted path and the true path is evaluated; the error is calculated as follows: in, Indicates The error of each sampling point; According to the error Adjust the weight of sampling points : in, is the adjusted weight, is the adjustment coefficient, which is used to control the magnitude of weight growth. is the maximum error value among all current points, used for normalizing the error; Next, use the adjusted weights Re-perform the weighted least squares fitting to minimize the new weighted error function ; Repeat error evaluation and weight adjustment until the iteration stop condition is met; the specific steps and formulas are as follows: Iterate and repeat the following steps until the error decreases by less than the set threshold or one of the maximum number of iterations is reached: 1. Use current weights Perform weighted least squares fitting and update and ; 2. Calculate the error of each sampling point ; 3. Adjust weights based on error ; 4. Recalculate the weighted error function ; Finally, after multiple iterations of optimization, the fitting path gradually converges, and finally a fitting result with an error that meets the requirements and a smooth path is obtained, that is, the final cutting path. ; The specific formula is as follows: and The final fitting curve is obtained by iterative optimization of weighted least squares method. and coordinate.

[0011] The beneficial effects of the present invention are as follows: segmentation surface data is collected by high-precision three-dimensional scanning equipment, and a precise cutting path is generated using mathematical solution algorithms and optimization algorithms; on this basis, the ICP algorithm is used to align the real-time sensor data with the three-dimensional bone model to identify bone obstacles on the cutting path; the cutting path is finely adjusted locally by combining path micro-offset, curvature optimization and angle correction technologies to ensure that the tool can avoid obstacles and maintain stable operation on the cutting path; finally, the rough cutting path is merged with the locally adjusted cutting path through the weighted least squares method, and global optimization is performed using a genetic algorithm to generate the final cutting path, which significantly improves the efficiency and accuracy of the automated bone removal process. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 A flowchart of the invention; Figure 2 is a schematic diagram of a rough cutting path in the present invention; Figure 3 Schematic diagram of bone obstruction of a straight path; Figure 4 This is a schematic diagram of bone obstruction at a bend; Figure 5 Schematic diagram of the obstruction between the sacrum and coccyx. DETAILED DESCRIPTION

[0013] The present invention is described in detail below in conjunction with the accompanying drawings. The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be interpreted as limiting the present invention. The directional terms such as left, middle, right, top, and bottom in the embodiments of the present invention are only relative concepts or are based on the normal use state of the product, and should not be considered as restrictive.

[0014] A method for autonomously adjusting the cutting path of a pigtail wishbone, such as Figure 1 , including the following steps: Step 1: Obtain a 3D segmented surface model and a 3D bone model of the pigtail furcula; Step 2: Extract the three-dimensional segmentation surface model layer by layer to generate a corresponding rough cutting path; Step 2.1: Obtain the three-dimensional mesh model of the pigtail wishbone through the three-dimensional segmentation surface model and record it as , 3D mesh model Include mesh patches, and the node coordinates of each mesh patch are ,in ; 3D mesh model It is expressed as: Then calculate the normal vector of the mesh patch and determine the cutting layer. For each mesh patch , calculate its normal vector , obtained through the vector product formula: in, and They are two vectors on the mesh face. The normal vector of each mesh face is used to determine the direction of the cutting layer. , set the cutting layer interval (e.g. 0.5 cm), The depth of the cutting layer is set in the direction of the axis or perpendicular to the normal vector. The depth of the layer cutting is , then the depth of the cutting layer The formula is: in, is the depth of the initial cutting layer, is the level index, and ,in, is the maximum number of cutting layers; For each layer , the cutting layer intersects with the three-dimensional surface, and the boundary line of the intersection is the cutting path of the layer; to extract the cutting path, it is necessary to solve the intersection of the cutting plane and the three-dimensional segmentation surface; set the cutting layer to: in, is the normal vector component of the cutting plane, is the depth of the cutting layer; through the three-dimensional mesh model Perform Boolean operations to extract the boundary path of the intersection, i.e. the cutting path ; in, For each node on the intersection path; Step 2.2: After connecting the cutting paths extracted layer by layer, smooth them through the B-spline curve to ensure the continuity and smoothness of the path; First extract the cutting path layer by layer Connect them sequentially to form a series of continuous cutting paths; then use the spline curve (B-spline) to smooth the continuous cutting paths to avoid discontinuity or unevenness of the continuous cutting paths. Suppose that a layer path is ,) Smooth the continuous cutting path by B-spline curve fitting method: in, for Spline basis functions, is the waypoint, is the path parameter; Step 2.3: Optimize the smoothed cutting path through genetic algorithm, adjust the path node normal vector smoothness and node spacing to improve the path accuracy and ensure that the cutting path meets the actual operation requirements; To ensure the accuracy of each cutting path, a genetic algorithm (GA) is used to further adjust the cutting interval and path accuracy; assuming that each cutting path All need to be optimized, and the optimization objectives are: in, and Path nodes and The normal vector of is the adjustment coefficient used to balance the optimization of normal vector smoothness and path node spacing. For path The number of nodes on ; Get the optimized cutting path , the cutting paths of all cutting layers are connected and optimized, such as Figure 2 As shown, the rough cutting path is finally generated , which is expressed as: in, For the The cutting path of the layer is smoothed by B-spline curve and optimized by genetic algorithm; It represents the final generated cutting path, ensuring that the tool can perform the work of removing the tail wishbone step by step along the path; Step 3: align the 3D bone model with the real-time point cloud data to obtain the overall 3D information of the pigtail furcula structure, and then obtain the aligned bone model points; Step 4: Obstacles encountered by the rough cutting path are obtained according to the relative relationship between the skeleton model points and the rough cutting path; Step 5: Avoid obstacles by path deviation and form a deviation path; Step 6: The offset path is smoothed to obtain a smooth offset path; Step 7: All smooth offset paths are merged and smoothed to obtain a complete offset path; The final cutting path Perform fusion splicing to generate the final cutting path ; The specific steps and formulas are as follows: In order to ensure the continuity between different types of cutting paths, Bezier curves are used to generate smooth transition segments between paths to avoid sharp changes in direction during path conversion; the specific process is as follows: First, select control points. At the endpoints of every two adjacent paths, select control points to define the Bezier curve. The control points include the endpoints of the path segments and a certain offset in the normal direction to control the shape and direction of the curve. The Bezier curve is generated using control points, and its parametric equation is: in, is the control point, is a path parameter, ; Next, the generated Bezier curve is spliced ​​with the adjacent offset path, and the curvature of the transition section is checked by calculating the curvature change to ensure that the curvature does not change suddenly. The curvature change formula is: in, is the tangent vector of the path, It is a parameterized representation of the path, that is, each point on the path can be represented by parameters To describe, the path here can be any type of path, which may be a Bezier curve, a straight line, an arc, etc.; the transition segment refers to the joint of two paths; when joining paths, especially when connecting adjacent path segments through Bezier curves, the curvature change must be checked to ensure a smooth transition; Then, the control points are optimized by the gradient descent method to minimize the change in the curvature of the path, and the objective function is defined as: in, For the The curvature of the segment, is the average curvature of all segments; After optimizing the control points, recalculate the curvature of the path to verify whether the curvature change is within a reasonable range, ensure smooth path transition, and avoid sharp curvature changes; Finally, the global optimization algorithm (genetic algorithm) is used to optimize the overall path to obtain a better cutting path; the specific steps are as follows: The cutting path is represented as a sequence of control points, and the position of each control point is represented by a code; in the genetic algorithm, each individual represents a combination of control points; Define the fitness function to minimize the total path length and curvature fluctuation: in, is the total path length, and is the weight coefficient, which is used to balance the length and curvature smoothness of the path; Generate new path control point combinations through selection, crossover and mutation operations, so that individuals with higher fitness are selected for the next generation with a greater probability, until the fitness converges to the optimal solution. After several generations of optimization, the path with the highest fitness and the best path length and curvature smoothness is selected as the final optimized path. Full offset path for: in, Represents the path fusion function, which uses Bezier curves to cut the path in the final Generate smooth transitions between them to ensure the continuity of the cutting path and the realization of optimization goals; Step 8: Merge the complete offset path and the rough cutting path to obtain the final cutting path; specifically: The rough cutting path obtained in step 2 is fitted repeatedly by weighted least squares. and the complete offset path obtained in step 7 to integrate; First, the weighted least squares method is used to calculate the rough cutting path. and full offset path Perform preliminary fusion to obtain the initial fitting path. The specific steps and formulas are as follows: in, is the weight of the sampling point, and Rough cutting path In the parameters Where and coordinate, and Full offset path In the parameters Where and coordinate; and The path parameters of the fitting curve are Next and Estimated value; is a parameterized variable, such as the arc length of a path or time , ensuring that all dimensions are fitted using the same parameters; Optimize the fitting function and , to minimize the weighted error function ; By adjusting and , find Minimum fitting curve; After each path fit, the error between the fitted path and the true path is evaluated; the error is calculated as follows: in, Indicates The error of each sampling point; According to the error Adjust the weight of sampling points ; For sampling points with large errors, increase their weights: in, is the adjusted weight, is the adjustment coefficient, which is used to control the magnitude of weight growth. is the maximum error value among all current points, used for normalizing the error; Next, use the adjusted weights Re-perform the weighted least squares fitting to minimize the new weighted error function ; Repeat error evaluation and weight adjustment until the iteration stop condition is met; the specific steps and formulas are as follows: Iterate and repeat the following steps until the error decreases by less than the set threshold or one of the maximum number of iterations is reached: 1. Use current weights Perform weighted least squares fitting and update and ; 2. Calculate the error of each sampling point ; 3. Adjust weights based on error ; 4. Recalculate the weighted error function ; Finally, after multiple iterations of optimization, the fitting path gradually converges, and finally a fitting result with an error that meets the requirements and a smooth path is obtained, that is, the final cutting path. ; The specific formula is as follows: and The final fitting curve is obtained by iterative optimization of weighted least squares method. and coordinate.

[0015] Among them, Figure 3 Shown is the final cutting path in step 7 Obtained by the following steps: In step 4, first, calculate each cutting path point in the rough cutting path A Corresponding points in the skeleton model The Euclidean distance : Among them, the cutting path point Points with bone model The corresponding relationship is determined by the spatial mapping relationship between the cutting path and the bone model; Secondly, obstacle detection is performed, the formula is: Judgment conditions: If the distance , then determine the cutting path point There is a bone obstruction at the location, where is the preset distance threshold used to determine the presence of obstacles. The specific value of is set according to the accuracy and fault tolerance of the tool; the path points that meet this condition are recorded as the target points that need to avoid obstacles, forming the target path area; In step 5, first, the lateral offset direction and offset distance as well as the coordinates of the offset path points are calculated; the lateral offset direction of the cutting path point is determined by its normal vector Determine; Normal vector A tangent vector that can pass through the path The calculation results are: in, For the cutting path at the cutting path point The tangent vector at is the normal vector direction of the skeleton model, Represents the cross product operation; The horizontal offset distance of the cutting path point Depending on the size of the obstacle and the width of the tool The calculation formula is as follows: in, Indicates the size of the obstacle, which can be the diameter or characteristic size of the obstacle. Indicates the width of the tool, It is the empirical adjustment coefficient, which controls the size of the offset; Coordinate calculation of offset path points, applying the offset direction and distance to the original cutting path points , calculate the offset path point , the formula is as follows: in, is the coordinate of the path point after offset, is the original cutting path point coordinate, is the lateral offset distance, is the normal vector of the cutting path point; Then, an offset path is generated for all original cutting path points on the cutting path that need to avoid obstacles. , perform offset processing one by one to generate an offset path , which is expressed as: In step 6, since path offset will introduce local discontinuity, the fitting formula of the Bezier curve is: in, Represents path points and includes key points for offset paths, represents the Bessel basis function, represents the smoothed path; Combine the offset path and the smoothed path to generate the final smooth offset path , which is expressed as: in, Represents a smoothing function, which is used to perform Bezier fitting and smooth optimization on the offset path.

[0016] like Figure 4 Shown is the final cutting path in step 7 Obtained by the following steps: During the curvature optimization and angle correction process, obstacles such as bones are avoided by path offset; the specific steps and their corresponding formulas and calculation methods are as follows: In step 4, the curvature of the turning point of the rough cutting path A is compared with the curvature of the corresponding position of the bone model. When the comparison value is greater than the set threshold, it is determined that there is an obstacle at the turning point of the rough cutting path; Obstacles at bends usually appear as sudden changes in path curvature, so it is necessary to calculate the curvature change of the rough cutting path; Used to describe the curvature of the rough cutting path. The calculation formula is: in, and is the first-order derivative of the path on the plane, and is the second-order derivative of the path; by calculating the local curvature of the rough cutting path and comparing it with the curvature of the corresponding position in the bone model, if the change in curvature exceeds the set threshold , it is considered that there is an obstacle at the bend; this method combines the registered point cloud data and the geometric features of the model, and can effectively determine the bone obstruction at the bend; In step 5, the path offset calculation is performed. According to the position of the obstacle and the size of the tool, the distance and direction required for offset are calculated. The steps and formula are as follows: First, the rough cutting path is represented as a parametric curve : in, is the path parameter, For the path in the parameter Where coordinate; For the path in the parameter Where coordinate; At any point on the rough cutting path , calculate the unit normal vector : in, and The rough cutting paths are Pointed and The derivative of the coordinates represents the tangent vector of the rough cutting path, the normal vector is the perpendicular direction of the tangent vector; For the rough cutting path, in the parameters The unit normal vector at , indicating the offset direction; After obtaining the unit normal vector, according to the size of the tool and safe distance , calculate the total offset distance : Offset Direction Set along the normal vector direction, and select the positive or negative direction of the normal vector according to the position of the obstacle: Then, based on the original path, the calculated offset is applied to generate a new offset path to ensure a safe distance from obstacles. The steps and formula are as follows: Offset Path The formula is: in, is the new path after the offset, and are the unit normal vectors exist and Directional component; Limit the minimum distance between the offset path and obstacles: ; in, Offset path point The distance to obstacles; For safe distance; In step 6, finally, the offset path is smoothed and optimized to ensure that its curvature and turning angle meet the optimization target and ensure the stability of tool movement and cutting accuracy; the steps and formulas are as follows: Offset Path Calculating curvature : in, Offset Path In the parameters The curvature at , which indicates the curvature of the path; and The offset paths are Pointed and The derivative of the coordinates, representing the tangent vector of the offset path; are the second-order derivatives of the offset path, representing the curvature of the offset path; Curvature Limiting by smoothness: in, is the rate of change of curvature, and the optimization goal is to make the curvature change smoothly to avoid sharp turns of the tool during movement; indicates that the integration is performed along the offset path; Calculate the corrected turning angle : in, and are the vertical and horizontal displacements between the start and end points of the turn, respectively; Ensure that the corrected turning angle is close to the ideal turning angle : Here, the ideal turning angle Determined according to the maximum allowable rotation angle of the tool; Finally, the curvature optimization and turning angle correction are combined to generate the final smooth offset path. : in, and For the final path in the parameter Where and coordinate; Indicates the original path Coordinate plus along The offset of the direction, Indicates the original path Coordinate plus along Direction offset; and It is a further adjustment of the original offset path after smoothing and curvature optimization to ensure the final smoothness and curvature requirements of the path.

[0017] like Figure 5 Shown is the final cutting path in step 7 Obtained by the following steps: The cutting path between the sacrum and the coccyx needs to be highly precise so that the tool can smoothly pass through the bone gap without collision when cutting along the cutting path; when implementing this process, the center channel optimization and seat belt dynamic adjustment method are adopted, and the process is as follows: In step 4, obstacle detection is performed, and the gap and bone areas are segmented by using the registered point cloud data and the RANSAC algorithm. If new point cloud data belonging to the bone area is detected in the gap area, it is determined that there is a bone obstruction at this location; For the obstruction between the coccyx and the sacrum, a fine bone model is first obtained based on the 3D bone model. The fine bone model is registered with the real-time point cloud data, and then a point cloud segmentation algorithm (such as RANSAC) is used to separate the bone area from the gap area. When new point cloud data is detected in the gap area, , and these points belong to the bone area, it is judged that there is an obstacle at this position; the mathematical expression is as follows: Set the gap area to , that is, the gap part in the bone model: in, Represents the points in the skeleton model, belonging to the gap area ; Use the RANSAC algorithm to segment the real-time point cloud data and distinguish the gap area from the bone area; if new point cloud data is detected in the gap area , and these points belong to the bone region (i.e. Overlapping with the bone area), it is determined that there is a bone obstruction at this location: in, It is the newly added point cloud data, belonging to the bone area , and does not belong to the void area , if the condition is met, the position is judged to be a bone obstacle; In step 5, the rough cutting path A is restricted to the "central channel" between the coccyx and the tailbone through central channel optimization to avoid the bones on both sides; the centralized path optimization uses the fast gradient descent method to ensure that the path remains in the center of the suture; the specific steps and formulas are as follows: First, the rough cutting path is expressed as a parametric curve: in, is the path parameter, For the path in the parameter Where coordinate; For the path in the parameter Where coordinate; The optimization goal is: in, is a point on the rough cutting path, is the ideal center position of the point, and the goal is to keep the point on the rough cutting path in the center of the bone joint; The fast gradient descent method is used to iteratively update the position of the points on the rough cutting path so that it gradually approaches the ideal center position. The specific update formula is: in, is the learning rate, is the number of iterations; Then, the safety belt is dynamically adjusted to correct the path deviation in real time to ensure that the path during the cutting process is always kept within a safe distance to avoid collision; the specific steps and formulas are as follows: A safety belt area is set on both sides of the rough cutting path, that is, the bone boundaries on both sides of the rough cutting path are retracted inward by a certain distance to ensure that the rough cutting path does not touch the bone; the width of the safety belt Through tool width and possible errors To calculate: in, Represents the function for calculating the width of the seat belt. The specific form is determined according to actual needs, for example: in, is a constant coefficient used to adjust the sensitivity of the seat belt width; Detect the path boundary in real time. Once the path deviates from the center channel and may hit the bone, use PID control or other feedback control methods to perform local deviation to ensure that the path is always maintained within a safe distance; adjust the control signal of the path deviation for: in, is the path deviation, i.e., the error between the current path position and the ideal center path; , ,and They are proportional, integral and differential coefficients, and these parameters are adjusted to optimize the control response speed and stability; Finally, the final path is generated, combining the center channel optimization with the dynamic adjustment of the seat belt to generate the final smooth cutting path , to ensure the stability and safety of the path during cutting; the specific formula is as follows: in, and is the path offset obtained by center channel optimization; and It is the further adjustment amount obtained through dynamic adjustment of the seat belt to ensure the final smoothness and safety distance requirements of the path.

[0018] The above shows and describes the basic principles, main features and advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. A method for autonomously adjusting the cutting path of a pigtail wishbone, characterized in that: The following steps are involved: Step 1: Obtain a 3D segmented surface model and a 3D bone model of the pigtail furcula; Step 2: Extract the three-dimensional segmentation surface model layer by layer to generate a corresponding rough cutting path; Step 3: align the 3D bone model with the real-time point cloud data to obtain the overall 3D information of the pigtail furcula structure, and then obtain the aligned bone model points; Step 4: Obstacles encountered by the rough cutting path are obtained according to the relative relationship between the skeleton model points and the rough cutting path; Step 5: Avoid obstacles by path deviation and form a deviation path; Step 6: The offset path is smoothed to obtain a smooth offset path; Step 7: All smooth offset paths are merged and smoothed to obtain a complete offset path; Step 8: Merge the complete offset path and the rough cutting path to obtain the final cutting path.

2. The method for autonomously adjusting the cutting path of a pigtail wishbone according to claim 1, characterized in that: Step 2 includes the following steps: Step 2.1: Obtain the three-dimensional mesh model of the pigtail wishbone through the three-dimensional segmentation surface model and record it as , 3D mesh model Include mesh patches, and the node coordinates of each mesh patch are ,in ; 3D mesh model It is expressed as: ; Then calculate the normal vector of the mesh patch and determine the cutting layer. For each mesh patch , calculate its normal vector , obtained through the vector product formula: ; in, and They are two vectors on the mesh surface; according to the normal vector , set the cutting layer interval, The depth of the cutting layer is set in the direction of the axis or perpendicular to the normal vector. The depth of the layer cutting is , then the depth of the cutting layer The formula is: ; in, is the depth of the initial cutting layer, is the level index, and ,in, is the maximum number of cutting layers; For each layer , the cutting layer intersects with the three-dimensional surface, and the boundary line of the intersection is the cutting path of the layer; set the cutting layer to: ; in, is the normal vector component of the cutting plane, and is the depth of the cutting layer; through the three-dimensional mesh model Perform Boolean operations to extract the boundary path of the intersection, i.e. the cutting path ; ; in, For each node on the intersection path; Step 2.2: After connecting the cutting paths extracted layer by layer, smooth them through the B-spline curve; First extract the cutting path layer by layer Connect them sequentially to form a series of continuous cutting paths; then use spline curves to smooth the continuous cutting paths, and use the B-spline curve fitting method to smooth the continuous cutting paths: ; in, for Spline basis functions, is the waypoint, is the path parameter; Step 2.3: Optimize the smoothed cutting path through genetic algorithm and adjust the path node normal vector smoothness and node spacing; Assume that each cutting path All need to be optimized, and the optimization objectives are: ; in, and Path nodes and The normal vector of is the adjustment coefficient used to balance the optimization of normal vector smoothness and path node spacing. For path The number of nodes on ; Get the optimized cutting path , connect and optimize the cutting paths of all cutting layers, and finally generate a rough cutting path , which is expressed as: ; in, For the The cutting path of the layer is smoothed by B-spline curve and optimized by genetic algorithm.

3. The method for autonomously adjusting the cutting path of the pigtail wishbone according to claim 2, characterized in that: In step 4, first, calculate each cutting path point in the rough cutting path Corresponding points in the skeleton model The Euclidean distance : ; Among them, the cutting path point Points with bone model The corresponding relationship is determined by the spatial mapping relationship between the cutting path and the bone model; Secondly, obstacle detection is performed, the formula is: Judgment conditions: ; If the distance , then determine the cutting path point There is a bone obstruction at the location, where is the preset distance threshold; In step 5, first, the lateral offset direction and offset distance as well as the coordinates of the offset path points are calculated; the lateral offset direction of the cutting path point is determined by its normal vector Determine; Normal vector The tangent vector through the path The calculation results are: ; in, For the cutting path at the cutting path point The tangent vector at is the normal vector direction of the skeleton model, Represents the cross product operation; The horizontal offset distance of the cutting path point Depending on the size of the obstacle and the width of the tool The calculation formula is as follows: ; in, is the experience adjustment coefficient; Then, an offset path is generated for all original cutting path points on the cutting path that need to avoid obstacles. , perform offset processing one by one to generate an offset path , which is expressed as: ; In step 6, the fitting formula of the Bezier curve is: ; in, is the path point, and includes the key points of the offset path, represents the Bessel basis function, represents the smoothed path; Combine the offset path and the smoothed path to generate the final smooth offset path , which is expressed as: ; in, Represents a smoothing function, which is used to perform Bezier fitting and smooth optimization on the offset path.

4. The method for autonomously adjusting the cutting path of a pigtail wishbone according to claim 3, characterized in that: In step 4, the curvature of the rough cutting path at the bend is compared with the curvature of the corresponding position of the skeleton model. When the comparison value is greater than the set threshold, it is determined that there is an obstacle at the bend of the rough cutting path; Curvature Used to describe the curvature of the rough cutting path. The calculation formula is: ; in, and is the first-order derivative of the path on the plane, and is the second-order derivative of the path; by calculating the local curvature of the rough cutting path and comparing it with the curvature of the corresponding position in the skeleton model, if the change in curvature exceeds the set threshold, it is considered that there is an obstacle at the turn; In step 5, first, the rough cutting path is represented as a parameter curve : ; in, is the path parameter, For the path in the parameter Where coordinate; For the path in the parameter Where coordinate; At any point on the rough cutting path , calculate the unit normal vector : ; in, and The rough cutting paths are Pointed and The derivative of the coordinates represents the tangent vector of the rough cutting path, the normal vector is the perpendicular direction of the tangent vector; For the rough cutting path, in the parameters The unit normal vector at , indicating the offset direction; After obtaining the unit normal vector, according to the size of the tool and safe distance , calculate the total offset distance : ; Offset Direction Set along the normal vector direction, and select the positive or negative direction of the normal vector according to the position of the obstacle: ; Then, offset the path The formula is: ; in, is the new path after the offset, and are the unit normal vectors exist and Directional component; Limit the minimum distance between the offset path and obstacles: ; in, Offset path point The distance to obstacles; For safe distance; In step 6, the offset path Calculating curvature : ; in, Offset Path In the parameters The curvature at , which indicates the curvature of the path; and The offset paths are Pointed and The derivative of the coordinates, representing the tangent vector of the offset path; are the second-order derivatives of the offset path, representing the curvature of the offset path; Ensure curvature Satisfy the optimization goal, that is, the curvature changes smoothly: ; in, is the rate of change of curvature, and the optimization goal is to make the curvature change smoothly; indicates that the integration is performed along the offset path; Calculate the corrected turning angle : ; in, and are the vertical and horizontal displacements between the start and end points of the turn, respectively; Ensure that the corrected turning angle is close to the ideal turning angle : ; Here, the ideal turning angle Determined according to the maximum allowable rotation angle of the tool; Finally, the curvature optimization and turning angle correction are combined to generate the final smooth offset path. : ; ; in, and For the final path in the parameter Where and coordinate; Indicates the original path Coordinate plus along The offset of the direction, Indicates the original path Coordinate plus along Direction offset; and It is the further adjustment of the original offset path after smoothing and curvature optimization.

5. The method for autonomously adjusting the cutting path of a pigtail wishbone according to claim 4, characterized in that: In step 4, for the obstruction between the coccyx and the sacrum, a fine bone model is first obtained based on the 3D bone model. The fine bone model is registered with the real-time point cloud data, and then the point cloud segmentation algorithm is used to separate the bone area from the gap area. When new point cloud data is detected in the gap area, , and these points belong to the bone area, it is judged that there is an obstacle at this position; the mathematical expression is as follows: Set the gap area to , that is, the gap part in the bone model: ; in, Represents the points in the skeleton model, belonging to the gap area ; Use the RANSAC algorithm to segment the real-time point cloud data and distinguish the gap area from the bone area; if new point cloud data is detected in the gap area , and these points belong to the bone area, then it is determined that there is a bone obstacle at this location: ; in, It is the newly added point cloud data, belonging to the bone area , and does not belong to the void area , if the condition is met, the position is judged to be a bone obstacle; In step 5, the rough cutting path is first expressed as a parameter curve: ; in, is the path parameter, For the path in the parameter Where coordinate; For the path in the parameter Where coordinate; The optimization goal is: ; in, is a point on the rough cutting path, is the ideal center position of the point, and the goal is to keep the point on the rough cutting path in the center of the bone joint; The fast gradient descent method is used to iteratively update the position of the points on the rough cutting path. The specific update formula is: ; in, is the learning rate, is the number of iterations; Then, set the safety belt area on both sides of the rough cutting path, and the width of the safety belt Through tool width and possible errors To calculate: ; in, Represents the function for calculating the width of the seat belt: ; in, is a constant coefficient used to adjust the sensitivity of the seat belt width; Control signal to adjust path deviation for: ; in, is the path deviation, i.e., the error between the current path position and the ideal center path; , ,and are the proportional, integral and differential coefficients respectively; Finally, the final path is generated, combining the center channel optimization with the dynamic adjustment of the seat belt to generate the final smooth cutting path The specific formula is as follows: ; ; in, and is the path offset obtained by center channel optimization; and It is a further adjustment obtained through dynamic adjustment of the seat belt.

6. The method for autonomously adjusting the cutting path of a pigtail wishbone according to claim 5, characterized in that: In step 7, the specific process is as follows: First, select control points. At the endpoints of every two adjacent paths, select control points to define the Bezier curve. The control points include the endpoints of the path segments and a certain offset in the normal direction to control the shape and direction of the curve. The Bezier curve is generated using control points, and its parametric equation is: ; in, is the control point, is a path parameter, ; Next, the generated Bezier curve is concatenated with the adjacent offset path, and the curvature of the transition section is checked by calculating the curvature change. The curvature change formula is: ; in, is the tangent vector of the path, is the parameterized representation of the path; then, the control points are optimized by the gradient descent method to minimize the change in the curvature of the path, and the objective function is defined as: ; in, For the The curvature of the segment, is the average curvature of all segments; Define the fitness function to minimize the total path length and curvature fluctuation: ; in, is the total path length, and is the weight coefficient, which is used to balance the length and curvature smoothness of the path; Full offset path for: ; in, Represents the path fusion function, which uses Bezier curves to cut the path in the final Create smooth transitions between them.

7. The method for autonomously adjusting the cutting path of a pigtail wishbone according to claim 6, characterized in that: In step 8, the rough cutting path obtained in step 2 is fitted repeatedly by weighted least squares. and the complete offset path obtained in step 7 to integrate; First, the weighted least squares method is used to calculate the rough cutting path. and full offset path Perform preliminary fusion to obtain the initial fitting path. The specific steps and formulas are as follows: ; in, is the weight of the sampling point, and Rough cutting path In the parameters Where and coordinate, and Full offset path In the parameters Where and coordinate; and The path parameters of the fitting curve are Next and Estimated value; is a parameterized variable; Optimize the fitting function and , to minimize the weighted error function ; ; By adjusting and , find Minimum fitting curve; After each path fit, the error between the fitted path and the true path is evaluated; the error is calculated as follows: ; in, Indicates The error of each sampling point; According to the error Adjust the weight of sampling points : ; in, is the adjusted weight, is the adjustment coefficient, which is used to control the magnitude of weight growth. is the maximum error value among all current points, used for normalizing the error; Next, use the adjusted weights Re-perform the weighted least squares fitting to minimize the new weighted error function ; Repeat error evaluation and weight adjustment until the iteration stop condition is met; the specific steps and formulas are as follows: ; Iterate and repeat the following steps until the error decreases by less than the set threshold or one of the maximum number of iterations is reached:

1. Use current weights Perform weighted least squares fitting and update and ; 2. Calculate the error of each sampling point ; 3. Adjust weights based on error ; 4. Recalculate the weighted error function ; Finally, after multiple iterations of optimization, the fitting path gradually converges, and finally a fitting result with an error that meets the requirements and a smooth path is obtained, that is, the final cutting path. ; The specific formula is as follows: ; and The final fitting curve is obtained by iterative optimization of weighted least squares method. and coordinate.

Citation Information

Patent Citations

  • Method for simulating soft tissue surgery path planning through implicit surface algorithm

    CN110164557A

  • Live pig carcass segmentation method and system based on machine learning

    CN113643401A

  • Path planning system of spinal surgical robot and robot system

    CN113876429A

  • Robot-oriented pig carcass cutting path autonomous scaling method

    CN115205304A

  • Skeleton model contour curve tiling generation method based on shortest path mode

    CN116091583A

Cited By

  • Intelligent cutting method for meat with bones based on 3D point cloud

    CN122415653A

  • A 3D point cloud-based intelligent cutting method with bones and meat

    CN122415653B