Tricholoma matsutake quality monitoring method and system
By using a multi-dimensional quantitative evaluation system based on image and spectral information, the problem of human subjectivity in matsutake quality monitoring has been solved, and objective quantification and dynamic monitoring of matsutake quality have been achieved. This system is suitable for the storage, preservation, and cold chain logistics of matsutake.
Patent Information
- Application Number
- CN202611207642.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-11
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2046-08-11
AI Technical Summary
Current technologies rely on manual sensory evaluation for matsutake mushroom quality monitoring. This is highly subjective, makes it difficult to form a unified, objective, and quantifiable evaluation system, and makes it impossible to conduct standardized quality monitoring for each matsutake mushroom.
By acquiring image and spectral information of matsutake mushrooms, morphological parameters, color parameters, and spectral characteristics are calculated to construct a multi-dimensional quantitative evaluation system, including morphological uniformity coefficient, color coefficient, appearance morphology coefficient, and internal characteristic coefficient. Finally, a comprehensive quality coefficient is generated, and quality monitoring is carried out in combination with time-series data analysis.
It enables objective quantification and dynamic monitoring of matsutake mushroom quality, improves monitoring accuracy, reduces subjective human judgment bias, and provides timely warnings of quality deterioration trends. It is suitable for the storage, preservation, and cold chain logistics of matsutake mushrooms.
Smart Images

