Automatic water changing method and equipment for seafood temporary rearing tank

By installing an underwater camera in the seafood temporary bin and evaluating the turbidity of the water body by image processing technology, the efficient and accurate automatic water change of the seafood temporary bin is solved, and the problem of low water quality monitoring accuracy in the existing technology is solved, and the survival rate and quality of seafood is improved.

CN120088631AInactive Publication Date: 2025-06-03GUANGZHOU GAOSONG FISHING POND EQUIP CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510154708.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2025-06-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing automatic water change method for temporarily maintaining seafood tanks is difficult to timely monitor the deterioration of water quality in the tanks, and the monitoring accuracy is not high, resulting in seafood becoming ill or dying.

Method used

By installing an underwater camera, the water body image is obtained, and the color and texture characteristics of the image are analyzed, the turbidity of the water body is automatically evaluated, thereby achieving efficient and accurate automatic water change of seafood temporary raising tanks.

Benefits of technology

Real-time monitoring and accurate evaluation of the water quality of seafood temporary raising tanks is achieved, and water change operations are promptly triggered to ensure good water quality in seafood temporary raising tanks and improve the survival rate and quality of seafood.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120088631A_ABST
    Figure CN120088631A_ABST
Patent Text Reader

Abstract

The invention provides an automatic water changing method and equipment for a seafood temporary rearing tank, and the method comprises the steps: converting a target water body image obtained after preprocessing from an RGB color space into an HIS color space, and extracting the tone value of each pixel in the converted target water body image, so as to calculate the average tone value of the water body of the seafood temporary rearing tank; when the average hue value of the water body is greater than the reference chromatic value, calculating a gray-level co-occurrence matrix of the target water body image, extracting texture features of the water body based on the gray-level co-occurrence matrix, and evaluating the turbidity of the water body based on the texture features of the water body; and when the turbidity of the water body is greater than the reference turbidity, automatically changing water in the seafood temporary rearing tank. According to the application, efficient and accurate automatic water changing of the seafood temporary rearing tank is realized, an extra water quality sensor is not needed, and the water quality monitoring of the seafood temporary rearing tank can be realized by combining an image processing technology while the biological state of seafood is monitored by using the underwater camera.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of seafood temporary cultivation. Specifically, this application relates to an automatic water change method and device for a seafood temporary cultivation tank. Background Art

[0002] A seafood temporary cultivation tank is a facility for temporarily storing and cultivating seafood, which allows seafood to be stored in an environment simulating its natural habitat after being caught or during transportation. The main purpose of this facility is to maintain the freshness and vitality of seafood, reducing its stress and mortality before transportation or sale.

[0003] Therefore, seafood temporary cultivation tanks can be widely applied in seafood markets, supermarkets, restaurants, and aquaculture farms. They help extend the shelf life of seafood, improve the quality of seafood and customer satisfaction. Through the reasonable use and management of seafood temporary cultivation tanks, the survival rate and economic benefits of seafood can be significantly improved. However, during the temporary cultivation of seafood, problems such as seafood getting sick and dying often occur due to water quality deterioration. Therefore, in order to improve the survival rate of seafood, it is necessary to regularly change the water in the seafood temporary cultivation tank.

[0004] The existing automatic water change methods for seafood temporary cultivation tanks mainly rely on monitoring the water level in the tank. When the water level is lower than the set value, the automatic water change is started. For example, in the technical solution with the patent application number 201811238171.2, it detects the water level and water temperature of the fish tank through a water level monitoring unit and a temperature detection unit. The central processing unit processes the monitoring information of the detection unit, and after processing the detection signal, transmits the signal to the water inlet unit for automatic water change and the discharge unit for discharging wastewater, and controls the water level in the fish tank according to the control unit.

[0005] However, when the water level in the seafood temporary cultivation tank is high, due to factors such as high temperature and high seafood density, the water quality in the seafood temporary cultivation tank will deteriorate rapidly, resulting in seafood getting sick or dying. Therefore, the existing automatic water change methods for seafood temporary cultivation tanks are difficult to detect the problem of water quality deterioration in the tank in a timely manner, and the monitoring accuracy is not high. Summary of the Invention

[0006] The main purpose of this application is to provide an automatic water change method and device for a seafood temporary cultivation tank, aiming to use an underwater camera in the water to obtain image information, and through the analysis of the color and texture features of the image, realize the automatic evaluation of the water turbidity, and then realize the efficient and accurate automatic water change of the seafood temporary cultivation tank.

[0007] To achieve the above-mentioned invention purpose, this application provides an automatic water change method for a seafood temporary cultivation tank, including:

[0008] Receiving the water body image captured by an underwater camera installed in the seafood temporary cultivation tank, and after preprocessing the water body image, obtaining a target water body image;

[0009] Convert the target water body image from the RGB color space to the HIS color space, extract the hue value of each pixel in the converted target water body image, and calculate the average hue value of the water body in the seafood temporary culture tank based on the hue value of each pixel in the target water body image;

[0010] When the average hue value of the water body is greater than the reference chromaticity value, calculate the gray-level co-occurrence matrix of the target water body image, extract the texture features of the water body based on the gray-level co-occurrence matrix, and evaluate the turbidity of the water body based on the texture features of the water body;

[0011] When the turbidity of the water body is greater than the reference turbidity, automatically change the water in the seafood temporary culture tank.

[0012] Preferably, calculating the gray-level co-occurrence matrix of the target water body image includes:

