Non-contact measurement method, device and equipment for fish tail swing of bionic fish based on machine vision, medium and product

By employing a non-contact measurement method based on machine vision, and utilizing an improved peak detection algorithm and fluid dynamics model, the problem of interference with the fish body caused by traditional measurement methods has been solved. This has enabled the acquisition of high-precision biomimetic fish tail swaying parameters, breaking through the limitations of traditional vision methods and providing comprehensive performance evaluation.

CN121346752APending Publication Date: 2026-01-16SHENZHEN POLYTECHNIC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511687875.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-17
Publication Date
2026-01-16

AI Technical Summary

Technical Problem

Traditional methods for measuring the tail wagging efficiency of bionic fish require installing sensors on the fish's body, which affects its natural movement and is costly. Existing visual methods are unstable in feature extraction in complex aquatic environments and are difficult to obtain dynamic parameters.

Method used

A non-contact measurement method based on machine vision is adopted to obtain fish body positioning information through video stream. Combined with an improved peak detection algorithm and fluid dynamics model, the average period, frequency, oscillation force and output power of the fish tail swing are calculated, and the mathematical model is determined using the Morison equation.

Benefits of technology

It achieves non-contact, automated, and high-precision analysis of the tail sway of a biomimetic fish, avoiding sensor interference and enabling comprehensive acquisition of kinematic and dynamic parameters, supporting in-depth performance evaluation of biomimetic propulsion devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121346752A_ABST
    Figure CN121346752A_ABST
Patent Text Reader

Abstract

The invention discloses a bionic fish tail swing non-contact measurement method, device and equipment based on machine vision, a medium and a product, and relates to the technical field of bionic robots and hydrodynamic force testing. The method comprises the following steps: acquiring a video stream containing motion of a target bionic fish; performing bionic fish target area positioning and image processing on each video frame in the video stream to determine fish body positioning information of a target bionic fish; the fish body positioning information comprises fish body reference point information and fishtail end point information; determining fishtail swing measurement and analysis information according to the fish body positioning information by adopting an improved peak detection algorithm and a fluid mechanics model; the fishtail swing measurement and analysis information comprises average swing period, frequency, swing force and output power; wherein the fluid mechanics model is a mathematical model which is determined by adopting a Morison equation on the basis of fluid mechanics. According to the device and the method, the swinging condition of the fishtail of the bionic fish can be accurately analyzed and measured in a non-contact manner.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of biomimetic robot and fluid dynamics testing technology, and in particular to a non-contact measurement method, device, equipment, medium and product for biomimetic fish tail swing based on machine vision. Background Technology

[0002] In the research of biomimetic robotic fish, the performance of its propellers, especially the oscillation efficiency of its tail, is key to evaluating its overall performance. Traditional measurement methods usually require installing sensors (such as accelerometers, gyroscopes, or force sensors) on the fish's body. This method has significant drawbacks: the installation of sensors alters the fish's mass distribution and fluid profile, interfering with its natural motion and thus affecting the accuracy of the measurement data; moreover, the system is complex to build, costly, and not conducive to rapid iterative testing.

[0003] In recent years, vision-based motion capture technology has been attempted to solve non-contact measurement problems. However, existing simple vision methods often suffer from the following problems: significant background interference in complex aquatic environments leads to unstable target feature extraction; a lack of automatic and robust recognition algorithms for oscillation periods makes them susceptible to noise; and they can only obtain basic kinematic parameters (such as frequency and angle), making it difficult to further derive dynamic parameters (such as force and power), thus failing to meet the needs of in-depth propulsion performance research. Therefore, there is an urgent need for an automated solution that can stably, accurately, and comprehensively analyze the tail oscillation of biomimetic fish from videos. Summary of the Invention

[0004] The purpose of this application is to provide a non-contact measurement method, device, equipment, medium, and product for bionic fish tail swaying based on machine vision, which can accurately analyze and measure the swaying of bionic fish tails in a non-contact manner.

[0005] To achieve the above objectives, this application provides the following solution: In a first aspect, this application provides a non-contact measurement method for the tail swaying of a biomimetic fish based on machine vision, including: Acquire a video stream containing the motion of the target bionic fish; The target area of ​​the bionic fish is located and image processing is performed on each video frame in the video stream to determine the fish body positioning information of the target bionic fish; the fish body positioning information includes: fish body reference point information and fish tail end point information; An improved peak detection algorithm and a fluid dynamics model are used to determine the fish tail swing measurement and analysis information based on the fish body positioning information. The fish tail swing measurement and analysis information includes: average swing period, frequency, swing force, and output power. The fluid dynamics model is a mathematical model based on fluid dynamics and determined using the Morison equation.

