Intelligent sorting control system for chili powder preparation

By combining adaptive illumination compensation and a supervised learning model, the color range of chili flakes is dynamically adjusted, solving the problem of insufficient accuracy in traditional chili flake sorting methods and achieving efficient and stable automated sorting results.

CN121372903BActive Publication Date: 2026-07-07QINGDAO SINOPAPRIKA SPICE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
QINGDAO SINOPAPRIKA SPICE CO LTD
Filing Date
2025-10-28
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

Traditional chili pepper sorting methods rely on manual screening and static thresholds, which makes it difficult to guarantee sorting accuracy and cannot adapt to the characteristic fluctuations of different batches of chili peppers, thus affecting production efficiency and product quality.

Method used

An anomaly calculation unit is used for adaptive illumination compensation and image processing. The color range is dynamically adjusted by combining the contour feature unit. A supervised learning model is used for feature vector combination and sorting. Automated sorting is achieved through a sorting and elimination unit.

Benefits of technology

It dynamically adapts to the characteristic fluctuations of chili flakes and particulate impurities, reduces the frequency of manual threshold adjustments, improves sorting accuracy, stably adapts to the sorting needs of different batches of chili flakes, and improves production efficiency and product quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121372903B_ABST
    Figure CN121372903B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of intelligent sorting, in particular to an intelligent sorting control system for chili powder preparation. It comprises an anomaly calculation unit, a contour feature unit and a sorting and removing unit. The present application dynamically suppresses noise by setting a window size for adaptive median filtering using a time stamp of the average radius of chili powder, and then changes to an HSV space image. Based on the HSV space image, the color range of chili powder is dynamically adjusted, the pixel points are determined to belong to the chili powder area, the aspect ratio of the circumscribed rectangle and the mean and standard deviation of the contour hue are calculated, the aspect ratio of the circumscribed rectangle and the mean and standard deviation of the contour hue are combined into a feature vector, and then a supervised learning model trained is combined for model updating to output the sorting result. The feature fluctuation of chili powder and particulate impurities can be dynamically adapted, the misjudgment caused by static threshold can be avoided, the sorting precision can be improved, the frequency of manual adjustment of threshold can be reduced, and the sorting needs of different batches of chili powder can be stably adapted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent sorting technology, and more specifically, to an intelligent sorting and control system for preparing chili flakes. Background Technology

[0002] In the chili processing industry, the preparation of chili flakes is a key step, and sorting the chili flakes to remove particulate impurities is crucial to ensuring product quality. Traditional chili flake sorting mainly relies on manual screening, which is not only inefficient but also difficult to guarantee sorting accuracy and is easily affected by the subjective factors and fatigue of workers.

[0003] With the development of technology, the traditional method of sorting chili flakes uses static thresholds to distinguish between chili flakes and particulate impurities. That is, fixed thresholds for features such as color and shape are set in advance. When the detected object features meet these thresholds, it is judged as chili flakes or impurities. However, this static threshold method has obvious defects.

[0004] Due to differences in variety, origin, growing environment, and maturity, different batches of chili peppers will produce chili flakes with significant variations in color, size, and shape. At the same time, the types and characteristics of particulate impurities also vary. Static thresholds cannot dynamically adapt to these fluctuations in characteristics, which can easily lead to misjudgments during the actual sorting process. For example, for batches of chili flakes with a darker color, normal chili flakes may be mistakenly identified as impurities and rejected. Or, some impurities with a color similar to that of chili flakes may not be accurately identified, resulting in missed detection.

[0005] Furthermore, when sorting different batches of chili peppers, operators need to frequently manually adjust the threshold to ensure sorting accuracy. This not only increases labor costs and operational complexity, but also, due to the subjectivity and untimeliness of manual adjustments, it is still difficult to ensure that the sorting system can stably adapt to the sorting needs of different batches of chili pepper fragments. In large-scale chili pepper processing production, these problems seriously affect production efficiency and product quality, limiting the further development of the chili pepper processing industry. Therefore, we provide an intelligent sorting and control system for chili pepper fragment preparation. Summary of the Invention

[0006] The purpose of this invention is to provide an intelligent sorting and control system for the preparation of chili flakes, so as to solve the problems mentioned in the background art.

[0007] To achieve the above objectives, the present invention provides an intelligent sorting and control system for preparing chili flakes, comprising an anomaly calculation unit, a contour feature unit, and a sorting and rejection unit;

