Oyster phenotype and behavior in-situ image intelligent monitoring method

By using a multi-view video monitoring method, combined with phenotypic measurement and behavior recognition, the problem of not being able to simultaneously monitor the phenotypic and behavioral characteristics of multiple oysters in the in-situ environment of the culture pond in existing technologies has been solved, achieving non-invasive, efficient, and accurate health assessment and environmental linkage analysis.

CN121768036APending Publication Date: 2026-03-31SHANTOU UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511894384.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-16
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing technologies lack a non-invasive imaging system that can simultaneously perform phenotypic measurements, behavioral identification, and health index assessments on multiple oyster individuals in an in-situ environment within an aquaculture pond, thus failing to achieve a linked analysis of phenotypic, behavioral, and environmental parameters.

Method used

A multi-view video monitoring method was adopted, which used underwater cameras to collect side-view video data of oysters. Combined with environmental parameters, phenotypic measurements, behavioral recognition and health assessment were carried out. This included processing of grayscale and color branches, identifying shell length, shell width, attachment coverage and shell opening and closing behavior and liquid spraying behavior, calculating health index and performing linked analysis.

Benefits of technology

It enables multi-target oyster phenotypic measurement and behavioral monitoring without the need for attached sensors in situ in aquaculture ponds, improving measurement accuracy and automation, providing health assessment results linked to the environment, and supporting refined management and decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121768036A_ABST
    Figure CN121768036A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent in-situ image monitoring method for oyster phenotype and behavior. The method comprises the following steps: preprocessing a video frame to improve image definition; automatically extracting phenotypic parameters such as shell length, shell height, shell width, color and attached organisms of the oysters, and identifying behavior characteristics such as shell opening and closing times, shell closing duration and liquid spraying events of the oysters; and finally, carrying out statistical analysis on the extracted phenotypic parameters and behavior data, determining index weights by adopting an entropy weight method in combination with environmental parameters such as water temperature and illumination, calculating health indexes and carrying out graded early warning. Therefore, in-situ non-intrusive, automatic, real-time, objective and efficient perception and analysis of the growth and vitality of the oysters are realized. The system can be applied to various environment scenes such as culture ponds and field sites, supports multi-target parallel perception, carries out health index analysis on individuals and groups, has the advantages of being easy and convenient to operate, high in accuracy, easy to popularize and the like, and can provide reliable technical support for quality management and behavior vitality research in the oyster culture process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of aquaculture monitoring technology, and in particular to an in-situ intelligent monitoring method for oyster phenotype and behavior using imaging. Background Technology

[0002] Throughout the entire oyster supply chain, from aquaculture ponds to temporary holding, transportation, and finally to the dining table, safety and quality management is gradually transitioning from experience-based management to refined management based on indicator systems. In actual production and grading transactions, the geometric dimensions of oysters (shell length, shell width, shell height) remain the most fundamental grading factor; shell color, age, and the coverage of shell attachments (such as mussels and barnacles) directly affect appearance grade and marketability. On the other hand, as a typical filter-feeding bivalve, the dynamic characteristics of oysters, such as shell-opening and closing behavior, shell-closing duration, and exhalation behavior, are closely related to the individual's metabolic state, environmental stress response, and even mortality risk. Recent studies on valvometry and strain gauge monitoring systems have shown that the shell-opening and closing rhythms of bivalve oysters, nocturnal behavioral characteristics, and environmental disturbances such as human activity noise significantly alter their behavioral patterns and physiological states. These studies collectively point to a trend: the combined quantification of "phenotype + behavior" is more effective than a single static indicator in reflecting the true state and environmental adaptability of individual oysters.

[0003] However, in current aquaculture production practices: phenotypic measurements are still mainly done manually after leaving the water (using calipers and balances to record shell length, width, height, and individual mass, etc.), which is inefficient, labor-intensive, and prone to human error, making it difficult to achieve high-throughput data acquisition for large-scale aquaculture units; behavioral observation relies mostly on visual observation or short-term video recording, making it difficult to generate long-term, continuous, and multi-individual quantitative data, and even more difficult to automatically link and analyze with environmental parameters such as water temperature, light intensity, and dissolved oxygen; although traditional valve gauges and strain gauges can continuously record shell opening and closing behavior, they require sensors or strain gauges to be attached to the shell, making deployment and maintenance complex, and limiting the number of individuals that can be monitored at one time, thus restricting their application in actual aquaculture pond scenarios.