[0006] In one embodiment, the bionic fish target region is located and image processing is performed on each video frame in the video stream to determine the fish body positioning information of the target bionic fish, specifically including: For each video frame in the video stream, the target region of the bionic fish is located based on a preset region of interest; The image color space conversion method is used to convert the image information corresponding to each video frame after positioning from RGB color space to HSV color space, and the target bionic fish is identified and extracted based on a preset color threshold to obtain segmented image information. Morphological and contour-finding methods are used to determine contour information based on segmented image information; the contour information includes: fish body contour information and fish tail contour information. The centroid of a preset point set is determined based on the contour information to obtain the fish body positioning information; the preset point set includes multiple points contained in the fish body contour information and multiple points contained in the fish tail contour information.

[0007] In one embodiment, an improved peak detection algorithm and a fluid dynamics model are used to determine the fish tail sway measurement and analysis information based on the fish body positioning information, specifically including: Based on the relative positions of the fish body reference point information and the fish tail end point information contained in the fish body positioning information, the absolute swing angle of the fish tail is calculated frame by frame, and the angle-time sequence is determined. An improved peak detection algorithm is used to analyze and identify the angle-time series to determine the average oscillation period and frequency; the improved peak detection algorithm is determined by introducing a dynamic baseline based on the moving median and a depth threshold. The pixel length in the fish body positioning information is converted into physical length using a preset conversion coefficient, and the absolute swing angle is numerically differentiated to obtain processed information; the processed information includes angular velocity and angular acceleration. Based on the fluid dynamics model and the theory of added mass, the normal fluid dynamics and swing force of the fish tail during the swinging process are determined according to the water density, the area of ​​the fish tail, and the drag coefficient. The instantaneous output power is determined based on the normal hydrodynamic and tail normal velocity information, and the average output power in each oscillation cycle is also determined; the tail normal velocity information is determined based on the processed information; the normal velocity information includes: normal velocity and normal acceleration.

[0008] In one embodiment, the formula for calculating the absolute swing angle is: ; in, This is the absolute swing angle; It is the arctangent function; This refers to the relative positions of the fish's body reference point and the end point of the fish's tail.

[0009] In one embodiment, the expression corresponding to the normal velocity is: ; The expression for the normal acceleration is: ; in, Normal velocity; Tail length; Angular velocity; ω is angular acceleration.

[0010] In one embodiment, the non-contact measurement method for biomimetic fish tail swaying based on machine vision further includes: The measurement and analysis information and the contour information are visualized and displayed, and data charts are generated.

[0011] Secondly, this application provides a non-contact measurement device for biomimetic fish tail swaying based on machine vision, comprising: The video stream acquisition module is used to acquire video streams containing the motion of the target bionic fish. The processing module is used to perform bionic fish target region localization and image processing on each video frame in the video stream to determine the fish body positioning information of the target bionic fish; the fish body positioning information includes: fish body reference point information and fish tail end point information; The measurement and analysis module is used to determine the fish tail swing measurement and analysis information based on the fish body positioning information using an improved peak detection algorithm and a fluid dynamics model. The fish tail swing measurement and analysis information includes: average swing period, frequency, swing force, and output power. The fluid dynamics model is a mathematical model based on fluid dynamics and determined using the Morison equation.

[0012] Thirdly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the aforementioned non-contact measurement method for biomimetic fish tail swaying based on machine vision.

[0013] Fourthly, this application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the aforementioned non-contact measurement method for biomimetic fish tail swaying based on machine vision.

[0014] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the aforementioned non-contact measurement method for biomimetic fish tail swaying based on machine vision.

