A method and system for measuring the number of shrimp eggs

The method employs underwater image data analysis and Hermite curve modeling to classify and quantify shrimp ovulation, addressing the inefficiencies and inaccuracies of current methods by providing a precise and automated ovulation measurement system.

CN119251278BActive Publication Date: 2025-03-14PEARL RIVER FISHERY RES INST CHINESE ACAD OF FISHERY SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411268209.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2025-03-14
Estimated Expiration
2044-09-11

AI Technical Summary

Technical Problem

Current methods for determining the ovulation quantity of shrimp are labor-intensive, prone to high error rates, and unable to accurately adjust for changes in egg development, making them inefficient and inaccurate.

Method used

A method using underwater image data analysis with optical flow estimation, Hermite curve modeling, and clustering algorithms to classify and quantify shrimp ovulation based on color changes and distribution patterns, eliminating the need for manual handling and improving precision.

Benefits of technology

This method significantly enhances the efficiency and accuracy of shrimp ovulation quantity measurement, reducing human error and enabling real-time monitoring of ovulation processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119251278B_ABST
    Figure CN119251278B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of aquatic shrimp egg-carrying determination, and in particular to a method and system for determining the egg-carrying capacity of shrimp. If the egg-carrying expansion state is a type I egg-carrying expansion state, cluster nodes are clustered on the shrimp egg distribution pattern and a minimum spanning tree describing the reproduction and division of shrimp eggs is constructed. According to the minimum spanning tree, the reference volume model of shrimp eggs in different egg-carrying colors is fitted and counted to obtain a first shrimp egg-carrying capacity determination scheme; if the egg-carrying expansion state is a type II egg-carrying expansion state, a standard shrimp egg distribution texture is extracted based on shrimp egg distribution image data of the reproductive stage of the shrimp eggs, and the standard phenotype of the shrimp eggs is subjected to variation processing by the ratio of the standard shrimp egg distribution texture to the actual shrimp egg distribution texture, and the final egg-carrying capacity is fitted and counted to obtain a second shrimp egg-carrying capacity determination scheme. The present invention can efficiently and accurately determine the shrimp egg-carrying capacity, replace the cumbersome steps of traditional manual determination, and improve the accuracy of determining the shrimp egg-carrying capacity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of aquatic shrimp egg-carrying capacity determination, and in particular to a method and a system for determining the amount of shrimp egg-carrying capacity. Background Art

[0002] The egg carrying capacity of shrimp refers to the number of eggs laid by female shrimp at one time during the breeding season. The egg carrying capacity of shrimp can comprehensively reflect the reproductive capacity and reproductive status of shrimp. It is of great significance to help researchers understand the population dynamics of shrimp, the impact of the environment on its reproduction, shrimp farming and population management. Therefore, measuring the egg carrying capacity of shrimp is a crucial step in shrimp farming. However, the existing method for measuring the egg carrying capacity of shrimp still needs to rely on manually fishing out the shrimp body and using special measuring tools for measurement. This process is complicated and cumbersome and requires a large amount of manpower to cooperate to complete. In addition, the results of manual measurement often have a large error rate, which reduces the efficiency and quality of the measurement of the egg carrying capacity of shrimp; at the same time, the traditional measurement method is difficult to achieve measurement adjustment based on the impact of shrimp egg changes on the overall egg carrying capacity, which further aggravates the phenomenon of errors in the measurement results. Summary of the invention

[0003] The invention overcomes the shortcomings of the prior art and provides a method and a system for determining the number of shrimp eggs.

[0004] To achieve the above object, the technical solution adopted by the present invention is:

[0005] The first aspect of the present invention provides a method for determining the number of shrimp eggs, comprising the following steps:

[0006] Acquire underwater image data of target shrimps, introduce an optical flow estimation algorithm to perform calculation and analysis on the underwater image data, obtain a dynamic feature optical flow model of the target shrimps, and extract the target egg-carrying expansion Hermite surface when the color of the target shrimps changes according to the dynamic feature optical flow model;

[0007] Based on the target shrimp species information, a quadtree model is constructed to obtain a standard egg swelling Hermite surface that matches the target egg swelling Hermite surface. Based on the standard egg swelling Hermite surface, it is analyzed whether there is an expected egg swelling color feature, and the first and second egg swelling states are obtained.

[0008] If the egg swelling state is a type of egg swelling state, the K-means clustering algorithm is introduced to cluster the shrimp egg distribution pattern of the egg swelling model diagram and construct a minimum spanning tree describing the reproduction and division of shrimp eggs. According to the minimum spanning tree, the benchmark volume model of shrimp eggs in different egg swelling colors is fitted and counted to obtain the first shrimp egg quantity determination scheme;

[0009] If the egg-carrying swelling state is a Class II egg-carrying swelling state, the standard shrimp egg distribution texture is extracted based on the shrimp egg distribution image data of the reproductive stage of the shrimp eggs, and the actual shrimp egg distribution texture in the egg-carrying swelling model diagram is obtained. The standard phenotype of the shrimp eggs is subjected to variation processing through the ratio of the standard shrimp egg distribution texture to the actual shrimp egg distribution texture, and the final egg-carrying quantity is fitted and statistically calculated to obtain a second shrimp egg-carrying quantity determination scheme.

[0010] Furthermore, in a preferred embodiment of the present invention, the underwater image data of the target shrimp is obtained, an optical flow estimation algorithm is introduced to calculate and analyze the underwater image data, a dynamic characteristic optical flow model of the target shrimp is obtained, and the target egg expansion Hermite surface when the target shrimp changes its egg color is extracted according to the dynamic characteristic optical flow model, specifically comprising the following steps:

[0011] Obtaining the initial layout diagram and photographic field of view of the underwater camera, constructing a multi-dimensional migration distribution map of the target shrimp in the shrimp breeding area, analyzing the photographic rationality of the initial layout diagram and the photographic field of view through the multi-dimensional migration distribution map and performing corresponding adjustments, and obtaining the underwater camera layout strategy and photography optimization strategy;

[0012] Acquire a shrimp breeding area, and capture and shoot target shrimps by executing the underwater camera layout strategy and shooting optimization strategy in the shrimp breeding area to obtain underwater image data of the target shrimps;

[0013] An optical flow estimation algorithm is introduced, a minimum frame number threshold is preset in the optical flow estimation algorithm, image frames are extracted from the underwater image data based on the minimum frame number threshold, two frames of image data with the minimum adjacent interval are obtained, and the spatial vector gradients of the two frames of image data are calculated by a Sobel operator;

[0014] Presetting a local matrix window threshold, dividing two frames of image data into a plurality of local matrix windows according to the local matrix window threshold, and constructing an optical flow matrix equation and an optical flow vector equation in each local matrix window based on the spatial vector gradient of the two frames of image data;

[0015] For each local matrix window, the optical flow matrix equation and the optical flow vector equation are combined to solve the calculation speed, and the optical flow speed of each local matrix window is obtained, and the optical flow speeds of all local matrix windows are obtained, and the optical flow speeds of all local matrix windows are combined to generate a dynamic feature optical flow field;

[0016] Acquire the dynamic feature optical flow fields of all adjacent image frames in the underwater image data, integrate the dynamic feature optical flow fields of all adjacent image frames to build a dynamic feature optical flow model of the target shrimp, and extract the dynamic features of egg swelling and egg color of the target shrimp through the dynamic feature optical flow model;

[0017] According to the dynamic characteristics of egg color, multiple groups of egg expansion control nodes are set. Based on the multiple groups of egg expansion control nodes, the dynamic characteristics of egg expansion are interpolated in time series to generate the egg expansion Hermite surface when the egg color of the target shrimp changes, which is defined as the target egg expansion Hermite surface.