[0013] Set the gray level, pixel distance and angle of the target water body image;

[0014] Calculate the gray-level co-occurrence matrix of the set target water body image based on the skimage.feature.greycomatrix function.

[0015] Preferably, automatically changing the water in the seafood temporary culture tank includes:

[0016] Calculate the gradient magnitude and direction of each pixel in the target water body image, and divide the target water body image into multiple cells;

[0017] Construct a gradient direction histogram for each cell based on the gradient magnitude and direction of each pixel, and combine the gradient direction histograms corresponding to every two adjacent cells into an image patch to form a feature descriptor;

[0018] Concatenate the feature descriptors of all image patches to obtain a feature vector, calculate the cosine distance between the feature vector and the reference feature vector, and select the reference feature vector whose cosine distance from the feature vector is less than the preset threshold as the target feature vector;

[0019] Query the seafood type corresponding to the target feature vector as the target seafood type, determine the water body type required to be replaced in the seafood temporary culture tank based on the target seafood type, and automatically change the water in the seafood temporary culture tank according to the water body type.

[0020] Preferably, automatically changing the water in the seafood temporary culture tank includes:

[0021] Obtain the water body capacity of the seafood temporary culture tank;

[0022] Calculate the ratio of the average hue value of the water body to the reference chromaticity value to obtain a first ratio;

[0023] Calculate the ratio of the turbidity of the water body to the reference turbidity to obtain a second ratio;

[0024] Multiply the first ratio by the second ratio and, after normalization, obtain a water change weight;

[0025] Calculate the product of the water body volume and the water change weight to obtain the water change amount;

[0026] Automatically change the water in the seafood temporary culture tank according to the water change amount.

[0027] Further, after automatically changing the water in the seafood temporary culture tank, it further includes:

[0028] Receive the video stream obtained by real-time shooting of the underwater camera, and extract the video frames of the video stream;

[0029] Extract the characteristic pixels of the seafood in each video frame to form a seafood characteristic map corresponding to each video frame;

[0030] Multiply the seafood characteristic maps corresponding to all the video frames pixel by pixel, and after weighted summation, obtain the characteristic representation of the seafood;

[0031] Analyze the biological state of the seafood in the seafood temporary culture tank based on the characteristic representation of the seafood, and when it is determined that the biological state is abnormal, send an alarm prompt to the user terminal.

[0032] Preferably, the evaluating the turbidity of the water body based on the texture feature of the water body includes:

[0033] Extract the contrast, energy and entropy of the texture feature of the water body, where the contrast is used to reflect the clarity of the texture of the target water body image, the energy is used to reflect the uniformity of the texture of the target water body image, and the entropy is used to reflect the complexity of the texture of the target water body image;

[0034] Calculate the output value of the exponential function with the contrast as the base and the entropy as the independent variable;

[0035] Calculate the ratio of the output value to the energy to obtain the turbidity of the water body.

[0036] Further, after evaluating the turbidity of the water body based on the texture feature of the water body, it further includes:

[0037] When the turbidity of the water body is not greater than the reference turbidity, there is no need to automatically change the water in the seafood temporary culture tank.

[0038] Preferably, after preprocessing the water body image, a target water body image is obtained, including:

[0039] Performing Gaussian downsampling on the water body image to obtain standard images of different scales;

[0040] Calculating the gradient magnitude of each standard image;

[0041] Adjusting the standard deviation of the corresponding Gaussian kernel according to the gradient magnitude of each standard image to obtain the target Gaussian kernel of each standard image;

[0042] Performing smoothing processing on the corresponding standard image based on the target Gaussian kernel of each standard image respectively to generate a plurality of smoothing processing results;

[0043] After fusing the plurality of smoothing processing results, a target water body image is obtained.

[0044] Preferably, after preprocessing the water body image, a target water body image is obtained, including:

[0045] Cropping the water body image;

[0046] Extracting the central region of the water body image to form a target water body image.

[0047] The present application also provides an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor implements the steps of the method described in any one of the above when executing the computer program.

[0048] The automatic water change method and device for a seafood temporary holding tank provided by the present application can more intuitively extract the hue information of the water body by converting the target water body image from the RGB color space to the HIS color space. The change in the hue value can reflect the change in the color of the water body, thereby providing an important basis for water quality assessment; at the same time, the texture features of the water body are extracted through the gray-level co-occurrence matrix, and the turbidity and texture complexity of the water body can be quantified. This texture feature can effectively reflect the distribution of suspended particles in the water body, and then be used to evaluate the turbidity of the water body; in addition, by calculating the average hue value and texture features, real-time assessment of the turbidity of the water body can be achieved, which can more accurately reflect the change in water quality; when the turbidity exceeds the preset threshold, the water change operation can be automatically triggered to ensure that the water quality in the seafood temporary holding tank is always in a good state, thereby realizing efficient and accurate automatic water change for the seafood temporary holding tank; finally, the present application does not require an additional water quality sensor. By using an underwater camera to monitor the biological state of the seafood and combining image processing technology, the water quality monitoring of the seafood temporary holding tank can be realized. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 Schematic flow chart of an automatic water change method for a seafood temporary holding tank according to an embodiment of the present application;

[0050] Figure 2 Schematic flow chart of an automatic water change method for a seafood temporary holding tank according to another embodiment of the present application;

[0051] Figure 3 Schematic flow chart of an automatic water change method for a seafood temporary holding tank according to another embodiment of the present application;

