A method for trimming the anal fin of rainbow trout fillets
By acquiring point cloud data of rainbow trout fillets using a multispectral camera, establishing a fillet coordinate system, and intelligently identifying the anal fin region and generating a cutting path, the problem of low efficiency due to reliance on manual labor in rainbow trout fillet trimming was solved. This enabled efficient and standardized anal fin trimming, improving meat yield and trimming quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- FISHERY MACHINERY & INSTR RES INST CHINESE ACADEMY OF FISHERY SCI
- Filing Date
- 2026-02-05
- Publication Date
- 2026-05-26
AI Technical Summary
The trimming of the anal fin of rainbow trout fillets relies on manual labor, which is inefficient and results in inconsistent quality. Furthermore, the yield varies due to individual differences in the fish, making it difficult to standardize the product.
Multispectral cameras are used to collect color point cloud data. Principal component analysis is used to establish a fish fillet coordinate system. Combined with intelligent recognition methods based on curvature, height, and width feature thresholds, a region growing algorithm is used to extract the anal fin region. The anal fin contour is obtained through a point cloud boundary extraction algorithm, and a cutting path is generated. Automated cutting is achieved by combining motion compensation and real-time coordinate transformation mechanisms.
It has achieved automation and standardization in the trimming of rainbow trout fillets, improved trimming consistency and meat yield, reduced labor costs and labor intensity, adapted to shape changes caused by individual differences, and ensured that the cutting path conforms to geometric features and process standards.
Smart Images

