An intelligent fish behavior recognition system based on an underwater high-resolution camera
Patent Information
- Application Number
- CN202610992918.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-06
- Publication Date
- 2026-09-29
AI Technical Summary
[0005]针对现有技术的不足,本发明提供了一种基于水下高分辨率相机的鱼类行为智能识别系统,解决了常规观测系统因粒子跨层投影导致空间定位准确度低,难以隔离背景干扰获取纯净水动力扰动场以及固定采样引发相位混叠导致尾流特征提取不稳定的问题
[0044]1、本发明在水下工业相机前段设置柱面透镜获取离散粒子图像,利用离散粒子的多维形貌特征计算离焦深度坐标,将分布在三维水体中的离散粒子解耦并分配至独立的二维景深切片层内进行分析,本发明消除了跨层粒子相互重叠产生的投影干涉,避免了常规二维视觉观测产生的空间错觉,提高了系统对水动力节点坐标定位的准确度。
Smart Images

Figure CN122841937A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of underwater intelligent observation technology, specifically to an intelligent fish behavior recognition system based on an underwater high-resolution camera. Background Technology
[0002] Underwater fish behavior observation and hydrodynamic flow field analysis have practical application needs for aquaculture and ecological monitoring. Currently, conventional underwater visual observation systems acquire particle images based on two-dimensional planar imaging. In three-dimensional water bodies, freely distributed suspended particles will produce cross-layer projections on the camera target surface. This cross-over phenomenon can easily cause spatial interference and visual illusions, making it impossible for flow field analysis algorithms to obtain the depth coordinates of discrete particles, thus reducing the accuracy of spatial positioning of hydrodynamic nodes.
[0003] When extracting water flow field data, existing systems directly calculate the global image within the field of view, which makes it difficult to remove complex environmental interference factors. The high-frequency twisting deformation of the fish body itself will induce local velocity vector calculation errors, and the background field generated by the circulating water of the pumps inside and outside the breeding environment will form a masking effect, causing the real fish wake disturbance characteristics to be submerged. The system cannot obtain a pure hydrodynamic disturbance flow field and lacks a reliable data source to determine the target's behavioral state.
[0004] Conventional image acquisition schemes employ continuous sampling at a fixed frame rate. The camera's fixed acquisition period cannot match the physical fundamental frequency of the alternating vortex shedding from the wake of the target fish. This asynchronous acquisition mechanism leads to phase aliasing and motion blur during the temporal evolution of the flow field. Simultaneously, random turbulent noise in the aquatic environment is difficult to eliminate with conventional filtering algorithms, resulting in a low signal-to-noise ratio in the extracted wake flow field. Consequently, the system easily loses flow field characteristics when faced with unsteady fish movements, failing to achieve stable extraction of the wake flow field. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides an intelligent fish behavior recognition system based on an underwater high-resolution camera. This system solves the problems of low spatial positioning accuracy caused by particle cross-layer projection in conventional observation systems, difficulty in isolating background interference to obtain a pure hydrodynamic disturbance field, and unstable wake feature extraction caused by phase aliasing due to fixed sampling.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] This invention provides a fish behavior intelligent recognition system based on an underwater high-resolution camera, comprising:
[0008] The image acquisition module, which includes an underwater industrial camera and a cylindrical lens, is used to acquire video data streams containing discrete particles with optical astigmatism distortion.
[0009] An illumination tracing module includes an illumination source for providing supplemental light and injecting tracing particles as the discrete particles;
[0010] The water recovery module is used for water bypass filtration.
[0011] The edge control module is used to receive the video data stream, extract the multidimensional morphological features of the discrete particles, calculate the defocus depth coordinates and divide them into the depth slice layer, solve the two-dimensional instantaneous velocity vector to generate a gridded coarse flow field, and extract the dynamic variance mask of the gridded coarse flow field and the spatial background flow field to obtain the pure water dynamic disturbance field.
[0012] The spatial divergence, curl parameter, and directional information entropy of the pure hydrodynamic disturbance field are calculated to determine whether the target fish is in a cruising state. The dominant peak frequency of the curl parameter is extracted to calculate the signal-to-noise ratio in the frequency domain.
[0013] When the signal-to-noise ratio in the frequency domain meets the stability condition, the phase-locked acquisition mode is switched in, and a synchronous trigger pulse is output to the underwater industrial camera and the lighting source. The time-domain coherent averaging operation is performed to output an enhanced pure hydrodynamic disturbance field. When the unlocking mechanism is triggered, the free sampling state is restored.
[0014] Preferably, the illumination tracing module further includes a micro-peristaltic pump, through which the system performs the injection of tracing particles;
[0015] The water recovery module is equipped with a bypass overflow pipeline and a filter circulation pump. The system performs the water bypass filtration operation through the bypass overflow pipeline and by using the filter circulation pump.
[0016] After receiving the video data stream, the edge control module performs high-pass filtering on the image frames contained in the video data stream, extracts high-frequency features of the image to identify effective particles in the field of view, and simultaneously establishes projection conversion logic based on geometric perspective to calculate the spatial distribution density of effective particles.
[0017] When the effective particle spatial distribution density is less than the lower limit, the edge control module sends an acceleration command to the micro-peristaltic pump to increase the injection rate of the tracer particles;
[0018] When the effective particle spatial distribution density is greater than the upper limit, the edge control module sends an acceleration command to the filter circulation pump to increase the rate of water bypass filtration.
[0019] Preferably, the multidimensional morphological features include the horizontal diffusion width of the discrete particles along the horizontal direction, the vertical diffusion width along the vertical direction, the aspect ratio, and the central peak brightness.
[0020] The edge control module is configured to perform numerical normalization processing on the horizontal diffusion width, vertical diffusion width, aspect ratio and center peak brightness, and calculate the feature confidence level in combination with preset weight coefficients;
[0021] The edge control module inputs the discrete particle shape features that meet the feature confidence threshold condition into the pre-trained depth mapping function, calculates the corresponding defocus depth coordinates, and assigns the corresponding discrete particles to the corresponding depth slice layer according to the numerical range of the defocus depth coordinates.
[0022] Preferably, after the edge control module classifies the discrete particles into the depth slice layer, it establishes a sparse optical flow constraint equation based on the assumption of constant brightness within the same depth slice layer and solves it to obtain the two-dimensional instantaneous velocity vector.
[0023] The edge control module establishes a uniform Cartesian coordinate system in the two-dimensional physical observation plane of each depth slice layer, divides a continuous grid matrix and extracts fixed grid nodes, calculates the spatial Euclidean distance and performs interpolation operation on the two-dimensional instantaneous velocity vector according to the inverse distance weighted interpolation algorithm, calculates the grid velocity vector of the grid node and then generates a gridded coarse flow field.
[0024] Preferably, after generating the gridded coarse flow field, the edge control module establishes a spatial observation window to calculate the grid velocity variance within the gridded coarse flow field and generates the dynamic variance mask.
[0025] When the grid velocity variance is not less than the variance mask threshold, the edge control module sets the dynamic variance mask value of the corresponding grid node to zero;
[0026] When the grid velocity variance is less than the variance mask threshold, the edge control module sets the dynamic variance mask value of the corresponding grid node to one.
[0027] The edge control module constructs a background filtering window, extracts effective grid nodes with a dynamic variance mask value of one, performs median sorting calculation, and outputs the spatial background flow field. It subtracts the spatial background flow field from the gridded coarse flow field and performs matrix multiplication isolation operation based on the dynamic variance mask value to obtain the pure hydrodynamic disturbance field.
[0028] Preferably, after the edge control module acquires the pure water dynamic disturbance field, it calculates the direction angle of the velocity vector of the pure water dynamic disturbance field corresponding to each grid node, and establishes a feature extraction window with the grid node as the center.
[0029] The edge control module uniformly divides the complete arc interval into independent angle sub-intervals, extracts the velocity vector direction angles of all grid nodes within the feature extraction window, and calculates the direction information entropy of the pure hydrodynamic disturbance field by statistically analyzing the frequency distribution of each velocity vector direction angle entering each angle sub-interval.
[0030] Preferably, the edge control module extracts effective grid nodes and calculates the transient divergence integral of the absolute value of the spatial average divergence, the duration information entropy of the spatial average information entropy, and the duration velocity integral of the spatial average velocity magnitude based on the spatial divergence, directional information entropy, and pure hydrodynamic disturbance field velocity vector, respectively.
[0031] The edge control module compares itself against a pre-established baseline reference standard that includes a startle divergence threshold, a feeding information entropy threshold, and a cruising speed threshold.
[0032] When the transient divergence integral is greater than the startle divergence threshold, the system determines that the target is in a startle state;
[0033] When the transient divergence integral is not greater than the startle divergence threshold and the duration information entropy is greater than the feeding information entropy threshold, the system determines that the target is in a feeding state;
[0034] When the aforementioned two judgment conditions are not met and the duration velocity integral is greater than the cruising speed threshold, the system determines that the target fish is in a cruising state.
[0035] Preferably, the edge control module calculates the mean curl parameter of the effective grid nodes, constructs a curl time series and performs frequency domain transformation to obtain power spectral density distribution data, and searches for the global maximum value within a preset effective physiological frequency band to extract the dominant peak frequency;
[0036] The edge control module delineates the neighborhood shielding band of the dominant peak frequency in the power spectral density distribution data, searches for the local second largest value in the remaining frequency band after excluding the neighborhood shielding band, extracts it as the second peak power spectral density corresponding to the second highest spectral peak, and calculates the signal-to-noise ratio in the frequency domain by the ratio of the main peak power spectral density corresponding to the global maximum value to the second peak power spectral density.
[0037] Preferably, the edge control module establishes a time-domain observation window and compares the frequency domain signal-to-noise ratio values of multiple continuously generated signals with the frequency domain stability threshold;
[0038] When the frequency domain signal-to-noise ratio of each signal within the time domain observation window is not less than the frequency domain stability threshold, the edge control module determines that the frequency domain signal-to-noise ratio of the signal meets the stability condition and switches to phase-locked acquisition mode.
[0039] The edge control module calculates the synchronization trigger frequency by multiplying the dominant peak frequency by a preset multiplier coefficient, and generates a periodic rectangular square wave signal with a fixed duty cycle as the synchronization trigger pulse, which is then output to the underwater industrial camera and the lighting source.
[0040] The underwater industrial camera's global shutter performs an exposure action the instant it receives the rising edge of the synchronous trigger pulse, and the illumination source synchronously releases short-duration high-intensity light pulses for supplemental lighting.
[0041] Preferably, the edge control module performs alignment processing on the continuously collected flow field data according to the discrete phase angle sequence, extracts the velocity vectors of the pure water dynamic disturbance field corresponding to the same discrete phase within the historical phase-locked period, calculates the arithmetic mean and performs time-domain coherent averaging operation, and outputs the enhanced pure water dynamic disturbance field.
[0042] The edge control module calculates the real-time signal-to-noise ratio in the frequency domain and continuously compares it with the frequency domain stability threshold. When the real-time signal-to-noise ratio in the frequency domain is less than the frequency domain stability threshold, it stops generating synchronous trigger pulses and cuts off the external hardware trigger source. When the unlocking mechanism is triggered, the control system resumes the free sampling state.
[0043] This invention provides an intelligent fish behavior recognition system based on an underwater high-resolution camera, which has the following beneficial effects:
[0044] 1. This invention uses a cylindrical lens at the front of an underwater industrial camera to acquire discrete particle images. It calculates the defocus depth coordinates using the multidimensional morphological features of the discrete particles, decouples the discrete particles distributed in the three-dimensional water body, and assigns them to independent two-dimensional depth slice layers for analysis. This invention eliminates the projection interference caused by the overlap of particles across layers, avoids the spatial illusion caused by conventional two-dimensional visual observation, and improves the accuracy of the system in locating the coordinates of hydrodynamic nodes.
[0045] 2. This invention calculates the grid velocity variance of the gridded coarse flow field to generate a dynamic variance mask, extracts effective grid nodes, sorts them by median, and outputs the spatial background flow field. By subtracting the spatial background flow field from the gridded coarse flow field and combining it with the dynamic variance mask value, a matrix dot product isolation operation is performed to obtain the pure water dynamic disturbance field. This invention simultaneously eliminates the velocity vector calculation error caused by the deformation of the fish itself, as well as the background masking caused by the circulating water flow of the external pump, and separates the true pure water dynamic disturbance characteristics, providing reliable data support for the discrimination of the target behavior state.
[0046] 3. This invention extracts the dominant peak frequency of the flow field curl parameter to calculate the signal-to-noise ratio in the frequency domain. When the stability condition is met, it switches to phase-locked acquisition mode to generate a synchronous trigger pulse, controlling the underwater industrial camera and the illumination source to perform synchronous acquisition at the physical fundamental frequency of the fish wake. It also extracts multiple frames of velocity vectors with the same discrete phase and performs time-domain coherent averaging. This invention uses the principle of coherent superposition to cancel random turbulence noise, and at the same time, with the unlocking mechanism, it avoids phase aliasing caused by the non-steady-state movements of fish, thus achieving stable extraction of the wake flow field with high signal-to-noise ratio. Attached Figure Description
[0047] Figure 1 This is a schematic diagram of the module structure of a fish behavior intelligent recognition system based on an underwater high-resolution camera according to the present invention.
[0048] Figure 2 This is a flowchart illustrating the overall steps of an intelligent fish behavior recognition method based on an underwater high-resolution camera according to the present invention.
[0049] Figure 3 This is a flowchart of the process for extracting image features, performing closed-loop control, and dividing the field into depth slice layers according to the present invention.
[0050] Figure 4 This is a flowchart of the process for performing local kinematics calculations and extracting the pure water dynamic disturbance field in this invention;
[0051] Figure 5 This is a flowchart illustrating the fluid topology parameter transformation and adaptive determination of behavioral state in this invention.
[0052] Figure 6 This is a flowchart illustrating the process of extracting periodic wake features, evaluating frequency domain stability, and switching to phase-locked acquisition mode in this invention.
[0053] Figure 7 This is a flowchart illustrating the process of performing time-domain coherent averaging enhancement and monitoring frequency-domain signal breaking state in this invention.
[0054] Figure 8 This is a power spectral density distribution diagram of the curl time series under the cruise state of the present invention;
[0055] Figure 9 This is a graph showing the signal-to-noise ratio in the frequency domain and the time domain monitoring and unlock triggering curves of the present invention. Detailed Implementation
[0056] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0057] See attached document Figure 1 The present invention provides a fish behavior intelligent recognition system based on an underwater high-resolution camera, including an image acquisition module, an illumination tracing module, a water recovery module, and an edge control module.
[0058] The image acquisition module is used to acquire visual images of underwater targets, and includes an underwater industrial camera and a cylindrical lens placed at the front end of its optical path. The cylindrical lens introduces asymmetric optical astigmatism distortion during the optical imaging process, causing discrete particles deviating from the focal plane to form asymmetric optical astigmatism distortion on the photosensitive element, thereby providing multidimensional morphological feature parameters to characterize the degree of optical astigmatism.
[0059] The illumination tracer module includes an illumination source and a micro-peristaltic pump. The illumination source releases short-duration, high-intensity light pulses for strobe illumination based on the synchronous trigger pulses output by the edge control module. The micro-peristaltic pump is connected to a storage tank and the water body being tested. According to control commands, it injects pre-placed tracer particles from the storage tank into the water body. The density of the tracer particles matches the density parameters of the water body being tested, and they are made of starch-based microparticles that are non-toxic to aquatic organisms.
[0060] The water recovery module includes a bypass overflow pipeline located downstream of the underwater observation area and a filter circulation pump connected to it, which continuously extracts the water to be tested and performs bypass filtration to maintain the physical stability of the underwater test environment.
[0061] The edge control module establishes electrical connections and signal communication with the image acquisition module, the lighting tracing module, and the water recovery module, respectively. It receives and processes video data streams, performs data calculations, and outputs control commands to the underwater industrial camera, lighting source, micro-peristaltic pump, and filter circulation pump.
[0062] See attached document Figure 2 This invention provides a method for intelligent recognition of fish behavior based on an underwater high-resolution camera, comprising the following steps:
[0063] S100 extracts high-frequency features of the video data stream to calculate the effective particle spatial distribution density and performs closed-loop control of the tracer particle spatial distribution density. At the same time, it extracts multi-dimensional morphological feature parameters of discrete particles in the image and calculates feature confidence. The discrete particle morphological feature parameters that meet the feature confidence threshold are input into the depth mapping function to calculate the defocus depth coordinates of each discrete particle. Based on the defocus depth coordinates, the discrete particles are divided into multiple independent depth slice layers.
[0064] S200 tracks the two-dimensional coordinate changes of discrete particles within continuous image frames and solves the two-dimensional instantaneous velocity vector of each discrete particle inside the depth slice layer based on the sparse optical flow constraint equation to generate a gridded coarse flow field. It calculates the grid velocity variance within the observation window to generate a dynamic variance mask. It performs sliding window midpoint filtering on the outer region of the dynamic variance mask to estimate the spatial background flow field. It subtracts the spatial background flow field from the gridded coarse flow field and performs matrix dot product isolation operation in combination with the dynamic variance mask value to obtain the pure hydrodynamic disturbance field.
[0065] S300 calculates the spatial divergence, curl parameter, and directional information entropy of each grid node in the pure hydrodynamic disturbance field, compares them with the pre-established baseline reference standard, and determines whether the target underwater organism (such as the target fish) is in a startled, feeding, or cruising state based on the comparison results.
[0066] S400: When the target underwater organism is determined to be in a cruising state, the curl time series inside the corresponding depth slice layer is extracted and frequency domain transformation is performed to extract the dominant peak frequency. The signal frequency domain signal-to-noise ratio is calculated. When the signal frequency domain signal-to-noise ratio meets the preset stability condition, the phase-locked acquisition mode is switched in and a synchronous trigger pulse bound to the dominant peak frequency is generated according to the preset multiple relationship.
[0067] During the operation of the phase-locked acquisition mode, the S500 extracts the velocity vectors of multiple frames of pure water dynamic disturbance field at the same discrete phase angle and performs time-domain coherent averaging to output an enhanced pure water dynamic disturbance field. At the same time, it monitors the real-time signal-to-noise ratio in the frequency domain. When the real-time signal-to-noise ratio in the frequency domain is less than the frequency domain stability threshold, it triggers the unlocking mechanism, stops generating synchronous trigger pulses, and restores the initial free sampling state.
[0068] To enable those skilled in the art to better understand the present invention, the following will elaborate on the technical details and specific implementation logic of the above-mentioned system operation and method execution process.
[0069] See attached document Figure 3 After acquiring the video data stream, the system maintains the effective observation concentration of tracer particles in the flow field through a dynamic closed-loop mechanism. This process includes the following steps.
[0070] S101, the edge control module receives the video data stream output by the image acquisition module and performs time tracking. The image frames are subjected to high-pass filtering to extract high-frequency features and identify effective particles within the field of view. For the extraction of high-frequency features and the detection of small speckle targets, those skilled in the art can use the Laplacian Gaussian operator or the difference of Gaussian operator; the specific algorithm extraction process is well-known in the field and will not be elaborated here. By detecting local brightness extrema and combining them with connected component analysis, the edge control module obtains the time... A discrete set of tracer particles distributed in a body of water.
[0071] S102, the edge control module calculates the effective particle spatial distribution density within the field of view. The edge control module counts the total number of effective particles in the discrete tracer particle target set, establishes a projection conversion based on geometric perspective, and calculates the effective particle spatial distribution density using the following formula:
[0072] ;
[0073] In the formula, Indicates time The effective spatial distribution density of particles; Indicates time Total number of effective particles extracted; This represents the physical projection value of the total field of view of the image acquisition module.
[0074] S103, Edge control module determines timing Effective particle spatial distribution density Is it within the preset operating range? Within this range, and outputs hardware feedback instructions when it deviates from this range. The lower limit of the preset operating range is... The upper limit is determined based on the minimum feature point density required for optical flow calculation. The turbidity tolerance limit of the water body is determined based on the requirement to avoid triggering visual stress responses in underwater organisms. Those skilled in the art can obtain the aforementioned boundary values by observing the target's behavior after deploying tracer particles of different mass concentrations. In a specific embodiment of the present invention, the lower limit value... The value range is [3, 5] cm −2 upper limit The value range is [6, 8] cm −2 .
[0075] At that moment Effective particle spatial distribution density Less than the lower limit value At the same time, the edge control module sends an acceleration command to the micro-peristaltic pump in the lighting tracer module, increases the pulse width modulation duty cycle of the micro-peristaltic pump motor, increases the injection rate of tracer particles in the storage tank into the water body being tested, and controls the filter circulation pump in the water recovery module to maintain basic idle speed operation.
[0076] At that moment Effective particle spatial distribution density Greater than the upper limit At this time, the edge control module sends an acceleration command to the filter circulation pump, increasing the motor operating frequency and the rate of extraction and bypass filtration of the tested water, while reducing the injection rate of the micro-peristaltic pump. The edge control module dynamically adjusts the injection and recovery rates of the tracer particles through a linkage control mechanism to maintain the physical stability of the underwater testing environment and the reliability of the visual signal source.
[0077] After completing the closed-loop control of the spatial distribution density of tracer particles, the system performs a process to eliminate depth two-dimensional projection interference, which includes the following steps.
[0078] S104, the edge control module extracts multi-dimensional morphological feature parameters of discrete particles in the image. Because the image acquisition module has a cylindrical lens at the front end of the optical path, discrete particles deviating from the focal plane create asymmetric optical astigmatism distortion on the photosensitive element. (Regarding time...) The first image frame extracted For each discrete particle, the edge control module obtains its horizontal diffusion width along the horizontal direction in the image coordinate system. and vertical diffusion width along the vertical direction For the extraction of the discrete particle diffusion width parameter, those skilled in the art can use a two-dimensional Gaussian surface fitting algorithm. The specific curve fitting process is well-known in the field and will not be elaborated here. The edge control module synchronously extracts the first... The ratio of the major and minor axes of a discrete particle and center peak brightness We constructed a multidimensional topographic feature parameter to characterize the degree of optical astigmatism.
[0079] S105, the edge control module calculates the feature confidence score of the corresponding discrete particles based on the extracted multi-dimensional morphology feature parameters. The feature confidence score measures the probability that the current pixel cluster belongs to an independent, valid physical particle, thus filtering out blurry noise caused by particle spatial overlap or light scattering. The edge control module will adjust the horizontal diffusion width... Vertical diffusion width Major-minor axis ratio and center peak brightness Numerical normalization is performed, and feature confidence is calculated based on preset weight coefficients. The preset weighting coefficients are determined using principal component analysis or empirical calibration. The sum of the normalized weighting coefficients for each feature is 1, where the major-minor axis ratio is... With center peak brightness The weighting coefficients are set to be greater than the weighting coefficients of the horizontal diffusion width and the vertical diffusion width, so as to highlight the characterization effect of the core morphology features on the independent effective particles.
[0080] The edge control module determines the feature confidence level calculated. Is it greater than or equal to the feature confidence threshold? The confidence threshold for this feature. The value range was set to 0.75 to 0.85, which was obtained through pre-collected static standard particle imaging samples in pure water for calibration. During the calibration process, the system controlled a micro-peristaltic pump to gradually increase the concentration of discrete particles until optical overlap appeared in the field of view. The confidence distribution data of all independent single particles before overlap was recorded, and the lower boundary value covering 95% of the independent single particle sample distribution range was selected as the feature confidence threshold. For feature confidence Less than the feature confidence threshold The discrete particle data is identified by the edge control module as interference items caused by excessive overlap or defocus, and is removed from the subsequent calculation queue.
[0081] S106, the edge control module inputs the discrete particle morphology feature parameters that meet the feature confidence threshold condition into the depth mapping function to calculate the defocus depth coordinates of each discrete particle. This depth mapping function is pre-generated by training discrete particle morphology samples collected at different known optical axis depths using a grid calibration target placed underwater, establishing a nonlinear mapping relationship between multidimensional morphology feature parameters and physical depth coordinates. The shape feature parameters of each discrete particle are input into the depth mapping function, and the calculation formula is as follows:
[0082] ;
[0083] In the formula, Indicates the first The defocus depth coordinates of each discrete particle; Represents the depth mapping function; Indicates the sequence number of the extracted discrete particles; Indicates the first The horizontal diffusion width of a discrete particle along the horizontal direction in the image coordinate system; Indicates the first The vertical diffusion width of a discrete particle along the vertical direction in the image coordinate system; Indicates the first The ratio of the major and minor axes of a discrete particle; Indicates the first The peak brightness at the center of each discrete particle.
[0084] After acquiring the defocus depth coordinates of all discrete particles within the field of view that meet the feature confidence threshold, the edge control module divides the underwater observation space according to the numerical distribution of the defocus depth coordinates. The edge control module divides the three-dimensional space along the optical axis into multiple independent slice intervals at fixed physical intervals, based on the... Defocus depth coordinates of discrete particles It is assigned to the depth-of-field slice layer of the corresponding depth range. In the middle. Among them, , where is the depth slice layer number, and is a positive integer. This coordinate partitioning process decouples the three-dimensional spatial distribution of suspended discrete particles into multiple independent two-dimensional depth slice layers, eliminating interference from cross-layer particle projection on subsequent kinematic calculations.
[0085] See attached document Figure 4 After completing the depth decoupling mapping and obtaining the depth slice layer to which each discrete particle belongs, the system performs local kinematics calculations on the independent spatial slices. This process includes the following steps.
[0086] S201, Edge control module extraction time and adjacent times A series of image frames. Among them, This represents the time interval between consecutive image frames. The edge control module is numbered in the depth slice layer as follows: The same depth-of-field slice layer Internally, the system tracks the two-dimensional coordinate changes of discrete particles and establishes a sparse optical flow constraint equation based on the assumption of constant brightness to solve for the two-dimensional instantaneous velocity vector of each discrete particle within the depth-of-field slice layer. For the iterative solution of local extrema based on the sparse optical flow constraint equation, those skilled in the art can use the pyramid Lucas-Carnard algorithm. The specific target tracking and matrix eigenvalue solving process is well-known in the field and will not be elaborated here. After local calculation, the edge control module obtains the depth-of-field slice layer. Inner A discrete particle at time... Two-dimensional instantaneous velocity vector .
[0087] S202, the edge control module establishes a uniform Cartesian coordinate system within the 2D physical observation plane of each depth slice layer. Following a preset physical space step size, the edge control module divides the 2D physical observation plane into a continuous grid matrix, extracts the intersection points of each grid as fixed grid nodes, and records the physical space coordinates of each grid node. .in and These represent the spatial index numbers of the grid nodes in the horizontal and vertical directions, respectively, in the Cartesian coordinate system.
[0088] S203, because the two-dimensional instantaneous velocity vector obtained by the optical flow method has a discrete and irregular distribution in space, the edge control module executes an inverse distance weighted interpolation algorithm to map the discrete data to fixed grid nodes. For physical space coordinates... For any given grid node, the edge control module defines a spatial search radius and extracts all discrete particles whose coordinates fall within that radius. The spatial search radius is set according to a preset physical space step size, ranging from 1.5 to 2.0 times the physical space step size, to ensure that each grid node's spatial neighborhood contains sufficient discrete particle data for computation.
[0089] The edge control module calculates the spatial Euclidean distance from each discrete particle within the spatial search radius to the corresponding grid node, and calculates the grid velocity vector of that grid node based on the interpolation algorithm. The calculation formula is as follows:
[0090] ;
[0091] In the formula, Indicates time Number The physical space coordinates inside the depth-of-field slice layer are The grid velocity vector of the grid node. Indicates the search radius The discrete particles are summed and accumulated. This represents the total number of discrete particles that fall within the search radius of the corresponding grid node space. Indicates time Number The first layer of depth-of-field slice The two-dimensional instantaneous velocity vector of a discrete particle; Indicates the first The coordinates of each discrete particle in physical space are: The spatial Euclidean distance of the grid nodes Power; Indicates the first The coordinates of each discrete particle in physical space are: The spatial Euclidean distance between the grid nodes; This represents the distance decay weighting index.
[0092] Distance decay weight index The value is set to a range of 2 to 3. This parameter controls the degree of interference between neighboring discrete particles and the velocities of grid nodes; a larger value indicates that the weight decays faster for more distant discrete particles. Those skilled in the art can compare the grid interpolation results under standard laminar flow conditions with the theoretical flow field analytical solution to select the value corresponding to the minimum root mean square error of the interpolation as the distance decay weight index for actual operation. The edge control module traverses all the grid nodes within the depth slice layer and performs the interpolation operation described above, converting the disordered discrete particle velocity data into a spatially aligned node velocity matrix, thereby generating a continuous gridded coarse flow field within a single depth slice layer.
[0093] After completing the two-dimensional meshed coarse flow field solution within the depth slice, the system isolates the high-frequency disturbance region and filters out the spatial background flow field to extract the target pure disturbance field. This process includes the following steps.
[0094] S204, after acquiring the meshed coarse flow field within the depth-of-field slice layer, the edge control module calculates the grid velocity variance within the observation window to generate a dynamic variance mask for enveloping the high-frequency movements of underwater organisms. The edge control module targets physical space coordinates... A spatial observation window is established using the grid nodes. The velocity vectors of each grid node within this window are extracted to calculate the mean magnitude and variance of the grid velocity vectors. The calculation formulas are as follows:
[0095] ;
[0096] ;
[0097] In the formula, Indicates time Number The physical space coordinates within the depth-of-field slice layer are The grid nodes correspond to the mean magnitude of the grid velocity vector within the spatial observation window; This indicates the total number of grid nodes contained in the space observation window; Indicates the space observation window The summation operation is performed on each grid node; Indicates the sequence number of the grid node within the space observation window; Indicates time Number The first spatial observation window within the depth-of-field slice layer The magnitude of the grid velocity vector of each grid node; Indicates time Number The physical space coordinates within the depth-of-field slice layer are The grid velocity variance of the grid nodes.
[0098] The edge control module determines the variance of the mesh velocity. Is it greater than or equal to the variance mask threshold? The variance mask threshold This is determined through statistical analysis of pre-collected free-swimming flow field data of underwater organisms in a still water environment. Those skilled in the art can calculate the grid velocity variance between the area occupied by the organism and the external water flow region, generate a bimodal probability density histogram, and select the lowest trough value between the two peaks as the variance mask threshold. .
[0099] When grid velocity variance Greater than or equal to the variance mask threshold At that time, the edge control module determines that the grid node is located in the high-frequency movement coverage area of the underwater organism, and sets the physical spatial coordinates as follows: The dynamic variance mask value of the grid nodes Set to 0. When the grid velocity variance Less than the variance mask threshold At that time, the edge control module determines that the grid node is located in the external hydrodynamic flow field region, and sets its physical space coordinates to... The dynamic variance mask value of the grid nodes Set to 1. The edge control module traverses all mesh nodes within the current foreground depth slice layer to perform mask determination and generate a complete dynamic variance mask matrix.
[0100] S205, the edge control module performs sliding window mid-range filtering on the outer region of the dynamic variance mask to estimate the spatial background flow field and remove it from the gridded coarse flow field. Since the basic circulating water flow generated by the pump operation directly superimposes on and masks the real wake vortex characteristics generated by the target organism, the edge control module needs to filter out this background interference data.
[0101] The edge control module constructs a background filtering window with a preset spatial size. This preset spatial size is set to a physical scale larger than the length of an underwater organism to filter out local target disturbance eddies and extract large-scale background trends. The edge control module applies the background filtering window to the gridded coarse flow field and extracts the dynamic variance mask values within the background filtering window. The effective grid velocity vectors are set to 1. Median sorting is performed on the extracted effective grid velocity vectors, and the corresponding spatial background flow field velocity vectors are output. For median filtering based on a sliding window, those skilled in the art can use a conventional sorting and median-taking algorithm. The specific filtering, ranking, and boundary filling processes are well-known techniques in the field and will not be elaborated here. After filtering and traversal processing, the edge control module obtains the physical space coordinates as follows: Spatial background flow field velocity vector of grid nodes .
[0102] The edge control module subtracts the estimated spatial background flow field velocity vector from the gridded coarse flow field velocity vector, and performs matrix multiplication isolation operation based on the dynamic variance mask value to obtain the final pure hydrodynamic disturbance field. The calculation formula is as follows:
[0103] ;
[0104] In the formula, Indicates time Number The physical space coordinates inside the depth-of-field slice layer are The velocity vector of the pure hydrodynamic disturbance field at the grid node; Indicates time Number The physical space coordinates inside the depth-of-field slice layer are The grid velocity vector of the grid node; Indicates time Number The physical space coordinates inside the depth-of-field slice layer are The spatial background flow field velocity vector of the grid nodes; Indicates time Number The physical space coordinates inside the depth-of-field slice layer are The dynamic variance mask value of the grid nodes.
[0105] Through the above stripping operation, the edge control module eliminates the steady-state interference of the environmental water flow, uses the numerical zero-multiplication operation of the dynamic variance mask to shield the displacement error calculation area caused by the high-frequency movement of the biological body, and retains the real pure water dynamic disturbance field data in each independent depth slice layer.
[0106] See attached document Figure 5 After completing the stripping of the pure hydrodynamic disturbance field based on the dynamic variance mask, the system performs topological parameter transformation processing on the separated target disturbance wake, which includes the following steps.
[0107] S301, after acquiring the pure hydrodynamic disturbance field, the edge control module calculates the spatial divergence and curl parameters of each grid node in the flow field. The edge control module extracts the physical space coordinates as follows: Velocity vector of pure hydrodynamic disturbance field of grid node It is decomposed into the horizontal component of the velocity vector of the pure hydrodynamic disturbance field. and vertical component For the discretization calculation of the partial derivatives of the fluid velocity vector space, those skilled in the art can use the second-order central difference method. The specific derivation process of the discretization is a well-known technique in this field and will not be elaborated here.
[0108] The edge control module calculates the spatial divergence and curl parameters of the mesh node based on the fluid dynamics control equations. The calculation formula is as follows:
[0109] ;
[0110] ;
[0111] In the formula, Indicates time Number The physical space coordinates inside the depth-of-field slice layer are Spatial divergence of grid nodes; Indicates time Number The physical space coordinates inside the depth-of-field slice layer are The curl parameter of the grid nodes; Indicates time Number The physical space coordinates inside the depth-of-field slice layer are The horizontal component of the velocity vector of the pure hydrodynamic disturbance field corresponding to the grid node; Indicates time Number The physical space coordinates inside the depth-of-field slice layer are The vertical component of the velocity vector of the pure hydrodynamic disturbance field corresponding to the grid node; This indicates the calculation of partial derivatives along the horizontal direction; This indicates that the partial derivative is calculated along the vertical direction.
[0112] S302, the edge control module extracts the directional angle distribution of the local region's grid velocity vectors and calculates the corresponding directional information entropy. Directional information entropy is used to quantitatively characterize the disorder of local water flow motion and the degree of fragmentation of vortex structures. The edge control module calculates the directional angle of the velocity vector corresponding to the pure hydrodynamic disturbance field for each grid node, using the following formula:
[0113] ;
[0114] In the formula, Indicates time Number The physical space coordinates inside the depth-of-field slice layer are The velocity vector direction angle of the grid node; This represents the arctangent function.
[0115] The edge control module uses physical space coordinates as Centered on the grid nodes, a feature extraction window is established. The spatial scale of this feature extraction window is set to encompass the physical range of the average fin amplitude of underwater organisms observed. The edge control module divides the complete radian range from 0 to 2π into equal intervals. There are independent angle subintervals, and the total number of angle subintervals is . The value range is set to 8 to 16 to balance directional resolution and statistical stability.
[0116] The edge control module extracts the velocity vector direction angles of all grid nodes within the feature extraction window, statistically analyzes the frequency distribution of each velocity vector direction angle entering each angle sub-interval, and calculates the corresponding direction information entropy. The calculation formula is as follows:
[0117] ;
[0118] In the formula, Indicates time Number The physical space coordinates inside the depth-of-field slice layer are The directional information entropy of the grid nodes; Indicates to The summation operation is performed on each angle sub-interval; This represents the total number of angular subintervals. Indicates the index of the angle sub-interval; Indicates time Number The physical space coordinates inside the depth-of-field slice layer are The velocity vector direction corner within the feature extraction window corresponding to the grid node is entered at the first... The probability of each angle sub-interval; This represents the logarithmic function with base 2.
[0119] After the above traversal calculations, the edge control module transforms the pure hydrodynamic disturbance field velocity vectors in each depth slice layer into a fluid physical topological feature space matrix containing divergence, curl, and directional entropy information, providing high-dimensional physical feature inputs for subsequent behavior pattern determination.
[0120] After completing the calculation of the fluid physics topology feature space, the system adaptively determines the behavioral state of the target underwater organism by comparing the local flow field feature parameters with the baseline distribution data. This process includes the following steps.
[0121] S303, the edge control module establishes a baseline reference standard for determining behavioral states. The edge control module extracts historical pure hydrodynamic disturbance field data for a specific underwater biological population collected under uninterrupted conditions. Uninterrupted conditions refer to the natural state of underwater organisms moving freely in still water without external physical or chemical stimuli. The edge control module performs the same topological feature calculations and spatial feature aggregation on the historical data as described above, obtaining the absolute value of the spatial average divergence, the spatial average information entropy, and the spatial average velocity modulus over a long time span.
[0122] The edge control module performs statistical analysis on these three types of parameters, calculating the corresponding baseline mean and baseline standard deviation. For the specific statistical calculation process of calculating the mean and standard deviation based on historical parameter sequences, those skilled in the art can use conventional formulas for arithmetic mean and sample standard deviation; the basic statistical operations are well-known techniques in the field and will not be elaborated upon here.
[0123] To fully encompass the parameter fluctuation boundaries of normal steady-state swimming, the edge control module adds twice the corresponding baseline standard deviation to the baseline mean of each feature, setting these as the startle divergence threshold, feeding information entropy threshold, and cruising speed threshold, respectively. These baseline thresholds eliminate interference from individual differences, providing a quantitative benchmark for subsequent abnormal behavior identification.
[0124] S304, the edge control module maps and determines whether the target is in a startled, feeding, or roaming state based on the changing patterns of transient divergence integral, duration information entropy, and duration velocity integral. The edge control module extracts time points. Number The effective grid nodes with a velocity vector magnitude greater than zero within the pure hydrodynamic disturbance field inside the depth-of-field slice layer are extracted. Since the zero-multiplication operation of the dynamic variance mask in the previous processing has eliminated the non-real flow field solution data of the biological body region, the effective grid nodes extracted at this time accurately reflect the real water flow disturbance around the target.
[0125] The edge control module calculates the mean of the absolute value of the spatial divergence, the mean of the directional information entropy, and the mean of the velocity vector magnitude of the pure hydrodynamic disturbance field for all effective grid nodes within the current foreground depth slice layer, thereby obtaining the time step. Number The absolute value of the spatial mean divergence of the depth-of-field slice layer Spatial average information entropy and spatial average velocity modulus .
[0126] Based on this, the edge control module calculates the transient divergence integral to quantify the scale of hydrodynamic displacement generated by the instantaneous actions of underwater organisms. The calculation formula is as follows:
[0127] ;
[0128] In the formula, Indicates time Number The transient divergence integral of the depth-of-field slice layer; This indicates that the image frames within the transient time window are summed. This indicates the total number of image frames contained in the transient time window; Indicates the time offset sequence number; Indicates the time interval between consecutive image frames; Indicates at time Number The absolute value of the spatial average divergence of the depth-of-field slice layer.
[0129] The edge control module synchronously calculates the duration information entropy and duration velocity integral to quantify the flow field disorder and total momentum output over a period of time. The calculation formula is as follows:
[0130] ;
[0131] ;
[0132] In the formula, Indicates time Number The duration information entropy of the depth-of-field slice layer; Indicates time Number The velocity integral of the duration of the depth-of-field slice layer; This indicates the total number of image frames contained in the duration window; Indicates at time Number The spatial average information entropy of the depth-of-field slice layer; Indicates at time Number The spatial average velocity modulus of the depth-of-field slice layer.
[0133] The lengths of the transient time window and the duration window are determined by the time interval between consecutive image frames. The transient time window is obtained by multiplying it by the total number of corresponding image frames. The transient time window span is set to 0.1s to 0.3s, a range that covers the muscle contraction cycles of most underwater organisms' transient bursts. The duration window span is set to 2.0s to 5.0s to fully evaluate the wake evolution process resulting from a continuous behavioral action.
[0134] After completing the above calculations, the edge control module compares each parameter with the preset baseline threshold to output the judgment result. When the transient divergence integral... When the divergence exceeds the startle divergence threshold, the edge control module determines that the target underwater organism is in a startled state. In this state, the drastic deformation of the organism generates a large amount of fluid displacement effect in a short period of time, resulting in a significant divergence characteristic in the local observation field.
[0135] When the transient divergence integral Less than or equal to the startle divergence threshold, and the duration information entropy When the entropy value exceeds the feeding information threshold, the edge control module determines that the target underwater organism is in a feeding state. The feeding process is accompanied by local fluid reversal and vortex structure decomposition, and the disorder of fluid motion increases during the observation period.
[0136] When the above two judgment conditions are not met, and the duration velocity integral When the speed exceeds the cruising speed threshold, the edge control module determines that the target underwater organism is in a cruising state. If none of the above conditions are met, the edge control module determines that the target underwater organism is in a stationary or irregular micro-movement state. The cruising state is characterized by the target outputting a relatively regular propulsive wake backward, the duration integral of the velocity modulus of the pure hydrodynamic disturbance field remaining at a high level, and the fluid topology not exhibiting extreme disorder.
[0137] See attached document Figure 6 After completing the behavior determination mapping based on the population baseline statistical distribution and confirming that the target underwater organism is in a cruising state, the system extracts periodic wake features and evaluates frequency domain stability. This process includes the following steps.
[0138] S401, the edge control module extracts the curl time series within the depth-of-field slice layer corresponding to the cruise state. (For time intervals...) Number The depth-of-field slice layer and the edge control module calculate the mean curl parameter of the effective grid nodes in the current image frame and multiple consecutive historical image frames to construct a curl time series of fixed length.
[0139] The edge control module performs a frequency domain transformation on the extracted curl time series. For the frequency domain transformation calculation of discrete time series, those skilled in the art can use the conventional Fast Fourier Transform algorithm for processing. The specific discrete spectrum generation and time-frequency conversion process is well-known in the field and will not be described in detail here.
[0140] After frequency domain transformation, the edge control module acquires the power spectral density distribution data corresponding to the curl time series, searches for the global maximum value of the power spectral density within a preset effective physiological frequency band, and extracts the frequency component corresponding to this global maximum value as the dominant peak frequency of the wake. The effective physiological frequency band is set based on statistical data of the typical tail wag frequencies of the target underwater organism, ranging from 1Hz to 10Hz. The extracted dominant peak frequency accurately reflects the fundamental physical frequency of the alternating shedding of the wake vortex street during the target's stable cruising state in the frequency domain.
[0141] S402, the edge control module calculates the ratio of the primary peak power spectral density corresponding to the dominant peak frequency to the secondary peak power spectral density of the second highest peak, using this ratio as the signal-to-noise ratio in the frequency domain to evaluate the periodic purity of the current flow field. To avoid physical interference from spectral energy leakage in the search for the second highest peak, the edge control module delineates a neighborhood shielding band in the power spectral density distribution data for the dominant peak frequency. The width of this neighborhood shielding band is set to ±5% to ±15% of the dominant peak frequency. Within the remaining frequency range after excluding this neighborhood shielding band, the module searches for the local second largest value of the power spectral density and extracts it as the secondary peak power spectral density corresponding to the second highest peak.
[0142] After obtaining the power spectral density of the main peak and the power spectral density of the secondary peak, the edge control module calculates the signal-to-noise ratio in the frequency domain. The calculation formula is as follows:
[0143] ;
[0144] In the formula, Indicates the number is The signal-to-noise ratio in the frequency domain of the signal extracted within the depth-of-field slice layer; Indicates the number is The dominant peak power spectral density corresponding to the dominant peak frequency within the depth-of-field slice layer; Indicates the number is The power spectral density of the second highest spectral peak within the depth-of-field slice layer; This represents the logarithmic function with base 10.
[0145] By calculating the frequency domain parameter ratios mentioned above, the edge control module quantifies the degree of significance of the periodic characteristics of the underwater organism's wake. The magnitude of the signal-to-noise ratio in the frequency domain directly characterizes the regularity of the target's motion. A larger value indicates that the target underwater organism's cruising motion is more stable and the alternating oscillation of the wake is more pure. This provides a reliable frequency domain quantification basis for the system to subsequently determine whether to intervene in the phase-locked synchronous acquisition mode.
[0146] After completing the extraction of the wake frequency and the frequency domain evaluation of the signal-to-noise ratio, the system switches to phase-locked acquisition mode and issues hardware synchronization commands based on the frequency domain signal-to-noise ratio conditions. This process includes the following steps.
[0147] S403, the edge control module monitors the signal-to-noise ratio (SNR) in the frequency domain over time and switches to phase-locked acquisition mode when preset stability conditions are met. The edge control module establishes a time-domain observation window, extracts multiple continuously generated signal-to-noise ratio (SNR) values in the frequency domain within this window, and compares these SNR values with a frequency domain stability threshold. This frequency domain stability threshold is determined through spectral statistical analysis of historical wake data of target underwater organisms in an ideal laminar flow environment. Those skilled in the art can extract the lower limit distribution pattern of the SNR of pure vortex shedding signals from historical steady-state data to calibrate this parameter. Its value range is set to 10 to 15 dB to effectively distinguish between regular physical eddies and random environmental water flow interference.
[0148] When the signal-to-noise ratio (SNR) of each signal within the time-domain observation window is greater than or equal to the frequency-domain stability threshold, the edge control module determines that the target underwater organism is in a highly regular steady-state cruising phase, and its wake exhibits obvious and stable periodic oscillation characteristics. At this time, the edge control module suspends the routine image acquisition task of the underwater industrial camera, which operates at a fixed cycle, and triggers the system hardware to switch to phase-locked acquisition mode, establishing the prerequisites for subsequent precise fixed-frame acquisition based on fluid physical phase.
[0149] S404, In phase-locked acquisition mode, the edge control module generates a synchronous trigger pulse bound to the dominant peak frequency according to a preset multiple relationship. To acquire sufficient and continuous phase slice observation data within a complete fluid vortex shedding cycle, the edge control module sets a preset multiple coefficient. This preset multiple coefficient is set to a range of 8 to 16 to ensure that the actual sampling frequency not only meets the lower limit requirement of the Nyquist sampling law but also can resolve the spatial evolution details of the fluid vortex within a single cycle at high resolution.
[0150] The edge control module multiplies the extracted dominant peak frequency by a preset multiplier to calculate the synchronization trigger frequency required for phase-locked synchronous acquisition. The calculation formula is as follows:
[0151] ;
[0152] In the formula, This indicates that in phase-locked acquisition mode, based on the number... The synchronization trigger frequency calculated from the depth-of-field slice layer; Indicates the preset multiplier coefficient; Indicates the number is The dominant peak frequency of the wake extracted within the depth-of-field slice layer.
[0153] The edge control module obtains the synchronization trigger frequency based on calculations. The reload value of the internal hardware timer is reconfigured to generate a periodic rectangular square wave signal with a fixed duty cycle, i.e., a synchronization trigger pulse. The edge control module outputs this synchronization trigger pulse simultaneously to the external hard trigger pin of the underwater industrial camera and the strobe control pin of the illumination source with low latency through a general-purpose input / output interface.
[0154] The underwater industrial camera's global shutter immediately executes the exposure action upon receiving the rising edge of the synchronization trigger pulse, while the illumination source simultaneously releases a short, high-intensity light pulse for supplemental lighting. Through this precise hardware-level linkage control, the edge control module enables the image acquisition frequency to dynamically adapt to the physical fundamental frequency of the wake oscillation of the target underwater organism. The system thus acquires clear, motion-locked image frames without blurring at specific hydrodynamic phase points, effectively eliminating motion blur and phase aliasing caused by the temporal evolution of the flow field in conventional asynchronous acquisition modes.
[0155] See attached document Figure 7 After entering phase-locked acquisition mode and continuously acquiring observation images synchronized with the wake fundamental frequency, the system extracts in-phase data and performs time-domain accumulation operations. This process includes the following steps.
[0156] S501, the edge control module extracts multiple frames of pure water dynamic disturbance field velocity vectors at the same phase angle in phase-locked acquisition mode. Since the frequency of the synchronization trigger pulse is set to the product of the dominant peak frequency and a preset multiplier, the continuously acquired image sequence is naturally divided into multiple equidistant discrete phase intervals on the time axis. The edge control module aligns the continuously acquired flow field data according to the discrete phase angle sequence, using a single fluid vortex shedding cycle as a reference. Specifically, the edge control module extracts multiple frames of pure water dynamic disturbance field velocity vectors corresponding to the same discrete phase within historical phase-locked cycles based on the periodic sampling pattern, constructing a flow field sequence with the same phase.
[0157] For in-phase data alignment extraction of multi-period signal sequences, those skilled in the art can use conventional cyclic modulo indexing algorithms for processing. The specific periodic folding and matrix grouping process is a well-known technology in the field and will not be described in detail here.
[0158] The S502 edge control module performs a time-domain coherent averaging operation on multiple frames of in-phase data to cancel random turbulence noise and output an enhanced pure hydrodynamic disturbance field. Under stable cruising conditions, the periodic eddy structures generated by the target underwater organism exhibit highly consistent spatial distribution characteristics at the same discrete phase angle, while the random turbulence noise carried by the ambient water flow typically shows a zero-mean statistical distribution in the time domain. The edge control module calculates the arithmetic mean of the velocity vectors of the pure hydrodynamic disturbance field from multiple historical periods at the same discrete phase angle, using the following formula:
[0159] ;
[0160] In the formula, Indicates the number is The physical space coordinates inside the depth-of-field slice layer are The grid nodes at the th Velocity vector of enhanced pure water dynamic disturbance field under discrete phase angle; This represents the total number of complete cycles involved in the time-domain coherent averaging operation; Indicates to The in-phase data within a complete cycle are summed and accumulated. The sequence number representing the complete cycle; Indicates the actual data collection time Number The physical space coordinates inside the depth-of-field slice layer are The velocity vector of the pure hydrodynamic disturbance field at the grid node; Indicates the first Within the first complete cycle The actual acquisition time corresponding to each discrete phase angle; The index represents the discrete phase angle, and its value ranges from 0 to... .
[0161] Total number of complete cycles involved in time-domain coherent averaging The value range is set to 10 to 20, which effectively balances the suppression of broadband background noise with the reduction of system computational and storage overhead. Through the above cumulative averaging calculation, the edge control module enhances periodic wake signals with the same physical properties through coherent superposition, while irregular random background noise cancels each other out in multiple averaging processes. After enhancement processing, the edge control module effectively removes irregular high-frequency disturbance components attached to the real flow field. Without adding external physical hardware filtering equipment, it extracts and outputs the fine vortex shedding structure of the target underwater organism at a specific phase instant, providing a high signal-to-noise ratio flow field analysis basis for the study of underwater biomimetic propulsion mechanisms.
[0162] While performing the coherent averaging enhancement operation in the time domain of the flow field, the system simultaneously monitors the broken state of the frequency domain signal and immediately cuts off the closed-loop synchronization to restore free sampling. This process includes the following steps.
[0163] S503, during phase-locked acquisition mode, the edge control module continuously evaluates the broken state of the dominant peak frequency of the target underwater organisms. While controlling the hardware to perform closed-loop synchronous acquisition, the edge control module keeps the background frequency domain feature calculation task running synchronously, establishing a sliding time window that progresses over time. The length of this sliding time window is set to include 3 to 5 complete physical cycles corresponding to the dominant peak frequencies of the target underwater organisms, to achieve a balance between the response speed of real-time status monitoring and the frequency resolution required for frequency domain Fourier transform. The edge control module extracts the most recently acquired curl time series within this sliding time window and, based on the aforementioned processing logic that calculates the same signal-to-noise ratio in the frequency domain, calculates the numbered... The real-time signal-to-noise ratio in the frequency domain within the depth-of-field slice layer.
[0164] During actual swimming, target underwater organisms may suddenly change direction, experience abrupt changes in swimming speed, or switch to non-steady-state behaviors such as feeding or startling. These changes in motion directly disrupt the originally stable periodic oscillation pattern of the wake, causing a break in the physical structure of the alternating shedding of vortices. In the frequency domain, this dominant frequency disruption manifests as a sharp dissipation of signal energy at the dominant peak frequency and a surge in non-periodic broadband noise energy. The actual physical result is a rapid decrease in the calculated real-time signal-to-noise ratio in the frequency domain.
[0165] S504, the edge control module executes state branch control based on changes in the signal-to-noise ratio (SNR) value, maintaining phase-locked acquisition or triggering a loss-of-lock mechanism to restore the initial free sampling state. The edge control module continuously compares the calculated real-time signal frequency domain SNR with a preset frequency domain stability threshold, using the following formula:
[0166] ;
[0167] In the formula, This represents the difference between the real-time signal-to-noise ratio in the frequency domain and the frequency domain stability threshold. Indicates the current time Number The real-time signal-to-noise ratio in the frequency domain of the signal obtained within the depth-of-field slice layer; Indicates the current moment when lock loss monitoring is performed; This represents the frequency domain stability threshold previously calibrated.
[0168] When the difference When the signal-to-noise ratio (SNR) of the real-time signal in the frequency domain is greater than or equal to zero, i.e., when the SNR of the real-time signal in the frequency domain is greater than or equal to the frequency domain stability threshold, the edge control module determines that the target underwater organism is still in a stable cruising state, and its tail flow field still maintains highly regular periodic oscillation characteristics. Under this condition, the edge control module maintains the current phase-locked acquisition mode, continues to output synchronous trigger pulses bound to the dominant peak frequency, and instructs the system to continue to execute the aforementioned flow field temporal coherent averaging enhancement calculation.
[0169] When the difference When the signal-to-noise ratio (SNR) in the real-time signal domain is less than zero, meaning it is below the frequency domain stability threshold, the edge control module determines that the behavior of the target underwater organism has deviated from steady-state cruising, and the periodic topological structure of the tail flow field has collapsed. Under these conditions, if a synchronous trigger pulse bound to the original dominant peak frequency continues to be output, the system will be unable to capture matching flow field observation data at the same physical phase point. The forced extraction of data points will cause phase aliasing and flow field artifacts in subsequent time-domain coherent averaging operations.
[0170] The edge control module triggers the unlock mechanism the instant the condition is met, immediately ceasing the generation of synchronous trigger pulses bound to the dominant peak frequency. It then cuts off the synchronous trigger pulses output to the underwater industrial camera's external shutter trigger pin and the illumination source strobe control pin by rewriting the register configuration state of the internal hardware timer. After the system disconnects the external hardware trigger source, the underwater industrial camera's internal control logic automatically takes over the image acquisition task, restoring the image acquisition end to the fixed cycle acquisition period set before entering phase-locked acquisition mode, i.e., restoring the initial free sampling rate.
[0171] Simultaneously, the illumination source synchronously switches back to the conventional strobe lighting mode that matches the camera's internal free clock. By implementing this recapture mechanism, the edge control module avoids the contamination of coherent averaging results by disordered flow field data and allows the system to return to the behavior state determination loop based on the population baseline statistical distribution, thus preparing for the next capture and locking of the flow field's periodic steady state.
[0172] To aid in understanding the present invention, the following detailed explanation of the specific execution process and data changes of the present invention will be provided in conjunction with the actual operating conditions of a specific underwater biological population (taking an adult koi carp with a body length of 15cm in an experimental tank as an example).
[0173] After the system starts, the edge control module first executes step S100, monitoring the video data stream output by the image acquisition module. At a certain moment... The edge control module extracts high-frequency features from the image to identify effective particles within the field of view. Statistical analysis is performed to determine the physical projection value of the total field of view area. 1000cm 2 Total number of effective particles extracted There are 5000. According to the formula... The effective spatial distribution density of particles was calculated. 5cm -2 The value falls within the preset operating range [3, 8] cm. −2 Inside, the edge control module controls the micro-peristaltic pump and the filter circulation pump to maintain their current operating state, ensuring the physical stability of the underwater testing environment. Subsequently, the system extracts the multidimensional morphological feature parameters of each discrete particle, calculates the feature confidence level, filters out overlapping noise, and then inputs the parameters of the effective particles into the depth mapping function, based on the defocus depth coordinates. The physical space is divided into 5 depth-of-field slice layers ( to ).
[0174] After entering steps S200 and S300, the system continuously tracks the behavioral status of the target underwater organism. to Within the duration window, the target underwater organism is numbered... The object maintains a straight, uniform velocity within the depth-of-field slice. The edge control module, through calculation, found that the transient divergence integral of the pure hydrodynamic disturbance field during this time period... The information entropy of the duration is continuously below the startle divergence threshold. Below the ingestion information entropy threshold, but its duration velocity integral The speed reached 45.2 cm, exceeding the pre-defined cruising speed threshold (30.0 cm). Based on this, the edge control module determined that the target underwater organism was in a cruising state.
[0175] Proceed to step S400, edge control module extracts... The curl time series within the depth-of-field slice layer was obtained and frequency domain transformation was performed. Power spectral density distribution data obtained through Fast Fourier Transform calculations showed that, within the effective physiological frequency range of 1Hz to 10Hz, the global maximum power spectral density occurred at a frequency component of 2.5Hz, which the system extracted as the dominant peak frequency of the wake. Its corresponding main peak power spectral density The value is 0.82. After defining a neighborhood shielding band of ±10% within 2.5 Hz, the power spectral density of the second highest spectral peak extracted within the remaining frequency range is... It is 0.04.
[0176] According to the formula The current signal-to-noise ratio in the frequency domain is calculated. Approximately 13.1 dB. Edge control module comparison revealed that the frequency domain signal-to-noise ratio values of continuously generated signals within the current domain observation window were all greater than the pre-calibrated frequency domain stability threshold. (Set to 12.0dB), meeting the preset stability conditions. The edge control module immediately switches to phase-locked acquisition mode and takes the preset multiplier coefficient. It is 10, according to the formula The calculated synchronization trigger frequency is 25.0Hz. Based on this, the edge control module reconfigures the reload value of its internal hardware timer and outputs a 25.0Hz synchronization trigger pulse to the external hard trigger pin of the underwater industrial camera and the strobe control pin of the illumination source to perform synchronized frame acquisition.
[0177] During the phase-locked acquisition mode operation in step S500 ( to The edge control module aligns the continuously acquired flow field data according to the discrete phase angle sequence and sets the total number of complete cycles participating in the time-domain coherent averaging calculation. Set to 15, perform time-domain coherent averaging, and output an enhanced pure water dynamic disturbance field.
[0178] exist At a certain moment, the target underwater organism exhibits a sudden, unsteady-state change, disrupting the periodic topology of the wake. The frequency domain feature calculation task running synchronously in the background detects a surge in broadband noise energy and calculates the current moment of lock-loss monitoring. Real-time signal frequency domain signal-to-noise ratio It dropped rapidly to 8.5 dB.
[0179] According to the formula The difference was calculated. The value is 8.5 − 12.0 = −3.5 dB. Because... If the value is less than zero, the edge control module determines that the target deviates from the steady-state cruise, and instantly triggers the unlock mechanism, cuts off the synchronous trigger pulse, and restores the system to the initial free sampling rate and the normal strobe supplementary lighting mode, thus avoiding the contamination of the coherent averaging calculation results by the disordered flow field data generated by the turning.
[0180] To verify the practical effectiveness of the proposed solution in extracting the pure water dynamic disturbance field and performing flow field enhancement calculations, a comparative experiment was conducted in a controlled water tank. The experiment compared the conventional fixed-frame-rate free sampling method without the phase-locked loop mechanism of this invention with the flow field analysis data of this invention.
[0181] Before performing the zero-multiplication operation of the dynamic variance mask, the meshed coarse flow field contained a large number of spurious velocity vectors caused by the high-frequency movements of the biological organism. After isolation by the dynamic variance mask and elimination by estimation of the spatial background flow field, the extracted velocity vectors of the pure hydrodynamic disturbance field were distributed in the wake vortex street region, removing the steady-state background interference and the erroneous solution region of the organism displacement.
[0182] See attached document Figure 8The horizontal axis of this graph represents frequency in Hz, and the vertical axis represents power spectral density. The legend indicates that the solid line represents the power spectral density curve, and the circle marks represent the extracted dominant peak frequency.
[0183] like Figure 8 As shown, within the effective physiological frequency range of 1Hz to 10Hz, the power spectral density curve exhibits a global maximum at 2.5Hz, which the system extracts as the dominant peak frequency of the wake, with a corresponding main peak power spectral density of 0.82. Simultaneously, within the remaining frequency range excluding the shielded band surrounding this dominant peak frequency, the curve exhibits a local second-largest value near 5.8Hz, which is extracted as the second-highest spectral peak power spectral density, with a value of 0.04.
[0184] The curve exhibits a single-peak dominant distribution characteristic because, under stable cruising conditions, the alternating shedding of the target underwater organism's wake vortex street has regular periodic physical oscillations, with most of the flow field energy concentrated at the fundamental frequency, while the noise energy in other frequency bands is relatively low.
[0185] See attached document Figure 9 The horizontal axis of the graph represents the observation time in seconds (s), and the vertical axis represents the real-time signal-to-noise ratio (SNR) in the frequency domain, in dB. The legend indicates that solid lines represent the real-time SNR, dashed lines represent pre-calibrated frequency stability thresholds, and intersections mark the moments when the unlocking mechanism is triggered.
[0186] like Figure 9 As shown, during the observation period of 10s to 16.5s, the real-time signal-to-noise ratio curve in the frequency domain remained stable, fluctuating around 13.1dB and consistently above the frequency domain stability threshold (dashed line) of 12.0dB. This is because during this period, the target underwater organism maintained steady-state cruising, the wake oscillated periodically and remained stable, and the system met the preset stability conditions and maintained phase-locked acquisition mode.
[0187] After the 16.5s observation period, the real-time signal-to-noise ratio (SNR) curve in the frequency domain showed a rapid downward trend. At the crossover point at 16.5s, the curve intersected with the dashed line representing the frequency domain stability threshold, after which the curve value began to fall below this threshold. The reason for the decline in the curve is that the target underwater organism underwent non-steady-state behaviors such as turning, and the change in its motion state disrupted the periodic oscillation pattern of the wake.
[0188] When the physical structure of the alternating shedding of the vortex sheave is disrupted, signal energy dissipation and non-periodic broadband noise energy increase in the frequency domain. The system then determines that the difference between the real-time signal-to-noise ratio in the frequency domain and the frequency domain stability threshold is less than zero, thereby triggering the unlocking mechanism.
[0189] After employing the phase-locked coherent averaging algorithm of this invention, the system aligns the observation data with the same discrete phase angle at the synchronous triggering frequency. Calculation results show that the variance of the background random turbulence noise in the enhanced pure hydrodynamic disturbance field decreases, the topological boundary of the core vortex street becomes clear, and the directional information entropy remains at a low disorder level.
[0190] In contrast, the conventional fixed-frame-rate free sampling method, which forcibly extracts data points, leads to phase aliasing and flow field artifacts. The lock-out mechanism of this invention cuts off the superposition of invalid data at the moment of target turning, ensuring the signal-to-noise ratio and physical data accuracy of the output specific phase vortex shedding structure.
Claims
1. A fish behavior intelligent recognition system based on an underwater high-resolution camera, characterized in that, include: The image acquisition module, which includes an underwater industrial camera and a cylindrical lens, is used to acquire video data streams containing discrete particles with optical astigmatism distortion. An illumination tracing module includes an illumination source for providing supplemental light and injecting tracing particles as the discrete particles; The water recovery module is used for water bypass filtration. The edge control module is used to receive the video data stream, extract the multidimensional morphological features of the discrete particles, calculate the defocus depth coordinates and divide them into the depth slice layer, solve the two-dimensional instantaneous velocity vector to generate a gridded coarse flow field, and extract the dynamic variance mask of the gridded coarse flow field and the spatial background flow field to obtain the pure water dynamic disturbance field. The spatial divergence, curl parameter, and directional information entropy of the pure hydrodynamic disturbance field are calculated to determine whether the target fish is in a cruising state. The dominant peak frequency of the curl parameter is extracted to calculate the signal-to-noise ratio in the frequency domain. When the signal-to-noise ratio in the frequency domain meets the stability condition, the phase-locked acquisition mode is switched in, and a synchronous trigger pulse is output to the underwater industrial camera and the lighting source. The time-domain coherent averaging operation is performed to output an enhanced pure hydrodynamic disturbance field. When the unlocking mechanism is triggered, the free sampling state is restored.
2. The intelligent fish behavior recognition system based on an underwater high-resolution camera according to claim 1, characterized in that, The illumination tracing module also includes a micro-peristaltic pump, which is used to inject the tracing particles; The water recycling module includes a bypass overflow pipeline and a filter circulation pump. The filter circulation pump is used to perform water bypass filtration via the bypass overflow pipeline. After receiving the video data stream, the edge control module performs high-pass filtering on the image frames of the video data stream to extract high-frequency features of the image, identifies effective particles in the field of view, and establishes projection conversion based on geometric perspective to calculate the spatial distribution density of effective particles. When the effective particle spatial distribution density is less than the lower limit, an acceleration command is sent to the micro-peristaltic pump to increase the rate of injecting the tracer particles; when the effective particle spatial distribution density is greater than the upper limit, an acceleration command is sent to the filter circulation pump to increase the rate of bypass filtration of the water.
3. The intelligent fish behavior recognition system based on an underwater high-resolution camera according to claim 1, characterized in that, The multidimensional morphological features include the horizontal diffusion width of the discrete particles along the horizontal direction, the vertical diffusion width along the vertical direction, the aspect ratio, and the central peak brightness. The edge control module performs numerical normalization processing on the horizontal diffusion width, vertical diffusion width, major-minor axis ratio, and center peak brightness, and calculates the feature confidence level by combining the data with preset weighting coefficients. Discrete particle morphology features that meet the feature confidence threshold are input into a pre-trained depth mapping function to calculate the corresponding defocus depth coordinates. Based on the numerical range of the defocus depth coordinates, the corresponding discrete particles are assigned to the corresponding depth slice layers.
4. The intelligent fish behavior recognition system based on an underwater high-resolution camera according to claim 3, characterized in that, After the edge control module classifies discrete particles into the depth slice layer, it establishes a sparse optical flow constraint equation within the same depth slice layer based on the assumption of constant brightness to solve for the two-dimensional instantaneous velocity vector. A uniform Cartesian coordinate system is established within the two-dimensional physical observation plane of each depth slice layer. A continuous grid matrix is divided, and fixed grid nodes are extracted. The spatial Euclidean distance is calculated, and the grid velocity vector of the grid node is calculated by interpolating the two-dimensional instantaneous velocity vector according to the inverse distance weighted interpolation algorithm to generate a gridded coarse flow field.
5. The intelligent fish behavior recognition system based on an underwater high-resolution camera according to claim 4, characterized in that, After generating the gridded coarse flow field, the edge control module establishes a spatial observation window to calculate the grid velocity variance within the gridded coarse flow field and generates the dynamic variance mask. When the mesh velocity variance is not less than the variance mask threshold, the dynamic variance mask value of the mesh node is set to zero; when the mesh velocity variance is less than the variance mask threshold, the dynamic variance mask value of the mesh node is set to one. A background filtering window is constructed to extract effective grid nodes with a dynamic variance mask value of 1. The median is sorted and the spatial background flow field is calculated and output. The spatial background flow field is subtracted from the gridded coarse flow field and combined with the dynamic variance mask value to perform matrix multiplication isolation operation to obtain the pure water dynamic disturbance field.
6. The intelligent fish behavior recognition system based on an underwater high-resolution camera according to claim 5, characterized in that, After the edge control module acquires the pure water dynamic disturbance field, it calculates the direction angle of the velocity vector of the pure water dynamic disturbance field corresponding to each grid node, and establishes a feature extraction window with the grid node as the center. The complete arc interval is uniformly divided into independent angle sub-intervals. The velocity vector direction angles of all grid nodes within the feature extraction window are extracted. The frequency distribution of each velocity vector direction angle entering each angle sub-interval is statistically analyzed to calculate the directional information entropy of the pure hydrodynamic disturbance field.
7. The intelligent fish behavior recognition system based on an underwater high-resolution camera according to claim 6, characterized in that, The edge control module extracts effective grid nodes and calculates the transient divergence integral of the absolute value of the spatial average divergence, the duration information entropy of the spatial average information entropy, and the duration velocity integral of the spatial average velocity magnitude based on the spatial divergence, directional information entropy, and pure hydrodynamic disturbance field velocity vector, respectively. Compare with a pre-established baseline reference standard that includes startle divergence threshold, feeding information entropy threshold, and cruising speed threshold; When the transient divergence integral is greater than the startled divergence threshold, the fish is determined to be in a startled state. When the transient divergence integral is not greater than the startled divergence threshold and the duration information entropy is greater than the feeding information entropy threshold, the fish is determined to be in a feeding state. When neither of the above two conditions is met and the duration velocity integral is greater than the cruising velocity threshold, the target fish is determined to be in a cruising state.
8. The intelligent fish behavior recognition system based on an underwater high-resolution camera according to claim 7, characterized in that, The edge control module calculates the mean curl parameter of the effective grid nodes to construct a curl time series, performs frequency domain transformation to obtain power spectral density distribution data, and searches for the global maximum value within the preset effective physiological frequency band to extract the dominant peak frequency. In the power spectral density distribution data, a neighborhood shielding band of the dominant peak frequency is defined. Within the remaining frequency band after excluding the neighborhood shielding band, a local second maximum value is searched and extracted as the second peak power spectral density corresponding to the second highest spectral peak. The ratio of the power spectral density of the dominant peak corresponding to the global maximum value to the power spectral density of the second peak is calculated to determine the signal-to-noise ratio in the frequency domain.
9. A fish behavior intelligent recognition system based on an underwater high-resolution camera according to claim 8, characterized in that, The edge control module establishes a time-domain observation window and compares the frequency domain signal-to-noise ratio values of multiple continuously generated signals with the frequency domain stability threshold. When the frequency domain signal-to-noise ratio of each signal within the time domain observation window is not less than the frequency domain stability threshold, it is determined that the frequency domain signal-to-noise ratio of the signal satisfies the stability condition and the phase-locked acquisition mode is entered. The dominant peak frequency is multiplied by a preset multiplier to calculate the synchronization trigger frequency, and a periodic rectangular square wave signal with a fixed duty cycle is generated and output as the synchronization trigger pulse to the underwater industrial camera and the lighting source. The underwater industrial camera's global shutter performs an exposure action the instant it receives the rising edge of the synchronous trigger pulse, and the illumination source synchronously releases short-duration high-intensity light pulses for supplemental lighting.
10. A fish behavior intelligent recognition system based on an underwater high-resolution camera according to claim 9, characterized in that, The edge control module aligns the continuously collected flow field data according to the discrete phase angle sequence, extracts the velocity vectors of multiple frames of pure water dynamic disturbance field corresponding to the same discrete phase within the historical phase-locked period, calculates the arithmetic mean, performs time-domain coherent averaging, and outputs the enhanced pure water dynamic disturbance field. The real-time signal-to-noise ratio (SNR) in the frequency domain is calculated and continuously compared with the frequency domain stability threshold. When the real-time signal-to-noise ratio in the frequency domain is less than the frequency domain stability threshold, the generation of the synchronization trigger pulse is stopped and the external hardware trigger source is cut off. When the unlocking mechanism is triggered, the free sampling state is restored.