Automatic fish size measuring method and system based on computer vision

Through computer vision technology, analysis of changes in fish movement, posture and perspective, and compensating, the problem of inaccurate measurement of traditional fish size measurement methods during fish swimming is solved, and higher measurement accuracy and reliability are achieved .

CN119103971AInactive Publication Date: 2024-12-10TIANJIN RES INST FOR WATER TRANSPORT ENG M O T
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411283057.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2024-12-10
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional fish size measurement methods cause inaccurate measurement results due to blurred motion, changes in posture and perspective during fish swimming.

Method used

Using automated fish size measurement methods based on computer vision, fish images are collected through multi-view synchronous shooting and high-frame-rate videos, key feature points of fish are identified, motion blur, posture changes and perspective changes are analyzed, and compensation is carried out to correct the initial process. Size, get more accurate fish sizes.

Benefits of technology

It effectively reduces dimensional errors caused by changes in motion, posture and viewing angle, improves measurement accuracy and reliability, and ensures the stability of measurement results at different shooting angles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119103971A_ABST
    Figure CN119103971A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic fish size measuring method and system based on computer vision, and relates to the technical field of bioinformatics. According to the automatic fish size measurement method and system based on computer vision, fish images and videos are collected, the influence of dynamic characteristics, posture change and visual angle change of fish movement on the initial size of fish is analyzed, and the fish movement compensation size, the posture change compensation size and the visual angle change compensation size are obtained; the size error caused by movement is effectively corrected, and the interference of attitude change on the measurement result is reduced, so that the size measurement precision is improved, the reliability of the measurement result at different shooting angles is ensured, and the size measurement is more stable; meanwhile, the fish motion compensation size, the posture change compensation size and the visual angle change compensation size are comprehensively analyzed, and the fish initial size is corrected and compensated. Different types of error sources are effectively managed, so that the system can provide stable and reliable measurement results in various environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of bioinformatics, and in particular to an automatic fish size measurement method and system based on computer vision. Background Art

[0002] With the rapid development of computer vision technology, it has promoted the intelligent transformation of various industries. In the field of fisheries, the application of computer vision technology not only improves the accuracy and efficiency of measurement, but also reduces labor costs and labor intensity. By introducing automation and intelligent technology, traditional fisheries can be transformed and upgraded to develop in the direction of modernization and intelligence.

[0003] For example, the announcement number CN117029673B discloses a method for measuring the multi-dimensional surface of fish based on artificial intelligence, which collects fish pictures, including a scale in the background of the fish pictures; annotates the fish pictures, uses the fish pictures and the corresponding labels as a sample, generates a training data set and a verification data set; inputs the training data set into a deep learning model to train the deep learning model; inputs the sample to be tested into the trained deep learning model to calculate the fish body size. The present invention is versatile and suitable for the needs of obtaining the multi-faceted dimensions of fish bodies when sampling a variety of fish on a large scale. It has the characteristics of high efficiency, accuracy, and reduction of human errors. Most importantly, it greatly reduces labor costs and workload.

[0004] However, when the fish is swimming, the motion blur, posture changes, and viewing angle changes of the acquisition equipment will affect the measurement results of the traditional fish size measurement method, making it difficult to accurately measure the size of the fish. Summary of the invention

[0005] In view of the deficiencies in the prior art, the present invention provides an automated fish size measurement method and system based on computer vision, which solves the problems of the above-mentioned background technology.

[0006] To achieve the above objectives, the present invention is implemented through the following technical solutions: an automated fish size measurement method based on computer vision, comprising the following steps: S1. Collecting fish images and videos through multi-perspective synchronous shooting and high frame rate video, pre-processing the images and videos, identifying the key feature points of the fish through computer vision, calculating the pixel distance between the key points of the fish head and tail, and obtaining the initial size of the fish; S2. Analyzing the influence of the dynamic characteristics of the fish movement on the initial size of the fish, evaluating the degree of motion blur, and obtaining the fish motion compensation size; S3. Detecting the position changes of the key feature points of the fish in different frames, analyzing the time series, and obtaining the posture change compensation size; S4. Analyzing the position offset of the key feature points caused by the perspective change, evaluating the degree of influence of the perspective change on the measurement of the initial size of the fish, and obtaining the perspective change compensation size; S5. Comprehensively analyzing the fish motion compensation size, the posture change compensation size and the perspective change compensation size, correcting and compensating the initial size of the fish, and obtaining the fish correction size.