[0008] The anomaly calculation unit collects the timestamp of the chili flakes color image, the conveyor belt speed, and the ambient light intensity. When the ambient light intensity determines that the chili flakes color image has an overexposure or underexposure anomaly, it performs adaptive light compensation on the chili flakes color image to obtain the compensated chili flakes color image and converts it into a binary image. The denoised chili flakes color image is obtained through the binary image, and then the denoised chili flakes color image is converted into an HSV space image.

[0009] The contour feature unit is used to receive the HSV spatial image and conveyor belt speed from the anomaly calculation unit to combine feature vectors, including the following implementation steps:

[0010] The color range of chili flakes is dynamically adjusted by using HSV spatial images. Then, the pixel hue values ​​are extracted from the HSV spatial images to generate a binary mask of timestamps. The color range of chili flakes is used to determine whether a pixel belongs to the chili flake region or not; otherwise, it belongs to the impurity particle region.

[0011] use The function processes the binary mask to obtain the outline, calculates the aspect ratio of the bounding rectangle, extracts the pixel tonal values ​​from the outline, and calculates the outline tonal mean and outline tonal standard deviation.

[0012] The centroid coordinates of the contour are calculated, and the centroid coordinates are used as the position coordinates of the particles. The pixel velocity is calculated using the position coordinates, and the actual velocity is converted by combining the conveyor belt velocity. Then, the position coordinates, the aspect ratio of the bounding rectangle, the mean of the contour tone, and the standard deviation are combined into a feature vector.

[0013] The sorting and elimination unit is used to receive feature vectors, position coordinates, actual speeds from the contour feature unit and conveyor belt speeds from the anomaly calculation unit. It uses historical data to train a supervised learning model, obtains a trained supervised learning model to calculate a loss function, updates the trained supervised learning model through the loss function, and obtains an updated model that outputs sorting results based on feature vectors.

[0014] Based on the classification results, particles are selected as impurities or discolored chili flakes that need to be removed. The time it takes for the particles to reach the removal area is calculated using their location coordinates, and the trigger time is calculated based on the time it takes for the particles to reach the removal area.

[0015] As a further improvement to this technical solution, the anomaly calculation unit includes a calculation conversion module;

[0016] The calculation and conversion module receives the compensated color image of chili flakes, converts it to a grayscale image, converts the grayscale image to a binary image, detects the region composed of interconnected foreground pixels in the binary image to calculate the area value, compares the area value of the region composed of interconnected foreground pixels with an area threshold to obtain the comparison result, obtains the chili flake region image based on the comparison result, calculates the area of ​​the chili flake region based on the equivalent circle radius of the chili flake region image, and then calculates the average radius of the chili flakes based on the area of ​​the chili flake region.

[0017] As a further improvement to this technical solution, the calculation and conversion module also includes the following steps:

[0018] The average radius of the chili flakes is used to set the window size for adaptive median filtering at the timestamp. Adaptive median filtering is then used to dynamically suppress noise in the compensated chili flakes color image according to the window size, resulting in a denoised chili flakes color image. Finally, color space conversion is used to convert the denoised chili flakes color image to an HSV color space image at the timestamp.

[0019] As a further improvement to this technical solution, the contour feature unit includes a contour region module and a feature vector module;

[0020] The contour region module is used to receive the HSV spatial image from the calculation and conversion module, dynamically adjust the color range of the chili flakes using the HSV spatial image, and then extract the timestamp pixels from the HSV spatial image. Hue values, generating a binary mask for the timestamp, using pixels Hue value and chili flake color range determine pixel point Whether it belongs to the chili flakes area or the impurity particle area, when the pixel When the hue value is within the range of chili flake color, determine the pixel. It belongs to the chili flakes area; otherwise, it belongs to the impurity / particle area.

[0021] The feature vector module is used to receive contour, contour area, contour roundness, and aspect ratio of the circumscribed rectangle from the contour region module, and HSV spatial image from the calculation and conversion module, and to receive conveyor belt speed from the anomaly calculation unit. ;

[0022] Extracting pixels from the outline And the pixel position, and then obtain the corresponding pixel position timestamp from the HSV spatial image. pixels Hue value, derived from outline area and pixels The hue value is used to calculate the mean and standard deviation of the outline hue. Similarly, the mean and standard deviation of the outline saturation and the standard deviation of the outline brightness are calculated.