[0004] A computer-based method for measuring and recording scallop phenotypic traits, disclosed in Chinese Patent Publication No. CN101709951A, utilizes a top-view and side-view imaging system, combined with an electronic balance, to automatically measure and record parameters such as shell height, shell length, shell width, and weight. Its key technical features include: automatically extracting the scallop outline using a calibration plate and image processing algorithms; converting the outline features into actual dimensions through pixel-to-centimeter calibration; and storing weight information along with morphological parameters in a database. This method demonstrates the feasibility of using computer vision to replace manual measurement, but its applicability is primarily limited to single measurements in laboratories or on test benches, targeting out-of-water scallop individuals, and does not cover in-situ environmental and behavioral monitoring in aquaculture ponds.

[0005] The method for measuring the external morphological parameters of shellfish based on image processing combination technology, disclosed in Chinese Patent Publication No. CN111695477A, ​​proposes to extract the external contour of shellfish and automatically calculate morphological parameters such as shell length, shell width, perimeter, and area by combining image preprocessing, edge detection, and morphological operations. This method is relatively accurate in recognizing shellfish contours in static images, reducing errors from manual measurement. However, it still mainly targets static samples and does not consider factors such as the water environment in aquaculture ponds, obstruction by attached organisms, and shell opening and closing behavior.

[0006] Existing technologies also utilize attached sensing devices such as inductive valve gauges and strain gauge monitors (SGMs) to attach sensors to the outer surface of bivalve shell lobes. By continuously recording the opening or strain signals between the lobes, they analyze diurnal and tidal rhythms and behavioral responses to environmental stimuli such as noise and temperature. While these methods can obtain high temporal resolution behavioral sequences, they suffer from several drawbacks: installation requires attaching sensors to the shell surface, making operation complex and potentially disruptive to individuals; the number of individuals that can be monitored per experiment is limited, resulting in insufficient throughput to cover large numbers of individuals in aquaculture ponds; and most studies focus on the behavior itself without systematically linking it to shell phenotypic characteristics and the presence of attached contaminants.

[0007] In summary, existing technologies either focus on static phenotypic measurement or rely on attached sensors for behavioral monitoring. There is a lack of a non-invasive imaging system that can simultaneously measure the phenotypic characteristics, identify behaviors, and assess health indices of multiple oyster individuals in the in-situ environment of an aquaculture pond. Furthermore, an integrated analysis scheme that combines phenotypic, behavioral, and environmental parameters has not yet been developed. Summary of the Invention

[0008] The technical problem to be solved by the embodiments of the present invention is to provide an in-situ intelligent monitoring method for oyster phenotype and behavior, which can realize multi-target oyster phenotype measurement and behavior monitoring without attaching sensors under in-situ conditions in aquaculture ponds, and an intelligent system that links with environmental quantities for analysis, providing technical support for oyster quality grading, health assessment and environmental effect research.

[0009] To address the aforementioned technical problems, this invention provides an in-situ image-based intelligent monitoring method for oyster phenotype and behavior, characterized by the following steps: S1: Use side-view video data of underwater oysters to collect environmental parameters and place size calibration objects within the field of view; S2: Establish a conversion factor between pixels and size based on the size calibration object; S3: Perform grayscale conversion, correction, contrast enhancement and correction on the calibration area to obtain the shell mask, and form grayscale branches and color branches, with the two branches sharing the same timestamp; S4: Perform phenotypic measurements using the grayscale branch, and calculate shell length L, shell width W, profile area A, and convex hull area based on the conversion factor. A hull With edge complexity Using the HSV / Lab / RGB channel characteristics of the color branch statistical shell region, the color difference index can be optionally output; S5: Perform attachment quantification, intersect the mussel and barnacle instance masks with each shell mask, and distribute and summarize them according to the shell level. Output six indicators M:N, Marea, Mcov, B:N, Barea, and Bcov, and give the total coverage statistics TOTAL with the shell union as the denominator. S6: Perform behavior recognition, calculate the opening curve O(t) in the shell opening ROI and identify the opening and closing events and the duration of closing the shell using the hysteresis method; in the liquid spraying ROI, use the joint criteria of optical flow amplitude, direction consistency and brightness increment to identify liquid spraying events and estimate direction and intensity. S7: Perform linkage analysis and evaluation, align and statistically analyze phenotypic, behavioral and environmental data, calculate the health index S(t) according to the set weights and output the individual and group grade, and trigger an alert when the alarm conditions are met.

[0010] The two video feeds are located at the same depth plane as the oysters, and their fields of view overlap in the middle section of the oyster string.

[0011] S3 further includes a video frame quality control step: S31: Calculate the resolution index of video frames. ,in, In response to Laplace, Let L(x,y) be the mean of the Laplacian response, and N be the total number of pixels in the image. S32: Calculate the average luminance of video frames. , ,in, Grayscale value; S33: Calculate the overexposure ratio of video frames. , ,in, For the number of overexposed pixels, , The overexposure threshold; S34: Set quality control qualification conditions to be met Only if the frame meets the requirements will it enter the phenotypic measurement process; otherwise, it will be marked as a quality control non-compliant frame.