[0007] Furthermore, the specific process of preprocessing images and videos is as follows: segment the acquired video into frame sequences, denoise each frame, adjust the contrast and brightness of each frame, detect the outline of fish in the image through edge detection algorithm, separate the fish from the background, and identify the key feature points of fish through Harris corner detection in computer vision, which include the head and tail of the fish.

[0008] Furthermore, the influence of the dynamic characteristics of fish movement on the initial size of fish is analyzed, and the specific process of evaluating the degree of motion blur is as follows: through the segmented frame sequence, the optical flow field between adjacent video frames is calculated, the motion vector of each pixel in the image is obtained, and the key feature points of the fish are tracked, the movement trajectory of the fish is drawn, the pixel motion speed is calculated for each pixel, and the motion blur model is established based on the proportional relationship between motion blur and pixel motion speed.

[0009] Furthermore, the specific process of obtaining the fish motion compensation size is as follows: based on the motion blur model, the pixel motion speed is averaged, the blur value corresponding to the average pixel motion speed is calculated, the blur degree caused by the fish motion is quantified, and the fish motion compensation factor is obtained; Based on the fish motion compensation factor, the initial size of the fish is corrected to obtain the fish motion compensation size.

[0010] Furthermore, the position changes of key feature points of fish in different frames are detected by the posture estimation algorithm. The specific process of analyzing the time series is as follows: the key feature points of fish are detected in each frame of the segmented frame sequence by the posture network algorithm, the coordinates of each key feature point are recorded, time series data are constructed for each key feature point, and its position in different frames is recorded; time series data is constructed by analyzing the key feature points, and the displacement change of each key feature point is calculated.

[0011] Furthermore, the specific process of obtaining the posture change compensation size is as follows: according to the displacement of each key point in the time series data, the posture change of the fish between different frames is calculated, and a linear relationship between the posture change and the initial size of the fish is established through a linear regression model to obtain the posture change compensation factor; based on the posture change compensation factor, the initial size of the fish is corrected to obtain the posture change compensation size.

[0012] Furthermore, by analyzing the position offset of key feature points caused by perspective change, the specific process of evaluating the influence of perspective change on measuring the initial size of fish is as follows: fish image frames taken at multiple perspectives are extracted from the segmented frame sequence, the key feature points of fish are detected in the image frames at each perspective, the position offset of the key feature points of fish at different perspectives is obtained, and the perspective change is calculated based on the offset of the key points.

[0013] Furthermore, the specific process of obtaining the perspective change compensation size is as follows: based on the position offset of the key feature points of the fish under different perspectives, a linear regression equation is established according to the relationship between the perspective change and the initial size of the fish to obtain the perspective change compensation factor; based on the perspective change compensation factor, the initial size of the fish is corrected to obtain the perspective change compensation size.

[0014] Furthermore, the fish motion compensation size, posture change compensation size and viewing angle change compensation size are comprehensively analyzed, and the specific process of correcting and compensating the initial size of the fish is as follows: the fish motion compensation size, posture change compensation size and viewing angle change compensation size are weighted averaged, and comprehensive calculation processing is performed with the initial size of the fish to obtain the corrected size of the fish.

[0015] The automatic fish size measurement system based on computer vision comprises the following modules: a data acquisition and processing module, a motion compensation analysis module, a posture change compensation module, a viewing angle change compensation module and a size correction module; the data acquisition and processing module is used to acquire fish images and videos through multi-view synchronous shooting and high frame rate video, pre-process the images and videos, identify the characteristic points of the fish through computer vision, calculate the pixel distance between the key points of the head and tail of the fish, and obtain the initial size of the fish; the motion compensation analysis module is used to analyze the influence of the dynamic characteristics of the fish movement on the initial size of the fish, evaluate the degree of motion blur, and obtain the fish movement compensation size; the module is used to detect the position change of the key characteristic points of the fish in different frames, analyze the time series, and obtain the posture change compensation size; the viewing angle change compensation module is used to analyze the position offset of the key characteristic points caused by the viewing angle change, evaluate the influence of the viewing angle change on the measurement of the initial size of the fish, and obtain the viewing angle change compensation size; the size correction module is used to comprehensively analyze the fish movement compensation size, the posture change compensation size and the viewing angle change compensation size, correct and compensate the initial size of the fish, and obtain the fish correction size.