[0018] Furthermore, in a preferred embodiment of the present invention, the initial layout diagram and the photographic field of view of the underwater camera are obtained, a multi-dimensional migration distribution diagram of the target shrimp in the shrimp breeding area is constructed, and the photography rationality of the initial layout diagram and the photographic field of view is analyzed through the multi-dimensional migration distribution diagram and corresponding adjustments are performed to obtain the underwater camera layout strategy and the photography optimization strategy, which specifically includes the following steps:

[0019] Acquire a shrimp farming area and a shrimp farming log, and retrieve a number of historical underwater multi-dimensional image data of target shrimps in the shrimp farming area within a preset time period through the shrimp farming log;

[0020] Constructing a multidimensional aquaculture virtual domain based on the shrimp aquaculture area, generating a plurality of migration point coordinates of the target shrimp in the shrimp aquaculture area according to the plurality of underwater multidimensional image data, and fitting and drawing a multidimensional migration distribution map of the target shrimp in the multidimensional aquaculture virtual domain based on the plurality of migration point coordinates;

[0021] Obtaining an initial layout diagram of underwater cameras in the shrimp farming area and the photographic field of view of each underwater camera, dividing the multidimensional farming virtual field into M sub-virtual fields based on the initial layout diagram, and stripping out the breeding migration space area of ​​the target shrimp in each sub-virtual field according to the multidimensional migration distribution diagram;

[0022] According to the photographic field of view of each underwater camera, a preset photographic area is created for each sub-virtual field, and the overlap between the breeding migration space area and the preset photographic area in each sub-virtual field is calculated in the multi-dimensional aquaculture virtual field. If the overlap is not greater than the preset overlap, the layout of the underwater cameras in each sub-virtual field is adjusted accordingly to generate an underwater camera layout strategy;

[0023] If the overlap is greater than the preset overlap, the breeding migration route of the target shrimp is extracted through the multi-dimensional migration distribution map, and the current photography angle and current photography direction of the underwater camera are obtained. Based on the preset photography area, current photography angle and current photography direction, the current photography area of ​​each underwater camera for the shrimp farming area is analyzed and located;

[0024] Acquire expected shrimp egg features that should be photographed at the current photographic angle and the current photographic direction, set an accurate photography planning threshold according to the expected shrimp egg features, plan an accurate photography area on the breeding migration route, and generate an accurate photography area on the breeding migration route until the accurate photography planning threshold is reached;

[0025] The Euclidean distance between the accurate photographic area and each of the current photographic areas is calculated one by one. If the Euclidean distance is greater than the preset Euclidean distance, the current photographic angle and direction of the underwater camera are adjusted to obtain a photographic optimization strategy.

[0026] Further, in a preferred embodiment of the present invention, the method of constructing a quadtree model based on the target shrimp species information identification to obtain a standard egg expansion Hermite surface matching the target egg expansion Hermite surface, and analyzing whether there is an expected egg color feature according to the standard egg expansion Hermite surface to obtain a first-class egg expansion state and a second-class egg expansion state, specifically includes the following steps:

[0027] Extracting the phenotypic characteristics of the target shrimp by using the dynamic feature optical flow model, and retrieving the variety information of the target shrimp in the big data network based on the phenotypic characteristics;

[0028] Obtain the current growth and breeding environment parameters of the shrimp breeding area, and at the same time obtain the shrimp breeding case knowledge map based on the big data network, and identify the growth and breeding environment parameters and the variety information through the shrimp breeding case knowledge map;

[0029] By identifying, a plurality of standard egg-carrying expansion degrees of the target shrimp when it is in the current growth and breeding environment parameters at a preset time sequence are obtained, and a plurality of standard egg-carrying expansion Hermite surfaces of the target shrimp when it is in the current growth and breeding environment parameters are drawn according to each of the standard egg-carrying expansion degrees;

[0030] Introducing a quadtree algorithm, constructing a quadtree space in the quadtree algorithm based on the plurality of standard Hermite surfaces, creating a root node in the quadtree space, and inserting the target Hermite surface into the quadtree space;

[0031] If the capacity limit of the current node where the target egg-swelling Hermite surface is located does not reach the preset capacity limit, the target egg-swelling Hermite surface is stored in the current node. If the preset capacity limit is reached, the current node is split into four child node quadrants with the root node as the initial split node;

[0032] Redistribute the target egg-swelling Hermite surface of the current node to the four sub-node quadrants for indexing and continuously segment and recursively align, and obtain the alignment value of the target egg-swelling Hermite surface with the expected egg-swelling Hermite surface in each sub-node quadrant. If the alignment value is greater than the preset alignment value, stop the segmentation recursive operation and output the matching standard egg-swelling Hermite surface.

[0033] Based on the knowledge graph of shrimp farming cases, the standard egg-carrying color features of the target shrimp when the matching expected egg-carrying expansion Hermite surface appears are obtained. If there is at least one or more standard egg-carrying color features among all the egg-carrying color dynamic features, the target egg-carrying expansion Hermite surface is marked as a Class I egg-carrying expansion state; if not, it is marked as a Class II egg-carrying state.

[0034] Further, in a preferred embodiment of the present invention, if the egg-carrying swelling state is a type of egg-carrying swelling state, a K-means clustering algorithm is introduced to cluster the shrimp egg distribution pattern of the egg-carrying swelling model diagram and construct a minimum spanning tree describing the reproduction and division of shrimp eggs. According to the minimum spanning tree, the benchmark volume model of shrimp eggs in different egg-carrying colors is fitted and counted to obtain a first shrimp egg-carrying quantity determination scheme, which specifically includes the following steps:

[0035] If the egg-carrying swelling state is a type of egg-carrying swelling state, a plurality of target egg-carrying swelling Hermite surfaces of different two-dimensional planes of the target shrimp are obtained through a dynamic feature optical flow model, and an egg-carrying swelling model diagram of the target shrimp is constructed based on the plurality of target egg-carrying swelling Hermite surfaces;

[0036] A K-means clustering algorithm is introduced to calculate the egg expansion model diagram to generate a plurality of shrimp egg clusters, a similarity matrix is ​​constructed based on the similarity between each dynamic feature of the egg color and each expected color feature of the egg in each shrimp egg cluster, and an ideal similarity range is preset;

[0037] If the similarity matrix of each group of shrimp egg clusters has a similarity within the ideal similarity range, the shrimp egg cluster is listed as the first shrimp egg distribution pattern; if not, the shrimp egg cluster is listed as the second shrimp egg distribution pattern;

[0038] Construct a minimum spanning tree, visit each shrimp egg cluster with the shrimp egg cluster as the cluster node, calculate the minimum weight edge between the currently visited cluster node and the next unvisited cluster node during the visit, and store the minimum weight edge in the minimum spanning tree until all cluster nodes are visited, and generate the first shrimp egg distribution pattern minimum spanning tree and the second shrimp egg distribution pattern minimum spanning tree;

[0039] Based on the first shrimp egg distribution pattern minimum spanning tree and the second shrimp egg distribution pattern minimum spanning tree, the minimum weight edge distribution between all cluster nodes is extracted to obtain the shrimp egg splitting path of each dynamic egg color characteristic and the shrimp egg splitting path of each expected egg color characteristic;

[0040] The reference volume model of the dynamic color characteristics of shrimp eggs when they are pregnant is obtained through the knowledge graph of shrimp farming cases, which is defined as the first volume model, and the reference volume model of the expected color characteristics of shrimp eggs when they are pregnant is obtained, which is defined as the second volume model;

