A method for identifying primordia of Agaricus bisporus in a factory

CN122244854BActive Publication Date: 2026-08-07SHANGHAI ACAD OF AGRI SCI
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI ACAD OF AGRI SCI
Filing Date
2026-03-31
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0003]现有方法多依赖人工巡检或基于单帧图像的形态识别方式,对培养床表面已经形成明显突起或色差变化的区域进行识别;然而,在原基形成的早期阶段,培养床表面仅表现为局部微尺度灰度扰动和细粒结构重排,这类变化在单一时刻下难以与覆土颗粒阴影、水分分布不均或光照反射差异进行区分

Benefits of technology

(1)通过对培养床表面图像进行连续时序采集并建立统一的微区划分体系,使同一空间位置在不同时间下形成可对应的连续数据结构,从而将原本分散的图像信息转化为可追踪的微区时序数据,为后续识别过程提供稳定的数据基础,对应解决了现有方法中因图像位置不一致或缺乏连续对应关系而难以进行演化分析的问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122244854B_ABST
    Figure CN122244854B_ABST
Patent Text Reader

Abstract

The application discloses a kind of factory Agaricus bisporus primordium identification methods, it is related to edible mushroom factory cultivation technical field, by continuous time series acquisition to culture bed surface image and establish unified micro area division system, make the same spatial position form corresponding continuous data structure under different time, to convert the originally dispersed image information into traceable micro area time series data, provide stable data basis for subsequent identification process, corresponding solve the problem that evolution analysis is difficult in existing method because of image position inconsistency or lack of continuous corresponding relationship.Through introducing position alignment processing in image preprocessing stage, make each time image uniform to the same spatial reference system, avoid the position error caused by slight deviation of camera equipment or the change of collection angle, so as to ensure that the data of the same micro area in time dimension has consistency, so that gray change can truly reflect the change of culture bed surface structure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrialized cultivation technology of edible fungi, specifically a method for identifying the primordia of Agaricus bisporus in industrialized cultivation. Background Technology

[0002] With the application of environmental control systems and automated production lines, the production of button mushrooms has gradually shifted from traditional experience-based management to data-driven process monitoring and control. When this field is further subdivided into growth process monitoring technologies, the identification of the state from the soil covering stage to the primordia formation stage has gradually become an important link affecting the consistency of subsequent fruiting and yield distribution. In this specific direction, there is a correlation between changes in the micro-region structure of the culture bed surface and primordia germination. Therefore, continuous observation and discrimination of the gray-scale changes of the micro-regions on the culture bed surface has become a technical path for achieving primordia identification.

[0003] Existing methods mostly rely on manual inspection or morphological recognition based on single-frame images to identify areas on the culture bed surface that have formed obvious protrusions or color differences. However, in the early stages of primordia formation, the culture bed surface only shows local microscale gray-scale disturbances and fine-grained structure rearrangement. Such changes are difficult to distinguish from the shadows of the covering soil particles, uneven moisture distribution, or differences in light reflection at a single moment.

[0004] In actual production, due to factors such as fluctuations in moisture on the surface of the cultivation bed, slight changes in light, and slow adjustments in the soil covering structure, the grayscale distribution in the image will show an overall disturbance that changes over time. When there is a lack of continuous analysis in the time direction, such overall changes are easily mixed with local germination precursor changes, resulting in some areas being repeatedly judged or missed. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a method for identifying button mushroom primordia in industrial production, thus solving the problems mentioned in the background section.

[0006] To achieve the above objectives, the present invention provides a method for identifying primordia of Agaricus bisporus produced in a factory, comprising the following steps: S1. Collect surface image sequences of the mushroom cultivation bed at continuous time points, divide it into several micro-regions, extract gray-level statistical values ​​HG, gray-level median HM, edge undulation values ​​HE and neighborhood control values ​​HN, and fit them into a micro-region time series basic data table. S2. Based on the micro-region time series basic data table, rearrange the grayscale data of each micro-region unit at continuous time, and perform background stripping processing by combining the grayscale value of the neighboring ring and the grayscale median value to obtain the micro-region net grayscale disturbance amount swD corresponding to each micro-region unit that reflects the local subtle structural changes. S3. Perform time-direction differential expansion processing on the net grayscale disturbance amount swD of the micro-region to obtain the first-order disturbance displacement Va, second-order bending amount Vb and continuous occupancy degree Vc of each micro-region unit at continuous time. Based on the continuous occupancy degree Vc of the first-order disturbance displacement Va, the variation range of the second-order bending amount Vb and the variation trend of the continuous occupancy degree Vc, identify the predecessor candidate nodes of each micro-region unit that transform from random disturbance to directional migration. S4. Based on the candidate precursor nodes, and combining the edge undulation changes and neighborhood cooperative changes of each micro-region unit, construct the germination precursor value uP, which includes the edge convergence ratio uR and the neighborhood co-occurrence rate uL. Perform precursor state determination on each micro-region unit and generate the corresponding primordial precursor region set. S5. Perform temporal continuity verification and spatial connectivity analysis on the set of primordium precursor regions, calculate the precursor persistence wS and contiguous germination index wA of each microregion, map the microregion units to the spatial location and time axis of the culture bed, output the primordium precursor distribution results, and generate corresponding environmental control instructions based on the contiguous germination index wA.

[0007] Preferably, S1 includes S11 and S12; S11. Read the image sequence formed on the surface of the mushroom cultivation bed at continuous times according to the existing visual acquisition cycle, and arrange the images at each time according to the order of acquisition to form a time sequence image group of the cultivation bed surface. Using the first frame as the baseline and reference image, position alignment processing is performed on subsequent frames to ensure that the same culture bed surface area maintains a corresponding relationship in different time slices. After alignment, the image is divided into grids based on a uniform window size, dividing the culture bed surface into multiple fixed micro-units and assigning each micro-unit a unique number; so that each micro-unit corresponds to the same spatial position throughout the entire acquisition cycle; finally, the pixel range, center coordinates and adjacent ring range of each micro-unit at each time point are recorded.

[0008] Preferably, in step S12, feature extraction is performed on each micro-region unit, including gray-level statistical value HG, gray-level median value HM, edge undulation value HE, and neighborhood control value HN; Extract all pixel grayscale values ​​within a micro-unit and calculate the grayscale statistical value HG of the micro-unit; The grayscale statistical value HG(k,t) of the kth micro-region at time t is obtained by reading out the grayscale values ​​of all pixels in the micro-region unit one by one, and then summing them up to obtain the total grayscale value of the micro-region unit; then, the total number of pixels in the micro-region unit is counted, and the total grayscale value obtained is averaged using this total number of pixels. The pixel grayscale values ​​within the same micro-region are sorted according to their size, and the value at the middle position is extracted as the grayscale median value HM. The edge undulation value HE(k,t) of the k-th micro-region at time t is obtained as follows: First, select all combinations of adjacent pixels within the micro-region unit, such as horizontally adjacent, vertically adjacent, or diagonally adjacent pixel pairs; then, for each pair of adjacent pixels, calculate the grayscale difference and take the absolute value to represent the brightness change amplitude between the two pixels; next, sum up all such change amplitudes of all adjacent pixel pairs in the micro-region unit; finally, average the results using the total number of adjacent pixel pairs involved in the calculation. If the HE value is too high, it indicates the presence of numerous discontinuous gray-scale boundaries within the region, commonly seen in situations with complex topsoil particle interfaces, numerous small shadows, or scattered local surface undulations. If the HE value shows organized changes over time, it can be used as an auxiliary quantity for subsequent determination of primordium precursor inflection. Its usage is to provide raw input for subsequent construction of edge convergence ratios. The method for obtaining the neighborhood reference value HN(k,t) of the k-th micro-region at time t is as follows: determine the neighborhood region surrounding the micro-region unit at the same time; then accumulate all the gray values ​​of all pixels in the neighborhood region; next, count the total number of pixels in the neighborhood region; finally, divide the total accumulated gray value by the total number of pixels to obtain an average value. The acquired grayscale statistical value HG, grayscale median value HM, edge undulation value HE, neighborhood control value HN, micro-area unit number, and time number are sequentially written into a data table to form a micro-area time series basic data table.