[0052] Figure 4 Schematic block diagram of the structure of an automatic water change device for a seafood temporary holding tank according to an embodiment of the present application;

[0053] Figure 5 Schematic block diagram of the structure of an electronic device according to an embodiment of the present application.

[0054] The realization, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. Detailed implementation manners

[0055] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0056] An automatic water change method for a seafood temporary holding tank proposed by the present application, the execution entity is an electronic device, and the electronic device can be any type of mobile or stationary computing device, including a mobile computer or a stationary computing device such as a desktop computer or a PC. The components of the computing device include, but are not limited to, a memory and a processor, the processor is connected to the memory through a bus, and the database is used to store data. The computing device also includes an access device, and the access device enables the computing device to communicate via one or more networks.

[0057] Refer to Figure 1 As shown, in one embodiment, the present application provides an automatic water change method for a seafood temporary holding tank, and the method includes:

[0058] S11. Receive the water body image captured by the underwater camera installed in the seafood temporary holding tank, and after preprocessing the water body image, obtain a target water body image;

[0059] S12. Convert the target water body image from the RGB color space to the HIS color space, extract the hue value of each pixel in the converted target water body image, and calculate the average hue value of the water body in the seafood temporary holding tank based on the hue value of each pixel in the target water body image;

[0060] S13. When the average hue value of the water body is greater than the reference chromaticity value, calculate the gray-level co-occurrence matrix of the target water body image, extract the texture features of the water body based on the gray-level co-occurrence matrix, and evaluate the turbidity of the water body based on the texture features of the water body;

[0061] S14. When the turbidity of the water body is greater than the reference turbidity, automatically change the water in the seafood temporary culture tank.

[0062] In this embodiment, the water body image captured by the underwater camera may be affected by various factors, such as uneven illumination, water body scattering, noise, etc., resulting in poor image quality. Therefore, it is necessary to preprocess the water body image to improve the image quality and the effect of subsequent processing. The preprocessing usually includes operations such as denoising, contrast enhancement, color correction, etc., for example, using the white balance algorithm and the adjustment method based on the color histogram. After preprocessing, the obtained target water body image can more clearly reflect the actual situation of the water body, facilitating subsequent analysis and processing.

[0063] Then, in this embodiment, the target water body image is converted from the RGB color space to the HIS color space. The RGB color space is based on the mixture of three primary colors, red, green, and blue, while the HIS color space consists of three components: hue, saturation, and intensity, which is closer to the human visual perception characteristics. In the HIS color space, the hue value can better reflect the type of color. By extracting the hue value of each pixel in the target water body image and calculating the average value of all pixel hue values, the average hue value of the water body in the seafood temporary culture tank can be obtained. This average hue value can be used as an important feature of the water body color for subsequent water quality judgment and analysis.

[0064] When the average hue value of the water body is greater than the reference chromaticity value, it indicates that the color of the water body may be abnormal, which may be caused by an increase in the turbidity of the water body. At this time, it is necessary to further analyze the texture features of the water body to evaluate the turbidity. First, calculate the gray-level co-occurrence matrix of the target water body image. The gray-level co-occurrence matrix is a statistical method used to describe the spatial correlation of pixel gray values in an image. Based on the gray-level co-occurrence matrix, the texture features of the water body, such as energy, inertia, entropy, and correlation, can be extracted. These texture features can reflect the distribution of suspended particles in the water body, thereby being used to evaluate the turbidity of the water body. When the turbidity of the water body increases, the texture features of the image will change accordingly. For example, the energy value may increase, and the entropy value may decrease, etc.

[0065] If the evaluated water turbidity is greater than the reference turbidity, it indicates that the water in the seafood temporary culture tank has been polluted to a certain extent, and an automatic water change operation is required. The automatic water change can control devices such as solenoid valves to drain the sewage in the seafood temporary culture tank and inject fresh water, thereby improving the water environment in a timely manner and ensuring the survival quality of seafood.

[0066] For example, assume that an underwater camera is installed in the seafood temporary culture tank. After preprocessing the water body image captured by the camera, a target water body image is obtained. The target water body image is converted from the RGB color space to the HIS color space, and the average hue value of the water body is calculated to be 120 degrees. The reference chromaticity value is set to 100 degrees. Since the average hue value is greater than the reference chromaticity value, the next step is entered. Calculate the gray-level co-occurrence matrix of the target water body image and extract the texture features. The evaluated turbidity of the water body is 15 NTU (nephelometric turbidity unit). The reference turbidity is set to 10 NTU. Since the water turbidity is greater than the reference turbidity, the automatic water change device is triggered to perform an automatic water change on the seafood temporary culture tank. Thus, by real-time monitoring the hue and turbidity of the water body, the problem of water quality deterioration can be detected in a timely manner, and the automatic water change operation can be performed to provide a good living environment for seafood, which helps to improve the survival rate and quality of seafood.

[0067] An automatic water change method for a seafood temporary culture tank provided by the present application can more intuitively extract the hue information of the water body by converting the target water body image from the RGB color space to the HIS color space. The change in the hue value can reflect the change in the color of the water body, thereby providing an important basis for water quality assessment. At the same time, by extracting the texture features of the water body through the gray-level co-occurrence matrix, the turbidity and texture complexity of the water body can be quantified. This texture feature can effectively reflect the distribution of suspended particles in the water body, and then be used to evaluate the turbidity of the water body. In addition, by calculating the average hue value and texture features, real-time assessment of the water turbidity can be achieved, which can more accurately reflect the change in water quality. When the turbidity exceeds the preset threshold, the water change operation can be automatically triggered to ensure that the water quality in the seafood temporary culture tank is always in a good state, and then the efficient and accurate automatic water change of the seafood temporary culture tank can be realized. Finally, the present application does not require an additional water quality sensor. While monitoring the biological state of seafood with an underwater camera, combined with image processing technology, the water quality monitoring of the seafood temporary culture tank can be realized.