[0015] According to the specific embodiments provided in this application, the following technical effects are disclosed: This application provides a non-contact measurement method, device, equipment, medium, and product for bionic fish tail swaying based on machine vision. Based on a video stream containing the motion of a target bionic fish, the method performs target region localization and image processing on each video frame to determine the fish's body positioning information. Then, using an improved peak detection algorithm and a fluid dynamics model, the method determines tail swaying measurement and analysis information based on the fish's body positioning information. This tail swaying measurement and analysis information includes: average swaying period, frequency, swaying force, and output power. The fluid dynamics model is a mathematical model based on fluid dynamics and determined using the Morison equation. This application achieves tail swaying measurement without installing sensors on the fish, enabling non-contact analysis and measurement. Furthermore, this application uses an improved peak detection algorithm and fluid dynamics model for measurement and analysis, overcoming the shortcomings of existing simple vision methods to improve measurement accuracy. Therefore, this application can accurately analyze and measure the tail swaying of bionic fish without contact. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 The flowchart shows a non-contact measurement method for the tail swaying of a biomimetic fish based on machine vision. Figure 2 For the analysis of charts and diagrams; where, Figure 2 (a) in the figure is a “swing angle-time” curve with dynamic baseline, threshold line and characteristic peak markers; Figure 2 (b) in the figure is the "instantaneous frequency-time curve" of the fish tail swing; Figure 2 (c) in the figure represents the force-time curve of the fish tail swing; Figure 2 In the figure, (d) represents the "power-time curve" of the fish tail swing; Figure 3 A schematic diagram of the characteristic video footage of a bionic fish's tail swaying. Figure 4A schematic diagram of a tracking video showing the movement of a biomimetic fish's tail; Figure 5 A schematic diagram of a masked video image showing the movement of a biomimetic fish's tail; Figure 6 A diagram showing the movement trajectory of the fish's tail and body; Figure 7 This is a structural diagram of a non-contact measurement device for biomimetic fish tail swaying based on machine vision. Figure 8 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

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

[0019] This application utilizes machine vision, image processing, and data analysis to achieve non-contact analysis of the tail swaying of a biomimetic fish. Specifically, it can be used for automated, high-precision quantitative measurement and analysis of the swaying frequency, amplitude, attitude, and generated hydrodynamics and power of the tail fin / tailstock of biomimetic robotic fish or other underwater propulsion devices.

[0020] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0021] In one exemplary embodiment, such as Figure 1 As shown, a non-contact measurement method for the tail swaying of a biomimetic fish based on machine vision is provided, including: Step 100: Obtain a video stream containing the motion of the target bionic fish.

[0022] Step 200: Perform bionic fish target region localization and image processing on each video frame in the video stream to determine the fish body localization information of the target bionic fish. The fish body localization information includes: fish body reference point information and fish tail end point information.

[0023] Specifically, the process involves locating the target region of the bionic fish and performing image processing on each video frame in the video stream to determine the fish body positioning information of the target bionic fish. This includes: For each video frame in the video stream, the target region of the bionic fish is located based on a preset region of interest.

[0024] The image color space conversion method is used to convert the image information corresponding to each video frame after positioning from RGB color space to HSV color space, and the target bionic fish is identified and extracted based on a preset color threshold to obtain segmented image information.

[0025] Morphological and contour-finding methods are used to determine contour information based on the segmented image information; the contour information includes: fish body contour information and fish tail contour information.

[0026] The centroid of a preset point set is determined based on the contour information to obtain the fish body positioning information; the preset point set includes multiple points contained in the fish body contour information and multiple points contained in the fish tail contour information.

[0027] Step 300: Using an improved peak detection algorithm and a fluid dynamics model, determine the fish tail sway measurement and analysis information based on the fish's positioning information. The fish tail sway measurement and analysis information includes: average sway period, frequency, sway force, and output power; among which, the fluid dynamics model is a mathematical model based on fluid dynamics and determined using the Morison equation.

[0028] Among them, an improved peak detection algorithm and a fluid dynamics model are used to determine the fish tail swing measurement and analysis information based on the fish's body positioning information, specifically including: Based on the relative positions of the fish body reference point information and the tail tip information contained in the fish body positioning information, the absolute swing angle of the fish tail is calculated frame by frame, and the angle-time sequence is determined.

[0029] An improved peak detection algorithm is used to analyze and identify angle-time series to determine the average oscillation period and frequency. The improved peak detection algorithm is determined by introducing a dynamic baseline based on the moving median and a depth threshold.

[0030] The pixel length in the fish body positioning information is converted into physical length using a preset conversion coefficient, and the absolute swing angle is numerically differentiated to obtain the processed information, which includes angular velocity and angular acceleration.

[0031] Based on the fluid dynamics model and the theory of added mass, the normal fluid dynamics and oscillation force of the fish tail during the swinging process are determined according to the water density, the area of ​​the fish tail, and the drag coefficient.