[0016] The present invention has the following beneficial effects: (1) This computer vision-based automated fish size measurement method collects fish images and videos, analyzes the dynamic characteristics of fish movement, the influence of posture changes and perspective changes on the initial size of fish, obtains the fish movement compensation size, posture change compensation size and perspective change compensation size, can effectively correct the size error caused by movement, reduce the interference of posture changes on the measurement results, thereby improving the accuracy of size measurement, ensuring the reliability of measurement results at different shooting angles, and making size measurement more stable.

[0017] (2) The computer vision-based automatic fish size measurement system is equipped with a data acquisition and processing module, a motion compensation analysis module, a posture change compensation module, a perspective change compensation module, and a size correction module. Through the cooperation of each module, the system can effectively process and correct the errors caused by motion, posture change, and perspective change, and significantly improve the accuracy of fish size measurement. By comprehensively analyzing the fish motion compensation size, posture change compensation size, and perspective change compensation size, the initial size of the fish is corrected and compensated. Different types of error sources are effectively managed, so that the system can provide stable and reliable measurement results in various environments.

[0018] Of course, any product implementing the present invention does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1The figure is a flow chart of the automatic fish size measurement method based on computer vision of the present invention.

[0020] Figure 2 This is a flow chart of the automatic fish size measurement system based on computer vision of the present invention. DETAILED DESCRIPTION

[0021] The embodiments of the present application solve the problem of inaccurate measurement of fish size caused by motion blur, posture changes, and viewing angle changes of acquisition equipment during the swimming process of fish through an automated fish size measurement method and system based on computer vision.

[0022] The overall idea of ​​the problem in the embodiment of this application is as follows: Fish images and videos are collected through multi-view synchronous shooting and high frame rate video. The images and videos are preprocessed, the key feature points of the fish are identified through computer vision, the pixel distance between the key points of the fish head and tail is calculated, and the initial size of the fish is obtained.

[0023] By analyzing the impact of the dynamic characteristics of fish motion on the initial size of the fish, the degree of motion blur is evaluated and the motion-compensated size of the fish is obtained.

[0024] By detecting the position changes of key feature points of fish in different frames, the time series is analyzed and the compensation size of posture changes is obtained.

[0025] By analyzing the positional displacement of key feature points caused by perspective changes, the influence of perspective changes on the initial size of measured fish is evaluated, and the perspective change compensation size is obtained.

[0026] The fish motion compensation size, posture change compensation size and viewing angle change compensation size are comprehensively analyzed, and the initial size of the fish is corrected and compensated to obtain the fish corrected size.

[0027] See also Figure 1The embodiment of the present invention provides a technical solution: an automatic fish size measurement method based on computer vision, comprising the following steps: S1. Collecting fish images and videos through multi-view synchronous shooting and high frame rate video, pre-processing the images and videos, identifying the key feature points of the fish through computer vision, calculating the pixel distance between the key points of the head and tail of the fish, and obtaining the initial size of the fish; S2. Analyzing the influence of the dynamic characteristics of the fish movement on the initial size of the fish, evaluating the degree of motion blur, and obtaining the fish motion compensation size; S3. Detecting the position changes of the key feature points of the fish in different frames, analyzing the time series, and obtaining the posture change compensation size; S4. Analyzing the position offset of the key feature points caused by the perspective change, evaluating the influence of the perspective change on the measurement of the initial size of the fish, and obtaining the perspective change compensation size; S5. Comprehensively analyzing the fish motion compensation size, the posture change compensation size and the perspective change compensation size, correcting and compensating the initial size of the fish, and obtaining the fish correction size.