[0023] As a further improvement to this technical solution, the contour region module further includes the following steps:

[0024] use The function processes the binary mask to obtain the connected regions of chili flakes and impurity particles. From these regions, a contour is derived, corresponding to one chili flake or impurity particle. The width and height of the bounding rectangle of the contour are recorded to calculate its aspect ratio. Then, the function utilizes... The function calculates the area of ​​the contour based on the contour. ;

[0025] pass The function calculates the perimeter of the contour based on the contour, and then calculates the roundness of the contour using the contour area and the contour perimeter.

[0026] As a further improvement to this technical solution, the feature vector module further includes the following steps:

[0027] The pixel speed of the conveyor belt is obtained by using a camera device, and then the pixel speed, conveyor belt pixel speed and conveyor belt speed are converted into actual speed. The position coordinates and actual speed are used as the motion state of the particles. The contour area, contour roundness, aspect ratio of the bounding rectangle, contour hue mean, standard deviation and contour saturation mean, standard deviation and contour brightness mean, standard deviation and particle motion state are combined into a feature vector.

[0028] As a further improvement to this technical solution, the sorting and elimination unit is used to receive feature vectors, position coordinates, actual speeds from the feature vector module and conveyor belt speeds from the abnormal situation module, obtain historical labeled data from historical data, select a supervised learning model as a classifier, train the supervised learning model using the historical labeled data, obtain the trained supervised learning model, and then use a camera device to collect new batch labeled samples and corresponding new labeled labels to calculate the loss function. The trained supervised learning model is updated using the loss function to obtain the updated model. The feature vectors are input into the updated model, and the sorting results are output.

[0029] As a further improvement to this technical solution, the sorting and rejection unit further includes the following steps:

[0030] A rejection mechanism is installed downstream of the conveyor belt. A camera obtains the pixel coordinates of the center of the rejection mechanism's operating area. Based on the classification results, particles are identified as impurities or discolored chili flakes requiring rejection. The time it takes for a particle to reach the rejection area is calculated using the pixel coordinates of the center of the rejection mechanism's operating area, its position coordinates, and the conveyor belt speed, and then timestamped. The trigger time is calculated based on the time it takes for particles to reach the rejection area. When the preparation reaches the trigger time, particles are rejected according to their position coordinates and actual speed.

[0031] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0032] This invention dynamically suppresses noise by setting an adaptive median filter window size based on the average radius of chili flakes at the timestamp. It then converts the image to an HSV spatial image and dynamically adjusts the color range of the chili flakes based on the HSV spatial image. It determines whether a pixel belongs to the chili flake region, calculates the aspect ratio of the bounding rectangle and the mean and standard deviation of the contour hue, and combines these into a feature vector. This feature vector is then updated using a trained supervised learning model, outputting the sorting results. This method dynamically adapts to the characteristic fluctuations of chili flakes and particulate impurities, avoids misjudgments caused by static thresholds, improves sorting accuracy, reduces the frequency of manual threshold adjustments, and stably adapts to the sorting needs of different batches of chili flakes. Attached Figure Description

[0033] Figure 1 This is an overall system block diagram of the present invention;

[0034] Figure 2 This is a block diagram of the module units of the present invention.

[0035] The meanings of the labels in the diagram are as follows:

[0036] 1. Exception Calculation Unit; 11. Exception Case Module; 12. Calculation and Conversion Module;

[0037] 2. Contour feature unit; 21. Contour region module; 22. Feature vector module; 3. Sorting and removal unit. Detailed Implementation

[0038] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0039] Example 1

[0040] This invention provides an intelligent sorting and control system for preparing chili flakes. Please refer to [link / reference]. Figures 1-2 It includes an anomaly calculation unit 1, a contour feature unit 2, and a sorting and elimination unit 3;