[0068] In one embodiment, calculating the gray-level co-occurrence matrix of the target water body image includes:

[0069] Set the gray level, pixel distance, and angle of the target water body image;

[0070] Based on the skimage.feature.greycomatrix function, calculate the gray-level co-occurrence matrix of the set target water body image.

[0071] Before calculating the gray-level co-occurrence matrix, it is necessary to preprocess the image, including setting parameters such as the number of gray levels, pixel distance, and angle. These parameters are crucial for the extraction of texture features. Among them, the number of gray levels usually normalizes the gray values of the image to a smaller range (such as 0 to 255) to reduce the size of the gray-level co-occurrence matrix. The pixel distance represents the distance between pixel pairs. For example, a distance of 1 represents adjacent pixels, and a distance of 2 represents pixels separated by one pixel, etc. This angle represents the direction of the pixel pair, usually including 0°, 45°, 90°, and 135°, etc.

[0072] The skimage.feature.greycomatrix function is used to calculate the gray-level co-occurrence matrix. Its main parameters include: a list of distances between pixel pairs, a list of angles of pixel pairs, and the number of gray levels (default is 256 for 8-bit images). This function can return a 3D array, where each dimension corresponds to eigenvalue such as contrast, energy, and entropy. These eigenvalues can be used to evaluate the turbidity of the water body. For example, the higher the contrast, the more complex the texture of the image, which may indicate a higher turbidity of the water body.

[0073] The texture features extracted by the gray-level co-occurrence matrix in this embodiment can accurately reflect the distribution of suspended particles in the water body, thereby effectively evaluating the turbidity of the water body, enabling real-time monitoring of the water body in the seafood temporary culture tank, and timely detecting abnormal turbidity.

[0074] Reference Figure 2 As shown, in one of the embodiments, the automatic water change for the seafood temporary culture tank may specifically include:

[0075] S141. Calculate the gradient magnitude and direction of each pixel in the target water body image, and divide the target water body image into multiple cells;

[0076] S142. Based on the gradient magnitude and direction of each pixel, construct a gradient direction histogram for each cell, and combine the gradient direction histograms corresponding to every two adjacent cells into an image block to form a feature descriptor;

[0077] S143. Concatenate the feature descriptors of all image blocks to obtain a feature vector, calculate the cosine distance between the feature vector and the reference feature vector, and select the reference feature vector with a cosine distance less than a preset threshold from the feature vector as the target feature vector;

[0078] S144. Query the seafood type corresponding to the target feature vector as the target seafood type, determine the water body type required for the seafood temporary culture tank based on the target seafood type, and perform automatic water change for the seafood temporary culture tank according to the water body type.

[0079] In this embodiment, the gradient magnitude and direction of each pixel in the target water body image can be calculated first. For example, the Sobel operator is used to calculate the gradients in the horizontal and vertical directions. After squaring and taking the square root of the sum of the gradients in the horizontal and vertical directions, the gradient magnitude is obtained. After calculating the ratio of the gradient in the vertical direction to the gradient in the horizontal direction based on the arctangent function, the direction is obtained.

[0080] Then, the target water body image is divided into multiple small cells (for example, each cell is 8×8 pixels in size). The division of cells helps to extract local features and reduce the influence of noise.

[0081] For the pixels in each cell, different gradient direction histograms are constructed according to their gradient magnitude and direction. Different gradient direction histograms correspond to different histogram intervals (usually divided into 9 direction intervals, such as 0°, 20°, 40°... 160°). Each interval of the gradient direction histogram represents the sum of the gradient magnitudes in that direction. The gradient direction histograms corresponding to two adjacent cells are combined into a larger image block to form a feature descriptor. For example, 2×2 cells are combined into an image block to form a feature descriptor, so that a larger range of texture information can be captured through combination.

[0082] In addition, the feature descriptors of all image blocks are concatenated in sequence to form a long feature vector. This feature vector can be used to describe the texture features of the entire image. The cosine distance between the feature vector and the pre-stored reference feature vector is calculated. If the calculated cosine distance is less than a preset threshold (for example, 0.1), it is considered that the reference feature vector matches the target feature vector, and it is used as the target feature vector.

[0083] Finally, according to the target feature vector, the corresponding seafood type is queried from the pre-trained database. Among them, the database stores the feature vectors corresponding to different seafood types. According to the target seafood type, the water body type suitable for this seafood is determined (for example, seawater with a specific salinity, pH value, temperature, etc.). According to the determined water body type, the water change system is controlled to automatically change the water in the seafood temporary cultivation tank to meet the survival needs of the seafood.

[0084] This embodiment can accurately identify the seafood type by calculating the gradient direction histogram and the feature vector, and automatically change the suitable water body according to the seafood type, improving the survival quality of the seafood. In addition, by combining image processing technology, the water quality and seafood status of the seafood temporary cultivation tank can be monitored in real time, and the water body environment can be responded to and adjusted in time to ensure the healthy growth of the seafood.