Figure CN122074537A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of aquaculture equipment, and specifically to a method for trimming the anal fin of rainbow trout fillets. Background Technology
[0002] In rainbow trout processing, the rainbow trout fillets obtained after slicing still require fine trimming of the remaining anal fins. Currently, this process is highly dependent on skilled workers, which is not only inefficient and costly, but also results in inconsistent trimming quality and meat yield due to individual differences in the fish, seriously restricting product standardization. Therefore, there is an urgent need to develop an intelligent trimming method for the anal fins in rainbow trout fillets that can automatically adapt to the unique shape of each rainbow trout fillet and achieve precise and efficient trimming. Summary of the Invention
[0003] In view of the technical problems of existing rainbow trout fillet trimming, which mainly relies on manual labor, is inefficient, and has unstable trimming quality and meat yield due to individual differences in fish, the purpose of this invention is to provide a method for trimming the anal fin of rainbow trout fillets.
[0004] The objective of this invention can be achieved through the following technical solutions:
[0005] A method for trimming the anal fin of rainbow trout fillets, comprising the following steps:
[0006] S1: The conveyor belt of the trimming equipment transports fish slices at a predetermined speed. When the fish slices reach the image acquisition point A, the point cloud data of the fish slices is acquired, and the point cloud data is converted from the camera coordinate system to the trimming equipment coordinate system.
[0007] S2: Preprocess the converted point cloud data to obtain fish slice point cloud, and establish a fish slice coordinate system that follows the posture of the fish slice based on the spatial distribution characteristics of the fish slice point cloud.
[0008] S3: In the fish fillet coordinate system, identify the point set of the anal fin region based on the geometric features of the point cloud, and extract the anal fin contour;
[0009] S4: Perform curve fitting on the extracted anal fin contour, and offset it by a predetermined distance along the normal vector direction of the fitted curve to generate a cutting path, and determine the mapping relationship between the cutting path parameters and the cutting time.
[0010] S5: Convert the cutting path in the fish fillet coordinate system to the trimming equipment coordinate system in real time, and control the cutting device to cut the moving rainbow trout fillet at trimming station B.
[0011] A further improvement of the present invention is that the process of establishing the fish fillet coordinate system in step S2 specifically includes:
[0012] S21: Calculate the centroid of the fish fillet point cloud in the coordinate system of the trimming equipment;
[0013] S22: Calculate the covariance matrix of the fish fillet point cloud and perform eigenvalue decomposition on the covariance matrix to obtain three eigenvalues and their corresponding eigenvectors.
[0014] S23: Establish the fish fillet coordinate system with the centroid as the origin, the eigenvector corresponding to the largest eigenvalue as the X-axis, the eigenvector corresponding to the second largest eigenvalue as the Y-axis, and the eigenvector corresponding to the smallest eigenvalue as the Z-axis;
[0015] S24: Record the position of the origin of the fish fillet coordinate system in the trimming device coordinate system at the moment of image acquisition.
[0016] A further improvement of the present invention is that the process of identifying the anal fin region point set and extracting the anal fin contour in step S3 specifically includes:
[0017] S31: Calculate the normal vector and curvature of each point in the point cloud of the fish fillet;
[0018] S32: Based on the preset curvature threshold, height threshold and width threshold, filter out the point cloud set belonging to the anal fin region from the fish fillet point cloud;
[0019] S33: Select a point as a seed point in the point cloud set of the anal fin region, use the region growing algorithm to extract the point set of the anal fin region, and use the point cloud boundary extraction algorithm to obtain the anal fin contour from the point set of the anal fin region.
[0020] A further improvement of the present invention is that the process of calculating the normal vector and curvature in step S31 specifically includes:
[0021] For any point in the fish fillet point cloud, search its neighborhood point set and calculate the covariance matrix of the neighborhood point set; perform eigenvalue decomposition on the covariance matrix of the neighborhood point set, and take the eigenvector corresponding to the smallest eigenvalue as the normal vector of the point; calculate the curvature of the point based on the eigenvalue, and the curvature calculation formula is the ratio of the smallest eigenvalue to the sum of all eigenvalues.
[0022] A further improvement of the present invention is that the judgment condition for selecting the point cloud set belonging to the anal fin region in step S32 is:
[0023] ;
[0024] in, Indicates the anal fin area; Points in the fish fillet coordinate system The curvature of a point, The threshold value for anal fin curvature. Let be the height of the point in the fish fillet coordinate system. For height threshold, Let be the width coordinate of the point in the fish fillet coordinate system. This is the width threshold.
[0025] A further improvement of the present invention is that, in step S33, a growth point is selected based on the seed point or the current growth point and the growth conditions; the growth conditions include: the Euclidean distance between the growth point and the seed point or the current growth point is less than the maximum distance. And the normal vector of the growth point. Normal vector of seed point or current growth point The dot product is greater than the preset angle cosine threshold. .
[0026] A further improvement of the present invention is that the specific steps for generating the cutting path in step S4 include:
[0027] The profile curve is obtained by least-squares fitting of the point set of the anal fin profile using a polynomial curve.
[0028] Calculate the unit normal vector at each point on the contour curve;
[0029] Offset the points on the contour curve along their corresponding unit normal vector direction by the predetermined distance to obtain the cutting path points:
[0030] ;
[0031] in, For points on the fitted contour curve, Let be the unit normal vector at that point. This is the cutting allowance.
[0032] A further improvement of the present invention is that the process of converting the cutting path to the coordinate system of the trimming device in real time in step S5 includes:
[0033] Based on the constant speed of the conveyor belt, establish the origin of the fish fillet coordinate system as a function of time. Position function in the coordinate system of the dressing equipment :
[0034] ;
[0035] in, Image acquisition time The initial position of the origin of the fish fillet coordinate system; V is the conveyor belt speed;
[0036] Construct a time-varying transformation matrix from the fish fillet coordinate system to the trimming equipment coordinate system. ;
[0037] Using the transformation matrix The cutting path in the fish fillet coordinate system is mapped in real time to the motion trajectory in the trimming equipment coordinate system.
[0038] A further improvement of the present invention is that the cutting device begins cutting at the trimming station B at the following time. At any moment during the cutting process Adjust the cutting path target point in the equipment coordinate system. for:
[0039] ;
[0040] in, For a moment The transformation matrix at time, The corresponding time in the fish fillet coordinate system Path points.
[0041] A further improvement of the present invention is that the point cloud data acquired in step S1 is color point cloud data acquired using a multispectral camera; the preprocessing in step S2 includes using statistical filtering to remove outliers to obtain the fish slice point cloud.
[0042] Compared with the prior art, the present invention has the following significant advantages:
[0043] This invention uses a multispectral camera to acquire color point clouds, enabling high-precision reconstruction of the three-dimensional contours of fish fillets. By dynamically establishing a coordinate system for the fish fillets through principal component analysis (PCA), the system can automatically identify the unique principal axis direction and posture of each fish fillet, perfectly adapting to shape changes caused by individual differences.
[0044] This invention proposes an intelligent recognition method based on multiple feature thresholds of curvature, height, and width. This method, combined with a region growing algorithm, extracts the anal fin point cloud region, and then uses a point cloud boundary extraction algorithm to obtain the anal fin contour, significantly improving the accuracy of contour extraction. Simultaneously, by using a secondary normal vector offset to compensate for reserved cutting allowance, it ensures that the cutting path conforms to both geometric features and process standards.
[0045] This invention introduces a motion compensation and real-time coordinate transformation mechanism to dynamically map the cutting path in the fish fillet coordinate system to the trimming device coordinate system. Combined with time-parameterized mapping, it ensures that the trimming blade is completely synchronized with the fish fillet during high-speed transport, effectively solving the pose offset problem in dynamic trimming.
[0046] The solution of this invention automates the entire process from image acquisition and path planning to cutting execution, significantly reducing reliance on skilled workers. This not only improves the consistency of trimming and meat yield but also significantly reduces labor costs and labor intensity, which is conducive to the large-scale and standardized production of rainbow trout products. Attached Figure Description
[0047] Figure 1 A flowchart for the method of trimming the anal fin of rainbow trout fillets.
[0048] Figure 2 Photos of rainbow trout fillets before and after trimming. Detailed Implementation
[0049] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments.
[0050] like Figure 1 , Figure 2 As shown, embodiments of the present invention provide a method for trimming the anal fin of rainbow trout fillets, aiming to solve the problems of low efficiency and unstable quality in traditional manual trimming. This method is based on an automated trimming equipment design, where the rainbow trout fillets advance at a constant speed V on the conveyor belt. The system completes image acquisition of the rainbow trout fillets at point A (image acquisition point A) of the trimming equipment, establishes a three-dimensional point cloud of the fillets, and identifies the contour features of the dorsal, caudal, and anal fins, generating the required cutting path in the fillet coordinate system. When the rainbow trout fillets advance to point B (trimming station B, specifically the starting working point of the cutters in the trimming equipment), the cutters in the trimming equipment begin trimming and cutting the fillets.
[0051] Color 3D point cloud data of rainbow trout fillets is acquired using a multispectral camera installed at point A. Coordinate transformation technology is used to convert the point cloud from the camera coordinate system to the trimming equipment coordinate system. Principal component analysis (PCA) is then used to dynamically establish a fillet coordinate system aligned with the fillet's posture. Within this coordinate system, the system first preprocesses the point cloud and estimates its normal vectors. Then, it intelligently identifies the anal fin region using multi-feature thresholds for curvature, height, and width, extracting its point cloud region using a region growing algorithm. Finally, a point cloud boundary extraction algorithm is used to obtain the anal fin contour. For the extracted anal fin contour, a polynomial curve is fitted, and a precise cutting path is generated by offsetting a certain cutting allowance along the binormal vector direction. Furthermore, the system incorporates a constant-speed conveyor belt motion model to convert the cutting path in the fillet coordinate system into a motion trajectory in the trimming equipment coordinate system in real time, achieving precise synchronization between the trimming blade and the fillet's movement at point B. This method automates the entire process from image acquisition, feature extraction, path planning to cutting execution, significantly improving the efficiency, consistency, and standardization of rainbow trout fillet trimming.
[0052] Example 1: The method for trimming the anal fin of rainbow trout fillets according to the present invention includes the following steps:
[0053] S1: Obtain the point cloud data of rainbow trout fillets on the conveyor belt, specifically including:
[0054] After being sliced, the rainbow trout fillets are placed on the conveyor belt of the trimming equipment and transported to the trimming station at a constant speed V to achieve the feeding and conveying of the fillets. When the fillet reaches point A (image acquisition point A) on the conveyor belt, a fixedly installed multispectral camera acquires color point cloud data of the fillet and obtains the three-dimensional coordinates of each point in the point cloud data in the camera coordinate system. An initial coordinate transformation is performed through a pre-calibrated transformation matrix to transform the point cloud from the camera coordinate system to the trimming equipment coordinate system, laying the foundation for subsequent processing.
[0055] In one specific embodiment, the time when the rainbow trout fillet passes point A is... A multispectral camera acquires point clouds of fish fillets, obtaining the coordinates of each point in the camera coordinate system. The coordinates in the middle are:
[0056]
[0057] in: The total number of points in the point cloud; : Homogeneous coordinates (4-dimensional vector) of the i-th point in the camera coordinate system; : The X coordinate of the i-th point in the camera coordinate system; : The Y-coordinate of the i-th point in the camera coordinate system; : The Z coordinate (depth value) of the i-th point in the camera coordinate system; : Index of points in the point cloud, from 1 to N; superscript : This indicates that the quantity belongs to the camera coordinate system.
[0058] The transformation matrix from the camera to the coordinate system of the trimming equipment is obtained through camera calibration:
[0059]
[0060] in: : A 4×4 homogeneous transformation matrix, representing the transformation from the camera coordinate system to the trimming device coordinate system; : A 3×3 rotation matrix that describes the rotation relationship from the camera coordinate system to the trimming equipment coordinate system; : A 3×1 translation vector, representing the position of the camera coordinate system origin in the trimming device coordinate system; : A zero vector with 1 row and 3 columns; superscript : Indicates the coordinate system of the adjustment equipment; subscript : Represents the camera coordinate system.
[0061] S2: Preprocess the point cloud data to obtain the fish fillet point cloud and establish the fish fillet coordinate system, specifically including:
[0062] During preprocessing, statistical filtering is used to remove outliers, and the point cloud of the main body of the fish fillet is retained as the fish fillet point cloud; the centroid of the point cloud is calculated, and the principal axis direction of the fish fillet is determined by principal component analysis (PCA).
[0063] In one specific embodiment, statistical filtering is used to remove outliers, resulting in the point cloud of the fish fillet body, expressed as:
[0064]
[0065] in: : The point cloud set of the main body of the fish fillet after filtering in the coordinate system of the trimming equipment; : The coordinates of the i-th point in the coordinate system of the trimming equipment; : The number of points in the filtered point cloud; : The number of points in the original point cloud.
[0066] In establishing the fish fillet coordinate system, the centroid of the fish fillet point cloud is taken as the origin, and the three orthogonal directions with the largest variance found by principal component analysis (three orthogonal eigenvectors, corresponding to three eigenvalues) are used as the coordinate axes. The coordinate system is then established by recording the values at this point. The position of the origin of the fish fillet coordinate system in the coordinate system of the trimming equipment.
[0067] In one specific embodiment, the expression for calculating the centroid of the fish fillet point cloud is:
[0068]
[0069] in: The center of gravity (centroid) of the fish fillet point cloud in the coordinate system of the trimming equipment; The number of points in the fish fillet point cloud; : No. The coordinates of each point in the coordinate system of the trimming equipment; Summation symbol: sum all points.
[0070] Calculate the covariance matrix:
[0071]
[0072] in: : A 3×3 covariance matrix, describing the distribution of the fish fillet point cloud in three dimensions; : The coordinates of the i-th point in the coordinate system of the trimming equipment; : Dot cloud center of gravity; :vector The transpose of ; the summation symbol: sums all points.
[0073] Perform eigenvalue decomposition on the covariance matrix:
[0074]
[0075] in The corresponding feature vector is . Covariance matrix; The j-th feature value, sorted in descending order; : Corresponding eigenvalues eigenvectors (unit vectors); : The index of the eigenvalue / eigenvector, with values of 1, 2, and 3.
[0076] Define the fish fillet coordinate system, and its transformation matrix relative to the trimming equipment coordinate system is:
[0077]
[0078] in: A 4×4 homogeneous transformation matrix, representing the transformation over time. The transformation from the fish fillet coordinate system to the trimming equipment coordinate system; The eigenvector corresponding to the largest eigenvalue is used as the X-axis (direction of the main axis of the fish fillet) of the fish fillet coordinate system. The eigenvector corresponding to the second largest eigenvalue is used as the Y-axis of the fish fillet coordinate system. The eigenvector corresponding to the smallest eigenvalue is used as the Z-axis of the fish fillet coordinate system (perpendicular to the surface of the fish fillet). The centroid of the point cloud serves as the origin of the fish fillet coordinate system. : Image acquisition time; Subscript F: Indicates the fish fillet coordinate system.
[0079] The inverse transformation matrix from the fish fillet coordinate system to the trimming equipment coordinate system is:
[0080]
[0081] in: A 4×4 homogeneous transformation matrix, representing the transformation over time. The transformation from the coordinate system of the trimming equipment to the coordinate system of the fish fillet; : The inverse matrix; : Feature vector The transpose of (row vector); :vector and The dot product of these terms, multiplied by -1, becomes the X component of the translation vector; similarly, and These are the Y and Z components of the translation vector, respectively.
[0082] Transform the fish fillet point cloud from the trimming equipment coordinate system to the fish fillet coordinate system:
[0083]
[0084] in: : The coordinates of the i-th point in the fish fillet coordinate system; Transformation matrix from the equipment coordinate system to the fish fillet coordinate system; The i-th point at time The coordinates in the equipment coordinate system at that time; superscript : Represents the coordinate system of the fish fillet.
[0085] S3: Identify anal fin features and extract the anal fin contour based on the fish fillet point cloud. In this embodiment, this process is performed in the fish fillet coordinate system. Methods for extracting the anal fin contour from the fish fillet point cloud include 3D point cloud segmentation networks and point cloud segmentation methods based on geometric features. The extracted anal fin contour includes a set of anal fin boundary points.
[0086] S4: Plan the cutting path based on the anal fin outline in the fish fillet point cloud, specifically including:
[0087] S41: Perform least-squares fitting on the anal fin profile to obtain the profile curve.
[0088] In one specific embodiment, the anal fin boundary is relatively complex. To facilitate subsequent cutting, a polynomial curve fitting is used:
[0089]
[0090] :parameter The corresponding point on the polynomial curve of the anal fin; : Polynomial coefficients (three-dimensional vector); Curve parameters, with values ranging from 0 to 1; The square and cube of the parameters; This is the coefficient vector.
[0091] The coefficients are solved using the least squares method, and the expression is as follows:
[0092]
[0093] in: Minimize the set of coefficients of a polynomial The objective function; Summing over all anal fin boundary points; : The square of the distance between the j-th boundary point and its corresponding point on the polynomial curve; Number of boundary points of the anal fin.
[0094] Transform the solution into a linear system:
[0095]
[0096] Where: Left side matrix: Design matrix, size is Each row corresponds to the power of the parameter of a point; : The parameter value of the j-th point; : The sum of squares and cubes of the parameter values; Intermediate matrix: the transpose of the coefficient matrix, with a size of Each row is the transpose of a coefficient vector; the right-hand matrix is the boundary point coordinate matrix, with a size of... Each row represents the coordinate transpose of a boundary point.
[0097] S42: Offset the fitted contour curve outwards from the anal fin region by a predetermined distance as a margin, and use the offset contour curve as the cutting path.
[0098] In one specific embodiment, for points on the fitted contour curve Offset by a predetermined distance along the normal vector direction As a cutting allowance:
[0099]
[0100] in: Points on the offset cutting path; Points on the original fitted curve (profile curve); Cutting allowance (usually 1-2mm), positive numbers indicate outward offset, negative numbers indicate inward offset; :point The unit normal vector at that location.
[0101] normal vector The normal vector can be calculated from the tangent vector using curve differentiation: for a contour curve expressed in parametric curve form. The tangent vector is:
[0102]
[0103] in: : The curve in the parameter The tangent vector at point (first derivative); : Curve coordinate components relative to parameters The derivative of .
[0104] S43: Calculate the total length of the cutting path and determine the cutting time based on the cutting speed of the cutting device. Time mapping relationship with path parameters:
[0105] In one specific embodiment, for the contour curve expressed in the form of a parametric curve. Arc length calculation formula:
[0106]
[0107] in: The total arc length of the curve; : For parameters Integral from 0 to 1; : The curve in the parameter The first derivative (tangent vector) at the point; The magnitude of the tangent vector (i.e., the length of the curve at...) (The instantaneous velocity at that point).
[0108] Cutting time The expression is:
[0109]
[0110] in: : The total time required to complete the entire cut; : Total length of the cutting path; Cutting speed (constant value).
[0111] Path parameters of the profile curve With time The mapping relationship is as follows:
[0112]
[0113] in: :time The corresponding path parameter values; Total path length; For arc lengths from 0 to integral; :time The distance the internal trimmer moves; this formula indicates that under uniform cutting conditions, the relationship between the path parameter u and time t is determined by the arc length parameterization.
[0114] S5: Based on the cutting path and the speed of the conveyor belt of the trimming equipment, the fish fillets are cut using a cutting device. Specifically, this includes:
[0115] S51: Calculate the travel time of the fish fillet from point A to point B based on the speed V of the conveyor belt. And obtain the position function of the fish slice at any time.
[0116] In one specific embodiment, assuming the conveyor belt moves at a constant speed V along the X-axis of the trimming equipment coordinate system, the time it takes for the fish fillet to travel from point A to point B is:
[0117]
[0118] in: The time required for the fish fillet to move from point A to point B; : The coordinates (three-dimensional vector) of point A in the coordinate system of the trimming equipment; : The coordinates (three-dimensional vector) of point B in the coordinate system of the trimming equipment; Conveyor belt speed, in mm / s; The Euclidean norm (length) of a vector.
[0119] at any time The position function of the fish fillet in the coordinate system of the trimming equipment is:
[0120]
[0121] The origin of the fish fillet coordinate system is in time. The position of the equipment in the coordinate system at that time; The origin of the fish fillet coordinate system is in time. The position of the device in the coordinate system at the time of image acquisition; Conveyor belt speed; Current time; Image acquisition time;
[0122] From time arrive The displacement of the fish fillet along the X-axis.
[0123] The transformation matrix from the fish fillet coordinate system to the trimming equipment coordinate system changes with time, and its expression is:
[0124]
[0125] in: In time The transformation matrix from the fish fillet coordinate system to the trimming equipment coordinate system; The three coordinate axes of the fish fillet coordinate system are fixed in direction. The origin of the fish fillet coordinate system is in time. The position of the fish fillet coordinate system in the trimming equipment coordinate system changes over time; this matrix represents the pose (position and orientation) of the fish fillet coordinate system in the trimming equipment coordinate system.
[0126] To facilitate cutting by the cutting equipment, the cutting path needs to be transformed from the fish fillet coordinate system to the trimming equipment coordinate system. Points in the fish fillet coordinate system... At any moment The coordinates of the repair equipment are:
[0127]
[0128] After unfolding:
[0129]
[0130] in: :point In time The coordinates of the device in the coordinate system at that time; :time The transformation matrix from the fish fillet coordinate system to the trimming equipment coordinate system; : The coordinates of the point in the fish fillet coordinate system; : The X, Y, and Z coordinates of the point in the coordinate system of the trimming equipment (which change over time); The X, Y, and Z coordinates of the point in the fish fillet coordinate system (fixed); :vector The three components; :vector The three components; :vector The three components; The origin of the fish fillet coordinate system is in time. The X, Y, and Z coordinates in the coordinate system of the equipment being adjusted; where:
[0131]
[0132]
[0133]
[0134] in: The origin of the fish fillet coordinate system is in time. The X-coordinate at time (which changes linearly with time); The origin of the fish fillet coordinate system is in time. The X coordinate at that time; Conveyor belt speed; Current time; Image acquisition time; The origin of the fish fillet coordinate system is in time. The Y and Z coordinates at time (assuming they do not change with time).
[0135] S52: Parameterize the cutting path over time:
[0136] In one specific embodiment, the cutting starts from time... Start, duration is The cutting path is represented in the fish fillet coordinate system as follows:
[0137]
[0138] in: The cutting path in the fish fillet coordinate system, in terms of parameters. express; : Path parameter, with a value range of 0 to 1, where 0 represents the start of the path and 1 represents the end of the path; : Cutting start time (point B); : Cutting duration. For path parameters. The expression for how the cutting path changes over time in the trimming equipment coordinate system:
[0139]
[0140] in: :time The position of the cutting path in the coordinate system of the trimming equipment; :time The transformation matrix from the fish fillet coordinate system to the trimming equipment coordinate system; :parameter The path points in the corresponding fish fillet coordinate system; Path parameters With time The mapping function; where It is a mapping relationship between path parameters and time.
[0141] The time it takes for the fish fillets to reach point B, where the cutting equipment is located, on the conveyor belt is Then the cutting process begins. The cutting path is generated in the fish fillet coordinate system. The changes over time in the coordinate system of the dressing equipment are as follows:
[0142]
[0143] :time The position of the cutting path in the coordinate system of the trimming equipment; :time The transformation matrix from the fish fillet coordinate system to the trimming equipment coordinate system; : Cutting start time (point B); : The relative time from the start of the cutting process, with a range of values. ; :parameter The path points in the corresponding fish fillet coordinate system; : A mapping function between path parameters and time.
[0144] Expanded to:
[0145]
[0146] in: :time The position of the cutting path in the coordinate system of the trimming equipment; The three coordinate axes of the fish fillet coordinate system are fixed in direction. :time The position of the origin of the fish fillet coordinate system in the coordinate system of the trimming equipment; : Parameters are The path points in the fish fillet coordinate system.
[0147]
[0148] in: :time The position of the origin of the fish fillet coordinate system in the coordinate system of the trimming equipment; :time The position of the origin of the fish fillet coordinate system in the trimming equipment coordinate system at the time of image acquisition; Conveyor belt speed; : The moment the cutting begins; The relative time from the start of the cutting process; Image acquisition time; : Total time from image acquisition to the current moment.
[0149] Example 2: The main difference between this example and Example 1 lies in the extraction process of the anal fin contour in step S3. This example employs an extraction method based on geometric attributes. Specifically, it includes:
[0150] S31: For each point in the fish fillet point cloud in the fish fillet coordinate system, calculate its normal vector and curvature.
[0151] In one specific embodiment, for a certain point in the fish fillet point cloud In the process of calculating the normal vector, the k-nearest neighbor algorithm is used to find its neighborhood point set:
[0152]
[0153] in: : The i-th point in the fish fillet coordinate system, a three-dimensional coordinate vector; : The X, Y, Z coordinates of the i-th point in the fish fillet coordinate system; : The set of neighboring points of the i-th point; : The j-th point; : Neighborhood search radius; :point and points The Euclidean distance between them.
[0154] Calculate the covariance matrix of the neighborhood points:
[0155]
[0156] in: : The 3×3 covariance matrix of the neighborhood points of the i-th point; Neighborhood Number of midpoints; : for the neighborhood Sum all points in the summation; A point in the neighborhood; Neighborhood The center of gravity (center of mass); :vector The transpose of . It is the neighborhood centroid, and its expression is:
[0157]
[0158] in: : The centroid (centroid) of the neighborhood of the i-th point; : Number of points in the neighborhood; : Summing the coordinates of all points in the neighborhood.
[0159] Perform eigenvalue decomposition on the covariance matrix:
[0160]
[0161] in: : The covariance matrix of the i-th point; The k-th eigenvalue of the i-th point; : Corresponding eigenvalues eigenvectors (unit vectors); : The index of the eigenvalue / eigenvector, with values of 1, 2, and 3.
[0162] in The eigenvector corresponding to the smallest eigenvalue is the normal vector.
[0163]
[0164] in: The smallest eigenvalue of the covariance matrix at the i-th point; : Corresponding minimum eigenvalue eigenvectors; : The normal vector (unit vector) at the i-th point.
[0165] Fish slices dotted in the clouds, dots The curvature at a given point is calculated using eigenvalues, and its expression is:
[0166]
[0167] in: : The curvature estimate at the i-th point; Minimum eigenvalue; Intermediate eigenvalues; : Maximum eigenvalue; denominator The sum of the three eigenvalues represents the total variance of the neighborhood of a point.
[0168] S32: Based on the curvature threshold, height threshold, and width threshold, filter out the point cloud set belonging to the anal fin from the fish fillet point cloud to achieve anal fin region recognition.
[0169] In one specific embodiment, the anal fin is located on the abdomen of the fish fillet and has specific curvature and positional characteristics. The selection rule for the anal fin region used in this embodiment is as follows:
[0170]
[0171] in: Point cloud set of the anal fin region; : The i-th point; : The curvature of the i-th point; Anal fin curvature threshold (usually taken as 0.01-0.03); Z-coordinate (height) of the i-th point; Height threshold, used to distinguish between the anal fin (lower region) and the dorsal fin (higher region). : The Y-coordinate (width direction) of the i-th point; : The absolute value of the Y coordinate, because the anal fin is usually located on both sides of the fish fillet; Width threshold: Used to limit the position of the anal fin in the width direction of the fish fillet.
[0172] S33: After obtaining the anal fin region, select a point from the point cloud corresponding to the anal fin region as a seed. In specific implementation, it is preferable to select the point with the lowest vertical height. Use a region growing algorithm to extract the point set of the anal fin region.
[0173] In one specific embodiment, the expression for selecting the seed point is:
[0174]
[0175] During the region growth process, at each time step, potential growth points are selected based on the seed point (first time step) or the current growth point (subsequent time steps) and the region growth conditions. The region growth conditions are:
[0176]
[0177] in: Seed points for regional growth; Find the point with the smallest Z-coordinate in the anal fin point cloud set; : The maximum distance for neighborhood search during region growth; :point and points The normal vector; The dot product of two normal vectors; : The cosine value of the maximum permissible angle difference (angle cosine threshold). It is the maximum permissible angle difference. Indicates the seed point or current growth point. Indicates the point to be grown.
[0178] Through the aforementioned region growth process, a connected point cloud (anal fin region point set) of the anal fin region, consisting of points that meet the growth conditions, is obtained. Subsequently, the outer contour point set is extracted from this connected point cloud as the final anal fin contour. The specific extraction method is as follows: traverse each point in the connected point cloud of the anal fin region; if any neighboring point of this point (e.g., its k-nearest neighbor) does not belong to the connected point cloud of the anal fin region, then this point is determined to be a boundary point; the set of all boundary points is denoted as the anal fin contour point set.
[0179] This invention relates to an intelligent trimming system based on 3D point clouds and an adaptive coordinate system. It employs a multispectral camera to acquire color point clouds, achieving high-precision reconstruction of the 3D contours of fish fillets. A dynamic coordinate system establishment method for fish fillets is proposed, automatically determining the principal axis direction and orientation of the fillets through principal component analysis (PCA), adapting to individual differences in each fish fillet.
[0180] This invention employs a motion compensation and real-time coordinate transformation mechanism, combined with a conveyor belt motion model, to achieve dynamic coordinate transformation from image acquisition to cutting execution, thus addressing the impact of fish fillet pose changes during transport on cutting accuracy. It also includes intelligent recognition and extraction of the anal fin based on curvature and normal vectors.
[0181] This invention proposes a multi-feature anal fin region recognition method based on curvature threshold, height threshold, and width threshold. A region growing algorithm combined with normal vector consistency is used to extract the anal fin region, and then a point cloud boundary extraction algorithm is used to obtain the contour, improving the accuracy and robustness of contour extraction. A cutting path is generated using polynomial fitting and normal offset.
[0182] This invention uses a polynomial curve to fit the anal fin contour and combines it with the least squares method to optimize the fitting accuracy. A cutting allowance compensation method based on the secondary normal vector is proposed to ensure that the cutting path conforms to both the geometry of the fish fillet and the process allowance requirements.
[0183] This invention employs time parameterization and motion synchronization control to achieve time parameterization mapping of the cutting path, ensuring synchronization between the trimming blade and the fish fillet movement. By incorporating the assumption of uniform speed cutting, the mapping relationship between the path and time is simplified, reducing the complexity of motion control.
[0184] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.
Claims
1. A method for trimming the anal fin of rainbow trout fillets, characterized in that, Includes the following steps: S1: The conveyor belt of the trimming equipment transports fish slices at a predetermined speed. When the fish slices reach the image acquisition point A, the point cloud data of the fish slices is acquired, and the point cloud data is converted from the camera coordinate system to the trimming equipment coordinate system. S2: Preprocess the converted point cloud data to obtain fish slice point cloud, and establish a fish slice coordinate system that follows the posture of the fish slice based on the spatial distribution characteristics of the fish slice point cloud. S3: In the fish fillet coordinate system, identify the point set of the anal fin region based on the geometric features of the point cloud, and extract the anal fin contour; S4: Perform curve fitting on the extracted anal fin contour, and offset it by a predetermined distance along the normal vector direction of the fitted curve to generate a cutting path, and determine the mapping relationship between the cutting path parameters and the cutting time. S5: Convert the cutting path in the fish fillet coordinate system to the trimming equipment coordinate system in real time, and control the cutting device to cut the moving rainbow trout fillet at trimming station B.
2. The method for trimming the anal fin of rainbow trout fillets according to claim 1, characterized in that, The process of establishing the fish fillet coordinate system in step S2 specifically includes: S21: Calculate the centroid of the fish fillet point cloud in the coordinate system of the trimming equipment; S22: Calculate the covariance matrix of the fish fillet point cloud and perform eigenvalue decomposition on the covariance matrix to obtain three eigenvalues and their corresponding eigenvectors. S23: Establish the fish fillet coordinate system with the centroid as the origin, the eigenvector corresponding to the largest eigenvalue as the X-axis, the eigenvector corresponding to the second largest eigenvalue as the Y-axis, and the eigenvector corresponding to the smallest eigenvalue as the Z-axis; S24: Record the position of the origin of the fish fillet coordinate system in the trimming device coordinate system at the moment of image acquisition.
3. The method for trimming the anal fin of rainbow trout fillets according to claim 1, characterized in that, The process of identifying the anal fin region point set and extracting the anal fin contour in step S3 specifically includes: S31: Calculate the normal vector and curvature of each point in the point cloud of the fish fillet; S32: Based on the preset curvature threshold, height threshold and width threshold, filter out the point cloud set belonging to the anal fin region from the fish fillet point cloud; S33: Select a point as a seed point in the point cloud set of the anal fin region, use the region growing algorithm to extract the point set of the anal fin region, and use the point cloud boundary extraction algorithm to obtain the anal fin contour from the point set of the anal fin region.
4. The method for trimming the anal fin of rainbow trout fillets according to claim 3, characterized in that, The process of calculating the normal vector and curvature in step S31 specifically includes: For any point in the fish fillet point cloud, search its neighborhood point set and calculate the covariance matrix of the neighborhood point set; perform eigenvalue decomposition on the covariance matrix of the neighborhood point set, and take the eigenvector corresponding to the smallest eigenvalue as the normal vector of the point; calculate the curvature of the point based on the eigenvalue, and the curvature calculation formula is the ratio of the smallest eigenvalue to the sum of all eigenvalues.
5. A method for trimming the anal fin of rainbow trout fillets according to claim 3, characterized in that, The criteria for selecting the point cloud set belonging to the anal fin region in step S32 are as follows: ; in, Indicates the anal fin area; Points in the fish fillet coordinate system The curvature of a point, The threshold value for anal fin curvature. Let be the height of the point in the fish fillet coordinate system. For height threshold, Let be the width coordinate of the point in the fish fillet coordinate system. This is the width threshold.
6. The method for trimming the anal fin of rainbow trout fillets according to claim 3, characterized in that, In step S33, a growth point is selected based on the seed point or the current growth point and the growth conditions; the growth conditions include: the Euclidean distance between the growth point and the seed point or the current growth point is less than the maximum distance. And the normal vector of the growth point. Normal vector of seed point or current growth point The dot product is greater than the preset angle cosine threshold. .
7. The method for trimming the anal fin of rainbow trout fillets according to claim 1, characterized in that, The specific steps for generating the cutting path in step S4 include: The profile curve is obtained by least-squares fitting of the point set of the anal fin profile using a polynomial curve. Calculate the unit normal vector at each point on the contour curve; Offset the points on the contour curve along their corresponding unit normal vector direction by the predetermined distance to obtain the cutting path points: ; in, For points on the fitted contour curve, Let be the unit normal vector at that point. This is the cutting allowance.
8. A method for trimming the anal fin of rainbow trout fillets according to claim 1, characterized in that, Step S5, which involves converting the cutting path to the trimming equipment coordinate system in real time, includes: Based on the constant speed of the conveyor belt, establish the origin of the fish fillet coordinate system as a function of time. Position function in the coordinate system of the dressing equipment : ; in, Image acquisition time The initial position of the origin of the fish fillet coordinate system; V is the conveyor belt speed; Construct a time-varying transformation matrix from the fish fillet coordinate system to the trimming equipment coordinate system. ; Using the transformation matrix The cutting path in the fish fillet coordinate system is mapped in real time to the motion trajectory in the trimming equipment coordinate system.
9. A method for trimming the anal fin of rainbow trout fillets according to claim 8, characterized in that, The cutting device begins cutting at trimming station B at the following time: At any moment during the cutting process Adjust the cutting path target point in the equipment coordinate system. for: ; in, For a moment The transformation matrix at time, The corresponding time in the fish fillet coordinate system Path points.
10. A method for trimming the anal fin of rainbow trout fillets according to claim 1, characterized in that, The point cloud data acquired in step S1 is color point cloud data acquired using a multispectral camera; the preprocessing in step S2 includes using statistical filtering to remove outliers to obtain the fish slice point cloud.