[0041] Anomaly calculation unit 1 acquires a timestamp-based color image of chili flakes, conveyor belt speed, and ambient light intensity. When the ambient light intensity indicates overexposure or underexposure in the chili flakes color image, it performs adaptive illumination compensation to obtain a compensated color image, which is then converted into a binary image. This binary image is used to obtain a denoised chili flakes color image, which is then converted into an HSV spatial image. Contour feature unit 2 receives the HSV spatial image and conveyor belt speed from anomaly calculation unit 1 to combine feature vectors. This includes the following steps: dynamically adjusting the color range of the chili flakes using the HSV spatial image; extracting pixel hue values ​​from the HSV spatial image to generate a binary mask for the timestamp; and using the color range of the chili flakes to determine if a pixel belongs to the chili flakes region, otherwise it belongs to the impurity particle region. The function processes the binary mask to obtain the contour, calculates the aspect ratio of the circumscribed rectangle, extracts the pixel tonal values ​​from the contour, calculates the contour tonal mean and standard deviation, calculates the centroid coordinates of the contour, uses the centroid coordinates as the particle position coordinates, calculates the pixel velocity using the position coordinates, converts the actual velocity into the actual velocity using the conveyor belt velocity, and combines the position coordinates, circumscribed rectangle aspect ratio, contour tonal mean, and standard deviation into a feature vector. The sorting and removal unit 3 receives the feature vector, position coordinates, actual velocity from the contour feature unit 2, and conveyor belt velocity from the anomaly calculation unit 1. It trains the supervised learning model using historical data, calculates the loss function using the trained supervised learning model, updates the trained supervised learning model using the loss function, and outputs the sorting results based on the feature vector. Based on the classification results, it filters out particles that need to be removed, such as impurity particles or discolored chili flakes. It calculates the particle arrival time in the removal area using the position coordinates and calculates the trigger time based on the particle arrival time in the removal area.

[0042] The following modules are a refinement of the above units;

[0043] The anomaly calculation unit 1 includes an anomaly situation module 11 and a calculation and conversion module 12;

[0044] The camera is installed directly above the conveyor belt (15cm away from the chili flakes), and the smart sensor (laser displacement sensor) is installed on the same side as the camera. After the chili flakes are crushed, the crushed chili flakes are placed on the conveyor belt for transport. The abnormal situation module 11 collects timestamps through the camera and the smart sensor respectively. Color image of chili flakes (The color images of the chili flakes include the appearance characteristics of the chili flakes after preparation) and conveyor belt speed. The timestamp is in milliseconds, and the conveyor belt speed is in meters per second. The conveyor belt speed provides the basis for the dynamic positioning and rejection control of the chili flakes during the conveying process.

[0045] Using smart sensors (light sensors) to collect ambient light intensity The unit is lux / lux, which is used for subsequent dynamic illumination compensation to ensure the stable quality of the acquired chili flakes images and to ensure the accurate extraction of image features.

[0046] When acquiring a color image of crushed chili peppers, the conveyor belt speed, and the ambient light intensity, pixel coordinates are extracted from the color image of the crushed chili peppers. pixel values Then set a reference light intensity threshold. (Determined according to different application scenarios and needs), using ambient light intensity and reference light intensity thresholds, determine whether the color image of chili flakes is overexposed (overexposure occurs when too much light is received in the color image of chili flakes; in an overexposed image, bright areas lose their original details and appear as a white mass, as if "washed" by strong light) or underexposed (the opposite of overexposure, underexposure is caused by insufficient light received in the color image of chili flakes; an underexposed image is generally dark, and details in dark areas are hidden in the darkness, becoming a black blob). Specific situations include:

[0047] Scenario 1: When the ambient light intensity exceeds the reference light intensity threshold, the color image of the chili flakes is determined to be overexposed. Illumination adaptive compensation is performed on the color image of the chili flakes using pixel values, ambient light intensity, and the reference light intensity threshold to obtain a timestamp. Color image of chili flakes after compensation To prevent overexposure abnormalities;

[0048] Scenario 2: When the ambient light intensity is less than the reference light intensity threshold, the color image of the chili flakes is determined to have an underexposure anomaly. Illumination adaptive compensation is performed on the color image of the chili flakes using pixel values, ambient light intensity, and the reference light intensity threshold to obtain a timestamp. Color image of chili flakes after compensation To prevent underexposure, eliminate the impact of changes in ambient light on the chili flakes image, avoid overexposure or underexposure, and ensure that subsequent processing can accurately reflect the true characteristics of the chili flakes after preparation.