[0085] In one embodiment, the automatically changing the water in the seafood temporary cultivation tank includes:

[0086] Obtain the water volume of the seafood temporary holding tank;

[0087] Calculate the ratio of the average hue value of the water body to the reference chromaticity value to obtain a first ratio;

[0088] Calculate the ratio of the turbidity of the water body to the reference turbidity to obtain a second ratio;

[0089] Multiply the first ratio and the second ratio, and after normalization, obtain a water change weight;

[0090] Calculate the product of the water volume and the water change weight to obtain the water change amount;

[0091] Automatically change the water in the seafood temporary holding tank according to the water change amount.

[0092] In this embodiment, the water volume of the seafood temporary holding tank refers to the actual stored water volume in the tank, usually measured in liters (L). This volume can be obtained by direct measurement or calculated based on the dimensions of the seafood temporary holding tank.

[0093] Calculate the ratio of the average hue value of the water body to the reference chromaticity value to obtain a first ratio. The average hue value is the degree of water color depth measured by image processing technology, reflecting the concentration of suspended solids and dissolved organic matter in the water body. The reference chromaticity value is a preset standard value used to determine whether the water body needs to be replaced.

[0094] Calculate the ratio of the turbidity of the water body to the reference turbidity to obtain a second ratio. The turbidity of the water body is an index to measure the concentration of suspended particles in water, usually expressed in NTU (turbidity unit). The reference turbidity is a set standard value used to determine whether the water body needs to be replaced.

[0095] Multiply the first ratio and the second ratio, and perform normalization to obtain a water change weight. The purpose of normalization is to limit the weight value between 0 and 1 for subsequent calculations. For example, the product of the first ratio and the second ratio can be divided by a preset normalization coefficient to obtain the water change weight. Among them, this normalization coefficient can be adjusted according to actual needs.

[0096] Calculate the product of the water volume and the water change weight to obtain the water change amount. The water change amount is calculated based on the water change weight and the water volume, and is used to determine the amount of water that needs to be replaced. According to the calculated water change amount, use automated equipment (such as water pumps, solenoid valves, etc.) to change the water in the seafood temporary holding tank. During the water change process, it is necessary to ensure that parameters such as the temperature, salinity, and pH value of the water body are the same as those of the original water body to avoid stress to the seafood.

[0097] In this embodiment, by precisely calculating the water change weight and the amount of water changed, the amount of water changed in the seafood temporary holding tank can be accurately controlled according to the actual condition of the water body, avoiding excessive water change or insufficient water change. At the same time, by precisely controlling the amount of water changed and water quality parameters, stress on the seafood caused by water change is avoided, and the survival rate and health level of the seafood are improved.

[0098] In one embodiment, after automatically changing the water in the seafood temporary holding tank, it further includes:

[0099] Receiving the video stream obtained by real-time shooting of the underwater camera, and extracting the video frames of the video stream;

[0100] Extracting the characteristic pixels of the seafood in each video frame to form a seafood characteristic map corresponding to each video frame;

[0101] Performing pixel-by-pixel multiplication on the seafood characteristic maps corresponding to all the video frames, and performing weighted summation to obtain the characteristic representation of the seafood;

[0102] Analyzing the biological state of the seafood inside the seafood temporary holding tank based on the characteristic representation of the seafood, and when determining that the biological state is abnormal, sending an alarm prompt to the user terminal.

[0103] In this embodiment, the video stream in the seafood temporary holding tank can be captured in real time by the underwater camera. The video stream is a continuous sequence of images, usually transmitted at a certain frame rate (such as 30 frames per second). Extracting a single video frame from the video stream, and this video frame can be used for subsequent image analysis. For example, frames can be extracted at regular time intervals (such as extracting one frame per second) or according to specific events (such as detecting motion).

[0104] At the same time, image processing techniques such as color segmentation, edge detection, and texture analysis can be used to perform image processing on each video frame to extract the characteristic pixels related to the seafood. For example, the color characteristics of the seafood are extracted through color threshold segmentation, or the contour characteristics of the seafood are extracted through edge detection. The extracted characteristic pixels are combined into a seafood characteristic map, and this seafood characteristic map only contains the characteristic information related to the seafood and is used for subsequent analysis.

[0105] Performing pixel-by-pixel multiplication on multiple seafood characteristic maps to enhance the signal of the common characteristics. For example, if the characteristic pixels at a certain position in multiple video frames are all strong, the value at that position will be larger after multiplication. Performing weighted summation on the multiplied result to obtain a comprehensive characteristic representation. Among them, the weights can be assigned according to the importance of each frame or the time sequence. For example, the most recent video frame may be given a higher weight to reflect the latest state of the seafood.

[0106] The finally obtained feature representation is a vector or matrix, which can comprehensively reflect the feature changes of seafood over a period of time. By analyzing the feature representation of seafood, its biological state is judged whether it is normal. For example, a classifier or an anomaly detection model can be used to identify whether the seafood is in a stressed state, sick or dead. If an abnormal biological state is detected, an alarm prompt will be sent to the user side to notify the user to take measures in time. This alarm prompt can be implemented by means of text messages, emails or APP push, etc.

[0107] In this embodiment, by analyzing the video stream in real time, the abnormal state of seafood can be detected in time, reducing the losses caused by delayed processing. At the same time, by analyzing in combination with multiple seafood feature maps, the state of seafood can be more comprehensively reflected, improving the accuracy of analysis.