[0012] S5 further includes the following steps: S51: The shell mask is obtained by segmentation detection and identification. Examples of masks for organisms attached to the shell surface ; S52: Press Convert the pixel area to mm²; let the mask of the k-th shell be... Its projected area is:

[0013] in This is the conversion factor from pixels to millimeters; if not calibrated, it will be reported in pixels. S53: For each instance, calculate the number of pixels intersecting with each shell, and take the shell with the largest intersection as the one to which it belongs;

[0014]

[0015] Assign the instance to make Largest shell Less than the pixel area threshold Instances are removed; S54: For each attachment instance i, take the number of pixels intersecting with each shell and count the number and coverage at the shell level. Based on this, define six shell-level metrics: Mussel count M:N:

[0016] Mussel area (Marea):

[0017] Mussel Coverage (Mcov):

[0018] Use the above method to calculate the number of barnacles B:N, barnacle area Barea, and barnacle coverage Bcov; S54: Calculate the total area and coverage of the attachments: For the i-th shell, let the shell area be A. i If the areas of mussels and barnacles on the shell are Mareai and Bareai respectively, then the shell coverage is:

[0019] Within the field of view or at the group level, let the union area of ​​all shell masks be denoted as .

[0020]

[0021] And order , The total coverage of the attachments is: .

[0022] S6 further includes the following steps: An opening curve O(t) is established in the region of interest at the shell opening. The opening and closing event sequence is obtained using a hysteresis threshold, and then the opening and closing frequency is calculated. Duration of shell closure The system identifies liquid spraying at the outer edge ROI based on a joint criterion of optical flow amplitude, directional consistency, and brightness increment, and outputs the number of sprays. Spray direction With strength agent quantity .

[0023] The proposed method for the opening curve O(t) in S6 includes: For each frame Edge enhancement and binarization are performed internally, and the upper and lower edges are searched column by column along the v direction, with the median distance taken as 1. ,definition:

[0024] To suppress jitter, a window is used for O(t). The moving average is smoothed.

[0025] The step of identifying open / closed shells in S6 includes: Set hysteresis threshold pair Hysteresis threshold With minimum duration Identify events using the following formula:

[0026] ; The interval between two adjacent segments is < Merge segments; combine segments with a duration < Open and closed segments are removed within the observation interval. If a total of M events from the start of shell opening to the end of shell opening are detected, then:

[0027] Statistical output of opening and closing frequency per unit time : .

[0028] The step of detecting the sprayed liquid in S6 includes: exist The dense optical flow (Farneback) is calculated internally to obtain the velocity component. Amplitude With direction angle ; Set threshold Let the direction angle of u be... When the following conditions are met: ,Right now

[0029]

[0030] That is, when the flow velocity amplitude > If the direction is outward and accompanied by a change in brightness, it is recorded as a single-frame spraying event. If it is continuous or greater than... If the frame meets the trigger condition, record a spray event; record the time difference between the start and end times. The merging of events Spray direction With strength agent quantity .

[0031] S7 further includes: S71: Data Acquisition and Timing: The data acquisition unit records the sensor water temperature T(t) and light intensity I(t) data. All data and frame timestamp t are written. O(t), the liquid spraying event sequence and the environmental time series are resampled and aligned with a fixed step size. S72: Correlation and Delay: Calculate zero-lag correlation and lag correlation to assess coupling strength and dominant delay.

[0032] And scan τ∈[0,30min], take The optimal time delay corresponding to the maximum value is obtained as the maximum correlation time delay τ*; S73: Triggering rule: When If the Lux threshold is exceeded, record the data within the preceding and following windows. The changes in the data generate an event-linked report.

[0033] S7 further includes: S74: Indicator Normalization and Weighting: [Regarding...] After interval standardization or Z-score normalization, the health index is obtained by weighted summation:

[0034] in For normalized indicators, weights Determined using the entropy weight method; S75: Threshold Determination and Grading: ;

[0035]

[0036]

[0037] S76: Alarm Rule: When the total coverage of attachments is... A soft alarm is triggered when S rises for N consecutive days and S shows a downward trend; when S < and An abnormal increase triggers a hard alarm and marks the shell string number.

[0038] S77: Group Aggregation: Uses weighted median or outlier removal mean aggregation to output the group health index and level, improving stability.

[0039] Implementing the embodiments of this invention has the following beneficial effects: This invention achieves simultaneous acquisition and joint analysis of phenotypic measurements and behavioral perception, taking into account in-situ, real-time, and non-invasive methods. While improving the accuracy and automation level of measurements such as size and coverage, it provides stable quantification of shell opening and closing and liquid spraying, and gives health assessment results linked to the environment, thereby supporting refined management and decision-making in the aquaculture process. In addition, this invention does not require the attachment of sensors and magnets, and can achieve continuous and calibrated quantitative assessment at the population scale solely based on multi-view video, possessing engineering advantages of easy deployment and scalability. Attached Figure Description

