A method for determining particle flow time based on video frame difference and simulation stop ratio
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-26
- Publication Date
- 2026-08-14
AI Technical Summary
在圆柱提拉、Drawdown或类似颗粒流动实验中,传统做法常依赖人工观察视频终止时刻,容易受到光照、局部残余运动、操作者主观判断和视频帧率的影响
[0005]与人工读秒或单一仿真指标相比,本方法具有三个优势:第一,视频端使用帧差分数而非肉眼判断,降低主观性;第二,仿真端使用区域内颗粒群体停止比例,能反映整体停止状态;第三,可输出误差、阈值状态和参数校准目标函数,便于湿颗粒DEM参数优化。
Smart Images

Figure CN122574433A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of experimental image processing of particulate materials, post-processing of discrete element simulation, and experimental-simulation parameter calibration, and particularly to a method for determining particle flow time based on video frame difference and simulation stop ratio. Background Technology
[0002] Particle flow time is an important indicator for evaluating the flowability of particle systems, the wet particle cohesion effect, and the predictability of DEM models. In cylindrical pull-down, drawdown, or similar particle flow experiments, traditional methods often rely on manual observation of the video termination time, which is easily affected by lighting, local residual motion, operator subjective judgment, and video frame rate.
[0003] In DEM simulations, using only remaining mass, the final frame, or a single velocity threshold to determine the end of flow may result in premature or delayed termination when particles are still subject to local disturbances or are not fully stationary within the feed box. Therefore, a flow timing determination method is needed that simultaneously addresses both experimental video and simulated particle velocity fields, providing comparable, traceable, and repeatable timing criteria for both experimental and simulation ends. Summary of the Invention
[0004] This invention proposes a dual-end criterion: the experimental end converts the grayscale difference between adjacent frames in the particle region of the video into a motion score sequence, and uses robust statistical thresholds and continuous frame criteria to identify the start and end times of the flow; the simulation end statistically analyzes the particle velocity in the feeding box area or other target areas, and determines that the particle system has entered a stopped state based on the proportion of low-speed particles that stop. The two ends are connected through a unified time start point and error output, which is used for flow time extraction, DEM parameter inversion, and simulation reliability diagnosis.
[0005] Compared with manual countdown or a single simulation metric, this method has three advantages: First, the video end uses frame difference instead of visual judgment, reducing subjectivity; second, the simulation end uses the stopping ratio of the particle population within the region, which can reflect the overall stopping state; third, it can output error, threshold state, and parameter calibration objective function, which facilitates the optimization of wet particle DEM parameters. Attached Figure Description
[0006] Figure 1 This is a flowchart illustrating the joint determination of video frame difference and simulation stop ratio in this method.
[0007] Figure 2 This is a schematic diagram comparing experimental video frames, DEM particle velocity snapshots, and joint criterion curves. Detailed Implementation
[0008] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. The described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0009] Step S1: Acquire the particle flow experiment video sequence V(t), and determine the region of interest (ROI) based on the device's geometric position or calibration coordinates. The ROI can be represented as:
[0010] Ω={p=(x,y) | x1≤x≤x2,y1≤y≤y2}
[0011] Where p represents the image pixel coordinates, and Ω represents the set of valid pixels used in the experimental determination. The ROI can be fixed in the feed box, flow channel, outlet, or particle accumulation area, or it can be updated based on the camera calibration coordinates.
[0012] Step S2: Convert the image within the ROI to grayscale and perform difference calculations on adjacent frames or frames at intervals. The preferred grayscale conversion formula is as follows:
[0013] Gi(p)=0.299Ri(p)+0.587Gci(p)+0.114Bi(p)
[0014] Where Gci represents the green channel grayscale value, used to avoid confusion with the grayscale frame symbol G. The pixel difference between the i-th frame and the im-th frame is divided into:
[0015] Di(p) = |Gi(p) - Gi-m(p)|
[0016] Calculate the mean absolute difference within the ROI to obtain the video motion score:
[0017] Si=(1 / |Ω|)Σp∈Ω Di(p)
[0018] A larger Si value indicates stronger image changes in the particle region, while a low Si value indicating the macroscopic flow is nearing its end. To further reduce single-frame noise, moving averages or exponential smoothing can be used.
[0019] Sbi=(1 / w)Σr=0 to w-1 Si-r
[0020] Or Sbi = αSi + (1-α)Sbi-1
[0021] Where w is the sliding window length, α is the smoothing coefficient, and Sbi is the smoothed motion score.
[0022] Step S3: Robust thresholding is used to identify the start and end times of the flow at the experimental end. The median and median absolute deviation can be calculated from the still segment of the video or the reference segment B.
[0023] μ=median({Sbi | i∈B})
[0024] σMAD=1.4826·median(|Sbi-μ| | i∈B)
[0025] Ton=μ+kon·σMAD, Toff=μ+koff·σMAD
[0026] Where Ton is the flow initiation threshold and Toff is the flow termination threshold. Using Ton and Toff, a hysteresis criterion can be formed, reducing misjudgments caused by motion scores fluctuating around the threshold. The experimental start and termination frames can be defined as follows:
[0027] istart=min{i | Sbi≥Ton consecutively reach non frames}
[0028] iend=min{i>istart | Sbi≤Toff consecutively reach noff frames}
[0029] texp=(iend-istart) / fps
[0030] Where non and noff are the consecutive frame count thresholds, and fps is the video frame rate.
[0031] Step S4: Read the particle positions and velocities at each moment in the DEM simulation, and filter the particle set according to the feed box or the boundary of the area to be determined. The particle set within the target area can be represented as:
[0032] Pbox(tj) = {q | xq(tj) ∈ B}
[0033] Where B is the boundary of the simulation target region, and xq(tj) is the position of the q-th particle at time tj. The velocity modulus is calculated for each particle within the set:
[0034] vq(tj)=sqrt(uxq(tj)^2+uyq(tj)^2+uzq(tj)^2)
[0035] The speed threshold can be a fixed threshold, a percentage of the maximum speed, or a percentage of the quantile speed. To avoid the maximum speed becoming too small in the later stages of the simulation, causing the threshold to approach zero, the following form is preferred:
[0036] vthr(tj)=max(vmin, η·Qρ({vq(tj) | q∈Pbox(tj)}))
[0037] Where vmin is the minimum velocity threshold, η is the relative velocity coefficient, and Qρ is the ρ quantile velocity.
[0038] Step S5, calculate the proportion of stopped particles:
[0039] Fstop(tj)=(1 / Nj)Σq∈Pbox(tj) I(vq(tj)≤vthr(tj))
[0040] Where Nj = N(Pbox(tj)), and I(·) is the indicator function. The simulation flow is considered complete when Fstop(tj) continuously reaches or exceeds the stop ratio threshold γ for L time steps.
[0041] jend=min{j | Fstop(tl)≥γ,l=j,j+1,…,j+L-1}
[0042] tsim=tjend-t0sim
[0043] In one embodiment, η is taken from 0.01 to 0.10, γ is taken from 0.90 to 0.98, and the condition is required to be met for several consecutive time steps in order to avoid misjudgment caused by numerical fluctuations in a single time step.
[0044] Step S6: Simultaneously compare texp and tsim, and output the absolute error, relative error, and parameter calibration objective function. The error can be expressed as:
[0045] Eabs=|tsim-texp|
[0046] Erel = Eabs / max(texp, ε)
[0047] Where ε is a positive number to prevent the denominator from being zero. When this method is used for DEM parameter inversion, the objective function can be constructed as follows:
[0048] J(θ)=wt·Erel^2+ws·Ds(θ)+wm·Dm(θ)
[0049] Where θ represents the set of particle parameters to be calibrated, Ds(θ) is the spatial morphology error term, Dm(θ) is the mass flow rate or other macroscopic response error term, and wt, ws, and wm are weighting coefficients. This output can be used as the flow time term in the objective function of DEM parameter inversion, or as a separate characterization index of particle flowability.
Claims
1. A method for determining particle flow time based on video frame difference and simulation stop ratio, characterized in that, The process includes the following steps: S1, acquiring a video sequence of particle flow experiments, determining the target experimental area, and extracting the region of interest; S2, performing grayscale processing on the video frames within the region of interest, and calculating the grayscale difference between adjacent frames or interval frames to obtain a video motion score sequence; S3, determining the start and end times of the experimental flow based on the video motion score sequence, robust statistical thresholds, and continuous frame criteria; S4, acquiring a discrete element simulation result sequence corresponding to the experimental process, and filtering particles in the loading box area, outlet area, or other target areas; S5, calculating a stopping particle ratio sequence based on the particle velocity modulus and velocity threshold within the target area; S6, determining the simulation end flow termination time based on the stopping particle ratio sequence and continuous stopping ratio threshold; S7, synchronously comparing the experimental flow time with the simulation flow time, and outputting experimental image frames, simulation particle snapshots, experimental flow time, simulation flow time, and experimental-simulation error diagnosis results.
2. The method according to claim 1, characterized in that, The region of interest is denoted as Ω, where Ω = {p = (x, y) | x1 ≤ x ≤ x2, y1 ≤ y ≤ y2}; or the region of interest is obtained by the device calibration coordinate mapping and remains fixed or updated according to the calibration relationship in the same experimental video sequence; the grayscale processing is Gi(p) = 0.299Ri(p) + 0.587Gci(p) + 0.114Bi(p), where Gi(p) is the grayscale value at pixel p in the i-th frame, and Ri(p), Gci(p), and Bi(p) are the grayscale values of the red, green, and blue channels, respectively.
3. The method according to claim 1, characterized in that, The video motion score sequence includes a pixel average absolute difference term Si, Si=(1 / |Ω|)Σp∈Ω |Gi(p)-Gi-m(p)|, where m is the frame interval, m≥1, and |Ω| is the number of pixels in the region of interest; and the video motion score sequence is subjected to a moving average or exponential smoothing to obtain a smoothed motion score Sbi, where Sbi=(1 / w)Σr=0 to w-1 Si-r, or Sbi=αSi+(1-α)Sbi-1, where w is the sliding window length and α is the smoothing coefficient.
4. The method according to claim 3, characterized in that, The robust statistical thresholds are determined by the baseline median and median absolute deviation, including μ=median(SbB), σMAD=1.4826·median(|SbB-μ|), Ton=μ+kon·σMAD, Toff=μ+koff·σMAD, where SbB is the set of smooth motion scores for the baseline frame, Ton is the flow initiation threshold, and Toff is the flow termination threshold.
5. The method according to claim 4, characterized in that, The experimental flow start and end frames satisfy: isart=min{i|Sbi≥Ton continuously reaches non frames}, iend=min{i>istart|Sbi≤Toff continuously reaches noff frames}; the experimental flow time is texp=(iend-istart) / fps, or texp=tend-t0.
6. The method according to claim 1, characterized in that, The set of particles within the target region is denoted as Pbox(tj)={q|xq(tj)∈B}, where B is the boundary of the simulated target region, xq(tj) is the position of the q-th particle at time tj, and the particle velocity modulus is vq(tj)=sqrt(uxq(tj)^2+uyq(tj)^2+uzq(tj)^2).
7. The method according to claim 6, characterized in that, The velocity threshold vthr(tj) is a preset ratio of the maximum velocity, average velocity, quantile velocity, or fixed calibration velocity of particles within the target area, preferably vthr(tj)=max(vmin,η·Qρ({vq(tj)|q∈Pbox(tj)})), where vmin is the minimum velocity threshold, η is the relative velocity coefficient, and Qρ is the ρ quantile velocity; the stopping particle ratio is Fstop(tj)=(1 / Nj)Σq∈Pbox(tj) I(vq(tj)≤vthr(tj)), where Nj=N(Pbox(tj)), and I(·) is the indicator function.
8. The method according to claim 7, characterized in that, When Fstop(tj) continuously reaches or exceeds the stopping ratio threshold γ for L time steps, the simulation flow is determined to end, tsim=tjend-t0sim; the experimental flow time and the simulation flow time are synchronized according to the same starting point, gate opening time, peak motion time or external trigger time, and the absolute error Eabs=|tsim-texp|, relative error Erel=Eabs / max(texp,ε) and the objective function J(θ)=wt·Erel^2+ws·Ds(θ) used for parameter calibration are output, where ε is a positive number to prevent division by zero, wt and ws are weighting coefficients, and Ds(θ) is a spatial morphology or other error term.
9. A particle flow time determination system based on video frame difference and simulation stop ratio, characterized in that, The system includes a video frame reading module, an ROI cropping module, a frame difference motion scoring module, an experimental stop judgment module, a simulation particle screening module, a stop ratio calculation module, a simulation stop judgment module, and an experimental-simulation error diagnosis output module. The system is used to implement the method described in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the particle flow time determination method based on video frame difference and simulation stop ratio as described in any one of claims 1 to 8.