[0108] In one embodiment, evaluating the turbidity of the water body based on the texture features of the water body includes:

[0109] Extracting the contrast, energy and entropy of the texture features of the water body, where the contrast is used to reflect the clarity of the texture of the target water body image, the energy is used to reflect the uniformity of the texture of the target water body image, and the entropy is used to reflect the complexity of the texture of the target water body image;

[0110] Taking the contrast as the base and the entropy as the independent variable to calculate the output value of the exponential function;

[0111] Calculating the ratio of the output value to the energy to obtain the turbidity of the water body.

[0112] Among them, the contrast reflects the clarity of the texture of the target water body image, that is, the light and dark difference of the texture. The higher the contrast, the more obvious the texture. The energy reflects the uniformity of the texture of the target water body image, that is, the smoothness of the texture. The higher the energy value, the more uniform the texture. The entropy reflects the complexity of the texture of the target water body image, that is, the randomness of the texture. The higher the entropy value, the more complex the texture. These features can be calculated through the gray-level co-occurrence matrix.

[0113] Taking the contrast as the base and the entropy as the independent variable, calculating the output value of the exponential function to amplify the relationship between the contrast and the entropy through the exponential function, enhancing the sensitivity to turbidity. Then, taking the ratio of the calculated output value to the energy as the turbidity index of the water body, in this way, the turbidity can comprehensively reflect the complexity and uniformity of the water body texture, so as to more accurately evaluate the turbidity degree of the water body.

[0114] If the turbidity index of the water body exceeds the preset threshold, it indicates that the turbidity of the water body is high, and the automatic water change of the seafood temporary culture tank is required.

[0115] This embodiment can combine three texture features: contrast, energy, and entropy, enabling a comprehensive evaluation of water turbidity from multiple perspectives and improving the accuracy of the evaluation. At the same time, by amplifying the relationship between contrast and entropy through an exponential function, it is possible to more sensitively capture changes in water turbidity, enabling real-time monitoring of water turbidity and timely detection of water quality changes.

[0116] In one embodiment, after evaluating the turbidity of the water body based on the texture features of the water body, it further includes:

[0117] When the turbidity of the water body is not greater than the reference turbidity, there is no need to automatically change the water in the seafood temporary cultivation tank.

[0118] When evaluating the turbidity of the water body, by extracting the texture features (such as contrast, energy, and entropy) of the water body image, the turbidity degree of the water body can be quantified.

[0119] When the calculated turbidity of the water body is not greater than the preset reference turbidity, it indicates that the turbidity degree of the water body is within an acceptable range, and there is no need to automatically change the water in the seafood temporary cultivation tank. This judgment mechanism can avoid unnecessary water change operations, save resources, and reduce interference to the seafood.

[0120] Reference Figure 3 As shown, in one embodiment, after preprocessing the water body image to obtain the target water body image, it may specifically include:

[0121] S111. Perform Gaussian downsampling on the water body image to obtain standard images of different scales;

[0122] S112. Calculate the gradient magnitude of each standard image;

[0123] S113. Adjust the standard deviation of the corresponding Gaussian kernel according to the gradient magnitude of each standard image to obtain the target Gaussian kernel of each standard image;

[0124] S114. Perform smoothing processing on the corresponding standard image based on the target Gaussian kernel of each standard image to generate multiple smoothing processing results;

[0125] S115. After fusing the multiple smoothing processing results, obtain the target water body image.

[0126] Among them, Gaussian downsampling can smooth the water body image through a Gaussian filter and then reduce the resolution of the image to generate images of different scales for multi-scale analysis.

[0127] Specifically, when processing the water body image through Gaussian filtering, first use a Gaussian kernel to convolve the water body image to reduce the high-frequency noise of the water body image and make the image smoother. When downsampling the water body image, the resolution of the water body image can be reduced (for example, sampling once every other pixel) to generate a smaller-sized image. Finally, standard images of different scales are generated for subsequent multi-scale analysis, which can capture the features of the image at different levels of detail.

[0128] Calculate the gradient magnitude of each standard image. The gradient magnitude reflects the rate of change of pixel intensity in the image and is used for edge detection and texture analysis. The Sobel operator can be used to calculate the horizontal and vertical gradients of each pixel. After squaring and taking the square root of the horizontal and vertical gradients of each pixel, the gradient magnitude of each pixel is obtained. After accumulating the gradient magnitudes of each pixel, the gradient magnitude corresponding to each standard image is obtained.

[0129] According to the gradient magnitude of each standard image, dynamically adjust the standard deviation of the Gaussian kernel. Regions with larger gradient magnitudes usually contain more details and require a smaller standard deviation to preserve the details; regions with smaller gradient magnitudes can use a larger standard deviation for smoothing.

[0130] The standard deviation adjustment rule can dynamically adjust the standard deviation based on the statistical characteristics (such as the mean or median) of the gradient magnitude. For example, the larger the gradient magnitude, the smaller the standard deviation; the smaller the gradient magnitude, the larger the standard deviation.

[0131] Then, in this embodiment, the adjusted Gaussian kernel can be used to smooth each standard image to generate multiple smoothing results. The smoothing process convolves the water body image through a Gaussian filter to reduce the noise and details in the image while retaining important structural information. The smoothing results of different scales are fused to generate the final target water body image. The fusion can be achieved through weighted average, Laplacian pyramid, or other image fusion methods, which are not specifically limited here.

