Anti-interference fishery biological resource intelligent measuring method and device

CN122200731APending Publication Date: 2026-06-12ZHEJIANG OCEAN UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG OCEAN UNIV
Filing Date
2026-02-10
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Existing methods for measuring the length of fishery organisms are inefficient and inaccurate, unable to adapt to the special scenarios and biological characteristics of fisheries, and are susceptible to human error and environmental interference, resulting in unstable measurement results and large errors.

Method used

An anti-reflective calibration method combining color space separation and brightness enhancement is employed. Through an improved instance segmentation algorithm and morphological optimization, a pure mask of fishery organisms is obtained. Combined with the length measurement pattern defined by fishery biology, the body length conforming to fishery biology is calculated.

Benefits of technology

It enables efficient, accurate, and standardized measurement of fishery organism length, adapts to high humidity, strong reflectivity, and high-density stacking scenarios, reduces human error and environmental interference, and improves the accuracy and stability of measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122200731A_ABST
    Figure CN122200731A_ABST
Patent Text Reader

Abstract

The application provides an anti-interference fishery biological resource intelligent measurement method and device. The anti-interference fishery biological resource intelligent measurement method provided by the application comprises the following steps: collecting an image containing a fishery biological object to be measured and a calibration reference object, performing anti-reflection calibration by combining color space separation and brightness enhancement, and obtaining a proportionality coefficient of pixels and physical size; performing segmentation processing on the fishery biological object to be measured in the image by using an improved instance segmentation algorithm to obtain a binary mask corresponding to each target; performing morphological optimization and directional shaping on the binary mask in sequence to obtain a pure mask conforming to the trunk morphology of the fishery biological object; the pure mask eliminates non-trunk structure interference on the basis of the binary mask; selecting an adaptive length measurement mode based on the morphological characteristics of the pure mask, combining the proportionality coefficient to calculate a physical body length conforming to the definition of fishery biology, and outputting and visually displaying the physical body length result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of fishery equipment, and in particular to an intelligent method and device for measuring fishery biological resources that is resistant to interference. Background Technology

[0002] In industries and research settings such as deep-sea fishing, scientific research on fishery resources, and aquaculture, the biological body length of catches is a core foundational data for assessing fishery resource density, analyzing population age structure, formulating sustainable fishing strategies, and optimizing aquaculture management programs. Therefore, achieving intelligent, efficient, and accurate measurement of fishery biological resources is of great significance for promoting the transformation of the fishery industry towards intelligence and science.

[0003] Currently, the biological length measurement of aquatic organisms still mainly relies on traditional manual measurement methods. Staff need to grab each catch and manually record the readings using tools such as rulers and calipers. Some attempts to apply visual measurement technology mainly involve directly applying a general visual measurement framework, using a general calibration board (such as ArUco or checkerboard) to convert physical dimensions, using a general deep learning model (such as the general YOLO) for target segmentation, and using a general skeleton extraction algorithm or the minimum bounding rectangle method to calculate the length. However, existing measurement methods suffer from numerous insurmountable problems and shortcomings: manual measurement is not only inefficient and labor-intensive, but also prone to data accuracy issues due to human error, and cannot meet the needs of rapid measurement of large-scale catches; while general visual measurement solutions are difficult to adapt to the special scenarios and biological characteristics of fisheries. In the humid environment of the deck, water stains and surface reflections can damage the edge features of the calibration plate, leading to corner point extraction failure or coordinate drift, resulting in unstable measurement benchmarks; when dealing with translucent economic shrimp, juvenile fish, and densely stacked catches, general segmentation models are prone to mask edge defects, misjudgments, or missed detections; at the same time, general skeleton extraction algorithms may misidentify fins as trunks, and the minimum bounding rectangle rule may include the tail fin opening amplitude, resulting in measurement results that do not conform to the body length definition of "from snout to caudal peduncle" in fisheries biology, with large error fluctuations. These problems severely restrict the accuracy, efficiency, and stability of fisheries organism body length measurement.

[0004] Therefore, there is an urgent need for a method to achieve efficient, accurate, and standardized measurement of the body length of fishery organisms. Summary of the Invention

[0005] In view of this, this application provides an intelligent measurement method and device for fishery biological resources that resists interference, so as to achieve efficient, accurate and standardized measurement of the body length of fishery organisms.

[0006] Specifically, this application is implemented through the following technical solution:

[0007] The first aspect of this application provides an intelligent method for measuring fishery biological resources against interference, the method comprising:

[0008] Images containing the fishery organisms to be tested and the calibration references are acquired. Anti-reflective calibration is performed by combining color space separation and brightness enhancement to obtain the ratio coefficient between pixels and physical size.

[0009] An improved instance segmentation algorithm is used to segment the fishery organisms to be tested in the image, and a binarized mask corresponding to each target is obtained;

[0010] The binarized mask is sequentially subjected to morphological optimization and orientation shaping to obtain a pure mask that conforms to the morphology of the fishery organism's body; the pure mask eliminates interference from non-body structures based on the binarized mask;

[0011] Based on the morphological characteristics of the pure mask, a suitable length measurement mode is selected, and the physical body length that conforms to the definition of fishery biology is calculated by combining the proportional coefficient. The physical body length result is then output and visualized.

[0012] A second aspect of this application provides an intelligent measurement device for anti-interference fishery biological resources, the device comprising an acquisition module, a processing module, and a calculation module;

[0013] The acquisition module is used to acquire images containing the fishery organisms to be tested and the calibration reference objects, and to perform anti-reflective calibration by combining color space separation and brightness enhancement to obtain the ratio coefficient between pixels and physical size.

[0014] The processing module is used to segment the fishery organisms to be tested in the image using an improved instance segmentation algorithm to obtain a binary mask corresponding to each target.