[0028] In this embodiment, when measuring the size of fish, according to the characteristics of different fish species, the length measurement method of fish can be divided into full length and body length. The straight line length from the snout to the end of the tail fin of the fish is the full length, which is usually applicable to fish species: sole (such as flounder), rhinoceros cod, etc.; the straight line length from the snout to the end of the tail vertebrae of the fish is the body length. The fish whose body length represents the length of the fish body include the Sciaenidae, Flatfish, and Flatfish, etc., whose tail vertebrae are easy to observe. In step S1, multi-view synchronous shooting is to use multiple cameras to synchronously shoot fish from different angles to obtain all-round image data of the fish. High frame rate video acquisition is to use a high frame rate camera to capture fast-moving fish to ensure that clear images can be obtained even if the fish moves faster. Computer vision recognition identifies key feature points in fish images by using computer vision algorithms. Based on the identified key feature points, the pixel distance between the head and the tail is calculated, and the pixel distance is converted into the actual size of the fish in combination with the scale information to obtain the initial size data. In step S2, motion blur evaluation uses optical flow method or other motion analysis technology to evaluate the degree of motion blur. Motion blur refers to the blurring phenomenon caused by the rapid movement of fish during image acquisition, which affects the clarity of the image and the accuracy of size measurement. In step S3, posture estimation is to detect the position of the key feature points of the fish in each frame of the video and track the changes of these points over time. In step S4, the position offset of the key feature points caused by the change in perspective is analyzed, and the impact of the perspective change on the initial size measurement of the fish is evaluated by comparing the image data under different perspectives. In step S5, the motion compensation factor, posture change compensation factor and perspective change compensation factor are comprehensively analyzed, and the initial size data is corrected using the comprehensive compensation factor to obtain the corrected size of the fish. This corrected size takes into account all sources of error, making the measurement result more accurate and reliable.

[0029] Specifically, the specific process of preprocessing images and videos is as follows: segment the collected video into frame sequences, denoise each frame, adjust the contrast and brightness of each frame, detect the outline of fish in the image through the edge detection algorithm, separate the fish from the background, and identify the key feature points of the fish through Harris corner detection in computer vision, which includes the head and tail of the fish.

[0030] In this embodiment, the continuous video stream is decomposed into a series of static image frames, each of which can be processed separately. Using video processing tools or algorithms, the video is divided into equally spaced frames along the time axis. Denoising The process of reducing noise in an image: applying denoising algorithms such as Gaussian filtering, median filtering, or bilateral filtering to smooth the image and remove background noise. Denoising helps to improve the clarity and detail of the image, especially in images taken under low light or high ISO conditions. Adjusting contrast and brightness The process of adjusting contrast and brightness: using image adjustment algorithms to adjust the contrast and brightness of each frame. Contrast adjustment increases the difference between light and dark in an image, while brightness adjustment affects the overall brightness of the image. Histogram equalization techniques can be used to automatically adjust these parameters. The purpose of edge detection: detect the outline of the fish in the image and extract the boundary information of the fish. The process of edge detection: applying edge detection algorithms such as Canny edge detection to identify significant edges in the image. These algorithms detect edges by identifying where the grayscale changes, thereby helping to separate the fish from the background. Using segmentation algorithms such as color-based segmentation, threshold segmentation, or background subtraction methods, separate the fish from the background. This can be achieved by distinguishing the color or texture of the fish and the background. The purpose of Harris corner detection is to identify the key feature points on the fish body surface, the head and the tail, so as to measure the size. The process of Harris corner detection is to detect the corners in the image by calculating the corner response function in the image. Corners are usually where the edges and textures change in the image, and can provide stable feature points for further analysis.

[0031] Specifically, the influence of the dynamic characteristics of fish movement on the initial size of fish is analyzed, and the specific process of evaluating the degree of motion blur is as follows: through the segmented frame sequence, the optical flow field between adjacent video frames is calculated, the motion vector of each pixel in the image is obtained, and the key feature points of the fish are tracked, the movement trajectory of the fish is drawn, the pixel motion speed is calculated for each pixel, and the motion blur model is established based on the proportional relationship between motion blur and pixel motion speed.