[0132] For example, using the weighted average method, weights are assigned according to the importance of each scale image, and then they are combined into one image. The fused target water body image can synthesize the features of different scales, reduce noise and interference at the same time, and is more suitable for subsequent analysis and processing.

[0133] This embodiment can generate images of different scales through Gaussian downsampling, which can capture the features of water body images at different levels of detail, improving the comprehensiveness and accuracy of analysis. At the same time, by dynamically adjusting the standard deviation of the Gaussian kernel according to the gradient magnitude, it can better balance image smoothing and detail retention. Areas with larger gradient magnitudes retain more details, while areas with smaller gradient magnitudes are more fully smoothed. In addition, through multi-scale smoothing processing and fusion, it can effectively reduce noise and interference in the image, improve image quality, and enhance the reliability of subsequent analysis. The fused target water body image can integrate features of different scales and is more suitable for subsequent texture analysis and turbidity assessment.

[0134] In one embodiment, after preprocessing the water body image, a target water body image is obtained, including:

[0135] Cropping the water body image;

[0136] Extracting the central region of the water body image to form a target water body image.

[0137] Cropping means removing the unnecessary parts from the original image and only retaining the region of interest. In the processing of water body images in a seafood temporary holding tank, the purpose of cropping is to remove the interference information that may exist at the image edges, such as reflections on the tank wall, areas with uneven light, or other non-water body parts.

[0138] The image can be cropped according to a preset coordinate range or ratio. For example, crop the upper and lower edges or left and right edges of the image and retain the middle part.

[0139] Extracting the central region is to further focus on the core part of the water body and reduce the interference of the edge region on the analysis. The central region usually contains more uniform water body information and is more suitable for subsequent analysis, such as turbidity assessment or color analysis. Specifically, it can be achieved by calculating the central coordinates of the image and extracting the central region according to a preset region size. For example, extract the 1 / 4 region in the center of the image.

[0140] This embodiment can remove the interference information at the image edges, such as reflections on the tank wall, areas with uneven light, etc., through cropping and extracting the central region, thereby improving the accuracy of subsequent analysis. At the same time, by cropping and extracting the central region, the size of the image can be reduced, the computational complexity can be lowered, and the processing speed can be increased. In addition, the central region is usually more uniform and less affected by external interference, and is more suitable for the extraction of water body features. Therefore, the water body information in the central region is more representative, can more accurately reflect the overall state of the water body, and helps to improve the accuracy and reliability of subsequent turbidity assessment and color analysis.

[0141] Reference Figure 4As shown in the figure, an automatic water changing device for a seafood temporary culture tank is further provided in an embodiment of the present application. The device includes:

[0142] A receiving module 11, configured to receive a water body image captured by an underwater camera installed in the seafood temporary culture tank, and after preprocessing the water body image, obtain a target water body image;

[0143] A conversion module 12, configured to convert the target water body image from the RGB color space to the HIS color space, extract the hue value of each pixel in the converted target water body image, and calculate the average hue value of the water body in the seafood temporary culture tank based on the hue value of each pixel in the target water body image;

[0144] A calculation module 13, configured to calculate the gray-level co-occurrence matrix of the target water body image when the average hue value of the water body is greater than a reference chromaticity value, extract the texture feature of the water body based on the gray-level co-occurrence matrix, and evaluate the turbidity of the water body based on the texture feature of the water body;

[0145] A water changing module 14, configured to automatically change the water in the seafood temporary culture tank when the turbidity of the water body is greater than a reference turbidity.

[0146] For the automatic water changing device for a seafood temporary culture tank provided by the present application, by converting the target water body image from the RGB color space to the HIS color space, the hue information of the water body can be more intuitively extracted. The change in the hue value can reflect the change in the color of the water body, thereby providing an important basis for water quality assessment. At the same time, by extracting the texture feature of the water body through the gray-level co-occurrence matrix, the turbidity and texture complexity of the water body can be quantified. This texture feature can effectively reflect the distribution of suspended particles in the water body, and thus be used to evaluate the turbidity of the water body. In addition, by calculating the average hue value and texture feature, real-time assessment of the turbidity of the water body can be achieved, which can more accurately reflect the change in water quality. When the turbidity exceeds the preset threshold, the water changing operation can be automatically triggered to ensure that the water quality in the seafood temporary culture tank is always in a good state, thereby realizing efficient and accurate automatic water changing for the seafood temporary culture tank. Finally, the present application does not require an additional water quality sensor. By using an underwater camera to monitor the biological state of seafood and combining image processing technology, the water quality monitoring of the seafood temporary culture tank can be realized.

[0147] As described above, it can be understood that each component of the automatic water changing device for a seafood temporary culture tank proposed in the present application can implement the functions of any one of the above-mentioned automatic water changing methods for a seafood temporary culture tank, and the specific structure will not be elaborated.

[0148] Reference Figure 5 As shown in the figure, an electronic device is further provided in an embodiment of the present application, and its internal structure can be as Figure 5As shown in the figure. The electronic device includes a processor, a memory, a network interface, and a database connected via a system bus. Among them, the processor designed for the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a storage medium and an internal memory. The storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the storage medium. The database of the electronic device is used to store the relevant data of the automatic water change method for the seafood temporary cultivation tank. The network interface of the electronic device is used to communicate with external devices through a network connection. When the computer program is executed by the processor, it realizes an automatic water change method for the seafood temporary cultivation tank.