[0015] The processing module is also used to perform morphological optimization and orientation shaping on the binarized mask in sequence to obtain a pure mask that fits the body shape of the fishery organism; the pure mask eliminates interference from non-body structures based on the binarized mask;

[0016] The calculation module is used to select an appropriate length measurement mode based on the morphological characteristics of the pure mask, calculate the physical body length that conforms to the definition of fishery biology by combining the proportional coefficient, and output and visualize the physical body length result.

[0017] The anti-interference intelligent measurement method and device for fishery biological resources provided in this application first employs anti-reflective calibration combining color space separation and brightness enhancement to specifically suppress the damage to the QR code features of the calibration reference object caused by water surface specular reflection. This accurately obtains the ratio coefficient between pixels and physical dimensions, laying a precise and stable size conversion benchmark for all subsequent body length calculations. This ensures the basic accuracy of body length calculations from the source of measurement and avoids subsequent chain measurement deviations caused by calibration errors. Next, morphological optimization and directional shaping are used to process the binarized mask, effectively eliminating interference from non-body structures such as fins, resulting in a pure mask that conforms to the body morphology of fishery organisms. This clarifies the core effective area for body length measurement of fishery organisms, eliminates interference from non-measurement targets, and ensures the accuracy of body length calculations. The measurement method better aligns with the "snout to caudal peduncle" measurement requirements in fisheries biology. Finally, based on the morphological characteristics of the pure mask, an appropriate length measurement mode is selected, and corresponding calculation methods are matched for different morphologies of fisheries organisms. Combined with the accurate proportional coefficients obtained in the early stage, the physical body length is calculated and the results are visualized. This achieves adaptability measurement for fisheries organisms with different morphologies, such as wide and flat, straight or curved, and slender. The calculation process ensures a high degree of consistency between the physical body length results and the definition in fisheries biology, significantly improving the accuracy of the measurement results. At the same time, each step is interconnected and logically coherent, forming a set of anti-interference measurement methods adapted to the special scenarios of high humidity, strong reflection, and diverse and easily stacked catches in fisheries. The synergistic effect of each method ultimately achieves anti-interference, accuracy, and standardization in the measurement of fisheries biological resources. Attached Figure Description

[0018] Figure 1 A flowchart of the intelligent measurement method for anti-interference fishery biological resources provided in Embodiment 1 of this application;

[0019] Figure 2 This is a schematic diagram of the structure of the anti-interference intelligent measurement device for fishery biological resources provided in Embodiment 2 of this application. Detailed Implementation

[0020] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application.

[0021] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used herein are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

[0022] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0023] The following specific embodiments are given to illustrate the technical solution of this application in detail.

[0024] Figure 1 This is a flowchart of the intelligent measurement method for anti-interference fishery biological resources provided in Embodiment 1 of this application. Please refer to... Figure 1 The method provided in this embodiment may include:

[0025] S101. Acquire images containing the fishery organisms to be tested and the calibration reference objects, perform anti-reflective calibration by combining color space separation and brightness enhancement, and obtain the ratio coefficient between pixels and physical size.

[0026] Specifically, the calibration reference object refers to a standard reference object with clearly known physical dimensions that is pre-set in the image acquisition scene. Its core function is to establish a benchmark for the correlation between the image pixel scale and the actual physical scale. Anti-reflective calibration is a specialized calibration method that combines color space separation and brightness enhancement, specifically designed for the high humidity and strong reflective environment of fisheries measurements. Its core purpose is to eliminate the interference of water stains and specular reflections from the water surface on calibration accuracy, ensuring the accuracy of the proportional coefficient calculation.

[0027] Furthermore, the scaling factor, denoted as K, is used to characterize the conversion relationship between image pixel size and actual physical size, and its unit is "physical length unit / pixel" (cm / pixel in this application). The scaling factor can be dynamically updated according to the image acquisition environment (such as changes in camera height and lighting), ensuring the consistency and accuracy of measurement results in different scenarios.

[0028] It should be noted that the image acquisition in this application is achieved through a dedicated anti-interference image acquisition device, which suppresses environmental interference from a physical level and provides high-quality image data for subsequent algorithm processing. Its features include: (1) Acquisition chamber structure: adopts a semi-enclosed design, with dark diffuse reflection material laid on the inner wall to absorb stray light and reduce internal reflection interference. At the same time, it has a built-in ring shadowless light source to provide a uniform and shadowless lighting environment and avoid the high-gloss spots formed by local strong light; (2) Image acquisition components: a high-definition industrial camera with polarizing lens is mounted on the top. The polarizing lens can selectively filter out specular reflection light from the surface of the water and the surface of the fishery organisms to be tested. Combined with the dark diffuse reflection inner wall and the ring shadowless light source, a dual anti-reflection mechanism of "physical filtering + uniform illumination" is formed to improve the contrast between the target and the background in the image; (3) Bearing platform design: adopts a dark blue bearing platform with a frosted surface. The dark blue background can form a stable color contrast with fishery organisms (especially semi-transparent individuals). The frosted structure further reduces surface reflection. Wear-resistant calibration marks are fixed at the four corners of the platform to ensure that the calibration reference objects maintain characteristic stability in a humid and frequently contacted working environment.

[0029] In specific implementation, anti-reflective calibration is performed by combining color space separation and brightness enhancement to obtain the ratio coefficient between pixels and physical size. This includes: converting the acquired original RGB image to the Lab color space, separating and extracting the luminance channel; performing contrast-limited adaptive histogram equalization on the extracted luminance channel image, suppressing luminance overflow in highlight areas by setting contrast limit parameters, and simultaneously enhancing the local grayscale contrast between the calibration reference and the background; in the enhanced luminance channel image, locating the calibration reference using the ArUco detection algorithm, extracting feature points, and performing sub-pixel thinning processing on the feature points; the feature points are the corner points or centers of the calibration reference; obtaining the known physical size of the calibration reference, measuring the pixel size formed by the corresponding feature points of the calibration reference in the enhanced height channel image, and determining the ratio coefficient between pixels and physical size based on the quotient of the known physical size and the pixel size.