[0032] The instantaneous output power is determined based on the normal hydrodynamic and tail normal velocity information, and the average output power in each oscillation cycle is also determined. The tail normal velocity information is determined based on the processed information. The normal velocity information includes normal velocity and normal acceleration.

[0033] The formula for calculating the absolute swing angle is: .

[0034] in, This is the absolute swing angle; It is the arctangent function; This refers to the relative positions of the fish's body reference point and the end point of the fish's tail.

[0035] The expression for the normal velocity is: .

[0036] The expression for normal acceleration is: .

[0037] in, Normal velocity; Tail length; Angular velocity; ω is angular acceleration.

[0038] As an optional implementation method, the non-contact measurement method for biomimetic fish tail swaying based on machine vision also includes: visualizing the measurement analysis information and contour information, and generating data charts.

[0039] This application enables fully automatic, non-contact, and high-precision analysis of bionic fish tail movements. It only requires inputting a video containing bionic fish movements to automatically complete the entire process from target recognition and motion tracking to data analysis and visualization, and output a comprehensive performance report including swing frequency, angle, swing force, and power.

[0040] Specifically, it is mainly composed of the following four subsystems working together: 1. Fishtail Swing Video Information Acquisition and Image Processing System: This system is responsible for receiving the raw video stream and processing it in real time.

[0041] (1) Target region localization: Define and lock the region of interest (ROI) in the video frame to reduce computation and eliminate background interference.

[0042] (2) Color space segmentation: The image is converted from the BGR color space to the HSV color space, and the unique markers or body of the bionic fish are initially identified and extracted by using a preset color threshold (such as the orange-yellow range).

[0043] (3) Morphological operations and contour finding: Erosion, dilation and other operations are performed on the segmented binary mask image to eliminate noise and connect broken areas. Then, contours in the image are found and filtered and sorted according to features such as contour area, and finally the contours representing the fish body and tail are accurately locked.

[0044] (4) Key point location: Calculate the centroid of a specific set of points on the fish body outline (such as several points at the top) and determine it as the reference point of the fish body. Determine the centroid of the outline with the second largest area as the end point of the fish tail.

[0045] 2. Data Recording and Processing System: This system receives the key point coordinates output by the image processing system and performs time-series analysis and high-order calculations.

[0046] (1) Calculation of kinematic parameters: Based on the relative position of the fish body reference point and the end point of the fish tail, the absolute swing angle of the fish tail is calculated frame by frame to form an angle-time series.

[0047] (2) Oscillation period and frequency analysis: An improved peak detection algorithm is used to analyze the angle-time curve. This algorithm introduces a dynamic baseline and depth threshold based on the moving median, which can effectively filter noise and accurately identify feature points (such as minimum points) in the oscillation period, thereby robustly calculating the average oscillation period and frequency.

[0048] (3) Calculation of dynamic parameters: The dynamic parameters are further derived based on the kinematic data.

[0049] (4) Physical scale calibration: Convert pixel distance into physical distance using a preset pixel-to-meter conversion coefficient.

[0050] (5) Differential calculation: Perform numerical differentiation on the swing angle to obtain angular velocity and angular acceleration.

[0051] (6) Fluid dynamics calculation: Based on the Morison equation and the theory of added mass, combined with parameters such as water density, fish tail area, and drag coefficient, the normal fluid dynamic force on the fish tail during the swinging process is calculated and can be decomposed into components in the X and Y directions.

[0052] (7) Power calculation: The instantaneous output power is obtained by calculating the product of the hydrodynamic force and the normal velocity of the fish tail, and the average output power can be obtained by integrating for each oscillation cycle.

[0053] 3. Visualization System: This system provides intuitive feedback and results display.

[0054] (1) Real-time tracking visualization: The identified fish body outline, fish tail outline, fish body reference point, fish tail end point and the line connecting the two are superimposed on the original video screen, and the angle, coordinate and other data are displayed in real time. The processed video file is generated.

[0055] (2) Mask visualization: Generate and save binary mask videos after color segmentation and morphological processing to verify the accuracy of image processing.

[0056] (3) Data visualization: Draw and save key analysis charts, including: swing angle-time curve (marking feature points and dynamic baseline), swing instantaneous frequency-time curve, force-time curve of fish tail swing, power-time curve of fish tail swing, motion trajectory diagram of fish tail and fish body, etc.

[0057] 4. Data output system: Output all intermediate and final results in a structured format.