[0149] In one embodiment of the present application, a computer-readable storage medium is further provided, on which a computer program is stored. When the computer program is executed by the processor, it realizes an automatic water change method for the seafood temporary cultivation tank.

[0150] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to the memory, storage, database, or other media provided in the present application and used in the embodiments can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0151] It should be noted that in this text, the term "including", "comprising", or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such a process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an..." does not exclude the presence of additional identical elements in the process, apparatus, article, or method comprising such element.

[0152] The above are only the preferred embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present application.

Claims

1. An automatic water changing method for a seafood temporary storage tank, characterized in that: include: Receiving a water body image captured by an underwater camera installed in a seafood holding tank, and obtaining a target water body image after preprocessing the water body image; Convert the target water body image from the RGB color space to the HIS color space, extract the hue value of each pixel in the converted target water body image, and calculate the average hue value of the water body in the seafood temporary storage tank based on the hue value of each pixel in the target water body image; When the average hue value of the water body is greater than the reference chromaticity value, calculating the gray level co-occurrence matrix of the target water body image, extracting the texture features of the water body based on the gray level co-occurrence matrix, and evaluating the turbidity of the water body based on the texture features of the water body; When the turbidity of the water body is greater than the reference turbidity, the water in the seafood temporary storage tank is automatically changed.

2. The method according to claim 1, characterized in that The step of calculating the gray level co-occurrence matrix of the target water body image comprises: Setting the grayscale level, pixel distance and angle of the target water body image; The gray level co-occurrence matrix of the target water body image after setting is calculated based on the sk image.feature.greycomatri x function.

3. The method according to claim 1, characterized in that The automatic water replacement of the seafood temporary storage tank comprises: Calculating the gradient magnitude and direction of each pixel in the target water body image, and dividing the target water body image into a plurality of cells; Constructing a gradient direction histogram of each cell based on the gradient magnitude and direction of each pixel, and combining the gradient direction histograms corresponding to every two adjacent cells into an image block to form a feature descriptor; Concatenating the feature descriptors of all image blocks to obtain a feature vector, calculating the cosine distance between the feature vector and a reference feature vector, and selecting a reference feature vector whose cosine distance to the feature vector is less than a preset threshold as a target feature vector; The seafood type corresponding to the target feature vector is queried as the target seafood type, the water type that needs to be replaced in the seafood temporary holding tank is determined based on the target seafood type, and the water in the seafood temporary holding tank is automatically replaced according to the water type.

4. The method according to claim 1, characterized in that: The automatic water replacement of the seafood temporary storage tank comprises: Obtain the water capacity of the seafood temporary holding tank; Calculating a ratio of an average hue value of the water body to a reference chromaticity value to obtain a first ratio; Calculating the ratio of the turbidity of the water body to a reference turbidity to obtain a second ratio; The first ratio is multiplied by the second ratio, and after normalization, a water exchange weight is obtained; Calculate the product of the water body capacity and the water exchange weight to obtain the water exchange amount; The water in the temporary seafood storage tank is automatically changed according to the water change amount.

5. The method according to claim 1, characterized in that After the seafood temporary storage tank is automatically changed with water, the method further comprises: Receiving a video stream captured in real time by the underwater camera, and extracting video frames of the video stream; Extracting characteristic pixels of seafood in each video frame to form a seafood characteristic map corresponding to each video frame; Multiplying the seafood feature maps corresponding to all the video frames pixel by pixel, and performing weighted summation to obtain the feature representation of the seafood; The biological state of the seafood in the temporary seafood storage tank is analyzed based on the characteristic representation of the seafood, and when it is determined that the biological state is abnormal, an alarm prompt is sent to the user terminal.

6. The method according to claim 1, characterized in that The step of evaluating the turbidity of the water body based on the texture characteristics of the water body comprises: Extracting the contrast, energy and entropy of the texture features of the water body, wherein the contrast is used to reflect the clarity of the texture of the target water body image, the energy is used to reflect the uniformity of the texture of the target water body image, and the entropy is used to reflect the complexity of the texture of the target water body image; Calculate the output value of the exponential function by taking the contrast as the base and the entropy as the independent variable; The ratio of the output value to the energy is calculated to obtain the turbidity of the water body.

7. The method according to claim 1, characterized in that After evaluating the turbidity of the water body based on the texture feature of the water body, the method further includes: When the turbidity of the water body is not greater than the reference turbidity, there is no need to automatically change the water in the seafood temporary storage tank.

8. The method according to claim 1, characterized in that After the water body image is preprocessed, a target water body image is obtained, including: Performing Gaussian downsampling on the water body image to obtain standard images of different scales; Calculating the gradient magnitude of each of the standard images; Adjusting the standard deviation of the corresponding Gaussian kernel according to the gradient amplitude of each standard image to obtain a target Gaussian kernel of each standard image; Based on the target Gaussian kernel of each standard image, the corresponding standard image is smoothed to generate a plurality of smoothing results; After the multiple smoothing results are fused, a target water body image is obtained.

9. The method according to claim 1, characterized in that: After the water body image is preprocessed, a target water body image is obtained, including: Cropping the water body image; The central area of ​​the water body image is extracted to form a target water body image.

10. An electronic device, characterized in that: include: processor; Memory; Wherein, the memory stores a computer program, and when the processor executes the computer program, the automatic water changing method for a seafood temporary storage tank as described in any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Self-circulation automatic water changing method for fish tank

    CN111084147A