[0032] In this implementation, the optical flow field is a vector field that describes the motion of each pixel in the image. The Horn-Schunck method is used to calculate the optical flow field between adjacent video frames to obtain the motion vector of each pixel. The calculation formula for the pixel motion speed is: ;in, is the speed of the nth pixel, and are the motion vector components of the nth pixel in the optical flow field in the x and y directions, respectively. Motion blur is the phenomenon that the image is blurred due to the fast movement of fish. The degree of blur can be evaluated by analyzing the movement speed. A motion blur model is established to quantify motion blur. The collected data is subjected to linear regression analysis to determine the movement speed. and blur The equation of the fitted straight line is: ; where k and b are the coefficients obtained from regression analysis.

[0033] Specifically, the specific process of obtaining the fish motion compensation size is as follows: based on the motion blur model, the pixel motion speed is averaged, the blur value corresponding to the average pixel motion speed is calculated, the blur degree caused by the fish motion is quantified, and the fish motion compensation factor is obtained; Based on the fish motion compensation factor, the initial size of the fish is corrected to obtain the fish motion compensation size.

[0034] In this embodiment, the average motion speed of all pixels is calculated. For all pixels in the image, the average motion speed is calculated. , ; where M is the total number of pixels, is the motion speed of the nth pixel, calculate the average blur value, use the motion blur model, and convert the average motion speed Convert to the corresponding fuzzy value ; ; where x and b are model parameters determined in advance through experiments, describing the linear relationship between motion blur and motion speed. Determine the motion compensation factor. Determine the motion compensation factor according to the predefined blur compensation rule like ,but ,like ,but ,like ,but The motion compensation factor of the fish is calculated by quantifying the blur degree. The motion compensation factor is used to correct the size measurement error caused by the movement of the fish to ensure the accuracy of the measurement; the calculation formula for obtaining the fish motion compensation size is as follows: ; Parameter explanation, : Fish motion compensation size, : Initial size of fish. :Natural constants, : The weight factor of the motion compensation factor, which determines the intensity of the effect of the motion compensation factor on the size, : Motion compensation factor, representing the size change of fish caused by motion blur.

[0035] Specifically, the position changes of key feature points of fish in different frames are detected through the posture estimation algorithm, and the specific process of analyzing the time series is as follows: the key feature points of fish are detected in each frame of the segmented frame sequence through the posture network algorithm, the coordinates of each key feature point are recorded, time series data are constructed for each key feature point, and its position in different frames is recorded; time series data is constructed by analyzing the key feature points, and the displacement change of each key feature point is calculated.

[0036] In this implementation, the posture network algorithm detects key feature points, and the posture estimation algorithm is used to detect key feature points of fish, such as the head and tail, in each frame after the video segmentation. For each frame of the image, the posture estimation algorithm will output the coordinate positions of multiple key feature points. The coordinate positions of the key feature points detected in each frame are recorded to generate a data set containing these coordinate positions. Key feature points in the frame , record its coordinates . Construct time series data for each key feature point and record its position changes in different frames. The following is an example of time series data: key feature point The time series data is ,in is the number of frames. Analyze the time series data of key feature points, analyze the time series data of each key feature point, and record the coordinates of the key feature points detected in each frame to form time series data. These data can reflect the movement trajectory and posture changes of fish throughout the video. The time series data provides continuous position information for each key feature point, which is convenient for analyzing its movement at different time points. The displacement change can be obtained by calculating the displacement of each key feature point between adjacent frames. ;in Represents key feature points In the and The displacement change between frames, and Indicates +1Key feature points in the frame The x-axis and y-axis coordinates, and Indicates Key feature points in the frame The x-axis and y-axis coordinates.

[0037] Specifically, the specific process of obtaining the posture change compensation size is as follows: according to the displacement of each key point in the time series data, the posture change of the fish between different frames is calculated, and a linear relationship between the posture change and the initial size of the fish is established through a linear regression model to obtain the posture change compensation factor; based on the posture change compensation factor, the initial size of the fish is corrected to obtain the posture change compensation size.