[0030] Optionally, the calibration reference is an ArUco calibration board or a dot matrix, and the corresponding feature points are corner points or center points; when the calibration reference is an ArUco calibration board, the known physical size is the side length of the ArUco calibration board, and the pixel size is the pixel side length of the ArUco calibration board in the enhanced height channel image.

[0031] Specifically, a calibration reference (ArUco calibration board or dot matrix) is pre-installed at a fixed position on the carrier platform to ensure that the calibration reference and the fishery organism to be tested are within the same image acquisition field of view. A high-definition industrial camera (with polarizing lens) in the semi-enclosed image acquisition chamber is activated to acquire raw RGB images containing both the fishery organism to be tested and the calibration reference, ensuring that the image clearly covers the complete features of the calibration reference. Image processing algorithms are used to convert the acquired raw RGB images to a color space, specifically to the Lab color space (which includes an L luminance channel, an a color channel, and a b color channel). Through channel separation, the L (luminance) channel image in the Lab color space is extracted separately. Furthermore, the core parameters of Limit Contrast Adaptive Histogram Equalization (CLAHE) are configured, including setting the contrast limit threshold (typically ranging from 2.0 to 4.0, adjusted according to the actual highlight intensity), defining the histogram block size (e.g., 8×8 pixels or 16×16 pixels), and the interpolation method. The extracted L-channel image is input into the CLAHE processing module, and the algorithm performs histogram equalization processing on the histogram of each block in the image to suppress brightness overflow in the highlight areas (avoiding oversaturation of highlight pixels), while enhancing the local grayscale contrast between the edges of the calibration reference object and the background, making the features of the calibration reference object clearer. The ArUco detection algorithm is used to scan the L-channel image enhanced by CLAHE. The algorithm accurately locates the position of the calibration reference in the image by matching preset features of the calibration reference (such as the QR code pattern of the ArUco calibration board or the arrangement of the dot matrix). Based on the location result, key feature points of the reference are extracted. If it is an ArUco calibration board, the coordinates of its four corners are extracted; if it is a dot matrix, the center coordinates of each dot are extracted. Subpixel-level precision optimization is performed on the initially extracted feature points (corner points or center points). A subpixel detection algorithm based on gray-scale moments or interpolation is used. By analyzing the gray-scale distribution of pixels around the feature point, the subpixel-level coordinates of the feature point are calculated (coordinate values ​​accurate to two decimal places or more), eliminating quantization errors in pixel-level positioning and improving the accuracy of feature point positioning. The known physical dimensions of the calibration reference object are obtained in advance (these dimensions are the precise values ​​determined by factory calibration or manual measurement). If it is an ArUco calibration board, the known physical dimension is its actual side length (e.g., 3.0 cm); if it is a dot matrix, the known physical dimension is the actual distance between the centers of adjacent dots (e.g., 2.0 cm). Based on the feature point coordinates after sub-pixel thinning, the pixel size of the calibration reference object in the enhanced L-channel image is calculated: for the ArUco calibration board, the pixel distance between its diagonal corner coordinates or the pixel side length between adjacent corners is calculated; for the dot matrix, the pixel distance between the coordinates of adjacent center points is calculated to obtain the corresponding pixel size value.The ratio coefficient (K) between pixels and physical size is calculated using the formula K=L_read / L_pixel, where L_read is the known physical size of the calibration reference object, and L_pixel is the pixel size of the calibration reference object in the image.

[0032] S102. An improved instance segmentation algorithm is used to segment the fishery organisms to be tested in the image to obtain a binary mask corresponding to each target.

[0033] Specifically, a binarized mask is an image mask containing only black and white pixel values, used to accurately distinguish foreground targets (fishery organisms to be tested) from the background (such as support platforms, environmental debris, etc.) in an image. For multiple fishery organisms to be tested in an image (including individuals that are densely stacked and physically close together), the improved instance segmentation algorithm generates an independent binarized mask for each individual, that is, one target corresponds to one exclusive mask, ensuring that there is no pixel confusion between different individuals.

[0034] In practice, a dedicated dataset for fishery organisms is constructed. A polygon annotation tool is used to perform contour-level annotation on each individual fishery organism, with a focus on annotating the boundaries of each target in overlapping areas. Targeted data augmentation is then performed on this dataset by overlaying the annotated fishery organism masks onto the background image at random locations and densities, simulating a stacking scenario in actual measurements. YOLOv11-Seg is selected as the base model, and an attention mechanism and feature pyramid network are introduced to enhance the model's ability to extract the translucent and reflective features of fishery organisms. Simultaneously, a boundary joint intersection-over-union loss is employed, increasing the penalty weight for incorrect mask edge predictions by calculating the target boundary distance field. The data-augmented dataset is then input into the trained improved YOLOv11-Seg model, which outputs an independent binary mask for each fishery organism to be measured.