[0049] The calculation and conversion module 12 receives the compensated color image of chili flakes from the abnormal situation module 11, converts the compensated color image of chili flakes into a grayscale image, and then converts the grayscale image into a binary image. The pixel values ​​in the binary image are only 0 and 255. The module detects regions composed of interconnected foreground pixels from the binary image; these regions are the chili flake targets. The module then calculates the area value of these interconnected foreground pixel regions and sets an area threshold. The module compares the area value of these interconnected foreground pixel regions with the area threshold to obtain the comparison result. Based on the comparison result, regions composed of interconnected foreground pixels smaller than the area threshold are removed, resulting in a chili flake region image. The module records the first 50 frames of chili flake region images and calculates the area of ​​the chili flake region using the equivalent circle radius. Using the formula for the area of ​​a circle The equivalent circle radius is obtained. timestamp Average radius of chili flakes per frame in the first 50 frames of chili flake region images Sum the results and then divide by 50 to get the average radius of the chili flakes. The algorithm formula is: ;

[0050] The average radius of the chili flakes at the timestamp Set the window size used for adaptive median filtering. Where, represents the rounding up operation, and the adaptive median filter is used to dynamically suppress noise in the compensated chili flakes color image based on the window size used by the adaptive median filter, to obtain the timestamp. Denoising-reduced color image of chili flakes The specific algorithm formula is as follows: ,in, This refers to the adaptive median filtering function, which is then converted to a color space and timestamped. Convert the denoised color image of chili flakes to an HSV space image. ,in, This refers to a function that converts color values ​​in the RGB color space to color values ​​in the HSV color space. It refers to hue. This refers to saturation. It refers to brightness;

[0051] Contour feature unit 2 includes contour region module 21 and feature vector module 22;

[0052] Contour region module 21 is used to receive the HSV spatial image from the calculation and conversion module 12, and obtain the hue average of the chili flakes from the first 100 frames through the HSV spatial image. and hue standard deviation According to the average hue and hue standard deviation Dynamically adjust the color range of chili flakes The specific algorithm formula is as follows: , Then extract the timestamp from the HSV spatial image. pixels Hue value Through pixels Generate timestamp binary mask Using hue values and the color range of chili flakes Determine pixel Whether it belongs to the area of ​​chili flakes or impurity particles, when the hue value Within the color range of chili flakes Within the time frame, determine the pixel point. If it falls within the chili flakes area, then Otherwise, it belongs to the impurity particle region. ;

[0053] use of The function processes the binary mask to obtain the connected regions of chili flakes and impurity particles, and then derives the outline from these connected regions. ,in, It refers to the first An outline, an outline For each chili flake or impurity particle, record the width of the bounding rectangle of its outline. and high To calculate the aspect ratio of the circumscribed rectangle The algorithm formula is: The aspect ratio reflects the degree of stretching of the particle shape, and is then reused. The function calculates the area of ​​the contour based on the contour. Area is an important characteristic for describing particle size;

[0054] pass The function calculates the perimeter of the contour based on the contour. Then, the roundness of the contour is calculated using the contour area and contour perimeter. When the roundness of the outline is close to 1, it means that the outline is close to a standard circle.

[0055] Feature vector module 22 is used to receive contour, contour area, contour roundness, aspect ratio of the circumscribed rectangle from contour region module 21, and HSV spatial image from calculation and conversion module 12, and to receive conveyor belt speed from abnormal situation module 11. Extracting pixels from the contour And the pixel position, and then obtain the corresponding pixel position timestamp from the HSV spatial image. pixels Hue value By using the outline area and pixel tonal values Calculate the mean of the contour hue Then combine the outline area and pixel color values Calculate the standard deviation of the profile hue Similarly, calculate the mean value of contour saturation. Contour saturation standard deviation Average contour brightness Contour brightness standard deviation ;

[0056] The centroid coordinates of the contour are calculated, and these coordinates are used as the current frame timestamp of the particle. Position coordinates Retrieve historical data from the database, and then extract the positions of the particles from the previous three frames from the historical data. and frame interval Using position coordinates Position of particles in the first 3 frames and frame interval Calculate pixel speed Pixel velocity reflects how fast particles move in an image;

[0057] Using camera equipment to obtain conveyor belt pixel speed Then through pixel speed Conveyor belt pixel speed and conveyor belt speed Convert to actual speed Specific algorithm formula: The position coordinates and actual velocity are taken as the particle's motion state. Then, the contour area, contour roundness, aspect ratio of the bounding rectangle, mean contour hue, standard deviation of contour hue, mean contour saturation, standard deviation of contour saturation, mean contour brightness, and standard deviation of contour brightness are combined with the particle's motion state to form a feature vector. ;

