Ammonia nitrogen early warning method and system based on grouper stress behavior
By using cameras and image processing technology, the ammonia nitrogen content in the breeding pond is monitored based on grouper stress behavior, the stability and cost problems of traditional ammonia nitrogen sensors in high-density breeding environments are solved, and low-cost and real-time ammonia nitrogen monitoring is achieved.
Patent Information
- Application Number
- CN202210585703.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-26
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2042-05-26
AI Technical Summary
The existing ammonia nitrogen sensors have poor stability, short service life, high cost, complex maintenance, and are prone to corrosion or calcification in different water environments, and cannot monitor the uneven distribution of ammonia nitrogen in water bodies in real time and accurately.
The ammonia nitrogen early warning method based on grouper stress behavior is adopted, and the video information of the grouper breeding pond is obtained through the camera, and the image processing is performed to segment the grouper target image. The artificial potential field algorithm is used to determine the grouper body characteristic curvature, so as to indirectly monitor the ammonia nitrogen content in the breeding pond.
It realizes real-time monitoring of ammonia nitrogen content in aquaculture water under low cost and low complex conditions, avoiding the stability and maintenance problems of traditional sensors and reducing monitoring costs.
Smart Images

Figure CN114998378B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of ammonia nitrogen content early warning, and in particular to an ammonia nitrogen early warning method and system based on grouper stress behavior. Background Art
[0002] Pearl grouper has high commercial value, but its survival rate is low in high-density breeding environments, among which the influence of ammonia nitrogen content in water bodies is extremely significant. Therefore, it is extremely important to ensure appropriate ammonia nitrogen content in high-density breeding environments.
[0003] However, there is currently no other way to detect the ammonia nitrogen content in water except placing ammonia nitrogen sensors, and ammonia nitrogen sensors have many problems. Therefore, it is imperative to explore an ammonia nitrogen early warning method that is suitable for the actual breeding environment and has low cost.
[0004] At present, domestic ammonia nitrogen sensors have many problems such as poor stability and short service life.
[0005] However, the procurement cost of foreign ammonia nitrogen sensors remains high, and the maintenance process is extremely complicated, resulting in the inability to perform timely maintenance. There are also some problems, such as: they are easily corroded in seawater environments; calcification and algae attachment are difficult to avoid in freshwater environments; and in the face of uneven distribution of ammonia nitrogen, the sensor cannot measure the overall ammonia nitrogen content of the water body.
[0006] Therefore, there is an urgent need to provide a method or system that can provide real-time early warning of ammonia nitrogen content in aquaculture water in a convenient, fast and low-cost manner. Summary of the invention
[0007] The purpose of the present invention is to provide an ammonia nitrogen early warning method and system based on grouper stress behavior, which can conveniently, quickly and low-costly provide real-time early warning of ammonia nitrogen content in aquaculture water.
[0008] To achieve the above object, the present invention provides the following solutions:
[0009] An ammonia nitrogen early warning method based on grouper stress behavior, comprising:
[0010] The video information of the grouper breeding pond is obtained by using a camera, and image information is intercepted according to the video information; the image information is in RGB format;
[0011] Performing Gaussian filtering to remove noise on the image information;
[0012] Convert the image information after Gaussian filtering and denoising into HSV format;
[0013] Perform grouper target image segmentation on the format-converted image information;
[0014] The background in the image after the grouper target image is segmented is used as an obstacle, the segmented grouper target image is used as a target path that the robot can walk on, and an artificial potential field algorithm is used to determine a body characteristic curve of the grouper; and the curvature is determined using the body characteristic curve of the grouper;
[0015] The ammonia nitrogen content of the grouper breeding pond is monitored according to the curvature.
[0016] Optionally, performing Gaussian filtering to denoise the image information specifically includes:
[0017] The image information is subjected to Gaussian filtering and denoising using a convolution kernel of size 3*3.
[0018] Optionally, performing grouper target image segmentation on the format-converted picture information specifically includes:
[0019] According to the image information after the format conversion, using MATLAB to determine the grayscale histogram;
[0020] Determining a graph segmentation threshold according to the grayscale histogram;
[0021] The image segmentation threshold is used to segment the image information after the format conversion into a grouper target image.
[0022] Optionally, determining the curvature by using the body characteristic curve of the grouper specifically includes:
[0023] Using the gredient function to solve all the body characteristic curves of the grouper, and determine the curvature of each body characteristic curve of the grouper;
[0024] Determine the average curvature from all the curvatures.
[0025] Optionally, monitoring the ammonia nitrogen content of the grouper breeding pond according to the curvature specifically includes:
[0026] Determining whether the average curvature exceeds a curvature threshold;
[0027] If it exceeds, it is determined that the ammonia nitrogen content in the grouper breeding pond exceeds the content threshold, and an alarm is issued;
[0028] If not, it is determined that the ammonia nitrogen content in the grouper breeding pond does not exceed the content threshold.
[0029] Optionally, the curvature threshold is 0.01; the content threshold is 5.74 mg / L.
[0030] An ammonia nitrogen early warning system based on grouper stress behavior, comprising:
[0031] A picture information acquisition module, used to acquire video information of the grouper breeding pond using a camera, and to intercept picture information according to the video information; the picture information is in RGB format;
[0032] A Gaussian filtering and denoising module, used for performing Gaussian filtering and denoising on the image information;
[0033] Format conversion module, used to convert the image information after Gaussian filtering and denoising into HSV format;
[0034] An image segmentation module is used to segment the target image of grouper based on the converted image information;
[0035] The curvature determination module is used to determine the body characteristic curve of the grouper by using an artificial potential field algorithm, taking the background in the image after the grouper target image is segmented as an obstacle and the segmented grouper target image as a target path that the robot can walk on; and determining the curvature by using the body characteristic curve of the grouper;
[0036] An ammonia nitrogen content monitoring module is used to monitor the ammonia nitrogen content in the grouper breeding pond according to the curvature.
[0037] Optionally, the Gaussian filtering denoising module specifically includes:
[0038] The Gaussian filtering denoising unit is used to perform Gaussian filtering denoising on the image information using a convolution kernel of size 3*3.
[0039] Optionally, the image segmentation module specifically includes:
[0040] A grayscale histogram determination unit, used to determine a grayscale histogram using MATLAB according to the image information after the format conversion;
[0041] An image segmentation threshold determination unit, used to determine the image segmentation threshold according to the grayscale histogram;
[0042] An image segmentation unit is used to perform grouper target image segmentation on the format-converted picture information using the image segmentation threshold.
[0043] Optionally, the curvature determination module specifically includes:
[0044] A curvature determination unit, used for solving all the body characteristic curves of the grouper by using a gradent function to determine the curvature of each body characteristic curve of the grouper;
[0045] The average curvature determining unit is used to determine the average curvature according to all the curvatures.
[0046] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0047] The present invention provides an ammonia nitrogen early warning method and system based on grouper stress behavior. The camera obtains the picture information of the grouper breeding pond, and the image information is processed to indirectly obtain the ammonia nitrogen content range of the water in the breeding pond. There is no physical entity directly contacting the water body, avoiding various problems faced by traditional sensors. At the same time, the main cost is only an ordinary camera, which greatly reduces the cost. Furthermore, the present invention achieves the purpose of real-time early warning of the ammonia nitrogen content in the breeding water body in a convenient, fast and low-cost manner. Although the specific indicators of ammonia nitrogen in the water body cannot be obtained, the purpose of real-time early warning of ammonia nitrogen in the water body can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] 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 will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0049] Figure 1 A schematic diagram of a process flow of an ammonia nitrogen early warning method based on grouper stress behavior provided by the present invention;
[0050] Figure 2 A schematic diagram of an overall device corresponding to an ammonia nitrogen early warning method based on grouper stress behavior provided by the present invention;
[0051] Figure 3 This is a schematic diagram of the overall principle of an ammonia nitrogen early warning method based on grouper stress behavior provided by the present invention;
[0052] Figure 4 This is a schematic diagram of the screenshot effect of the image information after format conversion;
[0053] Figure 5 is the grayscale histogram;
[0054] Figure 6 This is a schematic diagram of the image after the grouper target image is segmented;
[0055] Figure 7 Determine the schematic diagram for the body characteristic curve of grouper;
[0056] Figure 8 This is a schematic diagram of the structure of an ammonia nitrogen early warning system based on grouper stress behavior provided by the present invention. DETAILED DESCRIPTION
[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0058] The purpose of the present invention is to provide an ammonia nitrogen early warning method and system based on grouper stress behavior, which can provide real-time early warning of ammonia nitrogen content in aquaculture water conveniently, quickly and at low cost.
[0059] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0060] Figure 1 This is a schematic diagram of a process flow of an ammonia nitrogen early warning method based on grouper stress behavior provided by the present invention. Figure 3 The overall principle diagram of an ammonia nitrogen early warning method based on grouper stress behavior provided by the present invention is as follows: Figure 1 and Figure 3 As shown, the present invention provides an ammonia nitrogen early warning method based on grouper stress behavior, comprising:
[0061] S101, using a camera to obtain video information of a grouper breeding pond, and intercepting image information according to the video information; the image information is in RGB format;
[0062] As a specific example, Figure 2 As shown, the picture information is uploaded to the cloud server, and the cloud server performs the following S102-S106 to achieve remote and real-time monitoring.
[0063] Video RGB obtains various colors by changing the three color channels of red (R), green (G), and blue (B) and superimposing them on each other. RGB is the most basic three colors, and the video images in RGB format have realistic colors.
[0064] S102, performing Gaussian filtering to remove noise from the image information; Gaussian filtering is a linear smoothing filter suitable for eliminating Gaussian noise. Gaussian filtering is the process of weighted averaging the entire image. The value of each pixel is obtained by weighted averaging the value of itself and other pixels in the neighborhood. The specific operation of Gaussian filtering is: use a convolution kernel to scan each pixel in the image, and replace the value of the pixel at the center of the convolution kernel with the weighted average gray value of the pixels in the neighborhood determined by the convolution kernel.
[0065] S102 specifically includes:
[0066] The image information is subjected to Gaussian filtering and denoising using a convolution kernel of size 3*3.
[0067] S103, converting the image information after Gaussian filtering and denoising into HSV format, and Figure 4 As shown;
[0068] In the HSV model, brightness (V) is the feeling of brightness caused by light acting on the human eye, which is related to the luminous intensity of the observed object. Hue (H) is the color sensation produced when the human eye sees one or more wavelengths of light. It reflects the type of color and is the basic characteristic that determines the color. For example, red and brown refer to hue. Saturation (S) refers to the purity of the color, that is, the degree of white light mixed in, or the depth of the color. For colored light of the same hue, the deeper the saturation, the brighter or purer the color. Hue and saturation are usually referred to as chromaticity.
[0069] S104, performing grouper target image segmentation on the format-converted picture information;
[0070] S104 specifically includes:
[0071] According to the image information after the format conversion, using MATLAB to determine the grayscale histogram;
[0072] Determining a graph segmentation threshold according to the grayscale histogram;
[0073] The image segmentation threshold is used to segment the image information after the format conversion into a grouper target image.
[0074] like Figure 5 As shown in the figure, the upper threshold of the grayscale histogram is 60, and the lower threshold is 40. That is, when the HSV value of the processed image is between 40-60, it is marked as grouper and set to black. If it is not in this range, it is marked as background and set to white. The image after segmentation is as follows Figure 6 shown.
[0075] S105, using the background in the image after the segmentation of the grouper target image as an obstacle, using the segmented grouper target image as a target path that the robot can walk on, using an artificial potential field algorithm to determine the body characteristic curve of the grouper, and Figure 7 As shown; and the curvature is determined by using the body characteristic curve of the grouper;
[0076] The background in the algorithm is set as an obstacle, which generates a virtual repulsive force on the virtual robot. The cut-out grouper image is set as the target path for the robot to walk on. The target path evenly distributes a virtual attraction to the virtual robot. By simulating the robot to detect obstacles in an unknown environment in real time, a reasonable path is planned and marked, so as to draw a stable, smooth and continuous curve on the grouper surface image. The algorithm principle is as follows:
[0077] The body characteristic curve of the grouper to be planned is separated into a single mass point. Its motion space is a two-dimensional Euclidean space, in which the coordinates of the mass point are X = (x, y). The background coordinates used as obstacles in the algorithm are X b =(x b ,y b ), the coordinates of the grouper image used as the target in the algorithm are X d =(x d ,y d ).
[0078] The gravitational potential field of the target on the particle is U d (X) = f(X), which is defined as:
[0079]
[0080] Where: k is the gravitational coefficient; XX d is the distance from the particle to the target point.
[0081] It can be obtained that the gravitational force on the particle is the negative gradient of the gravitational potential field:
[0082]
[0083] The repulsive potential field of the obstacle on the particle is U b (X) = g(X), the function is defined as
[0084]
[0085] Among them, ρ0 is the range of action of the specified repulsive potential field, that is, when the particle is outside the specified range, it is not affected by the repulsive force; η is the repulsive coefficient; T og is the distance between the obstacle and the target point; K0 is the adjustment coefficient; L is the sum of the distances between the target, the particle and the obstacle.
[0086] It can be obtained that the gravitational force on the particle is the negative gradient of the gravitational potential field:
[0087]
[0088] Then the total force vector received by the virtual robot is: F = ∑F b +∑Fd .
[0089] S105 specifically includes:
[0090] Using the gredient function to solve all the body characteristic curves of the grouper, and determine the curvature of each body characteristic curve of the grouper;
[0091] Using the formula Determine the curvature;
[0092] Among them, K' is the obtained curvature result, y, is the starting point of the curve determined by the path planning output result, and y,, is the end point of the curve determined by the path planning output result.
[0093] Determine the average curvature from all the curvatures.
[0094] Using the formula Determine the mean curvature.
[0095] S106, monitoring the ammonia nitrogen content in the grouper breeding pond according to the curvature.
[0096] S106 specifically includes:
[0097] Determining whether the average curvature exceeds a curvature threshold;
[0098] If it exceeds, it is determined that the ammonia nitrogen content in the grouper breeding pond exceeds the content threshold, and an alarm is issued;
[0099] If not, it is determined that the ammonia nitrogen content in the grouper breeding pond does not exceed the content threshold.
[0100] In the breeding pond of grouper, under the premise that other water quality conditions in the breeding pond remain unchanged, when the ammonia nitrogen concentration is higher than 5.74 mg / L, the grouper body shows obvious spasm, and the curvature of the back and tail curve K≥0.01; when the ammonia nitrogen concentration is lower than 5.74 mg / L, the grouper has no spasm, and the curvature of the back and tail curve 0≤K<0.01. That is, the curvature threshold is 0.01; the content threshold is 5.74 mg / L.
[0101] Compared with other methods for obtaining the ammonia nitrogen content in water, the present invention abandons the traditional idea that the ammonia nitrogen content must be obtained through sensors, and innovatively proposes to obtain grouper stress images through common cameras, which are low-cost and easy to purchase, and process the images, skipping the sensor as the main body, and indirectly obtaining the range of dissolved ammonia nitrogen content in the water, effectively avoiding the corrosion problem of sensors, and greatly reducing the cost of obtaining the ammonia nitrogen content in water in the scenario of grouper farming.
[0102] Figure 8The schematic diagram of the structure of an ammonia nitrogen early warning system based on grouper stress behavior provided by the present invention is as follows: Figure 8 As shown, the present invention provides an ammonia nitrogen early warning system based on grouper stress behavior, comprising:
[0103] The picture information acquisition module 801 is used to acquire the video information of the grouper breeding pond by using a camera, and to intercept the picture information according to the video information; the picture information is in RGB format;
[0104] A Gaussian filtering and denoising module 802 is used to perform Gaussian filtering and denoising on the image information;
[0105] The format conversion module 803 is used to convert the image information after Gaussian filtering and denoising into HSV format;
[0106] An image segmentation module 804 is used to segment the image of the grouper target on the image information after the format conversion;
[0107] The curvature determination module 805 is used to determine the body characteristic curve of the grouper by using an artificial potential field algorithm, taking the background in the image after the grouper target image is segmented as an obstacle and the segmented grouper target image as a target path that the robot can walk on; and determining the curvature by using the body characteristic curve of the grouper;
[0108] The ammonia nitrogen content monitoring module 806 is used to monitor the ammonia nitrogen content in the grouper breeding pond according to the curvature.
[0109] The Gaussian filtering denoising module 802 specifically includes:
[0110] The Gaussian filtering denoising unit is used to perform Gaussian filtering denoising on the image information using a convolution kernel of size 3*3.
[0111] The image segmentation module 804 specifically includes:
[0112] A grayscale histogram determination unit, used to determine a grayscale histogram using MATLAB according to the image information after the format conversion;
[0113] An image segmentation threshold determination unit, used to determine the image segmentation threshold according to the grayscale histogram;
[0114] An image segmentation unit is used to perform grouper target image segmentation on the format-converted picture information using the image segmentation threshold.
[0115] The curvature determination module 805 specifically includes:
[0116] A curvature determination unit, used for solving all the body characteristic curves of the grouper by using a gradent function to determine the curvature of each body characteristic curve of the grouper;
[0117] The average curvature determining unit is used to determine the average curvature according to all the curvatures.
[0118] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0119] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present invention. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. An ammonia nitrogen early warning method based on grouper stress behavior, characterized in that: include: Use the camera to obtain video information of the grouper breeding pond, and intercept image information based on the video information; The image information is in RGB format; Performing Gaussian filtering to remove noise on the image information; Convert the image information after Gaussian filtering and denoising into HSV format; Perform grouper target image segmentation on the format-converted image information; The background in the image after the grouper target image is segmented is used as an obstacle, the segmented grouper target image is used as a target path that the robot can walk on, and an artificial potential field algorithm is used to determine a body characteristic curve of the grouper; and the curvature is determined using the body characteristic curve of the grouper; The ammonia nitrogen content of the grouper breeding pond is monitored according to the curvature.
2. The ammonia nitrogen early warning method based on grouper stress behavior according to claim 1 is characterized in that: The performing Gaussian filtering and denoising on the image information specifically includes: The image information is subjected to Gaussian filtering and denoising using a convolution kernel of size 3*3.
3. The ammonia nitrogen early warning method based on grouper stress behavior according to claim 1 is characterized in that: The step of performing grouper target image segmentation on the format-converted picture information specifically includes: According to the image information after the format conversion, using MATLAB to determine the grayscale histogram; Determining a graph segmentation threshold according to the grayscale histogram; The image segmentation threshold is used to segment the image information after the format conversion into a grouper target image.
4. The ammonia nitrogen early warning method based on grouper stress behavior according to claim 1 is characterized in that: The method of determining the curvature by using the body characteristic curve of the grouper specifically includes: Using the gredient function to solve all the body characteristic curves of the grouper, and determine the curvature of each body characteristic curve of the grouper; Determine the average curvature from all the curvatures.
5. The ammonia nitrogen early warning method based on grouper stress behavior according to claim 4 is characterized in that: The step of monitoring the ammonia nitrogen content in the grouper breeding pond according to the curvature specifically includes: Determining whether the average curvature exceeds a curvature threshold; If it exceeds, it is determined that the ammonia nitrogen content in the grouper breeding pond exceeds the content threshold, and an alarm is issued; If not, it is determined that the ammonia nitrogen content in the grouper breeding pond does not exceed the content threshold.
6. The ammonia nitrogen early warning method based on grouper stress behavior according to claim 5 is characterized in that: The curvature threshold is 0.01; the content threshold is 5.74 mg / L.
7. An ammonia nitrogen early warning system based on grouper stress behavior, characterized in that: include: The picture information acquisition module is used to obtain the video information of the grouper breeding pond by using a camera, and to intercept the picture information according to the video information; The image information is in RGB format; A Gaussian filtering and denoising module, used for performing Gaussian filtering and denoising on the image information; Format conversion module, used to convert the image information after Gaussian filtering and denoising into HSV format; An image segmentation module is used to segment the target image of grouper based on the converted image information; The curvature determination module is used to determine the body characteristic curve of the grouper by using an artificial potential field algorithm, taking the background in the image after the grouper target image is segmented as an obstacle and the segmented grouper target image as a target path that the robot can walk on; and determining the curvature by using the body characteristic curve of the grouper; An ammonia nitrogen content monitoring module is used to monitor the ammonia nitrogen content in the grouper breeding pond according to the curvature.
8. The ammonia nitrogen early warning system based on grouper stress behavior according to claim 7 is characterized in that: The Gaussian filtering denoising module specifically includes: The Gaussian filtering denoising unit is used to perform Gaussian filtering denoising on the image information using a convolution kernel of size 3*3.
9. The ammonia nitrogen early warning system based on grouper stress behavior according to claim 7, characterized in that: The image segmentation module specifically includes: A grayscale histogram determination unit, used to determine a grayscale histogram using MATLAB according to the image information after the format conversion; An image segmentation threshold determination unit, used to determine the image segmentation threshold according to the grayscale histogram; An image segmentation unit is used to perform grouper target image segmentation on the format-converted picture information using the image segmentation threshold.
10. The ammonia nitrogen early warning system based on grouper stress behavior according to claim 7, characterized in that: The curvature determination module specifically includes: A curvature determination unit, used for solving all the body characteristic curves of the grouper by using a gradent function to determine the curvature of each body characteristic curve of the grouper; The average curvature determining unit is used to determine the average curvature according to all the curvatures.
Citation Information
Patent Citations
Intelligent bait feeding device and method based on image processing technology
CN104542411A
Disease prevention cultivation method for Zanderfisch
CN113317243A