[0041] The final egg-carrying model after the target shrimp produces the egg-carrying expansion model diagram is generated by the dynamic feature optical flow model, and the first volume model is fitted to the shrimp egg splitting path of each egg-carrying color dynamic feature based on the final egg-carrying model, and the fitting amount is counted to generate the first egg-carrying volume;

[0042] Repeat the above steps to fit the second volume model based on the shrimp egg splitting path of each expected egg color characteristic and calculate the fitting amount to obtain the second egg carrying capacity, combine the first egg carrying capacity and the second egg carrying capacity to generate the first shrimp egg carrying capacity determination scheme.

[0043] Furthermore, in a preferred embodiment of the present invention, if the egg-carrying swelling state is a second type of egg-carrying swelling state, a standard shrimp egg distribution texture is extracted based on the shrimp egg distribution image data of the breeding stage of the shrimp eggs, and the actual shrimp egg distribution texture in the egg-carrying swelling model diagram is obtained. The standard phenotype of the shrimp eggs is subjected to variation processing and fitted statistics to obtain the final egg-carrying quantity through the ratio of the standard shrimp egg distribution texture to the actual shrimp egg distribution texture, so as to obtain a second shrimp egg-carrying quantity determination scheme, which specifically includes the following steps:

[0044] If the egg swelling state is the second type of egg swelling state, the dynamic color characteristics of the egg are identified based on the shrimp farming case knowledge graph, and the breeding stage corresponding to the dynamic color characteristics of the shrimp eggs is output;

[0045] Obtain shrimp egg distribution image data of the standard phenotype of shrimp eggs at the breeding stage in the egg swelling model diagram of the target shrimp, introduce the GLCM algorithm to grayscale the shrimp egg distribution image data, and determine the plane parameters of each group of pixel pairs;

[0046] Traversing each group of pixel pairs in the shrimp egg distribution image data based on the plane parameters and recording gray value pairs to obtain a plurality of gray value pairs, constructing a gray level co-occurrence matrix according to the plurality of gray value pairs, and normalizing each pixel pair of the gray level co-occurrence matrix to obtain a standard shrimp egg distribution texture in the shrimp egg distribution image data;

[0047] Constructing a texture contrast field, performing texture calculation on the egg expansion model map by using the GLCM algorithm to obtain the actual shrimp egg distribution texture in the egg expansion model map, importing the standard shrimp egg distribution texture and the actual shrimp egg distribution texture into the texture contrast field for calculation, and obtaining the standard texture contrast and the actual texture contrast;

[0048] Calculating the ratio between the actual texture contrast and the standard texture contrast to obtain a texture contrast ratio, and if the texture contrast ratio is less than a preset texture contrast ratio, constructing a standard shrimp egg distribution model according to the standard shrimp egg distribution texture;

[0049] A variation threshold is set based on the ratio, and a standard phenotype of each shrimp egg in the standard shrimp egg distribution model is mutated according to the ratio until the variation threshold is reached, thereby generating an actual phenotypic model of the shrimp eggs;

[0050] According to the actual shrimp egg distribution texture, the actual phenotypic model of the shrimp eggs is fitted in the egg carrying model and the final fitted egg carrying capacity is statistically calculated to obtain the second shrimp egg carrying capacity determination scheme.

[0051] A second aspect of the present invention provides a system for determining the number of eggs carried by shrimps. The system for determining the number of eggs carried by shrimps comprises a memory and a processor. The memory stores a method program for determining the number of eggs carried by shrimps. When the method program for determining the number of eggs carried by shrimps is executed by the processor, any one of the steps of the method for determining the number of eggs carried by shrimps is implemented.

[0052] The present invention solves the technical defects existing in the background technology, and the beneficial technical effects of the present invention are:

[0053] Underwater image data of target shrimps are obtained, and an optical flow estimation algorithm is introduced to calculate and analyze the underwater image data to obtain a dynamic feature optical flow model of the target shrimps. The target egg expansion Hermite surface when the target shrimps' egg color changes is extracted according to the dynamic feature optical flow model; a quadtree model is constructed based on the species information of the target shrimps to obtain a standard egg expansion Hermite surface that matches the target egg expansion Hermite surface, and whether there is a standard egg color feature according to the standard egg expansion Hermite surface is analyzed to obtain a type I egg expansion state and a type II egg expansion state; if the target shrimps have a standard egg color feature, the target shrimps have a standard egg expansion state, and ... If the egg expansion state is a type I egg expansion state, the shrimp egg distribution pattern is clustered and a minimum spanning tree describing the reproduction and division of shrimp eggs is constructed. According to the minimum spanning tree, the reference volume model of shrimp eggs in different egg colors is fitted and counted to obtain the first shrimp egg quantity determination scheme; if the egg expansion state is a type II egg expansion state, the standard shrimp egg distribution texture is extracted based on the shrimp egg distribution image data of the reproductive stage of the shrimp eggs, and the standard phenotype of the shrimp eggs is subjected to variation processing and fitted and counted by the ratio of the standard shrimp egg distribution texture to the actual shrimp egg distribution texture to obtain the final egg quantity, and the second shrimp egg quantity determination scheme is obtained. The present invention can efficiently and accurately determine the shrimp egg quantity, on the one hand, replacing the cumbersome steps of traditional manual determination, saving time and labor, and on the other hand, greatly improving the determination accuracy of the shrimp egg quantity and reducing the determination error rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, drawings of other embodiments can be obtained based on these drawings without paying creative work.

[0055] Figure 1 A first method flow chart of a method for determining the egg carrying capacity of shrimp is shown;

[0056] Figure 2 A second method flow chart of a method for determining the egg carrying capacity of shrimp is shown;

[0057] Figure 3 A system framework diagram of a system for determining the egg carrying capacity of shrimp is shown. DETAILED DESCRIPTION

[0058] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0059] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.

[0060] The first aspect of the present invention provides a method for determining the number of eggs carried by shrimps, such as Figure 1 As shown, the following steps are included:

[0061] S102: Acquire underwater image data of target shrimps, introduce an optical flow estimation algorithm to calculate and analyze the underwater image data, obtain a dynamic feature optical flow model of the target shrimps, and extract the target egg-carrying expansion Hermite surface when the target shrimps change their egg color according to the dynamic feature optical flow model;

[0062] S104: Based on the target shrimp species information, a quadtree model is constructed to obtain an expected egg expansion Hermite surface that matches the target egg expansion Hermite surface, and whether there is an expected egg color feature is analyzed based on the expected egg expansion Hermite surface to obtain a first-class egg expansion state and a second-class egg expansion state;

[0063] S106: If the egg swelling state is a type of egg swelling state, a K-means clustering algorithm is introduced to cluster the shrimp egg distribution pattern of the egg swelling model diagram and construct a minimum spanning tree describing the reproduction and division of shrimp eggs, and a benchmark volume model of shrimp eggs in different egg swelling colors is fitted and counted according to the minimum spanning tree to obtain a first shrimp egg quantity determination scheme;

[0064] S108: If the egg-carrying swelling state is a Class II egg-carrying swelling state, a standard shrimp egg distribution texture is extracted based on the shrimp egg distribution image data of the reproductive stage of the shrimp eggs, and the actual shrimp egg distribution texture in the egg-carrying swelling model diagram is obtained. The standard phenotype of the shrimp eggs is subjected to variation processing through the ratio of the standard shrimp egg distribution texture to the actual shrimp egg distribution texture, and the final egg-carrying quantity is fitted and statistically calculated to obtain a second shrimp egg-carrying quantity determination scheme.