[0035] Specifically, images of fishery organisms of different species, at different growth stages, and under various angles and lighting conditions were collected, covering real-world scenarios such as semi-transparent individuals and natural stacking. A polygon annotation tool was used to perform fine-grained contour-level annotations on each individual fishery organism in the images, outlining the boundaries of the organism's body point by point. Emphasis was placed on clearly defining the independent boundaries of each overlapping target in high-density stacking areas, forming a dedicated dataset of fishery organisms containing images and corresponding annotation information. Annotated fishery organism masks were extracted from the constructed dataset and randomly overlaid and pasted onto blank background images (such as a dark blue frosted platform background) at random locations and densities to simulate the high-density stacking of catches in deep-sea fishing and aquaculture scenarios, expanding the dataset size and enriching the samples of stacking scenarios. Furthermore, YOLOv11-Seg was selected as the basic instance segmentation model. An attention mechanism and a feature pyramid network were introduced into the model structure to enhance the model's ability to extract weak features such as the translucent bodies and surface reflections of aquatic organisms. The loss function was replaced with a boundary joint intersection-union loss, and the penalty weight for mask edge prediction errors was increased by calculating the target boundary distance field. The improved YOLOv11-Seg model was trained using a data-augmented aquatic organism-specific dataset until the model converged and reached the preset segmentation accuracy. The original image containing the aquatic organism to be tested was input into the trained improved YOLOv11-Seg model, which performed feature extraction, target detection, and instance segmentation on the image. For each individual aquatic organism to be tested in the image, an independent binary mask that accurately matches its body contour was output, in which the foreground (aquatic organism) and background regions were clearly distinguished by black and white binary pixels.

[0036] S103. The binarized mask is sequentially subjected to morphological optimization and orientation shaping to obtain a pure mask that conforms to the morphology of the fishery organism's body.

[0037] The pure mask eliminates non-body structure interference based on the binarized mask.

[0038] Specifically, a pure mask refers to a specialized mask image that precisely preserves only the morphology of the fishery organism's torso. Its pixel composition contains only binary information of "torso foreground (pixel value 255, white)" and "background (pixel value 0, black)," completely eliminating pixels corresponding to non-torso structures such as pectoral and pelvic fins; it has smooth and regular edges, no closed holes inside, and its outline closely matches the torso of the fishery organism (in the direction of spinal extension), without irregular features such as jagged edges or small depressions; and it clearly defines the core target area for body length measurement, focusing only on the main body of the torso "from snout to caudal peduncle," providing a standardized target benchmark for subsequent precise length measurement that conforms to the definition of fishery biology.

[0039] It should be noted that while binarized masks can distinguish organisms from the background, they may have issues such as jagged edges and tiny internal holes. These defects can lead to false branches during subsequent skeleton extraction or affect the accuracy of body length calculation. Morphological optimization can fill in holes and smooth edges, ensuring a regular mask shape. Furthermore, binarized masks completely preserve non-truncation structures such as pectoral and pelvic fins of fishery organisms. These structures are not the measurement objects for the fishery biology definition of body length (from snout to caudal peduncle) and can interfere with the accuracy of skeleton extraction (such as causing "Y"-shaped forks). Directional shaping can accurately remove these non-truncation structures, preventing them from affecting the measurement logic. Different fishery organisms have different fin morphologies and opening angles. Binarized masks will present different contour shapes due to these differences. Pure masks only retain the main body, which can eliminate the problem of inconsistent target contours caused by differences in fin morphology. This provides a unified and reliable morphological basis for subsequent adaptive length measurement, ensuring that the measurement results conform to biological standards.

[0040] In specific implementation, an elliptical kernel of a preset size is used to perform a closing operation on the binarized mask. The elliptical structure's adaptability fills in the depressions and jagged edges at the tips of the fish's head and tail, while simultaneously forcibly filling all closed holes within the mask, resulting in a preliminary optimized mask with regular edges and a solid interior. Based on the pixel distribution characteristics of the preliminary optimized mask, the inertial principal axis direction of the fish species is determined by calculating the covariance matrix of the pixel set and solving for the eigenvectors. This inertial principal axis direction aligns with the vertebral axis of the fish's body. According to this inertial principal axis direction, structural elements perpendicular to the inertial principal axis are designed and generated. The length-to-width ratio of these structural elements adapts to the morphological differences between the fish species' body and fins. A morphological opening operation is performed on the preliminary optimized mask using these structural elements. Through the interaction between the structural elements and the mask, non-body structures protruding from the body are cut off while the main body is fully preserved. A morphological closing operation is then performed on the optimized mask again to fill in the edge gaps generated during the optimization process, ultimately resulting in a pure mask containing only the fish species' body, with smooth edges and a regular shape.

[0041] Specifically, based on the body size characteristics of common aquatic organisms (fish, shrimp, etc.), the major and minor axis dimensions of the elliptical structural elements are preset (e.g., major axis 8-12 pixels, minor axis 4-6 pixels, which can be adjusted according to the actual image resolution). The preset elliptical kernel is then subjected to morphological closing operations (dilation followed by erosion) with the binarized mask. The elliptical structure is used to adaptively fill the tiny depressions and jagged edges of the fish head and tail tips. At the same time, a hole-filling algorithm is activated to forcibly traverse all closed areas inside the mask, filling all closed holes with an area smaller than a preset threshold (e.g., 5-10 pixels) with solid, ultimately resulting in a preliminary optimized mask with regular edges and no internal gaps. The process iterates through all pixels of the initially optimized mask, selecting pixels with a value of 255 (foreground). The two-dimensional coordinates (x, y) of each pixel are recorded, forming a complete set of torso pixels. Based on this set, the two-dimensional covariance matrix is ​​calculated, and eigenvalues ​​and corresponding eigenvectors are obtained through matrix operations. The magnitudes of the two eigenvalues ​​are compared, and the eigenvector with the largest eigenvalue is selected as the principal axis of inertia for the fish species under test. This direction aligns with the vertebral axis of the fish's torso. Based on this principal axis, a slender structural element perpendicular to the axis is designed, setting its length-to-width ratio (e.g., length:width = 8:1-10:1). The length is adapted to the average width of the fish species' torso (ensuring coverage of the main body), while the width is smaller than the average thickness of the fins (ensuring they cannot be fully accommodated). The extension direction of the slender structural element is calibrated to be perpendicular to the principal axis, ensuring that subsequent morphological operations only affect fin structures perpendicular to the torso's orientation. Furthermore, a morphological opening operation (erosion followed by dilation) is performed on the calibrated slender structural elements and the initially optimized mask. Utilizing the interaction between the structural elements and the mask, thin fin structures protruding from the body and perpendicular to the main axis are eroded away because the structural elements cannot completely cover them. For robust body structures distributed along the main axis, the structural elements can completely cover them and preserve them. The processed mask is iterated through; if any incompletely removed fin remnants (pixel area smaller than a preset threshold, such as 3-5 pixels) remain, the opening operation is repeated once to ensure that non-body structures are completely severed. Finally, an elliptical kernel smaller than that from the first step (e.g., 4-6 pixels on the major axis and 2-3 pixels on the minor axis) is selected. A mild morphological closing operation is performed on the fin-removed mask to specifically fill in the small edge gaps generated during the opening operation (such as uneven edges at the fin-removed areas). The final result is a pure mask containing only the body of the fishery organism, with smooth, non-serrated edges, a solid interior without holes, and a shape highly consistent with the body.

