A binocular camera fish body length recognition method and system based on image processing
By combining binocular cameras with optical correction and adaptive temperature distortion correction technologies, a fish recognition model is constructed, which solves the problem of low accuracy in fish body length recognition in existing technologies, and achieves high-precision recognition in complex aquatic environments, supporting the intelligent development of fishery resource management and aquaculture.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NATIONAL MARINE ENVIRONMENTAL MONITORING CENTRE
- Filing Date
- 2025-05-21
- Publication Date
- 2026-04-28
AI Technical Summary
Existing fish length recognition technologies struggle to acquire three-dimensional spatial information, cannot effectively handle complex aquatic environmental factors, and do not fully consider differences in fish species and posture changes, resulting in low measurement accuracy and poor recognition accuracy.
A fish recognition model is constructed using a binocular camera method based on image processing, combined with optical correction and adaptive temperature distortion correction techniques. The 3D model is then optimized through depth calculation and feature point processing to improve recognition accuracy.
It enables accurate identification of fish body length in complex aquatic environments, improves measurement accuracy and identification reliability, adapts to different aquatic conditions and fish species, and supports the intelligent development of fishery resource management and aquaculture.
Smart Images

Figure CN120564226B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of length measurement, and more particularly to a method and system for fish body length recognition based on image processing and binocular cameras. Background Technology
[0002] In modern fisheries resource management, ecological monitoring, and aquaculture, fish body length is a key parameter for assessing fish growth, population structure, and ecological environment health. Its accurate identification and measurement are crucial. With the rapid development of computer vision and image processing technologies, image processing-based fish body length identification methods have gradually become a research hotspot. This technology can not only achieve non-contact measurement, reducing harm to fish, but also improve measurement efficiency and data collection accuracy, playing a core driving role in the intelligent development of fisheries.
[0003] However, current traditional fish length recognition technologies still have many limitations: First, some single-camera recognition technologies struggle to acquire three-dimensional spatial information of fish, resulting in low measurement accuracy; second, some binocular camera recognition technologies lack effective processing of complex aquatic environmental factors, severely affecting recognition accuracy; furthermore, existing technologies do not fully consider differences in fish species and posture changes during fish contour extraction and 3D modeling, leading to significant errors in model construction and length calculation. This invention proposes a binocular camera-based fish length recognition method and system based on image processing. By innovatively integrating optical correction and adaptive temperature distortion correction technologies, combined with a 3D model construction method based on fish species characteristics, it effectively overcomes the shortcomings of traditional technologies. This method can accurately process image data in complex aquatic environments, optimize the 3D model according to differences in fish species, significantly improve the accuracy and reliability of fish length recognition, and provide strong technical support for the scientific management of fishery resources and the intelligent development of aquaculture. Summary of the Invention
[0004] The purpose of this invention is to provide a method and system for fish body length recognition based on image processing and binocular cameras.
[0005] To achieve the above objectives, the present invention is implemented according to the following technical solution:
[0006] This invention includes the following steps:
[0007] Acquire binocular images of fish and aquatic environment data; perform image correction on the binocular images of fish based on the aquatic environment data to obtain a binocular correction image; the image correction includes optical correction and adaptive temperature distortion correction;
[0008] A fish recognition model is constructed based on the binocular marking correction pattern. The binocular image of the fish to be recognized is input into the fish recognition model to obtain the recognition species, first body length and outline posture features.
[0009] The depth of key contour points is obtained by depth calculation based on the camera position and the contour pose features. The contour pose features are then corrected based on the key contour point depth and the recognition type to obtain a corrected contour.
[0010] The corrected contour is pre-screened using feature points to obtain pre-screened contour features, and the pre-screened contour features are then symmetrically processed to obtain the fish body contour; the pre-screened contour features include a first pre-screened contour feature and a second pre-screened contour feature.
[0011] According to the identified species, a standard fish surface model is matched. The standard fish surface model is scaled up according to the first body length to obtain a scaled fish surface model. A three-dimensional model of the fish to be tested is constructed according to the scaled fish surface model, the fish body outline and the depth of the key outline points to obtain a second body length. The average of the second body lengths at different time sequences is taken as the fish identification body length.
[0012] Furthermore, the method for obtaining the dual-target correction pattern includes:
[0013] Acquire raw images from a binocular camera and aquatic environment data. Label the raw binocular camera images by annotating fish species, posture, and body length to obtain labeled binocular images. The aquatic environment data includes light intensity L. amb Color temperature T c and water temperature T w The dual-target image includes the left target image. And the target image on the right (x,y) are the original pixel coordinates;
[0014] Optical correction of binocular images involves the following steps: pixel-level color compensation is performed on the binocular images using the Beer-Lambert theorem; then, white balance optimization is performed based on a preliminary depth estimate using grayscale reference values and binocular parallax. The expression is as follows:
[0015]
[0016] in This is the labeled image after pixel-level color compensation, where dir is the direction index corresponding to the left and right headlines respectively, and ξ is the directional index. λ The wavelength-dependent attenuation coefficient is obtained through pre-calibration; d(x,y) is the preliminary depth estimate based on binocular parallax; ξ I For ambient light compensation intensity, T ref For reference color temperature, G color(x,y) represents the white balance gain under the gray-scale world assumption, color represents the color channel indices corresponding to the red and blue channels respectively, and μ gray μ is the grayscale reference value. color d is the average value of the color channels. max This is the maximum depth value;
[0017] Adaptive temperature distortion correction is performed on the optically corrected binocular image. The specific steps include: extracting the current water temperature; querying the temperature distortion coefficient from a water temperature coefficient table based on the current water temperature; and performing temperature distortion correction on the optically corrected binocular image using the temperature distortion coefficient and an improved Brown-Conrady model to obtain a corrected binocular image. The temperature distortion coefficient includes the water temperature distortion coefficient in the radial x-direction, the water temperature distortion coefficient in the radial y-direction, and the tangential water temperature distortion coefficient. The corrected binocular image includes a corrected image of the left target and a corrected image of the right target.
[0018] The water temperature coefficient table was determined through offline calibration experiments and updated using real-time image feature point matching errors. The corresponding loss function is:
[0019]
[0020] Where Loss is the water temperature coefficient table update loss function, and f(·) is the camera projection function. To calibrate the three-dimensional coordinates of corner point i of the plate, To determine the planar coordinates of corner point i on the calibration plate, T cam For the camera pose matrix;
[0021] The coordinate expression for the dual-target calibration graphic is:
[0022]
[0023] Where (x) dist ,y dist (x, y) represents the distortion-corrected coordinates, and (x, y) represents the original pixel coordinates. Let k be the radius. x (T w ) represents the water temperature distortion coefficient in the radial x-direction, k y (T w ) represents the water temperature distortion coefficient in the radial y-direction, k τ (T w ) represents the tangential water temperature distortion coefficient.
[0024] Furthermore, the method for obtaining the identification species, first body length, and contour pose features includes:
[0025] The bi-target calibration image and its corresponding label are divided into a training set and a test set in a 7:3 ratio. The training set is used to train the fish recognition model, and the test set is used to verify the performance of the fish recognition model. The RAdam optimizer is used to optimize the hyperparameters of the fish recognition model. The fish recognition model includes an input layer, a backbone network, a feature fusion module, a parallel multi-task head, and an output layer.
[0026] The backbone network performs convolutional processing on the binocular target correction image to obtain binocular features, including a feature convolutional layer, a multi-resolution parallel convolutional layer, and a repeated multi-scale fusion unit; the feature convolutional layer convolves the binocular target correction image to output a binocular feature map; the multi-resolution parallel convolutional layer performs multi-resolution convolution on the binocular feature map to obtain multi-resolution binocular features; the repeated multi-scale fusion unit performs feature interaction on the multi-resolution binocular features to obtain binocular features.
[0027] The feature fusion module employs a binocular cross-attention mechanism to align binocular features on the left and right sides to obtain binocular aligned features; the expression for the binocular cross-attention is:
[0028]
[0029] Attn L For left-side visual attention, Attn R For the right-hand image attention, Softmax(·) is the activation function, Q... L K R V L For the target graph query matrix, key matrix, and graph values on the left, Q R K R V R For the target graph query matrix, key matrix, and graph values on the right, d K The length of the key matrix;
[0030] The parallel multi-task head includes a classification head, a regression head, and a pose head. The classification head processes binocular alignment features to obtain fish identification results and uses label smoothing cross-entropy loss to evaluate the difference between the fish identification results and the fish labels. The regression head processes binocular alignment features to obtain body length prediction values and uses log-space L1 loss to evaluate the difference between the body length prediction values and the body length labels. The pose head performs contour keypoint detection based on binocular alignment features to obtain contour pose features and uses adaptive weighted MSE to evaluate the difference between the pose extraction features and the pose labels.
[0031] The three parallel fully connected layers in the output layer are connected to the parallel multi-task head to output the fish recognition result, body length prediction value and contour pose detection result, respectively;
[0032] The binocular image of the fish to be identified is input into the fish recognition model to obtain the fish species, first body length, and outline posture features. The binocular image of the fish to be identified includes a left eye image and a right eye image. The outline posture features include a first outline posture feature and a second outline posture feature. The first outline posture feature is related to the left eye image. The second outline posture feature is related to the right eye image.
[0033] Furthermore, the method for obtaining the corrected contour through contour correction includes:
[0034] The contour points and motion posture of the left eye image are determined based on the first contour posture features, and the contour points and motion posture of the right eye image are determined based on the second contour posture features. The local curvature of the contour point sequence is calculated, and the point with the maximum curvature is selected as the key contour point. The contour point represents the position coordinate of the fish's body bending state when swimming.
[0035] The SGBM algorithm is used to perform binocular disparity matching on the first and second contour pose features to obtain the disparity values of key contour points. The depth of the key contour points is then calculated based on the disparity values and binocular camera parameters, expressed as:
[0036]
[0037] Where d i Z represents the disparity value of key contour point i. i Let be the depth of key contour point i, and C[·] be the gray-level cross-correlation cost function used to measure the similarity between two key contour points. Here are the coordinates of key point i in the left-side image outline. Let i+d be the coordinates of the keypoint i in the right-side eye image contour to be matched, where d is the disparity value to be matched. Let λ1 be the disparity prior value predicted based on the curvature of the fish spine, B be the baseline distance of the stereo camera, f be the focal length of the stereo camera, ∈ be the disparity smoothing term, and α(T) be the disparity smoothing term. w () is the water temperature refractive index compensation coefficient;
[0038] Based on the identified species, determine the corresponding biometric parameters. Based on these biometric parameters, determine the adaptive contour weight matrix. Based on the key contour point depth and biometric constraints, determine the composite perspective transformation matrix. Use the composite perspective transformation matrix to perform perspective transformation on the contour points to obtain the contour transformation points. The expression is:
[0039]
[0040] in The coordinates of point i in the profile template are given. Let be the coordinates of the contour point i to be transformed, H′ be the composite perspective transformation matrix, H be the traditional perspective transformation matrix, λ2 be the regularization coefficient, and W be the coordinates of the contour point i to be transformed. spec For adaptive contour weight matrix, For a type encoder, ΔZ = Z i -Z avg The depth of the current key contour point i and the average depth Z avg The deviation, W scale R is used as the scale weight to control the effect of depth deviation on scaling. h For body height ratio, w bend K is used to control the compensation of longitudinal deformation by spinal curvature for bending weight. b For bending stiffness, w persp Perspective weight is used to control the adjustment of perspective distortion by depth. std The standard body length is given, θ is the spinal curvature angle extracted from the pose features, φ is the fish's facing angle, representing the horizontal deflection angle of the fish relative to the camera, and t... x t y These are the translation components in the x and y directions, respectively;
[0041] The corrected profile is obtained by thin-plate spline interpolation between the key profile transformation points and the standard side template. The expression is:
[0042]
[0043] Where T(x,y) is the thin-plate spline interpolation function, used to non-rigidly register the key contour transformation points onto the standard side template to obtain the corrected contour, a0, a1, and a2 are the translation coefficient, scaling coefficient, and rotation coefficient, respectively, w i The influence weight of key contour transformation point i is given by p, where M is the number of key contour transformation points. j (x,y) are the coordinates of the input contour transformation point j. Let i be the coordinates of the key contour transformation point. For radial basis functions, This represents the Euclidean distance between the input contour transformation point j and the key contour transformation point i.
[0044] The correction profile includes a first correction profile and a second correction profile; the first correction profile represents the standard left side profile of the fish when it is spread out; the second correction profile represents the standard right side profile of the fish when it is spread out.
[0045] Furthermore, the method for obtaining the fish body outline includes:
[0046] The corrected contour is pre-screened by feature points to obtain pre-screened contour features; the feature point pre-screening includes saliency feature screening and confidence filtering; the saliency feature screening process is to retain the curvature maxima points on the corrected contour sequence and to remove redundant points in the flat regions by combining the contour gradient direction; the confidence filtering process is to perform binocular consistency verification to remove points with disparity jumps or depth anomalies, and to exclude points corresponding to the blurred areas of the binocular images of fish caused by swimming.
[0047] Principal component analysis is performed on the pre-screened contour features to determine the direction of the fish body's principal axis. Fine-tuning and fitting are performed using the curvature extreme points to obtain the fish body's dynamic symmetry axis. Based on the fish body's dynamic symmetry axis, the mirror symmetry points of the pre-screened contour feature points are calculated. Pre-screened contour feature points whose positional deviation between corresponding points in the left and right eye images exceeds the deviation threshold are removed.
[0048] Based on the binocular matching confidence level, pre-screened contour feature points with pixel accuracy below the threshold are removed, and high-precision pre-screened contour feature points on the other side are copied and filled in according to the principle of symmetry. The pre-screened feature points and correction points corresponding to the two views are integrated to obtain the fish body contour.
[0049] Furthermore, the method for obtaining the second body length includes:
[0050] Based on the identified species, obtain the corresponding standard fish surface model, calculate the body length ratio between the first body length and the standard body length of the standard fish surface model, and scale the standard fish surface model according to the body length ratio to obtain the scaled fish surface model.
[0051] Calculate the Euclidean distance between the fish body contour points and key contour points. Select points whose Euclidean distance is less than the distance threshold as matching contour point pairs. Generate a 3D fish body contour point cloud from the fish body contour and contour point depth of the matching contour point pairs. Align the principal axis direction of the scaled fish surface model and the 3D fish body contour point cloud using principal component analysis. Use the iterative nearest point algorithm to minimize the distance between the scaled fish surface model and the 3D fish body contour point cloud. Adjust the model mesh vertices according to the local curvature of the point cloud to make the model fit the actual contour and output the 3D model of the fish body to be tested. Obtain the second body length from the 3D model of the fish body to be tested. Take the average of the second body lengths at different time series as the fish identification body length.
[0052] Secondly, a binocular camera-based fish length recognition system based on image processing includes:
[0053] Image correction module: used to acquire fish binocular images and aquatic environment data, and to perform image correction on the fish binocular images based on the aquatic environment data to obtain binocular correction graphics;
[0054] Image recognition module: used to construct a fish recognition model based on the binocular correction pattern, and input the binocular image of the fish to be recognized into the fish recognition model to obtain the recognition species, first body length and outline posture features;
[0055] Contour Refinement Module: Used to perform depth calculation based on camera position and contour pose features to obtain key contour point depth, perform contour correction on contour pose features based on key contour point depth and recognition type to obtain corrected contour, perform feature point pre-screening on corrected contour to obtain pre-screened contour features, and perform symmetry processing on pre-screened contour features to obtain fish body contour.
[0056] 3D reconstruction module: used to match a standard fish surface model according to the identified species, scale the standard fish surface model according to the first body length to obtain a scaled fish surface model, and construct a 3D model of the fish to be tested according to the scaled fish surface model, the fish body outline and the depth of the key outline points;
[0057] Intelligent management module: used to store, view and manage the parameters of the three-dimensional fish model at different time series, obtain the second body length based on the three-dimensional fish model, and take the average of the second body length at different time series as the body length of the fish to be identified.
[0058] The beneficial effects of this invention are:
[0059] This invention is a method and system for fish body length recognition using a binocular camera based on image processing. Compared with existing technologies, this invention has the following technical advantages:
[0060] This invention, through image correction, model construction, contour correction, feature point pre-screening and symmetry processing, and 3D reconstruction, can improve data preprocessing capabilities and enhance model adaptability in binocular camera fish length recognition, thereby improving the efficiency and accuracy of binocular camera fish length recognition. Optimizing binocular camera fish length recognition technology can greatly save resources, improve work efficiency, and achieve fish length recognition, providing strong technical support for the refined development of fishery resource management and aquaculture. It can adapt to different binocular camera fish length recognition systems and the image processing-based binocular camera fish length recognition needs of different users, and has a certain degree of universality. Attached Figure Description
[0061] Figure 1 This is a flowchart illustrating the steps of a binocular camera-based fish length recognition method based on image processing according to the present invention. Detailed Implementation
[0062] The present invention will be further described below through specific embodiments. The illustrative embodiments and descriptions herein are used to explain the present invention, but are not intended to limit the present invention.
[0063] The present invention discloses a method and system for fish body length recognition based on image processing and binocular cameras, comprising the following steps:
[0064] like Figure 1 As shown, this embodiment includes the following steps:
[0065] Acquire binocular images of fish and aquatic environment data; perform image correction on the binocular images of fish based on the aquatic environment data to obtain a binocular correction image; the image correction includes optical correction and adaptive temperature distortion correction;
[0066] A fish recognition model is constructed based on the binocular marking correction pattern. The binocular image of the fish to be recognized is input into the fish recognition model to obtain the recognition species, first body length and outline posture features.
[0067] The depth of key contour points is obtained by depth calculation based on the camera position and the contour pose features. The contour pose features are then corrected based on the key contour point depth and the recognition type to obtain a corrected contour.
[0068] The corrected contour is pre-screened using feature points to obtain pre-screened contour features, and the pre-screened contour features are then symmetrically processed to obtain the fish body contour; the pre-screened contour features include a first pre-screened contour feature and a second pre-screened contour feature.
[0069] According to the identified species, a standard fish surface model is matched. The standard fish surface model is scaled up according to the first body length to obtain a scaled fish surface model. A three-dimensional model of the fish to be tested is constructed according to the scaled fish surface model, the fish body outline and the depth of the key outline points to obtain a second body length. The average of the second body lengths at different time sequences is taken as the fish identification body length.
[0070] In this embodiment, the method for obtaining the dual-target correction pattern includes:
[0071] Acquire raw images from a binocular camera and aquatic environment data. Label the raw binocular camera images by annotating fish species, posture, and body length to obtain labeled binocular images. The aquatic environment data includes light intensity L. amb Color temperature T c and water temperature T w The dual-target image includes the left target image. And the target image on the right (x,y) are the original pixel coordinates;
[0072] Optical correction of binocular images involves the following steps: pixel-level color compensation is performed on the binocular images using the Beer-Lambert theorem; then, white balance optimization is performed based on a preliminary depth estimate using grayscale reference values and binocular parallax. The expression is as follows:
[0073]
[0074] in This is the labeled image after pixel-level color compensation, where dir is the direction index corresponding to the left and right headlines respectively, and ξ is the directional index. λ The wavelength-dependent attenuation coefficient is obtained through pre-calibration; d(x,y) is the preliminary depth estimate based on binocular parallax; ξ I For ambient light compensation intensity, T ref For reference color temperature, G color (x,y) represents the white balance gain under the gray-scale world assumption, color represents the color channel indices corresponding to the red and blue channels respectively, and μ gray μ is the grayscale reference value. color d is the average value of the color channels. max This is the maximum depth value;
[0075] Adaptive temperature distortion correction is performed on the optically corrected binocular image. The specific steps include: extracting the current water temperature; querying the temperature distortion coefficient from a water temperature coefficient table based on the current water temperature; and performing temperature distortion correction on the optically corrected binocular image using the temperature distortion coefficient and an improved Brown-Conrady model to obtain a corrected binocular image. The temperature distortion coefficient includes the water temperature distortion coefficient in the radial x-direction, the water temperature distortion coefficient in the radial y-direction, and the tangential water temperature distortion coefficient. The corrected binocular image includes a corrected image of the left target and a corrected image of the right target.
[0076] The water temperature coefficient table was determined through offline calibration experiments and updated using real-time image feature point matching errors. The corresponding loss function is:
[0077]
[0078] Where Loss is the water temperature coefficient table update loss function, and f(·) is the camera projection function. To calibrate the three-dimensional coordinates of corner point i of the plate, To determine the planar coordinates of corner point i on the calibration plate, T cam For the camera pose matrix;
[0079] The coordinate expression for the dual-target calibration graphic is:
[0080]
[0081] Where (x)dist ,y dist (x, y) represents the distortion-corrected coordinates, and (x, y) represents the original pixel coordinates. Let k be the radius. x (T w ) represents the water temperature distortion coefficient in the radial x-direction, k y (T w ) represents the water temperature distortion coefficient in the radial y-direction, k τ (T w () represents the tangential water temperature distortion coefficient;
[0082] In a practical assessment, binocular cameras were used to collect images of crucian carp at an aquaculture farm. The aquatic environmental data were as follows: light intensity L amb =500 lux, color temperature T c =6500K, water temperature T w =25℃, the parameters of the binocular camera are: baseline distance B = 10cm, focal length f = 1200px, corresponding to the standard body length L of the crucian carp surface model. std =20cm, height ratio R h =0.3, bending stiffness K b =0.8;
[0083] Acquire an image of the fish species to be identified, with an image resolution of 640*480, and use the pre-calibrated wavelength correlation attenuation coefficient ξ. λ =0.1cm -1 Reference color temperature T ref =5500K, ambient light compensation intensity ξ I =0.5, grayscale reference value μ gray =128, color channel mean μ color =100 / 120 (red / blue), maximum depth d max =30cm, and pixel-level color compensation and white balance optimization were performed on the left and right eye images of the fish to be identified respectively;
[0084] The water temperature coefficient table was determined through offline calibration experiments. The specific steps were as follows: In a temperature-controlled environment, a binocular camera was placed at different water temperatures to collect images of the calibration board. The corner coordinates of each image were obtained using a checkerboard corner detection algorithm. The water temperature coefficient at each temperature was solved using the Zhang Zhengyou calibration method. The constant coefficients of the water temperature coefficient expression were determined by performing a quadratic polynomial fitting on the water temperature coefficients solved by the Zhang Zhengyou calibration method and the corresponding water temperatures, thus obtaining the water temperature coefficient expression.
[0085] Extract the current water temperature T w =25℃, find the water temperature distortion coefficient k in the radial x-direction from the water temperature coefficient table. x (T w = -0.001, water temperature distortion coefficient k in the radial y-directiony (T w = -0.0005, Tangential water temperature distortion coefficient k τ (T w =0.0002, temperature distortion correction is performed on the left / right eye images after positive optical correction to obtain the corrected left / right eye images.
[0086] In this embodiment, the method for obtaining the identification species, first body length, and contour pose features includes:
[0087] The bi-target calibration image and its corresponding label are divided into a training set and a test set in a 7:3 ratio. The training set is used to train the fish recognition model, and the test set is used to verify the performance of the fish recognition model. The RAdam optimizer is used to optimize the hyperparameters of the fish recognition model. The fish recognition model includes an input layer, a backbone network, a feature fusion module, a parallel multi-task head, and an output layer.
[0088] The backbone network performs convolutional processing on the binocular target correction image to obtain binocular features, including a feature convolutional layer, a multi-resolution parallel convolutional layer, and a repeated multi-scale fusion unit; the feature convolutional layer convolves the binocular target correction image to output a binocular feature map; the multi-resolution parallel convolutional layer performs multi-resolution convolution on the binocular feature map to obtain multi-resolution binocular features; the repeated multi-scale fusion unit performs feature interaction on the multi-resolution binocular features to obtain binocular features.
[0089] The feature fusion module employs a binocular cross-attention mechanism to align binocular features on the left and right sides to obtain binocular aligned features; the expression for the binocular cross-attention is:
[0090]
[0091] Attn L For left-side visual attention, Attn R For the right-hand image attention, Softmax(·) is the activation function, Q... L K R V L For the target graph query matrix, key matrix, and graph values on the left, Q R K R V R For the target graph query matrix, key matrix, and graph values on the right, d K The length of the key matrix;
[0092] The parallel multi-task head includes a classification head, a regression head, and a pose head. The classification head processes binocular alignment features to obtain fish identification results and uses label smoothing cross-entropy loss to evaluate the difference between the fish identification results and the fish labels. The regression head processes binocular alignment features to obtain body length prediction values and uses log-space L1 loss to evaluate the difference between the body length prediction values and the body length labels. The pose head performs contour keypoint detection based on binocular alignment features to obtain contour pose features and uses adaptive weighted MSE to evaluate the difference between the pose extraction features and the pose labels.
[0093] The three parallel fully connected layers in the output layer are connected to the parallel multi-task head to output the fish recognition result, body length prediction value and contour pose detection result, respectively;
[0094] The binocular image of the fish to be identified is input into the fish recognition model to obtain the fish species, first body length, and outline posture features; the binocular image of the fish to be identified includes a left eye image and a right eye image; the outline posture features include a first outline posture feature and a second outline posture feature; the first outline posture feature is related to the left eye image; the second outline posture feature is related to the right eye image;
[0095] In the actual evaluation, 1000 sets of dual-target calibration images and labels were used to train the fish recognition model. The model was divided into a training set (700 sets) and a test set (300 sets) in a 7:3 ratio. The RAdam optimizer had an initial learning rate of 1e^{-4} and underwent cosine annealing decay. The backbone network's feature convolutional layers used 7×7 convolutional kernels (stride 2) to output 64-channel feature maps. The parallel branches of the multi-resolution parallel convolutional layers used 3×3 (stride 1) and 5×5 (dilation rate 2) convolutional kernels to output 64-channel feature maps respectively, which were then concatenated to form a 128-channel multi-resolution feature map. The graph query matrix Q of the binocular cross-attention system was used. L / Q R Key matrix K R / K R ,Graph value V L / V R All are 128×128 matrices;
[0096] Input the corrected left / right eye images to be identified into the fish recognition model to obtain the species of fish to be identified (crucian carp), first body length (18.2cm), and outline posture features (including the set of outline points, the spinal curvature angle θ = 8.5° / curving to the left, and the fish body orientation angle φ = 45° / facing the right side of the camera).
[0097] In this embodiment, the method for obtaining a corrected contour through contour correction includes:
[0098] The contour points and motion posture of the left eye image are determined based on the first contour posture features, and the contour points and motion posture of the right eye image are determined based on the second contour posture features. The local curvature of the contour point sequence is calculated, and the point with the maximum curvature is selected as the key contour point. The contour point represents the position coordinate of the fish's body bending state when swimming.
[0099] The SGBM algorithm is used to perform binocular disparity matching on the first and second contour pose features to obtain the disparity values of key contour points. The depth of the key contour points is then calculated based on the disparity values and binocular camera parameters, expressed as:
[0100]
[0101] Where d i Z represents the disparity value of key contour point i. i Let be the depth of key contour point i, and C[·] be the gray-level cross-correlation cost function used to measure the similarity between two key contour points. Here are the coordinates of key point i in the left-side image outline. Let i+d be the coordinates of the keypoint i in the right-side eye image contour to be matched, where d is the disparity value to be matched. Let λ1 be the disparity prior value predicted based on the curvature of the fish spine, B be the baseline distance of the stereo camera, f be the focal length of the stereo camera, ∈ be the disparity smoothing term, and α(T) be the disparity smoothing term. w () is the water temperature refractive index compensation coefficient;
[0102] Based on the identified species, determine the corresponding biometric parameters. Based on these biometric parameters, determine the adaptive contour weight matrix. Based on the key contour point depth and biometric constraints, determine the composite perspective transformation matrix. Use the composite perspective transformation matrix to perform perspective transformation on the contour points to obtain the contour transformation points. The expression is:
[0103]
[0104] in The coordinates of point i in the profile template are given. Let be the coordinates of the contour point i to be transformed, H′ be the composite perspective transformation matrix, H be the traditional perspective transformation matrix, λ2 be the regularization coefficient, and W be the coordinates of the contour point i to be transformed. spec For adaptive contour weight matrix, For a type encoder, ΔZ = Z i -Z avg The depth of the current key contour point i and the average depth Z avg The deviation, w scale R is used as the scale weight to control the effect of depth deviation on scaling. h For body height ratio, w bendK is used to control the compensation of longitudinal deformation by spinal curvature for bending weight. b For bending stiffness, w persp Perspective weight is used to control the adjustment of perspective distortion by depth. std The standard body length is given, θ is the spinal curvature angle extracted from the pose features, φ is the fish's facing angle, representing the horizontal deflection angle of the fish relative to the camera, and t... x t y These are the translation components in the x and y directions, respectively;
[0105] The corrected profile is obtained by thin-plate spline interpolation between the key profile transformation points and the standard side template. The expression is:
[0106]
[0107] Where T(x,y) is the thin-plate spline interpolation function, used to non-rigidly register the key contour transformation points onto the standard side template to obtain the corrected contour, a0, a1, and a2 are the translation coefficient, scaling coefficient, and rotation coefficient, respectively, w i The influence weight of key contour transformation point i is given by p, where M is the number of key contour transformation points. j (x,y) are the coordinates of the input contour transformation point j. The coordinates of the key contour transformation point u are: For radial basis functions, This represents the Euclidean distance between the input contour transformation point j and the key contour transformation point i.
[0108] The correction profile includes a first correction profile and a second correction profile; the first correction profile represents the standard left side profile of the fish when it is spread out; the second correction profile represents the standard right side profile of the fish when it is spread out.
[0109] In actual evaluation, the local curvature of the contour point sequence is calculated, and the point with the maximum curvature is selected as the key contour point. The key contour points are related to the tip of the crucian carp's head, the base of the dorsal fin, the turning point of the caudal peduncle, etc.
[0110] The SGBM algorithm is used to perform binocular disparity matching on the first and second contour pose features to obtain the disparity values of key contour points. The key contour points in the left visual image are then used as the basis for this analysis. Taking disparity matching as an example, the disparity value to be matched in the right-hand eye map is d∈[25,35]. The regularization coefficient λ1=0.5 and the disparity prior value are taken as follows: The parallax smoothing term ∈ = 1 × 10 -6 Water temperature refractive index compensation coefficient α(T) w When the total cost is minimized, the disparity d of the corresponding contour point is 0.02. i =28px, depth Z i =514.3mm;
[0111] Key points of the left-side eye contour and corresponding depth Z i Taking the contour correction of 514.3mm as an example, based on the standard body length L of crucian carp... std =20cm, height ratio R h =0.3, bending stiffness K b =0.8 and average depth Z avg =500mm determines the adaptive profile weight matrix (w) scale =4, w bend =0.8, w persp =0.6), take the regularization coefficient λ2 = 0.5, and after performing the compound perspective transformation, the contour transformation point is p. j (162.4, 215.7), with translation coefficient a0 = 0.1, scaling coefficient a1 = 0.98, and rotation coefficient a2 = 1.02, p j (162.4,215.7) Thin plate spline interpolation is performed to obtain the corrected profile T(163,216);
[0112] The first corrected contour and the second corrected contour are obtained by performing contour correction on the first contour pose features and the second contour pose features respectively.
[0113] In this embodiment, the method for obtaining the fish body outline includes:
[0114] The corrected contour is pre-screened for feature points to obtain pre-screened contour features; the feature point pre-screening includes saliency feature screening and confidence filtering; the saliency feature screening process is to retain the curvature maxima points on the corrected contour sequence and to remove redundant points in the flat regions by combining the contour gradient direction; the confidence filtering process is to perform binocular consistency verification to remove points with disparity jumps or depth anomalies, and to exclude points corresponding to the blurred areas of the binocular images of fish caused by swimming.
[0115] Principal component analysis is performed on the pre-screened contour features to determine the direction of the fish body's principal axis. Fine-tuning and fitting are performed using the curvature extreme points to obtain the fish body's dynamic symmetry axis. Based on the fish body's dynamic symmetry axis, the mirror symmetry points of the pre-screened contour feature points are calculated. Pre-screened contour feature points whose positional deviation between corresponding points in the left and right eye images exceeds the deviation threshold are removed.
[0116] Based on the confidence level of binocular matching, pre-screened contour feature points with pixel accuracy below the threshold are removed, and high-precision pre-screened contour feature points on the other side are copied and filled in according to the principle of symmetry. The pre-screened feature points and correction points corresponding to the two views are integrated to obtain the fish body contour.
[0117] In the actual evaluation, the curvature maxima of the first set of 200 and the second set of 200 corrected contour points were selected to retain key biological feature points (such as head, dorsal fin, caudal peduncle). The local curvature of the remaining contour points was calculated using the discrete curvature formula. The region corresponding to the contour points with a curvature threshold of less than 0.05 was defined as a flat region. In the flat region, one contour point was retained every 10 pixels.
[0118] Calculate the confidence index for the remaining contour points: disparity change between adjacent points (corresponding to a threshold of 5px), depth value deviation (corresponding to a threshold of 0.2 times the mean depth), and the cost function value of the SGBM algorithm (corresponding to a threshold of 0.8). When the confidence index is greater than the corresponding threshold, the corresponding contour point is removed.
[0119] The fish body's main axis tilt angle was determined to be 10° using PCA. Combined with curvature extreme point fine-tuning, a dynamic symmetry axis equation y = tan(10°)x + b was generated. Based on the principle of symmetry, pre-screened contour feature point pairs with position deviations exceeding the deviation threshold were selected. Taking the left eye contour point (200, 300) and the matching right eye contour point (185, 300) as an example, the mirror point of the left eye contour point (200, 300) is (180, 300), and the pixel deviation is 5px, which is greater than the pixel deviation threshold of 3px. Therefore, the matching point pair was removed.
[0120] Calculate the precision confidence of each matching point pair. Based on the pixel precision confidence, the matching points are eliminated and completed. Taking the left eye map contour point (250, 350) and the matching right eye map contour point (230, 350) as an example, the corresponding pixel precision confidence is 0.6 and 0.9 respectively. Eliminate the left eye map contour points with a pixel precision confidence of less than 0.7. Based on the axis of symmetry, mirror the right eye map contour point (230, 350) to obtain the left eye map contour point (248, 350).
[0121] The fish outline is obtained by integrating the pre-screened feature points and correction points corresponding to the two side views.
[0122] In this embodiment, the method for obtaining the second body length includes:
[0123] Based on the identified species, obtain the corresponding standard fish surface model, calculate the body length ratio between the first body length and the standard body length of the standard fish surface model, and scale the standard fish surface model according to the body length ratio to obtain the scaled fish surface model.
[0124] Calculate the Euclidean distance between the fish body contour points and key contour points. Select points whose Euclidean distance is less than the distance threshold as matching contour point pairs. Generate a 3D fish body contour point cloud from the fish body contour and contour point depth of the matching contour point pairs. Align the principal axis direction of the scaled fish surface model and the 3D fish body contour point cloud through principal component analysis. Use the iterative nearest point algorithm to minimize the distance between the scaled fish surface model and the 3D fish body contour point cloud. Adjust the model mesh vertices according to the local curvature of the point cloud to make the model fit the actual contour and output the 3D model of the fish body to be tested. Obtain the second body length from the 3D model of the fish body to be tested. Take the average of the second body lengths at different time series as the fish identification body length.
[0125] In the actual evaluation, a crucian carp surface model was obtained from the standard model library. The crucian carp surface model was reduced to 0.91 times its original size according to the ratio of the first body length of 18.2cm to the standard body length of 20cm of the standard fish surface model, which is 0.91.
[0126] The Euclidean distance between the fish body contour points and the key contour points output by the recognition model is calculated. Points with an Euclidean distance less than the distance threshold (2px) are selected as matching contour point pairs. The fish body contour and contour point depth of the matching contour point pairs are used to generate a three-dimensional contour point cloud of the fish body. The model and point cloud are aligned by iterative nearest point algorithm. The scale of the fish surface model mesh vertices is adjusted to fit the three-dimensional contour point cloud of the fish body to generate a three-dimensional model of the fish body to be tested, and the second body length of 18.1cm is obtained. Five consecutive frames of time-series data are taken as [18.1,18.3,18.0,18.2,18.1], and the average value is taken to obtain the fish body length of 18.14cm.
[0127] Secondly, a binocular camera-based fish length recognition system based on image processing includes:
[0128] Image correction module: used to acquire fish binocular images and aquatic environment data, and to perform image correction on the fish binocular images based on the aquatic environment data to obtain binocular correction graphics;
[0129] Image recognition module: used to construct a fish recognition model based on the binocular correction pattern, and input the binocular image of the fish to be recognized into the fish recognition model to obtain the recognition species, first body length and outline posture features;
[0130] Contour Refinement Module: Used to perform depth calculation based on camera position and contour pose features to obtain key contour point depth, perform contour correction on contour pose features based on key contour point depth and recognition type to obtain corrected contour, perform feature point pre-screening on corrected contour to obtain pre-screened contour features, and perform symmetry processing on pre-screened contour features to obtain fish body contour.
[0131] 3D reconstruction module: used to match a standard fish surface model according to the identified species, scale the standard fish surface model according to the first body length to obtain a scaled fish surface model, and construct a 3D model of the fish to be tested according to the scaled fish surface model, the fish body outline and the depth of the key outline points;
[0132] Intelligent management module: used to store, view and manage the parameters of the three-dimensional fish model at different time series, obtain the second body length based on the three-dimensional fish model, and take the average of the second body length at different time series as the body length of the fish to be identified.
[0133] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for fish body length recognition using a binocular camera based on image processing, characterized in that, Includes the following steps: S1. Acquire a binocular image of fish and aquatic environment data; perform image correction on the binocular image of fish based on the aquatic environment data to obtain a corrected binocular image; the image correction includes optical correction and adaptive temperature distortion correction. S2. Construct a fish recognition model based on the binocular correction pattern, and input the binocular image of the fish to be recognized into the fish recognition model to obtain the recognition species, first body length and outline posture features; S3. Based on the camera position and the contour pose features, perform depth calculation to obtain the key contour point depth, and perform contour correction on the contour pose features based on the key contour point depth and the recognition type to obtain the corrected contour. S4. Perform feature point pre-screening on the corrected contour to obtain pre-screened contour features, and perform symmetrical processing on the pre-screened contour features to obtain the fish body contour; the pre-screened contour features include a first pre-screened contour feature and a second pre-screened contour feature. S5. Match a standard fish surface model according to the identified species, scale the standard fish surface model according to the first body length to obtain a scaled fish surface model, construct a three-dimensional model of the fish to be tested according to the scaled fish surface model, the fish body outline and the depth of the key outline points to obtain a second body length, and take the average of the second body lengths at different time sequences as the fish identification body length.
2. The method for fish body length recognition based on image processing using a binocular camera according to claim 1, characterized in that, The method for obtaining the dual-target correction pattern includes: Acquire raw images from a binocular camera and aquatic environment data. Label the raw binocular camera images by annotating fish species, posture, and body length to obtain labeled binocular images. The aquatic environment data includes light intensity L. amb Color temperature T c and water temperature T w The dual-target image includes the left target image. And the target image on the right (x,y) are the original pixel coordinates; Optical correction of binocular images involves the following steps: pixel-level color compensation is performed on the binocular images using the Beer-Lambert theorem; then, white balance optimization is performed based on a preliminary depth estimate using grayscale reference values and binocular parallax. The expression is as follows: in This is the labeled image after pixel-level color compensation, where dir is the direction index corresponding to the left and right headlines respectively, and ξ is the directional index. λ The wavelength-dependent attenuation coefficient is obtained through pre-calibration; d(x,y) is the preliminary depth estimate based on binocular parallax; ξ I For ambient light compensation intensity, T ref For reference color temperature, G color (x,y) represents the white balance gain under the gray-scale world assumption, color represents the color channel indices corresponding to the red and blue channels respectively, and μ gray μ is the grayscale reference value. color d is the average value of the color channels. max This is the maximum depth value; Adaptive temperature distortion correction is performed on the optically corrected binocular image. The specific steps include: extracting the current water temperature; querying the temperature distortion coefficient from a water temperature coefficient table based on the current water temperature; and performing temperature distortion correction on the optically corrected binocular image using the temperature distortion coefficient and an improved Brown-Conrady model to obtain a corrected binocular image. The temperature distortion coefficient includes the water temperature distortion coefficient in the radial x-direction, the water temperature distortion coefficient in the radial y-direction, and the tangential water temperature distortion coefficient. The corrected binocular image includes a corrected image of the left target and a corrected image of the right target. The water temperature coefficient table was determined through offline calibration experiments and updated using real-time image feature point matching errors. The corresponding loss function is: Where Loss is the water temperature coefficient table update loss function, and f(·) is the camera projection function. To calibrate the three-dimensional coordinates of corner point i of the plate, To determine the planar coordinates of corner point i on the calibration plate, T cam For the camera pose matrix; The coordinate expression for the dual-target calibration graphic is: Where (x) dist ,y dist (x, y) represents the distortion-corrected coordinates, and (x, y) represents the original pixel coordinates. Let k be the radius. x (T w ) represents the water temperature distortion coefficient in the radial x-direction, k y (T w ) represents the water temperature distortion coefficient in the radial y-direction, k τ (T w ) represents the tangential water temperature distortion coefficient.
3. The method for fish body length recognition based on image processing using a binocular camera according to claim 1, characterized in that, The method for obtaining the identification category, first body length, and contour pose features includes: The bi-target calibration image and its corresponding label are divided into a training set and a test set in a 7:3 ratio. The training set is used to train the fish recognition model, and the test set is used to verify the performance of the fish recognition model. The RAdam optimizer is used to optimize the hyperparameters of the fish recognition model. The fish recognition model includes an input layer, a backbone network, a feature fusion module, a parallel multi-task head, and an output layer. The backbone network performs convolutional processing on the binocular target correction image to obtain binocular features, including a feature convolutional layer, a multi-resolution parallel convolutional layer, and a repeated multi-scale fusion unit; the feature convolutional layer convolves the binocular target correction image to output a binocular feature map; the multi-resolution parallel convolutional layer performs multi-resolution convolution on the binocular feature map to obtain multi-resolution binocular features; the repeated multi-scale fusion unit performs feature interaction on the multi-resolution binocular features to obtain binocular features. The feature fusion module employs a binocular cross-attention mechanism to align binocular features on the left and right sides to obtain binocular aligned features; the expression for the binocular cross-attention is: Attn L For left-side visual attention, Attn R For the right-hand image attention, Softmax(·) is the activation function, Q... L K R V L For the target graph query matrix, key matrix, and graph values on the left, Q R K R V R For the target graph query matrix, key matrix, and graph values on the right, d K The length of the key matrix; The parallel multi-task head includes a classification head, a regression head, and a pose head. The classification head processes binocular alignment features to obtain fish identification results and uses label smoothing cross-entropy loss to evaluate the difference between the fish identification results and the fish labels. The regression head processes binocular alignment features to obtain body length prediction values and uses log-space L1 loss to evaluate the difference between the body length prediction values and the body length labels. The pose head performs contour keypoint detection based on binocular alignment features to obtain contour pose features and uses adaptive weighted MSE to evaluate the difference between the pose extraction features and the pose labels. The three parallel fully connected layers in the output layer are connected to the parallel multi-task head to output the fish recognition result, body length prediction value and contour pose detection result, respectively; The binocular image of the fish to be identified is input into the fish recognition model to obtain the fish species, first body length, and outline posture features. The binocular image of the fish to be identified includes a left eye image and a right eye image. The outline posture features include a first outline posture feature and a second outline posture feature. The first outline posture feature is related to the left eye image. The second outline posture feature is related to the right eye image.
4. The method for fish body length recognition based on image processing using a binocular camera according to claim 1, characterized in that, The method for obtaining a corrected contour through contour correction includes: The contour points and motion posture of the left eye image are determined based on the first contour posture features, and the contour points and motion posture of the right eye image are determined based on the second contour posture features. The local curvature of the contour point sequence is calculated, and the point with the maximum curvature is selected as the key contour point. The contour point represents the position coordinate of the fish's body bending state when swimming. The SGBM algorithm is used to perform binocular disparity matching on the first and second contour pose features to obtain the disparity values of key contour points. The depth of the key contour points is then calculated based on the disparity values and binocular camera parameters, expressed as: Where d i Z represents the disparity value of key contour point i. i Let be the depth of key contour point i, and C[·] be the gray-level cross-correlation cost function used to measure the similarity between two key contour points. Here are the coordinates of key point i in the left-side image outline. Let i+d be the coordinates of the keypoint i in the right-side eye image contour to be matched, where d is the disparity value to be matched. Let λ1 be the disparity prior value predicted based on the curvature of the fish spine, B be the baseline distance of the stereo camera, f be the focal length of the stereo camera, ∈ be the disparity smoothing term, and α(T) be the disparity smoothing term. w () is the water temperature refractive index compensation coefficient; Based on the identified species, determine the corresponding biometric parameters. Based on these biometric parameters, determine the adaptive contour weight matrix. Based on the key contour point depth and biometric constraints, determine the composite perspective transformation matrix. Use the composite perspective transformation matrix to perform perspective transformation on the contour points to obtain the contour transformation points. The expression is: in The coordinates of point i in the profile template are given. Let H be the coordinates of the contour point i to be transformed. ′ Here, H is the composite perspective transformation matrix, H is the traditional perspective transformation matrix, λ² is the regularization coefficient, and W... spec For adaptive contour weight matrix, For a type encoder, ΔZ = Z i -Z avg The depth of the current key contour point i and the average depth Z avg The deviation, w scale R is used as the scale weight to control the effect of depth deviation on scaling. h For body height ratio, w bend K is used to control the compensation of longitudinal deformation by spinal curvature for bending weight. b For bending stiffness, w persp Perspective weight is used to control the adjustment of perspective distortion by depth. std The standard body length is given, θ is the spinal curvature angle extracted from the pose features, φ is the fish's facing angle, representing the horizontal deflection angle of the fish relative to the camera, and t... x t y These are the translation components in the x and y directions, respectively; The corrected profile is obtained by thin-plate spline interpolation between the key profile transformation points and the standard side template. The expression is: Where T(x,y) is the thin-plate spline interpolation function, used to non-rigidly register the key contour transformation points onto the standard side template to obtain the corrected contour, a0, a1, and a2 are the translation coefficient, scaling coefficient, and rotation coefficient, respectively, w i The influence weight of key contour transformation point i is given by p, where M is the number of key contour transformation points. j (x,y) are the coordinates of the input contour transformation point j. Let i be the coordinates of the key contour transformation point. For radial basis functions, This represents the Euclidean distance between the input contour transformation point j and the key contour transformation point i. The correction profile includes a first correction profile and a second correction profile; the first correction profile represents the standard left side profile of the fish when it is spread out; the second correction profile represents the standard right side profile of the fish when it is spread out.
5. The method for fish body length recognition based on image processing using a binocular camera according to claim 1, characterized in that, The method for obtaining the fish body outline includes: The corrected contour is pre-screened for feature points to obtain pre-screened contour features; the feature point pre-screening includes saliency feature screening and confidence filtering; the saliency feature screening process is to retain the curvature maxima points on the corrected contour sequence and to remove redundant points in the flat regions by combining the contour gradient direction; the confidence filtering process is to perform binocular consistency verification to remove points with disparity jumps or depth anomalies, and to exclude points corresponding to the blurred areas of the binocular images of fish caused by swimming. Principal component analysis is performed on the pre-screened contour features to determine the direction of the fish body's principal axis. Fine-tuning and fitting are performed using the curvature extreme points to obtain the fish body's dynamic symmetry axis. Based on the fish body's dynamic symmetry axis, the mirror symmetry points of the pre-screened contour feature points are calculated. Pre-screened contour feature points whose positional deviation between corresponding points in the left and right eye images exceeds the deviation threshold are removed. Based on the binocular matching confidence level, pre-screened contour feature points with pixel accuracy below the threshold are removed, and high-precision pre-screened contour feature points on the other side are copied and filled in according to the principle of symmetry. The pre-screened feature points and correction points corresponding to the two views are integrated to obtain the fish body contour.
6. The method for fish body length recognition based on image processing using a binocular camera according to claim 1, characterized in that, The method for obtaining the second body length includes: Based on the identified species, obtain the corresponding standard fish surface model, calculate the body length ratio between the first body length and the standard body length of the standard fish surface model, and scale the standard fish surface model according to the body length ratio to obtain the scaled fish surface model. Calculate the Euclidean distance between the fish body contour points and key contour points. Select points whose Euclidean distance is less than the distance threshold as matching contour point pairs. Generate a 3D fish body contour point cloud from the fish body contour and contour point depth of the matching contour point pairs. Align the principal axis direction of the scaled fish surface model and the 3D fish body contour point cloud using principal component analysis. Use the iterative nearest point algorithm to minimize the distance between the scaled fish surface model and the 3D fish body contour point cloud. Adjust the model mesh vertices according to the local curvature of the point cloud to make the model fit the actual contour and output the 3D model of the fish body to be tested. Obtain the second body length from the 3D model of the fish body to be tested. Take the average of the second body lengths at different time series as the fish identification body length.
7. A binocular camera-based fish length recognition system based on image processing, used to perform the method according to any one of claims 1-6, characterized in that, include: Image correction module: used to acquire fish binocular images and aquatic environment data, and to perform image correction on the fish binocular images based on the aquatic environment data to obtain binocular correction graphics; Image recognition module: used to construct a fish recognition model based on the binocular correction pattern, and input the binocular image of the fish to be recognized into the fish recognition model to obtain the recognition species, first body length and outline posture features; Contour Refinement Module: Used to perform depth calculation based on camera position and contour pose features to obtain key contour point depth, perform contour correction on contour pose features based on key contour point depth and recognition type to obtain corrected contour, perform feature point pre-screening on corrected contour to obtain pre-screened contour features, and perform symmetry processing on pre-screened contour features to obtain fish body contour. 3D reconstruction module: used to match a standard fish surface model according to the identified species, scale the standard fish surface model according to the first body length to obtain a scaled fish surface model, and construct a 3D model of the fish to be tested according to the scaled fish surface model, the fish body outline and the depth of the key outline points; Intelligent management module: used to store, view and manage the parameters of the three-dimensional fish model at different time series, obtain the second body length based on the three-dimensional fish model, and take the average of the second body length at different time series as the body length of the fish to be identified.
Citation Information
Patent Citations
Fish specification measuring method and system
CN114049577A
Fish body length estimation method and system based on feature fusion and point cloud transformation
CN118967574A