[0040] Figure 1 This is a schematic diagram of the arrangement of the corresponding device for the method of the present invention; Figure 2 Video analytics workflow; Figure 3 Preprocessing steps; Figure 4 Phenotype definition diagram Figure 5 Example of attachment detection and statistics, including (a) original image; (b) time curve of opening ratio jmO(t); (c) attachment statistics; (d) schematic diagram of shell length and width superposition; Figure 6 A schematic diagram of shell opening and closing behavior monitoring, where (a) ROI is shown; (b) shell surface adhesion detection is performed; and (c) the closing duration is recorded. Temporal distribution (horizontal axis: time of next opening, in minutes; vertical axis: ...) (unit: seconds), average closing time is marked in the figure; Figure 7 A schematic diagram of liquid spraying behavior monitoring, in which (a) ROI is shown; (b) liquid spraying intensity, with the average intensity and average duration marked in the figure. Detailed Implementation

[0041] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings.

[0042] like Figure 1As shown, the method implementation of the present invention is based on Figure 1 The apparatus arrangement shown is as follows: PVC mounting tube (A): Used to secure the underwater camera to the oyster string and provide a calibration reference within the field of view.

[0043] Underwater cameras (B1, B2): positioned on either side of the target, aligned with the oyster string (C) at a distance of 25–35 cm, for underwater photography (resolution no less than 4K, frame rate no less than 60fps).

[0044] Oyster string (C): The monitored object, located within the effective field of view shared by both cameras.

[0045] Data Acquisition and Time Synchronization Unit (D): Receives environmental parameter data (such as water temperature, dissolved oxygen, pH) and synchronizes it with the video timestamp.

[0046] Computer Processing Unit (E): Receives and processes B1 and B2 video streams via wired connection, runs analysis programs, and outputs results and reports. Software and Operating Environment The computer processing unit is deployed with a Python (≥3.12) environment; image processing and measurement algorithms are preferably implemented based on OpenCV (cv2≥4.6), NumPy, SciPy, pandas, matplotlib, etc.; attachment detection and segmentation are implemented using the segmentation framework (UltralyticsYOLOv8 / YOLOv11-seg) based on PyTorch.

[0047] The overall methodological framework includes: fixing underwater cameras (B1 and B2) to the lower edge of a PVC pipe (A), with the lenses aimed at the middle section of an oyster string (C); and placing known length scales within the field of view. After system startup: video acquisition → preprocessing and quality control → target segmentation → color statistics and attachment quantification → behavior recognition and perception → data storage and evaluation output.

[0048] Combination Figure 2 As shown in the figure, an in-situ image intelligent monitoring method for oyster phenotype and behavior in this embodiment is implemented through the following steps.

[0049] S1: Use side-view video data of underwater oysters to collect environmental parameters and place size calibration objects within the field of view.

[0050] S2: Establish the conversion factor between pixels and size based on the size calibration object.

[0051] Pixel to millimeter conversion: Arrange a known spacing scale within the field of view and measure the pixel length. , with physical length Obtaining proportion

[0052]

[0053] Subsequent frames in the same scene reuse k; when a missing label is found, the area is reported in pixels, which does not affect dimensionless metrics such as coverage.

[0054] S3: Perform grayscale conversion, correction, contrast enhancement and correction on the calibration area to obtain the shell mask, and form grayscale branches and color branches, with the two branches sharing the same timestamp.

[0055] Frame-by-frame reading and quality control: The video data is processed frame by frame to determine whether it passes or fails based on its sharpness (Laplacian variance), average brightness, and overexposure ratio. Only frames that pass are retained and enter the main process.

[0056] S301: Calculate the resolution index of video frames. ,in, In response to Laplace, Let L(x,y) be the mean of the Laplacian response, and N be the total number of pixels in the image. S302: Calculate the average luminance of video frames. , ,in, Grayscale value; S303: Calculate the overexposure ratio of video frames. , ,in, For the number of overexposed pixels, , The overexposure threshold; S304: Set quality control qualification conditions to meet Only if the frame meets the requirements will it enter the phenotypic measurement process; otherwise, it will be marked as a quality control non-compliant frame.

[0057] Image enhancement: This is followed by grayscale conversion (cv2.cvtColor), denoising (e.g., Gaussian, median, and bilateral denoising cv2.GaussianBlur, cv2.medianBlur, cv2.bilateralFilter), contrast enhancement (cv2.createCLAHE), and geometric correction if necessary (e.g., rotation and perspective correction cv2.getRotationMatrix2D, cv2.warpPerspective).