[0042] S104. Based on the morphological characteristics of the pure mask, select an appropriate length measurement mode, calculate the physical body length that conforms to the definition of fishery biology by combining the proportional coefficient, and output and visualize the physical body length result.

[0043] Optionally, the length measurement mode can be selected through automatic matching and manual specification. The automatic matching is based on the aspect ratio and curvature of the clean mask.

[0044] Specifically, the length measurement mode is a dedicated body length calculation method designed in this application for different trunk morphological characteristics of aquatic organisms, conforming to the definition of body length "from snout to caudal peduncle" in aquatic biology. It includes two specific calculation modes adapted to different morphological forms of aquatic organisms, and the applicable mode can be selected according to the morphological characteristics of the organism's trunk presented by the pure mask. One is a first length measurement mode adapted to broad and flat or straight aquatic organisms, and the other is a second length measurement mode adapted to curved or slender aquatic organisms. The selection of the length measurement mode can be achieved through automatic matching or manual specification. During automatic matching, the aspect ratio, curvature, and other morphological characteristics of the pure mask are extracted and compared with preset morphological thresholds to automatically match the corresponding length measurement mode. Manual specification allows manual selection of the applicable length measurement mode according to actual measurement needs.

[0045] In specific implementation, the length measurement mode includes a first length measurement mode adapted to fishery organisms with wide, flat, or straight shapes. The physical body length, conforming to the definition of fishery biology, is calculated using the scaling factor. This includes: extracting the coordinates of all pixels corresponding to the pure mask to form a complete set of torso pixels; calculating the covariance matrix of the torso pixel set, solving for the eigenvalues ​​and eigenvectors of the covariance matrix through principal component analysis, extracting the first eigenvector corresponding to the largest eigenvalue, and determining the first eigenvector as the principal axis of inertia of the fishery organism to be measured; projecting all pixels in the torso pixel set onto the principal axis of inertia one by one, recording the projection coordinates of each pixel, and calculating the maximum and minimum coordinate values ​​of the projection points along the principal axis by traversing the projection coordinates; calculating the difference between the maximum and minimum coordinate values ​​to obtain the projected span of the fish's torso on the principal axis of inertia; and calculating the product of the projected span and the scaling factor, determining the product as the physical body length of the fishery organism to be measured.

[0046] Specifically, the entire pixel region of the clean mask is traversed, and foreground pixels (pixel value 255) representing the torso of the fishery are selected based on their pixel values. The two-dimensional planar coordinates (x, y) of each foreground pixel are extracted one by one. All coordinate information is integrated to construct a complete and unique set of fish torso pixels. Based on the constructed torso pixel set, the two-dimensional covariance matrix corresponding to the pixel set is calculated through statistical operations on the two-dimensional coordinates. Principal component analysis (PCA) is performed on the covariance matrix, and all eigenvalues ​​and matching eigenvectors corresponding to the covariance matrix are solved through matrix eigenvalue decomposition, forming a set of eigenvalue-eigenvector correspondences. All the solved eigenvalues ​​are sorted by size, and the eigenvalue with the largest value is selected. The first eigenvector corresponding to this eigenvalue is extracted, and this first eigenvector is directly determined as the principal axis of inertia of the fishery to be tested. This principal axis is the core extension direction of the fish torso. The principal axis of inertia is set as the projection reference axis. Using a coordinate projection algorithm, each pixel in the torso pixel set is projected onto this principal axis one by one. The one-dimensional projection coordinates of each pixel on the principal axis are recorded in real time, and all projection coordinates are aggregated to form a projection coordinate dataset. All values ​​in the projection coordinate dataset are traversed, and the maximum and minimum projection coordinate values ​​are determined and extracted using an extreme value filtering algorithm. The difference between the two extreme values ​​(maximum projection coordinate value - minimum projection coordinate value) is calculated, and this difference represents the pixel projection span of the fish's torso on the principal axis of inertia. The pixel-to-physical-size ratio coefficient obtained through anti-reflective calibration is retrieved, and this ratio coefficient is multiplied by the calculated pixel projection span (pixel projection span × ratio coefficient). The product is the physical body length of the fish species as defined by fisheries biology. The calculated physical length data (including numerical values ​​and units) is standardized and output, and then visualized in the original image acquisition screen. The physical length results are associated with the corresponding fishery biological targets to be measured and clearly presented.