[0058] Write frame-by-frame data such as key point coordinates, swing angle, dynamic baseline, and detection status into a CSV file.

[0059] Detailed dynamic data such as force, angular velocity, angular acceleration, and power are written into a dedicated CSV file.

[0060] Save peak point information and analysis result summaries (such as frequency, period, average power, and maximum power) to a text file.

[0061] This application achieves completely non-contact measurement, avoiding interference introduced by sensors; through innovative image processing and data algorithms, it achieves high-precision and robust automatic analysis; most importantly, it breaks through the limitation of traditional vision methods that can only measure kinematics, seamlessly integrating and realizing parameter calculations from kinematics to dynamics (force, power) within the same system, providing unprecedented depth and comprehensive data support for the performance evaluation of biomimetic propulsion vehicles. The specific operational steps in practical applications are as follows: Step 1: System initialization and video input.

[0062] After the system starts, it loads the bionic fish motion video file (e.g., Fish.mp4) to be analyzed. The characteristic video footage of the bionic fish's tail swaying is shown below. Figure 3 As shown, the system automatically creates an output directory to store all subsequently generated result files. Simultaneously, the system reads basic information such as the video's frame rate (FPS) and resolution, and initializes the video writing object to generate the processed tracking video and mask video.

[0063] Step 2: Frame-by-frame image processing and target tracking.

[0064] Reading video frames: The system reads the video frame by frame.

[0065] Define the Region of Interest (ROI) and perform color segmentation: In each frame, define a fixed rectangular region (ROI) to reduce the processing area. Convert the image of this region to the HSV color space and use preset HSV upper and lower thresholds. Perform color filtering to generate a binary mask.

[0066] Morphological optimization: The mask is etched and then expanded to eliminate small noise points and smooth the contour.

[0067] Contour extraction and keypoint localization: Contours are found on the optimized mask. All found contours are sorted by area from largest to smallest. The contour with the largest area is identified as the "fish body," and the centroids of several points at its top are calculated as reference points for the fish body. The contour with the second largest area is identified as the "fish tail," and its centroid is calculated as the end point of the fish tail.

[0068] Angle calculation: based on the fish body reference point in the current frame. and the end of the fish tail Calculate vector And through the arctangent function Calculate the absolute swing angle of the fish tail relative to the fish body.

[0069] Visual overlay and video recording: The identified contours, key points, connecting lines, and calculated angles, coordinates, and other text information are overlaid and displayed in real time on the original video frames to form a tracking video, such as... Figure 4 As shown. Simultaneously, the mask image is colorized to generate a mask video, as shown. Figure 5 As shown, these two video streams are written to the output file in real time.

[0070] Step 3: Data analysis and calculation.

[0071] After all frames have been processed, the system performs in-depth analysis of the recorded time-series data.

[0072] Effective data filtering: Filter out data from frames that failed to successfully identify the target.

[0073] Oscillation Frequency Analysis: Constructing Angle-Time Series Use a window size of A moving median filter is used to calculate the dynamic baseline at each time step. Use the `scipy.signal.find_peaks` function to find local minima in the inverted angle sequence. Set a minimum peak distance to avoid false positives.

[0074] A depth threshold filter is introduced: only when the angle value at a certain minimum point is lower than its corresponding dynamic baseline by more than DEPTH_THRESHOLD (e.g., 5 degrees) is it considered a valid feature peak. This step can effectively remove noise peaks caused by small fluctuations.

[0075] The average time interval between effective peaks is the average oscillation period, and its reciprocal is the oscillation frequency.

[0076] Dynamic parameter calculation: Calibration: using preset conversion coefficients Convert pixel length to physical length. Differentiation: for the sequence of oscillation angles. The angular velocity is obtained by performing first- and second-order numerical differentiation using the numpy.gradient function. and angular acceleration .

[0077] Computational power: Fish tail area A: .

[0078] in, The width of the fish tail (in pixels); The length of the fish tail (in pixels).

[0079] Normal velocity: .

[0080] Normal acceleration: .

[0081] Added mass : .

[0082] in, For the additional quality coefficient, The length of the fish tail. The density of the aqueous solution .

[0083] Additional mass force : .

[0084] in, Normal acceleration of the fish tail .

[0085] resistance : .

[0086] in, This is the drag coefficient; Let be the normal linear velocity of the fish tail (m / s).

[0087] Normal force : .

[0088] It is derived from the Morison equation.

