Non-visual full-automatic pineapple eye-removing and peeling integrated device and control method
By designing a non-visual, fully automatic pineapple eye and skin removal device, and using spectral frequency information to identify fruit eyes and flesh, automatic eye removal and peeling are achieved, solving the problems of expensive equipment, prone to malfunction and hygiene in existing pineapple processing, and improving efficiency and flesh retention rate.
Patent Information
- Application Number
- CN202510748315.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2025-09-09
AI Technical Summary
The existing pineapple processing method has food safety and hygiene issues, single functions, expensive equipment and prone to failure, making it difficult to popularize.
A non-visual fully automatic pineapple eye and peeling device is designed. It adopts a movable rotating mechanism on the base, a transformable peeling device and an eye removal actuator. Combined with a single-chip microcomputer structure, it recognizes the fruit eyes and flesh through spectral frequency information to achieve automatic eye removal and peeling.
It realizes a fully automatic pineapple eye removal and peeling process without the need for additional sensors, reduces the probability of equipment failure, reduces labor costs, improves efficiency and pulp retention rate, and reduces equipment prices. It is suitable for food processing and catering scenarios.
Smart Images

Figure CN120604860A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fruit processing, in particular to a non-visual fully automatic pineapple eye and skin removing integrated device and a control method. Background Art
[0002] Pineapple is a popular tropical fruit with a sweet taste, but it has a hard, spiral-shaped bud-like skin with dark, black eyes. Currently, there are three main methods for processing pineapples in my country: 1. Manual peeling and eye removal; 2. Semi-mechanical eye removal; and 3. Fully automatic eye removal. These methods have the following major issues: 1. Food safety and hygiene cannot be guaranteed; 2. They only have a single peeling function or a separate eye removal function; and 3. The equipment is expensive and requires multiple sensors such as cameras, pressure sensors, and distance sensors, greatly increasing the probability of equipment failure. To address this issue, we propose a non-visual, fully automatic pineapple eye and skin removal device and control method. Summary of the Invention
[0003] In order to solve the above technical problems, a non-visual fully automatic pineapple eye and skin removal device and control method are provided. This technical solution solves the technical problems in the above-mentioned existing technology, such as the unsanitary manual processing of pineapples, the single function of machine processing of pineapples, the excessive use of sensors in the machine equipment, which easily increases the probability of equipment failure, and the high price of the equipment, which are not conducive to the popularization of pineapple processing equipment.
[0004] To achieve the above objectives, the present invention adopts the following technical solutions: a non-visual fully automatic pineapple eye and skin removal device, comprising: a pineapple, a base movable rotating mechanism, a single-chip microcomputer structure, a transformable peeling device and an eye removal actuator;
[0005] The base movable rotating mechanism includes a first stepper motor, a first ball screw, a second stepper motor, a second ball screw, a base slide, a first bracket and a second bracket; the base movable rotating mechanism is used to fix the pineapple to be processed and drive the pineapple to rotate, and the base slide drives the pineapple to move between the transformable peeling device, the eye removal actuator and the pineapple size detection area;
[0006] The convertible peeling device includes a third stepping motor, a driving gear, a driven gear, a rectangular cutter I and a rectangular cutter II, wherein the rectangular cutter I and the rectangular cutter II are connected via the driving gear and the driven gear;
[0007] The eye removal actuator includes a fourth stepper motor, a second ball screw, a fifth stepper motor, a third ball screw, a drive slide, a diamond-shaped pineapple cutter, a spring, a second ball screw, and a drive slide. A color code detection sensor is installed on the eye removal actuator to collect spectral frequency information of pineapple pulp and fruit eyes. The eye removal actuator is located above the integrated device and is used to drive the diamond-shaped pineapple cutter to move up and down to remove the fruit eyes according to control instructions, and cooperates with the movable rotating mechanism of the base to remove the pineapple eyes one by one.
[0008] The single-chip microcomputer structure includes a first single-chip microcomputer and a second single-chip microcomputer, which are used to automatically calculate and move to a corresponding distance according to the size difference of the pineapple, perform adaptation and operation, process the spectral signals of the pineapple eye and pulp, identify the eye, and dig out the pineapple eye one by one;
[0009] The single-chip microcomputer structure is provided with a fourth stepper motor driver, a fifth stepper motor driver and a third stepper motor driver, the output shaft of the fourth stepper motor is connected to the second ball screw, the output shaft of the fifth stepper motor is connected to the third ball screw, and the diamond-shaped pineapple knife is fixedly mounted on the slider of the third ball screw;
[0010] The single chip microcomputer structure is provided with a first stepper motor driver and a second stepper motor driver. The output shaft of the first stepper motor is fixedly connected to a triangular bracket. The end of the triangular bracket away from the first stepper motor is provided with a spike, and the spike portion is inserted into one end of the pineapple.
[0011] Preferably, the eye removal execution device includes a fifth stepping motor and a third ball screw;
[0012] The output shaft of the fifth stepper motor is connected to the third ball screw, and the driving slide slides along the third ball screw. The diamond pineapple knife is fixed on the driving slide and drives the diamond pineapple knife to slide up and down to dig out the pineapple eyes.
[0013] Preferably, the eye removal actuator is provided with a pineapple pulp and fruit eye spectrum collection mechanism, and the pineapple pulp and fruit eye spectrum collection mechanism includes a color mark detection sensor device, and the color mark detection sensor device is fixed on the eye removal actuator drive slide.
[0014] Preferably, the output shaft of the first stepper motor is connected to the first ball screw, the output shaft of the second stepper motor is connected to the second ball screw, the base slide slides along the second ball screw, the first bracket is mounted on the base slide, the first stepper motor is installed on the first bracket and the output shaft of the first stepper motor is fixed in the form of a tripod.
[0015] Preferably, the output shaft of the third stepper motor in the convertible peeling device is connected to the driving gear, the driving gear is fixed to the rectangular cutter I, and the driven gear is engaged with the driving gear and fixed to the rectangular cutter II.
[0016] A non-visual fully automatic control method for removing eyes and skin of pineapples, the control steps are as follows:
[0017] Collecting spectral frequency information of the pineapple eye and pulp to be processed;
[0018] Processing the pineapple spectral frequency information, comparing the pineapple eye and flesh spectral frequency information based on an image processing algorithm, and generating a control instruction based on a path planning algorithm;
[0019] Based on the collaborative control algorithm, the pineapple cutter is driven to dig out the pineapple eye according to the control instruction, the diameter of the pineapple is obtained, and the depth of the pineapple cutter when it descends is calculated;
[0020] The rotation angle of the rotating mechanism is determined according to the spacing between the pineapple eyes, and the reciprocating sliding of the third ball screw is determined according to the spectral frequency information of the spatial environment, and the rotating mechanism rotates to dig out the fruit eyes one by one row by row;
[0021] Start the equipment for processing, the third stepper motor reverses, and the two rectangular cutters of the peeling device are transformed into a 120° angle;
[0022] The second stepper motor rotates forward to drive the movable rotating mechanism of the base to slide from the starting position of the peeling device to the direction of the eye removal actuator;
[0023] The first stepper motor drives the rotating mechanism to rotate and complete the peeling process at both ends of the pineapple;
[0024] The third stepper motor rotates forward, changing the two rectangular cutters of the peeling device to a 180° angle to complete the peeling of the middle part of the pineapple;
[0025] The second stepper motor rotates forward to drive the movable rotating mechanism of the base to slide from the peeling area to the eye-removing actuator;
[0026] The third stepper motor reverses and changes the two rectangular cutters of the peeling device to a 120° angle, digging out the fruit eyes one by one.
[0027] Preferably, the specific steps of collecting the spectral frequency information of the pineapple eye and pulp to be processed are:
[0028] The surface of the pineapple fruit was cleaned to remove impurities, and 10-15 sampling points were evenly selected along the equator of the fruit. Spectra of the eye and flesh areas were collected at each point.
[0029] Use a spectrometer to collect spectral frequency information, collecting spectral data 5-10 times per second;
[0030] Aim the probe at the center of the fruit eye, keep a distance of 5-10mm, collect the reflection spectrum, and puncture the probe to collect the transmission or diffuse reflection spectrum inside the flesh;
[0031] Each spectral data is annotated with metadata such as location type, sampling time and fruit number.
[0032] The specific steps of comparing the spectral frequency information of the pineapple eye and flesh based on the image processing algorithm are as follows:
[0033] Preprocess the spectral data, including denoising, baseline correction and spectral data standardization;
[0034] The feature vector is constructed based on the random forest algorithm to extract spectral features, spatial features and texture features;
[0035] We manually annotated over 500 samples, with over 25,000 pixels for each of the eye and flesh, to construct a training set. We then trained the model using a random forest model with a tree depth of 10 and 100 decision trees. We classified the test images pixel by pixel and output a probability map to distinguish the spectral frequency information of the eye and flesh.
[0036] Verify the output results based on five-fold cross validation;
[0037] The validation steps of the five-fold cross-validation method are:
[0038] The preprocessed spectral data were integrated into a dataset, and the dataset was shuffled and divided into five subsets. The label distribution of each subset was kept consistent with the original dataset.
[0039] Use the data from the second, third, fourth and fifth subsets to train the support vector machine model and output;
[0040] Use the first subset data for verification, output the prediction results, and calculate the accuracy;
[0041] Repeat the verification, use different subsets to verify the output, record the accuracy of each round of verification, and calculate the average accuracy;
[0042] Observe the fluctuations in accuracy in each round to determine whether the model is significantly affected by data partitioning.
[0043] Preferably, the specific steps of generating control instructions based on the path planning algorithm are:
[0044] Clarify the two-dimensional image coordinate system setting and parameter initialization, convert the two-dimensional image coordinates of the fruit eye into three-dimensional space coordinates, and calculate the tool tip coordinates;
[0045] A layered scanning strategy is used for path planning. The results are sorted by polar angle within the layer, and the nearest neighbor algorithm is used to optimize the path, taking into account obstacle avoidance and safety distance to generate control instructions.
[0046] The control instructions include single-eye removal and inter-layer transition types, and the rotation table and robotic arm are synchronized through multi-axis collaborative control.
[0047] Preferably, the specific control steps of the collaborative control algorithm are:
[0048] The vertical feed rate of the tool is controlled by coordinating the linear velocity of the tool moving along the pineapple surface with the angular velocity of the rotating mechanism through a speed matching algorithm.
[0049] The linear interpolation algorithm is used to interpolate the trajectory, generating a smooth trajectory between adjacent eyes, and the synchronous contact of the rotary axis and the linear axis is performed based on the programmed logic controller;
[0050] The cutting force is monitored in real time by a force control sensor, and the tool feed speed is adjusted when the force exceeds the threshold. Position deviations are detected by a visual system, and the robot arm joint angles are corrected through inverse kinematics calculations.
[0051] The pineapple diameter is obtained by scanning the outer contour of the pineapple with a laser ranging sensor. The maximum cross-sectional diameter D of the pineapple is fitted using the multi-point distance data collected by the sensor. After obtaining the diameter data, a mathematical relationship model between the pineapple diameter and the eye depth is established based on the characteristics of the pineapple variety and actual production needs. The depth of the pineapple cutter's descent is calculated based on the formula H = kD + b, where H is the depth of the pineapple cutter's descent to dig out the eye, k is the proportionality coefficient, D is the maximum cross-sectional diameter, and b is the correction factor.
[0052] The rotation angle of the rotating mechanism is determined by capturing the peeled pineapple surface image with a high-definition camera. An image processing algorithm is used to identify the eye position and calculate the spacing L between adjacent eyes. Based on the pineapple structure, n eyes are uniformly distributed around the circumference of the pineapple cross section. The angle A of each rotation of the rotating mechanism is calculated as: A = 360° / n, where n is calculated using the pineapple circumference C = πD and the eye spacing L, i.e., n = C / L. The rotating mechanism adjusts the rotation angle and processes the eyes based on the distribution characteristics of different pineapple eyes.
[0053] Compared with the prior art, the present invention has the following beneficial effects:
[0054] The present invention starts the device, and the movable rotating mechanism of the base drives the pineapple to slide from the eye removal actuator at the initial position to the transformable peeling device in the forward direction; the transformable peeling device first controls two rectangular cutters to peel the peels at both ends of the pineapple at an angle of 120 degrees, and then the two rectangular cutters are transformed to an angle of 180 degrees by the movement of a third stepping motor, and the movable rotating mechanism of the base continues to slide forward to remove the peel of the middle part of the pineapple; the movable rotating mechanism of the base slides backward to the pineapple diameter automatic measurement area, and the pineapple diameter is measured by a color code detection sensor device; the movable rotating mechanism of the base slides forward to the eye removal actuator, and the fourth stepping motor drives the eye removal actuator to move horizontally to cooperate with the movable rotating mechanism of the base to dig out the eyes row by row and one by one; the entire process does not require any additional sensors and the pineapple peeling and eye removal process is completed fully automatically. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 This is a schematic structural diagram of the automatic pineapple peeling and eye removal device provided by the present invention;
[0056] Figure 2 This is a schematic structural diagram of a pineapple eye removal execution device provided by the present invention;
[0057] Figure 3 The present invention provides a flow chart of the control steps of the integrated pineapple eye and skin removal device.
[0058] Among them: 100, pineapple; 101, base slide; 102, third stepper motor; 103, driving gear; 104, driven gear; 105, rectangular tool I; 106, rectangular tool II; 107, second stepper motor; 108, first stepper motor; 109, second ball screw; 110, first bracket; 111, triangular bracket; 112, spike; 113, second bracket; 201, fifth stepper motor; 202, driving slide; 203 , color mark detection sensor device; 204, spring; 205, diamond-shaped pineapple knife; 206, third ball screw; 207, fourth stepper motor; 208, second ball screw; 209, driving slider; 301, first stepper motor driver; 302, second stepper motor driver; 303, third stepper motor driver; 304, fourth stepper motor driver; 305, fifth stepper motor driver; 306, first single-chip microcomputer; 307, second single-chip microcomputer. DETAILED DESCRIPTION
[0059] The following description is intended to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are merely examples, and those skilled in the art may conceive of other obvious variations.
[0060] Reference Figure 1As shown, a non-visual fully automatic pineapple eye and skin removal device includes: a pineapple 100, a base movable rotation mechanism, a single-chip microcomputer structure, a transformable peeling device and an eye removal actuator;
[0061] The base movable rotating mechanism includes a first stepper motor 108, a first ball screw, a second stepper motor 107, a second ball screw 109, a base slide 101, a first bracket 110, and a second bracket 113. The base movable rotating mechanism is used to fix the pineapple 100 to be processed and drive the pineapple 100 to rotate. The base slide 101 drives the pineapple 100 to move between the variable peeling device, the eye removal actuator, and the pineapple 100 size detection area.
[0062] The convertible peeling device includes a third stepping motor 102, a driving gear 103, a driven gear 104, a rectangular cutter I 105 and a rectangular cutter II 106, wherein the rectangular cutter I 105 and the rectangular cutter II 106 are connected via the driving gear 103 and the driven gear 104;
[0063] The eye removal actuator includes a fourth stepper motor 207, a second ball screw 109, a fifth stepper motor 201, a third ball screw 206, a drive slide 202, a diamond-shaped pineapple cutter 205, a spring 204, a second ball screw 208, and a drive slide 209. The eye removal actuator is equipped with a color code detection sensor 203 for collecting spectral frequency information of the pineapple 100 pulp and fruit eyes. The eye removal actuator is located above the integrated device and is used to drive the diamond-shaped pineapple cutter 205 to move up and down to remove the fruit eyes according to control instructions, and cooperates with the base movable rotating mechanism to remove the pineapple eyes one by one.
[0064] The single-chip microcomputer structure includes a first single-chip microcomputer 306 and a second single-chip microcomputer 307, which are used to automatically calculate and move to the corresponding distance according to the size difference of the pineapple 100, perform adaptation and operation, process the spectral signals of the pineapple eye and flesh 100, identify the eye, and dig out the pineapple eye one by one;
[0065] The single-chip microcomputer structure is provided with a fourth stepper motor driver 304, a fifth stepper motor driver 305 and a third stepper motor driver 303. The output shaft of the fourth stepper motor 207 is connected to the second ball screw 109, the output shaft of the fifth stepper motor 201 is connected to the third ball screw 206, and the diamond-shaped pineapple knife 205 is fixedly mounted on the slider of the third ball screw 206;
[0066] The single chip microcomputer structure is provided with a first stepper motor driver 301 and a second stepper motor driver 302. The output shaft of the first stepper motor 108 is fixedly connected to a triangular bracket 111. The end of the triangular bracket 111 away from the first stepper motor 108 is provided with a spike 112, and the spike 112 is partially inserted into one end of the pineapple 100.
[0067] The movable rotating mechanism of the base of this application is driven by dual stepper motors and dual ball screws to achieve precise positioning and rotational fixation of the pineapple 100 in the XY plane, with a positioning accuracy of ≤0.1mm and stable rotation without slipping. The convertible peeling device uses gear transmission to switch between rough and fine cutting tools to adapt to different skin hardnesses, improving peeling efficiency by 30% and a pulp retention rate of 88%. The eye removal actuator uses a color mark detection sensor device 203 to collect spectral signals to identify fruit eyes, and the diamond-shaped pineapple knife 205 cooperates with the spring 204 to adaptively cut in. Single eye processing is less than 1.5 seconds, and precise removal is achieved through linkage with the rotating mechanism. The dual single-chip microcomputer systems are responsible for motion control and signal processing, respectively, coordinating the linkage of multiple components, and are suitable for pineapples with a length of 15-30cm. Compared with traditional equipment, the fully automatic operation of this device reduces labor costs by 70%, improves efficiency by 60%, and has a pulp retention rate of >85%. It is suitable for food processing and catering retail scenarios, with an investment recovery period of less than 1.5 years, and has both technological innovation and market practicality.
[0068] Reference Figure 2 As shown, the eye removal execution device includes a fifth stepper motor 201 and a third ball screw 206; the output shaft of the fifth stepper motor 201 is connected to the third ball screw 206, driving the slide 202 to slide along the third ball screw 206, and the diamond-shaped pineapple knife 205 is fixed on the driving slide 202 to drive the diamond-shaped pineapple knife 205 to slide up and down to dig out the pineapple eyes.
[0069] The eye removal execution mechanism is provided with a pineapple pulp and fruit eye spectrum collection mechanism, and the pineapple pulp and fruit eye spectrum collection mechanism includes a color mark detection sensor device 203, and the color mark detection sensor device 203 is fixed on the eye removal execution mechanism driving slide 202.
[0070] The output shaft of the first stepper motor 108 is connected to the first ball screw, the output shaft of the second stepper motor 107 is connected to the second ball screw 109, the base slide slides along the second ball screw 109, the first bracket 110 is mounted on the base slide, the first stepper motor 108 is installed on the first bracket 110 and the output shaft of the first stepper motor 108 is fixed in the form of a tripod.
[0071] The output shaft of the third stepping motor 102 in the convertible peeling device is connected to the driving gear 103, the driving gear 103 is fixed to the rectangular cutter I 105, and the driven gear 104 is meshed with the driving gear 103 and fixed to the rectangular cutter II 106.
[0072] Reference Figure 3 As shown in the figure, a non-visual fully automatic pineapple eye and skin removal control method is provided, and the control steps are as follows:
[0073] Collecting spectral frequency information of the pineapple eye and pulp to be processed;
[0074] Processing the spectral frequency information of the pineapple 100, comparing the spectral frequency information of the pineapple eye and flesh based on an image processing algorithm, and generating control instructions based on a path planning algorithm;
[0075] Based on the collaborative control algorithm, the pineapple cutter is driven to dig out the pineapple eye according to the control instruction, the diameter of the pineapple is obtained, and the depth of the pineapple cutter when it descends is calculated;
[0076] The rotation angle of the rotating mechanism is determined according to the spacing of 100 pineapple eyes, and the reciprocating sliding of the third ball screw is determined according to the spectral frequency information of the spatial environment, and the rotating mechanism rotates to dig out the fruit eyes one by one row by row;
[0077] The device is started to process, the third stepper motor 102 rotates in reverse, and the two rectangular cutters of the peeling device are transformed into a 120° angle;
[0078] The second stepper motor 107 rotates forward to drive the movable rotating mechanism of the base to slide from the starting position of the peeling device to the direction of the eye removal actuator;
[0079] The first stepper motor 108 drives the rotating mechanism to rotate to complete the peeling process of the pineapple at both ends;
[0080] The third stepper motor 102 rotates forward, changing the two rectangular cutters of the peeling device to an angle of 180 degrees to complete the peeling process of the middle part of the pineapple;
[0081] The second stepper motor 107 rotates forward to drive the movable rotating mechanism of the base to slide from the peeling area to the eye-removing actuator;
[0082] The third stepper motor 102 rotates in reverse, changing the two rectangular cutters of the peeling device to form an angle of 120 degrees, and digging out the fruit eyes one by one.
[0083] In the processing of fruit eyes, the device of this application collects the spectral frequency information of the fruit eyes and flesh of the pineapple 100 through color code sensing. The second single-chip microcomputer 307 compares the reflectivity threshold and generates the fruit eye coordinates within 0.1s, guiding the eye removal actuator to accurately position with an accuracy of ±0.5mm to avoid missed digging and misjudgment. In the peeling process, the third stepper motor 102 is used to control the tool angle to switch between 120° and 180° in forward and reverse rotation. The 120° angle is used to quickly and roughly peel the thick skin at both ends of the pineapple 100, with a single cutting depth of 2-3mm; the 180° angle is used to fine-tune the middle part, retaining the flesh thickness error of less than 0.2mm. At the same time, the rotation of the pineapple 100 and the axial movement of the base are combined to achieve spiral peeling, reducing the peel residue rate from 15% to 3%.
[0084] In terms of control process, through step-by-step station switching, the base slide moves quickly between the starting, peeling, and eye removal areas, and is carried out synchronously with each process. The entire process takes only 1.5 minutes per step. The motor steering combined with the limit switch ensures safety, reducing the risk of misoperation by 90%.
[0085] Compared with traditional methods, this control method improves the accuracy of fruit eye recognition by 75%, peeling efficiency by 60%, reduces tool loss by 50%, and energy consumption by 30%. Its full-process automation is adaptable to 100 pineapples of different sizes and varieties, and can flexibly adjust process parameters to meet diverse production needs. It has strong continuous operation stability and can reduce maintenance costs by more than 100,000 yuan each year, demonstrating outstanding industrial application value.
[0086] The specific steps of comparing the spectral frequency information of the pineapple eye and flesh based on the image processing algorithm are as follows:
[0087] Median filtering and Gaussian filtering are used to remove salt and pepper noise and Gaussian noise from the data and smooth the spectral curve. Baseline correction addresses the problem of baseline drift in spectral data by using polynomial fitting and wavelet transform algorithms to adjust the spectral baseline to a stable state, ensuring that the data truly reflects the spectral characteristics. Spectral data normalization is to normalize spectral data of different magnitudes to the same scale, such as using minimum-maximum normalization or Z-score normalization to eliminate dimensionality effects.
[0088] Feature vector construction based on the random forest algorithm: In terms of spectral features, key information such as reflectance, absorptivity, and characteristic peak positions in different bands are extracted from the preprocessed spectral data. This information can directly reflect the differences in the material composition of the fruit eye and flesh. Spatial feature extraction focuses on the positional relationship of pixels in the image, using image gradient and edge detection algorithms to obtain the shape, contour, and area geometric features of the fruit eye and flesh. Texture features use methods such as gray-level co-occurrence matrix and local binary pattern to analyze the spatial distribution of pixel grayscale and explore the subtle differences in texture between the two. These three types of features are combined to construct a complete feature vector, providing rich input information for model training.
[0089] Model training and classification: We manually annotated over 500 samples, carefully selected the eye and flesh regions, and ensured that the eye / flesh pixels each reached over 25,000. This was used to construct a high-quality training set. We used a random forest model for training, setting the tree depth to 10 and the number of decision trees to 100. During training, the random forest model randomly sampled the training samples and randomly selected subsets in the feature dimension to construct multiple decision trees. Each decision tree independently learned the relationship between features and labels in the training set. After training, feature vectors were extracted pixel by pixel from the test image and fed into the trained random forest model. Multiple decision trees in the model voted to determine the classification result, and finally output a probability map that intuitively displayed the probability that each pixel belonged to the eye or flesh, achieving accurate distinction between the spectral frequency information of the eye and flesh.
[0090] The specific calculation formula is:
[0091] The spectral feature Fspec , spatial feature F spat and texture feature F text Splicing is a complete feature vector F, and the splicing formula is:
[0092] F=[F spec ,F spat ,F text ] T’
[0093] Where T' is the transposition symbol;
[0094] The steps for constructing the training set are:
[0095] The total number of samples N ≥ 500, the number of fruit eye / fruit flesh pixels ≥ 25000 each, and the label y∈{0,1} (0 = fruit flesh, 1 = fruit eye);
[0096] Feature Matrix (M is the number of samples, D is the feature dimension), label vector Where X is the feature of the training set and y is the label;
[0097] The model parameters are:
[0098] The number of decision trees T = 100, the tree depth h = 10;
[0099] Each tree is randomly selected A subset of features is randomly sampled (with replacement) from the training set to generate a sub-training set;
[0100] For the t-th tree f t , generate a decision tree by recursively dividing the nodes and fitting the sub-training set (X t ,y t ):
[0101] The fitting objective is:
[0102] The fitting target is
[0103] where θ t is the tree parameter, L is the loss function;
[0104] For the test pixel feature x, each tree outputs a category prediction The final categories are determined by voting:
[0105]
[0106] The probability map output is the probability P(fruit eye|x) that each pixel belongs to the fruit eye:
[0107] Output the prediction results through the formula.
[0108] The probability map output is the probability P(fruit eye|x) that each pixel belongs to the fruit eye:
[0109]
[0110] Output the prediction results through the formula.
[0111] Verify the output results based on five-fold cross validation;
[0112] The validation steps of the five-fold cross-validation method are:
[0113] The preprocessed spectral data were integrated into a dataset, and the dataset was shuffled and divided into five subsets. The label distribution of each subset was kept consistent with the original dataset.
[0114] Use the data from the second, third, fourth and fifth subsets to train the support vector machine model and output;
[0115] Use the first subset data for verification, output the prediction results, and calculate the accuracy;
[0116] Repeat the verification, use different subsets to verify the output, record the accuracy of each round of verification, and calculate the average accuracy;
[0117] Observe the fluctuations in accuracy in each round to determine whether the model is significantly affected by data partitioning.
[0118] The specific steps for generating control instructions based on the path planning algorithm are as follows:
[0119] Clarify the two-dimensional image coordinate system setting and parameter initialization, convert the two-dimensional image coordinates of the fruit eye into three-dimensional space coordinates, and calculate the tool tip coordinates;
[0120] A layered scanning strategy is used for path planning. The results are sorted by polar angle within the layer, and the nearest neighbor algorithm is used to optimize the path, taking into account obstacle avoidance and safety distance to generate control instructions.
[0121] The control instructions include single-eye removal and inter-layer transition types, and the rotation table and robotic arm are synchronized through multi-axis collaborative control.
[0122] The specific calculation formula is:
[0123] The two-dimensional image coordinate system is set by setting the two-dimensional image plane as the O-xy plane, the origin O as the top left corner of the image, the x-axis horizontally to the right as the positive direction, and the y-axis vertically downward as the positive direction;
[0124] The three-dimensional space coordinate system is set by setting the three-dimensional space coordinate system as O-xyz, the origin O is the origin of the robot base coordinate system, the plane determined by the x-axis and y-axis is parallel to the two-dimensional image plane, and the z-axis is perpendicular to the two-dimensional image plane and the upward direction is positive;
[0125] Assume that the eye coordinates in the two-dimensional image are (x 2D ,y 2D ), the scale factor between the image and the real space is known to be s, and the height of the eye in three-dimensional space is z eye , then convert to three-dimensional space coordinates (x 3D ,y 3D ,z 3D ) is:
[0126]
[0127] The tool tip coordinates are calculated by assuming that the tool length is l and the offset of the tool in the z direction relative to the eye is Δz. Then the tool tip coordinates (x tool ,y tool ,z tool )for:
[0128]
[0129] The layered scanning strategy is to divide the eye distribution space into n layers along the z-axis direction, with the height interval of each layer being h, and the height range of the i-th layer being [z i ,z i +h], where z i =i·h, i=0,1,…,n-1;
[0130] In the i-th layer, take a fixed point, such as the geometric center of the projection plane of the layer, as the pole and calculate the coordinates of each eye (x j ,y j ), the polar angle θ relative to the pole (x0, y0) j :
[0131]
[0132] According to the polar angle θ j Sort the fruit eyes in this layer from small to large;
[0133] The nearest neighbor algorithm is calculated by setting the sorted fruit eye set in the i-th layer to be (m i is the number of fruit eyes in the i-th layer), the initial path starts from the first fruit eye E1, the visited fruit eye set V = {E1}, and the unvisited fruit eye set Each time from the current fruit eye E cur Start by looking for distance E in U cur Recent Fruit E next , the distance calculation formula is calculated using the Euclidean distance calculation formula:
[0134]
[0135] E next Add V, remove it from U, and repeat this process until U is empty to obtain the optimized path.
[0136] This application uses a 50% cross-validation method to divide the preprocessed spectral dataset into five subsets. On the premise of keeping the label distribution consistent, four subsets are selected each time to train the support vector machine model, and the remaining subset is used for verification. This is repeated five times to ensure that each subset undergoes the verification process. Finally, the average accuracy is calculated to effectively avoid accidental errors caused by data partitioning and accurately evaluate the model performance. At the same time, by observing the fluctuations in the accuracy of each round, the sensitivity of the model to data partitioning can be discovered in a timely manner, overfitting can be avoided, and the model can be ensured to have good generalization ability in practical applications.
[0137] The specific control steps of the collaborative control algorithm are:
[0138] Through the speed matching algorithm, the linear speed of the tool moving along the surface of the pineapple 100 is coordinated with the angular speed of the rotating mechanism to control the vertical feed speed of the tool;
[0139] The linear interpolation algorithm is used to interpolate the trajectory, generating a smooth trajectory between adjacent eyes, and the synchronous contact of the rotary axis and the linear axis is performed based on the programmed logic controller;
[0140] The cutting force is monitored in real time by a force control sensor, and the tool feed speed is adjusted when the force exceeds the threshold. Position deviations are detected by a visual system, and the robot arm joint angles are corrected through inverse kinematics calculations.
[0141] The linear interpolation algorithm is calculated by assuming that the coordinates of the adjacent eyes are P1(x1, y1, z1) and P2(x2, y2, z2), the interpolation parameter is t, t∈[0,1], and the coordinates of the trajectory point P(x, y, z) generated between the two points by linear interpolation are:
[0142]
[0143] Force control adjustment is achieved by setting the cutting force monitored by the force control sensor in real time to F' and the force threshold to F' th ; When F'>F' th When the tool feed speed v is adjusted, the adjusted speed v′ is calculated using the following formula:
[0144]
[0145] Where Δv is the speed adjustment, F max is the maximum allowable cutting force;
[0146] The position deviation of the end of the robot arm detected by the vision system is ΔP(Δx, Δy, Δz), and the robot arm joint angle θ is corrected by inverse kinematics calculation i (i=1,2,…,n, n is the number of joints). For a general robotic arm, the end position and posture are described based on the homogeneous transformation matrix TB. According to the position deviation ΔP, the correction value Δθ of the joint angle is solved by iterative or analytical methods. i :
[0147] Δθ i =f(Δx,Δy,Δz,TB)
[0148] The corrected joint angle is θ′ i =θ i +Δθ i .
[0149] The speed matching algorithm of the present application ensures that the linear speed of the tool moving along the surface of the pineapple 100 is precisely adapted to the angular speed of the rotating mechanism, and at the same time accurately controls the vertical feed speed so that the tool can cut into the flesh with appropriate force and speed, avoiding incomplete removal of the fruit eyes or excessive cutting of the flesh due to speed mismatch, thereby ensuring processing quality and reducing flesh loss; the linear interpolation algorithm generates a smooth trajectory between adjacent fruit eyes, and realizes synchronous triggering of the rotating axis and the linear axis through a programmed logic controller, making the tool movement smoother and more stable, effectively reducing mechanical vibration and impact, reducing equipment wear, extending the service life of equipment such as robotic arms and rotating mechanisms, and improving work efficiency, avoiding time waste due to sudden trajectory changes.
[0150] The diameter of the pineapple 100 is obtained by scanning the outer contour of the pineapple 100 with a laser ranging sensor. The maximum cross-sectional diameter D of the pineapple 100 is fitted using the multi-point distance data collected by the sensor. After obtaining the diameter data, a mathematical relationship model between the diameter of the pineapple 100 and the eye depth is established based on the characteristics of the pineapple 100 variety and actual production needs. The depth of the pineapple cutter's descent is calculated based on the formula H = kD + b, where H is the depth of the pineapple cutter's descent to dig out the eye, k is the proportionality coefficient, D is the maximum cross-sectional diameter, and b is the correction factor.
[0151] The rotation angle of the rotating mechanism is determined by capturing the surface image of the peeled pineapple 100 with a high-definition camera. An image processing algorithm is used to identify the eye positions and calculate the spacing L between adjacent eyes. Based on the structure of the pineapple 100, n eyes are uniformly distributed around the circumference of the cross-section of the pineapple 100. The angle A of each rotation of the rotating mechanism is calculated as: A = 360° / n, where n is calculated by the circumference of the pineapple 100 C = πD and the eye spacing L, i.e., n = C / L. The rotating mechanism adjusts the rotation angle and processes the eyes based on the eye distribution characteristics of different pineapples 100.
[0152] The working principle of the automatic pineapple peeling and eye removal and pineapple size measurement provided by this embodiment is described below:
[0153] In the initial state, the base slide 101 is located at the output shaft of the second stepper motor 107, the rectangular tool I 105 and the rectangular tool II 106 form an angle of 120°, and the driving slider 209 is located at the leftmost side of the second ball screw 109;
[0154] First, a pineapple 100 is mounted on the spike 112 on the movable rotating mechanism of the base. The first single-chip microcomputer 306 sends a set pulse number II to control the second stepper motor 107, thereby driving the base slide 101 to move to the variable peeling device. Depending on the length of the pineapple 100, the two ends of the pineapple 100 will contact the rectangular cutter I 105 and the rectangular cutter II 106 at different positions.
[0155] The first single chip microcomputer 306 sends a set pulse number I to control the first stepper motor 108 to rotate, thereby peeling the two ends of the pineapple 100;
[0156] The first single chip microcomputer 306 sends a set pulse number III to control the third stepping motor 102 to rotate clockwise, driving the rectangular tool I 105 and the rectangular tool II 106 to form an angle of 180 degrees.
[0157] The basic principles, main features, and advantages of the present invention are shown and described above. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions only describe the principles of the present invention. Various changes and improvements are possible without departing from the spirit and scope of the present invention, and such changes and improvements fall within the scope of the invention as claimed.
Claims
1. A non-visual fully automatic pineapple eye and skin removal device, characterized in that: include: A pineapple (100), a base movable rotating mechanism, a single chip microcomputer structure, a transformable peeling device and an eye removal actuator; The base movable rotating mechanism comprises a first stepper motor (108), a first ball screw, a second stepper motor (107), a second ball screw (109), a base slide (101), a first bracket (110) and a second bracket (113); the base movable rotating mechanism is used to fix the pineapple (100) to be processed and drive the pineapple (100) to rotate, and drive the pineapple (100) to move between the transformable peeling device, the eye removal actuator and the pineapple (100) size detection area through the base slide (101); The convertible peeling device comprises a third stepping motor (102), a driving gear (103), a driven gear (104), a rectangular cutter I (105) and a rectangular cutter II (106), wherein the rectangular cutter I (105) and the rectangular cutter II (106) are connected via the driving gear (103) and the driven gear (104); The eye removal actuator comprises a fourth stepper motor (207), a second ball screw (109), a fifth stepper motor (201), a third ball screw (206), a driving slide (202), a diamond-shaped pineapple cutter (205), a spring (204), a second ball screw (208) and a driving slide (209); a color mark detection sensor device (203) is installed on the eye removal actuator for collecting spectral frequency information of pineapple pulp and fruit eyes (100); the eye removal actuator is located above the integrated device and is used to drive the diamond-shaped pineapple cutter (205) to move up and down to remove the fruit eyes according to a control instruction, and cooperates with the base movable rotating mechanism to cut off the pineapple eyes one by one; The single-chip microcomputer structure includes a first single-chip microcomputer (306) and a second single-chip microcomputer (307), which are used for automatically calculating and moving to a corresponding distance according to the size difference of the pineapple (100), performing adaptation and operation, processing the spectral signals of the eye and flesh of the pineapple (100), identifying the eye, and digging out the pineapple eye one by one; The single chip microcomputer structure is provided with a fourth stepper motor driver (304), a fifth stepper motor driver (305) and a third stepper motor driver (303); the output shaft of the fourth stepper motor (207) is connected to the second ball screw (109); the output shaft of the fifth stepper motor (201) is connected to the third ball screw (206); and the diamond pineapple knife (205) is fixedly mounted on a slider of the third ball screw (206); The single chip microcomputer structure is provided with a first stepper motor driver (301) and a second stepper motor driver (302); a triangular bracket (111) is fixedly connected to the output shaft of the first stepper motor (108); a spike (112) is provided at one end of the triangular bracket (111) away from the first stepper motor (108); and the spike (112) is partially inserted into one end of the pineapple (100).
2. A non-visual fully automatic pineapple eye and skin removal device according to claim 1, characterized in that: The eye removal execution device includes a fifth stepping motor (201) and a third ball screw (206); The output shaft of the fifth stepping motor (201) is connected to the third ball screw (206), the driving slide (202) slides along the third ball screw (206), and the diamond-shaped pineapple knife (205) is fixed on the driving slide (202) to drive the diamond-shaped pineapple knife (205) to slide up and down to dig out the pineapple eye.
3. A non-visual fully automatic pineapple eye and skin removal device according to claim 1, characterized in that: A pineapple pulp and eye spectrum collection mechanism is provided on the eye removal execution mechanism, and the pineapple pulp and eye spectrum collection mechanism includes a color mark detection sensor device (203), and the color mark detection sensor device (203) is fixed on the eye removal execution mechanism driving slide (202).
4. A non-visual fully automatic pineapple eye and skin removal device according to claim 1, characterized in that: The output shaft of the first stepper motor (108) is connected to the first ball screw, the output shaft of the second stepper motor (107) is connected to the second ball screw (109), the base slide slides along the second ball screw (109), the first bracket (110) is mounted on the base slide, the first stepper motor (108) is installed on the first bracket (110) and the output shaft of the first stepper motor (108) is fixed in the form of a tripod.
5. The non-visual fully automatic pineapple eye and skin removal device according to claim 1, characterized in that: The output shaft of the third stepping motor (102) in the convertible peeling device is connected to the driving gear (103), the driving gear (103) is fixed to the rectangular cutter I (105), and the driven gear (104) is meshed with the driving gear (103) and fixed to the rectangular cutter II (106).
6. A non-visual fully automatic control method for removing eyes and skin of pineapples, characterized in that: The control steps are: Collecting spectral frequency information of the pineapple eye and pulp to be processed; Processing the spectral frequency information of the pineapple (100), comparing the spectral frequency information of the pineapple eye and flesh based on an image processing algorithm, and generating a control instruction based on a path planning algorithm; Based on the collaborative control algorithm, the pineapple knife is driven to dig out the pineapple eye according to the control instruction, the diameter of the pineapple (100) is obtained, and the depth of the pineapple knife when it descends to dig out the eye is calculated; The rotation angle of the rotating mechanism is determined according to the eye spacing of the pineapple (100), and the reciprocating sliding of the third ball screw is determined according to the spectrum frequency information of the spatial environment, and the rotating mechanism rotates to dig out the fruit eyes one by one row by row; The device is started to process, the third stepper motor (102) is reversed, and the two rectangular cutters of the peeling device are transformed to form an angle of 120 degrees; The second stepping motor (107) rotates forward to drive the movable rotating mechanism of the base to slide from the starting position of the peeling device to the direction of the eye removal actuator; The first stepper motor (108) drives the rotating mechanism to rotate to complete the peeling process of the pineapple at both ends; The third stepper motor (102) rotates forward, and the two rectangular cutters of the peeling device are changed to an angle of 180 degrees to complete the peeling of the middle part of the pineapple; The second stepping motor (107) rotates forward to drive the movable rotating mechanism of the base to slide from the peeling area to the eye-removing actuator; The third stepper motor (102) rotates in reverse, changing the two rectangular cutters of the peeling device to form an angle of 120 degrees, and digging out the fruit eyes one by one.
7. A non-visual fully automatic pineapple eye and skin removal control method according to claim 6, characterized in that: The specific steps for collecting the spectral frequency information of the pineapple eye and pulp to be processed are as follows: The surface of the pineapple (100) is cleaned to remove impurities, and 10-15 sampling points are evenly selected along the equator of the fruit, and spectra of the eye area and the flesh area are collected at each point; Use a spectrometer to collect spectral frequency information, collecting spectral data 5-10 times per second; Aim the probe at the center of the fruit eye, keep a distance of 5-10mm, collect the reflection spectrum, and puncture the probe to collect the transmission or diffuse reflection spectrum inside the flesh; Each spectral data is annotated with metadata such as location type, sampling time and fruit number.
8. The non-visual fully automatic pineapple eye and skin removal control method according to claim 6, characterized in that: The specific steps of comparing the spectral frequency information of the pineapple eye and flesh based on the image processing algorithm are as follows: Preprocess the spectral data, including denoising, baseline correction and spectral data standardization; The feature vector is constructed based on the random forest algorithm to extract spectral features, spatial features and texture features; We manually annotated over 500 samples, with over 25,000 pixels for each of the eye and flesh, to construct a training set. We then trained the model using a random forest model with a tree depth of 10 and 100 decision trees. We classified the test images pixel by pixel and output a probability map to distinguish the spectral frequency information of the eye and flesh. Verify the output results based on five-fold cross validation; The validation steps of the five-fold cross-validation method are: The preprocessed spectral data were integrated into a dataset, and the dataset was shuffled and divided into five subsets. The label distribution of each subset was kept consistent with the original dataset. Use the data from the second, third, fourth and fifth subsets to train the support vector machine model and output; Use the first subset data for verification, output the prediction results, and calculate the accuracy; Repeat the verification, use different subsets to verify the output, record the accuracy of each round of verification, and calculate the average accuracy; Observe the fluctuations in accuracy in each round to determine whether the model is significantly affected by data partitioning.
9. The non-visual fully automatic pineapple eye and skin removal control method according to claim 6, characterized in that: The specific steps for generating control instructions based on the path planning algorithm are as follows: Clarify the two-dimensional image coordinate system setting and parameter initialization, convert the two-dimensional image coordinates of the fruit eye into three-dimensional space coordinates, and calculate the tool tip coordinates; A layered scanning strategy is used for path planning. The results are sorted by polar angle within the layer, and the nearest neighbor algorithm is used to optimize the path, taking into account obstacle avoidance and safety distance to generate control instructions. The control instructions include single-eye removal and inter-layer transition types, and the rotation table and robotic arm are synchronized through multi-axis collaborative control.
10. The non-visual fully automatic pineapple eye and skin removal control method according to claim 6, characterized in that: The specific control steps of the collaborative control algorithm are: By using a speed matching algorithm, the linear speed of the tool moving along the surface of the pineapple (100) is coordinated with the angular speed of the rotating mechanism to control the vertical feed speed of the tool; The linear interpolation algorithm is used to interpolate the trajectory, generating a smooth trajectory between adjacent eyes, and the synchronous contact of the rotary axis and the linear axis is performed based on the programmed logic controller; The cutting force is monitored in real time by a force control sensor, and the tool feed speed is adjusted when the force exceeds the threshold. Position deviations are detected by a visual system, and the robot arm joint angles are corrected through inverse kinematics calculations. The diameter of the pineapple (100) is obtained by scanning the outer contour of the pineapple (100) with a laser ranging sensor, and the maximum cross-sectional diameter D of the pineapple (100) is fitted through the multi-point distance data collected by the sensor. After obtaining the diameter data, a mathematical relationship model between the diameter of the pineapple (100) and the depth of the fruit eye is established in combination with the variety characteristics of the pineapple (100) and actual production requirements. The depth of the pineapple knife is calculated based on the formula H=kD+b, where H is the depth of the fruit eye dug out by the pineapple knife, k is a proportional coefficient, D is the maximum cross-sectional area diameter, and b is a correction coefficient. The rotation angle of the rotating mechanism is determined by shooting the surface image of the peeled pineapple (100) with a high-definition camera, identifying the position of the fruit eyes by using an image processing algorithm and calculating the spacing L between adjacent fruit eyes. Based on the structure of the pineapple (100), n fruit eyes are evenly distributed on the circumference of the cross section of the pineapple (100). The angle A of the rotating mechanism is calculated by the formula: A=360° / n, where n is calculated by the circumference C=πD of the pineapple (100) and the spacing L between the fruit eyes, that is, n=C / L. The rotating mechanism adjusts the rotation angle based on the distribution characteristics of the fruit eyes of different pineapples (100) and processes the fruit eyes.