[0047] In specific implementation, the length measurement mode includes a second length measurement mode adapted to curved or slender fishery organisms. Combined with the scaling factor, the physical body length conforming to the definition of fishery biology is calculated, including: applying a skeleton refinement algorithm to the pure mask to peel off the body shape into a single-pixel-width central skeleton line, which is distributed along the spine of the fish and has no obvious branch interference; treating each pixel on the central skeleton line as a node of an undirected graph, and the connection between adjacent pixels as edges of the undirected graph, with the weight of adjacent edges in the horizontal or vertical direction set to 1, forming a complete undirected graph structure; traversing all branch endpoints in the undirected graph, calculating the geodesic distance from each endpoint to the main skeleton path, and removing branches with geodesic distances less than a pruning threshold from the undirected graph to obtain an optimized undirected graph retaining only the main skeleton path; the pruning threshold is 5% of the estimated body length of the fishery organism to be measured; using a two-step traversal algorithm to solve for the pixel length of the optimized undirected graph; calculating the product of the pixel length and the scaling factor, and determining the product as the physical body length of the fishery organism to be measured.

[0048] Optionally, a two-step traversal algorithm is used to solve for the pixel length of the optimized undirected graph, including: firstly, starting from any target node in the optimized undirected graph, searching and determining the first endpoint farthest from the target node; the first endpoint corresponds to the snout or caudal peduncle of the fish; secondly, starting from the first endpoint, searching and determining the second endpoint farthest from the first endpoint; the second endpoint corresponds to the other end of the fish; and determining the path length between the first endpoint and the second endpoint as the pixel length of the optimized undirected graph.

[0049] Specifically, a skeleton refinement algorithm is used to process the clean mask. The torso foreground region with a pixel value of 255 in the mask is selected as the processing target. The torso shape is peeled away at equal widths through layer-by-layer erosion, with strict control over the number and range of eroded pixel layers, until a single-pixel-width central skeleton line is extracted, distributed along the fish's spine without significant branch interference. Only pixels along the core direction of the fish's torso are retained on the skeleton line. The single-pixel central skeleton line is traversed one by one, extracting the two-dimensional coordinates of all pixels. Each pixel is treated as a node in an undirected graph. Neighborhood detection is performed on all nodes to identify horizontally and vertically adjacent pixels. The connections between adjacent pixels are set as edges in the undirected graph, with all horizontally and vertically adjacent edges assigned a weight of 1, and diagonally adjacent edges assigned a weight of 1. Diagonally adjacent pixels are not connected, ultimately forming a complete undirected graph structure that perfectly matches the central skeleton line. First, the estimated body length pixel value of the fish species to be tested is estimated using the pixel distribution of the pure mask. Then, 5% of this estimated body length pixel value is calculated and set as the pruning threshold, serving as the criterion for removing invalid short branches from the undirected graph. The constructed undirected graph is traversed, identifying and marking all branch endpoints. A path search algorithm is invoked, starting from each branch endpoint, to calculate the geodesic distance to the main skeleton path. The geodesic distance is the sum of the edge weights of the shortest path from the endpoint to the main skeleton. Branches with geodesic distances less than the preset pruning threshold are all removed from the undirected graph, deleting all nodes and edges corresponding to that branch, resulting in an optimized undirected graph retaining only the main skeleton path of the fish's torso.

[0050] Furthermore, the pixel length of the main skeleton is determined using a two-step traversal algorithm: The first traversal arbitrarily selects a target node as the starting point in the optimized undirected graph, calls the shortest path algorithm to traverse the entire graph, calculates the path length from the starting point to all other nodes, and selects the node farthest from the starting point as the first endpoint, corresponding to either the snout or the caudal peduncle of the fish. The second traversal uses the first endpoint as the new starting point, again calls the shortest path algorithm to traverse the optimized undirected graph, calculates the path length from this endpoint to all other nodes, and selects the node farthest from the first endpoint as the second endpoint, corresponding to the other end of the fish. The path length between the first and second endpoints is then read; this length is the pixel length of the main skeleton of the fish's torso corresponding to the optimized undirected graph. Finally, the pixel-to-physical size ratio obtained through anti-reflective calibration is retrieved, and this ratio is multiplied by the calculated pixel length of the main skeleton. The result is the physical body length of the fish organism conforming to the definition of fisheries biology. The calculated physical length data is output in a standardized format of numerical value + unit. At the same time, the physical length results are associated with the corresponding target in the original fishery biological collection image, and the length value is marked next to the target to complete the visualization of the measurement results.

[0051] The method provided in this embodiment, in its first aspect, employs an anti-reflective calibration method that combines color space separation and brightness enhancement. First, the original RGB image is converted to the Lab color space and the brightness channel is extracted. Then, CLAHE processing is used to suppress highlight overflow and enhance the contrast between the calibration reference and the background. Combined with the ArUco detection algorithm to locate the reference and sub-pixel refinement of feature points, this effectively suppresses the damage to the QR code features of the calibration reference caused by water surface reflection. It accurately obtains the ratio coefficient between pixels and physical dimensions, establishing a stable and accurate size conversion benchmark for subsequent length calculations. This avoids a chain reaction of measurement deviations caused by calibration errors from the source, ensuring the reliability of physical size conversion.

[0052] Secondly, by constructing a dedicated dataset for fishery organisms, polygon annotation tools are used to finely annotate the boundaries of overlapping target areas. Targeted data enhancement through copy-paste is combined to simulate stacked scenarios. YOLOv11-Seg is selected as the base model, and an attention mechanism and feature pyramid network are introduced. At the same time, the boundary joint intersection-union ratio loss is used to increase the penalty for edge prediction errors. This improved instance segmentation algorithm specifically enhances the ability to extract the semi-transparent and reflective features of fishery organisms, effectively solving the problems of misjudgment and missed detection in high-density stacked scenarios. The output binarized mask can accurately distinguish each individual fishery organism to be tested from the background, and the contour fits the organism's body, providing a high-quality target region foundation for subsequent processing.