[0038] In this implementation, the key feature points are numbered 1, 2, 3...c...m, and the video frames are numbered 1, 2, 3...i...f. The formula for calculating the change in the posture of fish between different frames is as follows: ; Pose represents the change in posture, which is the average displacement of all key feature points in the entire video sequence. It reflects the overall degree of posture change of fish in the video. represents the total number of key feature points, that is, the number of feature points in the video used for posture analysis, f represents the total number of frames in the video, and Indicates +1Key feature points in the frame The x-axis and y-axis coordinates, and Indicates Key feature points in the frame The x-axis and y-axis coordinates of the fish are obtained. A linear regression model is used to establish a linear relationship between the posture change and the initial size of the fish. The posture change is set as the independent variable. , the posture change compensation factor is the dependent variable , establish the linear equation: ; Among them, a and is the parameter of the linear regression model. Get the posture change compensation factor and calculate the posture change compensation factor according to the linear regression model. Posture change compensation factor It can be expressed as the parameters a and And the amount of posture change Function; the calculation formula for obtaining the posture change compensation size is as follows, ;Parameter explanation, : Fish size after posture change compensation, : Initial size of fish, :Natural constants, : The weight factor of the posture change compensation factor, which determines the intensity of the influence of the posture change compensation factor on the size, : Posture change compensation factor, which indicates the size change of fish caused by posture change.

[0039] Specifically, by analyzing the position offset of key feature points caused by perspective change, the specific process of evaluating the influence of perspective change on measuring the initial size of fish is as follows: fish image frames taken at multiple perspectives are extracted from the segmented frame sequence, the key feature points of fish are detected in the image frames at each perspective, the position offset of the key feature points of fish at different perspectives is obtained, and the perspective change is calculated based on the offset of the key points.

[0040] In this implementation, the position offset calculation formula is: ;in, and Respectively in adjacent frames and The coordinates of the key feature points in , FG represents the position offset of the key feature points. Calculation of the change in viewing angle: There are multiple offsets of key feature points, which are numbered 1, 2, 3...q...r; their standard deviation is calculated as a measure of the change in viewing angle. The formula for calculating the change in viewing angle is as follows: ;in represents the qth position offset, represents the number of key feature points, Indicates the change in viewing angle.

[0041] Specifically, the specific process of obtaining the perspective change compensation size is as follows: based on the position offset of the key feature points of the fish under different perspectives, a linear regression equation is established according to the relationship between the perspective change and the initial size of the fish to obtain the perspective change compensation factor; based on the perspective change compensation factor, the initial size of the fish is corrected to obtain the perspective change compensation size.

[0042] In this embodiment, a linear regression model is established based on the data points of the change in viewing angle and the initial size of the fish. The linear regression equation is expressed as: ;in, and are the regression coefficients, determined by fitting the data points using the least squares method, using a linear regression model. Represents the viewing angle change compensation factor; the viewing angle change compensation size formula is as follows, , : Fish size after perspective change compensation, : initial size of fish, : natural constants, The weight factor of the viewing angle compensation factor determines the intensity of the effect of the viewing angle compensation factor on the size. : Perspective change compensation factor, which indicates the size change of fish caused by perspective change.

[0043] Specifically, the fish motion compensation size, posture change compensation size and viewing angle change compensation size are comprehensively analyzed, and the specific process of correcting and compensating the initial size of the fish is as follows: the fish motion compensation size, posture change compensation size and viewing angle change compensation size are weighted averaged, and comprehensive calculation processing is performed with the initial size of the fish to obtain the corrected size of the fish.

[0044] In this embodiment, based on the motion compensation factor , Attitude change compensation factor and the viewing angle compensation factor The calculation formula for the corrected size of fish is as follows: ; Where LE represents the corrected size of fish, represents the initial size of the fish, e represents a natural constant, represents the weighting factor for the fish motion compensation size, represents the weight factor of the posture change compensation size, The weight factor representing the size compensation for the change in viewing angle. Collect a large amount of fish size measurement data under different motion, posture and viewing angle conditions. Perform statistical analysis on the collected data to evaluate the degree of influence of each compensation factor on the measurement results. Use the gradient descent method to adjust the weight factor so that the corrected size is closest to the true value.