[0089] Calculated power: Instantaneous power The absolute value of the instantaneous power within each complete oscillation cycle is integrated and averaged to obtain the periodic average power.

[0090] Step 4: Results Output and Visualization.

[0091] The system automatically outputs all the above results: frame-by-frame data, peak data, force data, and power data are written to multiple CSV files. Analysis summaries (frequency, period, power) are written to a text file. Analysis charts are automatically generated and saved (see below). Figure 2 This includes: a "swing angle-time" graph with dynamic baselines, threshold lines, and characteristic peak markers, such as... Figure 2 As shown in (a) above, the "instantaneous frequency-time curve" of the fish tail swaying is as follows. Figure 2 As shown in (b) above, the force-time curve of the fish tail swing is as follows. Figure 2 As shown in (c) above. The "power-time curve" of the fish tail swaying, as shown in... Figure 2 As shown in (d) above. The trajectory diagram of the fish's tail and body movement, as shown below. Figure 6 As shown, the locations corresponding to the feature peaks are marked. The processed tracking video and mask video are saved as follows: Figure 4 and Figure 5 .

[0092] Through the above steps, this application achieves fully automated, non-contact analysis of the tail swaying of a biomimetic fish, from image acquisition to calculation of advanced dynamic parameters.

[0093] The beneficial effects of this application are: (1) Non-contact measurement, non-destructive to the real motion state: The analysis is carried out entirely through visual means, without the need to install any sensors on the bionic fish body. This avoids problems such as changes in mass, center of buoyancy, and streamline shape caused by additional sensors, and ensures that the measurement data truly reflects the motion characteristics of the bionic fish itself.

[0094] (2) High degree of automation and greatly improved analysis efficiency: The system runs fully automatically, from video input to the final generation of detailed reports containing parameters such as force and power, without the need for manual intervention. This greatly reduces the data processing time for researchers and supports rapid, batch experimental data analysis.

[0095] (3) High measurement accuracy and strong robustness: The peak detection algorithm using dynamic baseline method and depth threshold filtering can effectively overcome environmental interference such as water wave shadows, bubbles, and temporary obstruction, accurately identify the true oscillation period, and significantly improve the accuracy and reliability of frequency and angle measurement.

[0096] (4) Comprehensive functionality, extending from kinematics to dynamics: The greatest innovation of this application lies in breaking through the limitation of traditional visual methods that can only obtain kinematic parameters. By integrating a fluid dynamics model (Morison equation), it achieves for the first time the direct calculation of the tail swing force and output power of the bionic fish under non-contact conditions. This provides a crucial data dimension for evaluating the propulsion efficiency of bionic thrusters, which was previously difficult to obtain conveniently.

[0097] (5) Rich visualization results support in-depth analysis: The system provides overlay videos, data charts and structured data files, which not only facilitate intuitive and quick understanding of the movement patterns of bionic fish, but also provide a solid foundation for researchers to further conduct data mining and model verification.

[0098] In summary, this application provides an efficient, accurate, and comprehensive solution to the challenges of performance testing for biomimetic thrusters, and has high scientific research and engineering application value.

[0099] In one exemplary embodiment, such as Figure 7 As shown, a non-contact measurement device for biomimetic fish tail swaying based on machine vision is provided, comprising: The video stream acquisition module is used to acquire video streams containing the motion of the target bionic fish.

[0100] The processing module is used to perform bionic fish target region localization and image processing on each video frame in the video stream to determine the fish body positioning information of the target bionic fish; the fish body positioning information includes: fish body reference point information and fish tail end point information.

[0101] The measurement and analysis module is used to determine the fish tail swing measurement and analysis information based on the fish body positioning information using an improved peak detection algorithm and a fluid dynamics model. The fish tail swing measurement and analysis information includes: average swing period, frequency, swing force, and output power. The fluid dynamics model is a mathematical model based on fluid dynamics and determined using the Morison equation.

[0102] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 8As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores non-contact measurement data of bionic fish tail swaying based on machine vision. The I / O interfaces are used for information exchange between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a non-contact measurement method for bionic fish tail swaying based on machine vision.