[0058] Split: Output A (grayscale output, enters segmentation and geometric measurement), output B (color output, enters color statistics). Frames that fail quality control do not participate in measurement but retain behavior recognition.

[0059] S4: Perform phenotypic measurements using grayscale branches.

[0060] S41: Geometric Measurement (Output A): Find the minimum bounding rectangle of the contour (findContours→minAreaRect) to obtain... Using the angle, read the major and minor axes respectively and convert them according to k to obtain the shell length (L) and shell width (W):

[0061]

[0062] in, and These are the pixel lengths (in pixels) of the long and short sides of the smallest bounding rectangle, respectively; k is the pixel-to-physical-size conversion factor (in mm / px) determined in step S2, used to convert the image pixel coordinates into actual physical dimensions.

[0063] Outline area and convex hull area The OpenCV library function `cv2.contourArea` is called to calculate the contour area `A`, and the shell mask `M` is obtained simultaneously. Then, `cv2.contourArea` is called again to calculate the convex hull area. Multiply both by k 2 Actual area:

[0064]

[0065] in, This represents the total number of pixels within the k-th shell mask; This represents the total number of pixels within the convex hull region corresponding to the mask; This is the area conversion factor (unit: mm² / px²), used to convert pixel area into actual physical area.

[0066] Marginal complexity (C): Calculated using the formula It is used to characterize the contour expansion caused by shell edge serrations and epiphytes.

[0067] Shell height (H): The maximum thickness between the two shells can be obtained through multi-view geometric calibration, or the thickness can be estimated by periodically measuring the thickness away from the water and modeling with L and W.

[0068] S42: Use color branch statistics to identify the HSV / Lab / RGB channel characteristics of the shell area, with optional output color difference index.

[0069] Obtaining the shell region: For each frame of image, obtain the shell mask based on segmentation. (As obtained above), from the original color frame Extracting subsets from the mask:

[0070] Color space conversion and statistics: Calling cv2.cvtColor to convert color frames Convert to HSV / Lab / RGB color spaces respectively, calculate the channel mean and standard deviation (cv2.cvtColor+mean / std), and then calculate color statistics and color difference indices.

[0071]

[0072] in, The input is the original color image frame; The converted HSV color space image contains three channels: Hue (H), Saturation (S), and Lightness (V). The converted CIELAB color space image includes luminance ( The dataset consists of three channels: red-green (a*), yellow-blue (b*), and red-green (a*). This data will be used to calculate the mean and standard deviation to quantify the color characteristics.

[0073] right For each inner pixel, the channel mean and standard deviation are calculated using cv2.meanStdDev.

[0074]

[0075]

[0076] in, This represents the pixel mean of the corresponding color channel, reflecting the average color tendency of the shell surface; Represents the pixel standard deviation of the corresponding color channel, reflecting the dispersion of color distribution and texture richness; subscripts H, S, V, ... , , R, G, and B correspond to the component channels in the HSV, CIELAB, and RGB color spaces, respectively.

[0077] Relative color difference: If a reference color is available (such as a color chart or historical baseline L0, a0, b0), calculate according to CIE76:

[0078] in, These are Euclidean color difference values ​​based on the CIE76 standard; , , This represents the average value of the LAB channel in the shell region detected in the current frame. , , Using a reference value (which can be taken from a standard color chart or the historical baseline value of the individual in a clean state), this indicator is used to quantify the relative degree of change in the shell color.

[0079] If no reference is available, the median value within the batch or the average value of the first day should be used as a reference, and the "relative fading and contamination index" should be calculated using the same formula.

[0080] S5: Perform attachment quantification.

[0081] Input mask generation: The shell mask is obtained by segmentation detection and identification. Examples of masks for organisms attached to the shell surface (such as barnacles and mussels). (Preferably obtained from a segmentation model; if the model is not deployed, it can be imported through manual annotation). (See...) Figure 5 (as shown in b) Unit conversion and indicator definition: by Convert the pixel area to mm²; let the mask of the k-th shell be... Its projected area is:

[0082] in This is the conversion factor from pixels to millimeters; if not calibrated, it will be reported in pixels (in this case). omitted).

[0083] For each instance, calculate the number of pixels intersecting with each shell. Take the shell with the largest intersection as the member;

[0084]

[0085] in, Represents the mask of the i-th attachment instance. With the kth shell mask The number of pixels in the intersection; The determination result is that the attached instance is assigned to the shell with the largest intersection area; The minimum area threshold (e.g., 50-150px) is set to exclude noise detections with excessively small areas.

[0086] Assign the instance to make Largest shell Less than the pixel area threshold Instances of 50–150px (e.g., removed) are excluded. (Then it is considered noise and discarded).