[0045] See also Figure 2 The automatic fish size measurement system based on computer vision includes the following modules: a data acquisition and processing module, a motion compensation analysis module, a posture change compensation module, a view angle change compensation module, and a size correction module; the data acquisition and processing module is used to collect fish images and videos through multi-view synchronous shooting and high frame rate video, pre-process the images and videos, identify the characteristic points of the fish through computer vision, calculate the pixel distance between the key points of the head and tail of the fish, and obtain the initial size of the fish; the motion compensation analysis module is used to analyze the influence of the dynamic characteristics of the fish movement on the initial size of the fish, evaluate the degree of motion blur, and obtain the fish motion compensation size; the time series is used to detect the position changes of the key characteristic points of the fish in different frames, analyze the time series, and obtain the posture change compensation size; the view angle change compensation module is used to analyze the position offset of the key characteristic points caused by the view angle change, evaluate the influence of the view angle change on the measurement of the initial size of the fish, and obtain the view angle change compensation size; the size correction module is used to comprehensively analyze the fish motion compensation size, the posture change compensation size, and the view angle change compensation size, correct and compensate the initial size of the fish, and obtain the fish correction size.

[0046] In this implementation, multiple compensations are made to the fish size by comprehensively considering the effects of movement, posture and perspective changes, significantly improving the accuracy of measurement. The entire measurement process is based on computer vision algorithms, which realizes automated processing from data collection to size calculation and reduces manual intervention. The system is suitable for a variety of different environments and fish species, and can ensure the reliability and accuracy of measurement results under different perspectives and motion states.

[0047] In summary, this application has at least the following effects: The computer vision-based automatic fish size measurement method and system collect fish images and videos, analyze the dynamic characteristics of fish movement, the influence of posture change and perspective change on the initial size of fish, obtain the fish movement compensation size, posture change compensation size and perspective change compensation size, can effectively correct the size error caused by movement, reduce the interference of posture change on the measurement result, thereby improving the accuracy of size measurement, ensuring the reliability of measurement results at different shooting angles, and making the size measurement more stable. By comprehensively analyzing the fish movement compensation size, posture change compensation size and perspective change compensation size, the initial size of the fish is corrected and compensated. Different types of error sources are effectively managed, so that the system can provide stable and reliable measurement results in various environments. By setting a data acquisition and processing module, a motion compensation analysis module, a posture change compensation module, a perspective change compensation module, and a size correction module, through the mutual cooperation of each module, the system can effectively process and correct the errors caused by movement, posture change and perspective change, and significantly improve the accuracy of fish size measurement.

[0048] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0049] The present invention is described with reference to flowcharts and / or block diagrams of systems, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0050] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0051] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0052] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0053] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. An automated fish size measurement method based on computer vision, characterized in that: The following steps are involved: S1. Collect fish images and videos through multi-view synchronous shooting and high frame rate video, pre-process the images and videos, identify the key feature points of fish through computer vision, calculate the pixel distance between the key points of the head and tail of the fish, and obtain the initial size of the fish; S2. By analyzing the influence of the dynamic characteristics of fish motion on the initial size of the fish, the degree of motion blur is evaluated and the compensation size of the fish motion is obtained; S3. Detect the position changes of key feature points of fish in different frames, analyze the time series, and obtain the compensation size of posture changes; S4. By analyzing the positional displacement of key feature points caused by the change of viewing angle, the influence of the change of viewing angle on the initial size of the measured fish is evaluated, and the compensation size of the change of viewing angle is obtained; S5. Comprehensively analyze the fish motion compensation size, posture change compensation size, and perspective change compensation size, perform correction compensation on the fish initial size, and obtain the fish correction size.

2. The computer vision-based automated fish size measurement method according to claim 1, characterized in that: The specific process of preprocessing images and videos is as follows: The collected video is divided into frame sequences, and each frame is denoised. The contrast and brightness of each frame are adjusted. The outline of the fish in the image is detected by the edge detection algorithm, and the fish is separated from the background. The key feature points of the fish are identified by Harris corner detection in computer vision, and the key feature points include the head and tail of the fish.

3. The method for automatic fish size measurement based on computer vision according to claim 1, characterized in that: The specific process of analyzing the impact of the dynamic characteristics of fish movement on the initial size of the fish and evaluating the degree of motion blur is as follows: Through the segmented frame sequence, the optical flow field between adjacent video frames is calculated, the motion vector of each pixel in the image is obtained, the key feature points of the fish are tracked, the movement trajectory of the fish is drawn, the pixel motion speed is calculated for each pixel, and a motion blur model is established based on the proportional relationship between motion blur and pixel motion speed.