[0065] Furthermore, in a preferred embodiment of the present invention, the underwater image data of the target shrimp is obtained, an optical flow estimation algorithm is introduced to calculate and analyze the underwater image data, a dynamic characteristic optical flow model of the target shrimp is obtained, and the target egg expansion Hermite surface when the target shrimp changes its egg color is extracted according to the dynamic characteristic optical flow model, specifically comprising the following steps:

[0066] Obtaining the initial layout diagram and photographic field of view of the underwater camera, constructing a multi-dimensional migration distribution map of the target shrimp in the shrimp breeding area, analyzing the photographic rationality of the initial layout diagram and the photographic field of view through the multi-dimensional migration distribution map and performing corresponding adjustments, and obtaining the underwater camera layout strategy and photography optimization strategy;

[0067] Acquire a shrimp breeding area, and capture and shoot target shrimps by executing the underwater camera layout strategy and shooting optimization strategy in the shrimp breeding area to obtain underwater image data of the target shrimps;

[0068] An optical flow estimation algorithm is introduced, a minimum frame number threshold is preset in the optical flow estimation algorithm, image frames are extracted from the underwater image data based on the minimum frame number threshold, two frames of image data with the minimum adjacent interval are obtained, and the spatial vector gradients of the two frames of image data are calculated by a Sobel operator;

[0069] Presetting a local matrix window threshold, dividing two frames of image data into a plurality of local matrix windows according to the local matrix window threshold, and constructing an optical flow matrix equation and an optical flow vector equation in each local matrix window based on the spatial vector gradient of the two frames of image data;

[0070] For each local matrix window, the optical flow matrix equation and the optical flow vector equation are combined to solve the calculation speed, and the optical flow speed of each local matrix window is obtained, and the optical flow speeds of all local matrix windows are obtained, and the optical flow speeds of all local matrix windows are combined to generate a dynamic feature optical flow field;

[0071] Acquire the dynamic feature optical flow fields of all adjacent image frames in the underwater image data, integrate the dynamic feature optical flow fields of all adjacent image frames to build a dynamic feature optical flow model of the target shrimp, and extract the dynamic features of egg swelling and egg color of the target shrimp through the dynamic feature optical flow model;

[0072] According to the dynamic characteristics of egg color, multiple groups of egg expansion control nodes are set. Based on the multiple groups of egg expansion control nodes, the dynamic characteristics of egg expansion are interpolated in time series to generate the egg expansion Hermite surface when the egg color of the target shrimp changes, which is defined as the target egg expansion Hermite surface.

[0073] It should be noted that the reproduction of shrimp eggs of different shrimps is usually completed underwater. Therefore, for shrimp farming, multiple underwater cameras are usually set up in the shrimp farming area to shoot and observe the shrimp egg situation in real time. Since the eggs of the shrimps will expand and increase when the shrimp eggs reproduce, and the shrimps are in a free state underwater, if the traditional static image analysis method is used to analyze the changes in the shrimp abdomen, it may cause a large error in the analysis of the temporal characteristics, which greatly reduces the accuracy of the shrimp egg measurement. Therefore, this method analyzes the underwater image data frame by frame by optical flow estimation, so as to construct a visual optical flow model of the dynamic reproduction characteristics of the target shrimp in the shrimp farming area, thereby ensuring the integrity and smoothness of the extracted egg expansion characteristics and egg color characteristics, so that the underwater image data with temporal changes can show a smoother target shrimp abdomen egg change process, which improves the reliability of the shrimp egg measurement. Wherein, the spatial vector gradient is the gradient in the image x-axis and image y-axis directions. Since the color of shrimp eggs will show different color changes during the reproduction process of shrimp eggs at different stages, the Hermite curve of the expansion of shrimp eggs can be drawn to further analyze the reproductive change state of the eggs. This method does not require manual operation, and compared with the traditional manual measurement process of shrimp eggs one by one, it improves the measurement efficiency and saves labor costs. Among them, the Chinese name of the Hermite curve is the Hermite curve, which is a method based on parameterized drawing of computer graphics curves. By specifying the egg expansion control nodes and tangent vectors, several dynamic characteristics of egg expansion can be more accurately controlled according to the spline interpolation on the time series. The shape and direction of the curve is controlled, ensuring the accuracy of the expression of the egg expansion of the target shrimp when the color of the egg changes.

[0074] Furthermore, in a preferred embodiment of the present invention, the initial layout diagram and the photographic field of view of the underwater camera are obtained, a multi-dimensional migration distribution diagram of the target shrimp in the shrimp breeding area is constructed, and the photography rationality of the initial layout diagram and the photographic field of view is analyzed through the multi-dimensional migration distribution diagram and corresponding adjustments are performed to obtain the underwater camera layout strategy and the photography optimization strategy, which specifically includes the following steps:

[0075] Acquire a shrimp farming area and a shrimp farming log, and retrieve a number of historical underwater multi-dimensional image data of target shrimps in the shrimp farming area within a preset time period through the shrimp farming log;

[0076] Constructing a multidimensional aquaculture virtual domain based on the shrimp aquaculture area, generating a plurality of migration point coordinates of the target shrimp in the shrimp aquaculture area according to the plurality of underwater multidimensional image data, and fitting and drawing a multidimensional migration distribution map of the target shrimp in the multidimensional aquaculture virtual domain based on the plurality of migration point coordinates;

[0077] Obtaining an initial layout diagram of underwater cameras in the shrimp farming area and the photographic field of view of each underwater camera, dividing the multidimensional farming virtual field into M sub-virtual fields based on the initial layout diagram, and stripping out the breeding migration space area of ​​the target shrimp in each sub-virtual field according to the multidimensional migration distribution diagram;

[0078] According to the photographic field of view of each underwater camera, a preset photographic area is created for each sub-virtual field, and the overlap between the breeding migration space area and the preset photographic area in each sub-virtual field is calculated in the multi-dimensional aquaculture virtual field. If the overlap is not greater than the preset overlap, the layout of the underwater cameras in each sub-virtual field is adjusted accordingly to generate an underwater camera layout strategy;

[0079] If the overlap is greater than the preset overlap, the breeding migration route of the target shrimp is extracted through the multi-dimensional migration distribution map, and the current photography angle and current photography direction of the underwater camera are obtained. Based on the preset photography area, current photography angle and current photography direction, the current photography area of ​​each underwater camera for the shrimp farming area is analyzed and located;

[0080] Acquire expected shrimp egg features that should be photographed at the current photographic angle and the current photographic direction, set an accurate photography planning threshold according to the expected shrimp egg features, plan an accurate photography area on the breeding migration route, and generate an accurate photography area on the breeding migration route until the accurate photography planning threshold is reached;

[0081] The Euclidean distance between the accurate photographic area and each of the current photographic areas is calculated one by one. If the Euclidean distance is greater than the preset Euclidean distance, the current photographic angle and direction of the underwater camera are adjusted to obtain a photographic optimization strategy.

[0082] It should be noted that for shrimp farming, real-time observation and recording of underwater cameras are usually required to keep track of the actual farming conditions of shrimp in the farming area at all times to ensure high-quality farming of shrimp. The analysis of shrimp egg carrying capacity usually requires the use of images or video data of shrimp underwater reproduction and migration. Therefore, in order to improve the accuracy of the analysis and determination of shrimp egg carrying capacity, this method can adjust and optimize the layout and shooting strategy of underwater cameras in shrimp farming areas, thereby improving the accuracy and convenience of obtaining images or images of shrimp breeding and migration activities in different directions and angles, ensuring the clarity of the captured images or video data, and further improving the stability and reliability of the results of shrimp egg carrying capacity analysis and determination. Since underwater cameras have a certain blind spot in the field of view, if the shrimp is in this blind spot during the breeding and migration process, the underwater camera cannot capture the breeding images of the shrimp. Therefore, this method can analyze the reasonable shooting area of ​​the underwater camera based on the breeding and migration range of the shrimp in the breeding area and the shooting range of the underwater camera, so as to rationally adjust the layout of the underwater camera. In addition, the underwater camera also has a certain shooting angle and direction. In order to ensure the real-time follow-up capture of shrimp breeding activities, the method can plan an accurate shooting area for the shrimp breeding migration, and adjust the shooting angle and direction of all underwater cameras so that the current shooting area of ​​each underwater camera is always consistent with the accurate shooting area, thereby realizing the image or video data of shrimp egg-carrying breeding activities at all times, and improving the reliability of dynamic data analysis in the process of shrimp egg-carrying quantity measurement.