[0053] Thirdly, a preliminary optimized mask is obtained by first performing a closing operation on the binary mask using an elliptical kernel of a preset size to fill in edge jaggedness and internal holes. Then, by calculating the covariance matrix of the pixel set, the inertial principal axis consistent with the direction of the spine is determined, and a vertical slender structural element that adapts to the differences in the morphology of the body and fins is constructed. Non-body structures are cut off by morphological opening operations. Finally, edge gaps are filled by a second closing operation using a small elliptical kernel. This series of morphological optimization and directional shaping processes completely eliminates interference from non-body structures such as pectoral fins and pelvic fins, resulting in a pure mask with smooth edges and regular shape. The core measurement area from the snout to the caudal peduncle is clearly defined, and interference from non-target structures on length measurement is eliminated.

[0054] Fourthly, it supports two length measurement modes: automatic matching based on the aspect ratio and curvature of the pure mask, and manual specification. The first length measurement mode (PCA measurement) adapted to wide and flat or straight shapes extracts the set of pixels of the body of the pure mask, calculates the covariance matrix and determines the principal axis of inertia through principal component analysis, projects all pixels onto the principal axis and solves the projection span, and converts the physical body length by combining the scaling factor. It makes full use of the PCA algorithm's advantage in extracting the direction of linearly distributed targets, accurately matching the body extension characteristics of wide and flat and straight fishery organisms, and effectively avoiding the influence of tail fin opening and small edge burrs on the measurement. The second length measurement mode adapted to curved or slender shapes refines the skeleton, constructs and prunes the undirected graph, and solves the main skeleton length through two traversals. It also ensures the accuracy of the body length measurement of the corresponding morphological organisms. The two modes adapt to different morphological characteristics, ensuring that the physical body length measurement results of various fishery organisms are consistent with the definition of fishery biology, and greatly improving the accuracy and universality of the measurement.

[0055] Corresponding to the aforementioned embodiment of an intelligent measurement method for anti-interference fishery biological resources, this application also provides an embodiment of an intelligent measurement device for anti-interference fishery biological resources.

[0056] Figure 2 This is a schematic diagram of the anti-interference intelligent fishery biological resource measurement device provided in Embodiment 2 of this application. Please refer to... Figure 2 The apparatus provided in this embodiment includes an acquisition module 210, a processing module 220, and a calculation module 230;

[0057] The acquisition module 210 is used to acquire images containing the fishery organisms to be tested and the calibration reference objects, and to perform anti-reflective calibration by combining color space separation and brightness enhancement to obtain the ratio coefficient of pixels to physical size.

[0058] The processing module 220 is used to segment the fishery organisms to be tested in the image using an improved instance segmentation algorithm to obtain a binary mask corresponding to each target.

[0059] The processing module 220 is also used to perform morphological optimization and orientation shaping on the binarized mask in sequence to obtain a pure mask that fits the body shape of the fishery organism; the pure mask eliminates interference from non-body structures based on the binarized mask;

[0060] The calculation module 230 is used to select an appropriate length measurement mode based on the morphological characteristics of the pure mask, calculate the physical body length that conforms to the definition of fishery biology by combining the proportional coefficient, and output and visualize the physical body length result.

[0061] The apparatus of this embodiment can be used to perform... Figure 1 The steps of the method embodiment shown are similar in principle and process, and will not be repeated here.

[0062] The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.

[0063] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0064] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A method for intelligent measurement of fishery biological resources with anti-interference capabilities, characterized in that, The method includes: Images containing the fishery organisms to be tested and the calibration references are acquired. Anti-reflective calibration is performed by combining color space separation and brightness enhancement to obtain the ratio coefficient between pixels and physical size. An improved instance segmentation algorithm is used to segment the fishery organisms to be tested in the image, and a binarized mask corresponding to each target is obtained; The binarized mask is sequentially subjected to morphological optimization and orientation shaping to obtain a pure mask that conforms to the morphology of the fishery organism's body; the pure mask eliminates interference from non-body structures based on the binarized mask; Based on the morphological characteristics of the pure mask, a suitable length measurement mode is selected, and the physical body length that conforms to the definition of fishery biology is calculated by combining the proportional coefficient. The physical body length result is then output and visualized.

2. The method according to claim 1, characterized in that, Anti-reflective calibration is performed by combining color space separation and brightness enhancement to obtain the ratio coefficient between pixels and physical size, including: The acquired raw RGB image was converted to the Lab color space, and the luminance channel was separated and extracted. The extracted luminance channel image is subjected to contrast-limited adaptive histogram equalization. By setting contrast-limiting parameters, luminance overflow in the highlight area is suppressed, while the local grayscale contrast between the calibration reference and the background is enhanced. In the enhanced luminance channel image, the ArUco detection algorithm is used to locate the calibration reference object, extract feature points, and perform sub-pixel thinning processing on the feature points; the feature points are the corner points or centers of the calibration reference object. Obtain the known physical dimensions of the calibration reference object, measure the pixel dimensions of the corresponding feature points in the enhanced height channel image of the calibration reference object, and determine the ratio coefficient between the pixel and the physical dimensions based on the quotient of the known physical dimensions and the pixel dimensions.

3. The method according to claim 1, characterized in that, An improved instance segmentation algorithm is used to segment the fishery organisms to be tested in the image, obtaining a binary mask corresponding to each target, including: A dedicated dataset for fishery organisms was constructed, and a polygon annotation tool was used to perform contour-level annotation on each individual fishery organism, with a focus on annotating the boundaries of each target in overlapping areas; The fishery organism-specific dataset is subjected to targeted data augmentation processing. The labeled fishery organism masks are superimposed and pasted onto the background image at random positions and densities to simulate the stacking scenario in actual measurement. YOLOv11-Seg was selected as the basic model. An attention mechanism and a feature pyramid network were introduced to enhance the model’s ability to extract the translucent and reflective features of fishery organisms. At the same time, the boundary joint intersection and union ratio loss was adopted to increase the penalty weight of the model for the prediction error of the mask edge by calculating the target boundary distance field. The data augmented dataset is input into the trained improved YOLOv11-Seg model, which outputs an independent binary mask for each fishery organism to be tested.