[0009] Preferably, S2 includes S21 and S22; S21. Using the micro-area unit number as the primary key, rearrange the micro-area time series basic data table, and reorganize the data originally recorded according to "collection time - micro-area number" into a data structure organized according to "micro-area number - continuous time sequence". For each micro-region, the corresponding gray-level statistical value HG, gray-level median value HM, and human neighbor comparison value HN are extracted sequentially at consecutive time points and arranged in chronological order to form a continuous gray-level trajectory specific to the micro-region. Based on this, the sequence of records with missing moments, abnormal jump moments, or inconsistent acquisition intervals is corrected so that the grayscale data of the same micro-unit at consecutive moments have a directly comparable relationship; and grayscale time series groups are obtained.

[0010] After this processing, each micro-region is no longer just an independent record at a certain moment, but is organized into a sequence that can reflect the changes in its local surface state over time. Preferably, in step S22, background stripping is performed on each time step of the grayscale time series group of each micro-region unit, specifically as follows: Read the grayscale statistical value HG of any micro-region unit at any time as the overall brightness level of the micro-region unit at the current time; then read the grayscale median value HM and the neighborhood comparison value HN at the same time to characterize the average brightness level of the background area surrounding the micro-region. Then, the offset of the gray level of the micro-area unit itself relative to its median distribution is compared with the offset of the neighboring background relative to the median distribution. The overall lighting fluctuation, global brightness swing caused by slight lens shift, and slow uniform change of the soil surface that simultaneously affect the entire image are separated from the original gray level changes. The independent change of the micro-area unit relative to the surrounding background is retained to obtain the net gray level disturbance amount swD of the micro-area. The formula for obtaining the net grayscale disturbance amount swD in the micro-area is: swD(k,t)=(HG(k,t)-HM(k,t))-(HN(k,t)-HM(k,t)); In the formula, swD(k,t) represents the net gray level disturbance of the k-th micro-region at time t, and HM(k,t) represents the median gray level of the k-th micro-region at time t.

[0011] Based on the calculation results, if swD(k,t) is close to zero, it indicates that the current grayscale change of the micro-region is relatively consistent with the change of the surrounding background. In most cases, it is a synchronous change caused by the fluctuation of the overall lighting, slight image shift, or slow change of the soil background. If swD(k,t) continuously deviates from zero and shows a directional continuous change at adjacent time points, it indicates that there is a local grayscale perturbation in the micro-region that is independent of the surrounding background. This type of perturbation is more suitable as an input for subsequent identification of primordium germination precursors. Preferably, S3 includes S31 and S32; S31. Based on the net gray disturbance amount swD of the micro-area, arrange them continuously according to the time sequence under the same micro-area number. For the change process of the net gray disturbance amount swD of each micro-area unit at adjacent time, calculate the disturbance difference between two adjacent time and obtain the first-order disturbance displacement amount Va. The formula for obtaining the first-order disturbance displacement Va is: Va(k,t) = swD(k,t) - swD(k,t-1). In the formula, Va(k,t) represents the first-order perturbation displacement of the k-th micro-region at time t, and swD(k,t-1) represents the net gray perturbation of the k-th micro-region at time t-1. Based on the first-order disturbance displacement Va, a second-order difference processing is performed on the first-order disturbance displacement at adjacent time points to characterize the degree of back-and-forth, swing-back or turning of the net gray-scale disturbance trajectory of the micro-area during the time progression, and to obtain the second-order bending amount Vb. The formula for obtaining the second-order bending amount Vb is: Vb(k,t) = |Va(k,t) - Va(k,t-1)|; In the formula, Vb(k,t) represents the second-order bending amount of the k-th microregion at time t, and Va(k,t-1) represents the first-order disturbance displacement of the k-th microregion at time t-1. Within a continuous observation time window, the first-order disturbance displacement Va of the same micro-region at multiple consecutive times is statistically analyzed in the same direction. The proportion of net gray disturbance in the time window is extracted to determine whether it continues to advance in the same direction, and the continuous occality Vc is obtained. The continuous occupancy degree Vc in the same direction is obtained by the following formula: In the formula, Vc(k,t) represents the continuous occupancy degree of the k-th micro-region at time t, r represents the length of the continuous observation time window, and Va(k,u) represents the first-order perturbation displacement of the k-th micro-region at time u.

[0012] The results indicate whether the net grayscale disturbance displacement of the micro-area mostly advances in the same direction within the most recent t time intervals. If Vc(k,t) is close to 1, it means that the displacement during this period basically continues to advance in the same direction; if Vc(k,t) is close to 0, it means that although there is displacement, the positive and negative changes cancel each other out, and the overall movement is still mainly random oscillation. Preferably, in step S32, a joint time series analysis is performed on the first-order disturbance displacement Va, the second-order bending amount Vb, and the continuous occupancy degree Vc at the same time. Check whether the first-order perturbation displacement Va of the micro-cell remains in the same sign or in the same direction at multiple consecutive times, and determine whether the micro-cell net gray perturbation swD has gotten rid of the scattered fluctuations of frequent alternation between positive and negative. For the first-order perturbation displacement Va, a continuous unidirectional relation Yr(k,t) can be constructed to describe whether the first-order perturbation displacement of the k-th micro-region maintains a predominantly unidirectional direction over several consecutive time intervals before and after the current time. Let the continuous check length be m, then it can be written as: In the formula, δ represents the discriminant function, which takes the value 1 when the condition in parentheses is true and 0 when it is false; Yr(k,t) represents the continuous unidirectional relation quantity of the k-th microregion at time t. This indicates that the first-order perturbation displacements at two adjacent moments have the same sign. The result indicates how many times the first-order perturbation displacement between adjacent time points remained in the same direction within the most recent m time points. A higher value indicates that the perturbation propagation direction in the micro-region is beginning to converge; a lower value indicates that repeated oscillations are still dominant. It is used as the first conditional quantity for screening precursor candidate nodes. To further characterize the state transition from random perturbation to directional migration, a bending convergence quantity Zc(k,t) is constructed to describe the decreasing state of the second-order bending quantity Vb in the most recent consecutive moments; assuming the consecutive observation length is n, it can be written as: In the formula, Zc(k,t) represents the bending convergence of the k-th microregion at time t, n represents the number of consecutive observation times, Vb(k,s) represents the second-order bending of the k-th microregion at time s, and Vb(k,s-1) represents the second-order bending of the k-th microregion at time s-1. By combining the changing trend of the continuous occupancy in the same direction, we can determine whether the degree of directional consistency of the micro-cells gradually increases within the most recent continuous time window. For continuous occupancy in the same direction, its rising state at consecutive time points is read; for this purpose, the occupancy boost Ts(k,t) is constructed: Ts(k,t) = Vc(k,t) - Vc(k,t-1). In the formula, Vc(k, t-1) represents the continuous occupancy degree of the k-th micro-region at time t-1; When all three conditions occur simultaneously in the same micro-region and within the same time period, the corresponding time is marked as a precursor candidate node for the transformation of the micro-region unit from random disturbance to directional migration, and the node is written into the candidate node record table.

[0013] When a micro-region exhibits the following characteristics at consecutive times: the first-order disturbance displacement direction remains consistent, the second-order bending amount gradually converges, and the continuous occupancy degree in the same direction is increasing and has entered the preset interval, it is considered that the moment has met the precursor conditions for turning from random disturbance to directional displacement, and the moment is marked as a precursor candidate node. Preferably, S4 includes S41 and S42; S41. Taking the micro-region unit corresponding to the preceding candidate node as the processing object, for each candidate micro-region unit, read the edge fluctuation value HE of the micro-region unit at the current time and the previous time, analyze whether the fluctuation state of the gray-scale interface on the surface of the micro-region gradually changes from discrete and messy edge changes to a more concentrated edge change state, and extract the edge convergence ratio uR. The edge convergence ratio uR is obtained using the following formula: In the formula, uR(k,t) represents the edge convergence ratio of the k-th microregion at time t, and HE(k,t-1) represents the edge undulation value of the k-th microregion at time t-1. After obtaining the edge convergence ratio uR, the first-order perturbation displacement Va of the adjacent micro-regions at the same time is read with the candidate micro-region as the center. It is then determined whether the adjacent micro-regions and the current candidate micro-regions maintain the same direction relationship in the direction of net grayscale perturbation advancement, and the proportion of the same direction relationship in the entire neighborhood is counted to obtain the neighborhood same direction association rate uL. The neighborhood co-occurrence rate uL is obtained using the following formula: In the formula, uL(k,t) represents the neighborhood co-occurrence rate of the k-th micro-region at time t, Va(j,t) represents the first-order perturbation displacement of the j-th micro-region in the neighborhood at time t, Ωk represents the set of neighborhood micro-regions of the k-th micro-region, and |Ωk| represents the total number of neighborhood micro-regions.