[0058] The sorting and elimination unit 3 receives the feature vector from the feature vector module 22, the position coordinates, the actual speed, and the conveyor belt speed from the abnormal situation module 11. It also obtains historical labeled data (including feature vectors of normal chili flakes, impurity particles, and discolored chili flakes, as well as corresponding labels (0: normal chili flakes, 1: impurity particles, 2: discolored chili flakes) and the supervised learning model trained at the previous timestamp from historical data. Then, a supervised learning model is selected as the classifier, and historical labeled data is used to train the supervised learning model to obtain the trained supervised learning model. Then, a new batch of labeled samples is collected. (New batch of chili flakes) and corresponding new labeling The supervised learning model, trained through training, is based on the new batch of labeled samples. and corresponding new label Calculate the loss function The loss function measures the difference between the predictions of the trained supervised learning model on the newly labeled samples and the true labels. This is achieved by training the supervised learning model using the previous timestamp. and loss function Update the trained supervised learning model to obtain an updated model. ,in, It is the learning rate, which inputs the feature vectors into the updated model and outputs the sorting results. ;

[0059] A rejection mechanism (such as a high-pressure airflow nozzle) is installed downstream of the conveyor belt, and the pixel coordinates of the center of the action area of ​​the rejection mechanism (such as a high-pressure airflow nozzle) are obtained by a camera device. Based on the classification results, it is determined whether the particles are impurities or discolored chili flakes that need to be removed. When the classification result is 1 or 2, the particles are identified as impurities or discolored chili flakes that need to be removed, and the pixel coordinates of the center of the removal mechanism's operating area are used to determine this. Location coordinates and conveyor belt speed Calculate the time it takes for particles to reach the rejection zone. ,in, ( Then, extract the response delay time from historical data to remove institutional delays. via timestamp Time for particles to reach the rejection area Eliminating institutional response delay time Calculate trigger time When the preparation reaches the trigger time At that time, based on the position coordinates and actual speed, during the trigger time... Remove particles.

[0060] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely preferred examples and are not intended to limit the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.

Claims

1. An intelligent sorting control system for chili powder preparation, characterized by: It includes an anomaly calculation unit (1), a contour feature unit (2), and a sorting and elimination unit (3); The anomaly calculation unit (1) collects the timestamp of the chili flakes color image, the conveyor belt speed, and the ambient light intensity. When the ambient light intensity determines that the chili flakes color image has an overexposure or underexposure anomaly, it performs adaptive light compensation on the chili flakes color image to obtain the compensated chili flakes color image and converts it into a binary image. The denoised chili flakes color image is obtained through the binary image, and then the denoised chili flakes color image is converted into an HSV space image. The contour feature unit (2) is used to receive the HSV spatial image and conveyor belt speed from the anomaly calculation unit (1) to realize the combination of feature vectors, including the following implementation steps: The color range of chili flakes is dynamically adjusted by using HSV spatial images. Then, the pixel hue values ​​are extracted from the HSV spatial images to generate a binary mask of timestamps. The color range of chili flakes is used to determine whether a pixel belongs to the chili flake region or not; otherwise, it belongs to the impurity particle region. Using The function processes the binary mask, obtains the contour to calculate the aspect ratio of the circumscribed rectangle, and extracts the pixel hue value from the contour to calculate the contour hue mean value and the contour hue standard deviation. The centroid coordinates of the contour are calculated, and the centroid coordinates are used as the position coordinates of the particles. The pixel velocity is calculated using the position coordinates, and the actual velocity is converted by combining the conveyor belt velocity. Then, the position coordinates, the aspect ratio of the bounding rectangle, the mean of the contour tone, and the standard deviation are combined into a feature vector. The sorting and elimination unit (3) is used to receive the feature vector, position coordinates, actual speed and conveyor belt speed in the contour feature unit (2) and the anomaly calculation unit (1), and to train the supervised learning model using historical data. The trained supervised learning model is then used to calculate the loss function. The trained supervised learning model is then updated using the loss function, and the updated model outputs the classification result based on the feature vector. Based on the classification results, the particles are selected as impurity particles or discolored chili flakes that need to be removed. The time it takes for the particles to reach the removal area is calculated using their location coordinates, and the trigger time is calculated based on the time it takes for the particles to reach the removal area. The anomaly calculation unit (1) includes a calculation conversion module (12); The calculation and conversion module (12) receives the compensated color image of chili flakes and converts it into a grayscale image. It then converts the grayscale image into a binary image and detects the region composed of interconnected foreground pixels in the binary image to calculate the area value. It compares the area value of the region composed of interconnected foreground pixels with the area threshold to obtain the comparison result. Based on the comparison result, it obtains the chili flakes region image. It calculates the area of ​​the chili flakes region based on the equivalent circle radius of the chili flakes region image and then calculates the average radius of the chili flakes based on the area of ​​the chili flakes region. The calculation and conversion module (12) further includes the following steps: The average radius of the chili flakes is used to set the window size for adaptive median filtering at the timestamp. Adaptive median filtering is then used to dynamically suppress noise in the compensated chili flakes color image according to the window size, resulting in a denoised chili flakes color image. Finally, color space conversion is used to convert the denoised chili flakes color image to an HSV color space image at the timestamp.

2. The intelligent sorting control system for chili powder preparation as claimed in claim 1, wherein: The contour feature unit (2) includes a contour region module (21) and a feature vector module (22); The contour region module (21) is configured to receive the HSV space image in the calculation conversion module (12), adjust the chili powder color range dynamically through the HSV space image, and extract the time-stamped pixel points from the HSV space image The hue value, the time-stamped binary mask, and the pixel points The hue value and the chili powder color range determine the pixel points Whether the pixel points belong to the chili powder region or the impurity particle region When the hue value is within the chili powder color range, the pixel points are determined to belong to the chili powder region, otherwise, belong to the impurity particle region The feature vector module (22) is configured to receive the contour, the contour area, the contour roundness, the circumscribed rectangle width-height ratio in the contour area module (21), and the HSV space image in the calculation conversion module (12), and receive the conveyor belt speed in the anomaly calculation unit (1) ; Extracting pixels from the outline And the pixel position, and then obtain the corresponding pixel position timestamp from the HSV spatial image. pixels Hue value, derived from outline area and pixels The hue value is used to calculate the mean and standard deviation of the outline hue. Similarly, the mean and standard deviation of the outline saturation and the standard deviation of the outline brightness are calculated.

3. The intelligent sorting and control system for preparing chili flakes according to claim 2, characterized in that: The contour region module (21) further includes the following steps: use The function processes the binary mask to obtain the connected regions of chili flakes and impurity particles. From these regions, a contour is derived, corresponding to a single chili flake or impurity particle. The width and height of the bounding rectangle of the contour are recorded to calculate its aspect ratio. Then, the function utilizes... The function calculates the area of ​​the contour based on the contour. ; pass The function calculates the perimeter of the contour based on the contour, and then calculates the roundness of the contour using the contour area and the contour perimeter.

4. The intelligent sorting and control system for preparing chili flakes according to claim 3, characterized in that: The feature vector module (22) further includes the following steps: The pixel speed of the conveyor belt is obtained by using a camera device, and then the pixel speed, conveyor belt pixel speed and conveyor belt speed are converted into actual speed. The position coordinates and actual speed are used as the motion state of the particles. The contour area, contour roundness, aspect ratio of the bounding rectangle, contour hue mean, standard deviation and contour saturation mean, standard deviation and contour brightness mean, standard deviation and particle motion state are combined into a feature vector.

5. The intelligent sorting and control system for preparing chili flakes according to claim 4, characterized in that: The sorting and elimination unit (3) is used to receive the feature vector, position coordinates, actual speed and conveyor belt speed in the feature vector module (22) and the anomaly calculation unit (1), obtain historical labeled data from historical data, select a supervised learning model as a classifier, use historical labeled data to train the supervised learning model, obtain the trained supervised learning model, collect new batch labeled samples and corresponding new labeled labels to calculate the loss function, update the trained supervised learning model through the loss function, obtain the updated model, input the feature vector into the updated model, and output the classification result.

6. The intelligent sorting and control system for preparing chili flakes according to claim 5, characterized in that: The sorting and rejection unit (3) further includes the following steps: A rejection mechanism is installed downstream of the conveyor belt. A camera obtains the pixel coordinates of the center of the rejection mechanism's operating area. Based on the classification results, particles are identified as impurities or discolored chili flakes requiring rejection. The time it takes for a particle to reach the rejection area is calculated using the pixel coordinates of the center of the rejection mechanism's operating area, its position coordinates, and the conveyor belt speed, and then timestamped. The trigger time is calculated based on the time it takes for a particle to reach the rejection area. When the trigger time is reached, the particle is rejected based on its position coordinates and actual speed.