[0087] Counting and cumulative area: For each attachment instance i (category) mask ), take the number of pixels intersecting with each shell and count the number and coverage at the shell level, and define six shell-level indicators accordingly: (see Figure 5 (as shown in c) M:N (number of mussels):

[0088] Marea (mule area, mm² / px²):

[0089] Mcov (mussel coverage, %):

[0090] B:N, Barea, and Bcov should be replaced with Barnacles instead of Mussels, and the calculations are similar.

[0091] in, The total number of mussel instances belonging to the k-th shell; For instance category labels; The total actual area of ​​the mussels belonging to the kth shell (unit: mm²). This represents the percentage of mussel coverage on the shell surface. This represents the total projected area of ​​the shell. The calculation logic for the barnacle index is the same.

[0092] Total area and coverage of attachments:

[0093]

[0094] Within the field of view or at the group level, let the union area of ​​all shell masks be denoted as .

[0095]

[0096] in, The total area of ​​the union of all identified shell masks within the field of view (unit: mm²) represents the total surface area of ​​the oyster colony visible from the current viewpoint; and These represent the total area of ​​all mussels and barnacles within the field of view.

[0097] And order Then the total coverage of the attachments .

[0098] S6: Perform behavior recognition, calculate the opening curve O(t) in the shell opening ROI and identify the opening and closing events and the duration of closing the shell using the hysteresis method; in the liquid spraying ROI, use the joint criteria of optical flow amplitude, direction consistency and brightness increment to identify liquid spraying events and estimate direction and intensity.

[0099] Behavioral recognition and perception of oysters were conducted, focusing on two core behaviors: shell opening and closing, and jetting. An opening curve O(t) was established in the Region of Interest (ROI) of the oyster aperture. A hysteresis threshold was used to obtain the sequence of shell opening and closing events, and then the frequency of shell opening and closing was calculated. (times / minute), duration of shell closure Indicators such as (seconds); Based on a joint criterion of optical flow amplitude, directional consistency, and brightness increment, the liquid spraying at the outer edge ROI is identified, and the number of sprays is output. Spray direction With strength agent quantity (Optical flow or luminance integral).

[0100] Shell-mouth ROI construction (see) Figure 6 As shown in Figure a): Applying (cv2.minAreaRect) to the projected contour of the shell yields the minimum bounding rectangle based on the contour, where the pixel lengths of the long and short sides are denoted as... The center of the rectangle is The rotation angle is Take the unit vector along the major axis. Its legal direction Extend outward along the +u direction at one end of the major axis to establish a rectangular shell opening. And establish an outer rectangular strip. As a spray detection area. Recalculate minAreaRect for each frame (e.g., 30 frames) to update u, v, and the two ROIs; when segmentation fails, backtrack to the previous frame's ROI and perform ±1 pixel morphological expansion to maintain tracking.

[0101] Opening curve O(t) (see) Figure 6 (As shown in b): For each frame in Edge enhancement and binarization are performed internally (GaussianBlur + cv2.Canny or cv2.threshold (OTSU)) to obtain the edge map and binary map. The upper and lower edges are searched column by column along the v direction, and the median distance is taken. ,definition:

[0102] To suppress jitter, a window is used for O(t). The moving average is smoothed.

[0103] Open / closed shell recognition: Set hysteresis threshold pairs Hysteresis threshold With minimum duration Identify events using the following formula:

[0104]

[0105] The interval between two adjacent "open" segments is < Merge segments; combine segments with a duration < Open and closed segments are removed. Within the observation interval. If a total of M "shell opening start → shell opening end" events are detected, then:

[0106] Statistical output of opening and closing frequency per unit time :

[0107] in, and These are the threshold values ​​for the opening ratio used to determine the "open shell" and "closed shell" states, respectively. The minimum duration (in frames or seconds) for confirming the validity of the status, used to filter out momentary jitter; The minimum time interval threshold for determining whether two adjacent shell opening events should be merged into the same event.

[0108] M represents the total number of complete "open-shell-closed-shell" events identified within the observation interval; The actual effective observation duration (unit: seconds); coefficient 60 is used to convert the frequency unit to "times / minute".

[0109] Spray detection: In The dense optical flow (Farneback) is calculated internally to obtain the velocity component. Amplitude With direction angle Set a threshold. (Optical flow amplitude threshold, orientation consistency threshold, brightness increment threshold), let the orientation angle of u be... When the following conditions are met: ,Right now

[0110]

[0111] Where v is the amplitude of the optical flow velocity; The set flow rate threshold; The angle between the direction of the optical flow and the preset main jet direction u (determined by the orientation of the shell opening); The permissible directional deviation threshold is used to ensure that the detected motion points out of the shell; This represents the brightness increment between adjacent frames. The threshold value for brightness change is used to jointly determine the turbidity change caused by the spraying liquid.