[0014] Preferably, S42, based on the edge convergence ratio uR and the neighborhood co-directional association rate uL, the micro-area net gray perturbation amount swD, the second-order bending amount Vb and the continuous co-directional occulation degree are combined and calculated to construct a germination precursor value uP that can simultaneously reflect the local perturbation amplitude, directional occulation relationship, edge convergence degree, neighborhood cooperative relationship and trajectory reversal state. The germination precursor value uP is obtained using the following formula: In the formula, uP(k,t) represents the germination precursor value of the k-th microregion at time t; First, read the independent perturbation amount of the microregion at the current moment after background stripping to see if there is a significant local perturbation. Then, read the unidirectional occupancy of the perturbation in the most recent consecutive time to see if the perturbation continues to advance in one direction. Next, superimpose the edge convergence and neighborhood unidirectional accompaniment relationships to see if the microregion's own edges begin to converge and if surrounding microregions are also changing synchronously in the same direction. Finally, use second-order bending to constrain the previous combined results, because if the trajectory reversal is still very strong, even if there is a short-term directional shift, it is not suitable as a basis for determining the precursor. After this combination, the larger the uP obtained, the closer the microregion is to the local state before primordium germination; the smaller the uP, the closer the microregion is to ordinary background fluctuations. After obtaining uP, it needs to be compared with the normal range in historical culture batches. The normal range here is not directly taken as a single fixed threshold. Instead, we first select micro-region samples of the normal stage "without primordium germination precursors" from historical culture batches, extract the germination precursor values ​​uP obtained from these samples under the same processing procedure, and form a historical normal distribution. Then, we read two boundary positions from this distribution, which are recorded as Q1 and Q2, respectively, as the interval boundaries for the current batch. After obtaining the germination precursor value uP, the normal range data from historical culture batches are read, and the current microregion's uP is compared with the normal range. Based on the comparison results, the microregion is divided into three states: normal fluctuation zone, precursor observation zone, and precursor concentration zone. The division method is as follows: In the formula, St(k,t) represents the precursor state identifier of the k-th micro-region at time t, Q1 represents the boundary value between the upper edge of the normal interval and the lower edge of the transition interval, and Q2 represents the boundary value between the upper edge of the transition interval and the lower edge of the concentration interval; when St(k,t)=0, it represents the normal fluctuation region; when St(k,t)=1, it represents the precursor observation region; when St(k,t)=2, it represents the precursor concentration region. All germination precursor values ​​uP are integrated to obtain an ordered sequence of germination precursor values ​​in the historical normal interval; Read its quantile values ​​at different positions as the basis for interval division; Specifically, first determine a relatively high quantile as the "boundary value between the upper edge of the normal interval and the lower edge of the transition interval," then determine an even higher quantile as the "boundary value between the upper edge of the transition interval and the lower edge of the concentration interval." In practical processing, positions slightly above or above the midpoint of the sequence can be selected as boundary points; for example, reading the position located at the midpoint of the sequence... 0.6M The value at position Q1 is used to read the value at position i in the sequence. 0.85M The value at each position is taken as Q2; First, uP is calculated for each candidate microregion, and then the state is mapped according to the historical normal range. When the microregion state is 0, it means that the normal monitoring is maintained for the time being. When the state is 1, it means that the microregion has deviated from the normal fluctuation and needs to be closely observed. When the state is 2, it means that the microregion has relatively complete precursor characteristics at the current moment and can be used as the main component of the primordium precursor region. Finally, micro-units located in the precursor observation area and the precursor concentration area, and which satisfy the spatial adjacency relationship, are merged to obtain the set of primordial precursor regions.

[0015] Preferably, S5 includes S51 and S52; S51. Taking each micro-region unit in the set of primordial precursor regions as a continuous verification object, for each micro-region unit, read the corresponding germination precursor value uP and precursor state identifier St of the micro-region at several consecutive moments along the time axis, check whether the micro-region unit continues to remain in the precursor observation area or precursor concentration area in the subsequent time period, so as to determine whether the current precursor state of the micro-region unit is a short-term jump or a continuous precursor state. After completing the time continuity verification, with the micro-unit as the center, read the other predecessor micro-units that are connected in space at the current time, count the number of connected predecessor micro-units, the range of connections and the level of connection, and calculate and obtain the predecessor persistence wS and the contiguous germination index wA. The formula for obtaining the precursor duration wS is: In the formula, wS(k,t) represents the precursor persistence of the k-th microregion at time t, q represents the length of the continuous verification time window, uP(k,v) represents the germination precursor value of the k-th microregion at time v, and uP(k,v-1) represents the germination precursor value of the k-th microregion at time v-1. The result indicates whether a microregion continues to maintain a precursor state after the current starting time. If wS(k,t) is high, it indicates that the microregion continues to maintain a precursor state for a period of time afterward, and there is no obvious break between adjacent time points; if wS(k,t) is low, it indicates that the microregion is more likely to be a short-term jump or intermittent perturbation. It is used as one of the screening conditions for subsequent spatial mapping to distinguish between "continuous precursor microregions" and "short-term precursor microregions".

[0016] The formula for obtaining the germination index wA is: In the formula, Φ(k,t) represents the set of predecessor microregions that are spatially connected to the k-th microregion at time t; The results indicate that this microregion not only maintains its precursor state in time, but also begins to form a contiguous relationship with surrounding precursor microregions in space. There are two methods for its application: Firstly, it is used as a screening metric when subsequently mapped to the spatial location of the culture bed; Secondly, it serves as the core basis for the tiered issuance of environmental control directives; S52. Based on the fixed grid position of each micro-region unit in the culture bed image, the micro-region units that satisfy the precursor persistence wS and the continuous germination index wA are mapped back to the culture bed plane coordinates to form a spatial distribution map of the primordium precursor region. After completing the spatial mapping, the time number corresponding to each micro-region unit and the verification start time are written into the time axis record to form the time distribution trajectory of the primordium precursor region. Based on the interval of the contiguous germination index wA corresponding to each micro-region or contiguous area, an environmental control instruction corresponding to that interval is generated, and the spatial location, time marker, and environmental control instruction are written into the output result. The specific method is as follows: Based on the continuous germination index wA, the environmental control instructions are generated and the continuous germination index is divided into low interval, medium interval and high interval; for each mapped output micro-region or continuous region wA, interval determination is performed to obtain the control category identifier CT; The control category identifier for CT is obtained as follows: In the formula, CT(k,t) represents the control category identifier of the k-th micro-region at time t, E1 represents the boundary value between the low interval and the middle interval, and E2 represents the boundary value between the middle interval and the high interval. The acquisition methods for E1 and E2 are as follows: First, complete growth cycle data are selected from historical culture batches and divided into three stages according to the growth process: the first is the normal stage where no primordia precursors appear. Second, there are transitional sections where precursors have begun to appear but have not yet formed obvious contiguous areas; Third, there are already continuous and contiguous areas of the precursor concentration stage; Subsequently, the same processing procedure as the current method is performed on the above three stages to obtain the contiguous germination index wA corresponding to each microregion at each time point; then, all wA data extracted from the three stages are summarized and sorted according to the numerical size to form a complete ordered sequence of contiguous germination indices. For ordered sequences, the corresponding quantile positions are extracted as interval boundaries by combining the proportion of the three stages in the overall data.

