Agricultural product cutting method, system and program product
By using an agricultural product cutting method and system, and employing an image reasoning model to obtain structural boundary data and perform path planning, the problem of low cutting accuracy for multiple types of agricultural products has been solved, achieving efficient and precise agricultural product cutting.
Patent Information
- Application Number
- CN202511493273.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-20
- Publication Date
- 2025-11-14
AI Technical Summary
Existing agricultural product cutting models lack adaptability to multiple product categories and the ability to recognize complex structures, resulting in low cutting accuracy, especially in areas with blurred edges and messy textures.
By inputting images of agricultural products into a preset image reasoning model, structural boundary data is obtained, mapped to the image coordinate system, path planning is performed, and the cutting robot is controlled to perform cutting.
It improves the cutting precision for various agricultural products, especially in areas with blurred edges and messy textures, thereby enhancing product quality and production efficiency.
Smart Images

Figure CN120953308A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to methods, systems and programs for cutting agricultural products. Background Technology
[0002] Deep processing of agricultural products is a crucial link in enhancing their added value and ensuring efficient production in the food industry. Cutting processes, such as peeling and pitting fruits and segmenting livestock products, directly impact product quality, production efficiency, and economic benefits. With the application of computer vision and deep learning technologies in agriculture, some AI models have begun to be used for guiding agricultural product cutting. However, existing models still suffer from limitations in adaptability and accuracy: First, most models are developed for single agricultural product categories, lacking a universal adaptation mechanism for multiple categories, making it difficult to quickly expand to different product types, thus affecting cutting accuracy during actual cutting. Second, their ability to recognize complex structures in agricultural products is insufficient, especially in areas with blurred edges and complex textures, leading to low segmentation accuracy and subsequent unreasonable path planning. In summary, the diversity and complexity of agricultural product forms result in low cutting accuracy in current agricultural product cutting methods.
[0003] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention
[0004] The main purpose of this application is to provide a method, system, and program for cutting agricultural products, aiming to solve the technical problem of low cutting accuracy caused by the diversity of agricultural product forms and the complexity of their structures.
[0005] To achieve the above objectives, this application proposes a method for cutting agricultural products, the method comprising: The product image of the agricultural product to be cut is input into a preset image reasoning model to obtain the structural boundary data of the agricultural product to be cut; The structural boundary data is mapped to the image coordinate system of the product image to obtain the image boundary data; Based on the image boundary data, a cutting path is obtained through path planning, and the cutting robot is controlled to cut the agricultural product to be cut according to the cutting path.
[0006] In one embodiment, the agricultural product to be cut is a peeled citrus fruit; The step of inputting the product image of the agricultural product to be cut into a preset image reasoning model to obtain the structural boundary data of the agricultural product to be cut includes: The product image of the citrus fruit is input into a preset image reasoning model to obtain a multi-label mask image and the center of the whole fruit. The labels of the multi-label mask image are used to identify different fruit segments. The regional boundaries between the mask map regions corresponding to different labels in the multi-label mask map and the center of the whole fruit are determined as the structural boundary data of the citrus fruit.
[0007] In one embodiment, the step of obtaining a cutting path based on the image boundary data includes: A polar coordinate system is established with the center of the whole fruit as the origin, and a continuous set of edge points is extracted in the polar coordinate system based on the image boundary data; Traverse each edge point in the edge point set and calculate the polar angle corresponding to the edge point based on its position in the polar coordinate system; The edge points in the edge point set are arranged in ascending order of the polar angles, and the angle difference between the polar angles of adjacent edge points is determined as the interlobe gap angle. The path is determined based on the image boundary data, and the path is planned using the interlobe gap angle as the cutting angle to obtain the cutting path.
[0008] In one embodiment, the agricultural product to be cut is a stone fruit; The step of inputting the product image of the agricultural product to be cut into a preset image reasoning model to obtain the structural boundary data of the agricultural product to be cut includes: The product image of the stone fruit is input into a preset product model to obtain the seed detection frame parameters and rotation center coordinates of the stone fruit. The seed detection frame parameters include the seed width, seed height and seed center coordinates. The parameters of the fruit pit detection frame and the rotation center are determined as structural boundary data.
[0009] In one embodiment, the step of obtaining a cutting path based on the image boundary data includes: The tilt angle is determined based on the width and height of the fruit pit, and a spiral cutting trajectory is generated with the rotation center coordinates as the reference point and the tilt angle as the cutting angle. A cutting protection area is generated with the center of the fruit pit as the center, and a cutting path is generated based on the cutting protection area and the spiral downward cutting trajectory.
[0010] In one embodiment, the agricultural product to be cut is livestock; The step of inputting the product image of the agricultural product to be cut into a preset image reasoning model to obtain the structural boundary data of the agricultural product to be cut includes: The product image of the agricultural product to be cut is input into a preset image inference model to obtain a fusion segmentation mask, and the structural position coordinates are extracted from the fusion segmentation mask. The structural position coordinates include at least the wing bone edge point set, the neck bone edge point set, and the skirt boundary point set. A first curve is obtained by fitting the wing bone edge point set and the skirt boundary point set based on the curve fitting algorithm; a second curve is obtained by fitting the cervical bone edge point set and the skirt boundary point set based on the curve fitting algorithm. The first curve and the second curve are determined as the structural boundary data.
[0011] In one embodiment, the step of obtaining a cutting path based on the image boundary data includes: Cutting parameters are determined based on the bone density and fat thickness of the livestock, wherein the cutting parameters include at least cutting speed, tool vibration frequency and tool temperature; Based on the image boundary data, discretization sampling is performed to obtain sampling path points, and based on the sampling path points and the cutting parameters, path planning is performed to obtain the cutting path.
[0012] In one embodiment, before the step of inputting the product image of the agricultural product to be cut into a preset image inference model to obtain the structural boundary data of the agricultural product to be cut, the method further includes: Obtain historical cutting paths and historical boundary data for agricultural products; If the morphological similarity between the agricultural product to be cut and the historical agricultural product is greater than the first similarity threshold, then the historical cutting path is determined as the cutting path of the agricultural product to be cut. If the morphological similarity is greater than the second similarity threshold and the morphological similarity is less than or equal to the first similarity threshold, then the historical boundary data is updated based on the morphological pair of the agricultural product to be cut and the historical agricultural product, and the cutting path is generated based on the updated historical boundary data. If the morphological similarity is less than or equal to the second similarity threshold, then the steps of inputting the product image of the agricultural product to be cut into a preset image reasoning model to obtain the structural boundary data of the agricultural product to be cut, and subsequent steps, are executed.
[0013] Furthermore, to achieve the above objectives, this application also proposes an agricultural product cutting system, which includes: The recognition module is used to input the product image of the agricultural product to be cut into a preset image reasoning model to obtain the structural boundary data of the agricultural product to be cut. The positioning module is used to map the structural boundary data to the product image to obtain image boundary data; The calculation module is used to perform path planning based on the image boundary data to obtain the cutting path, and to control the cutting robot to cut the agricultural product to be cut according to the cutting path.
[0014] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the agricultural product cutting method described above.
[0015] This application inputs the product image of the agricultural product to be cut into a preset image reasoning model to obtain the structural boundary data of the agricultural product to be cut; maps the structural boundary data to the image coordinate system of the product image to obtain image boundary data; performs path planning based on the image boundary data to obtain a cutting path, and controls the cutting robot to cut the agricultural product to be cut according to the cutting path.
[0016] This application obtains structural boundary data through an image reasoning model, obtains image boundary data through coordinate mapping, and then performs path planning and controls the robotic arm to cut based on this. This application can adapt to multiple categories of agricultural products, solving the problem of poor single-category adaptability of existing models. At the same time, through accurate structural boundary recognition and path planning, it improves the cutting accuracy of complex agricultural product structures, especially in areas with blurred edges and messy textures, thereby improving the cutting accuracy of agricultural products and thus improving the product quality, production efficiency and economic benefits of agricultural product cutting. Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating an embodiment of the agricultural product cutting method of this application. Figure 2 This is a flowchart illustrating Embodiment 2 of the agricultural product cutting method of this application; Figure 3 This is a flowchart illustrating Embodiment 3 of the agricultural product cutting method of this application; Figure 4 This is a flowchart illustrating Embodiment 4 of the agricultural product cutting method of this application; Figure 5 A simplified flowchart illustrating an embodiment of the agricultural product cutting method provided in this application; Figure 6 This is a schematic diagram of the structure of an image reasoning model provided in an embodiment of this application; Figure 7 This is a schematic diagram illustrating the effect of the image reasoning model provided in an embodiment of this application in segmenting and reasoning about an orange. Figure 8 This is a schematic diagram illustrating the effect of the image reasoning model provided in an embodiment of this application in segmenting and reasoning about peaches. Figure 9 This is a schematic diagram illustrating the effect of the image reasoning model provided in an embodiment of this application on the segmentation reasoning result of a through-row; Figure 10 This is a schematic diagram of the modular structure of the agricultural product cutting system according to an embodiment of this application; Figure 11 This is a schematic diagram of the equipment structure of the hardware operating environment involved in the agricultural product cutting method in this application embodiment.
[0020] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0021] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0022] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0023] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or agricultural product cutting device capable of performing the above functions. The following description uses an agricultural product cutting device as an example to illustrate this embodiment and the subsequent embodiments.
[0024] Based on this, the embodiments of this application provide a method for cutting agricultural products, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the agricultural product cutting method of this application.
[0025] In this embodiment, the agricultural product cutting method includes steps S10 to S40: Step S10: Input the product image of the agricultural product to be cut into a preset image reasoning model to obtain the structural boundary data of the agricultural product to be cut.
[0026] The product image of the agricultural product to be cut is acquired through image acquisition equipment such as industrial cameras and scanners. It is a digital image containing visual information such as the complete shape, texture, and color of the agricultural product. The image format can be common formats such as JPG and PNG, and there are no restrictions. The preset image reasoning model is trained based on deep learning algorithms, such as convolutional neural networks and Transformers. It can analyze and process the input agricultural product image, identifying the boundaries of various structures in the agricultural product, such as the peel, pit, and pulp of fruits, and the bones and muscles of livestock products. This model has been trained on a large amount of image data of agricultural products of different categories and forms, and has multi-category adaptability. Structural boundary data is used to describe the coordinate information set of the edge contours of each structure of the agricultural product to be cut. It is usually presented in the form of three-dimensional or two-dimensional coordinates, which can accurately reflect the position and shape of each structure in space or image.
[0027] In this embodiment, after acquiring a clear image of the agricultural product to be cut using an image acquisition device, it is input into a pre-trained image inference model. This model extracts and analyzes features such as edge features, texture features, and color features of the image to identify the boundaries of different structures of the agricultural product, and then outputs structural boundary data. This provides crucial structural information support for subsequent coordinate mapping and path planning, which is a prerequisite for achieving precise cutting. Specifically, the process of extracting structural data can be as follows: using an image acquisition device installed at a suitable location on the production line, such as a high-definition industrial camera, to photograph the agricultural product to be cut and acquire product images; preprocessing the acquired product images, such as denoising, scaling, and enhancing contrast, to improve image quality; inputting the preprocessed product images into the preset image inference model, which performs layer-by-layer feature extraction and analysis of the image to identify the boundaries of each structure of the agricultural product; and outputting the structural boundary data of the agricultural product to be cut.
[0028] In this embodiment, the product image is processed by a preset image reasoning model, which can automatically and quickly identify the structural boundaries of agricultural products. Compared with manual identification, this improves the efficiency and accuracy of identification. At the same time, since the model has been trained on multiple categories, it has a certain degree of versatility and can adapt to different types of agricultural products, solving the problem of single-category adaptation of existing models.
[0029] Step S20: Map the structural boundary data to the image coordinate system of the product image to obtain image boundary data.
[0030] An image coordinate system is a two-dimensional coordinate system established to describe the position of pixels in an image. It typically has the top-left corner of the image as the origin, the x-axis pointing horizontally to the right, and the y-axis pointing vertically downwards, with the unit being pixels. Image boundary data is the coordinate information describing the structural boundaries of agricultural products, formed within the image coordinate system after coordinate mapping of the structural boundary data.
[0031] Structural boundary data may be obtained in the feature space or other coordinate systems within the model. To correspond to the pixel positions of the product image and facilitate subsequent path planning based on the image, it needs to be mapped to the image coordinate system. Specifically, the process of determining image boundary data can be as follows: determine the image coordinate system parameters of the product image, such as the origin position, coordinate axis direction, pixel size, etc.; obtain the transformation relationship between the original coordinate system and the image coordinate system corresponding to the structural boundary data, such as translation, rotation, scaling, etc.; according to the transformation relationship, transform each coordinate point in the structural boundary data to the image coordinate system; integrate all the transformed coordinate points to obtain the image boundary data.
[0032] In this embodiment, coordinate mapping ensures that the structural boundary data and the pixel positions of the product image correspond precisely, guaranteeing that subsequent path planning is based on the actual pixel positions of the image and improving the accuracy of path planning. At the same time, a unified coordinate system facilitates the association processing of cutting paths and image information in subsequent steps.
[0033] Step S30: Based on the image boundary data, a path is planned to obtain a cutting path, and the cutting robot is controlled to cut the agricultural product to be cut according to the cutting path.
[0034] The cutting path is obtained through path planning and is the trajectory followed by the cutting robot when performing the cutting operation. It consists of a series of continuous coordinate points. The cutting robot is an automated mechanical device used to perform cutting operations on agricultural products. It can move precisely according to a preset path to complete the cutting action.
[0035] In this embodiment, the target area and the starting and ending points of the cutting are determined based on the image boundary data; considering the constraints such as the movement range, joint limitations, and cutting speed of the cutting robot, a path planning algorithm, such as the A* algorithm or the Dijkstra algorithm, is used to plan the path and obtain the cutting path; the cutting path is converted into control commands that the cutting robot can recognize, such as the movement angle and speed of each joint; the cutting robot is controlled to move according to the control commands to cut the agricultural product to be cut.
[0036] In this embodiment, path planning based on accurate image boundary data ensures that the cutting path follows the structural boundaries of the agricultural product, improving cutting accuracy and avoiding miscutting of useful parts. At the same time, the automated cutting robot performs the cutting operation, improving production efficiency and reducing manual labor intensity.
[0037] In this embodiment, structural boundary data is obtained through an image reasoning model, and image boundary data is obtained through coordinate mapping. Based on this, path planning is performed and the robotic arm is controlled to cut. This method can adapt to multiple types of agricultural products and solves the problem of poor adaptability to a single type in existing models. At the same time, through accurate structural boundary recognition and path planning, the cutting accuracy of complex structures of agricultural products is improved, especially in areas with blurred edges and messy textures, which can achieve relatively accurate cutting. This improves the product quality, production efficiency and economic benefits of agricultural product cutting.
[0038] In one feasible embodiment, before step S10: inputting the product image of the agricultural product to be cut into a preset image inference model to obtain the structural boundary data of the agricultural product to be cut, the method further includes: Step S01: Obtain historical cutting paths and historical boundary data for historical agricultural products.
[0039] Historical agricultural products are those that belong to the same or similar category as the agricultural product to be cut in the past and have already undergone cutting. Historical cutting paths are the trajectory data followed by the cutting robot during the cutting process of historical agricultural products, including a series of coordinate points and motion parameters. Historical boundary data is the coordinate information describing the structural boundaries of historical agricultural products, obtained before cutting through methods such as image recognition.
[0040] In this embodiment, a historical database is established to store relevant information about historical agricultural products, including agricultural product categories, image data, historical boundary data, and historical cutting paths. Based on the category of the agricultural product to be cut, historical cutting paths and historical boundary data of agricultural products belonging to the same or similar categories are retrieved from the historical database. The retrieved data is then filtered and organized to remove invalid or erroneous data, resulting in usable historical cutting paths and historical boundary data. It is understood that acquiring historical data allows for full utilization of past production experience, providing a reference for current cutting processes and helping to improve cutting efficiency and accuracy. Simultaneously, the accumulation of historical data also provides data support for subsequent model optimization.
[0041] Step S02: If the morphological similarity between the agricultural product to be cut and the historical agricultural product is greater than the first similarity threshold, then the historical cutting path is determined as the cutting path of the agricultural product to be cut.
[0042] Morphological similarity is an indicator used to measure the degree of similarity between agricultural products to be cut and historical agricultural products in terms of appearance, such as shape, size, and outline. It is usually represented by a value between 0 and 1, with the closer the value is to 1, the higher the similarity.
[0043] The first similarity threshold is a pre-set critical value used to determine whether the agricultural product to be cut is highly similar in form to historical agricultural products. For example, it can be set to 0.8. The specific value can be adjusted according to the actual situation. When the morphological similarity is greater than this threshold, the two are considered to be highly similar in form.
[0044] When the agricultural product to be cut is highly similar in form to a historical agricultural product, it indicates that their structural features and cutting requirements are also quite similar. In this case, directly using the historical cutting path can save the subsequent model reasoning and path planning steps, improving cutting efficiency. Specifically, the morphological features of the agricultural product to be cut and the historical agricultural product are extracted, such as contour features and size features; appropriate similarity calculation methods, such as cosine similarity and Euclidean distance, are used to calculate the morphological similarity between the two; the calculated morphological similarity is compared with a first similarity threshold; if the morphological similarity is greater than the first similarity threshold, the historical cutting path is directly determined as the cutting path of the agricultural product to be cut.
[0045] Understandably, when the shapes are highly similar, directly using historical cutting paths avoids repeated model reasoning and path planning processes, thus improving the efficiency of cutting. At the same time, since historical cutting paths have been verified in practice, their reliability is high, which can ensure the cutting quality.
[0046] Step S03: If the morphological similarity is greater than the second similarity threshold and the morphological similarity is less than or equal to the first similarity threshold, then update the historical boundary data based on the morphological pair of the agricultural product to be cut and the historical agricultural product, and generate the cutting path based on the updated historical boundary data.
[0047] The second similarity threshold is another pre-set critical value used to judge the degree of morphological similarity between the agricultural product to be cut and the historical agricultural product. This threshold is less than the first similarity threshold. When the morphological similarity is between the second threshold and the first threshold, it is considered that the two have a certain degree of morphological similarity, but there are certain differences.
[0048] When the agricultural product to be cut has some similarity to, but not exactly the same as, historical agricultural products, directly using historical cutting paths may lead to accuracy issues, while re-executing model inference increases costs. Therefore, by analyzing the morphological differences between the agricultural product to be cut and historical agricultural products, updating historical boundary data, and then generating cutting paths based on the updated data, we can both utilize historical data and adapt to morphological differences. Specifically, we calculate the morphological similarity between the agricultural product to be cut and historical agricultural products and determine that it falls between the second similarity threshold and the first similarity threshold; we analyze the morphological differences between the two, such as shape differences, size differences, etc.; based on the morphological differences, we adjust and update the historical boundary data, such as translating, scaling, and deforming the boundary coordinates, so that the updated historical boundary data better matches the morphology of the agricultural product to be cut; based on the updated historical boundary data, we use path planning methods to generate cutting paths.
[0049] Understandably, by updating historical boundary data, the generated cutting path can adapt to the morphological differences between the agricultural products to be cut and historical agricultural products, thus ensuring cutting accuracy. At the same time, compared with completely re-executing model inference, it saves computing resources and time, and improves processing efficiency.
[0050] Step S04: If the morphological similarity is less than or equal to the second similarity threshold, then the step of inputting the product image of the agricultural product to be cut into the preset image reasoning model to obtain the structural boundary data of the agricultural product to be cut, and subsequent steps, are executed.
[0051] When the morphological similarity between the agricultural product to be cut and historical agricultural products is low, it indicates a significant difference in their structural features, making historical data less valuable. In this case, an image inference model is used to obtain accurate structural boundary data before further processing. This low similarity handling method ensures accurate cutting even with significant morphological differences. Specifically, if the morphological similarity between the agricultural product to be cut and historical agricultural products is determined to be less than or equal to a second similarity threshold, the product image of the agricultural product to be cut is input into a preset image inference model to obtain structural boundary data. This structural boundary data is then mapped to an image coordinate system to obtain image boundary data. Finally, path planning is performed based on the image boundary data, and the cutting robot is controlled to perform the cutting.
[0052] In this embodiment, when there are significant differences in shape, an image reasoning model is used to obtain structural boundary data. This ensures that the obtained boundary data accurately reflects the actual shape of the agricultural product to be cut, thereby ensuring the rationality of the subsequent cutting path and the cutting accuracy, and avoiding cutting failure due to over-reliance on historical data.
[0053] Understandably, by judging the morphological similarity between the agricultural product to be cut and historical agricultural products, different processing methods are adopted depending on the situation: when the similarity is high, the historical cutting path is used directly to improve efficiency; when the similarity is medium, the historical boundary data is updated to generate the cutting path, balancing efficiency and accuracy; when the similarity is low, the original cutting steps are executed to ensure accuracy. This embodiment utilizes historical production data to further improve the adaptability and efficiency of the cutting method, while ensuring high cutting accuracy. It solves the problem of low cutting accuracy caused by the diversity of agricultural product morphology and structural complexity, and significantly improves the overall performance and economic benefits of agricultural product cutting.
[0054] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. In this regard, the agricultural product to be cut is peeled citrus fruit; please refer to... Figure 2 Step S10: Input the product image of the agricultural product to be cut into a preset image reasoning model to obtain the structural boundary data of the agricultural product to be cut, and further includes steps S101~S102: Step S101: Input the product image of the citrus fruit into a preset image reasoning model to obtain a multi-label mask image and the center of the whole fruit, wherein each label of the multi-label mask image is used to identify different fruit segments.
[0055] Peeled citrus fruits, such as oranges, tangerines, and grapefruits, are fruits that have undergone peeling. They contain multiple interconnected segments. A multi-labeled mask is image data that labels different regions within an image, with each label corresponding to an individual segment of the citrus fruit. These segments are distinguished by different pixel values or colors, clearly showing their outlines. The center of the whole fruit is the coordinate point of the geometric center of the citrus fruit, a key reference point describing the overall spatial position of the fruit. It is typically determined using image analysis algorithms, such as centroid calculation.
[0056] Segments are the lobed structures inside citrus fruits separated by thin membranes. They are the main objects to be cut and processed, and each segment has a relatively independent outline and position.
[0057] Because peeled citrus fruits have a distinct multi-segment structure, a pre-set image inference model can accurately output a multi-label mask and the center of the whole fruit. The multi-label mask enables individual identification of different segments, and the center of the whole fruit provides a reference for subsequent coordinate positioning. Specifically, product images of peeled citrus fruits are captured using an image acquisition device, ensuring that the images clearly present the segment distribution and overall shape. The images are pre-processed, such as removing reflections and adjusting white balance, to adapt to the color characteristics of citrus fruits. The pre-processed images are input into the pre-set image inference model. The model extracts features, such as differences in texture between segments and edge contours, to generate a multi-label mask. Each segment in the multi-label mask corresponds to a unique label, and the center of the whole fruit is obtained by calculating the centroid coordinates of the fruit's pixel distribution. The multi-label mask and the center of the whole fruit are then output.
[0058] In this embodiment, the optimized model for the special structure of citrus fruits improves the accuracy of multi-segment recognition. The multi-label mask image can accurately distinguish each segment, avoiding confusion between segments. The determination of the whole fruit center provides a unified benchmark for subsequent coordinate positioning, solving the positioning deviation problem caused by the irregular shape of citrus fruits, and laying a precise structural foundation for subsequent cutting path planning.
[0059] Step S102: The region boundaries between the mask map regions corresponding to different labels in the multi-label mask map and the center of the whole fruit are determined as the structural boundary data of the citrus fruit.
[0060] The region boundary is the dividing line between fruit segment regions identified by different labels in a multi-label mask image. It is the edge outline that distinguishes adjacent fruit segments and is composed of a series of continuous coordinate points. The region boundary reflects the dividing line between adjacent fruit segments and is the critical path that needs to be followed during cutting. The whole fruit center, as part of the structural boundary data, provides a coordinate reference for the starting point or reference point of the cutting path.
[0061] In this embodiment, edge detection processing is performed on the multi-label mask image to extract the boundary lines between different label regions, i.e., the region boundaries, and the coordinates of all pixels on the boundary are recorded; the coordinates of the whole fruit center are integrated with the coordinates of the region boundaries; and the integrated region boundary coordinates and the coordinates of the whole fruit center are jointly determined as the structural boundary data of citrus fruits.
[0062] In this embodiment, the regional boundary and the center of the whole fruit are explicitly used as structural boundary data. This captures the dividing boundary between segments and the overall center position of citrus fruits, providing direct cutting reference lines and positioning benchmarks for subsequent path planning. This ensures that the cutting path can be carried out along the gaps between segments, reducing damage to the segments and pulp, and improving the integrity and aesthetics of citrus fruit cutting.
[0063] In this embodiment, for peeled citrus fruits, a multi-label mask image and the whole fruit center are obtained through an optimized image reasoning model, and the region boundaries and the whole fruit center are determined as structural boundary data. This embodiment fully utilizes the multi-segment structure characteristics of citrus fruits to achieve accurate segment identification and boundary positioning, solving the problem of low cutting accuracy caused by dense segments and blurred edges in citrus fruits. The introduction of the whole fruit center provides a unified positioning benchmark for the cutting path, improving the consistency and accuracy of path planning, and ultimately improving the efficiency of citrus fruit cutting and product quality.
[0064] In one feasible embodiment, step S30: the step of obtaining a cutting path based on the image boundary data through path planning, includes: Step S301: Establish a polar coordinate system with the center of the whole fruit as the origin, and extract a continuous edge point set based on the image boundary data in the polar coordinate system.
[0065] The polar coordinate system is a coordinate system with the center of the whole fruit as the pole and the horizontal direction to the right as the positive polar axis. It describes the position of a point through the polar radius (i.e., the distance from the point to the origin) and the polar angle (i.e., the angle between the line connecting the point to the origin and the polar axis). In the polar coordinate system, the position of edge points can be intuitively reflected by the polar angle, which can facilitate the extraction of the gap angle between fruit segments. A continuous edge point set is a set of consecutive pixels arranged in sequence on the boundary of a region in the image boundary data. The points of the continuous edge point set together constitute the complete edge contour between fruit segments.
[0066] Specifically, a polar coordinate system is established with the center of the whole fruit as the origin and the horizontal direction to the right as the positive polar axis. The region boundary coordinates in the rectangular coordinate system of the image boundary data are converted to coordinates in the polar coordinate system. Along the contour of the region boundary, all pixels are extracted sequentially in a clockwise or counterclockwise direction to form a continuous edge point set, ensuring that the points in the point set are distributed sequentially and continuously on the region boundary. In this embodiment, the establishment of the polar coordinate system is adapted to the radial distribution characteristics of citrus fruit segments, making the positional relationship of edge points more intuitive and facilitating the analysis of the distribution pattern of fruit segments in the circumferential direction. The extraction of the continuous edge point set ensures the integrity of the edge contour, avoids angle calculation errors caused by the breakage of the point set, and provides a complete data foundation for the accurate calculation of the intersegment gap angle.
[0067] Step S302: Traverse each edge point in the edge point set and calculate the polar angle corresponding to the edge point based on the position of the edge point in the polar coordinate system.
[0068] The polar angle is the angle between the line connecting the edge point and the origin (i.e., the center of the whole result) and the polar axis (i.e., horizontal to the right) in a polar coordinate system, and is measured in degrees or radians.
[0069] Traverse the set of edge points, calculate the polar angle of each point, and convert the position information of the edge points into angle information. Specifically, select the first edge point from the set of continuous edge points; calculate the angle between the point and the polar axis using the arctangent function based on the polar radius and rectangular coordinates (x, y) of the point in the polar coordinate system; repeat the above polar angle calculation process for each point in the set of edge points in sequence; record the polar angle value corresponding to each edge point.
[0070] In this embodiment, the calculation of the polar angle quantifies the spatial position of the edge point into an angle parameter, so that the distribution pattern of the fruit segments in the circumferential direction can be intuitively reflected through the angle change, which facilitates the subsequent identification of the gap angle between adjacent fruit segments. This solves the problem that the gap position is difficult to quantify due to the irregular shape of citrus fruits and improves the accuracy of the cutting angle determination.
[0071] Step S303: Arrange the edge points in the edge point set in ascending order of the polar angle, and determine the angle difference of the polar angles of adjacent edge points as the interlobe gap angle.
[0072] The interval angle is the angular interval between two adjacent fruit segments. It is the difference in polar angle between adjacent edge points after the polar angles are arranged in ascending order, reflecting the size of the interval between the two fruit segments in the circumferential direction.
[0073] In this embodiment, edge points are arranged in an orderly manner along the circumference by polar angle sorting, and then the polar angle difference between adjacent points is calculated to obtain the inter-segment gap angle. The inter-segment gap angle is the natural separation angle between fruit segments and is the optimal angle that the cutting path should follow. Specifically, the polar angle values of all edge points in the edge point set are compared, and the edge points are rearranged in ascending order; the polar angle difference between two adjacent edge points after sorting (that is, the polar angle of the later point minus the polar angle of the earlier point) is calculated, and this angle difference is determined as the inter-segment gap angle. If the difference is negative, 360 degrees is added for correction.
[0074] In this embodiment, the ascending polar angle arrangement ensures that the edge points are distributed in an orderly manner along the circumference, guaranteeing that the polar angle difference between adjacent points can accurately reflect the gap angle between fruit segments. The determination of the gap angle between segments accurately captures the natural separation position between fruit segments, providing the optimal angle parameters for cutting path planning, ensuring that cutting can be carried out along the gap between fruit segments, avoiding damage to the fruit segments and pulp, and improving the integrity and efficiency of citrus fruit cutting.
[0075] Step S304: Determine the path based on the image boundary data, and plan the path using the interlobe gap angle as the cutting angle to obtain the cutting path.
[0076] The cutting angle is the angle between the direction of the tool movement and the polar axis when the cutting robot performs a cutting operation. Here, it specifically refers to the angle parameter with the inter-segment gap angle as the cutting direction.
[0077] In this embodiment, a cutting path is generated based on image boundary data and the inter-segment gap angle. The image boundary data provides the spatial range for cutting, while the inter-segment gap angle provides the directional angle for cutting. The combination of these two ensures that the cutting path follows the boundary between the fruit segments and conforms to the optimal cutting angle. Specifically, based on the region boundary in the image boundary data, the cutting path is determined to follow the region boundary between the fruit segments. Starting from the center of the whole fruit, the cutting trajectory for each inter-segment gap is planned according to the angle direction determined by the inter-segment gap angle and the cutting depth requirement, such as from the inside of the peel to the top of the segment. The cutting trajectories of all inter-segment gaps are connected to form a complete cutting path, ensuring that the path is continuous and covers all fruit segment gaps. The coordinate sequence of the cutting path is then output.
[0078] In this embodiment, the cutting angle is taken as the gap angle between the segments to ensure that the cutting direction is consistent with the natural separation direction of the segments, thereby reducing cutting resistance and minimizing damage to the fruit pulp. The path is planned based on the image boundary data to ensure that the cutting trajectory strictly follows the boundary between the segments, avoiding accidental cutting of the segments. This significantly improves the accuracy of citrus fruit cutting and product quality, while also increasing cutting efficiency and reducing tool wear.
[0079] In this embodiment, targeting the radial segment structure of citrus fruits, a polar coordinate system is established, edge point sets are extracted, and polar angles and intersegment gap angles are calculated. Finally, the intersegment gap angle is used as the cutting angle to plan the cutting path. This embodiment fully utilizes the morphological characteristics of citrus fruits, combining the polar coordinate system with the segment gap angle. This ensures that the cutting path follows the natural boundaries of the segments while conforming to the optimal cutting direction, solving the problem of segment damage caused by angle deviations in traditional path planning. Simultaneously, automated path planning improves cutting efficiency, ensuring precise separation of each segment and significantly enhancing the product quality and economic benefits of deep-processed citrus fruits.
[0080] Based on the first and / or second embodiments of this application, in the third embodiment of this application, the content that is the same as or similar to the first and / or second embodiments described above can be referred to the above description and will not be repeated hereafter. In this context, the agricultural product to be cut is a stone fruit; please refer to... Figure 3 Step S10: The step of inputting the product image of the agricultural product to be cut into a preset image reasoning model to obtain the structural boundary data of the agricultural product to be cut includes: Step S103: Input the product image of the stone fruit into a preset product model to obtain the seed detection frame parameters and rotation center coordinates of the stone fruit. The seed detection frame parameters include the seed width, seed height and seed center coordinates.
[0081] Stone fruits are a class of fruits with a hard pit in the center, such as peaches, plums, cherries, and mangoes. Their structure typically consists of an exocarp, a mesocarp (edible part), and an endocarp (pit). The pit detection box parameters are a set of parameters describing the position and size of the pit in the image. The pit width is the horizontal length of the detection box, the pit height is the vertical length of the detection box, and the pit center coordinates are the coordinates of the geometric center of the detection box in the image coordinate system. The rotation center coordinates are the reference point coordinates for rotational positioning during the cutting process of stone fruits. They are usually located on the fruit's axis of symmetry to ensure the adaptability of the cutting trajectory to the fruit's shape.
[0082] In this embodiment, a complete product image of the stone fruit is captured using an image acquisition device to ensure that the pit area is clearly visible. The image is preprocessed to remove glare from the peel and enhance the contrast between the pit and the flesh. The preprocessed image is then input into a preset product model. The model identifies the pit area through feature extraction, such as the elliptical shape and density difference of the pit, and outputs pit detection box parameters, including width, height, center coordinates, and rotation center coordinates. The output parameters are verified, such as whether the detection box completely surrounds the pit, to ensure data accuracy.
[0083] In this embodiment, the specialized model improves the accuracy of pit identification for drupes, especially when the pit and flesh are similar in color. The pit detection frame parameters fully describe the spatial morphology of the pit, and the rotation center coordinates provide a reference for positioning during cutting, solving the problem of pit positioning deviation caused by the irregular shape of drupes, and laying a data foundation for subsequent pit-avoidance cutting.
[0084] Step S104: Determine the fruit pit detection frame parameters and the rotation center as structural boundary data.
[0085] Structural boundary data is a set of key parameters used to define the cutting boundary of stone fruits, specifically referring to the morphological parameters and rotational reference of the pit, which are used to constrain the cutting path from touching the pit.
[0086] The pit detection box parameters and rotation center are integrated into structural boundary data. The pit detection box parameters define the core area to be avoided, while the rotation center ensures that the cutting trajectory always matches the pit position as the fruit rotates. This transforms the image recognition results into constraint parameters that can be directly used for path planning, connecting the image recognition and cutting execution stages. Specifically, the pit detection box parameters and rotation center coordinates are standardized in format; the spatial relationship between the rotation center and the pit center is confirmed through a data association algorithm, such as confirming whether they are on the same straight line; the integrated parameter set is determined as the structural boundary data for stone fruits and stored in a format readable by the path planning module.
[0087] In this embodiment, the kernel parameters and rotation center are explicitly used as structural boundary data, which accurately captures the spatial range and rotation reference of the kernel as the cutting constraints of stone fruits. This ensures that subsequent path planning always takes avoiding the kernel as the core objective, reduces fruit pulp waste, and improves the integrity of the product after cutting.
[0088] In this embodiment, based on the structural characteristics of stone fruits, the parameters of the pit detection frame and the coordinates of the rotation center are extracted as structural boundary data using a dedicated model. This embodiment solves the problem of difficult positioning of stone fruits caused by the hidden pit and the blurred boundary with the pulp, achieving accurate identification and parameterized description of the pit. The introduction of the rotation center ensures the positioning stability when the fruit posture changes during cutting, providing reliable constraints for subsequent cutting path planning, ultimately improving the accuracy of stone fruit cutting and product quality.
[0089] In one feasible embodiment, step S30: the step of obtaining a cutting path based on the image boundary data through path planning, includes: Step S305: Determine the tilt angle based on the width and height of the fruit pit, and generate a spiral cutting trajectory with the rotation center coordinates as the reference point and the tilt angle as the cutting angle.
[0090] The tilt angle is the angle between the cutting direction and the horizontal line, calculated based on the width-to-height ratio of the pit. It is used to adapt to the elliptical shape of the pit, ensuring that the cutting trajectory follows the tangential direction of the pit's edge. The spiral cutting trajectory is a cutting path that advances spirally along the tilt angle, with the center of rotation as the reference point. Its characteristic is that the trajectory is continuous and gradually penetrates into the flesh, avoiding impact on the pit. The cutting angle is the angle between the blade direction when the cutting tool initially contacts the flesh and the horizontal line, determined by the tilt angle.
[0091] In this embodiment, the ratio of the width to the height of the pit is calculated. If the width is greater than the height, the tilt angle is the angle corresponding to the arctangent; otherwise, the tilt angle is 90 degrees minus this angle. Starting from the coordinates of the rotation center, the initial radius and pitch of the spiral trajectory (i.e., the axial distance of each revolution, set according to the thickness of the pulp) are set. Using the tilt angle as the cutting angle, a continuous sequence of coordinate points is generated along the spiral line to form a spiral cutting trajectory. The trajectory is smoothed, such as removing abrupt changes, to ensure smooth tool movement.
[0092] Understandably, the determined tilt angle ensures that the cutting direction conforms to the elliptical outline of the pit, preventing the blade from directly impacting the pit; the spiral trajectory enables a gradual cut from the outside in, reducing tearing and compression of the flesh and protecting its integrity; using the rotation center as a reference ensures the synchronization of the trajectory with the fruit's rotation, solving the problem of trajectory deviation caused by the irregular shape of the drupe and improving the stability of the cut.
[0093] Step S306: A cutting protection area is generated with the center of the fruit pit as the center, and a cutting path is generated based on the cutting protection area and the spiral downward cutting trajectory.
[0094] The cutting protection zone is a circular area defined by the center of the fruit pit, with the maximum radius of the fruit pit (half the width or height of the fruit pit) plus a safety margin (such as 2 mm). It is used to restrict the cutting path from entering this area to avoid damaging the fruit pit or leaving fruit pit fragments.
[0095] Calculate the maximum radius of the pit based on the pit detection frame parameters (specifically, the larger of the width and height can be taken), and add a safety margin to obtain the radius of the protected area; generate a circular cutting protected area with the center coordinates of the pit as the center; check whether the spiral cutting trajectory intersects with the protected area, and if so, adjust the trajectory radius by offsetting it outward by the safety margin; connect the adjusted spiral trajectory with the tangent of the fruit's outer contour to form a complete cutting path, specifically cutting from the outside of the peel, along the spiral trajectory to the inside of the flesh, avoiding the protected area.
[0096] In this embodiment, the setting of the cutting protection area strictly limits the cutting range in space, completely avoiding the risk of the knife touching the fruit pit; the spiral trajectory optimized based on the protection area maximizes the preservation of edible pulp while ensuring pit avoidance, reducing waste; the complete cutting path realizes continuous cutting from the outside to the inside, improving cutting efficiency and product consistency.
[0097] In this embodiment, for the cutting needs of stone fruits, the tilt angle and spiral cutting trajectory are determined by the parameters of the fruit pit, and the final path is generated by combining the cutting protection area. This embodiment solves the problems of poor trajectory adaptability, easy damage to the pit or waste of fruit pulp caused by the irregular shape of the pit in the cutting of stone fruits; the combination of spiral trajectory and protection area achieves the dual goals of precise pit avoidance and efficient cutting, significantly improving the automation level, product quality and economic benefits of stone fruit cutting.
[0098] Based on the first, second, and / or third embodiments of this application, in this fourth embodiment, the content that is the same as or similar to the first, second, and / or third embodiments described above can be referred to the above description and will not be repeated hereafter. In this context, the agricultural product to be cut is livestock; please refer to... Figure 4 Step S10: The step of inputting the product image of the agricultural product to be cut into a preset image reasoning model to obtain the structural boundary data of the agricultural product to be cut includes: Step S105: Input the product image of the agricultural product to be cut into the preset image inference model to obtain the fusion segmentation mask, and extract the structural position coordinates from the fusion segmentation mask, wherein the structural position coordinates include at least the wing bone edge point set, the neck bone edge point set, and the skirt boundary point set.
[0099] Livestock refers to domesticated mammals such as pigs, cattle, sheep, chickens, and ducks. Here, it specifically refers to livestock or poultry products that require segmentation. The fused segmentation mask is a mask image obtained after segmenting livestock product images using an image inference model. It integrates segmentation results from various structural features, such as bones, muscles, fat, and connective tissue, clearly distinguishing the boundaries of different tissues. Structural position coordinates describe the positional information of specific structures within the livestock, such as bone edges and tissue boundaries, in the image coordinate system, consisting of a series of continuous coordinate points. The wingbone edge point set is the set of all coordinate points that constitute the wingbone edge contour of livestock, such as chickens and ducks, reflecting the direction and shape of the wingbone. The neck bone edge point set is the set of all coordinate points that constitute the neck bone edge contour of livestock, used to locate the neck bones. The skirt boundary point set is the set of coordinate points describing the contours of the skirt tissues in the abdomen or trunk of livestock, such as the boundary between the fat layer and muscle layer, and the boundaries of connective tissue.
[0100] To address the complex structure and diverse tissue types of livestock, a pre-defined image inference model generates a fusion segmentation mask, enabling accurate identification of key structures. The wing bone, neck bone edge point sets, and skirt boundary point sets extracted from the mask provide raw coordinate information for subsequent curve fitting and boundary data determination, a prerequisite for precise cutting. Specifically, a high-precision industrial camera (equipped with a multi-angle shooting device) acquires product images of the livestock to be cut, ensuring the image fully represents the structure of the area to be cut. The image is pre-processed, including removing bloodstains, adjusting brightness and contrast, and reducing noise to highlight the boundary features between bones and soft tissues. The pre-processed image is input into the pre-defined image inference model, which generates a fusion segmentation mask using a multi-scale feature fusion algorithm to distinguish between bone, muscle, and fat tissues. Then, an edge detection algorithm extracts the wing bone edge point sets, neck bone edge point sets, and skirt boundary point sets from the fusion segmentation mask, recording the coordinate values of each point. The extracted point sets are then denoised and filtered to remove falsely detected discrete points and retain continuous edge points.
[0101] In this embodiment, the fusion segmentation mask integrates multiple structural features, improving the recognition accuracy of complex tissue boundaries, especially in areas where the colors of bones and soft tissues are similar and the edges are blurred, it can still accurately distinguish them; the extracted key structural point set completely reflects the shape and position of the target structure, providing high-quality raw data for subsequent curve fitting, and solving the problem of difficult location of key parts in livestock due to their complex structure.
[0102] Step S106: A first curve is obtained by fitting the wing bone edge point set and the skirt boundary point set based on the curve fitting algorithm, and a second curve is obtained by fitting the cervical bone edge point set and the skirt boundary point set based on the curve fitting algorithm.
[0103] Curve fitting algorithms construct a smooth curve using mathematical methods to approximate a given discrete set of points as closely as possible. Common algorithms include least squares, Bézier curve fitting, and B-spline curve fitting. This embodiment transforms a discrete set of edge points into a continuous curve. The first curve is a continuous curve obtained by fitting the wing bone edge point set and the skirt boundary point set, reflecting the boundary contour between the wing bone and the skirt tissue, and serving as a reference boundary for cutting near the wing bone. The second curve is a continuous curve obtained by fitting the neck bone edge point set and the skirt boundary point set, reflecting the boundary contour between the neck bone and the skirt tissue, and serving as a reference boundary for neck cutting.
[0104] For the extracted discrete point set, a curve fitting algorithm is used to generate a continuous curve, eliminating noise and fluctuations in the discrete points, making the structural boundaries smoother and more consistent with actual anatomical morphology. The first and second curves correspond to the boundaries of the wing bones, neck bones, and skirt tissues, respectively, which are key boundaries to be followed during cutting, providing an intuitive and continuous curve description for determining the structural boundary data. Specifically, the wing bone edge point set and the skirt boundary point set are used as input data, and the parameters of the first curve, such as control point coordinates and curve order, are calculated using the curve fitting algorithm. Using the same algorithm, the parameters of the second curve are fitted using the neck bone edge point set and the skirt boundary point set as input. The fitted curves are verified by calculating the average distance between the curve and the original point set. If the distance exceeds a preset threshold, the fitting parameters are readjusted to ensure the fit between the curve and the original point set.
[0105] In this embodiment, curve fitting transforms discrete point sets into continuous curves, eliminating point set fluctuations caused by image noise and making structural boundaries smoother and more consistent with actual anatomical structures. The first and second curves accurately capture the boundary between bone and fascia tissue, providing clear reference boundaries for cutting path planning and improving the accuracy and consistency of cutting boundaries.
[0106] Step S107: Determine the first curve and the second curve as the structural boundary data.
[0107] Structural boundary data describes continuous curve data of key structural boundaries that must be followed during livestock cutting. Specifically, this refers to the first and second curves, which constrain the cutting path along the boundary between bone and soft tissue. The parameters of the first and second curves, such as control point coordinates and curve equations, are converted into a standardized data format in an image coordinate system. A coordinate association algorithm is used to confirm the spatial relationship between the two curves, such as whether they intersect or overlap. Finally, the data from the two curves are integrated into structural boundary data.
[0108] In this embodiment, the first curve and the second curve are defined as structural boundary data, which accurately defines the key boundaries of the cutting and ensures that the cutting path always runs along the boundary between the bone and soft tissue. This avoids accidental cutting of the bone, which could damage the tool or leave too much bone residue that could affect product quality. At the same time, the continuous curve data makes it easy for the path planning algorithm to call directly, which improves the efficiency of subsequent path planning.
[0109] In this embodiment, considering the complex structure of livestock, a fusion segmentation mask is generated using an image reasoning model. Key structural point sets are extracted and fitted as continuous curves as structural boundary data. This embodiment solves the problem of difficult structural identification in livestock due to the diverse tissue types and blurred boundaries between bones and soft tissues. It achieves precise positioning of the boundaries of key parts such as wing bones and neck bones. The continuous curve form of structural boundary data provides a clear and consistent reference for subsequent path planning, ensuring that the cutting path follows the optimal boundary, thus improving the accuracy of livestock cutting, product quality, and production efficiency.
[0110] In one feasible embodiment, step S30: the step of obtaining a cutting path based on the image boundary data through path planning, includes: Step S307: Determine cutting parameters based on the bone density and fat thickness of the livestock, wherein the cutting parameters include at least cutting speed, tool vibration frequency and tool temperature.
[0111] Bone density is the mass of livestock bones per unit volume, reflecting the hardness of the bones. Higher bone density means harder bones, requiring more energy to cut. Fat thickness is the thickness of the subcutaneous or intermuscular fat layer in livestock. Fat tissue is soft, and its cutting resistance differs from that of muscle and bone, affecting the selection of cutting parameters. Cutting parameters are a set of parameters that control the working state of the cutting robot, used to adapt to the cutting needs of different tissues. Cutting speed is the linear velocity of the cutting tool along the cutting path, usually measured in millimeters per second. Areas with high bone density and thin fat require lower speeds to ensure thorough cutting. Tool vibration frequency is the number of vibrations per second of the cutting tool (such as a vibratory cutter), measured in Hertz (Hz). Higher frequencies are suitable for cutting tough connective tissue, while lower frequencies are better for avoiding bone fragmentation. Tool temperature is the operating temperature of the cutting tool. Appropriate heating of areas with high fat content can reduce the viscosity of the fat and decrease cutting resistance.
[0112] In this embodiment, bone density is estimated from the product image using image analysis algorithms, such as based on the grayscale value of the skeletal region; the higher the grayscale value, the greater the bone density. Fat thickness is also estimated from the product image using image analysis algorithms, such as measuring the pixel width of the fat layer region and converting it to the actual thickness. A mapping table between cutting parameters and bone density and fat thickness is established, which can be obtained by fitting a large amount of experimental data. For example, when bone density is greater than a certain threshold, the cutting speed is reduced by 20%, and the vibration frequency is increased by 10%. Based on the bone density and fat thickness of the current part to be cut, the mapping table is consulted to determine the initial cutting parameters. The initial parameters are then fine-tuned, such as considering the transition region between adjacent tissues and using gradual parameter changes to obtain the final cutting parameters.
[0113] In this embodiment, the cutting parameters are dynamically adjusted based on bone density and fat thickness, so that the cutting process can adapt to the physical characteristics of different tissues. This avoids the uneven cuts caused by using fixed parameters, such as incomplete cutting at the bone and over-cutting at the fat. At the same time, the optimized parameters reduce the violent collision between the tool and the bone, reduce tool wear, and extend the service life.
[0114] Step S308: Discretize the image boundary data to obtain sampling path points, and perform path planning based on the sampling path points and the cutting parameters to obtain the cutting path.
[0115] Sampling path points are discrete coordinate points distributed on the image boundary data, obtained through discretization sampling, and are used to transform continuous curves into executable discrete trajectory points.
[0116] In this embodiment, continuous image boundary data is transformed into discrete sampling path points, enabling the path planning algorithm to perform calculations based on specific coordinate points. Simultaneously, combined with determined cutting parameters, dynamic adjustment information such as speed and vibration frequency is incorporated into the path planning to generate a cutting path that both follows the boundary and adapts to tissue characteristics. Specifically, the image boundary data is discretized and sampled, with sampling path points extracted at preset intervals, and the coordinates of each point recorded. Based on the tissue characteristics of each sampling path point's location, such as density and fat thickness, corresponding cutting parameters are assigned to each point; for example, a point located at a bone edge may have a lower cutting speed and a higher vibration frequency. A path smoothing algorithm is used to connect the sampling path points, ensuring a smooth transition between adjacent points, while incorporating changes in cutting parameters into the trajectory, such as using a gradual transition at parameter changes. A cutting path containing a sequence of coordinate points and corresponding cutting parameters is generated and output to the control system of the cutting robot.
[0117] In this embodiment, discretization sampling transforms continuous curves into executable path points, facilitating the cutting robot to execute trajectories point by point. Combined with path planning based on cutting parameters, the cutting process is not only precise in position but also dynamically adjusts the tool state according to the organizational characteristics of each point, ensuring consistent cut quality throughout the entire cutting path. Smooth path transitions reduce the impact of the robot's movement and improve the stability of the cutting process.
[0118] In this embodiment, considering the significant differences in the characteristics of livestock tissues, cutting parameters are determined by bone density and fat thickness, and path planning is performed by combining sampling points from image boundary data. This embodiment solves the problems of inconsistent cutting quality and high tool wear caused by different tissue physical characteristics in livestock cutting. The combination of dynamically adjusted cutting parameters and precise boundary sampling points ensures that the cutting path follows the optimal structural boundary while adapting to the cutting needs of different tissues, significantly improving the automation level, product quality, and economic efficiency of livestock cutting, while also extending tool life.
[0119] For example, to help understand the implementation process of the agricultural product cutting method obtained in this embodiment combined with the above embodiment one, please refer to... Figure 5 , Figure 5 A simplified flowchart of a method for cutting agricultural products is provided, specifically: The product image of the agricultural product to be cut is acquired by a camera; the image is then input into the image reasoning model in the model recognition module, which outputs the structural boundary data of the agricultural product to be cut. For details, please refer to... Figure 6In this embodiment, the image reasoning model structure may include: a multi-channel input module, a feature extraction module, a semantic segmentation module, and a structure recognition module. The specific model processing procedure based on the image reasoning model structure may involve inputting a product image into the multi-channel input module, which then inputs the product image into the feature extraction module. In the feature extraction module, a multi-task convolutional neural network is used to perform deep feature extraction on the image, enhancing the ability to recognize regions with blurred edges and complex structures. The features extracted by the feature extraction module are input into the semantic segmentation module to segment the agricultural product structure, such as accurately segmenting structural regions like fruit segments and seeds. The results from the semantic segmentation module are input into the structure recognition module, which, based on a multi-task learning framework, performs structural segmentation on the input image. The system segments the structure and outputs the target objects. For example, for fruits, it outputs fruit segments and pits; for the fore-and-aft sections of pigs, it outputs multi-label mask images of the fore-and-aft regions such as wing bones and neck bones. The structural boundary data is input into the cutting trajectory calculation module. In the cutting trajectory calculation module, the structural boundary data is mapped to the image coordinate system of the product image to obtain image boundary data. Based on the image boundary data, path planning is performed to obtain the cutting path. During the path planning process, the cutting starting point, path trajectory, and angle parameters are automatically calculated based on the structural recognition results, and multi-objective optimization is performed, such as minimizing the fruit pulp damage rate and maximizing the cutting efficiency. The cutting path is then sent to the motion execution mechanism for execution, that is, controlling the cutting robot to cut the agricultural product to be cut according to the cutting path.
[0120] For example, in the canned mandarin orange processing industry, segmentation of mandarin oranges heavily relies on manual labor or purely mechanical equipment. Due to the influence of production location and season, mandarin oranges from different regions and at different times vary, causing traditional image algorithms to be inconsistent in their processing. This results in unstable segmentation quality, high rates of breakage and damage, and significant losses per ton. In this embodiment, the mandarin orange cutting process can be as follows: using an area scan camera, an image of the whole mandarin orange after removing the peel is obtained; using an image inference model, the gaps between the segments and the center of the whole mandarin orange are extracted; the inference result is mapped back to the original image; the effect of the inference result can be seen in [reference needed]. Figure 7 , Figure 7 The diagram shows the segmentation lines of the orange and the center of the whole orange. The coordinates are output uniformly to obtain the cutting angle and path between each segment. The data is transmitted to the robotic arm and the cutting action is executed.
[0121] For example, in the peach canning process, the quality of the pitting process directly determines the fruit pulp loss rate per ton. Traditional manual pitting is inefficient, and the fixed motion of a robotic arm results in a large amount of fruit pulp remaining on the pit, leading to high loss per ton. In this embodiment, the peach cutting process can be as follows: An image of the peach after being cut in half is obtained using an area scan camera; an image inference model is used to extract the width, height, center, and rotation center of the pit; the inference result is mapped back to the original image. The effect of the inference result can be seen in [reference needed]. Figure 8 , Figure 8The boundary of the peach pit and the rotation center of the mechanism are shown. The coordinates are output in a unified manner to obtain the position and angle at which the cutter needs to be made. The data is transmitted and guided to the robot arm to perform the pit-digging action.
[0122] For example, completely separating the pork ribs from the meat saves labor, increases cutting stability, and maximizes the economic value of the whole pig. In this embodiment, the cutting process of pork ribs can be as follows: using 2D and 3D cameras to output 2D images and point cloud data; locating the wing bones, neck bones, and skirt edges using an image inference model; the effect of the inference results can be found in [reference needed]. Figure 9 , Figure 9 The model inference results shown include loin (i.e., pork loin meat) with a confidence level of 0.74 and front (i.e., pork forequarter meat) with a confidence level of 0.90; the cutting position and cutting path are calculated by combining 3D data; the data is transmitted and guides the robotic arm to perform the segmentation action.
[0123] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the agricultural product cutting method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0124] This application also provides an agricultural product cutting system; please refer to [reference needed]. Figure 10 The agricultural product cutting system includes: The recognition module 10 is used to input the product image of the agricultural product to be cut into a preset image reasoning model to obtain the structural boundary data of the agricultural product to be cut. Positioning module 20 is used to map the structural boundary data to the product image to obtain image boundary data; The calculation module 30 is used to perform path planning based on the image boundary data to obtain a cutting path, and to control the cutting robot to cut the agricultural product to be cut according to the cutting path.
[0125] Optionally, the agricultural product to be cut is a peeled citrus fruit; the identification module 10 is further used for: The product image of the citrus fruit is input into a preset image reasoning model to obtain a multi-label mask image and the center of the whole fruit. The labels of the multi-label mask image are used to identify different fruit segments. The regional boundaries between the mask map regions corresponding to different labels in the multi-label mask map and the center of the whole fruit are determined as the structural boundary data of the citrus fruit.
[0126] Optionally, the computing module 30 is further configured to: A polar coordinate system is established with the center of the whole fruit as the origin, and a continuous set of edge points is extracted in the polar coordinate system based on the image boundary data; Traverse each edge point in the edge point set and calculate the polar angle corresponding to the edge point based on its position in the polar coordinate system; The edge points in the edge point set are arranged in ascending order of the polar angles, and the angle difference between the polar angles of adjacent edge points is determined as the interlobe gap angle. The path is determined based on the image boundary data, and the path is planned using the interlobe gap angle as the cutting angle to obtain the cutting path.
[0127] Optionally, the agricultural product to be cut is a stone fruit; the identification module 10 is further used for: The product image of the stone fruit is input into a preset product model to obtain the seed detection frame parameters and rotation center coordinates of the stone fruit. The seed detection frame parameters include the seed width, seed height and seed center coordinates. The parameters of the fruit pit detection frame and the rotation center are determined as structural boundary data.
[0128] Optionally, the computing module 30 is further configured to: The tilt angle is determined based on the width and height of the fruit pit, and a spiral cutting trajectory is generated with the rotation center coordinates as the reference point and the tilt angle as the cutting angle. A cutting protection area is generated with the center of the fruit pit as the center, and a cutting path is generated based on the cutting protection area and the spiral downward cutting trajectory.
[0129] Optionally, the agricultural product to be cut is livestock; the identification module 10 is further used for: The product image of the agricultural product to be cut is input into a preset image inference model to obtain a fusion segmentation mask, and the structural position coordinates are extracted from the fusion segmentation mask. The structural position coordinates include at least the wing bone edge point set, the neck bone edge point set, and the skirt boundary point set. A first curve is obtained by fitting the wing bone edge point set and the skirt boundary point set based on the curve fitting algorithm; a second curve is obtained by fitting the cervical bone edge point set and the skirt boundary point set based on the curve fitting algorithm. The first curve and the second curve are determined as the structural boundary data.
[0130] Optionally, the computing module 30 is further configured to: Cutting parameters are determined based on the bone density and fat thickness of the livestock, wherein the cutting parameters include at least cutting speed, tool vibration frequency and tool temperature; Based on the image boundary data, discretization sampling is performed to obtain sampling path points, and based on the sampling path points and the cutting parameters, path planning is performed to obtain the cutting path.
[0131] Optionally, the device further includes a comparison module for: Obtain historical cutting paths and historical boundary data for agricultural products; If the morphological similarity between the agricultural product to be cut and the historical agricultural product is greater than the first similarity threshold, then the historical cutting path is determined as the cutting path of the agricultural product to be cut. If the morphological similarity is greater than the second similarity threshold and the morphological similarity is less than or equal to the first similarity threshold, then the historical boundary data is updated based on the morphological pair of the agricultural product to be cut and the historical agricultural product, and the cutting path is generated based on the updated historical boundary data. If the morphological similarity is less than or equal to the second similarity threshold, then the steps of inputting the product image of the agricultural product to be cut into a preset image reasoning model to obtain the structural boundary data of the agricultural product to be cut, and subsequent steps, are executed.
[0132] The agricultural product cutting system provided in this application, employing the agricultural product cutting method described in the above embodiments, can solve the technical problem of low cutting accuracy caused by the diversity of agricultural product morphology and structural complexity. Compared with the prior art, the beneficial effects of the agricultural product cutting system provided in this application are the same as those of the agricultural product cutting method provided in the above embodiments, and other technical features of the agricultural product cutting system are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0133] This application provides an agricultural product cutting device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the agricultural product cutting method in Embodiment 1 above.
[0134] The following is for reference. Figure 11 It shows a structural schematic diagram of an agricultural product cutting device suitable for implementing the embodiments of this application. Figure 11 The agricultural product cutting equipment shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0135] like Figure 11As shown, the agricultural product cutting equipment may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory 1002 or a program loaded from a storage device 1003 into a random access memory 1004. The random access memory 1004 also stores various programs and data required for the operation of the agricultural product cutting equipment. The processing unit 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to the input / output interface 1006: input devices 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows the agricultural product cutting equipment to communicate wirelessly or wiredly with other equipment to exchange data. Although the figures show agricultural product cutting equipment with various systems, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.
[0136] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0137] The agricultural product cutting equipment provided in this application, employing the agricultural product cutting method described in the above embodiments, can solve the technical problem of low cutting accuracy caused by the diversity of agricultural product morphology and structural complexity. Compared with the prior art, the beneficial effects of the agricultural product cutting equipment provided in this application are the same as those of the agricultural product cutting method provided in the above embodiments, and other technical features of this agricultural product cutting equipment are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0138] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0139] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0140] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the agricultural product cutting method in the above embodiments.
[0141] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0142] The aforementioned computer-readable storage medium may be included in the agricultural product cutting equipment; or it may exist independently and not be assembled into the agricultural product cutting equipment.
[0143] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the agricultural product cutting device, cause the agricultural product cutting device to implement the agricultural product cutting methods of the various embodiments described above.
[0144] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0145] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0146] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0147] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described agricultural product cutting method. This solves the technical problem of low cutting accuracy in current agricultural product cutting due to the diversity of agricultural product morphology and structural complexity. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the agricultural product cutting method provided in the above embodiments, and will not be repeated here.
[0148] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described method for cutting agricultural products.
[0149] The computer program product provided in this application can solve the technical problem of low cutting accuracy in current agricultural product cutting due to the diversity of agricultural product morphology and the complexity of its structure. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the agricultural product cutting method provided in the above embodiments, and will not be repeated here.
[0150] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A method for cutting agricultural products, characterized in that, The method for cutting agricultural products includes: The product image of the agricultural product to be cut is input into a preset image reasoning model to obtain the structural boundary data of the agricultural product to be cut; The structural boundary data is mapped to the image coordinate system of the product image to obtain the image boundary data; Based on the image boundary data, a cutting path is obtained through path planning, and the cutting robot is controlled to cut the agricultural product to be cut according to the cutting path.
2. The method for cutting agricultural products as described in claim 1, characterized in that, The agricultural product to be cut is a peeled citrus fruit. The step of inputting the product image of the agricultural product to be cut into a preset image reasoning model to obtain the structural boundary data of the agricultural product to be cut includes: The product image of the citrus fruit is input into a preset image reasoning model to obtain a multi-label mask image and the center of the whole fruit. The labels in the multi-label mask image are used to identify different fruit segments. The regional boundaries between the mask map regions corresponding to different labels in the multi-label mask map and the center of the whole fruit are determined as the structural boundary data of the citrus fruit.
3. The method for cutting agricultural products as described in claim 2, characterized in that, The step of obtaining the cutting path based on the image boundary data includes: A polar coordinate system is established with the center of the whole fruit as the origin, and a continuous set of edge points is extracted in the polar coordinate system based on the image boundary data; Traverse each edge point in the edge point set and calculate the polar angle corresponding to the edge point based on its position in the polar coordinate system; The edge points in the edge point set are arranged in ascending order of the polar angles, and the angle difference between the polar angles of adjacent edge points is determined as the interlobe gap angle. The path is determined based on the image boundary data, and the path is planned using the interlobe gap angle as the cutting angle to obtain the cutting path.
4. The method for cutting agricultural products as described in claim 1, characterized in that, The agricultural product to be cut is a stone fruit; The step of inputting the product image of the agricultural product to be cut into a preset image reasoning model to obtain the structural boundary data of the agricultural product to be cut includes: The product image of the stone fruit is input into a preset product model to obtain the seed detection frame parameters and rotation center coordinates of the stone fruit. The seed detection frame parameters include the seed width, seed height and seed center coordinates. The parameters of the fruit pit detection frame and the rotation center are determined as structural boundary data.
5. The method for cutting agricultural products as described in claim 4, characterized in that, The step of obtaining the cutting path based on the image boundary data includes: The tilt angle is determined based on the width and height of the fruit pit, and a spiral cutting trajectory is generated with the rotation center coordinates as the reference point and the tilt angle as the cutting angle. A cutting protection area is generated with the center of the fruit pit as the center, and a cutting path is generated based on the cutting protection area and the spiral downward cutting trajectory.
6. The method for cutting agricultural products as described in claim 1, characterized in that, The agricultural products to be cut are livestock; The step of inputting the product image of the agricultural product to be cut into a preset image reasoning model to obtain the structural boundary data of the agricultural product to be cut includes: The product image of the agricultural product to be cut is input into a preset image inference model to obtain a fusion segmentation mask, and the structural position coordinates are extracted from the fusion segmentation mask. The structural position coordinates include at least the wing bone edge point set, the neck bone edge point set, and the skirt boundary point set. A first curve is obtained by fitting the wing bone edge point set and the skirt boundary point set based on the curve fitting algorithm; a second curve is obtained by fitting the cervical bone edge point set and the skirt boundary point set based on the curve fitting algorithm. The first curve and the second curve are determined as the structural boundary data.
7. The method for cutting agricultural products as described in claim 6, characterized in that, The step of obtaining the cutting path based on the image boundary data includes: Cutting parameters are determined based on the bone density and fat thickness of the livestock, wherein the cutting parameters include at least cutting speed, tool vibration frequency and tool temperature; Based on the image boundary data, discretization sampling is performed to obtain sampling path points, and based on the sampling path points and the cutting parameters, path planning is performed to obtain the cutting path.
8. The method for cutting agricultural products as described in any one of claims 1 to 7, characterized in that, Before the step of inputting the product image of the agricultural product to be cut into a preset image reasoning model to obtain the structural boundary data of the agricultural product to be cut, the method further includes: Obtain historical cutting paths and historical boundary data for agricultural products; If the morphological similarity between the agricultural product to be cut and the historical agricultural product is greater than the first similarity threshold, then the historical cutting path is determined as the cutting path of the agricultural product to be cut. If the morphological similarity is greater than the second similarity threshold and the morphological similarity is less than or equal to the first similarity threshold, then the historical boundary data is updated based on the morphological pair of the agricultural product to be cut and the historical agricultural product, and the cutting path is generated based on the updated historical boundary data. If the morphological similarity is less than or equal to the second similarity threshold, then the steps of inputting the product image of the agricultural product to be cut into a preset image reasoning model to obtain the structural boundary data of the agricultural product to be cut, and subsequent steps, are executed.
9. An agricultural product cutting system, wherein, The agricultural product cutting system includes: The recognition module is used to input the product image of the agricultural product to be cut into a preset image reasoning model to obtain the structural boundary data of the agricultural product to be cut. The positioning module is used to map the structural boundary data to the product image to obtain image boundary data; The calculation module is used to perform path planning based on the image boundary data to obtain the cutting path, and to control the cutting robot to cut the agricultural product to be cut according to the cutting path.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the agricultural product cutting method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Visual identification method for pitting fruits
CN106203527A
Material multi-dimensional identification cutting method and device and medium
CN119887811A
Fruit and vegetable sectioning method, equipment and system
CN120431124A