Pitaya variety and quality prediction method based on chromatic aberration analysis
Through the method based on chromatic aberration analysis, the dragon fruit variety identification model and the pulp quality evaluation model are constructed, which solves the problems of low efficiency and poor accuracy of the pulp quality evaluation of the dragon fruit variety and pulp quality, and realizes the automatic sorting and storage optimization of the dragon fruit, extending the high-quality quality retention time.
Patent Information
- Application Number
- CN202510024224.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-05-16
AI Technical Summary
The identification of dragon fruit varieties and maturity lacks efficient and accurate methods, and there are technical difficulties in pulp quality assessment and storage management, resulting in low quality management efficiency, poor accuracy and dispersed process.
Using a chromatic aberration analysis method, through image processing technology and chromatic aberration detection, a dragon fruit variety identification model, a flesh quality index prediction model and a color difference value prediction model are constructed to realize the automated sorting of dragon fruit, flesh quality evaluation and quality change prediction of the storage cycle.
It realizes the rapid and accurate identification and evaluation of dragon fruit varieties and quality, optimizes storage conditions, extends the maintenance time of high-quality quality, reduces storage losses, and enhances the market value and competitiveness of dragon fruit.
Smart Images

Figure CN120014629A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computing resource management, and in particular to a method for predicting dragon fruit varieties and qualities based on color difference analysis. Background Art
[0002] As a popular tropical fruit, the market demand for pitaya is growing year by year. However, quality management has always been a critical and complex issue in the process of planting, picking, transporting and selling pitaya. First, there is a lack of efficient and accurate methods for identifying the variety and maturity of pitaya. At present, most fruit farmers and sellers rely on manual experience to judge the variety and maturity of pitaya. This method is not only inefficient, but also limited in accuracy by the operator's experience level. Since the accurate judgment of variety and maturity directly affects the market positioning and sales value of pitaya, the traditional manual identification method cannot meet the needs of modern agriculture for automation and refined management. In addition, the evaluation and prediction of pitaya pulp quality face technical difficulties. The core indicators of pulp quality include color difference value and quality index. At present, the detection of these indicators mainly relies on manual testing in the laboratory, which is not only time-consuming and labor-intensive, but also difficult to achieve rapid screening of large quantities of pitaya. At the same time, there are large differences in the pulp quality of different batches of pitaya, and traditional evaluation methods are difficult to provide a scientific basis for quality grading and sales. In terms of storage management of pitaya, the lack of scientific storage condition optimization methods is also a long-standing problem. The change in color difference value during the storage period of pitaya directly reflects the deterioration process of pulp quality, but the existing storage management usually fails to fully consider the combined effects of variety, maturity, initial quality and storage temperature and humidity conditions. This management method can easily lead to improper storage conditions, shorten the time that pitaya's high quality can be maintained, and increase storage losses. In addition, the lack of dynamic prediction tools for the change in color difference value and pulp quality status of pitaya during the storage period makes quality monitoring and management during storage more passive. Therefore, in view of the low efficiency, poor accuracy and scattered processes in pitaya variety identification, quality assessment and storage management, there is an urgent need for a scientific and efficient technical method to achieve the variety and quality prediction of pitaya, and provide technical support for improving the market value and competitiveness of pitaya. Summary of the invention
[0003] The present invention solves the problems existing in the above-mentioned prior art and provides a method for predicting dragon fruit varieties and quality based on color difference analysis, which mainly includes:
[0004] Obtain images of dragon fruits of different varieties and maturity, build a dragon fruit variety recognition model, identify the varieties and maturity of dragon fruits, and sort the dragon fruits based on the recognition results of the varieties and maturity of dragon fruits;
[0005] According to the pitaya images that have been sorted, the shape factor and area size of the outer edge contour of the pitaya are calculated, and the pitaya batches are classified using the K-means clustering algorithm;
[0006] Use a colorimeter to detect the color difference of pitaya samples, build a prediction model for pitaya pulp quality indicators, and determine the pulp quality indicators and pulp quality of different batches of pitaya;
[0007] According to the variety, maturity, initial color difference value, storage temperature and humidity of pitaya, a pitaya color difference value prediction model was constructed to predict the change trend of the color difference value of pitaya under different storage conditions during the storage period.
[0008] According to the predicted color difference values of the dragon fruit within the storage period, the quality status of the dragon fruit pulp at different storage time points is judged, and the optimal storage period of the dragon fruit under different storage temperature and humidity conditions is determined;
[0009] According to the evaluation results of pitaya pulp quality during the storage period, the quality distribution under different storage temperature and humidity conditions was statistically analyzed, the storage temperature and humidity range was adjusted to extend the retention time of the high-quality pitaya, and an optimized storage plan was generated.
[0010] Further, the method of acquiring images of dragon fruits of different varieties and maturity, constructing a dragon fruit variety recognition model, identifying the varieties and maturity of dragon fruits, and sorting the dragon fruits based on the recognition results of the varieties and maturity of dragon fruits comprises:
[0011] A camera is used to collect images of dragon fruits of different varieties and maturity, and the data enhancement method is used to expand the dragon fruit image data to obtain an expanded dragon fruit image dataset. The maturity levels include immature, nearly mature and mature. The data enhancement methods include rotation, flipping, and adjusting brightness and contrast. Based on the expanded dragon fruit image dataset, a convolutional neural network is used for model training to build a dragon fruit variety recognition model to identify the variety and maturity of the dragon fruit. According to the recognition results of the dragon fruit variety and maturity, a sorting device is used to sort the dragon fruit.
[0012] Furthermore, the method of calculating the shape factor and area size of the outer edge contour of the pitaya according to the pitaya image after sorting, and using the K-means clustering algorithm to classify the pitaya in batches includes:
[0013] According to the sorted dragon fruit images, the Canny edge detection algorithm is used to extract the outer edge contour of the dragon fruit, and the shape factor and area size of the outer edge contour are calculated, where the shape factor is the ratio of the square of the perimeter to the area; according to the shape factor and area size of the sorted dragon fruit, the K-means clustering algorithm is used to classify the dragon fruit in batches to obtain the batch category to which each dragon fruit sample belongs, and the dragon fruit is stored by batch classification.
[0014] Furthermore, the method of using a colorimeter to detect the color difference value of the dragon fruit sample pulp, constructing a dragon fruit pulp quality index prediction model, and determining the pulp quality index and pulp quality of different batches of dragon fruit includes:
[0015] According to the batch classification results of pitaya, a preset number of pitaya samples were randomly selected from each batch as representative samples by random sampling method; a colorimeter was used to detect the color difference values of the pitaya pulp, including L * 、a * 、b * value; place the pulp on the test platform of the texture analyzer, set a fixed compression ratio and compression speed, measure sample by sample, and record the pulp quality indicators of each sample, including hardness, chewiness and adhesiveness; according to the color difference value of pitaya pulp and the quality index of pitaya pulp, use recurrent neural network for model training, and build a pitaya pulp quality index prediction model; according to the color difference value of the pulp of pitaya samples sampled from different batches, use the pitaya pulp quality index prediction model to determine the pulp quality indicators of pitaya from different batches; according to the pulp quality indicators of pitaya and the quality labeling of pitaya, use random forest algorithm for model training, build a pitaya pulp quality evaluation model, and judge the pulp quality of pitaya. The pulp quality includes high quality, suboptimal and unqualified.
[0016] Furthermore, according to the variety, maturity, initial color difference value, storage temperature and humidity of pitaya, a pitaya color difference value prediction model is constructed to predict the change trend of the color difference value of pitaya under different storage conditions during the storage period, including:
[0017] The colorimeter was used to obtain the initial color difference values of dragon fruit pulp of different varieties and maturity, and the initial state data of each sample was recorded, including the picking time, temperature and humidity conditions. The storage temperature and humidity control equipment was used to simulate the storage period of dragon fruit. By setting different storage temperatures and humidity, the dragon fruits were grouped and stored separately, and the colorimeter was used to regularly detect the L value of each storage group of dragon fruit. * 、a * 、b *The color difference value changes are recorded, and the color difference dynamic data of all pitaya groups are recorded; according to the variety, maturity, initial color difference value, storage temperature and humidity of pitaya, the long short-term memory network is used for model training to build a pitaya color difference value prediction model, and the time series prediction results of the color difference value of pitaya under different storage conditions during the storage period are predicted.
[0018] Furthermore, judging the quality state of the dragon fruit pulp at different storage time points according to the predicted color difference value of the dragon fruit within the storage period, and determining the optimal storage period of the dragon fruit under different storage temperature and humidity conditions, comprises:
[0019] According to the predicted color difference value of pitaya within the storage period, the pitaya pulp quality index prediction model and the pitaya pulp quality evaluation model are used to judge the quality status of pitaya pulp at different storage time points, and an evaluation table of the change of pitaya pulp quality with storage time is obtained; according to the color difference change amplitude within the storage period and the corresponding pulp quality distribution, the optimal storage period of pitaya under different storage temperature and humidity conditions is determined, and the storage period length of each storage condition is recorded; if the change amplitude of the pulp color difference value within the storage period is greater than the preset amplitude threshold or the pulp quality state deterioration rate is greater than the preset speed threshold, the storage temperature and humidity conditions are adjusted.
[0020] Furthermore, according to the evaluation results of dragon fruit pulp quality during the storage period, the quality distribution under different storage temperature and humidity conditions is counted, the storage temperature and humidity range is adjusted to extend the high-quality retention time of the dragon fruit, and an optimized storage plan is generated, including:
[0021] According to the evaluation results of pitaya pulp quality during the storage period, the quality distribution of pitaya under different storage temperature and humidity conditions was statistically analyzed to determine the high-quality retention time of pitaya; by comparing the high-quality retention time under different storage conditions, the influence of storage temperature and humidity on the quality of pitaya was judged, and the quality control effect of each storage temperature and humidity condition was obtained; according to the control effect of storage temperature and humidity conditions on pulp quality, the optimization algorithm was used to adjust the parameters of the storage conditions, and the storage temperature range and humidity range were set as optimization constraints, with the goal of extending the high-quality retention time of pitaya, and the optimal storage temperature and humidity combination of pitaya was obtained; according to the optimal storage temperature and humidity combination, the pitaya color difference value prediction model was used to predict the optimized pitaya pulp quality. The color difference value change trend of dragon fruit is calculated, and the dragon fruit pulp quality index prediction model and the dragon fruit pulp quality evaluation model are used to simulate the storage period under the optimized conditions, judge the improvement of the dragon fruit pulp quality change, and obtain the dragon fruit quality change evaluation table after the optimized storage conditions; according to the quality change evaluation table after the optimized storage conditions, it is compared with the evaluation table under the original storage conditions to judge the improvement degree of the effect of optimizing the storage temperature and humidity conditions on the extension of the dragon fruit pulp quality; if the evaluation result shows that the improvement degree is lower than the preset degree threshold, the parameter range and constraint conditions of the optimization algorithm are adjusted, and the storage condition combination is regenerated until the evaluation result shows that the improvement degree is higher than the preset degree threshold, and the pitaya optimized storage plan is output.
[0022] The technical solution provided by the embodiment of the present invention may have the following beneficial effects:
[0023] The present invention provides a method for predicting the variety and quality of pitaya based on color difference analysis. The present invention utilizes image processing technology and a variety recognition model to quickly and accurately identify the variety and maturity of pitaya, realize automatic sorting of pitaya, and reduce the error of manual operation. By calculating the shape factor and area size of pitaya, and adopting the K-means clustering algorithm to classify batches, a scientific and reliable batch management basis is provided for subsequent storage and quality monitoring. By using a colorimeter to detect the color difference value of the pulp, combined with a pulp quality index prediction model, the pulp quality index and pulp quality state of different batches of pitaya can be quickly evaluated, providing scientific support for pulp quality grading and market sales. Through the color difference value prediction model and storage condition simulation, the color difference value and quality change trend of pitaya during the storage period are accurately predicted, providing a reliable basis for optimizing storage conditions and extending the high-quality quality retention time. Further combined with the optimization algorithm to adjust the storage temperature and humidity conditions, the high-quality quality retention time of pitaya is effectively extended, and the loss during storage is reduced. The present invention comprehensively improves the scientificity and intelligence level of pitaya in the process of variety and quality prediction, batch management and storage optimization, provides an efficient and reliable technical solution for the pitaya industry, reduces losses, and improves the overall efficiency and market competitiveness of the industry. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a flow chart of a method for predicting dragon fruit varieties and quality based on color difference analysis of the present invention;
[0025] Figure 2 It is a schematic diagram of a method for predicting dragon fruit varieties and qualities based on color difference analysis of the present invention. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0027] like Figure 1-2 In this embodiment, a method for predicting dragon fruit varieties and quality based on color difference analysis may specifically include:
[0028] Step S101, obtaining images of dragon fruits of different varieties and maturity, constructing a dragon fruit variety recognition model, identifying the varieties and maturity of dragon fruits, and sorting the dragon fruits based on the recognition results of the varieties and maturity of dragon fruits.
[0029] A camera is used to collect images of dragon fruits of different varieties and maturity, and the dragon fruit image data is expanded using data enhancement methods to obtain an expanded dataset of dragon fruit images. The maturity levels include immature, nearly mature, and mature. The data enhancement methods include rotation, flipping, and adjusting brightness and contrast. Based on the expanded dataset of dragon fruit images, a convolutional neural network is used for model training to build a dragon fruit variety recognition model to identify the variety and maturity of dragon fruit. According to the recognition results of the dragon fruit variety and maturity, a sorting device is used to sort the dragon fruit.
[0030] Exemplarily, 3,000 images of Hainan red pitaya, Vietnamese white pitaya and Hainan Qilin bird's nest fruit were collected by camera, and 500 images of each variety were collected in immature, nearly mature and mature states, totaling 1,500 original images. In order to expand the data set, data enhancement operations were performed on each original image, including random rotation of 90 degrees, 180 degrees and 270 degrees, horizontal flipping and vertical flipping, and adjusting the brightness range between 0.8 and 1.2, and the contrast range between 0.8 and 1.2. After expansion, 15,000 enhanced pitaya images were obtained. According to the expanded pitaya image data set, the ResNet50 convolutional neural network was used for model training. During the training process, 80% of the data was used for the training set, 20% of the data was used for the validation set, the learning rate was set to 0.001, the batch size was 32, and after 50 rounds of iterative training, the accuracy of the model on the validation set reached 94.8%. According to the trained pitaya variety and maturity recognition model, a batch of mixed pitaya images were input into the model, including 600 Hainan red pitaya, 400 Vietnamese white pitaya and 500 Hainan Qilin bird's nest fruit. The recognition results showed that among the Hainan red pitaya, 200 were immature, 250 were nearly mature, and 150 were mature. Among the Vietnamese white pitaya, 150 were immature, 180 were nearly mature, and 70 were mature. Among the Hainan Qilin bird's nest fruit, 180 were immature, 200 were nearly mature, and 120 were mature. According to the recognition results, the pitaya were transported to the automatic sorting device, divided according to the variety and maturity, and each type of pitaya was stored in a designated storage container after sorting.
[0031] Step S102, based on the pitaya images that have been sorted, the shape factor and area size of the outer edge contour of the pitaya are calculated, and the pitayas are batch-classified using a K-means clustering algorithm.
[0032] According to the sorted dragon fruit images, the Canny edge detection algorithm is used to extract the outer edge contour of the dragon fruit, and the shape factor and area size of the outer edge contour are calculated, where the shape factor is the ratio of the square of the perimeter to the area. According to the shape factor and area size of the sorted dragon fruit, the K-means clustering algorithm is used to classify the dragon fruit in batches, obtain the batch category to which each dragon fruit sample belongs, and store the dragon fruit by batch classification.
[0033] For example, based on the sorted dragon fruit images, the sorted dragon fruits are batch classified, and the outer edge contours of 300 dragon fruit samples are extracted. These samples have been preliminarily sorted according to variety and maturity. Each dragon fruit image is processed using the Canny edge detection algorithm to obtain the outer edge line data of the dragon fruit, and calculate the shape factor and area size of each sample. The shape factor is calculated by dividing the square of the perimeter by the area. For example, if the outer edge perimeter of a dragon fruit is 38.6 pixels and the area is 120.8 pixels squared, then its shape factor is 38.6. 2 / 120.8=12.35. The shape factor and area size data of 300 pitaya samples were obtained by calculation, where the shape factor ranged from 12.0 to 18.0 and the area size ranged from 100 to 150 square pixels. Based on these shape factor and area size data, the K-means clustering algorithm was used to classify the pitaya samples into batches, with the goal of dividing them into 5 batches with similar shape factors and area sizes, and the number of cluster centers was set to 5. The clustering algorithm dynamically adjusted the category of each sample by iteratively calculating the Euclidean distance between the sample and the cluster center. The final classification result was that batch 1 had a shape factor range of 12.0 to 13.0 and an area size range of 100 to 115 square pixels, with a total of 65 pitayas. Batch 2 had a shape factor range of 13.1 to 14.5 and an area size range of 116 to 125 square pixels, with a total of 70 pitayas. Batch 3 has a shape factor range of 14.6 to 15.5, an area size range of 126 to 135 square pixels, and a total of 55 dragon fruits. Batch 4 has a shape factor range of 15.6 to 16.5, an area size range of 136 to 145 square pixels, and a total of 60 dragon fruits. Batch 5 has a shape factor range of 16.6 to 18.0, an area size range of 146 to 150 square pixels, and a total of 50 dragon fruits. After the classification is completed, the dragon fruits of each batch are numbered and stored separately in different storage areas, such as batch 1 is stored in cold box 1, batch 2 is stored in cold box 2, and so on. Batch classification ensures that dragon fruits with similar shape factors and area sizes are classified into the same batch.
[0034] Step S103, using a colorimeter to detect the color difference value of the dragon fruit sample pulp, constructing a dragon fruit pulp quality index prediction model, and determining the pulp quality index and pulp quality of different batches of dragon fruit.
[0035] According to the batch classification results of pitaya, a preset number of pitaya samples were randomly selected from each batch as representative samples by random sampling. The color difference value of the pitaya pulp was detected by a colorimeter, including L * 、a * 、b *value. Place the pulp on the test platform of the texture analyzer, set a fixed compression ratio and compression speed, measure sample by sample, and record the pulp quality indicators of each sample, including hardness, chewiness and adhesiveness. According to the color difference value of pitaya pulp and the quality index of pitaya pulp, a recurrent neural network is used for model training to construct a pitaya pulp quality index prediction model. According to the color difference values of the pulp of pitaya samples sampled from different batches, the pitaya pulp quality index prediction model is used to determine the pulp quality indicators of pitaya from different batches. According to the pulp quality indicators of pitaya and the quality labeling of pitaya, a random forest algorithm is used for model training to construct a pitaya pulp quality evaluation model to judge the pulp quality of pitaya. The pulp quality includes high quality, suboptimal, and unqualified.
[0036] For example, according to the batch classification results of pitaya, 10 pitaya samples are randomly selected from each batch, and a total of 50 pitaya samples are selected from batches 1 to 5 as representative samples. The color difference values of the pulp of these samples are detected using a colorimeter, where the L value of batch 1 sample is * The values range from 48.2 to 51.6, a * The value range is 16.5 to 18.8, b * The values ranged from 3.1 to 4.9, and the L * The values range from 45.7 to 49.3, a * The values range from 17.2 to 19.4, b * The value range is 3.5 to 5.2, and the color difference values of the remaining batches of samples are recorded and stored in categories. Each sample of pulp is placed on the test platform of the texture analyzer, and the compression ratio is set to 50% and the compression speed is 2mm / s. The hardness, chewiness and adhesiveness of the pulp are tested one by one. For example, the hardness of batch 1 samples ranges from 3.5 to 4.2N, the chewiness ranges from 8.2 to 9.6N·mm, and the adhesiveness ranges from 6.1 to 7.4N. The remaining batches of samples are tested and recorded in turn.
[0037] Based on the color difference values and pulp quality indicators of 50 samples, a recurrent neural network was used for model training. The inputs included L * 、a * 、b *The values and corresponding hardness, chewiness, and adhesiveness data are used to train the pitaya pulp quality index prediction model, which is used to predict the quality indicators of pitaya samples. The color difference values of the remaining 90 samples of batch 1 are input into the pitaya pulp quality index prediction model to predict the hardness, chewiness, and adhesiveness of these samples. For example, the prediction results show that the hardness range of pitaya in batch 1 is 3.6 to 4.1N, the chewiness range is 8.3 to 9.4N·mm, and the adhesiveness range is 6.0 to 7.3N. The quality indicators of the remaining batches of samples are predicted and recorded in turn. According to the quality labeling data of pitaya, the samples are divided into three categories: high-quality, suboptimal, and unqualified. For example, the pulp with a hardness of 3.5 to 4.0N, a chewiness greater than 8.5N·mm, and an adhesiveness greater than 6.2N is labeled as high-quality, the pulp below the above range but with a hardness greater than 3.0N is suboptimal, and the pulp below 3.0N is unqualified. The labeled data and pulp quality index data are input into the random forest algorithm for model training to build a dragon fruit pulp quality evaluation model. According to the dragon fruit pulp quality evaluation model, the pulp quality distribution of different batches of dragon fruit is judged. For example, 70% of the samples in batch 1 are rated as high-quality, 20% are suboptimal, and 10% are unqualified. In batch 2, 60% are high-quality, 30% are suboptimal, and 10% are unqualified. The sample quality distribution of batches 3 to 5 is analyzed and recorded in turn, and finally the pulp quality evaluation of all batches of dragon fruit is completed to determine its quality grading results.
[0038] Step S104, constructing a pitaya color difference value prediction model according to the variety, maturity, initial color difference value, storage temperature and humidity of the pitaya, and predicting the change trend of the color difference value of the pitaya under different storage conditions during the storage period.
[0039] The colorimeter was used to obtain the initial color difference values of dragon fruit pulp of different varieties and maturity, and the initial state data of each sample was recorded, including the picking time, temperature and humidity conditions. The storage temperature and humidity control equipment was used to simulate the storage period of dragon fruit. By setting different storage temperatures and humidities, the dragon fruit was grouped and stored separately, and the colorimeter was used to regularly detect the L value of each storage group of dragon fruit. * 、a * 、b * The color difference dynamic data of all pitaya groups are recorded. According to the variety, maturity, initial color difference value, storage temperature and humidity of pitaya, the model is trained using long short-term memory network to build a pitaya color difference value prediction model, and the time series prediction results of the color difference value of pitaya under different storage conditions during the storage period are predicted.
[0040] For example, the colorimeter was used to obtain the initial color difference values of 90 dragon fruit samples, including 30 Hainan red dragon fruits, 30 Vietnamese white dragon fruits, and 30 Hainan Qilin bird's nest fruits. Each variety of dragon fruit was evenly grouped according to three maturity levels: immature, nearly mature, and mature, with 10 samples in each group. The initial color difference value test results showed that the L * The value is between 48.0 and 50.5, a * The value is between 15.5 and 18.2, b * The value is between 3.0 and 4.5. The L * The value is between 53.0 and 55.5, a * The value is between 12.8 and 14.5, b * The value is between 5.0 and 6.8. The L * The value is between 46.5 and 49.0, a * Values between 18.5 and 20.0, b * The value is between 2.8 and 4.2. At the same time, the initial state data of each sample was recorded, including the picking time of December 1, 2020, the initial temperature and humidity of 25°C, and the relative humidity of 60%. The 90 pitaya samples were divided into three groups, with 30 samples in each group, and storage temperature and humidity control equipment was used to simulate the storage cycle of pitaya. The storage conditions of the three groups of samples were set as follows: the first group had a temperature of 5°C and a humidity of 70%, the second group had a temperature of 10°C and a humidity of 50%, and the third group had a temperature of 15°C and a humidity of 40%. During the storage process, the L of each group of samples was measured every 3 days using a colorimeter. * 、a * 、b * The values are tested regularly and the dynamic changes of the color difference values are recorded. For example, on the sixth day of storage, the L value of the first group of Hainan red pitaya * The value dropped to 47.2, a * The value rises to 16.8, b * The value dropped to 3.8. The second group of Vietnamese white dragon fruit L * The value dropped to 52.2, a * The value dropped to 13.8, b * The value remained at around 5.5. The L * The value dropped to 45.8, a * The value dropped to 19.2, b * The value dropped to 3.2. The color difference dynamic data during all storage periods were recorded. According to the variety, maturity, initial color difference value, and corresponding storage temperature and humidity conditions of pitaya, the data were trained using a long short-term memory network. The input variables included storage time, temperature, humidity, initial L * 、a * 、b* The output variable is the time series of color difference values during the storage period, and the dragon fruit color difference prediction model is constructed. After the training is completed, the model is used to predict the color difference changes of dragon fruit during the storage period. For example, the predicted L value of Hainan red dragon fruit in the first group on the 12th day of storage is * The value is 46.5, a * The value is 17.5, b * The value is 3.5, and the mean square error with the actual detection value is 0.3. The predicted L of the second group of Vietnamese white dragon fruit * The value is 51.5, a * The value is 13.2, b * The value is 5.3, and the error from the actual value is 0.4. The predicted L of the third group of Hainan Qilin bird's nest fruit * The value is 44.8, a * The value is 18.9, b * The value is 3.1, and the error from the actual value is 0.5. The time series prediction results of the color difference value of pitaya under different storage conditions are generated based on the model output results.
[0041] Step S105, judging the quality status of the dragon fruit pulp at different storage time points according to the predicted color difference value of the dragon fruit within the storage period, and determining the optimal storage period of the dragon fruit under different storage temperature and humidity conditions.
[0042] According to the predicted color difference value of pitaya during the storage period, the pitaya pulp quality index prediction model and the pitaya pulp quality evaluation model are used to judge the quality status of pitaya pulp at different storage time points, and an evaluation table of the change of pitaya pulp quality with storage time is obtained. According to the color difference change amplitude during the storage period and the corresponding pulp quality distribution, the optimal storage period of pitaya under different storage temperature and humidity conditions is determined, and the storage period length of each storage condition is recorded. If the change amplitude of the pulp color difference value during the storage period is greater than the preset amplitude threshold or the pulp quality state deterioration rate is greater than the preset speed threshold, the storage temperature and humidity conditions are adjusted.
[0043] For example, according to the predicted color difference value change data of pitaya during the storage period, combined with the pitaya pulp quality index prediction model and the pulp quality evaluation model, the quality status of pitaya pulp at different storage time points is judged. Under the conditions of storage temperature of 5°C and humidity of 70%, the color difference value L of Hainan red pitaya on the third day of storage is * is 47.8, a * is 16.5, b * The pulp quality was evaluated as high quality on the 9th day of storage. * Down to 46.2, a * Rising to 17.3, b *was 3.5, and the pulp quality evaluation result was suboptimal. On the 15th day of storage, L * Down to 44.8, a * Increased to 18.0, b * The pulp quality evaluation result was unqualified when the color difference value L dropped to 3.2. The pulp quality distribution under storage temperature and humidity conditions was recorded according to the evaluation results, of which 30% were high-quality samples, 50% were suboptimal, and 20% were unqualified. Under storage conditions of 10°C and 50% humidity, the quality change evaluation table of Vietnamese white dragon fruit showed that on the third day of storage, the color difference value L * is 52.5, a * is 13.8, b * The result was 5.6, which was evaluated as high quality. On the 9th day of storage, L * Down to 51.0, a * is 14.5, b * The L * Down to 49.8, a * is 15.2, b * is 4.9, and the evaluation result is unqualified. The distribution of pulp quality under this storage condition is recorded as 25% high-quality, 40% suboptimal, and 35% unqualified. According to the color difference change range and the distribution of pulp quality status during the storage period, it is determined that under the conditions of 5°C and 70% humidity, the optimal storage period of Hainan red dragon fruit is 9 days. Under the conditions of 10°C and 50% humidity, the optimal storage period of Vietnamese white dragon fruit is 6 days. For the storage temperature of 15°C and humidity of 40%, the quality of Hainan Kirin Bird's Nest Fruit was high-quality on the 3rd day of storage, but on the 6th day, L * The value dropped rapidly to 45.5, a * The value rises to 19.0, b * The value dropped to 3.0, and the quality evaluation result was suboptimal. On the 9th day, it further dropped to unqualified, and the optimal storage period was determined to be 3 days. If the change in color difference value exceeds the preset threshold under certain storage conditions, such as L * The value changes beyond the preset L * Threshold 3.0, or a * The value changes by more than the preset value a * Change threshold, or b * The value changes by more than the preset b *The change threshold is 2.0, or the deterioration rate of the pulp quality is higher than the preset speed threshold, and the average daily quality ratio decreases by more than 15%. For example, under the conditions of 15°C and 40% humidity, the quality of Hainan Qilin Bird's Nest Fruit deteriorates rapidly from high quality to unqualified within 6 days of storage. The storage temperature and humidity conditions are adjusted, and the temperature is reduced from 15°C to 10°C, and the humidity is adjusted from 40% to 60%. The quality change data within the adjusted storage period is re-recorded, and it is found that the optimal storage period of Hainan Qilin Bird's Nest Fruit is extended to 6 days, ensuring that the pulp quality state is effectively improved after the storage conditions are optimized.
[0044] Step S106, according to the dragon fruit pulp quality evaluation results during the storage period, the quality distribution under different storage temperature and humidity conditions is statistically analyzed, the storage temperature and humidity range is adjusted to extend the high-quality retention time of the dragon fruit, and an optimized storage plan is generated.
[0045] According to the evaluation results of the dragon fruit pulp quality during the storage period, the quality distribution of dragon fruit under different storage temperature and humidity conditions was statistically analyzed to determine the high-quality retention time of dragon fruit. By comparing the high-quality retention time under different storage conditions, the influence of storage temperature and humidity on the quality of dragon fruit was judged, and the quality control effect of each storage temperature and humidity condition was obtained. According to the control effect of storage temperature and humidity conditions on pulp quality, the storage conditions were adjusted by optimization algorithm, and the storage temperature range and humidity range were set as optimization constraints. The optimal storage temperature and humidity combination of dragon fruit was obtained with the goal of extending the high-quality retention time of dragon fruit. According to the optimal storage temperature and humidity combination, the dragon fruit color difference value prediction model was used to predict the trend of the optimized dragon fruit color difference value change, and the dragon fruit pulp quality index prediction model and the dragon fruit pulp quality evaluation model were used to simulate the storage period under the optimized conditions, judge the improvement of the dragon fruit pulp quality change, and obtain the evaluation table of the dragon fruit quality change after the optimized storage conditions. According to the quality change evaluation table after optimizing the storage conditions, it is compared with the evaluation table under the original storage conditions to determine the degree of improvement of the effect of optimizing the storage temperature and humidity conditions on the quality extension of the dragon fruit pulp. If the evaluation result shows that the improvement is lower than the preset threshold, the parameter range and constraint conditions of the optimization algorithm are adjusted, and the storage condition combination is regenerated until the evaluation result shows that the improvement is higher than the preset threshold, and the optimized storage plan for dragon fruit is output.
[0046] Exemplarily, according to the evaluation results of the pulp quality of pitaya during the storage period, it is found that under the conditions of 5°C and 70% humidity, the high-quality quality of Hainan red pitaya is maintained for 9 days, the high-quality quality of Vietnamese white pitaya is maintained for 7 days, and the high-quality quality of Hainan Qilin bird's nest fruit is maintained for 5 days. Under the conditions of 10°C and 50% humidity, the high-quality quality of Hainan red pitaya is maintained for 6 days, the high-quality quality of Vietnamese white pitaya is maintained for 5 days, and the high-quality quality of Hainan Qilin bird's nest fruit is maintained for 3 days. Under the conditions of 15°C and 40% humidity, the high-quality quality of all pitaya varieties is maintained for less than 3 days. By comparing these data, the influence of storage temperature and humidity conditions on the quality of pitaya is judged, and the quality control effect obtained shows that the lower temperature of 5°C and the moderate humidity of 70% are more advantageous for extending the high-quality quality retention time of pitaya, while the high temperature and low humidity of 15°C and 40% humidity will significantly accelerate the deterioration of pulp quality. According to the regulating effect of storage temperature and humidity conditions on pulp quality, a genetic algorithm was used to adjust the storage conditions parameters, and the storage temperature range was set to 3°C to 8°C, and the humidity range was set to 60% to 80% as optimization constraints, with the goal of extending the high-quality retention time of pitaya. Through algorithm iterative optimization, the optimal storage temperature and humidity combination for pitaya was found to be 4°C and 75% humidity. Based on this optimized combination, the pitaya color difference value prediction model was used to predict the trend of color difference value changes during the optimized storage period. The prediction showed that Hainan red pitaya had a 12-day storage temperature of 4°C and a humidity of 75%. * The value is 47.0, a * The value is 16.5, b * The value is 3.8. The L * The value is 52.0, a * The value is 13.5, b * The value is 5.2. The Hainan Qilin bird's nest fruit is stored for 8 days. * The value is 45.5, a * The value is 18.5, b *The value is 3.5. These predicted values all indicate that the color difference change has slowed down. The pitaya pulp quality index prediction model and the pulp quality evaluation model were used to simulate the storage period under the optimized conditions to determine the improvement of pulp quality changes. Under the optimized conditions, the high-quality retention time of Hainan red pitaya was extended to 12 days, Vietnamese white pitaya was extended to 10 days, and Hainan Qilin bird's nest fruit was extended to 8 days. The pitaya quality change evaluation table under the optimized storage conditions was recorded and compared with the evaluation table under the original storage conditions, such as 10°C and 50% humidity. It was found that the degree of improvement in the effect of optimizing storage conditions on the extension of pitaya pulp quality was 33.3% for Hainan red pitaya, 42.9% for Vietnamese white pitaya, and 60% for Hainan Qilin bird's nest fruit. If the evaluation results show that the degree of improvement under certain conditions is lower than the preset improvement threshold of 30%, such as Hainan red pitaya does not reach the improvement target under certain initial conditions, the parameter range of the optimization algorithm is adjusted, the temperature range is adjusted to 3°C to 6°C, and the humidity range is adjusted to 70% to 80%, and the storage condition combination is regenerated, and the simulation and evaluation process is repeated until the optimization effect reaches the preset improvement target. Finally, the optimized storage plan for pitaya is output, and the storage conditions of 4°C and 75% humidity are recommended to maximize the extension of the high-quality retention time of pitaya.
[0047] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the concept of the present application. The above exemplary features are replaced with the technical features with similar functions disclosed in the present application (but not limited to) to form a technical solution.
Claims
1. A method for predicting dragon fruit varieties and quality based on color difference analysis, characterized in that: The method comprises: Obtain images of dragon fruits of different varieties and maturity, build a dragon fruit variety recognition model, identify the varieties and maturity of dragon fruits, and sort the dragon fruits based on the recognition results of the varieties and maturity of dragon fruits; According to the pitaya images that have been sorted, the shape factor and area size of the outer edge contour of the pitaya are calculated, and the pitaya batches are classified using the K-means clustering algorithm; Use a colorimeter to detect the color difference of pitaya samples, build a prediction model for pitaya pulp quality indicators, and determine the pulp quality indicators and pulp quality of different batches of pitaya; According to the variety, maturity, initial color difference value, storage temperature and humidity of pitaya, a pitaya color difference value prediction model was constructed to predict the change trend of the color difference value of pitaya under different storage conditions during the storage period. According to the predicted color difference values of the dragon fruit within the storage period, the quality status of the dragon fruit pulp at different storage time points is judged, and the optimal storage period of the dragon fruit under different storage temperature and humidity conditions is determined; According to the evaluation results of pitaya pulp quality during the storage period, the quality distribution under different storage temperature and humidity conditions was statistically analyzed, the storage temperature and humidity range was adjusted to extend the retention time of the high-quality pitaya, and an optimized storage plan was generated.
2. The method according to claim 1, wherein: The method of obtaining dragon fruit images of different varieties and maturity, constructing a dragon fruit variety recognition model, identifying the varieties and maturity of the dragon fruit, and sorting the dragon fruit based on the recognition results of the varieties and maturity of the dragon fruit is characterized in that: A camera is used to collect images of dragon fruits of different varieties and maturity, and the data enhancement method is used to expand the dragon fruit image data to obtain an expanded dragon fruit image dataset. The maturity levels include immature, nearly mature and mature. The data enhancement methods include rotation, flipping, and adjusting brightness and contrast. Based on the expanded dragon fruit image dataset, a convolutional neural network is used for model training to build a dragon fruit variety recognition model to identify the variety and maturity of the dragon fruit. According to the recognition results of the dragon fruit variety and maturity, a sorting device is used to sort the dragon fruit.
3. The method according to claim 1, wherein: The method calculates the shape factor and area size of the outer edge contour of the pitaya according to the pitaya image after sorting, and uses the K-means clustering algorithm to classify the pitaya in batches, characterized in that: According to the sorted dragon fruit images, the Canny edge detection algorithm is used to extract the outer edge contour of the dragon fruit, and the shape factor and area size of the outer edge contour are calculated, where the shape factor is the ratio of the square of the perimeter to the area; according to the shape factor and area size of the sorted dragon fruit, the K-means clustering algorithm is used to classify the dragon fruit in batches to obtain the batch category to which each dragon fruit sample belongs, and the dragon fruit is stored by batch classification.
4. The method according to claim 1, wherein: The method uses a colorimeter to detect the color difference value of the dragon fruit sample pulp, constructs a dragon fruit pulp quality index prediction model, and determines the pulp quality index and pulp quality of different batches of dragon fruit, characterized in that: According to the batch classification results of pitaya, a preset number of pitaya samples were randomly selected from each batch as representative samples by random sampling method; a colorimeter was used to detect the color difference values of the pitaya pulp, including L * 、a * 、b * value; place the pulp on the test platform of the texture analyzer, set a fixed compression ratio and compression speed, measure sample by sample, and record the pulp quality indicators of each sample, including hardness, chewiness and adhesiveness; according to the color difference value of pitaya pulp and the quality index of pitaya pulp, use recurrent neural network for model training, and build a pitaya pulp quality index prediction model; according to the color difference value of the pulp of pitaya samples sampled from different batches, use the pitaya pulp quality index prediction model to determine the pulp quality indicators of pitaya from different batches; according to the pulp quality indicators of pitaya and the quality labeling of pitaya, use random forest algorithm for model training, build a pitaya pulp quality evaluation model, and judge the pulp quality of pitaya. The pulp quality includes high quality, suboptimal and unqualified.
5. The method according to claim 1, wherein: According to the variety, maturity, initial color difference value, storage temperature and humidity of pitaya, a pitaya color difference value prediction model is constructed to predict the change trend of the color difference value of pitaya under different storage conditions during the storage period, characterized in that: The colorimeter was used to obtain the initial color difference values of dragon fruit pulp of different varieties and maturity, and the initial state data of each sample was recorded, including the picking time, temperature and humidity conditions. The storage temperature and humidity control equipment was used to simulate the storage period of dragon fruit. By setting different storage temperatures and humidity, the dragon fruits were grouped and stored separately, and the colorimeter was used to regularly detect the L value of each storage group of dragon fruit. * 、a * 、b * The color difference value changes are recorded, and the color difference dynamic data of all pitaya groups are recorded; according to the variety, maturity, initial color difference value, storage temperature and humidity of pitaya, the long short-term memory network is used for model training to build a pitaya color difference value prediction model, and the time series prediction results of the color difference value of pitaya under different storage conditions during the storage period are predicted.
6. The method according to claim 1, wherein: The method comprises: judging the quality state of the dragon fruit pulp at different storage time points according to the color difference value of the dragon fruit within the storage period obtained by prediction, and determining the optimal storage period of the dragon fruit under different storage temperature and humidity conditions, characterized in that: According to the predicted color difference value of pitaya within the storage period, the pitaya pulp quality index prediction model and the pitaya pulp quality evaluation model are used to judge the quality status of pitaya pulp at different storage time points, and an evaluation table of the change of pitaya pulp quality with storage time is obtained; according to the color difference change amplitude within the storage period and the corresponding pulp quality distribution, the optimal storage period of pitaya under different storage temperature and humidity conditions is determined, and the storage period length of each storage condition is recorded; if the change amplitude of the pulp color difference value within the storage period is greater than the preset amplitude threshold or the pulp quality state deterioration rate is greater than the preset speed threshold, the storage temperature and humidity conditions are adjusted.
7. The method according to claim 1, wherein: The method comprises the following steps: according to the evaluation results of the quality of the dragon fruit pulp during the storage period, the quality distribution under different storage temperature and humidity conditions is statistically analyzed, the storage temperature and humidity range is adjusted to extend the high-quality retention time of the dragon fruit, and an optimized storage plan is generated, wherein: According to the evaluation results of pitaya pulp quality during the storage period, the quality distribution of pitaya under different storage temperature and humidity conditions was statistically analyzed to determine the high-quality retention time of pitaya; by comparing the high-quality retention time under different storage conditions, the influence of storage temperature and humidity on the quality of pitaya was judged, and the quality control effect of each storage temperature and humidity condition was obtained; according to the control effect of storage temperature and humidity conditions on pulp quality, the optimization algorithm was used to adjust the parameters of the storage conditions, and the storage temperature range and humidity range were set as optimization constraints, with the goal of extending the high-quality retention time of pitaya, and the optimal storage temperature and humidity combination of pitaya was obtained; according to the optimal storage temperature and humidity combination, the pitaya color difference value prediction model was used to predict the optimized pitaya pulp quality. The color difference value change trend of dragon fruit is calculated, and the dragon fruit pulp quality index prediction model and the dragon fruit pulp quality evaluation model are used to simulate the storage period under the optimized conditions, judge the improvement of the dragon fruit pulp quality change, and obtain the dragon fruit quality change evaluation table after the optimized storage conditions; according to the quality change evaluation table after the optimized storage conditions, it is compared with the evaluation table under the original storage conditions to judge the improvement degree of the effect of optimizing the storage temperature and humidity conditions on the extension of the dragon fruit pulp quality; if the evaluation result shows that the improvement degree is lower than the preset degree threshold, the parameter range and constraint conditions of the optimization algorithm are adjusted, and the storage condition combination is regenerated until the evaluation result shows that the improvement degree is higher than the preset degree threshold, and the pitaya optimized storage plan is output.