Figure CN122709354B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of edible fungi quality monitoring technology, and in particular to a method and system for monitoring the quality of matsutake mushrooms. Background Technology
[0002] Matsutake mushrooms, a precious and rare edible fungus, enjoy a high reputation in the international market and are known as the "King of Mushrooms" due to their unique aroma, delicious taste, and rich nutritional value. The quality of matsutake mushrooms directly determines their economic value and food safety level. Precise, rapid, and non-destructive monitoring of matsutake quality throughout the entire chain—from harvesting and grading to storage, cold chain logistics, and market circulation—is crucial for ensuring their commercial value, extending shelf life, and meeting consumers' demand for high-quality ingredients. However, the quality monitoring of matsutake mushrooms mainly relies on manual sensory evaluation, which is carried out by experienced graders through visual observation. However, manual evaluation standards are highly subjective, making it difficult to form a unified, objective, and quantifiable quality evaluation system. Long hours of work can easily lead to visual fatigue and judgment bias, and it is also impossible to conduct standardized quality monitoring for each matsutake mushroom. Therefore, a matsutake mushroom quality monitoring method is needed to solve the above problems. Summary of the Invention
[0003] The purpose of this invention is to provide a method for monitoring the quality of matsutake mushrooms, comprising: Acquire image and spectral information of the matsutake mushroom to be tested, wherein the image information includes morphological parameter information and color parameter information; Based on the morphological parameter information, obtain cap diameter data and stipe length data, and obtain morphological uniformity coefficient based on cap diameter data and stipe length data; The main color tone value and color uniformity value of the cap are obtained based on the color parameter information, and the color coefficient is obtained based on the main color tone value and color uniformity value of the cap. The appearance morphology coefficient is obtained based on the morphological uniformity coefficient and the chromaticity coefficient. Based on the spectral information, obtain moisture content data and relative content data of characteristic aroma components, and obtain internal characteristic coefficients based on the moisture content data and the relative content data of characteristic aroma components; A comprehensive quality coefficient is obtained based on the appearance morphology coefficient and the internal characteristic coefficient. The quality of the matsutake mushroom to be tested is monitored based on the internal characteristic coefficient to obtain the quality monitoring result.
[0004] Preferably, the step of obtaining cap diameter data and stipe length data based on the morphological parameter information, and obtaining a morphological uniformity coefficient based on the cap diameter data and stipe length data, includes: Edge detection is performed on the morphological parameter information to obtain the outline of the matsutake mushroom to be tested. The mushroom cap projection area is obtained by fitting the outline. The minimum circumcircle corresponding to the mushroom cap projection area is obtained by the mushroom cap projection area. The diameter of the minimum circumcircle is used as the mushroom cap diameter data. The main stem axis information of the matsutake mushroom to be tested is obtained based on the morphological parameter information, and the pixel distance from the stipe starting point to the connection point between the cap and the stipe is obtained based on the main stem axis information. The pixel distance is converted into stipe length based on a preset calibration ratio, and the stipe length is used as stipe length data. Obtain a preset standard matsutake morphology template, and extract the standard cap diameter range and standard stipe length range from the standard matsutake morphology template; The diameter deviation rate is calculated based on the cap diameter data and the standard cap diameter range, and the length deviation rate is calculated based on the stipe length data and the standard stipe length range. Obtain the preset ideal ratio value between the cap and the stem, and calculate the actual ratio value based on the cap diameter data and the stem length data; The ratio deviation coefficient is obtained based on the actual ratio value and the ideal ratio value; The morphological symmetry coefficient is obtained by weighting and fusing the diameter deviation rate, length deviation rate, and proportional deviation coefficient.
[0005] Preferably, the step of obtaining the main color tone value and the color uniformity value of the cap based on the color parameter information, and obtaining the color coefficient based on the main color tone value and the color uniformity value of the cap, includes: Obtain a preset standard colorimetric database, and extract the standard primary color value and standard color uniformity threshold corresponding to the matsutake variety from the standard colorimetric database; The color difference vector is calculated based on the main color value of the cap and the standard main color value, and the main color deviation index is obtained based on the magnitude of the color difference vector. The uniformity value of the cap color is normalized to obtain a uniformity normalized value, and the uniformity compliance is obtained according to the ratio of the uniformity normalized value to the standard color uniformity threshold. Acquire ambient light intensity data, and compensate the main color deviation index based on the ambient light intensity data to obtain the compensated main color deviation index; The chromaticity coefficient is obtained by multiplying and fusing the compensated primary color deviation index and the uniformity conformity.
[0006] Preferably, the step of obtaining the appearance morphology coefficient based on the morphological uniformity coefficient and the chromaticity coefficient includes: Obtain a preset appearance shape weight vector, which includes shape symmetry weight and color weight; The first weighted component is calculated based on the morphological uniformity coefficient and the morphological uniformity weight, and the second weighted component is calculated based on the chromaticity coefficient and the chromaticity weight. Obtain the variety correction factor and origin correction factor of matsutake mushroom, and calculate the comprehensive correction coefficient based on the variety correction factor and origin correction factor; The first weighted component and the second weighted component are summed to obtain the initial appearance value; The initial appearance value is multiplied by the comprehensive correction coefficient to obtain the appearance coefficient.
[0007] Preferably, the step of obtaining moisture content data and relative content data of characteristic aroma components based on the spectral information, and obtaining internal characteristic coefficients based on the moisture content data and the relative content data of characteristic aroma components, includes: Based on the spectral information, moisture content data is obtained through a preset moisture inversion model, and relative content data of characteristic aroma components is obtained through a preset aroma inversion model. Obtain the standard moisture content range and the standard aroma content range, and obtain the moisture content compliance based on the ratio of the moisture content data to the standard moisture content range, and obtain the aroma compliance based on the ratio of the relative content data of the characteristic aroma components to the standard aroma content range; Obtain the current ambient temperature and humidity values, and calculate the environmental compensation coefficient based on the ambient temperature and humidity values; The initial value of internal quality is obtained by weighted summing of the moisture content and the aroma content. The internal characteristic coefficient is obtained by multiplying the initial value of the internal quality by the environmental compensation coefficient.
[0008] Preferably, the step of obtaining a comprehensive quality coefficient based on the appearance morphology coefficient and the internal characteristic coefficient, and monitoring the quality of the matsutake mushroom to be tested based on the internal characteristic coefficient to obtain a quality monitoring result includes: The appearance morphology coefficient and the internal feature coefficient are weighted and fused to obtain the comprehensive quality coefficient; Obtain a preset set of quality grade classification thresholds, and determine the current quality grade based on the comparison result between the comprehensive quality coefficient and the set of quality grade classification thresholds; Obtain the time series data of the internal feature coefficients within a preset historical time period, and fit the quality degradation trend line based on the time series data using a linear regression algorithm; The quality degradation rate is obtained based on the slope of the quality degradation trend line, and it is determined whether the quality degradation rate exceeds a preset degradation rate threshold. If the quality degradation rate exceeds the degradation rate threshold, an early warning signal is generated, and the current quality level, quality degradation rate, and early warning signal are output together as the quality monitoring result.
[0009] This application also provides a matsutake mushroom quality monitoring system, including: The first acquisition module is used to acquire image information and spectral information of the matsutake mushroom to be tested, wherein the image information includes morphological parameter information and color parameter information; The first calculation module is used to obtain cap diameter data and stipe length data based on the morphological parameter information, and to obtain a morphological uniformity coefficient based on the cap diameter data and stipe length data. The second calculation module is used to obtain the main color tone value and the color uniformity value of the cap based on the color parameter information, and to obtain the color coefficient based on the main color tone value and the color uniformity value of the cap. The third calculation module is used to obtain the appearance morphology coefficient based on the morphological uniformity coefficient and the chromaticity coefficient. The fourth calculation module is used to obtain moisture content data and relative content data of characteristic aroma components based on the spectral information, and to obtain internal characteristic coefficients based on the moisture content data and the relative content data of characteristic aroma components. The monitoring module is used to obtain a comprehensive quality coefficient based on the appearance morphology coefficient and the internal characteristic coefficient, and to monitor the quality of the matsutake mushroom to be tested based on the internal characteristic coefficient, thereby obtaining a quality monitoring result.
[0010] Preferably, the first computing module includes: The first processing unit is used to perform edge detection on the morphological parameter information to obtain the outline of the matsutake mushroom to be tested, and to obtain the cap projection area based on the outline fitting, and to obtain the minimum circumcircle corresponding to the cap projection area based on the cap projection area, and to use the diameter of the minimum circumcircle as the cap diameter data. The second processing unit is used to obtain the main stem axis information of the matsutake mushroom to be tested based on the morphological parameter information, and to obtain the pixel distance from the stipe starting point to the connection point between the cap and the stipe based on the main stem axis information, convert the pixel distance into the stipe length based on a preset calibration ratio, and use the stipe length as the stipe length data. The first acquisition unit is used to acquire a preset standard matsutake morphology template and extract the standard cap diameter range and standard stipe length range from the standard matsutake morphology template. The third processing unit is used to calculate the diameter deviation rate based on the cap diameter data and the standard cap diameter range, and to calculate the length deviation rate based on the stipe length data and the standard stipe length range. The second acquisition unit is used to acquire a preset ideal ratio value between the cap and the stem, and to calculate the actual ratio value based on the cap diameter data and the stem length data. The fourth processing unit is used to obtain a ratio deviation coefficient based on the actual ratio value and the ideal ratio value; The first fusion unit is used to perform weighted fusion based on the diameter deviation rate, length deviation rate and the proportional deviation coefficient to obtain the morphological symmetry coefficient.
[0011] This application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described method.
[0012] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0013] The beneficial effects of this application are as follows: This invention constructs a multi-dimensional quantitative evaluation system to comprehensively monitor the quality of matsutake mushrooms by integrating image information and spectral information. First, it acquires raw data of matsutake mushrooms from image acquisition equipment and spectrometers, covering core information such as morphological parameters, color parameters, and spectral characteristics. Then, through algorithms such as edge detection, main color extraction, and spectral inversion, it sequentially calculates the morphological uniformity coefficient (integrating diameter deviation rate, length deviation rate, and proportional deviation coefficient), color coefficient (combining main color deviation and color uniformity), appearance morphology coefficient (integrating morphological and color characteristics and corrected by variety and origin), and internal characteristic coefficient (integrating moisture content and aroma content and compensated by environment). Finally, it weights and integrates the appearance and internal coefficients to generate a comprehensive quality coefficient. Combined with time-series data analysis, it analyzes the quality deterioration trend and outputs early warning signals, realizing objective quantification and dynamic monitoring of matsutake mushroom quality, improving monitoring accuracy, and reducing the bias of subjective human judgment. Attached Figure Description
[0014] Figure 1 This is a schematic diagram of a method flow according to an embodiment of this application.
[0015] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0016] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0017] like Figure 1As shown, this application provides a method for monitoring the quality of matsutake mushrooms, including: S1. Obtain the image information and spectral information of the matsutake mushroom to be tested, wherein the image information includes morphological parameter information and color parameter information; S2. Obtain cap diameter data and stipe length data based on the morphological parameter information, and obtain morphological uniformity coefficient based on the cap diameter data and stipe length data; S3. Obtain the main color tone value and the color uniformity value of the cap according to the color parameter information, and obtain the color coefficient according to the main color tone value and the color uniformity value of the cap; S4. Obtain the appearance morphology coefficient based on the morphological uniformity coefficient and the chromaticity coefficient; S5. Obtain moisture content data and relative content data of characteristic aroma components based on the spectral information, and obtain internal characteristic coefficients based on the moisture content data and the relative content data of characteristic aroma components. S6. Obtain a comprehensive quality coefficient based on the appearance morphology coefficient and the internal characteristic coefficient, and monitor the quality of the matsutake mushroom to be tested based on the internal characteristic coefficient to obtain a quality monitoring result.
[0018] As described in steps S1-S6 above, step S1 of this invention involves acquiring image and spectral information of the matsutake mushroom to be tested. The image information includes morphological and color parameters. This step is the foundation of the entire quality monitoring method. All quality coefficient calculations are based on the raw data acquired in this step. From a physical perspective, only by accurately acquiring visual data related to the morphology and color of the matsutake mushroom's appearance, as well as spectral data that can reflect the content of internal substances, can a quantitative analysis of the appearance and internal quality of the matsutake mushroom be achieved. This step provides data support for all subsequent quantitative calculations.
[0019] In terms of technical implementation, morphological and color parameters are acquired by high-definition image acquisition equipment through multi-angle shooting of the matsutake mushroom under standard imaging conditions, while spectral information is acquired by spectral detection equipment such as near-infrared spectrometers through spectral scanning of key parts of the matsutake mushroom, such as the cap and stem. The use of professional acquisition equipment ensures the accuracy and consistency of the original data, avoiding the problems of data ambiguity and inability to quantify in manual observation.
[0020] For example, when acquiring images of fresh matsutake mushrooms, a high-definition camera can capture details such as the outline of the cap, the length of the stem, and the color depth and uniformity of the cap. A spectrometer can capture the characteristic spectral peaks corresponding to the internal moisture and aroma components of the matsutake mushroom, laying a precise data foundation for subsequent parameter extraction and coefficient calculation. The technical effect of this step is to transform the quality characteristics of matsutake mushrooms from intuitive sensory perception into digitizable parameter information, realizing the digital start of quality monitoring and solving the problem that quality characteristics cannot be accurately recorded and extracted in manual evaluation.
[0021] S2 involves obtaining cap diameter and stipe length data based on morphological parameters, and then calculating a morphological uniformity coefficient based on these data. This step quantifies the core morphological features of matsutake mushrooms. Physically, cap diameter and stipe length are key indicators reflecting the growth status of matsutake mushrooms. The deviation of their ratio from the standard value directly reflects the morphological uniformity of the matsutake mushroom. Morphological uniformity is an important dimension for evaluating the appearance of matsutake mushrooms and a crucial basis for classifying their commercial grades. Therefore, it is necessary to convert cap diameter and stipe length into quantitative data and calculate a coefficient that comprehensively reflects morphological uniformity.
[0022] In terms of technical implementation, the morphological parameter information is first processed by an edge detection algorithm to identify the outline of the matsutake mushroom to be measured. Then, the outline is fitted to obtain the projection area of the cap, and the smallest circumcircle of this area is calculated. Its diameter is used as the cap diameter data. This method can accurately and objectively reflect the actual size of the cap and avoid errors caused by different measurement positions in manual measurement. Then, the main axis information of the matsutake mushroom is extracted through the morphological parameter information to determine the starting point of the stipe and the connection point between the cap and the stipe. The pixel distance between the two points is calculated, and the pixel distance is converted to the actual length by combining the preset calibration ratio to obtain the stipe length data. The preset calibration ratio is determined in advance by the parameters of the image acquisition device and the shooting distance to ensure the accuracy of the length conversion.
[0023] Subsequently, a preset standard matsutake morphology template is obtained. This template is constructed from standard sample data of matsutake of corresponding varieties and origins. The standard cap diameter range and standard stipe length range are extracted from it. The diameter deviation rate of the cap diameter data relative to the standard range and the length deviation rate of the stipe length data relative to the standard range are calculated respectively. Then, the preset ideal ratio value of cap to stipe is obtained. This value is determined by the industry standard for matsutake cultivation and quality grading. The actual ratio value of cap diameter to stipe length is calculated. The ratio deviation coefficient is obtained by comparing the actual ratio value with the ideal ratio value. Finally, the diameter deviation rate, length deviation rate and ratio deviation coefficient are weighted and fused to obtain the morphological symmetry coefficient. The weight of the weighted fusion is preset according to the importance of each indicator in the morphological symmetry evaluation. For example, for the morphology evaluation of Tricholoma matsutake, the proportional deviation between the pileus and the stipe has a greater impact, so a higher weight can be set. The technical effect of this step is to convert the morphological characteristics of Tricholoma matsutake into a single morphological uniformity coefficient through a series of algorithms, realizing the quantitative evaluation of the morphological uniformity of Tricholoma matsutake. Compared with the vague description of morphology in manual observation, this method can accurately and objectively reflect the morphological state of Tricholoma matsutake, and the morphological uniformity coefficients of different Tricholoma matsutake can be directly compared, providing a quantitative basis for subsequent standardized quality grading. Meanwhile, the application of algorithms such as edge detection and minimum enclosing circle fitting improves the extraction accuracy of the pileus diameter and stipe length, and reduces the error in obtaining morphological parameters.
[0024] S3 is to obtain the main hue value of the pileus and the color uniformity value of the pileus according to the color parameter information, and obtain the chromaticity coefficient according to the main hue value of the pileus and the color uniformity value of the pileus. This step is a quantitative process for the color characteristics in the appearance morphology of Tricholoma matsutake. In terms of physical meaning, the main hue and color uniformity of the pileus are important appearance indicators reflecting the freshness and growth state of Tricholoma matsutake. The pileus of fresh Tricholoma matsutake has a fixed main hue and uniform color distribution, while Tricholoma matsutake with deteriorated quality or poor growth will have main hue shift and uneven color distribution. Therefore, it is necessary to quantify the color characteristics of the pileus to obtain a chromaticity coefficient that can comprehensively reflect the chromaticity state.
[0025] In terms of technical implementation, first extract the pixel color information of the pileus area from the color parameter information, obtain the main hue value of the pileus through a color clustering algorithm, and obtain the color uniformity value of the pileus by calculating indicators such as the variance of the pixel color in the pileus area. Then obtain a preset standard chromaticity database, which contains standard chromaticity data of Tricholoma matsutake of different varieties and origins in a fresh state, from which the standard main hue value and standard color uniformity threshold corresponding to the variety of the Tricholoma matsutake to be tested are extracted. Calculate the color difference vector between the main hue value of the pileus and the standard main hue value, and obtain the main hue deviation index by calculating the modulus of the color difference vector. The larger the modulus, the more obvious the main hue shift; Normalize the color uniformity value of the pileus, map it to an interval of 0-1 to obtain a normalized uniformity value, and then obtain the uniformity conformity degree by the ratio of the normalized uniformity value to the standard color uniformity threshold. The closer the ratio is to 1, the more the color uniformity meets the standard. Meanwhile, obtain environmental illumination intensity data, which is collected in real time by an illumination sensor matched with the image acquisition device, and compensate the main hue deviation index according to the illumination intensity data. Because different illumination intensities will affect the color information of image acquisition, the compensation algorithm is preset according to the correlation between illumination intensity and color deviation, so as to eliminate the interference of illumination environment on main hue extraction and obtain the compensated main hue deviation index; Finally, the compensated main color deviation index and uniformity conformity are multiplied and fused to obtain the chromaticity coefficient. The technical effect of this step is to achieve a quantitative evaluation of the color characteristics of matsutake mushroom caps. Color indicators are accurately extracted through algorithms such as color clustering and color difference vector calculation. At the same time, the interference of environmental factors on color detection is eliminated by combining light intensity compensation, which improves the accuracy of the chromaticity coefficient. Compared with the subjective judgment of color in manual observation, the chromaticity coefficient can objectively and quantitatively reflect the color state of matsutake mushrooms, and can be combined with the morphological uniformity coefficient to complete a comprehensive quantitative characterization of the appearance of matsutake mushrooms.
[0026] S4 is to obtain the appearance morphology coefficient based on the morphological uniformity coefficient and the color coefficient. This step is a comprehensive quantitative process of matsutake appearance morphology. From a physical point of view, morphological uniformity and color are two core dimensions of matsutake appearance quality. The two together determine the appearance quality of matsutake. The morphological uniformity coefficient or color coefficient alone cannot fully reflect the appearance state of matsutake. Therefore, it is necessary to integrate the two and make corrections based on the variety and origin characteristics of matsutake to obtain the appearance morphology coefficient that can comprehensively reflect the appearance quality.
[0027] In terms of technical implementation, the first step is to obtain a preset appearance morphology weight vector. This vector includes morphological symmetry weight and color weight. The weight values are determined based on the importance of morphology and color in appearance quality evaluation. For example, in matsutake quality grading, the weight of morphological symmetry can be set to 0.6, and the weight of color can be set to 0.4. The product of morphological symmetry coefficient and morphological symmetry weight, and the product of color coefficient and color weight are calculated respectively to obtain the first weighted component and the second weighted component. Next, the variety correction factor and origin correction factor for matsutake are obtained. These two factors are determined by the differences in appearance quality characteristics of matsutake from different varieties and origins. For example, the cap color of some matsutake varieties is lighter, and the corresponding variety correction factor can be adjusted appropriately. Different climate and soil conditions in the place of origin will also lead to differences in the appearance characteristics of matsutake. The comprehensive correction coefficient is calculated by multiplying the variety correction factor and the place of origin correction factor. Then, the first weighted component and the second weighted component are summed to obtain the initial appearance morphology value. Finally, the initial appearance morphology value is multiplied by the comprehensive correction coefficient to obtain the appearance morphology coefficient. The technical effect lies in integrating two core quantitative indicators of matsutake mushroom appearance to obtain a comprehensive appearance morphology coefficient, which enables a holistic quantitative evaluation of matsutake mushroom appearance quality. At the same time, the introduction of variety and origin correction factors eliminates the impact of differences in appearance characteristics of matsutake mushrooms from different varieties and origins on quality evaluation, improves the universality and accuracy of the appearance morphology coefficient, and allows the appearance quality of matsutake mushrooms from different varieties and origins to be compared under the same standard, providing a unified quantitative indicator of appearance for subsequent comprehensive quality evaluation.
[0028] S5 involves obtaining moisture content data and relative content data of characteristic aroma components based on spectral information, and then obtaining internal characteristic coefficients based on these data. This step is a quantification process of the core quality characteristics of matsutake mushrooms. From a physical perspective, moisture content is a key indicator reflecting the freshness of matsutake mushrooms. Moisture loss directly leads to the deterioration of matsutake mushroom quality and a worse taste. Characteristic aroma components are the core embodiment of the flavor and edible value of matsutake mushrooms, and their relative content directly determines the quality grade of matsutake mushrooms. Spectral information contains the characteristic absorption peaks of substances inside matsutake mushrooms, and the content data of substances can be extracted through spectral inversion. Therefore, it is necessary to quantify moisture and aroma components based on spectral information and obtain internal characteristic coefficients that comprehensively reflect the internal quality.
[0029] In terms of technical implementation, the spectral information is first input into a preset moisture inversion model and aroma inversion model. These models are constructed by training matsutake mushroom spectral data and corresponding measured data on moisture content and aroma component content using algorithms such as partial least squares regression. The models output moisture content data and relative content data of characteristic aroma components. Next, standard moisture content ranges and standard aroma content ranges are obtained. These ranges are determined by industry standards for matsutake mushroom quality grading. The moisture content data is then compared with the standard moisture content range, and the relative content data of characteristic aroma components is compared with the standard aroma content range, respectively, to obtain the moisture compliance and aroma compliance. The closer the ratio is to 1, the better the corresponding internal indicator meets the standard.
[0030] Simultaneously, the current ambient temperature and humidity values are acquired. This data is collected in real time by temperature and humidity sensors. An environmental compensation coefficient is calculated based on the temperature and humidity values, because ambient temperature and humidity affect the moisture and aroma components of matsutake mushrooms and also slightly interfere with spectral detection. The compensation coefficient is preset based on the correlation between temperature and humidity and internal quality indicators. Then, the moisture compliance and aroma compliance are weighted and summed. The weights are determined based on the importance of moisture and aroma components in the internal quality evaluation to obtain the initial internal quality value. Finally, the initial internal quality value is multiplied by the environmental compensation coefficient to obtain the internal characteristic coefficient. The technical effect of this step is that it enables non-destructive and accurate detection of the internal moisture and characteristic aroma components of matsutake mushrooms through spectral inversion technology, avoiding the destructive sampling of matsutake mushrooms in traditional testing. At the same time, it integrates the two core internal indicators into the internal characteristic coefficient, realizing the quantitative evaluation of the internal quality of matsutake mushrooms. The introduction of environmental temperature and humidity compensation eliminates the interference of environmental factors on the internal quality detection and improves the accuracy of the internal characteristic coefficient. This step provides core internal quantitative indicators for subsequent comprehensive quality evaluation and dynamic monitoring, and meets the needs of non-destructive testing in the storage and logistics of matsutake mushrooms.
[0031] S6 involves obtaining a comprehensive quality coefficient based on appearance morphology coefficients and internal characteristic coefficients, and monitoring the quality of the matsutake mushroom under test based on the internal characteristic coefficients to obtain quality monitoring results. This step is the final stage of the entire quality monitoring method, realizing the evaluation and dynamic monitoring of the comprehensive quality of matsutake mushrooms. From a physical perspective, the comprehensive quality of matsutake mushrooms is determined by both appearance morphology and internal quality. A single appearance or internal indicator cannot fully reflect its true quality. During the storage and circulation process, the internal quality of matsutake mushrooms deteriorates over time, and this deterioration is continuous and traceable. By analyzing the time series of internal characteristic coefficients, the trend of quality deterioration can be predicted, and timely warnings can be issued. Therefore, it is necessary to integrate appearance and internal coefficients to obtain a comprehensive quality coefficient, and at the same time, combine the time series changes of internal characteristic coefficients to achieve dynamic monitoring.
[0032] In terms of technical implementation, the appearance morphology coefficient and internal characteristic coefficient are first weighted and fused. The weights are determined based on the importance of appearance and internal indicators in matsutake quality evaluation. For example, for edible matsutake, the weight of internal quality can be set to 0.6, and the weight of appearance morphology can be set to 0.4. After fusion, a comprehensive quality coefficient is obtained. Then, a preset quality grade classification threshold set is obtained. This threshold set is determined by the industry standard for matsutake quality grading and actual test data, and includes comprehensive quality coefficient thresholds corresponding to different quality grades. The comprehensive quality coefficient is compared with the threshold set to determine the current quality grade of the matsutake to be tested. For example, a comprehensive quality coefficient greater than 0.9 is classified as premium grade, 0.8-0.9 as grade 1, and so on. Then, time-series data of internal characteristic coefficients within a preset historical time period is obtained. This time period is preset based on the storage characteristics of matsutake mushrooms; for example, it can be set to 24 hours during storage. A linear regression algorithm is used to fit the time-series data to obtain a quality deterioration trend line. The linear regression algorithm can accurately capture the changing trend of internal characteristic coefficients. The slope of the trend line is used to obtain the quality deterioration rate; the larger the absolute value of the slope, the faster the quality deterioration. The quality deterioration rate is then compared with a preset deterioration rate threshold, which is determined by industry standards for maintaining the freshness of matsutake mushrooms. If the quality deterioration rate exceeds this threshold, a warning signal is generated. Finally, the current quality grade, quality deterioration rate, and early warning signal are combined as the output of the quality monitoring results. The technical effect of this step is that it achieves standardized and graded evaluation of the overall quality of matsutake mushrooms, enabling the quality of matsutake mushrooms to be graded according to unified quantitative standards. This solves the problems of vague quality grade division and inconsistent standards in manual assessment. Simultaneously, through time-series analysis and linear regression fitting of internal characteristic coefficients, it achieves accurate prediction and early warning of matsutake mushroom quality deterioration trends, enabling timely detection of abnormal quality deterioration. This provides data support for the storage, preservation, and cold chain logistics of matsutake mushrooms. The storage environment can be adjusted promptly based on early warning signals to extend the shelf life of matsutake mushrooms. Compared to existing technologies that can only statically judge the current quality of matsutake mushrooms, this step achieves dynamic quality monitoring and trend prediction, improving the timeliness and practicality of quality monitoring throughout the entire matsutake mushroom supply chain, while effectively overcoming the subjectivity and bias of manual assessment.
[0033] In one embodiment, step S2, which involves obtaining cap diameter data and stipe length data based on the morphological parameter information, and obtaining a morphological uniformity coefficient based on the cap diameter data and stipe length data, includes: S21. Perform edge detection on the morphological parameter information to obtain the outline of the matsutake mushroom to be tested, and obtain the mushroom cap projection area based on the outline fitting, and obtain the minimum circumcircle corresponding to the mushroom cap projection area based on the mushroom cap projection area, and use the diameter of the minimum circumcircle as the mushroom cap diameter data. S22. Obtain the main stem axis information of the matsutake mushroom to be tested based on the morphological parameter information, and obtain the pixel distance from the stipe starting point to the connection point between the cap and the stipe based on the main stem axis information. Convert the pixel distance into stipe length based on a preset calibration ratio, and use the stipe length as stipe length data. S23. Obtain a preset standard matsutake morphology template, and extract the standard cap diameter range and standard stipe length range from the standard matsutake morphology template; S24. Calculate the diameter deviation rate based on the cap diameter data and the standard cap diameter range, and calculate the length deviation rate based on the stipe length data and the standard stipe length range; S25. Obtain the preset ideal ratio value between the cap and the stem, and calculate the actual ratio value based on the cap diameter data and the stem length data. S26. Obtain the ratio deviation coefficient based on the actual ratio value and the ideal ratio value; S27. The morphological uniformity coefficient is obtained by weighting and fusing the diameter deviation rate, length deviation rate and proportional deviation coefficient.
[0034] As described in steps S21-S27 above, step S21 of this invention involves edge detection of morphological parameter information to obtain the outline of the matsutake mushroom to be tested, fitting the outline to obtain the cap projection area, and obtaining the minimum circumscribed circle corresponding to the cap projection area. The diameter of the minimum circumscribed circle is used as the cap diameter data. This step is the precise extraction step of cap diameter data. From a physical point of view, the actual diameter of the cap is an important physical parameter reflecting the maturity of matsutake mushroom growth. Manual measurement is prone to errors due to different measurement positions and tools. Extracting the cap diameter through image processing can avoid interference from human operation and ensure the accuracy and consistency of the data.
[0035] In terms of technical implementation, edge detection adopts the Canny edge detection algorithm. This algorithm eliminates image noise in morphological parameter information through Gaussian filtering, determines the edge pixels of the matsutake mushroom outline through gradient calculation and non-maximum suppression, and finally obtains a complete and clear matsutake mushroom outline through double threshold detection and edge connection, effectively avoiding the interference of image background and matsutake mushroom surface texture on outline extraction. After obtaining the matsutake mushroom outline, a contour fitting algorithm is used to perform polygon fitting and region segmentation on the contour area corresponding to the mushroom cap, accurately separating the mushroom cap projection area. Then, the minimum circumcircle algorithm is used to find the minimum circumcircle of the projection area, and the diameter of the circle is used as the mushroom cap diameter data. This method can objectively reflect the actual effective size of the mushroom cap and avoid diameter measurement deviation caused by irregular mushroom cap shape.
[0036] For example, for fresh matsutake mushrooms with slightly irregular cap edges, manual measurement may yield different diameter values at different locations. However, by extracting the contour using Canny edge detection, the minimum circumscribed circle diameter of the fitted cap projection area can accurately represent the actual overall size of the cap. The technical effect of this step is that it achieves non-contact and accurate extraction of cap diameter data through professional image processing algorithms, improving the accuracy and consistency of cap diameter measurement. Compared with manual measurement, it effectively reduces measurement errors and provides accurate basic data for subsequent morphological deviation calculations.
[0037] S22 involves obtaining the main stem axis information of the matsutake mushroom to be tested based on morphological parameter information, and obtaining the pixel distance from the stipe starting point to the connection point between the cap and the stipe based on the main stem axis information. The pixel distance is then converted into stipe length based on a preset calibration ratio, and this stipe length is used as the stipe length data. This step is the precise extraction stage of the stipe length data. From a physical perspective, the length of the stipe is another core physical parameter for evaluating the morphology of matsutake mushrooms. Its accuracy directly affects the subsequent calculation results of the morphological proportions. Since the stipe of matsutake mushrooms is long and narrow, the actual extension direction of the stipe can be accurately determined by extracting the main axis, thus ensuring the accuracy of the length measurement.
[0038] In terms of technical implementation, the outline of matsutake mushroom in morphological parameter information is first refined by skeleton extraction algorithm to obtain the main axis information of matsutake mushroom. The algorithm eliminates edge pixels of the outline through continuous erosion operation until the axis with a single pixel width is obtained, while preserving the connectivity and topology of the axis to accurately reflect the actual direction of the stipe. Then, through the feature point detection algorithm, the starting point of the stipe and the connection point between the cap and the stipe are identified on the main axis. The determination of these two feature points is based on the morphological characteristics of matsutake mushrooms. The starting point of the stipe is the end point of the stipe away from the cap, and the connection point is the intersection point of the outlines of the cap and the stipe. Then, the pixel distance between the two feature points is calculated. The preset calibration ratio is pre-calibrated by the shooting parameters and shooting distance of the image acquisition device. It is calculated as the ratio of the actual physical length to the image pixel length. This ratio is stored in the system in advance. By multiplying the pixel distance by the preset calibration ratio, the actual physical length of the stipe can be obtained and used as the stipe length data.
[0039] For example, with a fixed shooting distance and camera parameters, if the calibration ratio is 0.05cm / pixel and the pixel distance between the stipe's starting point and the connecting point is 200 pixels, then the stipe length is 10cm. The technical effect of this step is that it achieves accurate extraction of the stipe length through skeleton extraction and feature point detection. Combined with the preset calibration ratio, it completes the accurate conversion from pixel distance to actual physical length, avoiding errors caused by stipe bending and measurement direction deviation in manual measurement, and improving the accuracy of stipe length data.
[0040] S23 involves obtaining a preset standard matsutake morphology template, from which the standard cap diameter range and standard stipe length range are extracted. This step provides a standard reference for subsequent morphological deviation calculations. From a physical perspective, the evaluation of matsutake morphological indicators needs to rely on corresponding standard ranges. The reasonable ranges for cap diameter and stipe length vary among different varieties and origins of matsutake. Therefore, it is necessary to preset corresponding standard morphological templates to achieve standardized evaluation of different matsutake morphological indicators.
[0041] In terms of technical implementation, the preset standard matsutake morphology template is constructed from industry standards for matsutake quality grading and measured data of standard samples of matsutake from different varieties and origins. The template contains the standard range and reference value of various morphological indicators for the corresponding matsutake category. This template is stored in the system's database in advance. When performing morphological calculations on the matsutake to be tested, the system will match the corresponding standard matsutake morphology template from the database based on the variety and origin information of the matsutake to be tested, and extract the standard cap diameter range and standard stipe length range from it as the benchmark for subsequent diameter deviation rate and length deviation rate calculations.
[0042] For example, for fresh matsutake mushrooms from Yunnan, the standard cap diameter range is 5-8cm and the standard stem length range is 8-12cm. The system will extract the corresponding standard range based on the product category information. The technical effect of this step is to provide a unified and standardized reference for morphological deviation calculation, so that the morphological index deviation calculation of different types of matsutake mushrooms can be carried out under the corresponding standard, ensuring the rationality and universality of the subsequent evaluation results.
[0043] S24 involves calculating the diameter deviation rate based on the cap diameter data and the standard cap diameter range, and calculating the length deviation rate based on the stipe length data and the standard stipe length range. This step quantifies the degree of deviation between the actual values of the cap diameter and stipe length and the standard values. From a physical perspective, the diameter deviation rate and length deviation rate can intuitively reflect the degree of deviation between the actual size of the cap and stipe of the matsutake mushroom being tested and the standard range. The greater the degree of deviation, the less its morphological indicators conform to the standard, which is an important dimension for evaluating morphological symmetry.
[0044] In terms of technical implementation, the diameter deviation rate is calculated based on the median value of the standard cap diameter range, and the calculation formula is (|cap diameter data - median standard diameter| / median standard diameter) × 100%. The length deviation rate is calculated based on the median value of the standard stipe length range, and the calculation formula is (|stipe length data - median standard length| / median standard length) × 100%. Through this calculation method, the deviation between the actual size and the standard range can be converted into a quantitative indicator in percentage form, which is convenient for subsequent comparison and integration calculation.
[0045] For example, if the standard cap diameter range is 5-8cm, with a median of 6.5cm, and the cap diameter of the matsutake mushroom to be tested is 7.8cm, then the diameter deviation rate is (|7.8-6.5| / 6.5)×100%=20%. The technical effect of this step is to transform the dimensional deviation between the cap diameter and the stipe length into a quantifiable and comparable deviation rate index, realizing the digital characterization of the degree of deviation of a single morphological index from the standard, and providing a unified quantitative form for the subsequent fusion of multi-dimensional deviations.
[0046] S25 involves obtaining the preset ideal ratio between the cap and the stem, and calculating the actual ratio based on the cap diameter and stem length data. This step quantifies the ratio between the cap and the stem. From a physical perspective, the coordination of the ratio between the cap and the stem is a core element in measuring the symmetry of the matsutake mushroom's morphology. Even if the actual values of the cap diameter and stem length are within the standard range, if the ratio is out of balance, it will still be judged as morphologically uneven. Therefore, it is necessary to calculate and evaluate the ratio between the two separately.
[0047] In terms of technical implementation, the preset ideal ratio of cap to stem is determined by the industry standards for matsutake cultivation and quality grading. This value combines the growth characteristics of matsutake with the requirements for product appearance and is stored in the system in advance. For example, the industry stipulates that the ideal ratio of cap to stem for a certain type of matsutake is 1:1.5, that is, the ratio of cap diameter to stem length is 1:1.5. The actual ratio is calculated as the ratio of the cap diameter data to the stem length data of the matsutake to be tested. Through this calculation method, the actual ratio of cap to stem of the matsutake to be tested can be accurately obtained and compared with the preset ideal ratio value.
[0048] For example, if the diameter of the cap of the matsutake mushroom to be tested is 6cm and the length of the stem is 9cm, then the actual ratio is 1:1.5, which is consistent with the ideal ratio. The technical effect of this step is to realize the quantitative characterization of the ratio between the cap and the stem, which makes up for the insufficiency of the single size deviation rate in reflecting the morphological ratio, and makes the evaluation of morphological symmetry more comprehensive and scientific.
[0049] S26 is to obtain the ratio deviation coefficient based on the ratio of the actual ratio to the ideal ratio. This step is to quantify the degree of deviation of the ratio between the cap and the stem. From a physical point of view, the ratio deviation coefficient can intuitively reflect the degree of deviation between the actual ratio and the ideal ratio of the matsutake mushroom to be tested. It is a key indicator for evaluating the morphological symmetry. The closer the coefficient is to 1, the more coordinated the ratio and the more symmetrical the shape.
[0050] In terms of technical implementation, the ratio deviation coefficient is calculated as the ratio of the actual ratio value to the preset ideal ratio value. If the actual ratio value is exactly the same as the ideal ratio value, the ratio deviation coefficient is 1. If the actual ratio value deviates from the ideal ratio value, the ratio deviation coefficient will be greater than or less than 1. The greater the deviation, the greater the difference between the coefficient and 1. Specifically, the ratio deviation coefficient = 1 - |actual ratio value - ideal ratio value| / ideal ratio value. This directly reflects the imbalance in proportion, indicating that the stipe is too long relative to the cap. The technical effect of this step is to transform the ratio deviation between the cap and stipe into a single coefficient index, realizing a digital representation of the degree of ratio deviation. This makes the evaluation of the ratio relationship more intuitive and facilitates the subsequent weighted fusion of multiple indicators.
[0051] S27 involves weighting and fusing the diameter deviation rate, length deviation rate, and proportional deviation coefficient to obtain the morphological symmetry coefficient. This step is the final stage of morphological symmetry evaluation. From a physical perspective, the diameter deviation rate, length deviation rate, and proportional deviation coefficient reflect the morphological characteristics of matsutake mushrooms from different dimensions. A single indicator cannot fully characterize morphological symmetry. It is necessary to weight and fuse the three to obtain a single coefficient that can comprehensively reflect the overall morphological symmetry in order to achieve a comprehensive and objective evaluation of the morphological symmetry of matsutake mushrooms.
[0052] In terms of technical implementation, the weight values of the weighted fusion are preset according to the importance of each indicator in the evaluation of morphological symmetry. Among them, the proportional deviation coefficient has the greatest impact on morphological symmetry and is given the highest weight. The diameter deviation rate and length deviation rate are given relatively lower weights. The weight values are stored in the system in advance. For example, the weight of the proportional deviation coefficient is set to 0.5, the weight of the diameter deviation rate is 0.25, and the weight of the length deviation rate is 0.25. The fusion calculation formula is: Morphological symmetry coefficient = (1 - diameter deviation rate) × 0.25 + (1 - length deviation rate) × 0.25 + proportional deviation coefficient × 0.5. The closer the morphological symmetry coefficient calculated by this formula is to 1, the more symmetrical the morphology of the matsutake mushroom under test is.
[0053] The technical effect lies in integrating three different morphological quantification indicators into a single morphological symmetry coefficient, realizing a comprehensive and quantitative evaluation of the morphological symmetry of matsutake mushrooms. This allows for direct comparison of the morphological symmetry of different matsutake mushrooms through the coefficient, providing a precise and unified morphological quantification indicator for subsequent calculation of appearance morphology coefficients.
[0054] In one embodiment, step S3, which involves obtaining the main color tone value and the color uniformity value of the cap based on the color parameter information, and obtaining the color coefficient based on the main color tone value and the color uniformity value of the cap, includes: S31. Obtain a preset standard color database, and extract the standard primary color value and standard color uniformity threshold corresponding to the matsutake variety from the standard color database. S32. Calculate the color difference vector based on the main color value of the cap and the standard main color value, and obtain the main color deviation index based on the magnitude of the color difference vector; S33. Normalize the color uniformity value of the cap to obtain a uniformity normalization value, and obtain the uniformity compliance based on the ratio of the uniformity normalization value to the standard color uniformity threshold. S34. Obtain ambient light intensity data, and compensate the main color deviation index based on the ambient light intensity data to obtain the compensated main color deviation index. S35. Multiply and fuse the compensated main color deviation index and the uniformity conformity to obtain the chromaticity coefficient.
[0055] As described in steps S31-S35 above, step S31 of this invention involves obtaining a preset standard colorimetric database and extracting the standard primary color value and standard color uniformity threshold corresponding to the matsutake variety from the standard colorimetric database. This step is the core link that provides a standard reference for subsequent quantitative calculation of colorimetric indicators. From a physical point of view, due to differences in growth characteristics and production environment, different varieties of matsutake have inherent differences in the standard primary color and color uniformity of their caps in the fresh state. Colorimetric evaluation must rely on the standard data of the corresponding variety to ensure the rationality and accuracy of the evaluation results. If a unified standard is used to evaluate the colorimetric properties of different varieties of matsutake, it will lead to distorted evaluation results and fail to reflect the true colorimetric state of the matsutake.
[0056] In terms of technical implementation, the pre-set standard colorimetric database is constructed through statistical analysis of the industry standard for matsutake quality grading and the colorimetric measurement data of fresh samples of different matsutake varieties. The database stores corresponding standard dominant color values and standard color uniformity thresholds categorized by matsutake variety and origin. The standard dominant color values are stored in numerical form in the CIELab color space, which can accurately represent the brightness, hue, and saturation of colors. The standard color uniformity thresholds are determined with reference to the normalized value of the color variance of pixels in the cap area. This database is stored in advance in the system's local database. When calculating the colorimetric value of the matsutake to be tested, the system will accurately match the variety and origin information of the matsutake to be tested and extract the corresponding standard dominant color values and standard color uniformity thresholds from the database as the benchmark for subsequent colorimetric index calculations.
[0057] For example, for fresh red pine mushrooms from Sichuan and Tibet, the system will match and extract its corresponding standard primary color value as Lab (45,12,20), and the standard color uniformity threshold is 0.85. The technical effect of this step is to provide a variety-specific and standardized reference for colorimetric calculation, so that the colorimetric evaluation of different varieties and origins of pine mushrooms can be carried out under specific standards, effectively avoiding the evaluation bias caused by uniform standards, and ensuring the objectivity and universality of subsequent colorimetric calculation results.
[0058] S32 involves calculating a color difference vector based on the main color value of the cap and the standard main color value, and obtaining the main color deviation index based on the modulus of the color difference vector. This step quantifies the degree to which the main color of the cap deviates from the standard. From a physical perspective, the main color deviation index can intuitively and accurately reflect the degree of difference between the actual main color of the matsutake cap and the standard main color of the corresponding variety. The greater the difference, the more the color of the matsutake deviates from the standard of freshness and quality. It is one of the core indicators for evaluating the color of the cap. Using the modulus of the color difference vector to characterize the degree of deviation can comprehensively reflect the color difference in three dimensions: hue, brightness, and saturation. Compared with color comparison in a single dimension, it can better reflect the true deviation of the main color.
[0059] In terms of technical implementation, firstly, the CIELab color space values of all pixels in the cap area are extracted from the color parameter information. Then, the pixel color values are clustered and analyzed using the K-means clustering algorithm. The number of clusters is set to 3-5, and the color value of the center of the cluster with the highest proportion is selected as the main color value of the cap. This method can effectively avoid the color interference caused by a small number of impurities and textures on the cap surface and accurately extract the true main color of the cap. Then, using the standard dominant color value as a benchmark, the coordinates corresponding to the dominant color value of the mushroom cap and the standard dominant color value in the CIELab color space are subtracted to obtain a color difference vector composed of lightness difference, hue difference, and saturation difference. The magnitude of this color difference vector is then calculated using the Euclidean distance formula. After normalizing the magnitude, a dominant color deviation index is obtained. The normalization process maps the magnitude to the 0-1 range; the closer the index is to 0, the smaller the dominant color deviation, and the closer it is to 1, the larger the deviation. For example, in the CIELab color space, the L channel (lightness) ranges from 0 to 100, and the a channel (red-green axis) and b channel (yellow-blue axis) both range from -128 to 127. The dominant color variation of the matsutake mushroom cap only exists within the effective range of this color space.
[0060] Based on the actual color characteristics of matsutake mushroom caps, the L, a, and b channels of its main color tone all fall within the range of 0-100 (without negative values). Therefore, the theoretical maximum color difference vector within this range is taken as (100, 100, 100). The theoretical maximum color difference modulus is calculated using the Euclidean distance formula: √(100² + 100² + 100²) = √30000 ≈ 173.2. This value serves as a fixed normalization benchmark for calculating the main color tone deviation of matsutake mushroom caps and is stored in the system beforehand. It is applicable to the normalization processing of all matsutake mushrooms to be tested. Next, the color difference vector (ΔL, Δa, Δb) between the main color tone value of the cap and the standard main color tone value is calculated. Next, the magnitude of the color difference vector, L = √(ΔL² + Δa² + Δb²), is calculated using the Euclidean distance formula. Finally, normalization is performed based on the theoretical maximum color difference magnitude of 173.2. The dominant hue deviation index = color difference magnitude L / 173.2. The calculation result is rounded to two decimal places, with a value range of 0-1. The closer the index is to 0, the smaller the dominant hue deviation; the closer it is to 1, the larger the deviation. The technical effect of this step is that it accurately extracts the dominant hue value of the cap using the K-means clustering algorithm. Combined with the CIELab color space and the calculation of the color difference vector magnitude, it achieves multi-dimensional and accurate quantification of the degree of dominant hue deviation. Compared with the blurry judgment of the human eye, it can objectively reflect the true difference of the dominant hue and provide an accurate quantitative indicator for the calculation of the chromaticity coefficient.
[0061] S33 involves normalizing the cap color uniformity value to obtain a uniformity normalization value, and then obtaining the uniformity conformity based on the ratio of the uniformity normalization value to the standard color uniformity threshold. This step quantifies the uniformity of cap color distribution. From a physical perspective, cap color uniformity is an important colorimetric indicator for measuring matsutake quality. Fresh, high-quality matsutake caps have a uniform color distribution with no obvious color difference or spots, while inferior matsutake will have uneven color distribution due to moisture loss, mold, etc. The uniformity conformity can directly reflect the degree of conformity between the tested matsutake cap color uniformity and the standard threshold. The higher the conformity, the better the color condition.
[0062] In terms of technical implementation, the variance of the L, a, and b channel values of all pixels in the CIELab color space of the cap area is first calculated. The average value of the variance of the three channels is used as the color uniformity value of the cap. The smaller the variance, the more uniform the color distribution, and vice versa. Subsequently, the min-max normalization algorithm was used to normalize the cap color uniformity value, mapping it to the 0-1 range to obtain the uniformity normalization value. The algorithm formula is: uniformity normalization value = (original uniformity value - minimum value) / (maximum value - minimum value), where the minimum and maximum values are obtained by statistical analysis of the color uniformity values of a large number of matsutake samples. Then, the ratio of the uniformity normalization value to the standard color uniformity threshold is calculated to obtain the uniformity compliance. The closer the ratio is to 1, the better the cap color uniformity meets the standard. A ratio greater than 1 indicates that the uniformity is better than the standard, and a ratio less than 1 indicates that the uniformity does not meet the standard.
[0063] For example, the calculated uniformity value of the cap color of the matsutake mushroom to be tested is 0.3. After normalization, the uniformity normalization value is 0.8, and the corresponding standard color uniformity threshold is 0.85. Therefore, the uniformity compliance is 0.8 / 0.85≈0.94, indicating that the color uniformity is close to the standard. The technical effect of this step is that by calculating and normalizing the pixel color variance, the uniformity of the cap color is quantitatively characterized. The uniformity compliance is calculated by combining the ratio with the standard threshold, so that the evaluation of uniformity has a clear quantitative standard, which solves the problem that uniformity cannot be accurately evaluated by manual observation.
[0064] S34 involves acquiring ambient light intensity data and compensating for the dominant color deviation index based on the ambient light intensity data to obtain the compensated dominant color deviation index. This step is crucial for eliminating the interference of ambient light on the calculation of dominant color deviation. From a physical perspective, the ambient light intensity during image acquisition directly affects the color acquisition effect of color parameter information. The same matsutake mushroom will be acquired with different color information under different light intensities. If the dominant color deviation index is calculated directly using this color information, the calculation result will be distorted and will not reflect the true color state of the matsutake mushroom. Therefore, it is necessary to compensate and correct the dominant color deviation index according to the actual light intensity to ensure the accuracy of color quantification.
[0065] In terms of technical implementation, ambient light intensity data is collected in real time by a light sensor that is paired with the image acquisition device. The sensor works synchronously with the image acquisition device, collecting the light intensity of the current shooting environment while collecting the color parameter information of matsutake mushrooms. The unit is lux (lx), and the collected data is transmitted to the system in real time. The system pre-sets a light intensity compensation model, which is constructed using a univariate linear regression algorithm based on measured data obtained through the controlled variable method. The measured data acquisition process for model training is as follows: Fresh matsutake mushroom samples of the same variety and batch (with no difference in the main color tone of the cap) are selected, and the cap color parameters are collected under a standard imaging environment (light intensity 800-1200 lx, which is the optimal light range for matsutake color acquisition), determining the standard main color tone value and the reference color difference modulus; then, keeping other imaging parameters unchanged, only the light intensity is adjusted, setting gradients at 50 lx intervals within the range of 200-2000 lx (covering all actual light ranges), and the color parameter information of the same matsutake sample is collected under each gradient, calculating the color difference modulus and the main color tone deviation index under each light intensity, obtaining a measured data sequence with light intensity as the independent variable x and the main color tone deviation index deviation value as the dependent variable y (deviation value = deviation index under each light intensity - deviation index under standard light).
[0066] When constructing the univariate linear regression model, the above measured data sequence is input into the model, and the model parameters are solved using the least squares method to obtain the deviation value fitting formula y=kx+b, where the slope k is the influence coefficient of light intensity on the main color deviation index, and the intercept b is the basic deviation; the core of the light compensation coefficient is the true deviation correction coefficient = deviation index under standard illumination / (deviation index under various illumination intensities). After substituting the fitting formula, the light compensation coefficient fitting model with light intensity as the independent variable is obtained. This model is pre-trained and stored in the system, and the goodness of fit R²≥0.95. The practical application rule of the compensation coefficient is: within the standard illumination range (800-1200 lx), the compensation coefficient is fixed at 1; When the light intensity exceeds this range, the system substitutes the real-time collected light intensity value into the fitting model and outputs the corresponding light compensation coefficient (within the range of 0.8-1.2). The compensated main color deviation index = original main color deviation index × light compensation coefficient. The physical meaning of this calculation is to correct the color data collected under non-standard lighting to the detection data under equivalent standard lighting.
[0067] For example, in the original example, the ambient light intensity is 1500 lx (exceeding the standard upper limit of 300 lx). After substituting it into the fitting model, the output compensation coefficient is 0.9, which corresponds to a measured deviation value of 10% for the main color deviation index under 1500 lx illumination. This compensation coefficient corrects the original deviation index to the true value. Secondly, the technical effect of this step is that by collecting the ambient light intensity in real time through the light sensor and combining it with the preset light intensity compensation model to correct the main color deviation index, the interference of ambient light intensity on the quantification of the main color is effectively eliminated, ensuring that the main color deviation index can reflect the true color state of the matsutake mushroom and improving the accuracy of subsequent color coefficient calculation.
[0068] S35 involves multiplying and fusing the compensated main color deviation index and uniformity conformity to obtain the color coefficient. This step is the final stage of evaluating the color characteristics of the mushroom cap. From a physical perspective, the compensated main color deviation index and uniformity conformity reflect the color state of the matsutake mushroom cap from two core dimensions. The two are interrelated and indispensable. A single index cannot fully characterize the overall color characteristics of the cap. It is necessary to fuse the two to obtain a single color coefficient in order to achieve a comprehensive and objective evaluation of the cap color. The multiplicative fusion method allows the two indices to constrain each other. If one index performs poorly, it will directly lower the overall color coefficient, which is more in line with the actual needs of matsutake color quality evaluation.
[0069] In terms of technical implementation, the fusion calculation formula is: chromaticity coefficient = The conversion of the compensated main color deviation index to (1-index) is to keep the representation logic of the deviation index consistent with the uniformity conformity. That is, the closer the converted value is to 1, the more the main color conforms to the standard. Then, the conversion is multiplied by the uniformity conformity, and the final chromaticity coefficient ranges from 0 to 1. The closer the coefficient is to 1, the better the chromaticity of the cap is, and the closer it is to 0, the worse the chromaticity is.
[0070] For example, if the compensated main color deviation index of the matsutake mushroom to be tested is 0.18 and the uniformity compliance is 0.94, then the color coefficient = (1-0.18)×0.94 = 0.82×0.94≈0.77, indicating that the color state of the matsutake mushroom cap is good. The technical effect of this step is that by multiplying and fusing, the two core color quantification indicators are integrated into a single color coefficient, realizing a comprehensive and quantitative evaluation of the color characteristics of the cap. This allows the color state of different matsutake mushrooms to be directly compared through the coefficient, providing an accurate and unified color quantification indicator for the subsequent calculation of appearance morphology coefficients. At the same time, the multiplying and fusing method ensures that the color coefficient can comprehensively reflect the comprehensive performance of the main color and color uniformity, avoiding the one-sidedness of single indicator evaluation. In addition, the quantified color coefficient also provides a clear and executable standard for the color evaluation of matsutake mushroom quality grading, effectively reducing the deviation caused by subjective human judgment.
[0071] In one embodiment, step S4, which involves obtaining the appearance morphology coefficient based on the morphological uniformity coefficient and the chromaticity coefficient, includes: S41. Obtain a preset appearance shape weight vector, wherein the appearance shape weight vector includes shape symmetry weight and color weight. S42. Calculate the first weighted component based on the morphological uniformity coefficient and the morphological uniformity weight, and calculate the second weighted component based on the chromaticity coefficient and the chromaticity weight. S43. Obtain the variety correction factor and origin correction factor of matsutake mushroom, and calculate the comprehensive correction coefficient based on the variety correction factor and origin correction factor; S44. Sum the first weighted component and the second weighted component to obtain the initial appearance value; S45. Multiply the initial appearance value by the comprehensive correction coefficient to obtain the appearance coefficient.
[0072] As described in steps S41-S45 above, step S41 of this invention is to obtain a preset appearance morphology weight vector. The appearance morphology weight vector includes morphological symmetry weight and color weight. This step is the core link that provides a weight basis for the subsequent weighted fusion of appearance indicators. From a physical point of view, morphological symmetry is the basic core indicator of matsutake mushroom appearance, which directly reflects the growth integrity and morphological coordination of matsutake mushrooms. Color is an important indicator that reflects the freshness and product aesthetics of matsutake mushrooms. The two have different contributions to the evaluation of appearance quality. By allocating weights, the quantitative results of appearance can be made to better fit the actual industry needs of matsutake mushroom quality grading. If the same weight is set for the two, the dominant role of the core indicators in appearance evaluation will be weakened, resulting in the evaluation results not matching the actual appearance.
[0073] In terms of technical implementation, the preset appearance morphology weight vector is determined by the industry standard for matsutake quality grading, market commodity evaluation requirements, and a large amount of measured data through the analytic hierarchy process. This weight vector is stored in the system database in advance. The values of the morphological uniformity weight and the color weight are both in the range of 0-1, and the sum of the two is 1. The system will set the basic weight according to the general evaluation standard of matsutake, and can also make fine adjustments according to the actual application scenario (such as increasing the morphological uniformity weight if the high-end market pays more attention to appearance, and appropriately increasing the color weight if the ordinary market pays more attention to freshness). For example, in the general quality evaluation of matsutake mushrooms, the weight of morphological uniformity is set to 0.6, and the weight of color is set to 0.4. This weight vector can be directly retrieved by the system for subsequent weighted component calculations. The technical effect of this step is that the weight vector determined by the analytic hierarchy process scientifically distinguishes the importance of morphological uniformity and color in appearance evaluation, giving the integration of appearance indicators a quantitative basis that conforms to industry practice. Compared with the fuzzy judgment of different appearance indicators in manual evaluation, this achieves standardization and scientification of appearance indicator integration, laying a reasonable weight foundation for the subsequent calculation of initial appearance morphology values.
[0074] S42 involves calculating a first weighted component based on the morphological symmetry coefficient and the morphological symmetry weight, and a second weighted component based on the chromaticity coefficient and the chromaticity weight. This step is a quantitative transformation of the two core appearance coefficients by combining their weights. From a physical perspective, the morphological symmetry coefficient and the chromaticity coefficient are two independent quantitative indicators of appearance. They have the same dimensions but different evaluation dimensions. By multiplying them with their corresponding weights to obtain the weighted components, the two indicators can be transformed into quantitative values based on the same evaluation standard, making them additive and providing a premise for subsequent indicator fusion. If the two original coefficients are added directly, the difference in their importance will be ignored, resulting in the fusion result failing to truly reflect the actual appearance quality.
[0075] In terms of technical implementation, both the first and second weighted components are calculated using direct multiplication. The calculation formulas are as follows: First weighted component = morphological uniformity coefficient × morphological uniformity weight; Second weighted component = chromaticity coefficient × chromaticity weight. The original precision of the coefficients is preserved during the calculation process without additional normalization or correction, ensuring that the weighted components accurately reflect the actual quantitative value of the corresponding indicators after weighting. For example, if the morphological uniformity coefficient of the matsutake mushroom to be tested is 0.945 and the morphological uniformity weight is 0.6, then the first weighted component = 0.945 × 0.6 = 0.567; if the chromaticity coefficient is 0.77 and the chromaticity weight is 0.4, then the second weighted component = 0.77 × 0.4 = 0.308. Both weighted components are quantitative values based on a unified weighting standard and can be directly summed.
[0076] The technical effect of this step is that it completes the weighted transformation of two independent appearance indicators through simple and efficient multiplication operations, giving the originally independent indicators a basis for fusion. At the same time, the multiplication calculation method can accurately preserve the quantitative characteristics of the original coefficients and the distinguishing characteristics of the weights, avoiding the precision loss caused by complex calculations and improving the efficiency and accuracy of indicator fusion.
[0077] S43 involves obtaining the variety correction factor and origin correction factor for matsutake mushrooms, and calculating the comprehensive correction coefficient based on these factors. This step is crucial for adapting the appearance quantification results to the characteristics of different matsutake mushroom varieties. Physically speaking, different matsutake mushroom varieties have inherent differences in appearance due to their varietal characteristics. For example, some varieties have naturally lighter caps, while others have longer stems. Due to differences in natural environments such as soil, climate, and altitude, the appearance standards of matsutake mushrooms from different origins also differ. For instance, matsutake mushrooms from high-altitude origins generally have higher morphological uniformity. If a uniform standard is used to evaluate all types of matsutake mushrooms, the appearance quantification results of some varieties will deviate from their actual quality. Therefore, it is necessary to calibrate the evaluation results using variety and origin correction factors so that the appearance morphology coefficient can match the actual appearance characteristics of different types of matsutake mushrooms.
[0078] In terms of technical implementation, both the variety correction factor and the origin correction factor are determined by statistical analysis of measured data on the appearance characteristics of matsutake mushrooms of different varieties and origins, combined with industry evaluation standards. The values of the correction factors are all within a reasonable range of 0.9-1.1, which ensures the correction effect while avoiding distortion of results due to over-correction. The variety correction factor is determined based on the appearance characteristic benchmarks of different matsutake mushroom varieties, while the origin correction factor is determined based on the overall appearance quality level of matsutake mushrooms from different origins. Both correction factors are stored in the system database according to their categories. The system will accurately retrieve the corresponding factor based on the variety and origin information of the matsutake mushroom to be tested. The comprehensive correction coefficient is calculated by multiplication, and the calculation formula is: Comprehensive correction coefficient = Variety correction factor × Origin correction factor. The two-dimensional correction factors are calibrated collaboratively through multiplication fusion.
[0079] For example, if the matsutake mushroom to be tested is a fresh matsutake mushroom from Sichuan and Tibet, and the variety correction factor is 1.05 and the origin correction factor is 1.02, then the comprehensive correction coefficient = 1.05 × 1.02 = 1.071. This correction coefficient can positively calibrate the subsequent appearance quantification results, conforming to the actual appearance evaluation benchmark for this type of matsutake mushroom. The technical effect of this step is that by retrieving and integrating the variety and origin correction factors, it achieves category-based calibration of the appearance quantification results, allowing the appearance morphology coefficient to adapt to the differences in appearance characteristics of matsutake mushrooms from different varieties and origins. This effectively avoids the quantitative distortion problem caused by a unified evaluation standard, improves the universality and accuracy of the appearance morphology coefficient, and allows the appearance quality of different types of matsutake mushrooms to be quantitatively evaluated under a benchmark that conforms to their own characteristics.
[0080] S44 involves summing the first weighted component and the second weighted component to obtain an initial appearance morphology value. This step is the foundation for merging the two weighted appearance indicators. From a physical perspective, the first weighted component and the second weighted component are morphological and color quantification values based on the same weighting standard. The sum of the two can initially reflect the overall appearance quality of matsutake mushrooms and is the basic quantification value of the appearance morphology coefficient. This value does not consider the characteristic differences of varieties and origins and is only the appearance quantification result based on general standards. It can intuitively reflect the appearance quality level of matsutake mushrooms under the general evaluation system.
[0081] In terms of technical implementation, the initial appearance value is calculated using direct addition. The formula is: Initial appearance value = First weighted component + Second weighted component. During the calculation, the precision is maintained consistent with the weighted components, directly adding the quantitative values of the two indicators without additional processing. This ensures that the initial value accurately reflects the combined performance of the two weighted indicators. For example, if the first weighted component of the aforementioned matsutake mushroom is 0.567 and the second weighted component is 0.308, then the initial appearance value = 0.567 + 0.308 = 0.875. This value directly indicates that the matsutake mushroom's appearance is at a high level under general evaluation standards.
[0082] The technical effect of this step is that it completes the initial fusion of two weighted appearance indicators through simple addition, and obtains an initial value that can reflect the general appearance quality of matsutake mushrooms. The addition method not only ensures the fusion efficiency, but also allows the initial value to accurately reflect the comprehensive quantitative value of the two indicators, providing a basic quantitative basis for subsequent precise correction based on category characteristics.
[0083] S45 involves multiplying the initial appearance morphology value by the comprehensive correction coefficient to obtain the appearance morphology coefficient. This step is the final step in the quantitative evaluation of appearance morphology. From a physical perspective, the initial appearance morphology value is the appearance morphology quantification result based on the general standard, while the comprehensive correction coefficient is a calibration coefficient that conforms to the characteristics of the matsutake variety and origin to be tested. Multiplying the two can transform the quantification result under the general standard into a precise quantification value that conforms to the actual category characteristics of matsutake. The final appearance morphology coefficient can comprehensively, objectively, and accurately reflect the actual appearance quality of matsutake and is the core appearance quantification indicator for subsequent comprehensive quality coefficient calculation.
[0084] In terms of technical implementation, the appearance morphology coefficient is calculated using direct multiplication. The formula is: Appearance Morphology Coefficient = Initial Appearance Morphology Value × Comprehensive Correction Coefficient. The calculation result is rounded to three decimal places to ensure the quantification accuracy of the coefficient. The value range of the coefficient fluctuates slightly with the comprehensive correction coefficient, generally within the range of 0-1.1. The closer the value is to the upper limit, the better the appearance quality of the matsutake mushroom. For example, the initial appearance morphology value of the aforementioned matsutake mushroom is 0.875, and the comprehensive correction coefficient is 1.071. Then, the appearance morphology coefficient = 0.875 × 1.071 = 0.937125, which is 0.937 after rounding to three decimal places. This coefficient accurately reflects the actual appearance quality level of the fresh matsutake mushroom from Sichuan and Tibet after considering its own category characteristics.
[0085] The technical effect of this step is that it completes the categorization calibration of the initial appearance morphology value through multiplication operation, and obtains an appearance morphology coefficient that can fit the actual characteristics of matsutake mushrooms. This allows the appearance quality of matsutake mushrooms of different varieties and origins to have a comparable and quantifiable unified indicator. At the same time, the multiplication correction method can accurately integrate the category characteristics into the appearance quantification result, avoiding the problems of insufficient or excessive correction, and providing an accurate and universal appearance quantification basis for the subsequent calculation of the comprehensive quality coefficient.
[0086] In one embodiment, step S5, which involves obtaining moisture content data and relative content data of characteristic aroma components based on the spectral information, and obtaining internal characteristic coefficients based on the moisture content data and the relative content data of characteristic aroma components, includes: S51. Obtain moisture content data through a preset moisture inversion model based on the spectral information, and obtain relative content data of characteristic aroma components through a preset aroma inversion model. S52. Obtain the standard moisture content range and the standard aroma content range, and obtain the moisture compliance based on the ratio of the moisture content data to the standard moisture content range, and obtain the aroma compliance based on the ratio of the relative content data of the characteristic aroma components to the standard aroma content range. S53. Obtain the current ambient temperature and ambient humidity values, and calculate the environmental compensation coefficient based on the ambient temperature and ambient humidity values; S54. The moisture content and aroma content are weighted and summed to obtain the initial value of internal quality. S55. Multiply the initial value of the internal quality by the environmental compensation coefficient to obtain the internal characteristic coefficient.
[0087] As described in steps S51-S55 above, step S51 of this invention involves obtaining moisture content data based on the spectral information using a preset moisture inversion model. The moisture inversion model and aroma inversion model are constructed based on a partial least squares regression algorithm and are customized for the characteristics of matsutake mushroom samples. Specifically, the implementation is as follows: 1. Feature wavelength selection: The 900–2500 nm near-infrared detection band is selected. For the moisture inversion model, 1450 nm and 1940 nm (corresponding to the overtone absorption peaks of O–H bond stretching and bending vibrations, which are characteristic absorption bands of matsutake moisture) and 1190 nm and 1720 nm are selected as auxiliary wavelengths. For the aroma inversion model, 1380 nm, 1730 nm, and 2080 nm (corresponding to the characteristic absorption peaks of C–H and C=O bond vibrations in characteristic aroma molecules) are selected. These feature wavelengths are obtained through continuous projection algorithm (SPA) and variable importance projection (VIP) analysis, retaining only the top 20% of wavelengths contributing to the moisture / characteristic aroma component content, thus reducing model complexity while improving prediction accuracy. 2. Modeling Sample Construction: Ten mainstream matsutake mushroom varieties were selected (covering core production areas such as Sichuan-Tibet, Yunnan, and Jilin). Sample gradients were designed according to freshness grades (premium / grade 1 / grade 2 / grade 3) and storage time gradients (0h / 6h / 12h / 24h / 48h), resulting in 6000 independent samples. Each sample weighed 50±5g and was free from mold and damage. All samples were equilibrated for 2 hours under standard conditions (15℃, 65%RH). Surface impurities were wiped off with a lint-free gauze before spectral acquisition. The dataset was randomly divided into a calibration set (4200 samples), a validation set (1200 samples), and a test set (600 samples) in a 7:2:1 ratio to ensure that the proportion of each variety and gradient was consistent across the three datasets and to avoid dataset skew. 3. Spectral preprocessing steps: The raw spectral data are subjected to multivariate scattering correction (MSC), baseline correction (linear method, with 1000nm and 2200nm as baseline points), Savitzky-Golay smoothing (window size 11, polynomial order 2) and 0–1 interval normalization in sequence to eliminate interference caused by sample particle size, surface condition, instrument noise and detection position differences, and retain effective feature information. 4. Model Training and Validation: Using preprocessed spectral data as independent variables and laboratory-measured moisture content / relative content of characteristic aroma components as dependent variables, a partial least squares regression model was constructed. The optimal number of principal components for the moisture inversion model was set to 8, and the optimal number of principal components for the aroma inversion model was set to 10. The model was determined through 5-fold cross-validation, with a cumulative variance contribution rate ≥ 95%. The model validation indicators met the following requirements: for the moisture inversion model, the calibration set R² ≥ 0.98, RMSEC ≤ 0.2%, the validation set R² ≥ 0.97, RMSEP ≤ 0.3%, and the cross-validation RMSECV ≤ 0.25%; for the aroma inversion model, the calibration set R² ≥ 0.97, RMSEC ≤ 0.02, the validation set R² ≥ 0.96, RMSEP ≤ 0.03, and the cross-validation RMSECV ≤ 0.025. This met the industry standards for near-infrared spectral detection of edible fungi. The relative content data of characteristic aroma components (such as matsutake alcohol) were obtained through the preset aroma inversion model. This step is the core link in the non-destructive extraction of quantitative data on the internal core quality of matsutake mushrooms. In this invention, the "characteristic aroma components" specifically refer to the marker compounds that constitute the core flavor and typical aroma of matsutake mushrooms, including: matsutake alcohol (1-octen-3-ol, which is the core contributing component of matsutake mushroom's characteristic aroma, accounting for more than 60% of the total aroma content), citral, 3-octanone, and 3-octanol. During the modeling and detection process, matsutake alcohol is used as the core detection object. An external standard method is used to plot a standard curve with matsutake alcohol standard with a purity of ≥99%, and the relative content of characteristic aroma components is calculated (with the content of matsutake alcohol in premium fresh matsutake mushrooms as the baseline value 1). At the same time, the synergistic contribution of auxiliary components such as citral is taken into account to ensure the detectability and quantification of characteristic aroma components. From a physical point of view, the moisture and characteristic aroma components inside matsutake mushrooms will produce characteristic absorption of the spectrum at specific wavelengths. The change in absorbance at different wavelengths in the spectral information is quantitatively correlated with the content of substances. By constructing an inversion model, this correlation can be transformed into specific content data, realizing non-contact and non-destructive internal quality detection, avoiding the impact of destructive detection on the commercial value of matsutake mushrooms.
[0088] In terms of technical implementation, the spectral information is obtained by scanning key parts of the matsutake mushroom, such as the cap and stem, using a near-infrared spectrometer. The scanning wavelength range is preset to 900-2500nm, which can accurately capture the characteristic absorption peaks of moisture and matsutake mushroom characteristic aroma components. Both the moisture inversion model and the aroma inversion model are constructed based on the partial least squares regression algorithm. The training data of the models consist of near-infrared spectral data of matsutake mushroom samples with different content gradients and corresponding laboratory-measured moisture content and relative content data of characteristic aroma components. During the training process, the spectral data are preprocessed with multivariate scattering correction and baseline correction to eliminate the interference of spectral noise and baseline drift. At the same time, the root mean square error of the prediction model is set to be less than 0.5% to ensure prediction accuracy. Both models are pre-trained and stored in the system. During detection, the preprocessed spectral information is input into the corresponding model, and the moisture content data and relative content data of characteristic aroma components can be directly output. The moisture content data is expressed as a mass percentage, and the relative content data of characteristic aroma components is expressed as a ratio with the standard sample.
[0089] For example, inputting the spectral information of the matsutake mushroom to be tested into the moisture inversion model outputs a moisture content of 85.2%, while inputting it into the aroma inversion model outputs a relative content of characteristic aroma components of 0.98. The technical effect of this step is that the inversion model constructed by the partial least squares regression algorithm achieves the non-destructive and accurate extraction of quantitative data of internal moisture and characteristic aroma components of matsutake mushrooms from spectral information. Compared with traditional destructive laboratory testing, this method not only preserves the commercial value of matsutake mushrooms but also significantly improves testing efficiency, enabling real-time testing of batches of matsutake mushrooms. At the same time, the model preprocessing and precision settings ensure the accuracy of the output data, laying a precise data foundation for subsequent internal quality quantification calculations.
[0090] S52 involves obtaining the standard moisture content range and standard aroma content range, and obtaining the moisture compliance based on the ratio of the moisture content data to the standard moisture content range, and obtaining the aroma compliance based on the ratio of the relative content data of the characteristic aroma components to the standard aroma content range. This step quantifies the degree of conformity between the core quality indicators of matsutake mushrooms and the standards. From a physical perspective, the standard moisture content range and standard aroma content range are industry benchmarks for matsutake mushroom quality grading, defining the internal substance content range of fresh, high-quality matsutake mushrooms. The moisture compliance and aroma compliance directly reflect the degree of conformity between the actual content of the matsutake mushroom being tested and the benchmark. The higher the degree of conformity, the better the internal quality. Converting the content data into compliance indicators enables the standardization and quantification of internal quality indicators in different dimensions, providing a prerequisite for subsequent fusion calculations.
[0091] In terms of technical implementation, the standard moisture content range and standard aroma content range are determined by the industry standard for matsutake quality grading combined with the measured material content data of fresh matsutake. The standard moisture content range of matsutake is preset to 80%-90%, and the standard aroma content range is preset to 0.9-1.1. These standard ranges are stored in the system database according to matsutake varieties, and the system will accurately retrieve them based on the variety information of the matsutake to be tested. Moisture content compliance is calculated based on the median of the standard moisture content range. The formula is: Moisture content compliance = 1 - |Moisture content data - Median standard moisture content| / Median standard moisture content. The standard aroma content range is based on 1. Aroma compliance is directly the ratio of the relative content data of characteristic aroma components to 1, that is, aroma compliance = relative content data of characteristic aroma components / 1. The closer the values of the two compliance indicators are to 1, the higher the degree of conformity between the corresponding internal indicators and the standard.
[0092] The technical effect of this step is to transform the content data of moisture and characteristic aroma components into standardized compliance indicators, realizing a unified quantitative representation of internal quality indicators in different dimensions. This allows indicators that originally had the same dimensions but different evaluation benchmarks to be integrated. At the same time, the compliance indicators can intuitively reflect the degree of fit between internal quality and industry standards, providing a clear quantitative basis for the subsequent comprehensive quantification of internal quality.
[0093] S53 involves obtaining the current ambient temperature and humidity values and calculating an environmental compensation coefficient based on these values. This step is crucial for eliminating the interference of ambient temperature and humidity on the internal quality quantification results. From a physical perspective, ambient temperature and humidity directly affect the evaporation of moisture and the volatilization of aroma components inside matsutake mushrooms. They also slightly interfere with the propagation and detection of near-infrared spectra. The same matsutake mushroom will have slight deviations in the content data obtained from spectral detection under different temperature and humidity conditions. If the data is used directly to calculate the compliance, the internal quality quantification results will be distorted and will not reflect the true internal state of the matsutake mushroom. Therefore, it is necessary to calculate the compensation coefficient based on the actual temperature and humidity to correct the subsequent internal quality quantification results.
[0094] In terms of technical implementation, the ambient temperature and humidity values are collected in real time by temperature and humidity sensors that are paired with the spectrometer. The technical effect of this step is that the ambient temperature and humidity values are collected in real time by temperature and humidity sensors, and the current ambient temperature and humidity values are assigned based on historical ambient temperature value-compensation coefficient comparison tables and historical ambient humidity value-compensation coefficient comparison tables to obtain ambient temperature compensation coefficient and ambient humidity compensation coefficient. The ambient temperature compensation coefficient and ambient humidity compensation coefficient are weighted and summed to obtain the ambient compensation coefficient. In this way, the environmental compensation coefficient can effectively eliminate the interference of environmental temperature and humidity on the quantification of internal quality, ensuring that the subsequent quantification results can reflect the true internal state of matsutake mushrooms. At the same time, the limited range of the compensation coefficient avoids the distortion of results caused by over-correction, thus improving the accuracy of internal quality quantification.
[0095] S54 involves weighted summation of the moisture content and aroma content to obtain an initial internal quality value. This step is fundamental to integrating the two core internal quality compliance indicators. Physically speaking, the relative importance of moisture content and characteristic aroma components in the evaluation of matsutake's internal quality differs. Characteristic aroma components represent the core flavor and commercial value of matsutake and thus have a higher weighting in the evaluation. Moisture content, on the other hand, ensures freshness and basic quality. Weighted summation reflects the difference in their importance, yielding a quantitative value that preliminarily and comprehensively reflects the internal quality of matsutake. This value does not consider the interference of environmental factors and is a basic quantitative result of internal quality based on industry standards.
[0096] In terms of technical implementation, the weights of the weighted summation are determined by the industry requirements for internal quality evaluation of matsutake mushrooms. The weight of aroma conformity is preset to 0.6, and the weight of moisture conformity is preset to 0.4. The sum of the two weights is 1. This weight setting highlights the core position of characteristic aroma components in internal quality evaluation, while taking into account the importance of moisture content. The weight values are stored in the system in advance. The formula for calculating the initial value of internal quality is: Initial value of internal quality = Moisture content × 0.4 + Aroma content × 0.6. The calculation should be rounded to four decimal places to ensure quantitative accuracy. For example, if the moisture content of the matsutake mushroom to be tested is 1.002 and the aroma content is 0.98, then the initial value of internal quality = 1.002 × 0.4 + 0.98 × 0.6 = 0.4008 + 0.588 = 0.9888. This value directly indicates that the internal quality of this matsutake mushroom is at a relatively high level under industry standards. The technical effect of this step is that it achieves a scientific fusion of two core internal quality compliance indicators through weighted summation. The weight setting is in line with the industry practice of matsutake internal quality evaluation, highlighting the core position of characteristic aroma components. Compared with simple equal-weighted summation, it can more accurately reflect the internal quality status of matsutake. At the same time, the weighted summation calculation method is simple and efficient, reducing the system's computing power requirements while ensuring quantitative accuracy, and providing a precise quantitative basis for subsequent environmental compensation correction.
[0097] S55 involves multiplying the initial internal quality value by the environmental compensation coefficient to obtain the internal characteristic coefficient. This step is the final step in the quantitative evaluation of the internal quality of matsutake mushrooms. From a physical perspective, the initial internal quality value is the quantitative result of internal quality based on industry standards, without considering the interference of environmental temperature and humidity on the test results. The environmental compensation coefficient is a calibration coefficient that conforms to the actual testing environment. Multiplying the two can transform the quantitative result under the standard into an accurate quantitative value that conforms to the actual testing environment. The final internal characteristic coefficient can comprehensively, objectively, and accurately reflect the true internal quality of matsutake mushrooms. It is the core internal quantitative indicator for subsequent comprehensive quality coefficient calculation and dynamic quality monitoring. Its numerical change can directly reflect the deterioration trend of the internal quality of matsutake mushrooms.
[0098] In terms of technical implementation, the internal characteristic coefficient is calculated using direct multiplication. The formula is: Internal Characteristic Coefficient = Initial Internal Quality Value × Environmental Compensation Coefficient. The result is rounded to three decimal places to ensure the accuracy of the coefficient's quantification. The coefficient's value range fluctuates slightly with the environmental compensation coefficient, generally falling within the range of 0.8-1.1. The closer the value is to the upper limit, the better the internal quality of the matsutake mushroom; the lower the value, the worse the internal quality. Furthermore, the temporal variation of this coefficient accurately reflects the dynamic changes in the internal quality of the matsutake mushroom. For example, if the initial internal quality value of the matsutake mushroom to be tested is 0.9888 and the environmental compensation coefficient is 0.988, then the internal characteristic coefficient = 0.9888 × 0.988 ≈ 0.977. This coefficient accurately reflects the true internal quality level of the matsutake mushroom under actual testing conditions. The technical effect of this step is that it completes the environmental calibration of the initial value of internal quality through multiplication, and obtains an internal characteristic coefficient that can fit the actual testing environment. This effectively eliminates the interference of environmental temperature and humidity on the quantification of internal quality, ensuring the authenticity and accuracy of the coefficient. At the same time, as a single quantitative indicator, this coefficient achieves a comprehensive characterization of the internal quality of matsutake mushrooms, allowing the internal quality of different matsutake mushrooms to be directly compared through the coefficient. It also provides a unified and accurate quantitative basis for subsequent analysis of the deterioration trend of matsutake mushroom quality through time-series data.
[0099] In one embodiment, step S6, which involves obtaining a comprehensive quality coefficient based on the appearance morphology coefficient and the internal characteristic coefficient, and monitoring the quality of the matsutake mushroom under test based on the internal characteristic coefficient to obtain a quality monitoring result, includes: S61. The appearance morphology coefficient and the internal feature coefficient are weighted and fused to obtain the comprehensive quality coefficient; S62. Obtain a preset quality grade classification threshold set, and determine the current quality grade based on the comparison result between the comprehensive quality coefficient and the quality grade classification threshold set. S63. Obtain the time series data of the internal feature coefficients within a preset historical time period, and fit the quality degradation trend line based on the time series data using a linear regression algorithm. S64. Obtain the quality degradation rate based on the slope of the quality degradation trend line, and determine whether the quality degradation rate exceeds a preset degradation rate threshold. S65. If the quality deterioration rate exceeds the deterioration rate threshold, an early warning signal is generated, and the current quality level, quality deterioration rate, and early warning signal are output together as the quality monitoring result.
[0100] As described in steps S61-S65 above, step S61 of this invention involves weighted fusion of the appearance morphology coefficient and the internal characteristic coefficient to obtain a comprehensive quality coefficient. This step is the core step in comprehensively quantifying the overall quality of matsutake mushrooms. From a physical perspective, the appearance morphology coefficient is a quantitative representation of the appearance of matsutake mushrooms, directly affecting their market grading and commodity value. The internal characteristic coefficient is a core quantitative indicator of the edible value and freshness of matsutake mushrooms, determining their actual quality and shelf life. The two have different levels of importance in the comprehensive quality evaluation, with internal quality having a greater impact on the actual value of matsutake mushrooms. By weighted fusion, the characteristics of the two dimensions can be taken into account, while also reflecting the difference in their evaluation weights, resulting in a single quantitative coefficient that can comprehensively reflect the overall quality of matsutake mushrooms, providing a unified basis for subsequent quality grade classification.
[0101] In terms of technical implementation, the weights of the weighted fusion are determined by the industry standards for matsutake quality grading and actual application needs. Taking into account both the commodity and edible attributes of matsutake, the weight of the internal characteristic coefficient is preset to 0.6, and the weight of the appearance morphology coefficient is preset to 0.4. The sum of the two weights is 1. This weight setting highlights the core position of internal quality in the comprehensive evaluation of matsutake, while also taking into account the commodity value of appearance. The weight values are stored in the system database in advance and can be fine-tuned according to the application scenario. The overall quality coefficient is calculated using a linear weighted fusion algorithm. The formula is: Overall Quality Coefficient = Appearance Morphology Coefficient × 0.4 + Internal Feature Coefficient × 0.6. Three decimal places are retained during the calculation to ensure the accuracy of the coefficient. The coefficient value generally falls within the range of 0-1.1; the closer the value is to the upper limit, the better the overall quality of the matsutake mushroom. For example, if the appearance morphology coefficient of the matsutake mushroom being tested is 0.937 and the internal feature coefficient is 0.977, then the overall quality coefficient = 0.937 × 0.4 + 0.977 × 0.6 = 0.961. This coefficient directly reflects the high overall quality of the matsutake mushroom. The technical effect of this step is that it integrates two independent quality quantification indicators, appearance and internal structure, into a single comprehensive quality coefficient through a linear weighted fusion algorithm. This achieves a comprehensive quantitative representation of the overall quality of the matsutake mushroom. The weighting settings are in line with the industry's actual needs and real value requirements for matsutake mushroom quality evaluation. Compared with a single-dimensional quality judgment, it can more accurately reflect the comprehensive commercial and edible value of matsutake mushrooms. At the same time, the unified quantitative coefficient provides an accurate and comparable basis for subsequent standardized quality grade classification, thereby improving the standardization level of quality evaluation.
[0102] S62 involves obtaining a preset quality grade classification threshold set and determining the current quality grade based on the comparison result between the comprehensive quality coefficient and the quality grade classification threshold set. This step is a process of converting the comprehensive quality coefficient into a standardized quality grade. From a physical perspective, the comprehensive quality coefficient is a precise quantitative value. Matsutake mushrooms require clear grading standards in market circulation and harvesting grading. By using a preset threshold set to correspond the quantitative coefficient with the grade, the quality evaluation results can better meet the needs of actual application scenarios, facilitating the grading and pricing, warehousing management, and market circulation of matsutake mushrooms. If only the quantitative coefficient is retained without grading, the practical application value of the quality evaluation results will be reduced.
[0103] In terms of technical implementation, the preset quality grade classification threshold set is determined by statistical analysis of the national industry standard for matsutake quality grading, the market's general grading rules, and the comprehensive quality coefficient measured data of a large number of matsutake samples. The threshold set divides matsutake into four grades: special grade, first grade, second grade, and third grade according to the comprehensive quality coefficient from high to low. The corresponding threshold ranges are preset as follows: special grade ≥ 0.9, 0.8 ≤ first grade < 0.9, 0.7 ≤ second grade < 0.8, and third grade < 0.7. This threshold set is stored in the system in advance and can be fine-tuned according to the characteristics of matsutake in different production areas and varieties. The system compares the calculated comprehensive quality coefficient with each interval of the threshold set one by one, and directly determines the current quality grade of the matsutake mushroom to be tested based on the interval to which the coefficient belongs. At the same time, the grade results are digitally marked for easy subsequent storage and analysis.
[0104] For example, the comprehensive quality coefficient of the aforementioned matsutake mushroom to be tested is 0.961. This value falls within the threshold range corresponding to the premium grade. Therefore, its current quality grade is determined to be premium grade. The technical effect of this step is that by using a preset standardized threshold set, the abstract comprehensive quality coefficient is transformed into a quality grade that fits the actual application. This achieves standardized grading of matsutake quality, allowing the quality evaluation results to directly serve the harvesting grading, market pricing, and storage management of matsutake. Compared with manual grading without a unified standard, this method provides clear and executable quantitative basis for grading, effectively reducing the grading deviation caused by subjective human judgment and improving the standardization and accuracy of matsutake grading.
[0105] S63 involves obtaining time-series data of the internal characteristic coefficients within a preset historical time period, and fitting a quality deterioration trend line using a linear regression algorithm based on the time-series data. This step is fundamental for quantitatively analyzing the quality deterioration trend of matsutake mushrooms. From a physical perspective, the quality deterioration of matsutake mushrooms is mainly reflected in changes in internal quality such as internal moisture loss and aroma component volatilization. The appearance quality is relatively stable in a short period of time. Therefore, the time-series changes of the internal characteristic coefficients can accurately reflect the true deterioration process of matsutake mushroom quality. By fitting the time-series data using a linear regression algorithm, discrete detection data can be transformed into a continuous trend line, intuitively reflecting the change law of internal quality over time, and providing a basis for subsequent calculation of the deterioration rate.
[0106] In terms of technical implementation, the preset historical time period is determined based on the storage characteristics and monitoring requirements of matsutake mushrooms. In the warehousing scenario, it is preset to 24 hours, and in the cold chain logistics scenario, it can be preset to 48 hours. This time period can be flexibly adjusted by the system according to the actual application scenario. The time series data of internal feature coefficients are collected and stored by the system in real time, with the collection interval preset to 2 hours. The system automatically retrieves all internal feature coefficient detection data within the preset time period to form a time series data sequence with the detection time as the horizontal axis and the internal feature coefficients as the vertical axis. The linear regression algorithm uses a univariate linear regression model with detection time as the independent variable x and internal characteristic coefficients as the dependent variable y. The model parameters k and b are solved by the least squares method to obtain the analytical expression of the quality degradation trend line y=kx+b, where the slope k reflects the rate of change of the internal characteristic coefficients over time. The goodness of fit R² of the model is preset to be no less than 0.9 to ensure that the trend line can accurately fit the changing pattern of the time series data.
[0107] For example, if we retrieve the time series data of the internal characteristic coefficients of a certain matsutake mushroom over 24 hours, with the detection time being 0, 2, 4...24 hours, the corresponding coefficients are 0.977, 0.972, 0.968...0.921. By fitting the data using a univariate linear regression algorithm, we obtain the trend line y=-0.0023x+0.9768, with a goodness of fit R²=0.98. This trend line accurately reflects the decreasing trend of the internal characteristic coefficients of the matsutake mushroom over time. The technical effect of this step is that by retrieving time-series data of internal characteristic coefficients, focusing on the core dimensions of matsutake quality deterioration, and combining univariate linear regression algorithm and least squares method to fit the quality deterioration trend line, the discrete detection data is transformed into a continuous trend, realizing the quantitative characterization of the matsutake quality deterioration process. The parameter setting of the goodness of fit ensures the accuracy of the trend line, which can truly reflect the actual change law of internal quality, and provides a reliable model basis for the accurate calculation of subsequent deterioration rate.
[0108] S64 involves obtaining the quality deterioration rate based on the slope of the quality deterioration trend line and determining whether the quality deterioration rate exceeds a preset deterioration rate threshold. This step is the core step in quantifying the degree of quality deterioration of matsutake mushrooms. From a physical perspective, the absolute value of the slope of the quality deterioration trend line directly reflects the rate of decrease of the internal characteristic coefficient, i.e., how fast the quality of matsutake mushrooms deteriorates. The larger the absolute value of the slope, the faster the deterioration rate and the shorter the shelf life of matsutake mushrooms. By comparing the deterioration rate with the preset threshold, it is possible to clearly determine whether the quality deterioration of matsutake mushrooms is within the normal range, providing a quantitative basis for the generation of subsequent warning signals. If only the trend line is fitted without rate judgment, it is impossible to accurately identify abnormal deterioration.
[0109] In terms of technical implementation, the quality deterioration rate is the absolute value of the slope of the quality deterioration trend line. A negative slope indicates that the internal characteristic coefficient decreases over time. Its absolute value is the decrease of the internal characteristic coefficient per unit time, and the unit is "coefficient / hour". The system directly extracts the slope k in the trend line analytical formula and takes the absolute value to obtain the quality deterioration rate of the matsutake mushroom to be tested. The preset deterioration rate threshold is determined by the industry standard for matsutake preservation and the measured data of matsutake deterioration under different storage environments. The preset threshold is 0.003 coefficient / hour for room temperature storage and 0.0015 coefficient / hour for cold chain storage. This threshold is stored in the system according to the storage environment. The system automatically retrieves the corresponding threshold according to the current matsutake storage environment. The system then compares the calculated quality degradation rate with a retrieved threshold value to determine if the degradation rate exceeds the threshold. If the degradation rate > the threshold, it is determined to be abnormal quality degradation; if the degradation rate ≤ the threshold, it is determined to be normal quality degradation. For example, if the slope of the trend line obtained from the aforementioned fitting is k = -0.0023, and the quality degradation rate is 0.0023 coefficient / hour, and if the matsutake mushroom is in a cold chain storage environment with a retrieved threshold of 0.0015 coefficient / hour, and 0.0023 > 0.0015, then it is determined that its quality degradation rate exceeds the preset threshold. The technical advantage of this step lies in its ability to accurately quantify the rate of quality deterioration by extracting the absolute value of the trend line slope. This provides a quantifiable and comparable basis for judging the speed of matsutake quality deterioration. At the same time, by pre-setting differentiated deterioration rate thresholds according to the storage environment, the judgment criteria are more in line with the needs of actual storage scenarios. Compared with manual experience judgment without quantitative standards, this method can accurately identify abnormal quality deterioration of matsutake, improve the objectivity and accuracy of quality deterioration judgment, and provide clear quantitative triggering conditions for subsequent early warning mechanisms.
[0110] S65 generates an early warning signal if the quality deterioration rate exceeds the deterioration rate threshold, and outputs the current quality level, quality deterioration rate, and early warning signal as the quality monitoring result. This step is the final output link of matsutake quality monitoring. From a physical point of view, when the quality deterioration rate of matsutake exceeds the threshold, it indicates that its internal quality is in an abnormally rapid deterioration state. If intervention measures such as adjusting the storage environment and accelerating circulation are not taken in time, matsutake will quickly lose its commercial and edible value. Therefore, it is necessary to generate an early warning signal to remind staff to intervene. At the same time, integrating the quality level, deterioration rate, and early warning signal into the output allows staff to fully grasp the current quality status and deterioration of matsutake, providing complete information support for the formulation of intervention measures.
[0111] In terms of technical implementation, if the system determines that the quality deterioration rate exceeds a preset threshold, it will automatically generate a level one warning signal. The warning signal is presented in the form of a combination of text and labels, and can also trigger an audio-visual reminder. If the deterioration rate does not exceed the threshold, no warning signal will be generated. The system integrates the previously determined current quality level, the calculated quality deterioration rate, and the warning signal (empty if none) to form a structured quality monitoring result. The monitoring result is output in the form of a visual interface and is simultaneously stored in the system database for subsequent quality traceability and data analysis. The output content includes the unique identifier of the matsutake mushroom, the current quality level, the quality deterioration rate, whether a warning signal exists, the detection time, and other core information.
[0112] For example, if the aforementioned matsutake mushroom is determined to have a deterioration rate exceeding the threshold, the system generates a Level 1 warning signal. The final output quality monitoring result is: Identifier ×××, Current quality grade: Special Grade, Quality deterioration rate: 0.0023 coefficient / hour, Warning signal: Level 1, Detection time: ×× hours. The technical effect of this step is that by setting up a warning signal generation mechanism, timely reminders of abnormal quality deterioration of matsutake mushrooms are achieved. This allows staff to quickly identify quality problems and take targeted intervention measures, effectively extending the shelf life of matsutake mushrooms and reducing quality loss. At the same time, the structured quality monitoring result integrates the core information of current quality and dynamic deterioration, realizing the combination of static quality evaluation and dynamic deterioration monitoring. Compared with the traditional method of only outputting a single quality grade, this result can provide more comprehensive and valuable information support for the whole chain quality management of matsutake mushrooms, enhance the practical application value of quality monitoring, and effectively overcome the subjectivity and one-sidedness of manual evaluation.
[0113] This application also provides a matsutake mushroom quality monitoring system, including: The first acquisition module is used to acquire image information and spectral information of the matsutake mushroom to be tested, wherein the image information includes morphological parameter information and color parameter information; The first calculation module is used to obtain cap diameter data and stipe length data based on the morphological parameter information, and to obtain a morphological uniformity coefficient based on the cap diameter data and stipe length data. The second calculation module is used to obtain the main color tone value and the color uniformity value of the cap based on the color parameter information, and to obtain the color coefficient based on the main color tone value and the color uniformity value of the cap. The third calculation module is used to obtain the appearance morphology coefficient based on the morphological uniformity coefficient and the chromaticity coefficient. The fourth calculation module is used to obtain moisture content data and relative content data of characteristic aroma components based on the spectral information, and to obtain internal characteristic coefficients based on the moisture content data and the relative content data of characteristic aroma components. The monitoring module is used to obtain a comprehensive quality coefficient based on the appearance morphology coefficient and the internal characteristic coefficient, and to monitor the quality of the matsutake mushroom to be tested based on the internal characteristic coefficient, thereby obtaining a quality monitoring result.
[0114] In one embodiment, the first computing module includes: The first processing unit is used to perform edge detection on the morphological parameter information to obtain the outline of the matsutake mushroom to be tested, and to obtain the cap projection area based on the outline fitting, and to obtain the minimum circumcircle corresponding to the cap projection area based on the cap projection area, and to use the diameter of the minimum circumcircle as the cap diameter data. The second processing unit is used to obtain the main stem axis information of the matsutake mushroom to be tested based on the morphological parameter information, and to obtain the pixel distance from the stipe starting point to the connection point between the cap and the stipe based on the main stem axis information, convert the pixel distance into the stipe length based on a preset calibration ratio, and use the stipe length as the stipe length data. The first acquisition unit is used to acquire a preset standard matsutake morphology template and extract the standard cap diameter range and standard stipe length range from the standard matsutake morphology template. The third processing unit is used to calculate the diameter deviation rate based on the cap diameter data and the standard cap diameter range, and to calculate the length deviation rate based on the stipe length data and the standard stipe length range. The second acquisition unit is used to acquire a preset ideal ratio value between the cap and the stem, and to calculate the actual ratio value based on the cap diameter data and the stem length data. The fourth processing unit is used to obtain a ratio deviation coefficient based on the actual ratio value and the ideal ratio value; The first fusion unit is used to perform weighted fusion based on the diameter deviation rate, length deviation rate and the proportional deviation coefficient to obtain the morphological symmetry coefficient.
[0115] This application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described method.
[0116] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0117] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in this application and in the embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-speed SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0118] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.
[0119] The above description is merely a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A method for monitoring the quality of matsutake mushrooms, characterized in that, include: Acquire image and spectral information of the matsutake mushroom to be tested, wherein the image information includes morphological parameter information and color parameter information; Based on the morphological parameter information, the cap diameter data and stipe length data are obtained, and based on the cap diameter data and stipe length data, a morphological uniformity coefficient is obtained, including: Edge detection is performed on the morphological parameter information to obtain the outline of the matsutake mushroom to be tested. The mushroom cap projection area is obtained by fitting the outline. The minimum circumcircle corresponding to the mushroom cap projection area is obtained by the mushroom cap projection area. The diameter of the minimum circumcircle is used as the mushroom cap diameter data. The main stem axis information of the matsutake mushroom to be tested is obtained based on the morphological parameter information, and the pixel distance from the stipe starting point to the connection point between the cap and the stipe is obtained based on the main stem axis information. The pixel distance is converted into stipe length based on a preset calibration ratio, and the stipe length is used as stipe length data. Obtain a preset standard matsutake morphology template, and extract the standard cap diameter range and standard stipe length range from the standard matsutake morphology template; The diameter deviation rate is calculated based on the cap diameter data and the standard cap diameter range, and the length deviation rate is calculated based on the stipe length data and the standard stipe length range. Obtain the preset ideal ratio value between the cap and the stem, and calculate the actual ratio value based on the cap diameter data and the stem length data; The ratio deviation coefficient is obtained based on the actual ratio value and the ideal ratio value; The morphological uniformity coefficient is obtained by weighting and fusing the diameter deviation rate, length deviation rate and proportional deviation coefficient. Based on the color parameter information, the dominant color value and color uniformity value of the cap are obtained, and the color coefficient is obtained based on the dominant color value and color uniformity value of the cap, including: Obtain a preset standard colorimetric database, and extract the standard primary color value and standard color uniformity threshold corresponding to the matsutake variety from the standard colorimetric database; The color difference vector is calculated based on the main color value of the cap and the standard main color value, and the main color deviation index is obtained based on the magnitude of the color difference vector. The uniformity value of the cap color is normalized to obtain a uniformity normalized value, and the uniformity compliance is obtained according to the ratio of the uniformity normalized value to the standard color uniformity threshold. Acquire ambient light intensity data, and compensate the main color deviation index based on the ambient light intensity data to obtain the compensated main color deviation index; The compensated primary color deviation index and the uniformity conformity are multiplied and fused to obtain the chromaticity coefficient; The appearance morphology coefficient is obtained based on the morphological symmetry coefficient and the chromaticity coefficient, including: Obtain a preset appearance shape weight vector, which includes shape symmetry weight and color weight; The first weighted component is calculated based on the morphological uniformity coefficient and the morphological uniformity weight, and the second weighted component is calculated based on the chromaticity coefficient and the chromaticity weight. Obtain the variety correction factor and origin correction factor of matsutake mushroom, and calculate the comprehensive correction coefficient based on the variety correction factor and origin correction factor; The first weighted component and the second weighted component are summed to obtain the initial appearance value; Multiply the initial appearance value by the comprehensive correction coefficient to obtain the appearance coefficient; Based on the spectral information, moisture content data and relative content data of characteristic aroma components are obtained, and internal characteristic coefficients are obtained based on the moisture content data and the relative content data of characteristic aroma components, including: Based on the spectral information, moisture content data is obtained through a preset moisture inversion model, and relative content data of characteristic aroma components is obtained through a preset aroma inversion model. Obtain the standard moisture content range and the standard aroma content range, and obtain the moisture content compliance based on the ratio of the moisture content data to the standard moisture content range, and obtain the aroma compliance based on the ratio of the relative content data of the characteristic aroma components to the standard aroma content range; Obtain the current ambient temperature and humidity values, and calculate the environmental compensation coefficient based on the ambient temperature and humidity values; The initial value of internal quality is obtained by weighted summing of the moisture content and the aroma content. Multiply the initial value of the internal quality by the environmental compensation coefficient to obtain the internal characteristic coefficient; A comprehensive quality coefficient is obtained based on the appearance morphology coefficient and the internal characteristic coefficient. The quality of the matsutake mushroom to be tested is monitored based on the internal characteristic coefficient to obtain quality monitoring results, including: The appearance morphology coefficient and the internal feature coefficient are weighted and fused to obtain the comprehensive quality coefficient; Obtain a preset set of quality grade classification thresholds, and determine the current quality grade based on the comparison result between the comprehensive quality coefficient and the set of quality grade classification thresholds; Obtain the time series data of the internal feature coefficients within a preset historical time period, and fit the quality degradation trend line based on the time series data using a linear regression algorithm; The quality degradation rate is obtained based on the slope of the quality degradation trend line, and it is determined whether the quality degradation rate exceeds a preset degradation rate threshold. If the quality degradation rate exceeds the degradation rate threshold, an early warning signal is generated, and the current quality level, quality degradation rate, and early warning signal are output together as the quality monitoring result.
2. A matsutake mushroom quality monitoring system, used to execute the matsutake mushroom quality monitoring method according to claim 1, characterized in that, include: The first acquisition module is used to acquire image information and spectral information of the matsutake mushroom to be tested, wherein the image information includes morphological parameter information and color parameter information; The first calculation module is used to obtain cap diameter data and stipe length data based on the morphological parameter information, and to obtain a morphological uniformity coefficient based on the cap diameter data and stipe length data. The second calculation module is used to obtain the main color tone value and the color uniformity value of the cap based on the color parameter information, and to obtain the color coefficient based on the main color tone value and the color uniformity value of the cap. The third calculation module is used to obtain the appearance morphology coefficient based on the morphological uniformity coefficient and the chromaticity coefficient. The fourth calculation module is used to obtain moisture content data and relative content data of characteristic aroma components based on the spectral information, and to obtain internal characteristic coefficients based on the moisture content data and the relative content data of characteristic aroma components. The monitoring module is used to obtain a comprehensive quality coefficient based on the appearance morphology coefficient and the internal characteristic coefficient, and to monitor the quality of the matsutake mushroom to be tested based on the internal characteristic coefficient, thereby obtaining a quality monitoring result.
3. The matsutake mushroom quality monitoring system according to claim 2, characterized in that, The first computing module includes: The first processing unit is used to perform edge detection on the morphological parameter information to obtain the outline of the matsutake mushroom to be tested, and to obtain the cap projection area based on the outline fitting, and to obtain the minimum circumcircle corresponding to the cap projection area based on the cap projection area, and to use the diameter of the minimum circumcircle as the cap diameter data. The second processing unit is used to obtain the main stem axis information of the matsutake mushroom to be tested based on the morphological parameter information, and to obtain the pixel distance from the stipe starting point to the connection point between the cap and the stipe based on the main stem axis information, convert the pixel distance into the stipe length based on a preset calibration ratio, and use the stipe length as the stipe length data. The first acquisition unit is used to acquire a preset standard matsutake morphology template and extract the standard cap diameter range and standard stipe length range from the standard matsutake morphology template. The third processing unit is used to calculate the diameter deviation rate based on the cap diameter data and the standard cap diameter range, and to calculate the length deviation rate based on the stipe length data and the standard stipe length range. The second acquisition unit is used to acquire a preset ideal ratio value between the cap and the stem, and to calculate the actual ratio value based on the cap diameter data and the stem length data. The fourth processing unit is used to obtain a ratio deviation coefficient based on the actual ratio value and the ideal ratio value; The first fusion unit is used to perform weighted fusion based on the diameter deviation rate, length deviation rate and the proportional deviation coefficient to obtain the morphological symmetry coefficient.
4. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method of claim 1.
5. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method of claim 1.
Citation Information
Patent Citations
Fruit grading method and device for machine vision of taro harvesting equipment
CN118883544A
Digital comprehensive evaluation system for tea quality based on multi-source data fusion
CN120543008A
Gastrodia elata quality detection method based on computer vision technology
CN120778723A
Food multi-modal detection data fusion analysis method, device, equipment and medium
CN121329232A
Systems and methods for automated produce grading and sorting using machine vision and robotics
US12558712B1