[0112] That is, when the flow velocity amplitude > And the direction points outwards, (intensity = If the event is accompanied by a change in brightness, it is recorded as a single-frame spraying event. If it is continuous or ≥ If the frame meets the trigger condition, record a spray event; record the time difference between the start and end times. The events were merged. .

[0113] S7: Perform linkage analysis and evaluation, align and statistically analyze phenotypic, behavioral and environmental data, calculate the health index S(t) according to the set weights and output the individual and group grade, and trigger an alert when the alarm conditions are met.

[0114] Data Acquisition and Timing: The data acquisition unit (D) records data such as sensor water temperature T(t) and light intensity I(t). All data and frame timestamp t are written. O(t), the liquid spraying event sequence and the environmental time series are resampled and aligned with a fixed step size (e.g., 1s) (pandas.resample).

[0115] Correlation and Delay: Calculating zero-lag and lag correlations to assess coupling strength and dominant delay.

[0116] And scan τ∈[0,30min], take The maximum correlation time delay τ* is obtained by finding the optimal time delay corresponding to the maximum value; if necessary, [further details are needed]. Granger causality test reports the test statistic and significance. Triggering rule: When If the Lux threshold is exceeded, record the data within the preceding and following windows. The changes in the data generate an event-linked report.

[0117] Health score and alerts Indicator normalization and weighting: After interval standardization or Z-score normalization, the health index is obtained by weighted summation:

[0118] in For normalized indicators, weights The entropy weight method is used to determine this.

[0119] Threshold determination and level: ;

[0120]

[0121]

[0122] Alarm rule: When the total coverage of the attachments is... A soft alarm is triggered when S rises for N consecutive days and S shows a downward trend; when S < and An abnormal increase triggers a hard alarm and marks the shell string number.

[0123] Group aggregation: Individuals → breeding frame groups are aggregated using weighted median or mean after outlier removal to output the group health index and level, thereby improving stability.

[0124] The above description is merely a preferred embodiment of the present invention and should not be construed as limiting the scope of the invention. Therefore, any equivalent variations made in accordance with the claims of the present invention are still within the scope of the present invention.

Claims

1. An in-situ image intelligent monitoring method for phenotype and behavior of oyster, characterized in that, The method comprises the following steps: S1: Collecting video data of the side view of the oysters under water and recording environmental parameters, and arranging size calibration objects within the field of view; S2: Establishing a conversion coefficient of pixels and size according to the size calibration objects; S3: Carrying out grayscale, correction, contrast enhancement and correction on the calibration area to obtain a shell mask, and forming a grayscale branch and a color branch, both of which share the same timestamp; S4: Perform phenotyping using the grayscale branch, calculate shell length L, shell width W, contour area A, convex hull area according to conversion coefficients A hull With edge complexity , use the HSV / Lab / RGB channel features of the shell region to statistically analyze the color difference index, and optionally output the color difference index; S5: Performing attachment quantification, intersecting the mussel and barnacle instance masks with each shell mask, distributing and summarizing according to the shell level, and outputting six indexes M:N, Marea, Mcov, B:N, Barea, Bcov, and giving total coverage statistics TOTAL with the shell set as the denominator; S6: Performing behavior recognition, calculating the opening curve O(t) at the shell opening ROI, and identifying the opening and closing shell events and the closing shell duration by the hysteresis method; In the spray liquid ROI, the joint criterion of the amplitude, direction consistency and brightness increment of the optical flow is used to identify the spray liquid event and estimate the direction and intensity; S7: Performing linkage analysis and evaluation, aligning and summarizing the phenotype, behavior and environmental data, calculating the health index S(t) according to the set weight, and outputting the individual and group grades, and triggering the early warning when the alarm condition is reached.

2. The oyster phenotype and behavior in-situ image intelligent monitoring method according to claim 1, characterized in that, The two video paths and the oysters are in the same depth plane, and the field of view forms an overlapping area in the middle section of the oyster string.

3. The oyster phenotype and behavior in-situ image intelligent monitoring method according to claim 1, characterized in that, The S3 further comprises the step of video frame quality control: S31: calculate the sharpness index of the video frame, wherein, is the Laplacian response, is the mean value of the Laplacian response L(x, y), and N is the total number of pixels of the image; S32: Calculate the average brightness of the video frame , , is a gray value; S33: calculating an overexposure proportion of the video frame , wherein, is the number of overexposed pixels, , is an overexposure threshold; S34: Set up the condition of quality control qualified The frame enters the phenotype measurement process only when the condition is met; otherwise, the frame is marked as unqualified.

4. The oyster phenotype and behavior in-situ image intelligent monitoring method according to claim 1, characterized in that, The S5 further comprises the steps of: S51: Obtain the shell mask by segmentation detection and recognition Example mask of shell surface attached organisms ; S52: press Convert the pixel area to mm2; Set the mask of the kth shell as , and its projection area is: wherein is the conversion factor from pixels to millimeters; if not calibrated, reported in pixels units; S53: For each instance, the number of intersection pixels with each shell is calculated, and the shell with the largest intersection is taken as the belonging; Assigning instances to cause Largest shell , instances smaller than a pixel area threshold are culled; S54: For each attachment instance i, the number of intersection pixels with each shell is taken and the number and coverage rate are summarized according to the shell level, and the six indexes of the shell level are defined accordingly: Mussel numbers M: N: Mussel area Marea: Mussel coverage rate Mcov: The number of barnacles B:N, the area of barnacles Barea, and the coverage rate of barnacles Bcov are calculated using the above method; S54: Calculate the total area of the attachment and coverage: for the ith shell, let the shell area be A i , the area of the mussels and barnacles on the shell is Mareai, Bareai, respectively, and the shell-level coverage is: At the field or group level, record the union area of all shell masks as and let , . The total coverage of the adhering matter is then: 。 5. The oyster phenotype and behavior in-situ image intelligent monitoring method according to claim 1, characterized in that, The S6 further comprises the steps of: Establishing opening curve O(t) in the region of interest of the shell opening, obtaining the sequence of opening and closing shell events by using the hysteresis threshold, and then calculating the opening and closing shell frequency , the duration of closing shell ; identifying the liquid spray based on the joint criterion of the amplitude, direction consistency and brightness increment of the optical flow in the outer edge ROI, and outputting the number of spray , spray direction and intensity proxy .

6. The oyster phenotype and behavior in-situ image intelligent monitoring method according to claim 5, characterized in that, The recommended method of the opening curve O(t) in the S6 comprises: Edge enhancement and binarization are performed on each frame within The upper and lower edges are searched column by column along the v direction, and the median distance is taken as , defined as: To suppress jitter, a moving average smoothing of O(t) with a window of size N is applied .

7. The oyster phenotype and behavior in situ image intelligent monitoring method according to claim 6, characterized in that, The step of opening and closing shell recognition in the S6 comprises: hysteresis threshold pair hysteresis threshold and minimum duration an event is identified as follows: ; The interval between two adjacent segments is < Merge segments; combine segments with a duration < Open and closed segments are removed within the observation interval. If a total of M events from the start of shell opening to the end of shell opening are detected, then: Frequency of opening and closing per unit of time : 。 8. The oyster phenotype and behavior in-situ image intelligent monitoring method according to claim 7, characterized in that, The step of spray detection in the S6 comprises: In dense optical flow (Farneback) is computed, yielding flow velocity components , magnitude and direction angle ; Set threshold value , set the direction angle of u as When the following is satisfied: i.e. i.e. when the flow rate amplitude and the direction points outwards, and is accompanied by a change in luminance, then it is recorded as a single-frame ejection event, if consecutive frames meet the trigger, a single ejection event is recorded; events with a difference of start and end times of < 0.5s are merged, the direction of ejection and the intensity proxy .

9. The oyster phenotype and behavior in-situ image intelligent monitoring method according to claim 8, characterized in that, The S7 further comprises: S71: Collecting and time alignment: recording the sensor water temperature T(t) and light intensity I(t) data by the data collection unit, writing all data and frame timestamp t, and resampling and aligning O(t), spray event sequence and environmental time sequence at a fixed step length; S72: Correlation and time lag: calculating zero-lag correlation and lag correlation to evaluate the coupling strength and dominant time lag, And scan τ ∈ [0, 30min], take The maximum value of the optimal time delay corresponding to the maximum correlation time delay τ*; S73: Trigger rule: When or Lux threshold is out of bound, record the change amount in the pre and post window , generate event linkage report.

10. The oyster phenotype and behavior in-situ image intelligent monitoring method according to claim 9, characterized in that, The S7 further comprises: S74: Index normalization and weighting: the health index is obtained by weighted sum after interval standardization or Z-score normalization health index: wherein is a normalized index, weight is determined using the entropy weight method; S75: Threshold decision and ranking: ; S76: Alarm rule: When total coverage of attachments Rises continuously for N days and S is in a decreasing trend, trigger soft alarm; When S < 0.9, trigger hard alarm and mark the shell string number. and Abnormally increases, trigger hard alarm and mark the shell string number. S77: Group aggregation: adopting weighted median or mean value aggregation with outlier rejection to output the group health index and grade, and improving stability.

Citation Information

Patent Citations

  • Method for measuring and recording phenotypic characters of scallop by computer

    CN101709951A

  • Shellfish external morphological parameter measurement method based on image processing combination technology

    CN111695477A