[0083] Further, in a preferred embodiment of the present invention, the method of constructing a quadtree model based on the target shrimp species information identification to obtain a standard egg expansion Hermite surface matching the target egg expansion Hermite surface, and analyzing whether there is an expected egg color feature according to the standard egg expansion Hermite surface to obtain a first-class egg expansion state and a second-class egg expansion state, specifically includes the following steps:

[0084] Extracting the phenotypic characteristics of the target shrimp by using the dynamic feature optical flow model, and retrieving the variety information of the target shrimp in the big data network based on the phenotypic characteristics;

[0085] Obtain the current growth and breeding environment parameters of the shrimp breeding area, and at the same time obtain the shrimp breeding case knowledge map based on the big data network, and identify the growth and breeding environment parameters and the variety information through the shrimp breeding case knowledge map;

[0086] By identifying, a plurality of standard egg-carrying expansion degrees of the target shrimp when it is in the current growth and breeding environment parameters at a preset time sequence are obtained, and a plurality of standard egg-carrying expansion Hermite surfaces of the target shrimp when it is in the current growth and breeding environment parameters are drawn according to each of the standard egg-carrying expansion degrees;

[0087] Introducing a quadtree algorithm, constructing a quadtree space in the quadtree algorithm based on the plurality of standard Hermite surfaces, creating a root node in the quadtree space, and inserting the target Hermite surface into the quadtree space;

[0088] If the capacity limit of the current node where the target egg-swelling Hermite surface is located does not reach the preset capacity limit, the target egg-swelling Hermite surface is stored in the current node. If the preset capacity limit is reached, the current node is split into four child node quadrants with the root node as the initial split node;

[0089] Redistribute the target egg-swelling Hermite surface of the current node to the four sub-node quadrants for indexing and continuously segment and recursively align, and obtain the alignment value of the target egg-swelling Hermite surface with the expected egg-swelling Hermite surface in each sub-node quadrant. If the alignment value is greater than the preset alignment value, stop the segmentation recursive operation and output the matching standard egg-swelling Hermite surface.

[0090] Based on the knowledge graph of shrimp farming cases, the standard egg-carrying color features of the target shrimp when the matching expected egg-carrying expansion Hermite surface appears are obtained. If there is at least one or more standard egg-carrying color features among all the egg-carrying color dynamic features, the target egg-carrying expansion Hermite surface is marked as a Class I egg-carrying expansion state; if not, it is marked as a Class II egg-carrying state.

[0091] It should be noted that the current growth and breeding environment parameters include temperature, humidity, dissolved oxygen, light intensity and nutrient content. The main reason for the color change of shrimp eggs is that the yolk in the shrimp eggs contains different nutrients at different reproductive and developmental stages. For example, the yolk contains a large amount of carotenoids in the early developmental stage of shrimp eggs. And as the reproductive and developmental stages advance, the eggs will gradually produce different color changes, and the shape of the eggs will also expand and increase accordingly. Therefore, the method can obtain several standard egg expansion Hermite surfaces according to the variety information of the target shrimp and the current growth and breeding environment parameters of the shrimp breeding area. These standard egg expansion Hermite surfaces are the standard egg expansion change graphs generated during the reproduction and development of the target shrimp in the current shrimp breeding area. Therefore, these standard egg expansion Hermite surfaces can be partitioned by constructing a quadtree model to facilitate spatial indexing, providing a reliable shrimp egg reproduction and development data analysis basis for the dynamic expansion changes of the target shrimp eggs when the egg color changes when the target shrimp eggs generated in the previous step. The target egg expansion Hermite surface is spatially indexed in this quadtree model to match the standard egg expansion change graph that matches it, and the standard egg color characteristics that appear during the reproduction and development of the standard egg expansion change graph can be used to further analyze the egg state of the target egg expansion Hermite surface.

[0092] It should be noted that if there is at least one or more standard egg color characteristics among all the dynamic characteristics of egg color, it means that the target shrimp has a standard color of internal shrimp eggs during the egg-carrying and reproductive expansion process, which means that the shrimp eggs in the current breeding area tend to the next reproductive and development stage, which makes the eggs tend to the saturation increase of the mature development stage. Therefore, the internal egg-carrying amount of the target shrimp may change in quantity and shape; if there is no one or more dynamic characteristics of egg color in the expected egg color characteristics, it means that the shrimp eggs do not tend to the next reproductive and development stage in the current breeding area, so the normal reproductive and development performance is low, so that the egg-carrying amount does not change across stages, but only changes in quantity, which leads to the expansion of the egg-carrying amount. Through this method, it is possible to analyze and determine the different factors and states that cause the egg-carrying expansion and color differences, so as to improve the accuracy of the determination of the shrimp egg-carrying amount.

[0093] Further, in a preferred embodiment of the present invention, if the egg-carrying swelling state is a type of egg-carrying swelling state, a K-means clustering algorithm is introduced to cluster the shrimp egg distribution pattern of the egg-carrying swelling model diagram and construct a minimum spanning tree describing the reproduction and division of shrimp eggs. According to the minimum spanning tree, the benchmark volume model of shrimp eggs in different egg-carrying colors is fitted and counted to obtain a first shrimp egg-carrying quantity determination scheme, which specifically includes the following steps:

[0094] If the egg-carrying swelling state is a type of egg-carrying swelling state, a plurality of target egg-carrying swelling Hermite surfaces of different two-dimensional planes of the target shrimp are obtained through a dynamic feature optical flow model, and an egg-carrying swelling model diagram of the target shrimp is constructed based on the plurality of target egg-carrying swelling Hermite surfaces;

[0095] A K-means clustering algorithm is introduced to calculate the egg expansion model diagram to generate a plurality of shrimp egg clusters, a similarity matrix is ​​constructed based on the similarity between each dynamic feature of the egg color and each expected color feature of the egg in each shrimp egg cluster, and an ideal similarity range is preset;

[0096] If the similarity matrix of each group of shrimp egg clusters has a similarity within the ideal similarity range, the shrimp egg cluster is listed as the first shrimp egg distribution pattern; if not, the shrimp egg cluster is listed as the second shrimp egg distribution pattern;

[0097] Construct a minimum spanning tree, visit each shrimp egg cluster with the shrimp egg cluster as the cluster node, calculate the minimum weight edge between the currently visited cluster node and the next unvisited cluster node during the visit, and store the minimum weight edge in the minimum spanning tree until all cluster nodes are visited, and generate the first shrimp egg distribution pattern minimum spanning tree and the second shrimp egg distribution pattern minimum spanning tree;

[0098] Based on the first shrimp egg distribution pattern minimum spanning tree and the second shrimp egg distribution pattern minimum spanning tree, the minimum weight edge distribution between all cluster nodes is extracted to obtain the shrimp egg splitting path of each dynamic egg color characteristic and the shrimp egg splitting path of each expected egg color characteristic;

