Real-time sorting system for pepper quality based on industrial vision
Patent Information
- Application Number
- CN202611110029.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-24
- Publication Date
- 2026-10-30
AI Technical Summary
[0002]目前,在辣椒等自由落体物料的视觉分选系统中,现有技术存在以下缺陷:图像识别特征提取适应性差;现有方案多采用固定颜色阈值或静态查找表进行前景提取,在遭遇背景照度衰减、粉尘遮挡或光源漂移时,极易发生目标漏提取、误提取及边界失真;并且,针对高速下落中的物料粘连现象,常规连通域方法难以有效区分单体目标,导致后续喷气位置与数量判定失准;
1.本系统通过采集背景板反射照度与粉尘遮挡指数生成动态颜色查找表,并对候选连通域作轮廓曲率分析与分割得到独立辣椒目标;该方案解决了固定颜色阈值在环境变化时易导致漏提取的问题,并克服了常规方法难以区分粘连物料的缺陷,有效提升了图像初筛与单体目标分离的准确性;
Smart Images

Figure CN122999562A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial vision inspection and intelligent sorting equipment technology, specifically a real-time chili pepper quality sorting system based on industrial vision. Background Technology
[0002] Currently, in visual sorting systems for free-falling materials such as chili peppers, existing technologies have the following drawbacks: poor adaptability of image recognition feature extraction; existing solutions mostly use fixed color thresholds or static lookup tables for foreground extraction, which are prone to target omission, mis-extraction, and boundary distortion when encountering background illumination attenuation, dust obstruction, or light source drift; furthermore, conventional connected component methods are difficult to effectively distinguish individual targets in the case of material adhesion during high-speed falling, leading to inaccurate determination of subsequent jet position and quantity. The jet actuator control is rigid; existing controls mostly rely on fixed delays or empirical parameters, and cannot adaptively adjust the trigger timing and jet pulse width according to the differences in target shape, instantaneous air pressure changes and channel movement density, resulting in large fluctuations in system hit rate and frequent missed blows and false blows. The lack of closed-loop feedback and dynamic correction mechanisms means that existing systems generally lack a feedback link to send back the post-spray trajectory deviation and trough results. This makes it impossible to dynamically correct parameters such as color discrimination, wind resistance, and execution timing during continuous operation, resulting in low system adaptability and difficulty in maintaining sorting accuracy under complex working conditions. Summary of the Invention
[0003] The purpose of this invention is to provide a real-time chili pepper quality sorting system based on industrial vision, addressing the following technical problems: Existing chili pepper material visual sorting systems have significant shortcomings in image feature extraction adaptability, air jet control flexibility, and closed-loop feedback correction mechanisms. There is an urgent need to propose a real-time adaptive chili pepper quality sorting system based on industrial vision that can dynamically adapt to the environment to extract targets, precisely control air jets, and possess feedback correction capabilities. To achieve the above objective, this invention adopts the following technical solution: The chili pepper quality real-time adaptive sorting system based on industrial vision includes a status acquisition module, an image acquisition module, a feedback imaging module, a parameter generation module, an image initial screening module, a target separation module, an air valve driving module, an execution control module, and a sorting feedback module. The status acquisition module is used to acquire background plate reflectance, dust obstruction index, light source temperature rise status, instantaneous air pressure of the air tank, and the number of air valve triggers counted separately for each execution channel. The image acquisition module is used to continuously image the falling chili material flow to generate an image stream, and calculate the initial falling velocity based on the displacement of the same target in adjacent frames; the feedback imaging module is used to output the target trajectory offset and trough landing result after the jet removal action. The parameter generation module generates a dynamic color lookup table based on the output of the status acquisition module, generates pressure compensation parameters based on the instantaneous air pressure of the gas storage tank and the preset standard air pressure, and updates the drag coefficient table based on the execution result identifier. The image screening module performs color matching on the image stream based on the dynamic color lookup table to obtain a foreground pixel set, and performs connected component marking on the foreground pixel set to generate candidate connected components. The target separation module performs contour curvature analysis and segmentation on the candidate connected components to separate independent chili pepper targets, and calculates the projected area, aspect ratio, and color saturation variance of each independent chili pepper target. The valve drive module includes multiple jet execution channels; the execution control module is used to generate a rejection control word including the valve trigger delay time and jet pulse width based on the drag coefficient table, air pressure compensation parameters, initial descent velocity, remaining descent distance from the identification position to the jet action position, as well as the projected area, aspect ratio, and color saturation variance, and send it to the valve drive module to execute the jet rejection action; the sorting feedback module is used to generate an execution result identifier based on the output of the feedback imaging module, and feed it back to the parameter generation module to adjust at least one of the drag coefficient table, air pressure compensation parameters, and dynamic color lookup table.
[0004] Preferably, when the parameter generation module generates the dynamic color lookup table, it collects the background board reflectance as the background standard illuminance value during the system initialization phase, and collects the background board standard color vector as the background board color reference value; it calculates the ratio of the background board reflectance to the background standard illuminance value to obtain the illuminance retention coefficient. Determine whether the illuminance retention coefficient is less than the pre-calibrated illuminance attenuation threshold, or whether the dust obscuration index is greater than the pre-calibrated dust obscuration threshold; when either of the above conditions is met, correct the color threshold in the standard color space according to the background color reference value and generate a dynamic color lookup table; when the above conditions are not met, maintain the current dynamic color lookup table.
[0005] Preferably, when the target separation module performs contour curvature analysis and segmentation on the candidate connected domain, it first calculates the discrete curvature sequence on the contour curve of the candidate connected domain; and selects extreme points in the discrete curvature sequence whose curvature values are greater than the pre-calibrated curvature threshold, whose radial distance relative to the centroid of the candidate connected domain is locally minimal relative to adjacent contour points, and whose curvature concavity points towards the interior of the connected domain, thus forming a set of concave extreme points. Next, for two concave extreme points whose Euclidean distance between the midpoints of the concave extreme point set satisfies the preset distance constraint, the segmentation score is determined; when the segmentation score is greater than the preset segmentation threshold, the candidate connected region is segmented along the line connecting the two concave extreme points to separate the independent chili pepper targets.
[0006] Preferably, the segmentation score is determined based on the average concavity depth of the region corresponding to the line connecting the two concave extreme points, the Euclidean distance between the two concave extreme points, the curvature values of the two concave extreme points, and the relationship between the aspect ratio of the candidate connected region and the pre-calibrated reference value of the aspect ratio of a standard single chili pepper.
[0007] Preferably, when the execution control module generates the rejection control word, it determines the equivalent diameter based on the projected area; determines the wind resistance characteristic factor based on the equivalent diameter, aspect ratio, and color saturation variance; determines the corresponding rejection priority and basic timing compensation value based on the mapping interval of the wind resistance characteristic factor in the wind resistance coefficient table; and then generates the rejection control word based on the basic timing compensation value, the initial descent velocity, and the air pressure compensation parameter.
[0008] Preferably, the process of generating the rejection control word includes: calculating the basic arrival time based on the initial falling velocity and the remaining falling distance; determining the pressure deviation based on the preset standard air pressure and the instantaneous air pressure of the air tank; determining the early trigger compensation amount based on the pressure deviation and the cumulative trigger count of the corresponding air valve in the current execution channel; reading the pre-calibrated system response delay and basic timing compensation value; and determining the air valve trigger delay time based on the basic arrival time, basic timing compensation value, early trigger compensation amount, and system response delay.
[0009] Preferably, the process of generating the rejection control word further includes: reading the pre-calibrated basic jet pulse width and the upper limit of the safe pulse width; determining the pulse width compensation amount based on the rejection priority, air pressure deviation, cumulative trigger count, and compensation weight corresponding to each input variable; determining the target jet pulse width based on the basic jet pulse width and the pulse width compensation amount; taking the smaller value between the target jet pulse width and the upper limit of the safe pulse width and writing it into the rejection control word.
[0010] Preferably, when the sorting feedback module generates and feeds back the execution result identifier, it reads the valve trigger timestamp and execution channel occupancy information of the valve drive module; it associates the valve trigger timestamp with the trough drop result according to the same execution channel and preset time window, and generates an execution result identifier including hit, missed, and false blow states based on the time correspondence, channel correspondence, and preset judgment conditions of the target trough drop position; it writes the execution result identifier into the status feedback data table; and then sends the status feedback data table to the parameter generation module to trigger the parameter generation module to adjust the interval boundaries corresponding to the wind resistance characteristic factors in the wind resistance coefficient table, or adjust the basic time series compensation values corresponding to each interval.
[0011] The beneficial technical effects of this invention are as follows: 1. This system generates a dynamic color lookup table by collecting background reflectance and dust occlusion index, and performs contour curvature analysis and segmentation on candidate connected components to obtain independent chili pepper targets. This scheme solves the problem that fixed color thresholds are prone to missing extraction when the environment changes, and overcomes the defect of conventional methods that are difficult to distinguish adhering materials, effectively improving the accuracy of image screening and single target separation. 2. This system dynamically generates rejection control words that include trigger delay and jet pulse width based on the target's projected area, aspect ratio, and color saturation variance, combined with the instantaneous air pressure of the gas storage tank; at the same time, it generates an execution result identifier based on the troughing result output by the feedback imaging module, and adjusts the wind resistance coefficient table in a closed loop; this solves the problems of rigid control and lack of dynamic correction, effectively reduces the rate of missed blowing and false blowing, and ensures sorting accuracy. Attached Figure Description
[0012] The above and other objects, features and advantages of the present invention will become clearer from the following description of embodiments of the invention with reference to the accompanying drawings, in which: Figure 1 This is a block diagram of the chili pepper quality real-time sorting system based on industrial vision, as described in this application. Detailed Implementation
[0013] The technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0014] Reference Figure 1 One embodiment of this application provides a real-time adaptive sorting system for chili pepper quality based on industrial vision, comprising: The status acquisition module collects background panel reflectance, dust obstruction index, light source temperature rise status, instantaneous air pressure of the storage tank, and the number of times each execution channel air valve is triggered. The image acquisition module continuously images the falling chili pepper material flow to obtain an image stream, and calculates the initial falling velocity based on the displacement of adjacent frames of the same target; The feedback imaging module outputs the target trajectory offset and trough landing results after jet knockout; The parameter generation module generates a dynamic color lookup table based on the output of the status acquisition module, generates pressure compensation parameters based on the instantaneous air pressure of the gas storage tank and the preset standard air pressure, and updates the wind resistance coefficient table based on the execution result identifier. The image initial screening module performs color matching on the image stream according to a dynamic color lookup table to obtain a set of foreground pixels, and marks its connected components to generate candidate connected components; The target separation module performs contour curvature analysis and segmentation on candidate connected regions to obtain independent chili pepper targets, and calculates their projected area, aspect ratio and color saturation variance. The air valve drive module contains multiple air jet execution channels and outputs air valve trigger timestamps and execution channel occupancy information; The execution control module generates a rejection control word containing the air valve trigger delay time and the jet pulse width based on the drag coefficient table, air pressure compensation parameters, initial descent velocity, remaining descent distance from the pre-calibrated identification position to the jet action position, and the projected area, aspect ratio, and color saturation variance, and sends it to the air valve drive module. The sorting feedback module generates an execution result identifier based on the output of the feedback imaging module and feeds it back to the parameter generation module, adjusting at least one of the drag coefficient table, air pressure compensation parameters, and dynamic color lookup table.
[0015] The parameter generation module generates a dynamic color lookup table, including: during the system initialization phase, collecting the background panel reflectance as the background standard illuminance value and collecting the background panel standard color vector as the background panel color reference value; calculating the ratio of the background panel reflectance to the background standard illuminance value to obtain the illuminance retention coefficient. Determine whether the illuminance retention coefficient is less than or equal to the pre-calibrated illuminance attenuation threshold, or whether the dust obscuration index is greater than or equal to the pre-calibrated dust obscuration threshold; if so, correct the color threshold in the standard color space according to the background color reference value and generate a dynamic color lookup table; if not, maintain the current dynamic color lookup table.
[0016] The target separation module performs contour curvature analysis and segmentation on candidate connected regions, including: extracting the contour curves of candidate connected regions and calculating the centroid and aspect ratio of candidate connected regions; Calculate the discrete curvature sequence on the contour curve; In the discrete curvature sequence, select extreme points whose curvature values are greater than or equal to a pre-defined curvature threshold, whose radial distance relative to the centroid is a local minimum relative to adjacent contour points, and whose curvature concavity points towards the interior of the connected domain, to form a set of concave extreme points. For two concave extreme points whose Euclidean distance between the midpoints of the concave extreme point set satisfies the preset distance constraint, determine the segmentation score; Determine whether the segmentation score is greater than or equal to a pre-defined segmentation threshold; If so, the candidate connected region is segmented along the line connecting the two concave extreme points to separate the independent chili pepper targets.
[0017] The segmentation score is determined based on the average concavity depth of the region corresponding to the line connecting the two concave extreme points, the Euclidean distance between the two concave extreme points, the curvature values of the two concave extreme points, and the relationship between the aspect ratio of the candidate connected region and the pre-calibrated reference value of the aspect ratio of a standard single chili pepper.
[0018] In the free-fall chili sorting equipment, visual recognition, state correction and air jet execution work together on the same data link: first, the background state is used to correct the color discrimination, then the individual chili targets are separated from the continuous images, and the target attributes and aerodynamic state are used together to generate air jet control words. The post-jet results are sent back to correct the parameters used in subsequent cycles. In one embodiment: after the chili material is thrown upstream, it enters the falling channel. The image acquisition module continuously captures images of the material flow, and the status acquisition module simultaneously acquires the background plate reflectivity, dust obstruction index, light source temperature rise status, instantaneous air pressure of the gas storage tank, and the number of times the air valves of each execution channel are triggered. The dust obscuration index is calculated by extracting the high-frequency components of the empty background image using the Laplacian operator, calculating the ratio of the variance of the current image's high-frequency components to the variance of the standard high-frequency components of the background during the initialization phase, and then substituting this ratio into a preset exponential decay function. The calculation yielded that, The temperature rise state of the light source is obtained in real time by a temperature sensor installed on the heat dissipation substrate or housing of the light source, using a pre-calibrated mapping coefficient. The above data are not directly mixed and used, but are sent to the parameter generation module and the execution control module respectively. The parameter generation module first processes the state variables related to color discrimination, and then processes the state variables related to jet timing. After the image stream passes through the image screening module, it forms a set of candidate connected components. The target separation module further splits each candidate connected component to obtain an independent chili pepper target that corresponds to a single jet action. The projected area, aspect ratio, and color saturation variance of each independent target are written into the target recording area of the current sorting cycle and associated with the target's imaging time, position, and subsequent jet channel number. The execution control module reads the target attributes from the recording area and reads the drag coefficient table and air pressure compensation parameters issued by the parameter generation module. Combined with the initial descent velocity and the remaining descent distance, a rejection control word is formed. The valve drive module drives the corresponding execution channel to complete the jet spraying; after spraying, the feedback imaging module outputs the target trajectory offset and trough landing result, and the sorting feedback module generates an execution result identifier based on this, and writes the identifier back to the parameter generation module for the next cycle to correct at least one of the drag coefficient table, air pressure compensation parameters and dynamic color lookup table. The correction is performed by the parameter generation module, which selects at least one of the following for updating based on the source and validity of the execution result: when the feedback result can stably reflect the jet offset and chute error, it is prioritized for correcting the drag coefficient table and air pressure compensation parameters; when the feedback result is accompanied by a continuous shift in the background plate state variables, i.e., the background plate reflectance or dust obstruction index is continuously shifted... Within each control cycle, the value fluctuated above or below the corresponding calibration reference value. Only when the tolerance range is met and the background area is valid will the dynamic color lookup table correction be further triggered; In this embodiment, the light source temperature rise state quantity is mainly used as an effective constraint of the color discrimination state quantity. When it indicates that the light source has not yet entered the preset thermal stability range, the parameter generation module only records the illuminance-related data collected in this period and does not immediately trigger the reconstruction of the dynamic color lookup table. Instead, it prioritizes using the lookup table of the previous effective period to avoid the short-term drift during the light source temperature rise process being mistakenly written into the color threshold. Regarding the generation of the dynamic color lookup table in this embodiment, the system first acquires an image of an empty background board during the initialization phase, obtains the standard illuminance value of the background, and records the corresponding standard color vector of the background board. During operation, the status acquisition module periodically updates the current background board reflected illuminance and dust occlusion index. The parameter generation module calculates the ratio between the current background board reflected illuminance and the standard illuminance value of the background to obtain the illuminance retention coefficient. If the coefficient is less than the preset illuminance attenuation threshold, or the dust obstruction index is greater than the preset dust obstruction threshold, it indicates that there is a considerable deviation between the original color threshold and the current imaging conditions. At this time, the color threshold in the standard color space is corrected according to the background color reference value, and a dynamic color lookup table is regenerated. Among them, the background standard color vector is the background color data collected during the initialization phase, and the background color reference value is the reference for the background standard color vector in the subsequent threshold correction. Both point to the same background reference object. The correction takes the background color reference value as the reference center, and combines the illuminance preservation coefficient to synchronously shrink or expand the upper and lower boundaries of the brightness-related thresholds. It also translates the chromaticity boundary that meets the preset conditions due to dust influence according to the preset step size, so that the lookup table still revolves around the background reference in the initialization phase and only compensates for the boundary offset caused by the current imaging conditions. Specifically, taking the standard color space as a hue, saturation, and brightness space as an example, let the upper limit of brightness calibrated during the initialization phase be... The lower limit is The currently calculated illuminance retention coefficient is The corrected upper limit of brightness is then updated to The lower limit for brightness has been updated to Let the original decision boundary of the chroma channel be... The current dust obstruction index is The dust obstruction threshold is Then when At that time, the chromaticity compensation offset was determined to be... ,in, The corrected chromaticity boundary is updated using pre-calibrated chromaticity shift weighting coefficients. Overlay chromaticity compensation offset; To avoid exceeding the valid value range of the color space after threshold correction, this embodiment performs boundary clipping on the correction result: the upper and lower limits of brightness are limited to the minimum and maximum values of the brightness channel in the current color space, and the lower limit of brightness is kept no greater than the upper limit of brightness; the chromaticity boundary is limited to the legal range of the current chromaticity channel. When the chromaticity channel of the color space used has the characteristic of wrapping around the beginning and end, the part that exceeds the boundary is folded back in the wrapping manner instead of being linearly extrapolated. Through the above-mentioned explicit linear mapping relationship and boundary constraints, the boundary adjustment mechanism is made transparent and invalid thresholds are avoided; the regenerated lookup table is written into the lookup table storage area called by the image screening module for direct use in subsequent frames; if neither of the above two conditions is met, the current dynamic color lookup table is continued to be used, and the image screening process is not switched, thereby avoiding frequent changes to the color discrimination boundary when the environmental state is basically stable. During this process, if the background area is briefly obscured by material in a certain period, causing the reflected illuminance or background color vector to be unable to be extracted stably, the lookup table reconstruction will not be triggered in that period, but the dynamic color lookup table of the previous valid period will be maintained, and an invalid mark will be retained in the status record of that period. This avoids mistakenly treating non-background areas as background references in subsequent calculations; if the light source temperature rise exceeds the preset stability limit in the same period, the illuminance retention coefficient for that period is only used for alarms and trend recording, and is not used as the basis for rewriting the color threshold. To ensure that the illuminance attenuation threshold and dust obstruction threshold have a repeatable basis for determination, this embodiment uses continuous imaging of an unloaded background board as a calibration sample during the equipment installation and commissioning phase; the illuminance attenuation threshold is taken as the minimum illuminance retention coefficient that ensures the number of false reconstructions of the dynamic color lookup table during stable unloaded operation does not exceed the preset allowable number; during the equipment initialization calibration phase, the illuminance attenuation threshold is set between 0.92 and 0.97. The dust occlusion threshold is the critical dust occlusion index that reduces the effective visible area of the background panel without causing mis-extraction of the foreground. The critical dust occlusion index is set as the state when the effective texture or edge response of the background panel decreases by 10% to 20%. If the background panel material or light source installation height is different for different models, the above threshold will be fixed and stored after the first calibration of the model. Subsequent runs will only call the calibrated value and will not drift arbitrarily during the operation. In the candidate connected component segmentation of the embodiment, in this embodiment, the image screening module extracts the foreground pixel set in the image stream according to the dynamic color lookup table and performs connected component marking to form candidate connected components; when the chili peppers are falling at high speed, the edges of adjacent chili peppers often stick together, and the area obtained by simply marking the connected components may not correspond to a single independent target. The target separation module performs segmentation processing on the candidate connected components. To this end, the target separation module samples the contours of candidate connected regions and calculates a discrete curvature sequence on the contour curves; in this curvature sequence, extreme points that meet the following conditions are selected: the curvature value is greater than a pre-calibrated curvature threshold, the radial distance relative to the centroid of the candidate connected region is a local minimum relative to adjacent contour points, and the curvature concavity points inward into the connected region; points that meet the above conditions constitute a set of concave extreme points. After obtaining the set of concave extreme points, the system does not directly connect any two points to divide the segment. Instead, it first checks whether the Euclidean distance between the points meets the preset distance constraint. Only two points within a reasonable connection range are included in the subsequent scoring to avoid misjudging the curved part of the same chili pepper as the connecting neck between two independent individuals. The segmentation score is determined by the average concavity depth of the region corresponding to the line connecting the two concave extreme points, the Euclidean distance between the two points, their respective curvature values, and the relationship between the aspect ratio of the current candidate connected region and the reference value of the aspect ratio of the standard single chili pepper. When the segmentation score is greater than the pre-defined segmentation threshold, the system segments the candidate connected region along the line connecting the two concave extreme points to obtain two or more independent chili pepper targets; if the segmentation score does not reach the threshold, the candidate connected region is retained as a single target. In this embodiment, the segmentation score is determined by summing the scores after itemization and grading: the average concavity depth is divided into three levels from shallow to deep, corresponding to 1 point, 2 points, and 3 points; the Euclidean distance between two concave extreme points is divided into three levels according to the degree of matching with the equivalent size of the current candidate connected region. The equivalent size is defined as the diagonal length of the smallest bounding rectangle of the current candidate connected region. The specific division rule is as follows: if the degree of matching of the equivalent size is lower than the preset lower threshold, 0 points are awarded; if it is located within the preset central connection interval, 3 points are awarded; if it is higher than the preset upper threshold, 1 point is awarded. Two curvature values are assigned a score of 1 to 3 based on the smaller of the two curvature levels. The deviation of the aspect ratio of the candidate connected region from the reference value of the aspect ratio of the standard single chili pepper is divided into three levels, with a higher score for a larger absolute value of the deviation ratio. Specifically, the ratio of the aspect ratio of the candidate connected region to the reference value of the aspect ratio of the standard single chili pepper is calculated. If the ratio is in the range of [0.6, 0.8] or (1.2, 1.5], it is judged as a moderate deviation and assigned 1 point; if the ratio is less than 0.6 or greater than 1.5, it is judged as a severe deviation and assigned 2 points. The four scores are added together to form the segmentation score, preferably with a total score of 8 points as the segmentation threshold. Here, the curvature threshold, distance constraint, and standard single chili pepper aspect ratio reference value are all obtained through offline calibration using single chili pepper samples and known adherent samples. The curvature threshold is the minimum effective curvature value that makes the proportion of falsely detected depressions on the single chili pepper contour lower than the preset upper limit. The Euclidean distance constraint between points is 0.08 to 0.35 times the equivalent size of the current candidate connected region, and the standard single chili pepper aspect ratio reference value is taken from the interval where the median of the calibrated samples is located. The above-mentioned grading method makes the segmentation judgment dependent on clear grade boundaries. To ensure consistency between the segmentation results and subsequent jet control, the projected area, aspect ratio, and color saturation variance of each segmented independent target are recalculated and written back to the target recording area. If a candidate connected component cannot stably obtain a discrete curvature sequence in the current cycle due to missing contours, local occlusion, or discontinuous boundaries, forced segmentation is not performed. Instead, the connected component is treated as an unsegmented target, and the original contour data is retained to avoid introducing an incorrect number of jet targets due to over-segmentation. In the case of free-fall chili sorting, this processing method can make subsequent jet actions prioritize targets with higher certainty, avoiding mismatch between control words and actual material quantity due to local image defects. In some possible implementations, the execution control module generates a rejection control word, including: determining the equivalent diameter based on the projected area; determining the drag characteristic factor based on the equivalent diameter, aspect ratio, and color saturation variance; determining the corresponding rejection priority and basic timing compensation value based on the mapping range of the drag characteristic factor in the drag coefficient table; and generating the rejection control word based on the basic timing compensation value, initial descent velocity, and air pressure compensation parameters.
[0019] Generate rejection control words, including: calculating the base arrival time based on the initial fall velocity and remaining fall distance. The pressure deviation is determined based on the preset standard pressure and the instantaneous pressure in the storage tank; the early trigger compensation is determined based on the cumulative value of the pressure deviation and the number of times the valves of each execution channel corresponding to the current execution channel are triggered. Read the pre-calibrated system response delay. and basic timing compensation value ;according to , , and Determine the valve trigger delay time.
[0020] Generating the rejection control word also includes: reading the pre-calibrated base jet pulse width. and the upper limit of safe pulse width The pulse width compensation amount is determined based on the elimination priority, air pressure deviation, number of valve triggers in each execution channel, and compensation weight corresponding to each input variable. Based on the basic jet pulse width and pulse width compensation Determine the target jet pulse width; the jet pulse width is the sum of the target jet pulse width and the upper limit of the safe pulse width. The smaller value in the range.
[0021] After the independent chili pepper target is formed, the morphological information obtained from the image side is converted into the timing control quantity and pulse width control quantity executed by the air valve drive module. First, the difference in the target affected by the jet is characterized by the projected area, aspect ratio and color saturation variance. Then, the difference is converted into the trigger delay and jet pulse width along with the air path state. In one embodiment: each independent chili pepper target in the free fall channel, after passing through the target separation module, has a projected area, aspect ratio, color saturation variance, imaging position, and initial falling velocity obtained from the displacement of adjacent frames; after reading these parameters, the execution control module first determines the equivalent diameter based on the projected area; the equivalent diameter, together with the aspect ratio and color saturation variance, is used to determine the wind resistance characteristic factor; Since the jet offset is affected by the target size, the elongation of the outline, and the unevenness of the surface color, the equivalent diameter is determined based on the projected area. After the drag characteristic factor is determined, the execution control module looks up its mapping interval in the drag coefficient table to obtain the corresponding elimination priority and basic timing compensation value. The search result is bound to the target number and written to the control buffer for direct use in subsequent delay and pulse width calculations in this cycle. The pressure compensation parameter issued by the parameter generation module is used in this embodiment to characterize the compensation result of the instantaneous pressure of the current gas storage tank relative to the preset standard pressure. The execution control module can directly read the compensation parameter when generating the control word, or it can convert it into the pressure deviation corresponding to the current cycle and then participate in the delay and pulse width calculation. Therefore, the air pressure compensation parameters in the embodiment and the air pressure deviation in the embodiment correspond to each other in the data link. The former is the compensation result output by the parameter generation module, and the latter is the current quantity expression used by the execution control module for control calculation in this cycle. In this embodiment, the equivalent diameter is determined according to the diameter of a circle that is equal to the projected area, i.e. ,in, The projected area of an independent chili pepper target. The equivalent diameter is used; the drag characteristic factor is not determined by single-step continuous fitting, but by a piecewise mapping method after offline calibration: first, the size is divided into size ranges according to the equivalent diameter, and then within each size range, it is divided into slender, medium and short-wide types according to the length-to-width ratio, and into three levels of low fluctuation, medium fluctuation and high fluctuation according to the color saturation variance; the combination of the three levels uniquely corresponds to a mapping interval in the drag coefficient table. Therefore, the execution control module can directly read the rejection priority and basic timing compensation value according to the target's gear position, thereby realizing the direct extraction of control parameters based on the mapping relationship; the above-mentioned size gear, shape gear and color fluctuation gear are all obtained through prototype jet calibration, preferably so that the average post-jet offset of the samples in the same interval falls within the preset allowable error band; The wind resistance characteristic factor is determined based on the equivalent diameter, aspect ratio, and color saturation variance: After the equipment calibration is completed, the parameter generation module pre-writes three threshold tables, namely the equivalent diameter threshold table, the aspect ratio threshold table, and the color saturation variance threshold table. The execution control module compares items one by one in a fixed order. If the equivalent diameter is less than the first size threshold, it is recorded as the first size class; if it is not less than the first size threshold and less than the second size threshold, it is recorded as the second size class; the rest are recorded as the third size class. If the aspect ratio is less than the first shape threshold, it is recorded as the short and wide type; if it is not less than the first shape threshold and not greater than the second shape threshold, it is recorded as the medium type; the rest are recorded as the slender type. If the color saturation variance is less than the first fluctuation threshold, it is recorded as low fluctuation; if it is not less than the first fluctuation threshold and less than the second fluctuation threshold, it is recorded as medium fluctuation; the rest are recorded as high fluctuation. The three results are concatenated in the order of size range-shape range-fluctuation range to form the wind resistance characteristic factor code of the target, and serve as the unique index for retrieving the wind resistance coefficient table; when an input value falls exactly on the boundary between two ranges, it is uniformly classified according to the higher range to avoid the same target jumping back and forth due to boundary rounding in adjacent cycles; the air pressure compensation parameters output by the parameter generation module are also stored in the form of directly readable table entries in this embodiment. The table entries at least include the air pressure deviation range corresponding to the current cycle and the delay compensation and pulse width compensation call identifiers corresponding to the range, so that the execution control module does not need to perform undefined fitting calculations again after receiving them; The control word is generated based solely on the image-side parameters. It can work when the air supply is stable, but under conditions of continuous and dense jetting, there may still be a timing inconsistency between the recognition position and the jetting position. Therefore, this embodiment further calculates the valve trigger delay time according to the example. The execution control module calculates the base arrival time based on the initial descent velocity and the remaining descent distance. Then, the pressure deviation is obtained from the preset standard air pressure and the instantaneous air pressure of the air tank; at the same time, the cumulative number of triggers of the air valve corresponding to the current execution channel is read to reflect the recent action density of the channel; here, the cumulative number of triggers of the air valve corresponding to the current execution channel is expressed as the cumulative value of the number of air valve triggers counted separately for each execution channel in the current control cycle or the current statistical window in the embodiment. In the subsequent delay and pulse width calculations of this embodiment, the number of valve triggers and the cumulative number of triggers both refer to the same statistic and no longer represent other different parameters; here, the base arrival time... In the case of free fall, the value is determined by the actual flight time from the target's identification position to the jet action position, rather than simply dividing the remaining fall distance by the initial fall velocity to obtain a uniform approximation. Preferably, after completing the pixel distance to physical distance calibration, the execution control module calculates the time based on the initial falling velocity, the remaining falling distance, and the gravitational acceleration constant used for device calibration. If the short-term velocity fluctuation of the target exceeds the preset allowable range within the current period, then the adjacent pixels are degraded and extracted. Average frame drop speed And according to the corrected formula: A local correction calculation is performed on the base arrival time, where, This represents the remaining distance to fall. Let gravitational acceleration be constant. The nonlinear time lag compensation term is introduced for calibration based on aerodynamic drag and velocity fluctuation characteristics; To avoid arrival times that are not physically meaningful, this implementation only retains the minimum positive time solution that satisfies the falling direction convention and corresponds to the remaining distance from the identification position to the jet action position; if the input velocity value, distance value or calibration constant makes it impossible to obtain the time stably, the target will retain the identification record but will not be written into the jet trigger queue. The above treatment avoids timing deviations caused by directly adopting the uniform velocity assumption during the free fall acceleration phase; and triggers compensation amounts in advance. The value is determined by both the air pressure deviation and the cumulative number of triggers. Specifically, when the air supply pressure is lower than the preset standard air pressure or the cumulative number of triggers on the same execution channel increases within a short period of time, a trigger will occur. The jet propulsion is increased accordingly to advance the jet action appropriately relative to the target's natural descent process; Then, the execution control module reads the pre-calibrated system response delay. and the basic time-series compensation values obtained from the aforementioned drag coefficient table. And record the valve trigger delay time as ,according to Determine the valve trigger delay time; It should be noted here that the pre-calibrated system response delay This includes not only the electromagnetic action delay of the air valve and the physical air path delay of the airflow to the action surface, but also the inherent time consumption of the front-end system, such as image processing and communication transmission, in the link from the image acquisition exposure reference time to the delivery of the rejection control word to the air valve drive module. In the case of high-speed free fall sorting, if the timing link is not uniformly aligned on the same global time axis, the delay operation of the drive module, which uses the time of receiving the control word as the zero point for timing, will result in a serious absolute time lag equivalent to the total time consumption of the front-end calculation. Therefore, the time consumed by image and control calculations is included in the calculation. The deduction from the middle causes the write channel delay register area air supply valve drive module to be called. It can accurately correspond to the actual remaining physical waiting time of the current target; the calculated delay time is written into the delay register area corresponding to the channel, waiting for the air valve drive module to be triggered according to this value; If the calculation result is less than zero, it is written with zero delay to avoid forming a negative delay control word that has no physical meaning; in order to make It can be calculated directly. In this embodiment, the pressure deviation is first defined as the difference between the preset standard pressure and the instantaneous pressure of the storage tank; when the difference is less than or equal to zero, the pressure deviation is calculated as zero. Early trigger compensation amount Confirmed, among which This refers to the pressure deviation obtained in the manner described above. This represents the cumulative number of times the air valve corresponding to the currently executing channel has been triggered. This is the air pressure compensation coefficient. This is the motion density compensation coefficient; and All were obtained through offline jet calibration, and The dimension is time divided by pressure. The dimension is time divided by the number of times, thus ensuring and , , Maintain the same time dimension; The calibration principle is: when other conditions are fixed, adjust... To bring the hit time deviation under different supply pressure levels to a preset allowable range; adjust This ensures that the response lag caused by continuous jetting in the same channel is offset and that the proportion of premature false blows does not exceed a preset tolerance threshold; in the actual control logic, the compensation amount is triggered in advance. A preset compensation limit is set, which is no greater than the base arrival time. 30% to avoid excessive advance due to abnormal pressure supply or short-term high-frequency triggering; Regarding the jet pulse width in this embodiment, after determining the trigger delay, the execution control module continues to read the pre-calibrated basic jet pulse width. and the upper limit of safe pulse width Pulse width compensation It is determined by the elimination priority, air pressure deviation, cumulative number of triggers, and the compensation weight corresponding to each input variable. If the target has a high rejection priority in the drag coefficient table, or if there are current issues such as reduced gas supply or increased number of continuous channel operations, then The corresponding increase; target jet pulse width Depend on and The synthesized jet pulse width is ultimately written into the rejection control word to obtain the target jet pulse width. and The smaller value in the range is used to limit the range of the jet's effect; In free-fall sorting equipment, an excessively large jet pulse width may expand the jet coverage area and affect the falling trajectory of nearby normal peppers. The aforementioned treatment limits the jet's effective range. This embodiment addresses this issue. The elimination priority is determined by a lookup table overlay method: the priority is divided into three levels, with low, medium and high priorities corresponding to the first pulse width increment, the second pulse width increment and the third pulse width increment, respectively. The air pressure deviation is divided into three levels: small, medium, and large, each corresponding to a different level of air pressure compensation increment. The specific level boundaries are: small level is less than 5% of the preset standard air pressure, medium level is 5% to 15%, and large level is greater than 15%. The cumulative number of triggers is divided into three levels: low frequency, medium frequency, and high frequency, each corresponding to a different level of density compensation increment within the current statistical window. The specific level boundaries are: low frequency is 1 to 2 triggers within the current statistical window, medium frequency is 3 to 5 triggers, and high frequency is greater than 5 triggers. The execution control module adds the three types of increments to obtain the result. The results are then pruned using upper and lower bounds, where the lower bound is 0 and the upper bound is [value missing]. and The difference; the above-mentioned first to third pulse width increments, three-level air pressure compensation increments and three-level density compensation increments are respectively used as the call results after discretizing the compensation weights corresponding to priority, air pressure deviation and cumulative trigger count, so that the compensation weights in the embodiment have a traceable table entry source in this embodiment; The boundaries of each gear and their corresponding increments are calibrated through jet testing during the equipment commissioning phase. Preferably, the minimum pulse width required for the rejected target to reach the waste path is left with a safety margin of 10% to 15%, while ensuring that the trajectory disturbance of adjacent normal targets does not exceed the preset allowable offset value. If the target is near the boundaries of two gears, it is written according to the larger gear to ensure that the rejected target meets the hit requirements first. In the abnormal branch, if a target has obtained the wind resistance characteristic factor, but fails to obtain the effective air pressure data of the corresponding execution channel in the current cycle, the delay calculation part will not use null values, and the rollback will use the instantaneous air pressure record of the air tank corresponding to the channel in the previous effective cycle, while retaining the alternative mark of the control word. If the cumulative trigger count is not refreshed in the current cycle, the cumulative value at the end of the previous statistical cycle of the channel will continue to be used; if the above alternative value does not exist, the target will not be written into the jet trigger queue, and only the identification record will be retained; the above processing ensures that the control word has a clear data source once it is formed; if the source is broken, the jet output of the target will be stopped, and delay and pulse width parameters lacking data basis will not be generated. In this scenario, each record in the control buffer typically contains at least the target number, the corresponding execution channel, the valve trigger delay time, and the jet pulse width. The valve drive module reads these records sequentially and executes the jet. Since the delay and pulse width have been converted based on the target shape and air path status before being written, the drive side does not need to parse the image parameters again and can simply output according to the control word. The drag coefficient table, air pressure compensation parameter table, and control buffer are stored in a fixed field structure; the drag coefficient table is stored as a local relational configuration table, and each record contains at least the feature factor code, size range, shape range, color fluctuation range, elimination priority, and basic time series compensation value. Form version, effective period, and activation flag; In this system, the feature factor code serves as the primary key, and the size, shape, and color fluctuation parameters correspond to the aforementioned size, shape, and color fluctuation parameters, respectively. The elimination priority is set to 1, 2, and 3, representing low, medium, and high elimination priorities, respectively. The table version is used to identify the version before and after feedback correction for the basic timing compensation value corresponding to this code; the air pressure compensation parameter table should at least include the air pressure deviation level, lower air pressure limit, upper air pressure limit, delay compensation call identifier, pulse width compensation call identifier, substitution flag and update cycle; In this system, the air pressure deviation level serves as the primary key, with the lower and upper air pressure limits jointly defining the air pressure range for that level. The delay compensation call identifier and pulse width compensation call identifier point to the delay compensation and pulse width compensation call identifiers, respectively. The control buffer adopts a circular queue structure segmented by execution channel. Each control record includes at least the control identifier, target identifier, channel identifier, feature factor code, air pressure deviation level, elimination priority, and valve trigger delay time. Jet pulse width, alternate data flags, transmission status, and queuing timestamp; The sending status is divided into at least four states: pending, sent, executed, and invalid. When the target has completed the wind resistance characteristic factor encoding and the corresponding channel has not been marked as faulty or closed, the execution control module will write the target into the queue fragment of the corresponding channel. If the queue is full, only executed or invalid records are allowed to be overwritten, and records that have not yet been executed will not be overwritten. The control word sent from the execution control module to the valve drive module adopts a fixed-length message format. The message fields include at least the frame header, control identifier, channel identifier, delay count value, pulse width count value, priority flag, alternative data flag, target short identifier, and checksum. Among them, the delay count value is to The count value is quantized according to the drive clock cycle. The pulse width count value is the count value quantized according to the same clock cycle of the jet pulse width. The priority flag is used to identify the order level when there are adjacent records to be executed in the same channel. The alternative data flag is used to identify whether alternative air pressure data is used to generate the control word. After receiving the data, the valve drive module returns an acknowledgment record containing at least the control identifier, channel identifier, receiving timestamp, and drive status. If the execution control module does not receive the corresponding acknowledgment before the end of the current control cycle, the sending status of the control record is set to pending retransmission, and it is not directly included in the executed sample set, so as to ensure that the control words not accepted by the drive side are not mistakenly regarded as valid jet events when subsequent feedback is correlated. In some possible implementations, the sorting feedback module generates and feeds back the execution result identifier, including: obtaining the valve trigger timestamp and execution channel occupancy information of the valve drive module; The valve trigger timestamp is associated with the trough drop result based on the same execution channel and preset time window. Based on the time correspondence, channel correspondence and preset judgment conditions of the target trough drop position, execution result identifiers including hit, missed blow and false blow status are generated. Write the execution result identifier into the preset status feedback data table; The status feedback data table is sent to the parameter generation module, which triggers the parameter generation module to adjust the interval boundaries corresponding to the drag characteristic factors in the drag coefficient table, or to adjust the basic time series compensation values corresponding to each interval.
[0022] After the jetting action is completed, the execution results are compiled into a record: the valve trigger record, execution channel occupancy information and post-jet detection results are matched according to the same execution channel and preset time window to generate hit, missed and false jetting status indicators, which are used by the parameter generation module to correct the interval boundaries of the drag coefficient table or the basic timing compensation value corresponding to each interval. In one embodiment: the valve drive module synchronously outputs the valve trigger timestamp and execution channel occupancy information when performing jet injection; the feedback imaging module is located behind the jet action surface and is used to detect the target trajectory deviation and landing result after jet injection; the sorting feedback module does not directly attribute a landing result to the most recent jet injection, but first classifies the trigger records according to the execution channel, and then retrieves the corresponding landing result under the execution channel according to the preset time window; only when the time correspondence and the channel correspondence are satisfied at the same time is the association between a jet injection action and a target after jet injection established; After establishing the association, and combining the preset judgment conditions of the target drop position, an execution result identifier is generated; if the target identified as to be removed is blown into the predetermined waste path, it is recorded as a hit; if the target identified as to be removed does not enter the predetermined waste path, it is recorded as a missed blow; if a target that should not be removed enters the waste path due to air jet, it is recorded as a false blow. The generated execution result identifier is written into the status feedback data table; in this data table, each record maintains a traceable correspondence with the preceding control word, and can at least point to the execution channel, the associated trigger record, and the corresponding post-spray judgment result; after reading the status feedback data table, the parameter generation module summarizes the execution results within the same wind resistance characteristic factor mapping range; If the proportion of missed blows in a certain interval is greater than the preset missed blow threshold, it indicates that the existing basic timing compensation value or interval boundary of the interval is not completely consistent with the actual material characteristics. The parameter generation module can adjust the interval boundary corresponding to the wind resistance characteristic factor in the wind resistance coefficient table, or adjust the basic timing compensation value corresponding to the interval. If the proportion of false blows in a certain interval is greater than the preset false blow threshold, the adjustment direction is opposite to the missed blow correction direction, so as to compress unnecessary jet coverage or correct the trigger timing deviation. When the same execution channel in the status feedback data table shows a decrease in hit rate in multiple consecutive effective cycles, and the instantaneous air pressure of the storage tank deviates in the same direction relative to the preset standard air pressure, the parameter generation module can adjust the air pressure compensation parameters used in subsequent cycles of the execution channel accordingly. When the hit, missed blow, or false blow status occurs simultaneously with the continuous abnormal changes in the background plate reflectivity and dust obstruction index, and the background area of the corresponding cycle is valid, the parameter generation module can use the feedback result as an auxiliary constraint for subsequent correction of the dynamic color lookup table, but will not directly replace the background reference with the single drop result to reconstruct the color threshold. Therefore, in this embodiment, at least one of the drag coefficient table, air pressure compensation parameter and dynamic color lookup table is adjusted, which in this embodiment corresponds to: directly correcting the drag coefficient table based on the execution result identifier, and linking to correct the air pressure compensation parameter or assisting in triggering the dynamic color lookup table correction when the additional validity conditions are met. When only post-spray images are available but the drive-side timestamp is missing, it is impossible to reliably distinguish between identification errors and execution deviations. Therefore, this implementation emphasizes simultaneously reading the valve trigger timestamp and execution channel occupancy information. If a post-spray target in the current cycle cannot find a matching trigger record within a preset time window, the target retains an unassociated marker and is not written into the valid sample set for interval adjustment. If an execution channel is triggered multiple times within the same preset time window, causing a single drop result to not uniquely correspond to a certain jet, the relevant records in that window will not participate in the drag coefficient table adjustment for the time being, and only the original association information will be retained. The above processing ensures that the data used to correct the drag coefficient table has a clear correspondence, avoiding writing inseparable mixed results into subsequent parameter updates; further: for each valve trigger record, the sorting feedback module first reads the shortest flight time calibration value and the longest flight time calibration value corresponding to the execution channel, and establishes an association window belonging only to this channel, starting from the valve trigger timestamp of this time; Each post-jet target result output by the feedback imaging module is assigned to the corresponding channel queue according to the channel, and then searched in chronological order to see if it falls into a certain association window that has not yet been matched; if there is only one post-jet target result in the same window, a unique association is directly established; if there are multiple post-jet target results in the same window, in order to avoid the conflict between the association judgment conditions and the generation of multiple solutions, a step-by-step priority is established to perform unique association judgment: the post-jet target result whose lateral offset of the trajectory center is closest to the jet centerline of the channel is selected first. If there are multiple results where the lateral offset difference of the trajectory center is within the same preset tolerance range, then the result whose fall time is closest to the theoretical flight arrival time of the channel will be selected as the valid association, and all other results will be retained as non-unique association records. If a target result after a spray falls into two adjacent windows simultaneously, it will be assigned to the window with the earlier trigger time and no associated result at present, while the other window will remain unmatched. The lateral offset of the trajectory center from the jet centerline of the channel is determined by comparing the absolute value of the lateral deviation between the trajectory center of each target after spray and the jet centerline of the channel, with the smaller lateral deviation taking priority. This fixed matching order can prevent the same landing result from being repeatedly written to multiple trigger records. This implementation method stipulates that: targets with a removal control word in the target record area and whose control word has been actually issued and executed are considered to be removed targets; targets without a removal control word in the target record area, or targets that have been identified but have not entered the jet trigger queue due to missing data, are considered to be non-removable targets. For targets that have been uniquely associated, if their landing result is located in the preset waste trough area and the trajectory offset direction points to the waste side of the execution channel to which the target belongs, it is recorded as a hit; if their landing result is not located in the preset waste trough area, it is recorded as a missed blow; for non-removable targets, since they do not carry removal control words and lack corresponding execution channel mapping relationships, if they are detected falling into the waste trough area within the preset observation window after passing the jet action surface, the sorting feedback module will retrieve the jet records of adjacent execution channels that overlap with the spatial flow field generated by their falling trajectory and arrival time. If a trigger record from an adjacent channel that caused the trajectory deviation is successfully matched, it is recorded as a false blow, and the false blow result is back-attached to the trigger record of the adjacent channel as a negative feedback sample for the corresponding wind resistance characteristic factor mapping interval jet coverage being too large or the timing being inaccurate, so as to ensure that the data chain can be traced backward; if it does not fall into the waste trough area or fails to be associated with any valid trigger record, no jet execution result identifier is generated; here, it is assumed that the waste trough area and the finished product trough area are both fixed and stored in pixel coordinate range or physical coordinate range when the equipment is installed, and only the area classification comparison is performed during feedback judgment, without introducing other undefined evaluation models; This implementation specifies that parameter adjustment is triggered only when the same wind resistance characteristic factor mapping interval obtains no less than the preset sample lower limit of valid samples in three consecutive valid statistical windows, and the missed blowing rate or false blowing rate is continuously higher than the hit rate allowable deviation threshold; wherein, the valid statistical window is a statistical window in which there are no multiple triggers of aliasing and the background area is valid. If there is a high rate of missed blows, the average deviation direction of the trajectory center of the effective sample in the post-spray image relative to the jet centerline of the channel should be read first. When the average deviation indicates that the time when the target as a whole arrives at the jet action zone is later than the current trigger time, the basic timing compensation value corresponding to the interval should be reduced by the single calibration step size. When the average deviation indicates that the overall time of the target's arrival in the jet action zone is earlier than the current trigger time, the basic timing compensation value corresponding to the interval is increased by the single calibration step size; only when the deviation direction is unstable and the leakage blow continues to be excessive within two consecutive adjustment cycles, the upper or lower boundary of the interval is expanded by 2% to 5% of the wind resistance characteristic factor quantization step size, so that the neighboring samples are reassigned to a more suitable mapping interval. If there are too many false blows, the base timing compensation value is fine-tuned in the opposite direction to the average deviation that caused the false blows. If necessary, the boundary of the corresponding interval is contracted to compress the unnecessary jet coverage. The single calibration step size is preferably 0.2ms to 0.5ms. If the same interval has the extreme condition of local sample hits and increased false blows in adjacent channels, the current interval boundary is retained first. Only the base timing compensation value is allowed to be fine-tuned within a single calibration step size, and the jet coverage is not immediately expanded. In the case of free-fall chili sorting, the post-spray feedback does not change the currently issued control word, but instead applies to the drag coefficient table used in subsequent cycles. In this way, the jet control and parameter correction are separated in time, the execution process of the current cycle remains stable, and the next cycle uses the updated interval boundary or basic timing compensation value. Through this recording and correction method, the system can gradually map chili targets of different sizes, shapes and surface conditions to a more suitable jet timing. The sorting feedback module maintains at least two types of local table structures: the trigger table to be associated and the status feedback data table. The trigger table to be associated is used to temporarily store records that have been confirmed and executed by the air valve drive module but have not yet completed post-spray matching. Each record contains at least the trigger identifier, control identifier, channel identifier, trigger timestamp, window start timestamp, window end timestamp, channel occupancy flag, feature factor code, table version, and pending status. Among them, the trigger identifier serves as the primary key, the control identifier is used to refer back to the preceding control word, and the pending status is distinguished into at least three states: pending matching, matched, and timed out without matching; the status feedback data table is used to store feedback samples after the unique association is completed, and each record contains at least the feedback identifier, trigger identifier, control identifier, target identifier, channel identifier, slotting area code, offset direction code, result flag, unique matching flag, sample validity flag, feature factor code, table version, and write cycle; The feedback identifier serves as the primary key, the trigger identifier serves as the foreign key to associate the trigger table, the result flag enumerates at least hit, missed blow, and false blow, and the sample validity flag is used to indicate whether the record is allowed to enter the subsequent parameter adjustment statistics; if a post-spray result fails to complete a unique match, only the pending status in the trigger table to be associated is updated and the valid sample set in the status feedback data table is not written. The execution receipt output by the air valve drive module to the sorting feedback module is triggered in an event-driven manner: whenever a certain channel completes a jetting action, a receipt record containing at least a control identifier, channel identifier, trigger timestamp, drive sequence number and channel occupancy flag is generated and written to the pending trigger table. When the feedback imaging module outputs a post-spray target result, the sorting feedback module only searches within the same channel queue for trigger records that are pending matching between the window start timestamp and the window end timestamp. If a unique candidate is found, the trigger identifier corresponding to the candidate is written into the status feedback data table, and the pending status is changed to matched. If no candidate is found, the post-spray target result is set to unassociated result. If multiple candidates are found, one candidate is selected according to the aforementioned priority rules, while the remaining candidates are kept pending matching until the window times out. The parameter generation module does not continuously poll the entire feedback chain, but is triggered by an event to read the newly added records when the number of newly added valid records in the status feedback data table reaches the preset batch lower limit, or when a certain execution channel experiences a preset number of consecutive missed or false blows. When reading, at least the feature factor code, result flag, channel identifier, table version, and write cycle field are obtained to ensure that the subsequent interval boundary adjustment and basic timing compensation value adjustment have a clear data source and version correspondence.
[0023] For any part not mentioned in this invention, existing technologies can be used or referenced. Of course, the above description is not a limitation of this invention, and this invention is not limited to the examples given above. Any changes, modifications, additions or substitutions made by those skilled in the art within the scope of this invention should also be within the protection scope of this invention.
Claims
1. A real-time adaptive sorting system for chili peppers based on industrial vision, characterized in that, include: The status acquisition module collects background panel reflectance, dust obstruction index, light source temperature rise status, instantaneous air pressure of the storage tank, and the number of times each execution channel valve is triggered. The image acquisition module continuously images the falling chili pepper material flow to obtain an image stream, and calculates the initial falling velocity based on the displacement of adjacent frames of the same target; The feedback imaging module outputs the target trajectory offset and trough landing results after jet knockout; The parameter generation module generates a dynamic color lookup table based on the output of the status acquisition module, generates pressure compensation parameters based on the instantaneous air pressure of the gas storage tank and the preset standard air pressure, and updates the wind resistance coefficient table based on the execution result identifier. The image initial screening module performs color matching on the image stream according to a dynamic color lookup table to obtain a set of foreground pixels, and marks its connected components to generate candidate connected components; The target separation module performs contour curvature analysis and segmentation on candidate connected components to obtain independent chili pepper targets, and calculates their projected area, aspect ratio and color saturation variance. The air valve drive module contains multiple air jet execution channels and outputs air valve trigger timestamps and execution channel occupancy information; The execution control module generates a rejection control word containing the air valve trigger delay time and the jet pulse width based on the drag coefficient table, air pressure compensation parameters, initial descent velocity, remaining descent distance from the pre-calibrated identification position to the jet action position, and the projected area, aspect ratio, and color saturation variance, and sends it to the air valve drive module. The sorting feedback module generates an execution result identifier based on the output of the feedback imaging module and feeds it back to the parameter generation module, adjusting at least one of the drag coefficient table, air pressure compensation parameters, and dynamic color lookup table.
2. The chili pepper quality real-time adaptive sorting system based on industrial vision according to claim 1, characterized in that, The parameter generation module generates a dynamic color lookup table, including: during the system initialization phase, collecting the background panel reflectance as the background standard illuminance value and collecting the background panel standard color vector as the background panel color reference value; calculating the ratio of the background panel reflectance to the background standard illuminance value to obtain the illuminance retention coefficient. Determine whether the illuminance retention coefficient is less than or equal to a pre-calibrated illuminance attenuation threshold, or whether the dust obstruction index is greater than or equal to a pre-calibrated dust obstruction threshold; if so, correct the color threshold in the standard color space according to the background color reference value to generate the dynamic color lookup table; if not, maintain the current dynamic color lookup table.
3. The chili pepper quality real-time adaptive sorting system based on industrial vision according to claim 1, characterized in that, The target separation module performs contour curvature analysis and segmentation on the candidate connected regions, including: extracting the contour curves of the candidate connected regions and calculating the centroid and aspect ratio of the candidate connected regions; Calculate the discrete curvature sequence on the contour curve; In the discrete curvature sequence, select extreme points whose curvature values are greater than or equal to a pre-calibrated curvature threshold, whose radial distance relative to the centroid is locally minimal relative to adjacent contour points, and whose curvature concavity points towards the interior of the connected domain, to form a set of concave extreme points; For two concave extreme points whose Euclidean distance between the midpoints of the set of concave extreme points satisfies a preset distance constraint, a segmentation score is determined. Determine whether the segmentation score is greater than or equal to a pre-defined segmentation threshold; If so, the candidate connected region is segmented along the line connecting the two concave extreme points to separate the independent chili pepper target.
4. The chili pepper quality real-time adaptive sorting system based on industrial vision according to claim 3, characterized in that, The segmentation score is determined based on the average concavity depth of the region corresponding to the line connecting the two concave extreme points, the Euclidean distance between the two concave extreme points, the curvature values of the two concave extreme points, and the relationship between the aspect ratio of the candidate connected region and the pre-calibrated reference value of the aspect ratio of a standard single chili pepper.
5. The chili pepper quality real-time adaptive sorting system based on industrial vision according to claim 1, characterized in that, The execution control module generates a rejection control word, including: determining the equivalent diameter based on the projected area; determining the wind resistance characteristic factor based on the equivalent diameter, the aspect ratio, and the color saturation variance; determining the corresponding rejection priority and basic timing compensation value based on the mapping interval of the wind resistance characteristic factor in the wind resistance coefficient table; and generating the rejection control word based on the basic timing compensation value, the initial descent velocity, and the air pressure compensation parameter.
6. The chili pepper quality real-time adaptive sorting system based on industrial vision according to claim 5, characterized in that, Generating the rejection control word includes: calculating the base arrival time based on the initial falling velocity and the remaining falling distance. The pressure deviation is determined based on the preset standard pressure and the instantaneous pressure of the gas storage tank; the early trigger compensation is determined based on the pressure deviation and the cumulative value of the number of times the gas valves of each execution channel corresponding to the current execution channel are triggered. Read the pre-calibrated system response delay. and the aforementioned basic timing compensation value ;according to , , and Determine the valve trigger delay time.
7. The chili pepper quality real-time adaptive sorting system based on industrial vision according to claim 6, characterized in that, Generating the rejection control word further includes: reading a pre-calibrated base jet pulse width. and the upper limit of safe pulse width The pulse width compensation amount is determined based on the rejection priority, the air pressure deviation, the number of times the air valves in each execution channel are triggered, and the compensation weight corresponding to each input variable. Based on the aforementioned basic jet pulse width and the pulse width compensation amount Determine the target jet pulse width; the jet pulse width is the sum of the target jet pulse width and the upper limit of the safe pulse width. The smaller value in the range.
8. The chili pepper quality real-time adaptive sorting system based on industrial vision according to claim 5, characterized in that, The sorting feedback module generates and feeds back the execution result identifier, including: obtaining the valve trigger timestamp and execution channel occupancy information of the valve drive module; The valve trigger timestamp is associated with the trough drop result based on the same execution channel and preset time window, and execution result identifiers including hit, missed blow and false blow status are generated based on the time correspondence, channel correspondence and preset judgment conditions of the target trough drop position. Write the execution result identifier into a preset status feedback data table; The status feedback data table is sent to the parameter generation module, which triggers the parameter generation module to adjust the interval boundaries corresponding to the drag characteristic factors in the drag coefficient table, or to adjust the basic time series compensation values corresponding to each interval.