[0103] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0104] In one exemplary embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0105] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0106] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0107] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0108] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0109] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0110] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0111] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A machine vision-based non-contact measurement method of bionic fish caudal fin oscillation, characterized in that, The method comprises the following steps: acquiring a video stream containing target bionic fish movement; performing bionic fish target region positioning and image processing on each video frame in the video stream to determine fish body positioning information of the target bionic fish; the fish body positioning information comprises fish body reference point information and fish tail end point information; determining fish tail swing measurement and analysis information according to the fish body positioning information by using an improved peak value detection algorithm and a fluid mechanics model; the fish tail swing measurement and analysis information comprises average swing period, frequency, swing force and output power; the fluid mechanics model is a mathematical model determined by using the Morison equation based on fluid mechanics. 2.The machine vision based biomimetic fish tail wagging non-contact measurement method according to claim 1, wherein, The fish body positioning information is determined by performing bionic fish target region positioning and image processing on each video frame in the video stream, specifically comprising the following steps: performing bionic fish target region positioning on each video frame in the video stream based on a preset region of interest; converting image information corresponding to each video frame after positioning from an RGB color space to an HSV color space by using an image color space conversion method, and performing body or marker recognition and extraction on the target bionic fish based on a preset color threshold to obtain segmented image information; determining contour information based on the segmented image information by using a morphological and contour searching method; the contour information comprises fish body contour information and fish tail contour information; determining the centroid of a preset point set according to the contour information to obtain the fish body positioning information; the preset point set comprises a plurality of points contained in the fish body contour information and a plurality of points contained in the fish tail contour information. 3.The machine vision based biomimetic fish tail wagging non-contact measurement method according to claim 1, wherein, The fish tail swing measurement and analysis information is determined according to the fish body positioning information by using an improved peak value detection algorithm and a fluid mechanics model, specifically comprising the following steps: frame-by-frame calculating the absolute swing angle of the fish tail according to the relative positions of the fish body reference point information and the fish tail end point information contained in the fish body positioning information, and determining an angle-time sequence; determining the average swing period and frequency by analyzing and identifying the angle-time sequence by using an improved peak value detection algorithm; the improved peak value detection algorithm is determined by introducing a dynamic baseline based on a moving median and a depth threshold; converting the pixel length in the fish body positioning information into physical length by using a preset conversion coefficient, and performing numerical differentiation processing on the absolute swing angle to obtain processing information; the processing information comprises angular velocity and angular acceleration; determining the normal fluid power and swing force of the fish tail in the swing process based on the water density, the fish tail area and the drag coefficient by using the fluid mechanics model combined with the additional mass theory; determining the instantaneous output power based on the normal fluid power and the fish tail normal velocity information, and determining the average output power in each swing period; the fish tail normal velocity information is determined based on the processing information; the normal velocity information comprises normal velocity and normal acceleration. 4.The machine vision based biomimetic fish tail wagging non-contact measurement method according to claim 3, characterized in that, The calculation formula of the absolute swing angle is: ; wherein, is the absolute swing angle; is the arctangent function; is the relative position of the fish body reference point information and the fish tail end point information. 5.The machine vision based biomimetic fish tail wagging non-contact measurement method according to claim 3, wherein, the expression corresponding to the normal velocity is: ; the expression of the normal acceleration is: ; wherein, is the normal velocity; is the normal acceleration; is the tail length; is the angular velocity; is the angular acceleration. 6.The machine vision based biomimetic fish tail wagging non-contact measurement method according to claim 2, wherein, The method further comprises the following steps: The measurement analysis information and the profile information are visually displayed and data charts are generated.

7. A machine vision-based non-contact measurement device for fish tail oscillation of a bio-mimetic fish, characterized in that, The method comprises the steps of: a video stream acquisition module, configured to acquire a video stream containing target bionic fish movement; a processing module, configured to perform bionic fish target region positioning and image processing on each video frame in the video stream to determine fish body positioning information of the target bionic fish; the fish body positioning information comprises fish body reference point information and fish tail end point information; a measurement analysis module, configured to determine fish tail swing measurement analysis information according to the fish body positioning information by using an improved peak detection algorithm and a fluid mechanics model; the fish tail swing measurement analysis information comprises average swing period, frequency, swing force and output power; the fluid mechanics model is a mathematical model determined based on fluid mechanics by using a Morison equation.

8. A computer device comprising: A memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the machine vision-based non-contact measurement method of bionic fish tail swing according to any one of claims 1-6.

9. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the machine vision-based non-contact measurement method of bionic fish tail swing according to any one of claims 1-6.

10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the machine vision-based non-contact measurement method of bionic fish tail swing according to any one of claims 1-6.