[0099] The reference volume model of the dynamic color characteristics of shrimp eggs when they are pregnant is obtained through the knowledge graph of shrimp farming cases, which is defined as the first volume model, and the reference volume model of the expected color characteristics of shrimp eggs when they are pregnant is obtained, which is defined as the second volume model;

[0100] The final egg-carrying model after the target shrimp produces the egg-carrying expansion model diagram is generated by the dynamic feature optical flow model, and the first volume model is fitted to the shrimp egg splitting path of each egg-carrying color dynamic feature based on the final egg-carrying model, and the fitting amount is counted to generate the first egg-carrying volume;

[0101] Repeat the above steps to fit the second volume model based on the shrimp egg splitting path of each expected egg color characteristic and calculate the fitting amount to obtain the second egg carrying capacity, combine the first egg carrying capacity and the second egg carrying capacity to generate the first shrimp egg carrying capacity determination scheme.

[0102] It should be noted that if the egg-carrying expansion state is a type of egg-carrying expansion state, it means that there may be shrimp eggs of different colors in the target shrimp eggs, and the shrimp eggs corresponding to the newly added colors during the egg-carrying expansion process are the color characteristics presented under normal reproductive and development conditions. Therefore, the individual volume of the shrimp eggs of the newly added color may increase, thereby affecting the expansion of the target shrimp eggs together with the reproductive development of shrimp eggs with other color characteristics, resulting in a difference in the proportion of the two volumes in the eggs. Therefore, this method first constructs an egg expansion model diagram of the target shrimp based on multiple target egg expansion Hermite surfaces. The egg expansion model diagram can show the path trend of shrimp eggs with different color characteristics during reproduction and division. Therefore, the shrimp eggs shown in the model diagram are further divided into several clusters using the K-means clustering algorithm. Each cluster can represent a shrimp egg type. Then, a similarity matrix between each egg color dynamic feature and each egg expected color feature is constructed in each group of shrimp egg clusters. If the similarity matrix of each group of shrimp egg clusters has a similarity within the ideal similarity range, it means that the color and shape types of the two shrimp eggs are highly similar, so the shrimp egg cluster is listed as the first shrimp egg distribution pattern. If not, it means that the color and shape types of the two shrimp eggs are not similar, so the shrimp egg cluster is listed as the second shrimp egg distribution pattern. This step improves the degree of distinction and rationality of the analysis and planning of the splitting paths of shrimp eggs with different color characteristics in shrimp eggs, avoids confusion and interweaving of the splitting paths of shrimp eggs with different color characteristics, and improves the reliability of the subsequent minimum spanning tree to express the potential reproductive splitting paths of shrimp eggs. Then, the minimum spanning tree of the first shrimp egg distribution pattern and the minimum spanning tree of the second shrimp egg distribution pattern are generated. The edges in the minimum spanning tree represent the potential paths of shrimp egg state conversion. By finding the root node on the minimum spanning tree, that is, the known initial shrimp egg state, the reproductive division path of the shrimp eggs during the target shrimp egg expansion process can be obtained, so that the shrimp egg volume can be fitted one by one according to the path to count the number of eggs of the shrimp. This method replaces the tedious steps of manually dissecting shrimp eggs and counting the number one by one by fitting shrimp eggs according to the shrimp egg reproductive division path, which saves time and labor, and can ensure the accuracy of the determination of the shrimp egg volume, with low error rate and high reliability.

[0103] Furthermore, in a preferred embodiment of the present invention, if the egg-carrying swelling state is the second type of egg-carrying swelling state, a standard shrimp egg distribution texture is extracted based on the shrimp egg distribution image data of the reproductive stage of the shrimp eggs, and the actual shrimp egg distribution texture in the egg-carrying swelling model diagram is obtained. The standard phenotype of the shrimp eggs is subjected to variation processing through the ratio of the standard shrimp egg distribution texture to the actual shrimp egg distribution texture, and the final egg-carrying quantity is fitted and statistically calculated to obtain a second shrimp egg-carrying quantity determination scheme, such as Figure 2 As shown, the specific steps include:

[0104] S202: If the egg swelling state is the second type of egg swelling state, the dynamic color characteristics of the egg are identified based on the shrimp farming case knowledge graph, and the breeding stage corresponding to the dynamic color characteristics of the shrimp eggs is output;

[0105] S204: acquiring shrimp egg distribution image data of the standard phenotype of shrimp eggs at the breeding stage in the egg swelling model diagram of the target shrimp, introducing a GLCM algorithm to grayscale the shrimp egg distribution image data, and determining the plane parameters of each group of pixel pairs;

[0106] S206: traversing each pixel pair in the shrimp egg distribution image data based on the plane parameters and recording the gray value pairs to obtain a plurality of gray value pairs, constructing a gray level co-occurrence matrix according to the plurality of gray value pairs, and normalizing each pixel pair of the gray level co-occurrence matrix to obtain a standard shrimp egg distribution texture in the shrimp egg distribution image data;

[0107] S208: constructing a texture contrast field, performing texture calculation on the egg swelling model map by using the GLCM algorithm to obtain the actual shrimp egg distribution texture in the egg swelling model map, importing the standard shrimp egg distribution texture and the actual shrimp egg distribution texture into the texture contrast field for calculation, and obtaining the standard texture contrast and the actual texture contrast;

[0108] S210: Calculate the ratio between the actual texture contrast and the standard texture contrast to obtain a texture contrast ratio; if the texture contrast ratio is less than a preset texture contrast ratio, construct a standard shrimp egg distribution model according to the standard shrimp egg distribution texture;

[0109] S212: setting a variation threshold based on the ratio, performing variation processing on the standard phenotype of each shrimp egg in the standard shrimp egg distribution model according to the ratio until the variation threshold is reached, thereby generating an actual phenotype model of the shrimp eggs;

[0110] S214: fitting the actual phenotypic model of the shrimp eggs in the egg-carrying model according to the actual shrimp egg distribution texture and calculating the final fitted egg-carrying capacity to obtain a second shrimp egg-carrying capacity determination scheme.

[0111] It should be noted that if the egg swelling state is the second type of egg swelling state, it means that the target shrimp eggs do not have color characteristics that tend to the next stage of reproduction and development, so the eggs with egg swelling are only increased in number, and their phenotypic volume may not change significantly, which is consistent with the original shrimp eggs. Therefore, it is only necessary to analyze the number of shrimp eggs proliferated during the egg swelling process. Since the distribution density of shrimp eggs of the same specifications in the eggs is uniform, the distribution texture between each shrimp egg should also be highly consistent. Therefore, this method can perform texture contrast analysis on the actual shrimp egg distribution texture of the target shrimp when the eggs are swollen according to the standard shrimp egg distribution texture of the standard phenotype shrimp eggs in the eggs. When the actual shrimp egg distribution texture is greatly offset compared to the standard shrimp egg distribution texture, it means that the actual shrimp egg phenotype that forms the actual distribution texture has increased or decreased, resulting in differences from the standard shrimp egg distribution texture. Therefore, the standard phenotypic model of shrimp eggs can be mutated according to the texture contrast ratio between the two, so that it mutates to the same state as the actual shrimp egg phenotypic model, and the actual shrimp egg phenotypic model is embedded and fitted according to the shrimp egg vacancy position in the actual shrimp egg distribution texture, and the actual shrimp egg model embedded and fitted is counted, so that the specific shrimp egg carrying capacity can be known. This method can accurately and quickly measure the shrimp egg carrying capacity under any manual operation conditions, greatly improving the efficiency and quality of the shrimp egg carrying capacity measurement, and compared with the traditional egg carrying capacity measurement method, it ensures the rationality and reliability of the measurement results, saves labor costs, and has high economic benefits.