[0017] Specifically: First, we need to calculate the percentage of samples from the three historical periods: The proportion of samples during the normal phase is denoted as r1; The proportion of samples in the transition phase is denoted as r2; The proportion of samples in the contiguous phase is denoted as r3; The condition r1 + r2 + r3 = 1 is satisfied; subsequently, the dividing point is determined based on the cumulative percentage position. The boundary value E1 between the low and middle intervals is taken at the end of the normal phase: E1 = wA ( r1×Nr Nr represents the total number of samples; The boundary value E2 between the middle and high intervals is taken at the end of the transition phase: E2 = wA ( (r1+r2)×Nr ); When CT(k,t)=0, the area is marked as a reserved monitoring area, and only its spatial location and time information are recorded, without issuing environmental control actions; When CT(k,t)=1, the region is marked as the humidity rhythm fine-tuning zone, and a fine-tuning humidity rhythm command is issued to the culture bed zone where the region is located. When CT(k,t)=2, the region is marked as a key control area, and instructions are issued to shorten the ventilation interval and correct the surface moisture maintenance time for the culture bed zone where the region is located.

[0018] In the mapping process, a primordium precursor mapping identifier Mp(k,t) can be constructed first to filter microregions that meet the output conditions; if the lower limit for precursor persistence is D1 and the lower limit for contiguous germination index is D2, then it can be written as: Mp(k,t)=δ(wS(k,t)≥D1∧wA(k,t)≥D2); In the formula, D1 represents the lower bound of the mapping of precursor persistence; D2 represents the lower bound of the mapping of the contiguous germination index. All precursor persistence (wS) and clonal germination index (wA) were fitted to obtain the precursor persistence sequence WWS and the clonal germination index sequence WWA. For the predecessor persistence sequence WWS, the value at the higher position in the sequence is taken as D1, for example, the value at the higher position is taken as D1. 0.7H Bit: D1=wS ( 0.7H ); For a contiguous germination index sequence WWA, the value at a higher position is taken as D2, for example, taking the first value... 0.85H Bit: D2=wA ( 0.85H ); where H represents the number of historical samples; This result indicates whether a micro-region meets the conditions for entering the final output result; the method of use is to first screen out the micro-regions that meet the mapping requirements, and then uniformly map these micro-regions to the culture bed plane position and time axis; For spatial mapping, the micro-region units with Mp(k,t)=1 can be written into the culture bed plane coordinate set according to their original grid positions; let the plane center coordinates corresponding to the k-th micro-region be (Xk,Yk), then the primordium precursor distribution result set at time t can be expressed as: Υt={(Xk,Yk,t,wA(k,t))|Mp(k,t)=1}; where Υt represents the primordium precursor distribution result set output at time t; The result means that the precursor microregions that meet the conditions are output in a unified manner in the form of "spatial location + time identifier + germination index"; it can be used to form a planar distribution map of the culture bed, or as a region call table in the subsequent control system.

[0019] This invention provides a method for identifying primordia buds in industrialized production, which has the following beneficial effects: (1) By continuously acquiring images of the culture bed surface and establishing a unified micro-region division system, the same spatial location can form a corresponding continuous data structure at different times, thereby transforming the originally scattered image information into traceable micro-region time-series data, providing a stable data foundation for the subsequent identification process, and solving the problem that evolutionary analysis is difficult to perform due to inconsistent image positions or lack of continuous correspondence in existing methods.

[0020] By introducing position alignment processing in the image preprocessing stage, images at all times are unified to the same spatial reference system, avoiding positional errors caused by slight offset of the camera equipment or changes in the acquisition angle. This ensures that the data of the same micro-area in the time dimension are consistent, so that grayscale changes can truly reflect the changes in the surface structure of the culture bed, rather than false changes caused by acquisition deviations.

[0021] (2) By sequentially correcting the missing moments, abnormal jumps, and inconsistent acquisition intervals of the data after temporal rearrangement, the gray-scale trajectory of the micro-area is made to maintain continuity and consistency on the time axis, thereby avoiding misjudgment caused by unstable acquisition or data discontinuity, and making subsequent change analysis based on continuous and comparable data. By introducing the gray-scale median value and the neighborhood control value, the gray-scale of the micro-area is subjected to background stripping processing, so that the overall illumination fluctuation, slight lens offset, and slow changes of the soil surface in the original gray-scale changes are separated out, and only the independent change part of the micro-area relative to the surrounding environment is retained, so that the identification basis is no longer affected by the overall environmental fluctuation, and the interference of background changes on the identification results is reduced accordingly.

[0022] (3) By comparing the edge undulation changes of the same micro-region at adjacent times, edge convergence features are extracted, enabling the system to identify the process of transformation from loose granular structure to relatively concentrated structure. This process corresponds to the gradual aggregation trend of microstructure on the surface of the culture bed, thus providing a structural basis for judging whether it has entered the germination precursor stage.

[0023] By introducing the neighboring co-occurrence relationship, the change direction of the surrounding area of ​​the candidate microregion is statistically analyzed, so that the identification results not only reflect the changes of a single microregion, but also reflect whether the change has a spatial expansion trend. This avoids mistaking short-term changes of isolated microregions for germination signals, and makes the identification results more consistent with the actual characteristics of primordia in the culture bed, which usually exhibit regional development.

[0024] (4) By constructing a comprehensive index reflecting temporal persistence and spatial connectivity, the system can uniformly evaluate the precursor state from both temporal and spatial dimensions, thereby making the output results closer to the actual distribution characteristics of the gradual expansion of primordia in the culture bed. By classifying regions according to the degree of contiguous germination and corresponding different regions to different types of regulatory commands, the environmental regulation is transformed from the original overall unified approach to a hierarchical response approach based on regional states. This allows the regulatory actions to be differentiated for the growth process of different regions, avoiding the problem of inconsistent regional growth rhythms caused by unified regulation. Attached Figure Description

[0025] Figure 1 This is a schematic diagram illustrating the steps of a method for identifying button mushroom primordia in a factory setting according to the present invention. Figure 2 This is a flowchart of the precursor state determination process of the present invention; Figure 3 This is a schematic diagram of the micro-region feature extraction and basic data table construction process of the present invention. Detailed Implementation

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

[0027] Example 1 This invention provides a method for identifying primordia morpha in industrialized production. Please refer to [link / reference]. Figures 1 to 3 This includes the following steps: S1. Collect surface image sequences of the mushroom cultivation bed at continuous time points, divide it into several micro-regions, and extract the gray-level statistical value HG, gray-level median value HM, edge undulation value HE and neighborhood control value HN of each micro-region, and fit them into a micro-region time series basic data table. S2. Based on the micro-region time series basic data table, rearrange the grayscale data of each micro-region unit at continuous time, and perform background stripping processing by combining the grayscale value of the neighboring ring band and the grayscale median value to obtain the net grayscale disturbance amount swD of the micro-region. S3. Perform time-direction differential expansion processing on the net grayscale disturbance amount swD of the micro-region to obtain the first-order disturbance displacement Va, second-order bending amount Vb and continuous occupancy degree Vc of each micro-region unit at continuous time, and identify the predecessor candidate node of each micro-region unit that transforms from random disturbance to directional offset. S4. Based on the candidate precursor nodes, and combining the edge undulation changes and neighborhood cooperative changes of each micro-region unit, construct the germination precursor value uP, which includes the edge convergence ratio uR and the neighborhood co-occurrence rate uL. Perform precursor state determination on each micro-region unit and generate the corresponding primordial precursor region set. S5. Perform temporal continuity verification and spatial connectivity analysis on the set of primordium precursor regions, calculate the precursor persistence wS and contiguous germination index wA of each microregion, map the microregion units to the spatial location and time axis of the culture bed, output the primordium precursor distribution results, and generate corresponding environmental control instructions based on the contiguous germination index wA.

[0028] In this embodiment, by constructing a continuous judgment process based on micro-region grayscale perturbation sequence, without changing the existing acquisition hardware conditions, the original recognition method that relied on single-frame images or human experience is transformed into a comprehensive judgment method based on time series and spatial relationship. This allows for early identification of local area change trends before obvious morphological changes appear on the culture bed surface, thereby shifting the judgment point for primordia germination from the "visible protrusion stage" to the "microstructure perturbation stage," thus solving the problem of recognition lag in existing methods.

[0029] By introducing neighborhood comparison and median benchmark relationships into grayscale data processing, the overall lighting fluctuations, slight lens shifts, and slow changes in the soil background can be separated. This makes the identification process no longer directly dependent on a single grayscale value, but based on "local relative changes". Thus, even when there are uneven moisture distribution and differences in light reflection in the culture bed, it is still possible to distinguish micro-regions with independent changing characteristics, reducing misjudgments or duplicate judgments caused by overall environmental fluctuations.

[0030] By continuously unfolding the net grayscale disturbance over time, the originally static grayscale features are transformed into dynamic change trajectories. Combined with the persistence of the disturbance direction, the change reversal situation, and the continuous same-direction relationship, the turning point of the micro-region shifting from random fluctuation to stability is identified. This makes the identification results no longer dependent on the instantaneous features of a single moment, but based on the continuous change process, thus enabling the distinction between short-term abnormal fluctuations and precursor states with evolutionary trends.

[0031] Based on this, the relationship between edge undulation changes and neighborhood synergistic changes is introduced to further constrain candidate nodes, so that the identification results not only reflect the changes in a single micro-region, but also reflect the spatial expansion trend of the changes. This avoids mistaking isolated local disturbances for primordium germination areas, making the identification results more consistent with the actual regional growth characteristics of the culture bed.

[0032] Finally, the identification results are mapped to the spatial location and time axis of the culture bed, and different control intervals are divided according to the contiguous germination index. This means that environmental control no longer adopts a unified overall strategy, but rather is divided into regions based on the growth status of different areas. This establishes a correspondence between the control actions and the actual growth process, reducing the problem of inconsistent growth rhythms caused by the lag in control timing or the failure to identify regional differences.

[0033] Example 2 Please refer to Figure 3 Specifically: S1 includes S11 and S12; S11. Read the image sequence formed on the surface of the mushroom cultivation bed at continuous times according to the existing visual acquisition cycle, and arrange the images at each time according to the order of acquisition to form a time sequence image group of the cultivation bed surface. Using the first frame as the base frame and as the reference image, position alignment processing is performed on subsequent frames. After alignment, the image is divided into grids according to a uniform window size, dividing the culture bed surface into multiple micro-units with fixed positions, and assigning a unique number to each micro-unit. Finally, the pixel range, center coordinates, and adjacent ring range of each micro-region unit at each time point are recorded.

[0034] S12. Extract features for each micro-region unit, including gray-level statistical value HG, gray-level median value HM, edge undulation value HE, and neighborhood control value HN; Extract all pixel grayscale values ​​within a micro-unit and calculate the grayscale statistical value HG of the micro-unit; The grayscale statistical value HG(k,t) of the kth micro-region at time t is obtained by reading out the grayscale values ​​of all pixels in the micro-region unit one by one, and then summing them up to obtain the total grayscale value of the micro-region unit; then, the total number of pixels in the micro-region unit is counted, and the total grayscale value obtained is averaged using this total number of pixels. The pixel grayscale values ​​within the same micro-region are sorted according to their size, and the value at the middle position is extracted as the grayscale median value HM. The edge undulation value HE(k,t) of the kth micro-region at time t is obtained as follows: First, select all combinations of adjacent pixels within the micro-region unit. Then, for each pair of adjacent pixels, calculate the grayscale difference and take the absolute value. Next, sum up all the variation amplitudes of all adjacent pixel pairs in the micro-region unit. Finally, average the total number of adjacent pixel pairs involved in the calculation. The neighborhood reference value HN(k,t) of the k-th micro-region at time t is obtained as follows: at the same time as the micro-region unit, determine a ring of neighborhood regions surrounding the micro-region unit; then, accumulate all the gray values ​​of all pixels in the neighborhood region; next, count the total number of pixels in the neighborhood region; finally, divide the total accumulated gray value by the total number of pixels to obtain an average value. The acquired grayscale statistical value HG, grayscale median value HM, edge undulation value HE, neighborhood control value HN, micro-area unit number, and time number are sequentially written into a data table to form a micro-area time series basic data table.

[0035] In this embodiment, by continuously acquiring images of the culture bed surface and establishing a unified micro-region division system, the same spatial location can form a corresponding continuous data structure at different times. This transforms the originally scattered image information into traceable micro-region temporal data, providing a stable data foundation for the subsequent identification process. This solves the problem in existing methods where evolutionary analysis is difficult due to inconsistent image positions or lack of continuous correspondence.

[0036] By introducing position alignment processing in the image preprocessing stage, images at all times are unified to the same spatial reference system, avoiding positional errors caused by slight offset of the camera equipment or changes in the acquisition angle. This ensures that the data of the same micro-area in the time dimension are consistent, so that grayscale changes can truly reflect the changes in the surface structure of the culture bed, rather than false changes caused by acquisition deviations.

[0037] By dividing the surface of the culture bed into a grid with fixed windows and assigning a unique number to each micro-region unit, the entire culture bed is divided into multiple independently analyzable local units. This transforms the overall observation into a detailed local analysis, enabling the capture of local changes in the early stage of primordium germination at the microscale, thus overcoming the shortcomings of existing methods that can only identify larger-scale morphological changes.

[0038] In terms of feature extraction, by simultaneously introducing gray-level statistical values, gray-level median values, edge undulation values, and neighborhood comparison values, the brightness distribution, gray-level structure center, surface undulations, and surrounding background state of the micro-region are described in multiple dimensions. This allows each micro-region to not only have single brightness and darkness information, but also structural features and environmental reference information, thus providing a basis for distinguishing local real changes from overall environmental changes.

[0039] By constructing a time-series data table containing micro-region numbers and time numbers, multiple features of each micro-region at different times are stored in a unified manner, enabling the data to have temporal continuity and spatial location, providing direct input conditions for subsequent change analysis based on time difference, thereby enabling the identification process to shift from static judgment to dynamic evolution analysis.

[0040] Example 3 Please refer to Figure 3 Specifically: S2 includes S21 and S22; S21. Using the micro-area unit number as the primary key, rearrange the micro-area time series basic data table, and reorganize the data originally recorded according to "collection time - micro-area number" into a data structure recorded according to "micro-area number - continuous time sequence". For each micro-region, the corresponding gray-level statistical value HG, gray-level median value HM, and human neighbor comparison value HN are extracted sequentially at consecutive time points and arranged in chronological order to form a continuous gray-level trajectory specific to the micro-region. Based on this, the sequence of records with missing moments, abnormal jump moments, or inconsistent acquisition intervals is corrected to obtain grayscale time series groups.

[0041] S22. Perform background stripping processing on a time-by-time basis for the grayscale time series of each micro-region unit, specifically as follows: Read the grayscale statistical value HG of any micro-unit at any time, as the overall brightness level of the micro-unit at the current time; then read the grayscale median value HM and the neighborhood comparison value HN at the same time. The offset of the gray level of the micro-area unit relative to its median distribution is compared with the offset of the neighboring background relative to the median distribution. The overall lighting fluctuation, global brightness swing caused by slight lens shift, and slow uniform change of the soil surface that simultaneously affect the entire image are separated from the original gray level changes. The independent change of the micro-area unit relative to the surrounding background is retained to obtain the net gray level perturbation amount swD of the micro-area. The formula for obtaining the net grayscale disturbance amount swD in the micro-area is: swD(k,t)=(HG(k,t)-HM(k,t))-(HN(k,t)-HM(k,t)); In the formula, swD(k,t) represents the net gray level disturbance of the k-th micro-region at time t, and HM(k,t) represents the median gray level of the k-th micro-region at time t.

[0042] S3 includes S31 and S32; S31. Based on the net gray disturbance amount swD of the micro-area, arrange them continuously according to the time sequence under the same micro-area number. For the change process of the net gray disturbance amount swD of each micro-area unit at adjacent time, calculate the disturbance difference between two adjacent time and obtain the first-order disturbance displacement amount Va. The formula for obtaining the first-order disturbance displacement Va is: Va(k,t) = swD(k,t) - swD(k,t-1). In the formula, Va(k,t) represents the first-order perturbation displacement of the k-th micro-region at time t, and swD(k,t-1) represents the net gray perturbation of the k-th micro-region at time t-1. Based on the first-order disturbance displacement Va, the first-order disturbance displacement at adjacent time points is subjected to a second-order difference processing to obtain the second-order bending amount Vb. The formula for obtaining the second-order bending amount Vb is: Vb(k,t) = |Va(k,t) - Va(k,t-1)|; In the formula, Vb(k,t) represents the second-order bending amount of the k-th microregion at time t, and Va(k,t-1) represents the first-order disturbance displacement of the k-th microregion at time t-1. Within the continuous examination time window, the first-order disturbance displacement Va of the same micro-region at multiple consecutive times is statistically analyzed in the same direction to obtain the continuous occence in the same direction. The continuous occupancy degree Vc in the same direction is obtained by the following formula: In the formula, Vc(k,t) represents the continuous occupancy degree of the k-th micro-region at time t, r represents the length of the continuous observation time window, and Va(k,u) represents the first-order perturbation displacement of the k-th micro-region at time u.

[0043] S32. Perform joint time series analysis on the first-order disturbance displacement Va, second-order bending Vb, and continuous occence in the same direction at the same time. Check whether the first-order perturbation displacement Va of the micro-cell remains in the same sign or in the same direction at multiple consecutive times, and determine whether the micro-cell net gray perturbation swD has gotten rid of the scattered fluctuations of frequent alternation between positive and negative. Check whether the second-order bending amount Vb gradually enters the low range from the high fluctuation range, and determine whether the disturbance trajectory of the micro-area unit begins to change from a random state with many turns to a smooth directional advancement state; By combining the changing trend of the continuous occupancy in the same direction, we can determine whether the degree of directional consistency of the micro-cells gradually increases within the most recent continuous time window. When all three conditions occur simultaneously in the same micro-region and within the same time period, the corresponding time is marked as a precursor candidate node for the transformation of the micro-region unit from random disturbance to directional migration, and the node is written into the candidate node record table.

[0044] In this embodiment, during the processing of micro-region time series basic data, the data structure is rearranged to reorganize the micro-region data that was originally scattered in different time slices into a grayscale trajectory of "same micro-region - continuous time". This enables each micro-region to form a continuous evolution sequence in the time dimension, thereby transforming the identification process from single-frame static analysis to continuous change analysis. This solves the problem of lack of time correlation and difficulty in characterizing the evolution process in existing methods.

[0045] By sequentially correcting missing moments, anomalous jumps, and inconsistent acquisition intervals after temporal rearrangement, the grayscale trajectory of micro-areas maintains continuity and consistency on the time axis. This avoids misjudgments caused by unstable acquisition or data discontinuity, ensuring that subsequent change analysis is based on continuous and comparable data. By introducing the grayscale median and neighborhood control values, background stripping is performed on the micro-area grayscale, separating out overall illumination fluctuations, slight lens shifts, and slow changes in the soil surface from the original grayscale changes. Only the independent changes of the micro-area relative to its surrounding environment are retained, thus eliminating the influence of overall environmental fluctuations on the identification criteria and reducing the interference of background changes on the identification results.

[0046] By constructing a micro-region net grayscale perturbation quantity, the original grayscale information is transformed into an independent perturbation quantity that can reflect local structural changes. This allows subsequent analysis to no longer rely directly on absolute grayscale values, but to make judgments based on relative change relationships, thereby improving the ability to express microscale changes.

[0047] Differential expansion is performed on the net grayscale disturbance in the time dimension, decomposing it into first-order disturbance displacement, second-order bending, and continuous occupancy. This allows the micro-area change process to be expanded from "whether it changes" to a multi-dimensional description of "how it changes, whether it is continuous, and whether it is stable," thus making up for the shortcomings of existing methods that only make judgments based on instantaneous features.

[0048] By jointly interpreting the directional consistency of the first-order disturbance displacement, the convergence state of the second-order bending, and the changing trend of the continuous occupancy in the same direction, the system can identify the key nodes in the transformation of a micro-region from random disturbance to stable offset. Thus, regions with evolutionary trends can be identified before local changes form obvious morphological features, corresponding to the forward shift of the identification time point.

[0049] Example 4 Please refer to Figure 2 Specifically: S4 includes S41 and S42; S41. Using the micro-cells corresponding to the candidate nodes of the predecessor nodes as the processing objects, for each candidate micro-cell, read the edge fluctuation value HE of the micro-cell at the current time and the previous time, and extract the edge convergence ratio uR. The edge convergence ratio uR is obtained using the following formula: In the formula, uR(k,t) represents the edge convergence ratio of the k-th microregion at time t, and HE(k,t-1) represents the edge undulation value of the k-th microregion at time t-1. After obtaining the edge convergence ratio uR, the first-order perturbation displacement Va of the adjacent micro-cells at the same time is read with the candidate micro-cell as the center, and the proportion of the same-direction relationship in the entire neighborhood is calculated to obtain the neighborhood same-direction association rate uL. The neighborhood co-occurrence rate uL is obtained using the following formula: In the formula, uL(k,t) represents the neighborhood co-occurrence rate of the k-th micro-region at time t, Va(j,t) represents the first-order perturbation displacement of the j-th micro-region in the neighborhood at time t, Ωk represents the set of neighborhood micro-regions of the k-th micro-region, and |Ωk| represents the total number of neighborhood micro-regions.

[0050] S42. Based on the edge convergence ratio uR and the neighborhood co-directional association rate uL, the micro-region net gray perturbation amount swD, the second-order bending amount Vb and the continuous co-directional occulation degree are combined to calculate and construct the germination precursor value uP (which can simultaneously reflect the local perturbation amplitude, directional occulation relationship, edge convergence degree, neighborhood cooperative relationship and trajectory reversal state). The germination precursor value uP is obtained using the following formula: In the formula, uP(k,t) represents the germination precursor value of the k-th microregion at time t; After obtaining the germination precursor value uP, the normal range data from historical culture batches are read, and the current microregion's uP is compared with the normal range. Based on the comparison results, the microregion is divided into three states: normal fluctuation zone, precursor observation zone, and precursor concentration zone. The division method is as follows: In the formula, St(k,t) represents the precursor state identifier of the k-th micro-region at time t, Q1 represents the boundary value between the upper edge of the normal interval and the lower edge of the transition interval, and Q2 represents the boundary value between the upper edge of the transition interval and the lower edge of the concentration interval; when St(k,t)=0, it represents the normal fluctuation region; when St(k,t)=1, it represents the precursor observation region; when St(k,t)=2, it represents the precursor concentration region. Finally, micro-units located in the precursor observation area and the precursor concentration area, and which satisfy the spatial adjacency relationship, are merged to obtain the set of primordial precursor regions.

[0051] In this embodiment, based on the precursor candidate nodes, edge undulation changes and neighborhood collaboration relationships are introduced to further characterize the local changes in the micro-region. This makes the recognition process no longer rely solely on the temporal change trajectory of grayscale perturbation, but also combines the changes in micro-region structure and spatial correlation. Thus, the recognition criteria are expanded from a single dimension to a multi-dimensional comprehensive judgment, which solves the problem that existing methods cannot distinguish between real germination and random perturbation based solely on local grayscale changes.

[0052] By comparing the edge undulation changes of the same micro-region at adjacent time points, edge convergence features are extracted, enabling the system to identify the process of transformation from a loose granular structure to a relatively concentrated structure. This process corresponds to the gradual aggregation trend of the microstructure on the surface of the culture bed, thus providing a structural basis for determining whether the germination precursor stage has been entered.

[0053] By introducing the neighboring co-occurrence relationship, the change direction of the surrounding area of ​​the candidate microregion is statistically analyzed, so that the identification results not only reflect the changes of a single microregion, but also reflect whether the change has a spatial expansion trend. This avoids mistaking short-term changes of isolated microregions for germination signals, and makes the identification results more consistent with the actual characteristics of primordia in the culture bed, which usually exhibit regional development.

[0054] By combining the net grayscale perturbation of micro-regions, the persistence of change direction, trajectory reversal, edge structure changes, and neighborhood cooperative relationships, a unified precursor judgment index is constructed. This allows various change characteristics to be comprehensively expressed within the same judgment framework, thereby avoiding the instability caused by single-index judgment and making the recognition process more consistent and comparable. By comparing the current micro-region judgment result with the normal range in historical culture batches, the recognition standards between different batches are kept consistent, thus avoiding judgment bias caused by differences in culture conditions and making the recognition results reusable and stable.

[0055] Example 5 Please refer to Figure 1 Specifically: S5 includes S51 and S52; S51. Taking each micro-region unit in the set of primordial precursor regions as a continuous verification object, for each micro-region unit, read the corresponding germination precursor value uP and precursor state identifier St of the micro-region at several consecutive moments along the time axis, check whether the micro-region unit continues to remain in the precursor observation area or precursor concentration area in the subsequent time period, so as to determine whether the current precursor state of the micro-region unit is a short-term jump or a continuous precursor state. After completing the time continuity verification, with the micro-unit as the center, read the other predecessor micro-units that are connected in space at the current time, count the number of connected predecessor micro-units, the range of connections and the level of connection, and calculate and obtain the predecessor persistence wS and the contiguous germination index wA. The formula for obtaining the precursor duration wS is: In the formula, wS(k,t) represents the precursor persistence of the k-th microregion at time t, q represents the length of the continuous verification time window, uP(k,v) represents the germination precursor value of the k-th microregion at time v, and uP(k,v-1) represents the germination precursor value of the k-th microregion at time v-1. The formula for obtaining the germination index wA is: In the formula, Φ(k,t) represents the set of predecessor microregions that are spatially connected to the k-th microregion at time t; S52. Based on the fixed grid position of each micro-region unit in the culture bed image, the micro-region units that satisfy the precursor persistence wS and the continuous germination index wA are mapped back to the culture bed plane coordinates to form a spatial distribution map of the primordium precursor region. After completing the spatial mapping, the time number corresponding to each micro-region unit and the verification start time are written into the time axis record to form the time distribution trajectory of the primordium precursor region. Based on the interval of the contiguous germination index wA corresponding to each micro-region or contiguous area, an environmental control instruction corresponding to that interval is generated, and the spatial location, time marker, and environmental control instruction are written into the output result. The specific method is as follows: Based on the continuous germination index wA, the environmental control instructions are generated and the continuous germination index is divided into low interval, medium interval and high interval; for each mapped output micro-region or continuous region wA, interval determination is performed to obtain the control category identifier CT; The control category identifier for CT is obtained as follows: In the formula, CT(k,t) represents the control category identifier of the k-th micro-region at time t, E1 represents the boundary value between the low interval and the middle interval, and E2 represents the boundary value between the middle interval and the high interval. When CT(k,t)=0, the area is marked as a reserved monitoring area, and only its spatial location and time information are recorded, without issuing environmental control actions; When CT(k,t)=1, the region is marked as the humidity rhythm fine-tuning zone, and a fine-tuning humidity rhythm command is issued to the culture bed zone where the region is located. When CT(k,t)=2, the region is marked as a key control area, and instructions are issued to shorten the ventilation interval and correct the surface moisture maintenance time for the culture bed zone where the region is located.

[0056] In this embodiment, based on the initial identification of the precursor region, a time continuity verification mechanism is introduced to continuously track the state of the micro-region in subsequent time periods. This allows the identification results to no longer be based on a single moment's judgment, but to distinguish between short-term fluctuations and continuous change processes. This avoids misjudging instantaneous anomalies or random disturbances as primordium germination signals, and addresses the problem in existing methods where the identification results are easily affected by accidental fluctuations.

[0057] By conducting cumulative analysis of the continuous changes of micro-regions over time, the persistence of precursor changes is incorporated into the judgment criteria. This allows the identification results to not only reflect "whether a change has occurred" but also "whether the change persists." Consequently, the screening results are more consistent with the gradual evolution characteristics in the actual growth process, reducing the interference of short-cycle fluctuations on the results.

[0058] After determining the temporal continuity, spatial connectivity analysis is introduced to statistically analyze the neighboring relationships between precursor micro-regions. This enables the system to identify regional structures with spatial expansion trends, thereby distinguishing between isolated, scattered changes and large-scale regional changes. The identification results are transformed from point-like information into regional information, which solves the problem of existing methods lacking spatial correlation expression.

[0059] By constructing a comprehensive index reflecting both temporal persistence and spatial connectivity, the system can uniformly evaluate the precursor state from both temporal and spatial dimensions, thus making the output results closer to the actual distribution characteristics of the gradual expansion of primordia in the culture bed. By classifying regions according to the degree of contiguous germination and assigning different regions to different types of control commands, environmental control is transformed from a uniform, holistic approach to a hierarchical response based on regional states. This allows control actions to be tailored to the growth process of different regions, avoiding inconsistencies in regional growth rhythms caused by uniform control.

[0060] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended technical solutions and their equivalents.

Claims

1. A method for identifying primordia buds in industrialized production, characterized in that: Includes the following steps: S1. Collect surface image sequences of the mushroom cultivation bed at continuous time points, divide it into several micro-regions, and extract the gray-level statistical value HG, gray-level median value HM, edge undulation value HE and neighborhood control value HN of each micro-region, and fit them into a micro-region time series basic data table. S2. Based on the micro-region time series basic data table, rearrange the grayscale data of each micro-region unit at continuous time, and perform background stripping processing by combining the grayscale value of the neighboring ring band and the grayscale median value to obtain the net grayscale disturbance amount swD of the micro-region. S3. Perform time-direction differential expansion processing on the net grayscale disturbance amount swD of the micro-region to obtain the first-order disturbance displacement Va, second-order bending amount Vb and continuous occupancy degree Vc of each micro-region unit at continuous time, and identify the predecessor candidate node of each micro-region unit that transforms from random disturbance to directional offset. S4. Based on the candidate precursor nodes, and combining the edge undulation changes and neighborhood cooperative changes of each micro-region unit, construct the germination precursor value uP, which includes the edge convergence ratio uR and the neighborhood co-occurrence rate uL. Perform precursor state determination on each micro-region unit and generate the corresponding primordial precursor region set. S5. Perform time continuity verification and spatial connectivity analysis on the set of primordium precursor regions, calculate the precursor persistence wS and the contiguous germination index wA of each microregion, map the microregion units to the spatial location and time axis of the culture bed, output the primordium precursor distribution results, and generate corresponding environmental control instructions based on the contiguous germination index wA. S2 includes S21 and S22; S21. Using the micro-area unit number as the primary key, rearrange the micro-area time series basic data table, and reorganize the data originally recorded according to "collection time - micro-area number" into a data structure recorded according to "micro-area number - continuous time sequence". For each micro-region, the corresponding gray-level statistical value HG, gray-level median value HM, and human neighbor comparison value HN are extracted sequentially at consecutive time points and arranged in chronological order to form a continuous gray-level trajectory specific to the micro-region. Based on this, the records with missing moments, abnormal jump moments, or inconsistent acquisition intervals are corrected sequentially to obtain grayscale time series groups; S22. Perform background stripping processing on a time-by-time basis for the grayscale time series of each micro-region unit, specifically as follows: Read the grayscale statistical value HG of any micro-unit at any time, as the overall brightness level of the micro-unit at the current time; then read the grayscale median value HM and the neighborhood comparison value HN at the same time. The offset of the gray level of the micro-area unit relative to its median distribution is compared with the offset of the neighboring background relative to the median distribution. The overall lighting fluctuation, global brightness swing caused by slight lens shift, and slow uniform change of the soil surface that simultaneously affect the entire image are separated from the original gray level changes. The independent change of the micro-area unit relative to the surrounding background is retained to obtain the net gray level perturbation amount swD of the micro-area. The formula for obtaining the net grayscale disturbance amount swD in the micro-area is: swD(k,t)=(HG(k,t)-HM(k,t))-(HN(k,t)-HM(k,t)); In the formula, swD(k,t) represents the net gray level disturbance of the k-th micro-region at time t, and HM(k,t) represents the median gray level of the k-th micro-region at time t. S3 includes S31 and S32; S31. Based on the net gray disturbance amount swD of the micro-area, arrange them continuously according to the time sequence under the same micro-area number. For the change process of the net gray disturbance amount swD of each micro-area unit at adjacent time, calculate the disturbance difference between two adjacent time and obtain the first-order disturbance displacement amount Va. The formula for obtaining the first-order disturbance displacement Va is: Va(k,t) = swD(k,t) - swD(k,t-1). In the formula, Va(k,t) represents the first-order perturbation displacement of the k-th micro-region at time t, and swD(k,t-1) represents the net gray perturbation of the k-th micro-region at time t-1. Based on the first-order disturbance displacement Va, the first-order disturbance displacement at adjacent time points is subjected to a second-order difference processing to obtain the second-order bending amount Vb. The formula for obtaining the second-order bending amount Vb is: Vb(k,t) = |Va(k,t) - Va(k,t-1)|; In the formula, Vb(k,t) represents the second-order bending amount of the k-th microregion at time t, and Va(k,t-1) represents the first-order disturbance displacement of the k-th microregion at time t-1. Within the continuous examination time window, the first-order disturbance displacement Va of the same micro-region at multiple consecutive times is statistically analyzed in the same direction to obtain the continuous occence in the same direction. The continuous occupancy degree Vc in the same direction is obtained by the following formula: In the formula, Vc(k,t) represents the continuous occupancy degree of the k-th micro-region at time t, r represents the length of the continuous observation time window, and Va(k,u) represents the first-order perturbation displacement of the k-th micro-region at time u.

2. The method for identifying primordia buds in industrialized production according to claim 1, characterized in that: S1 includes S11 and S12; S11. Read the image sequence formed on the surface of the mushroom cultivation bed at continuous times according to the existing visual acquisition cycle, and arrange the images at each time according to the order of acquisition to form a time sequence image group of the cultivation bed surface. Using the first frame as the base frame and as the reference image, position alignment processing is performed on subsequent frames. After alignment, the image is divided into grids according to a uniform window size, dividing the culture bed surface into multiple micro-units with fixed positions, and assigning a unique number to each micro-unit. Finally, the pixel range, center coordinates, and adjacent ring range of each micro-region unit at each time point are recorded.

3. The method for identifying primordia buds in industrialized production according to claim 2, characterized in that: S12. Extract features for each micro-region unit, including gray-level statistical value HG, gray-level median value HM, edge undulation value HE, and neighborhood control value HN; Extract all pixel grayscale values ​​within a micro-unit and calculate the grayscale statistical value HG of the micro-unit; The grayscale statistical value HG(k,t) of the kth micro-region at time t is obtained by reading out the grayscale values ​​of all pixels in the micro-region unit one by one, and then summing them up to obtain the total grayscale value of the micro-region unit; then, the total number of pixels in the micro-region unit is counted, and the total grayscale value obtained is averaged using this total number of pixels. The pixel grayscale values ​​within the same micro-region are sorted according to their size, and the value at the middle position is extracted as the grayscale median value HM. The edge undulation value HE(k,t) of the kth micro-region at time t is obtained as follows: First, select all combinations of adjacent pixels within the micro-region unit. Then, for each pair of adjacent pixels, calculate the grayscale difference and take the absolute value. Next, sum up all the variation amplitudes of all adjacent pixel pairs in the micro-region unit. Finally, average the total number of adjacent pixel pairs involved in the calculation. The neighborhood reference value HN(k,t) of the k-th micro-region at time t is obtained as follows: at the same time as the micro-region unit, determine a ring of neighborhood regions surrounding the micro-region unit; then, accumulate all the gray values ​​of all pixels in the neighborhood region; next, count the total number of pixels in the neighborhood region; finally, divide the total accumulated gray value by the total number of pixels to obtain an average value. The acquired grayscale statistical value HG, grayscale median value HM, edge undulation value HE, neighborhood control value HN, micro-area unit number, and time number are sequentially written into a data table to form a micro-area time series basic data table.

4. The method for identifying primordia buds in industrialized production according to claim 1, characterized in that: S32. Perform joint time series analysis on the first-order disturbance displacement Va, second-order bending Vb, and continuous occence in the same direction at the same time. Check whether the first-order perturbation displacement Va of the micro-cell remains in the same sign or in the same direction at multiple consecutive times, and determine whether the micro-cell net gray perturbation swD has gotten rid of the scattered fluctuations of frequent alternation between positive and negative. Check whether the second-order bending amount Vb gradually enters the low range from the high fluctuation range, and determine whether the disturbance trajectory of the micro-area unit begins to change from a random state with many turns to a smooth directional advancement state; By combining the changing trend of the continuous occupancy in the same direction, we can determine whether the degree of directional consistency of the micro-cells gradually increases within the most recent continuous time window. When all three conditions occur simultaneously in the same micro-region and within the same time period, the corresponding time is marked as a precursor candidate node for the transformation of the micro-region unit from random disturbance to directional migration, and the node is written into the candidate node record table.

5. The method for identifying primordia buds in industrial production according to claim 4, characterized in that: S4 includes S41 and S42; S41. Using the micro-cells corresponding to the candidate nodes of the predecessor nodes as the processing objects, for each candidate micro-cell, read the edge fluctuation value HE of the micro-cell at the current time and the previous time, and extract the edge convergence ratio uR. The edge convergence ratio uR is obtained using the following formula: In the formula, uR(k,t) represents the edge convergence ratio of the k-th microregion at time t, and HE(k,t-1) represents the edge undulation value of the k-th microregion at time t-1. After obtaining the edge convergence ratio uR, the first-order perturbation displacement Va of the adjacent micro-cells at the same time is read with the candidate micro-cell as the center, and the proportion of the same-direction relationship in the entire neighborhood is calculated to obtain the neighborhood same-direction association rate uL. The neighborhood co-occurrence rate uL is obtained using the following formula: In the formula, uL(k,t) represents the neighborhood co-occurrence rate of the k-th micro-region at time t, Va(j,t) represents the first-order perturbation displacement of the j-th micro-region in the neighborhood at time t, Ωk represents the set of neighborhood micro-regions of the k-th micro-region, and |Ωk| represents the total number of neighborhood micro-regions.

6. The method for identifying primordia buds in industrialized production according to claim 5, characterized in that: S42. Based on the edge convergence ratio uR and the neighborhood unidirectional association rate uL, the germination precursor value uP is constructed by combining the micro-region net gray perturbation amount swD, the second-order bending amount Vb and the continuous unidirectional occence. The germination precursor value uP is obtained using the following formula: In the formula, uP(k,t) represents the germination precursor value of the k-th microregion at time t; After obtaining the germination precursor value uP, the normal range data from historical culture batches are read, and the current microregion's uP is compared with the normal range. Based on the comparison results, the microregion is divided into three states: normal fluctuation zone, precursor observation zone, and precursor concentration zone. The division method is as follows: In the formula, St(k,t) represents the precursor state identifier of the k-th micro-region at time t, Q1 represents the boundary value between the upper edge of the normal interval and the lower edge of the transition interval, and Q2 represents the boundary value between the upper edge of the transition interval and the lower edge of the concentration interval; when St(k,t)=0, it represents the normal fluctuation region; when St(k,t)=1, it represents the precursor observation region; when St(k,t)=2, it represents the precursor concentration region. Finally, micro-units located in the precursor observation area and the precursor concentration area, and which satisfy the spatial adjacency relationship, are merged to obtain the set of primordial precursor regions.

7. The method for identifying primordia buds in industrialized production according to claim 6, characterized in that: S5 includes S51 and S52; S51. Taking each micro-region unit in the set of primordial precursor regions as a continuous verification object, for each micro-region unit, read the corresponding germination precursor value uP and precursor state identifier St of the micro-region at several consecutive moments along the time axis, check whether the micro-region unit continues to remain in the precursor observation area or precursor concentration area in the subsequent time period, so as to determine whether the current precursor state of the micro-region unit is a short-term jump or a continuous precursor state. After completing the time continuity verification, with the micro-unit as the center, read the other predecessor micro-units that are connected in space at the current time, count the number of connected predecessor micro-units, the range of connections and the level of connection, and calculate and obtain the predecessor persistence wS and the contiguous germination index wA. The formula for obtaining the precursor duration wS is: In the formula, wS(k,t) represents the precursor persistence of the k-th microregion at time t, q represents the length of the continuous verification time window, uP(k,v) represents the germination precursor value of the k-th microregion at time v, and uP(k,v-1) represents the germination precursor value of the k-th microregion at time v-1. The formula for obtaining the germination index wA is: In the formula, Φ(k,t) represents the set of predecessor microregions that are spatially connected to the k-th microregion at time t; S52. Based on the fixed grid position of each micro-region unit in the culture bed image, the micro-region units that satisfy the precursor persistence wS and the continuous germination index wA are mapped back to the culture bed plane coordinates to form a spatial distribution map of the primordium precursor region. After completing the spatial mapping, the time number corresponding to each micro-region unit and the verification start time are written into the time axis record to form the time distribution trajectory of the primordium precursor region. Based on the interval of the contiguous germination index wA corresponding to each micro-region or contiguous area, an environmental control instruction corresponding to that interval is generated, and the spatial location, time marker, and environmental control instruction are written into the output result. The specific method is as follows: Based on the continuous germination index wA, the environmental control instructions are generated and the continuous germination index is divided into low interval, medium interval and high interval; for each mapped output micro-region or continuous region wA, interval determination is performed to obtain the control category identifier CT; The control category identifier for CT is obtained as follows: In the formula, CT(k,t) represents the control category identifier of the k-th micro-region at time t, E1 represents the boundary value between the low interval and the middle interval, and E2 represents the boundary value between the middle interval and the high interval. When CT(k,t)=0, the area is marked as a reserved monitoring area, and only its spatial location and time information are recorded, without issuing environmental control actions; When CT(k,t)=1, the region is marked as the humidity rhythm fine-tuning zone, and a fine-tuning humidity rhythm command is issued to the culture bed zone where the region is located. When CT(k,t)=2, the region is marked as a key control area, and instructions are issued to shorten the ventilation interval and correct the surface moisture maintenance time for the culture bed zone where the region is located.

Citation Information

Patent Citations

  • Method and system for monitoring growth state of agaricus bisporus

    CN118097659A

  • Mushroom house carbon dioxide adjusting method based on multi-mode growth stage recognition

    CN120469491A