4. The method according to claim 1, characterized in that, The binarized mask is sequentially subjected to morphological optimization and orientation shaping to obtain a pure mask that conforms to the morphology of the fishery organism's body, including: An elliptical kernel of a preset size is used to perform a closing operation on the binarized mask. The elliptical structure is used to fill the depressions and jagged edges at the tips of the fish head and tail, and at the same time, all closed holes inside the mask are forcibly filled to obtain a preliminary optimized mask with regular edges and a solid interior. Based on the pixel distribution characteristics of the preliminarily optimized mask, the inertial principal axis direction of the fishery organism to be tested is determined by calculating the covariance matrix of the pixel set and solving the feature vector; the inertial principal axis direction is consistent with the vertebral direction of the fish's body. Based on the direction of the principal axis of inertia, structural elements perpendicular to the principal axis of inertia are designed and generated, and the length-to-width ratio of the structural elements is adapted to the morphological differences of the body and fins of fishery organisms. The morphological opening operation is performed on the preliminary optimized mask using the structuring element. Through the interaction between the structuring element and the mask, non-torso structures protruding from the torso are cut off, while the torso body is completely preserved. The optimized mask is then subjected to morphological closing operations again to fill the edge gaps generated during the optimization process, ultimately resulting in a pure mask containing only the torso of fishery organisms, with smooth edges and regular shape.

5. The method according to claim 1, characterized in that, The length measurement mode includes a first length measurement mode adapted to fishery organisms with a wide, flat, or straight morphology. Combined with the aforementioned proportionality coefficient, the physical body length conforming to the definition of fishery biology is calculated, including: Extract the coordinates of all pixels corresponding to the pure mask to form a complete set of torso pixels; The covariance matrix of the torso pixel set is calculated, and the eigenvalues ​​and eigenvectors of the covariance matrix are solved by principal component analysis. The first eigenvector corresponding to the largest eigenvalue is extracted, and the first eigenvector is determined as the inertial principal axis of the fishery organism to be tested. Project all pixels in the torso pixel set onto the principal axis of inertia one by one, record the projection coordinates of each pixel, and calculate the maximum and minimum coordinate values ​​of the projection point in the principal axis direction by traversing the projection coordinates. Calculate the difference between the maximum and minimum coordinate values ​​to obtain the projected span of the fish's torso on the principal axis of inertia; Calculate the product of the projected span and the scaling factor, and determine the product as the physical length of the fishery organism.

6. The method according to claim 1, characterized in that, The length measurement mode includes a second length measurement mode adapted to curved or slender fishery organisms, which, combined with the aforementioned scaling factor, calculates the physical body length conforming to the definition of fishery biology, including: The skeleton thinning algorithm is applied to the pure mask to peel off the torso shape into a central skeleton line with a width of one pixel. The central skeleton line is distributed along the spine of the fish and has no obvious branch interference. Each pixel on the central skeleton line is taken as a node of the undirected graph, and the connection between adjacent pixels is taken as the edge of the undirected graph. The weight of adjacent edges in the horizontal or vertical direction is set to 1, thus forming a complete undirected graph structure. Traverse all branch endpoints in the undirected graph, calculate the geodesic distance from each endpoint to the main skeleton path, and remove branches whose geodesic distance is less than the pruning threshold from the undirected graph to obtain an optimized undirected graph that retains only the main skeleton path; the pruning threshold is 5% of the estimated body length of the fishery organism to be tested; A two-step traversal algorithm is used to solve for the pixel length of an optimized undirected graph; Calculate the product of the pixel length and the scaling factor, and determine the product as the physical body length of the fishery organism.

7. The method according to claim 6, characterized in that, A two-step traversal algorithm is used to solve for the pixel length of an optimized undirected graph, including: Starting from any target node in the optimized undirected graph, search and determine the first endpoint that is farthest from the target node; the first endpoint corresponds to the snout or caudal peduncle of the fish. Starting from the first endpoint, search and determine the second endpoint that is furthest from the first endpoint; the second endpoint corresponds to the other end of the fish body; The path length between the first endpoint and the second endpoint is determined as the pixel length of the optimized undirected graph.

8. The method according to claim 2, characterized in that, The calibration reference is an ArUco calibration board or a dot matrix, and the corresponding feature points are corner points or center points. When the calibration reference is an ArUco calibration board, the known physical size is the side length of the ArUco calibration board, and the pixel size is the pixel side length of the ArUco calibration board in the enhanced height channel image.

9. The method according to claim 1, characterized in that, The length measurement mode selection method includes automatic matching and manual specification. The automatic matching is based on the aspect ratio and curvature of the pure mask.

10. An intelligent measuring device for anti-interference fishery biological resources, characterized in that, The device includes an acquisition module, a processing module, and a calculation module; The acquisition module is used to acquire images containing the fishery organisms to be tested and the calibration reference objects, and to perform anti-reflective calibration by combining color space separation and brightness enhancement to obtain the ratio coefficient between pixels and physical size. The processing module is used to segment the fishery organisms to be tested in the image using an improved instance segmentation algorithm to obtain a binary mask corresponding to each target. The processing module is also used to perform morphological optimization and orientation shaping on the binarized mask in sequence to obtain a pure mask that fits the body shape of the fishery organism; the pure mask eliminates interference from non-body structures based on the binarized mask; The calculation module is used to select an appropriate length measurement mode based on the morphological characteristics of the pure mask, calculate the physical body length that conforms to the definition of fishery biology by combining the proportional coefficient, and output and visualize the physical body length result.