[0112] A second aspect of the present invention provides a system for determining the number of shrimp eggs, such as Figure 3 As shown, the system for determining the number of eggs carried by shrimps includes a memory 31 and a processor 32. The memory 31 stores a method program for determining the number of eggs carried by shrimps. When the method program for determining the number of eggs carried by shrimps is executed by the processor 32, any one of the method steps for determining the number of eggs carried by shrimps is implemented.

[0113] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A method for determining the number of eggs carried by shrimp, characterized in that: The following steps are involved: Acquire underwater image data of target shrimps, introduce an optical flow estimation algorithm to perform calculation and analysis on the underwater image data, obtain a dynamic feature optical flow model of the target shrimps, and extract the target egg-carrying expansion Hermite surface when the color of the target shrimps changes according to the dynamic feature optical flow model; Based on the target shrimp species information, a quadtree model is constructed to obtain a standard egg swelling Hermite surface that matches the target egg swelling Hermite surface. According to the standard egg swelling Hermite surface, it is analyzed whether there is an expected egg swelling color feature, and the first and second egg swelling states are obtained. If the egg swelling state is a type of egg swelling state, the K-means clustering algorithm is introduced to cluster the shrimp egg distribution pattern of the egg swelling model diagram and construct a minimum spanning tree describing the reproduction and division of shrimp eggs. According to the minimum spanning tree, the benchmark volume model of shrimp eggs in different egg swelling colors is fitted and counted to obtain the first shrimp egg quantity determination scheme; If the egg-carrying swelling state is a Class II egg-carrying swelling state, the standard shrimp egg distribution texture is extracted based on the shrimp egg distribution image data of the breeding stage of the shrimp eggs, and the actual shrimp egg distribution texture in the egg-carrying swelling model diagram is obtained. The standard phenotype of the shrimp eggs is subjected to variation processing through the ratio of the standard shrimp egg distribution texture to the actual shrimp egg distribution texture, and the final egg-carrying quantity is fitted and statistically calculated to obtain a second shrimp egg-carrying quantity determination scheme.

2. A method for determining the number of shrimp eggs according to claim 1, characterized in that: The method of acquiring underwater image data of target shrimp, introducing an optical flow estimation algorithm to perform calculation and analysis on the underwater image data, obtaining a dynamic feature optical flow model of the target shrimp, and extracting a target egg-carrying expansion Hermite surface when the color of the target shrimp changes according to the dynamic feature optical flow model, specifically comprises the following steps: Obtaining the initial layout diagram and photographic field of view of the underwater camera, constructing a multi-dimensional migration distribution map of the target shrimp in the shrimp breeding area, analyzing the photographic rationality of the initial layout diagram and the photographic field of view through the multi-dimensional migration distribution map and performing corresponding adjustments, and obtaining the underwater camera layout strategy and photography optimization strategy; Acquire a shrimp breeding area, and capture and shoot target shrimps by executing the underwater camera layout strategy and shooting optimization strategy in the shrimp breeding area to obtain underwater image data of the target shrimps; An optical flow estimation algorithm is introduced, a minimum frame number threshold is preset in the optical flow estimation algorithm, image frames are extracted from the underwater image data based on the minimum frame number threshold, two frames of image data with the minimum adjacent interval are obtained, and the spatial vector gradients of the two frames of image data are calculated by a Sobel operator; Presetting a local matrix window threshold, dividing two frames of image data into a plurality of local matrix windows according to the local matrix window threshold, and constructing an optical flow matrix equation and an optical flow vector equation in each local matrix window based on the spatial vector gradient of the two frames of image data; For each local matrix window, the optical flow matrix equation and the optical flow vector equation are combined to solve the calculation speed, and the optical flow speed of each local matrix window is obtained, and the optical flow speeds of all local matrix windows are obtained, and the optical flow speeds of all local matrix windows are combined to generate a dynamic feature optical flow field; Acquire the dynamic feature optical flow fields of all adjacent image frames in the underwater image data, integrate the dynamic feature optical flow fields of all adjacent image frames to build a dynamic feature optical flow model of the target shrimp, and extract the dynamic features of egg swelling and egg color of the target shrimp through the dynamic feature optical flow model; According to the dynamic characteristics of egg color, multiple groups of egg expansion control nodes are set. Based on the multiple groups of egg expansion control nodes, the dynamic characteristics of egg expansion are interpolated in time series to generate the egg expansion Hermite surface when the egg color of the target shrimp changes, which is defined as the target egg expansion Hermite surface.

3. A method for determining the number of shrimp eggs according to claim 2, characterized in that: The method of obtaining the initial layout diagram and the photographic field of view of the underwater camera, constructing a multi-dimensional migration distribution diagram of the target shrimp in the shrimp breeding area, analyzing the photographic rationality of the initial layout diagram and the photographic field of view through the multi-dimensional migration distribution diagram and performing corresponding adjustments, and obtaining the underwater camera layout strategy and the photographic optimization strategy specifically includes the following steps: Acquire a shrimp farming area and a shrimp farming log, and retrieve a number of historical underwater multi-dimensional image data of target shrimps in the shrimp farming area within a preset time period through the shrimp farming log; Constructing a multidimensional aquaculture virtual domain based on the shrimp aquaculture area, generating a plurality of migration point coordinates of the target shrimp in the shrimp aquaculture area according to the plurality of historical underwater multidimensional image data, and fitting and drawing a multidimensional migration distribution map of the target shrimp in the multidimensional aquaculture virtual domain based on the plurality of migration point coordinates; Obtaining an initial layout diagram of underwater cameras in the shrimp farming area and the photographic field of view of each underwater camera, dividing the multidimensional farming virtual field into M sub-virtual fields based on the initial layout diagram, and stripping out the breeding migration space area of ​​the target shrimp in each sub-virtual field according to the multidimensional migration distribution diagram; According to the photographic field of view of each underwater camera, a preset photographic area is created for each sub-virtual field, and the overlap between the breeding migration space area and the preset photographic area in each sub-virtual field is calculated in the multi-dimensional aquaculture virtual field. If the overlap is not greater than the preset overlap, the layout of the underwater cameras in each sub-virtual field is adjusted accordingly to generate an underwater camera layout strategy; If the overlap is greater than the preset overlap, the breeding migration route of the target shrimp is extracted through the multi-dimensional migration distribution map, and the current photography angle and current photography direction of the underwater camera are obtained. Based on the preset photography area, current photography angle and current photography direction, the current photography area of ​​each underwater camera for the shrimp farming area is analyzed and located; Acquire expected shrimp egg features that should be photographed at the current photographic angle and the current photographic direction, set an accurate photography planning threshold according to the expected shrimp egg features, plan an accurate photography area on the breeding migration route, and generate an accurate photography area on the breeding migration route until the accurate photography planning threshold is reached; The Euclidean distance between the accurate photographic area and each of the current photographic areas is calculated one by one. If the Euclidean distance is greater than the preset Euclidean distance, the current photographic angle and direction of the underwater camera are adjusted to obtain a photographic optimization strategy.

