Medlar screening and grading method and system based on machine vision
By measuring the conveyor belt speed and wolfberry distribution density in real time, evaluating the performance stability of the image processing system and dynamically adjusting the conveyor belt speed, the problem of image processing lag in the existing technology is solved, improving the efficiency and stability of wolfberry screening and grading, and reducing defective products Rate and production costs improve the consistency of product quality.
Patent Information
- Application Number
- CN202411278009.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-09-12
AI Technical Summary
When processing large amounts of image data, the existing machine vision-based wolfberry screening and grading system may cause image processing and classification lag, affecting the overall grading efficiency and product quality control, and it is difficult to detect and correct errors in the grading process in a timely manner.
By measuring the conveyor belt speed and wolfberry distribution density in real time, the theoretical processing speed of the image processing system is determined, and compared with the actual processing speed is compared and analyzed, performance stability is evaluated, and the conveyor belt speed is dynamically adjusted to optimize system performance and ensure that the image processing system is under different operating conditions. performance stability under .
Improve the overall efficiency and stability of wolfberry screening and grading, reduce defective rate and production costs, improve product quality consistency and market competitiveness, realize intelligent and dynamic conveyor speed adjustment, and enhance the flexibility of the system. and adaptability.
Smart Images

Figure CN119131502A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of wolfberry screening, and in particular to a wolfberry screening and grading method and system based on machine vision. Background Art
[0002] Goji berry screening and grading based on machine vision refers to the process of screening and classifying goji berries using machine vision technology. Machine vision technology captures images of goji berries through cameras or sensors and uses image processing algorithms to analyze these images to identify the size, color, shape and other characteristics of goji berries. Based on these characteristics, the system can automatically classify goji berries into different grades or categories for subsequent packaging and sales. The application of this technology can significantly improve the efficiency and accuracy of goji berry screening and grading, and reduce manual operation errors and labor costs. The machine vision system can process a large number of goji berries in a short period of time and accurately classify them according to preset standards, thereby ensuring the consistency of product quality. In addition, this automated grading method also helps to improve the overall automation level of the production line and achieve a more efficient production process.
[0003] The shortcomings of the prior art:
[0004] In the prior art, when using a high-resolution camera to shoot wolfberries on a conveyor belt in real time, real-time shooting and processing of large amounts of image data may require powerful computing power and fast data transmission. However, if the data processing speed cannot keep up with the speed of the conveyor belt, it may cause a lag in image processing and classification, affecting the overall grading efficiency. At the same time, classification lag makes real-time monitoring and quality control more difficult. It is difficult for production managers to detect and correct errors in the grading process in a timely manner, which increases the difficulty of product quality control. Summary of the invention
[0005] The purpose of the present invention is to provide a method and system for screening and grading wolfberries based on machine vision to overcome the shortcomings of the background technology.
[0006] In order to achieve the above object, the present invention provides the following technical solution: a method for screening and grading wolfberries based on machine vision, comprising the following steps:
[0007] S1: Measure the real-time speed of the conveyor belt under different operating conditions, determine the number of images that need to be processed within a fixed time period according to the real-time speed of the conveyor belt and the distribution density of wolfberries, and determine the theoretical processing speed of the image processing system according to the number of images;
[0008] S2: Compare and analyze the theoretical processing speed of the image processing system with its actual processing speed, and divide it into a normal speed synchronization situation and an abnormal speed synchronization situation according to the analysis results;
[0009] S3: For abnormal speed synchronization, analyze the fluctuation range of the image processing system's accuracy in wolfberry classification and the delay of the image processing system in data processing to evaluate the performance stability of the image processing system in wolfberry classification;
[0010] S4: Based on the evaluation results, the performance stability of the image processing system for wolfberry classification under different operating conditions of the conveyor belt is divided into three categories: performance stability, possible performance stability, and performance instability, and corresponding measures are taken to optimize the system performance;
[0011] S5: When the performance of the image processing system is possibly stable, the performance stability of the image processing system in classifying wolfberries in a subsequent fixed time period is further analyzed, and the conveyor belt speed is dynamically adjusted according to the analysis results to improve the overall efficiency of wolfberry screening and grading.
[0012] Preferably, in S2, the theoretical processing speed of the image processing system is compared and analyzed with its actual processing speed, and the speeds are divided into a normal speed synchronization situation and an abnormal speed synchronization situation according to the analysis result;
[0013] Select a fixed time period as the reference time period, calculate the total number of wolfberries passing on the conveyor belt within the fixed time period according to the conveyor belt speed and the distribution density of wolfberries, determine the image acquisition frequency, and calculate the number of images to be processed. The theoretical processing speed of the image processing system = the number of images to be processed per second;
[0014] In a fixed time period, record the time required by the image processing system from image acquisition to classification completion, use timestamps to record the start and end time of processing each frame of image, and calculate the number of images actually processed per unit time based on the recorded actual processing time. The actual processing speed of the image processing system = the number of images actually processed in a fixed time period / fixed time period;
[0015] The theoretical processing speed of the image processing system is compared with the actual processing speed, and the difference is calculated. The deviation between the actual processing speed and the theoretical processing speed is expressed as a percentage. The specific calculation expression is: speed deviation rate = (actual processing speed - theoretical processing speed) / theoretical processing speed;
[0016] According to the speed deviation rate, a speed deviation rate within ±10% is classified as a normal speed synchronization situation, and a speed deviation rate exceeding ±10% is classified as an abnormal speed synchronization situation.
[0017] Preferably, in S3, for the abnormal speed synchronization, a classification accuracy fluctuation index is generated according to the accuracy fluctuation amplitude of wolfberry classification by the image processing system, and the method for obtaining the classification accuracy fluctuation index is:
[0018] In a fixed time period, the classification accuracy data A of each frame of image is recorded, and the corresponding data set A = {a1, a2, ..., aj, ..., an} is established; where j = 1, 2, ..., n, n is a positive integer greater than 0, and the size of the sliding window W is determined; the local fluctuation value of the classification accuracy data in each sliding window is calculated, Where KM is the local fluctuation value, AQ is the mean of the accuracy data in the sliding window; the calculated fluctuation data is smoothed to obtain the smoothed classification accuracy fluctuation index. The specific calculation expression is: LG = λ*KM+(1-λ)LG t-1 ; Where LG is the classification accuracy fluctuation index, and λ is the smoothing coefficient.
[0019] Preferably, in S3, an image data processing delay index is generated according to the delay of data processing by the image processing system, and the method for obtaining the image data processing delay index is:
[0020] The processing delay time of each frame of the image is obtained in real time to form a time series data set D = {d1, d2, ..., dm}; the parameters p, d, q of the ARIMA model are determined using the ACF and PACF diagrams, and the ARIMA model is fitted using the delayed time series data to estimate the model parameters. The calculation expression of the ARIMA model is: Among them, Y t is the observed value at time t, k is a constant term, φ i is the coefficient of the autoregressive part, θ j is the coefficient of the sliding average part, s t is the white noise error term; use historical data to fit the ARMA model and get the parameter φ i and θ j , use the fitted ARMA model to predict the future value, get the predicted value DM, calculate the error between the actual delay and the predicted delay, and calculate the image data processing delay index according to the statistical characteristics of the error. The specific calculation expression is: Where HG is the image data processing delay index.
[0021] Preferably, the classification accuracy fluctuation index and the image data processing delay index are normalized, and the performance stability coefficient of the image processing system when classifying wolfberries is calculated using the normalized classification accuracy fluctuation index and the image data processing delay index.
[0022] Preferably, in S4, the performance stability of the image processing system for wolfberry classification under different operating conditions of the conveyor belt is divided into three categories: performance stability, possible performance stability and performance instability, specifically:
[0023] The obtained performance stability coefficient of the image processing system when performing wolfberry classification is compared with a gradient threshold, the gradient threshold includes a first threshold and a second threshold, and the first threshold is less than the second threshold, and the performance stability coefficient of the image processing system when performing wolfberry classification is compared with the first threshold and the second threshold respectively;
[0024] If the performance stability coefficient of the image processing system when classifying wolfberries is greater than the second threshold, the image processing system has high performance stability when classifying wolfberries, and the image processing system is classified into a performance stability category, and the current hardware configuration and algorithm are maintained;
[0025] If the performance stability coefficient of the image processing system when classifying wolfberries is greater than or equal to the first threshold and less than or equal to the second threshold, classify it into a possible performance stability category, and adjust the parameters of the image processing algorithm;
[0026] If the performance stability coefficient of the image processing system when classifying wolfberries is less than a first threshold, it is classified into a performance instability category, and the image processing and classification algorithms are improved.
[0027] Preferably, in S5, the performance stability of the image processing system in the subsequent fixed time period when classifying wolfberries is further analyzed, and the conveyor belt speed is dynamically adjusted according to the analysis results, specifically:
[0028] When the performance of the image processing system is possibly stable, that is, the performance stability coefficient generated within a fixed time period is greater than or equal to the first threshold and less than or equal to the second threshold, a corresponding data set is established for the performance stability coefficients generated within a subsequent fixed time period that are greater than or equal to the first threshold and less than or equal to the second threshold, and the mean in the data set is calculated. The performance stability coefficients in the data set are compared and analyzed with the mean of the performance stability coefficients, and the conveyor belt speed is dynamically adjusted according to the analysis results.
[0029] Preferably, if the performance stability coefficient in the data set is greater than or equal to the mean value of the performance stability coefficient and less than or equal to the second threshold, the real-time speed of the conveyor belt is reduced to improve the system stability. The specific adjustment formula is: Where V new is the adjusted conveyor belt speed, V at is the current transmission speed, β1 is the adjustment coefficient, indicating the proportion of the increased speed, WP is the performance stability coefficient, WP v is the mean value of the performance stability coefficient, WP max is the second threshold;
[0030] If the performance stability coefficient in the data set is greater than or equal to the first threshold and less than or equal to the mean of the performance stability coefficient, the real-time speed of the conveyor belt is increased to improve the processing efficiency. The specific adjustment formula is: Where V new is the adjusted conveyor belt speed, V at is the current transmission speed, β2 is the adjustment coefficient, indicating the ratio of speed reduction, WP is the performance stability coefficient, WP v is the mean value of the performance stability coefficient, WP min is the first threshold.
[0031] The present invention also provides a wolfberry screening and grading system based on machine vision, including a conveyor belt speed acquisition module, a speed comparison and analysis module, a performance stability evaluation module, a performance classification module and a dynamic adjustment module;
[0032] Conveyor belt speed acquisition module: measures the real-time speed of the conveyor belt under different operating conditions, determines the number of images that need to be processed within a fixed time period based on the real-time speed of the conveyor belt and the distribution density of wolfberries, and determines the theoretical processing speed of the image processing system based on the number of images;
[0033] Speed comparison and analysis module: compares and analyzes the theoretical processing speed of the image processing system with its actual processing speed, and divides it into normal speed synchronization and abnormal speed synchronization according to the analysis results;
[0034] Performance stability evaluation module: For abnormal speed synchronization, analyze the fluctuation range of the image processing system's accuracy in wolfberry classification and the delay of the image processing system in data processing to evaluate the performance stability of the image processing system in wolfberry classification;
[0035] Performance classification module: Based on the evaluation results, the performance stability of the image processing system for wolfberry classification under different operating conditions of the conveyor belt is divided into three categories: performance stability, possible performance stability, and performance instability, and corresponding measures are taken to optimize the system performance;
[0036] Dynamic adjustment module: When the performance of the image processing system is possibly stable, the performance stability of the image processing system during wolfberry classification in a subsequent fixed time period is further analyzed, and the conveyor belt speed is dynamically adjusted according to the analysis results to improve the overall efficiency of wolfberry screening and grading.
[0037] In the above technical solution, the technical effects and advantages provided by the present invention are:
[0038] 1. The present invention measures the conveyor belt speed and wolfberry distribution density in real time, combines the theoretical and actual processing speed of the image processing system, identifies speed synchronization anomalies, analyzes classification accuracy fluctuations and data processing delays, and evaluates system performance stability. According to the performance stability coefficient, the system is divided into three categories: stable performance, possible stability, and unstable, and corresponding measures are taken to optimize, including parameter adjustment, algorithm improvement, and hardware upgrade. In addition, by dynamically adjusting the conveyor belt speed to ensure the efficient operation of the system under the condition of possible performance stability, the overall efficiency and stability of wolfberry screening and grading are further improved.
[0039] 2. The present invention not only improves the processing speed and classification accuracy of the system, ensures the efficiency and stability of the wolfberry screening and grading process, but also effectively reduces the defective rate and production cost, and improves the consistency of product quality and market competitiveness. Through the normalized classification accuracy fluctuation index and image data processing delay index, the system performance stability evaluation is optimized, the intelligent and dynamic conveyor belt speed adjustment is realized, and the flexibility and adaptability of the entire system are enhanced. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0041] Figure 1 The figure is a flow chart of the method of the present invention.
[0042] Figure 2 It is a system module diagram of the present invention. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0044] Example 1, please refer to Figure 1 As shown, the wolfberry screening and grading method based on machine vision described in this embodiment includes the following steps:
[0045] S1: Measure the real-time speed of the conveyor belt under different operating conditions, determine the number of images that need to be processed within a fixed time period according to the real-time speed of the conveyor belt and the distribution density of wolfberries, and determine the theoretical processing speed of the image processing system according to the number of images;
[0046] S2: Compare and analyze the theoretical processing speed of the image processing system with its actual processing speed, and divide it into a normal speed synchronization situation and an abnormal speed synchronization situation according to the analysis results;
[0047] S3: For abnormal speed synchronization, analyze the fluctuation range of the image processing system's accuracy in wolfberry classification and the delay of the image processing system in data processing to evaluate the performance stability of the image processing system in wolfberry classification;
[0048] S4: Based on the evaluation results, the performance stability of the image processing system for wolfberry classification under different operating conditions of the conveyor belt is divided into three categories: performance stability, possible performance stability, and performance instability, and corresponding measures are taken to optimize the system performance;
[0049] S5: When the performance of the image processing system is possibly stable, the performance stability of the image processing system in classifying wolfberries in a subsequent fixed time period is further analyzed, and the conveyor belt speed is dynamically adjusted according to the analysis results to improve the overall efficiency of wolfberry screening and grading.
[0050] In S1, the real-time speed of the conveyor belt under different operating conditions is measured, and the number of images to be processed within a fixed time period is determined according to the real-time speed of the conveyor belt and the distribution density of wolfberries. The theoretical processing speed of the image processing system is determined according to the number of images, specifically:
[0051] Install a speed sensor (such as a photoelectric sensor or a rotary encoder) on the conveyor belt to measure the speed of the conveyor belt. Continuously record the speed data of the conveyor belt under different operating conditions, including no load, full load, and different load conditions. Ensure that sufficient speed sample data is collected at different time periods and working conditions. Use a data acquisition system to record and store the data of the conveyor belt speed sensor for subsequent analysis.
[0052] Select a fixed time period (e.g., 1 second, 5 seconds, or 10 seconds) as the base time period for calculating the number of images. Determine the average number of wolfberries per unit length of the conveyor belt through experiments or statistical methods. For example, how many wolfberries are there on average per meter of conveyor belt.
[0053] According to the real-time speed of the conveyor belt and the distribution density of wolfberries, calculate the total number of wolfberries passing on the conveyor belt within a fixed time period. The number of wolfberries per unit time = conveyor belt speed (m / s) × fixed time period (s) × wolfberry distribution density (grains / m);
[0054] Determine the number of images that need to be collected per second to ensure that all the wolfberries on the conveyor belt are covered. For example, if 10 frames of images are collected per meter of conveyor belt and the conveyor belt speed is 2 meters per second, 20 frames of images need to be collected per second.
[0055] According to the number of wolfberries on the conveyor belt and the image acquisition frequency in a fixed time period, the number of images that need to be processed is calculated. The number of images that need to be processed in a fixed time period = the number of wolfberries per unit time × the image acquisition frequency;
[0056] Calculate the theoretical processing speed of the image processing system, that is, the number of images that need to be processed per unit time. The theoretical processing speed of the image processing system (frames / second) = the number of images that need to be processed per second.
[0057] S2: Compare and analyze the theoretical processing speed of the image processing system with its actual processing speed, and divide it into a normal speed synchronization situation and an abnormal speed synchronization situation according to the analysis results.
[0058] Select a fixed time period (e.g. 1 second, 5 seconds or 10 seconds) as the reference time period. According to the conveyor belt speed and the distribution density of wolfberries, calculate the total number of wolfberries passing on the conveyor belt within the fixed time period, determine the image acquisition frequency, calculate the number of images to be processed, and the theoretical processing speed of the image processing system = the number of images to be processed per second;
[0059] In a fixed time period, record the time required by the image processing system from image acquisition to classification completion, use timestamps to record the start and end time of processing each frame of image, and calculate the number of images actually processed per unit time based on the recorded actual processing time. The actual processing speed of the image processing system = the number of images actually processed in a fixed time period / fixed time period;
[0060] The theoretical processing speed of the image processing system is compared with the actual processing speed, and the difference is calculated. The deviation of the actual processing speed relative to the theoretical processing speed is expressed as a percentage. The specific calculation expression is: speed deviation rate = (actual processing speed - theoretical processing speed) / theoretical processing speed;
[0061] According to the speed deviation rate, a speed deviation rate within ±10% is classified as a normal speed synchronization situation, and a speed deviation rate exceeding ±10% is classified as an abnormal speed synchronization situation.
[0062] S3: For abnormal speed synchronization, analyze the fluctuation range of the accuracy of wolfberry classification by the image processing system and the delay of data processing by the image processing system to evaluate the performance stability of the image processing system when classifying wolfberries.
[0063] For abnormal speed synchronization, the classification accuracy fluctuation index is generated according to the accuracy fluctuation amplitude of wolfberry classification by the image processing system. The method for obtaining the classification accuracy fluctuation index is:
[0064] In a fixed time period, the classification accuracy data A of each frame of the image is recorded, and the corresponding data set A = {a1, a2, ..., aj, ..., an} is established; where j = 1, 2, ..., n, and n is a positive integer greater than 0, and the size W of the sliding window is determined (for example, 5 frames or 10 frames can be selected); the local fluctuation value of the classification accuracy data in each sliding window is calculated, Where KM is the local fluctuation value, AQ is the mean of the accuracy data in the sliding window; the calculated fluctuation data is smoothed to obtain the smoothed classification accuracy fluctuation index. The specific calculation expression is: LG = λ*KM+(1-λ)LG t-1 ; In the formula, LG is the classification accuracy fluctuation index, λ is the smoothing coefficient, and its value range is (0<α<1).
[0065] The larger the classification accuracy fluctuation index, the lower the performance stability of the image processing system when classifying wolfberries. The fluctuation index reflects the discrete degree of classification accuracy. The larger the index, the greater the variation in the accuracy of the classification results in different time periods. This variation may be caused by inconsistent system processing speed, fluctuations in conveyor belt speed, fluctuations in image quality, or other factors.
[0066] Low performance stability will lead to unreliable classification results, and the quality and grade of wolfberries may not be identified and classified. For the production process, this instability will affect the consistency and quality of the final product, increase the defective rate and production costs. In addition, unstable performance systems require frequent adjustments and maintenance, further increasing operational complexity and costs.
[0067] Therefore, the size of the classification accuracy fluctuation index is an important indicator to measure the stability of system performance. By continuously monitoring and optimizing the fluctuation index, the stability and accuracy of the system can be improved, ensuring the efficiency and reliability of the wolfberry screening and grading process, thereby improving production efficiency and product quality.
[0068] The image data processing delay index is generated according to the delay of the image processing system in data processing. The method for obtaining the image data processing delay index is:
[0069] The processing delay time of each frame of the image is obtained in real time to form a time series data set D = {d1, d2, ..., dm}; the delayed data is preprocessed by denoising, standardization and other operations to make the data suitable for time series analysis.
[0070] Use the ADF test to check whether the delayed time series is stationary. If it is not stationary, perform differential processing, use the ACF and PACF graphs to determine the parameters p, d, and q of the ARIMA model, fit the ARIMA model using the delayed time series data, and estimate the model parameters. The calculation expression of the ARIMA model is: Among them, Y t is the observed value at time t, k is a constant term, φ i is the coefficient of the autoregressive part, θ j is the coefficient of the sliding average part, s t is the white noise error term; use historical data to fit the ARMA model and get the parameter φ i and θ j , use the fitted ARMA model to predict the future value, get the predicted value DM, calculate the error between the actual delay and the predicted delay, and calculate the image data processing delay index according to the statistical characteristics of the error. The specific calculation expression is: Where HG is the image data processing delay index.
[0071] The larger the image data processing delay index, the lower the performance stability of the image processing system when classifying wolfberries. A larger delay index means that the delay time of the image processing system fluctuates greatly in different time periods, which means that the processing speed of the system is inconsistent and may be sometimes fast and sometimes slow. This instability will lead to a decrease in the timeliness and accuracy of image processing and classification results, affecting the overall classification efficiency.
[0072] Systems with low performance stability are prone to classification errors or omissions in actual operation, especially when processing high loads or complex images, where such fluctuations may be more obvious. For wolfberry screening and grading, unstable processing performance will affect product consistency and quality, increase the defective rate, and thus affect the overall efficiency of the production line and product market competitiveness.
[0073] In order to improve the performance stability of the system, it is necessary to continuously monitor and optimize the latency index of the image processing system. By analyzing and adjusting system parameters, improving hardware and algorithms, and reducing fluctuations in processing latency, the stability and accuracy of the classification system can be improved, ensuring that the wolfberry screening and grading process is efficient and reliable.
[0074] The classification accuracy fluctuation index and the image data processing delay index are normalized, and the performance stability coefficient of the image processing system for wolfberry classification is calculated based on the normalized classification accuracy fluctuation index and the image data processing delay index.
[0075] For example, the present invention can use the following formula to calculate the performance stability coefficient of the image processing system when classifying wolfberries, and the calculation expression is: Where WP is the performance stability coefficient, LG is the classification accuracy fluctuation index, HG is the image data processing delay index, a1 and a2 are the proportional coefficients of the classification accuracy fluctuation index and the image data processing delay index, respectively, and a2>a1>0.
[0076] S4: Based on the evaluation results, the performance stability of the image processing system for wolfberry classification under different operating conditions of the conveyor belt is divided into three categories: performance stability, possible performance stability, and performance instability, and corresponding measures are taken to optimize the system performance.
[0077] The performance stability coefficient of the image processing system when performing wolfberry classification is compared with the gradient threshold, wherein the gradient threshold in the present application includes a first threshold and a second threshold, and the first threshold is less than the second threshold, and the performance stability coefficient of the image processing system when performing wolfberry classification is compared with the first threshold and the second threshold respectively;
[0078] If the performance stability coefficient of the image processing system when classifying wolfberries is greater than the second threshold, it means that the performance stability of the image processing system when classifying wolfberries is high, and it is classified into the performance stability category; it means that the system already has a high performance stability and maintains the current hardware configuration and algorithm.
[0079] If the performance stability coefficient of the image processing system when classifying wolfberries is greater than or equal to the first threshold and less than or equal to the second threshold, it is classified into a category of possible performance stability; and the parameters of the image processing algorithm are adjusted to improve processing speed and accuracy.
[0080] If the performance stability coefficient of the image processing system when classifying wolfberries is less than a first threshold, it is classified into a performance instability category, and the image processing and classification algorithms are improved.
[0081] S5: When the performance of the image processing system is possibly stable, the performance stability of the image processing system in classifying wolfberries in a subsequent fixed time period is further analyzed, and the conveyor belt speed is dynamically adjusted according to the analysis results to improve the overall efficiency of wolfberry screening and grading.
[0082] When the performance of the image processing system is possibly stable, that is, the performance stability coefficient generated within a fixed time period is greater than or equal to the first threshold and less than or equal to the second threshold, a corresponding data set is established for the performance stability coefficients generated within a subsequent fixed time period that are greater than or equal to the first threshold and less than or equal to the second threshold, and the mean in the data set is calculated. The performance stability coefficients in the data set are compared and analyzed with the mean of the performance stability coefficients, and the conveyor belt speed is dynamically adjusted according to the analysis results.
[0083] If the performance stability coefficient in the data set is greater than or equal to the mean of the performance stability coefficient and less than or equal to the second threshold, the real-time speed of the conveyor belt is reduced to improve the system stability. The specific adjustment formula is: Where V new is the adjusted conveyor belt speed, V at is the current transmission speed, β1 is the adjustment coefficient, indicating the proportion of the increased speed, WP is the performance stability coefficient, WP v is the mean value of the performance stability coefficient, WP max is the second threshold;
[0084] If the performance stability coefficient in the data set is greater than or equal to the first threshold and less than or equal to the mean of the performance stability coefficient, the real-time speed of the conveyor belt is increased to improve the processing efficiency. The specific adjustment formula is: Where V new is the adjusted conveyor belt speed, V at is the current transmission speed, β2 is the adjustment coefficient, indicating the ratio of speed reduction, WP is the performance stability coefficient, WP v is the mean value of the performance stability coefficient, WP min is the first threshold.
[0085] In this embodiment, by measuring the real-time speed of the conveyor belt under different operating conditions, the number of images that need to be processed within a fixed time period is determined according to the real-time speed of the conveyor belt and the distribution density of wolfberry, and the theoretical processing speed of the image processing system is determined according to the number of images; the theoretical processing speed of the image processing system is compared and analyzed with its actual processing speed, and divided into normal speed synchronization and abnormal speed synchronization according to the analysis results; for the abnormal speed synchronization, the performance stability of the image processing system when classifying wolfberries is evaluated according to the fluctuation range of the accuracy of wolfberry classification by the image processing system and the delay of data processing by the image processing system; according to the evaluation results, the performance stability of the image processing system when classifying wolfberries under different operating conditions of the conveyor belt is divided, and the conveyor belt speed is adjusted dynamically according to the performance stability classification, so as to ensure the efficiency and stability of the wolfberry screening and grading process, improve the overall efficiency and accuracy of the system, reduce the defective rate and production cost, and enhance the consistency and quality of the products.
[0086] Example 2, please refer to Figure 2 As shown, the wolfberry screening and grading system based on machine vision described in this embodiment includes a conveyor belt speed acquisition module, a speed comparison and analysis module, a performance stability evaluation module, a performance classification module and a dynamic adjustment module;
[0087] Conveyor belt speed acquisition module: measures the real-time speed of the conveyor belt under different operating conditions, determines the number of images that need to be processed within a fixed time period based on the real-time speed of the conveyor belt and the distribution density of wolfberries, and determines the theoretical processing speed of the image processing system based on the number of images;
[0088] Speed comparison and analysis module: compares and analyzes the theoretical processing speed of the image processing system with its actual processing speed, and divides it into normal speed synchronization and abnormal speed synchronization according to the analysis results;
[0089] Performance stability evaluation module: For abnormal speed synchronization, analyze the fluctuation range of the image processing system's accuracy in wolfberry classification and the delay of the image processing system in data processing to evaluate the performance stability of the image processing system in wolfberry classification;
[0090] Performance classification module: Based on the evaluation results, the performance stability of the image processing system for wolfberry classification under different operating conditions of the conveyor belt is divided into three categories: performance stability, possible performance stability, and performance instability, and corresponding measures are taken to optimize the system performance;
[0091] Dynamic adjustment module: When the performance of the image processing system is possibly stable, the performance stability of the image processing system during wolfberry classification in a subsequent fixed time period is further analyzed, and the conveyor belt speed is dynamically adjusted according to the analysis results to improve the overall efficiency of wolfberry screening and grading.
[0092] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.
[0093] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0094] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.
[0095] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0096] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0097] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. A method for screening and grading wolfberries based on machine vision, characterized in that: The following steps are involved: S1: Measure the real-time speed of the conveyor belt under different operating conditions, determine the number of images that need to be processed within a fixed time period according to the real-time speed of the conveyor belt and the distribution density of wolfberries, and determine the theoretical processing speed of the image processing system according to the number of images; S2: Compare and analyze the theoretical processing speed of the image processing system with its actual processing speed, and divide it into a normal speed synchronization situation and an abnormal speed synchronization situation according to the analysis results; S3: For abnormal speed synchronization, analyze the fluctuation range of the image processing system's accuracy in wolfberry classification and the delay of the image processing system in data processing to evaluate the performance stability of the image processing system in wolfberry classification; S4: Based on the evaluation results, the performance stability of the image processing system for wolfberry classification under different operating conditions of the conveyor belt is divided into three categories: performance stability, possible performance stability, and performance instability, and corresponding measures are taken to optimize the system performance; S5: When the performance of the image processing system is possibly stable, the performance stability of the image processing system in classifying wolfberries in a subsequent fixed time period is further analyzed, and the conveyor belt speed is dynamically adjusted according to the analysis results to improve the overall efficiency of wolfberry screening and grading.
2. The method for screening and grading wolfberries based on machine vision according to claim 1, characterized in that: In S2, the theoretical processing speed of the image processing system is compared and analyzed with its actual processing speed, and the speed synchronization is divided into a normal speed synchronization situation and an abnormal speed synchronization situation according to the analysis result; Select a fixed time period as the reference time period, calculate the total number of wolfberries passing on the conveyor belt within the fixed time period according to the conveyor belt speed and the distribution density of wolfberries, determine the image acquisition frequency, and calculate the number of images to be processed. The theoretical processing speed of the image processing system = the number of images to be processed per second; In a fixed time period, record the time required by the image processing system from image acquisition to classification completion, use timestamps to record the start and end time of processing each frame of image, and calculate the number of images actually processed per unit time based on the recorded actual processing time. The actual processing speed of the image processing system = the number of images actually processed in a fixed time period / fixed time period; The theoretical processing speed of the image processing system is compared with the actual processing speed, and the difference is calculated. The deviation between the actual processing speed and the theoretical processing speed is expressed as a percentage. The specific calculation expression is: speed deviation rate = (actual processing speed - theoretical processing speed) / theoretical processing speed; According to the speed deviation rate, a speed deviation rate within ±10% is classified as a normal speed synchronization situation, and a speed deviation rate exceeding ±10% is classified as an abnormal speed synchronization situation.
3. The method for screening and grading wolfberries based on machine vision according to claim 1, characterized in that: In S3, for the abnormal speed synchronization, a classification accuracy fluctuation index is generated according to the accuracy fluctuation amplitude of wolfberry classification by the image processing system. The classification accuracy fluctuation index is obtained as follows: In a fixed time period, the classification accuracy data A of each frame of image is recorded, and the corresponding data set A = {a1, a2, ..., aj, ..., an} is established; where j = 1, 2, ..., n, n is a positive integer greater than 0, and the size of the sliding window W is determined; the local fluctuation value of the classification accuracy data in each sliding window is calculated, Where KM is the local fluctuation value, AQ is the mean of the accuracy data in the sliding window; the calculated fluctuation data is smoothed to obtain the smoothed classification accuracy fluctuation index. The specific calculation expression is: LG = λ*KM+(1-λ)LG t-1 ; Where LG is the classification accuracy fluctuation index, and λ is the smoothing coefficient.
4. The method for screening and grading wolfberries based on machine vision according to claim 3, characterized in that: In S3, an image data processing delay index is generated according to the delay of data processing by the image processing system. The method for obtaining the image data processing delay index is: The processing delay time of each frame of the image is obtained in real time to form a time series data set D = {d1, d2, ..., dm}; the parameters p, d, q of the ARIMA model are determined using the ACF and PACF diagrams, and the ARIMA model is fitted using the delayed time series data to estimate the model parameters. The calculation expression of the ARIMA model is: Among them, Y t is the observed value at time t, k is a constant term, φ i is the coefficient of the autoregressive part, θ j is the coefficient of the sliding average part, s t is the white noise error term; use historical data to fit the ARMA model and get the parameter φ i and θ j , use the fitted ARMA model to predict the future value, get the predicted value DM, calculate the error between the actual delay and the predicted delay, and calculate the image data processing delay index according to the statistical characteristics of the error. The specific calculation expression is: Where HG is the image data processing delay index.
5. The method for screening and grading wolfberries based on machine vision according to claim 4, characterized in that: The classification accuracy fluctuation index and the image data processing delay index are normalized, and the performance stability coefficient of the image processing system for wolfberry classification is calculated based on the normalized classification accuracy fluctuation index and the image data processing delay index.
6. The method for screening and grading wolfberries based on machine vision according to claim 5, characterized in that: In S4, the performance stability of the image processing system for wolfberry classification under different operating conditions of the conveyor belt is divided into three categories: performance stability, possible performance stability and performance instability, specifically: The obtained performance stability coefficient of the image processing system when performing wolfberry classification is compared with a gradient threshold, the gradient threshold includes a first threshold and a second threshold, and the first threshold is less than the second threshold, and the performance stability coefficient of the image processing system when performing wolfberry classification is compared with the first threshold and the second threshold respectively; If the performance stability coefficient of the image processing system when classifying wolfberries is greater than the second threshold, the image processing system has high performance stability when classifying wolfberries, and the image processing system is classified into a performance stability category, and the current hardware configuration and algorithm are maintained; If the performance stability coefficient of the image processing system when classifying wolfberries is greater than or equal to the first threshold and less than or equal to the second threshold, classify it into a possible performance stability category, and adjust the parameters of the image processing algorithm; If the performance stability coefficient of the image processing system when classifying wolfberries is less than a first threshold, it is classified into a performance instability category, and the image processing and classification algorithms are improved.
7. The method for screening and grading wolfberries based on machine vision according to claim 1, characterized in that: In S5, the performance stability of the image processing system in the subsequent fixed time period when classifying wolfberries is further analyzed, and the conveyor belt speed is dynamically adjusted according to the analysis results, specifically: When the performance of the image processing system is possibly stable, that is, the performance stability coefficient generated within a fixed time period is greater than or equal to the first threshold and less than or equal to the second threshold, a corresponding data set is established for the performance stability coefficients generated within a subsequent fixed time period that are greater than or equal to the first threshold and less than or equal to the second threshold, and the mean in the data set is calculated. The performance stability coefficients in the data set are compared and analyzed with the mean of the performance stability coefficients, and the conveyor belt speed is dynamically adjusted according to the analysis results.
8. The method for screening and grading wolfberries based on machine vision according to claim 7, characterized in that: If the performance stability coefficient in the data set is greater than or equal to the mean of the performance stability coefficient and less than or equal to the second threshold, the real-time speed of the conveyor belt is reduced to improve the system stability. The specific adjustment formula is: Where V new is the adjusted conveyor belt speed, V at is the current transmission speed, β1 is the adjustment coefficient, indicating the proportion of the increased speed, WP is the performance stability coefficient, WP v is the mean value of the performance stability coefficient, WP max is the second threshold; If the performance stability coefficient in the data set is greater than or equal to the first threshold and less than or equal to the mean of the performance stability coefficient, the real-time speed of the conveyor belt is increased to improve the processing efficiency. The specific adjustment formula is: Where V new is the adjusted conveyor belt speed, V at is the current transmission speed, β2 is the adjustment coefficient, indicating the ratio of speed reduction, WP is the performance stability coefficient, WP v is the mean value of the performance stability coefficient, WP min is the first threshold.
9. A wolfberry screening and grading system based on machine vision, used to implement the wolfberry screening and grading method based on machine vision according to any one of claims 1 to 8, characterized in that: It includes conveyor belt speed acquisition module, speed comparison analysis module, performance stability evaluation module, performance classification module and dynamic adjustment module; Conveyor belt speed acquisition module: measures the real-time speed of the conveyor belt under different operating conditions, determines the number of images that need to be processed within a fixed time period based on the real-time speed of the conveyor belt and the distribution density of wolfberries, and determines the theoretical processing speed of the image processing system based on the number of images; Speed comparison and analysis module: compares and analyzes the theoretical processing speed of the image processing system with its actual processing speed, and divides it into normal speed synchronization and abnormal speed synchronization according to the analysis results; Performance stability evaluation module: For abnormal speed synchronization, analyze the fluctuation range of the image processing system's accuracy in wolfberry classification and the delay of the image processing system in data processing to evaluate the performance stability of the image processing system in wolfberry classification; Performance classification module: Based on the evaluation results, the performance stability of the image processing system for wolfberry classification under different operating conditions of the conveyor belt is divided into three categories: performance stability, possible performance stability, and performance instability, and corresponding measures are taken to optimize the system performance; Dynamic adjustment module: When the performance of the image processing system is possibly stable, the performance stability of the image processing system during wolfberry classification in a subsequent fixed time period is further analyzed, and the conveyor belt speed is dynamically adjusted according to the analysis results to improve the overall efficiency of wolfberry screening and grading.
Citation Information
Patent Citations
Servo motor control analysis compensation system
CN117200638A
Intelligent anti-error topology analysis method for transformer substation
CN118395358A
Expressway bridge construction management system and method
CN118509821A
Method of performance evaluating for frequency regulation energy storage system
KR102218111B1
Cited By
Feeding speed control method and device of feeder special for green coconut
CN119937658A