4. The computer vision-based automated fish size measurement method according to claim 3, characterized in that: The specific process of obtaining the motion-compensated size of fish is as follows: Based on the motion blur model, the pixel motion speed is averaged, the blur value corresponding to the average pixel motion speed is calculated, the blur degree caused by fish motion is quantified, and the fish motion compensation factor is obtained; Based on the fish motion compensation factor, the initial size of the fish is corrected to obtain the fish motion compensation size.

5. The computer vision-based automated fish size measurement method according to claim 4, characterized in that: The posture estimation algorithm is used to detect the position changes of key feature points of fish in different frames. The specific process of analyzing the time series is as follows: The key feature points of fish are detected in each frame of the segmented frame sequence through the posture network algorithm, the coordinates of each key feature point are recorded, time series data is constructed for each key feature point, and its position in different frames is recorded; By analyzing the key feature points, time series data is constructed and the displacement change of each key feature point is calculated.

6. The computer vision-based automated fish size measurement method according to claim 5, characterized in that: The specific process of obtaining the posture change compensation size is as follows: According to the displacement of each key point in the time series data, the posture change of the fish between different frames is calculated, and the linear relationship between the posture change and the initial size of the fish is established through a linear regression model to obtain the posture change compensation factor; Based on the posture change compensation factor, the initial size of the fish is corrected to obtain the posture change compensation size.

7. The computer vision-based automated fish size measurement method according to claim 6, characterized in that: By analyzing the position shift of key feature points caused by perspective change, the specific process of evaluating the influence of perspective change on the initial size measurement of fish is as follows: Fish image frames shot from multiple perspectives are extracted from the segmented frame sequence, key feature points of fish are detected in the image frames at each perspective, the position offset of the key feature points of fish at different perspectives is obtained, and the perspective change is calculated based on the offset of the key points.

8. The computer vision-based automated fish size measurement method according to claim 7, characterized in that: The specific process of obtaining the viewing angle change compensation size is as follows: Based on the position offset of the key feature points of the fish under different viewing angles, a linear regression equation is established according to the relationship between the viewing angle change and the initial size of the fish to obtain the viewing angle change compensation factor; Based on the perspective change compensation factor, the initial size of the fish is corrected to obtain the perspective change compensation size.

9. The method for automatic fish size measurement based on computer vision according to claim 1, characterized in that: The specific process of comprehensively analyzing the fish motion compensation size, posture change compensation size and perspective change compensation size and correcting and compensating the fish's initial size is as follows: The weighted average of the fish motion compensation size, posture change compensation size and viewing angle change compensation size is taken, and then comprehensively processed with the initial size of the fish to obtain the fish correction size.

10. An automated fish size measurement system based on computer vision, applied to the automated fish size measurement method based on computer vision according to any one of claims 1 to 9, characterized in that: It includes the following modules: data acquisition and processing module, motion compensation analysis module, posture change compensation module, perspective change compensation module, and size correction module; The data acquisition and processing module is used to collect fish images and videos through multi-view synchronous shooting and high frame rate video, pre-process the images and videos, identify the characteristic points of the fish through computer vision, calculate the pixel distance between the key points of the head and tail of the fish, and obtain the initial size of the fish; The motion compensation analysis module is used to evaluate the degree of motion blur and obtain the motion compensation size of the fish by analyzing the influence of the dynamic characteristics of the fish motion on the initial size of the fish; The method is used to detect the position changes of key feature points of fish in different frames, analyze the time series, and obtain the posture change compensation size; The viewing angle change compensation module is used to analyze the positional offset of key feature points caused by viewing angle changes, evaluate the influence of viewing angle changes on the initial size of the measured fish, and obtain the viewing angle change compensation size; The size correction module is used to comprehensively analyze the fish motion compensation size, posture change compensation size and viewing angle change compensation size, correct and compensate the initial size of the fish, and obtain the fish correction size.

Citation Information

Cited By

  • Dynamic fish monomer morphological parameter processing method and system

    CN120126171A

  • Complex underwater environment fish size estimation system and method based on key point detection

    CN120452029A

  • Fish size estimation system and method in complex underwater environment based on key point detection

    CN120452029B