4. A method for determining the number of shrimp eggs according to claim 1, characterized in that: The method of identifying the species information of the target shrimp and constructing a quadtree model to obtain a standard egg swelling Hermite surface that matches the target egg swelling Hermite surface, analyzing whether there is an expected egg color feature according to the standard egg swelling Hermite surface, and obtaining a first type of egg swelling state and a second type of egg swelling state specifically includes the following steps: Extracting the phenotypic characteristics of the target shrimp by using the dynamic feature optical flow model, and retrieving the variety information of the target shrimp in the big data network based on the phenotypic characteristics; Obtain the current growth and breeding environment parameters of the shrimp breeding area, and at the same time obtain the shrimp breeding case knowledge map based on the big data network, and identify the growth and breeding environment parameters and the variety information through the shrimp breeding case knowledge map; By identifying, a plurality of standard egg-carrying expansion degrees of the target shrimp when it is in the current growth and breeding environment parameters at a preset time sequence are obtained, and a plurality of standard egg-carrying expansion Hermite surfaces of the target shrimp when it is in the current growth and breeding environment parameters are drawn according to each of the standard egg-carrying expansion degrees; Introducing a quadtree algorithm, constructing a quadtree space in the quadtree algorithm based on the plurality of standard Hermite surfaces, creating a root node in the quadtree space, and inserting the target Hermite surface into the quadtree space; If the capacity limit of the current node where the target egg-swelling Hermite surface is located does not reach the preset capacity limit, the target egg-swelling Hermite surface is stored in the current node. If the preset capacity limit is reached, the current node is split into four child node quadrants with the root node as the initial split node; Redistribute the target egg-swelling Hermite surface of the current node to the four sub-node quadrants for indexing and continuously segment and recursively align, and obtain the alignment value of the target egg-swelling Hermite surface with the expected egg-swelling Hermite surface in each sub-node quadrant. If the alignment value is greater than the preset alignment value, stop the segmentation recursive operation and output the matching standard egg-swelling Hermite surface. Based on the knowledge graph of shrimp farming cases, the standard egg-carrying color features of the target shrimp when the matching expected egg-carrying expansion Hermite surface appears are obtained. If there is at least one or more standard egg-carrying color features among all the egg-carrying color dynamic features, the target egg-carrying expansion Hermite surface is marked as a Class I egg-carrying expansion state; if not, it is marked as a Class II egg-carrying expansion state.

5. A method for determining the number of shrimp eggs according to claim 1, characterized in that: If the egg swelling state is a type of egg swelling state, a K-means clustering algorithm is introduced to cluster the shrimp egg distribution pattern of the egg swelling model diagram and construct a minimum spanning tree describing the reproduction and division of shrimp eggs. According to the minimum spanning tree, a benchmark volume model of shrimp eggs in different egg swelling colors is fitted and counted to obtain a first shrimp egg quantity determination scheme, which specifically includes the following steps: If the egg-carrying swelling state is a type of egg-carrying swelling state, a plurality of target egg-carrying swelling Hermite surfaces of different two-dimensional planes of the target shrimp are obtained through a dynamic feature optical flow model, and an egg-carrying swelling model diagram of the target shrimp is constructed based on the plurality of target egg-carrying swelling Hermite surfaces; A K-means clustering algorithm is introduced to calculate the egg expansion model diagram to generate a plurality of shrimp egg clusters, a similarity matrix is ​​constructed based on the similarity between each dynamic feature of the egg color and each expected color feature of the egg in each shrimp egg cluster, and an ideal similarity range is preset; If the similarity matrix of each group of shrimp egg clusters has a similarity within the ideal similarity range, the shrimp egg cluster is listed as the first shrimp egg distribution pattern; if not, the shrimp egg cluster is listed as the second shrimp egg distribution pattern; Construct a minimum spanning tree, visit each shrimp egg cluster with the shrimp egg cluster as the cluster node, calculate the minimum weight edge between the currently visited cluster node and the next unvisited cluster node during the visit, and store the minimum weight edge in the minimum spanning tree until all cluster nodes are visited, and generate the first shrimp egg distribution pattern minimum spanning tree and the second shrimp egg distribution pattern minimum spanning tree; Based on the first shrimp egg distribution pattern minimum spanning tree and the second shrimp egg distribution pattern minimum spanning tree, the minimum weight edge distribution between all cluster nodes is extracted to obtain the shrimp egg splitting path of each dynamic egg color characteristic and the shrimp egg splitting path of each expected egg color characteristic; The reference volume model of the dynamic color characteristics of shrimp eggs when they are pregnant is obtained through the knowledge graph of shrimp farming cases, which is defined as the first volume model, and the reference volume model of the expected color characteristics of shrimp eggs when they are pregnant is obtained, which is defined as the second volume model; The final egg-carrying model after the target shrimp produces the egg-carrying expansion model diagram is generated by the dynamic feature optical flow model, and the first volume model is fitted to the shrimp egg splitting path of each egg-carrying color dynamic feature based on the final egg-carrying model, and the fitting amount is counted to generate the first egg-carrying volume; Repeat the above steps to fit the second volume model based on the shrimp egg splitting path of each expected egg color characteristic and calculate the fitting amount to obtain the second egg carrying capacity, combine the first egg carrying capacity and the second egg carrying capacity to generate the first shrimp egg carrying capacity determination scheme.

6. A method for determining the number of shrimp eggs according to claim 1, characterized in that: If the egg swelling state is the second type of egg swelling state, a standard shrimp egg distribution texture is extracted based on the shrimp egg distribution image data of the breeding stage of the shrimp eggs, and the actual shrimp egg distribution texture in the egg swelling model diagram is obtained. The standard phenotype of the shrimp eggs is subjected to variation processing and the final egg carrying capacity is statistically fitted through the ratio of the standard shrimp egg distribution texture to the actual shrimp egg distribution texture, so as to obtain a second shrimp egg carrying capacity determination scheme, which specifically includes the following steps: If the egg swelling state is the second type of egg swelling state, the dynamic color characteristics of the egg are identified based on the shrimp farming case knowledge graph, and the breeding stage corresponding to the dynamic color characteristics of the shrimp eggs is output; Obtain shrimp egg distribution image data of the standard phenotype of shrimp eggs at the breeding stage in the egg swelling model diagram of the target shrimp, introduce the GLCM algorithm to grayscale the shrimp egg distribution image data, and determine the plane parameters of each group of pixel pairs; Traversing each group of pixel pairs in the shrimp egg distribution image data based on the plane parameters and recording gray value pairs to obtain a plurality of gray value pairs, constructing a gray level co-occurrence matrix according to the plurality of gray value pairs, and normalizing each pixel pair of the gray level co-occurrence matrix to obtain a standard shrimp egg distribution texture in the shrimp egg distribution image data; Constructing a texture contrast field, performing texture calculation on the egg expansion model map by using the GLCM algorithm to obtain the actual shrimp egg distribution texture in the egg expansion model map, importing the standard shrimp egg distribution texture and the actual shrimp egg distribution texture into the texture contrast field for calculation, and obtaining the standard texture contrast and the actual texture contrast; Calculating the ratio between the actual texture contrast and the standard texture contrast to obtain a texture contrast ratio, and if the texture contrast ratio is less than a preset texture contrast ratio, constructing a standard shrimp egg distribution model according to the standard shrimp egg distribution texture; A variation threshold is set based on the ratio, and a standard phenotype of each shrimp egg in the standard shrimp egg distribution model is mutated according to the ratio until the variation threshold is reached, thereby generating an actual phenotypic model of the shrimp eggs; According to the actual shrimp egg distribution texture, the actual phenotypic model of the shrimp eggs is fitted in the egg carrying model and the final fitted egg carrying capacity is statistically calculated to obtain the second shrimp egg carrying capacity determination scheme.

7. A system for determining the number of eggs carried by shrimp, characterized in that: The system for determining the number of eggs carried by shrimps comprises a memory and a processor, wherein the memory stores a method program for determining the number of eggs carried by shrimps. When the method program for determining the number of eggs carried by shrimps is executed by the processor, the method steps for determining the number of eggs carried by shrimps as described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Snakehead egg counting method based on image processing

    CN113744184A

  • Egg counting method and device

    CN113989211A