A method and system for denoising underwater fish sunlight refraction images

By using target recognition and image segmentation models, feature point extraction and lighting simulation technology in fish farms, the problem of fish image noise caused by sunlight refraction is solved and the image recognition quality and capture accuracy are improved.

CN118279596BActive Publication Date: 2024-08-23GUANGDONG OCEAN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410684594.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2024-08-23
Estimated Expiration
2044-05-30

AI Technical Summary

Technical Problem

In fish farms, sunlight refraction factors lead to poor underwater fish image quality, and it is difficult to effectively remove noise with existing technology, affecting the image recognition results.

Method used

By collecting target area images, use the preset target recognition model and image segmentation model to identify and segment fish, extract background image feature points to obtain water depth information, optimize the background image, calculate relative grayscale and gradient relationships, and combine with three-dimensional modeling data Simulate standard lighting environment and perform multiple denoising processes to improve image quality.

Benefits of technology

It effectively improves the quality of fish image recognition results, eliminates the impact of water depth factors on images, and enhances the accuracy of capturing fish ecological and behavioral characteristics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118279596B
    Figure CN118279596B
Patent Text Reader

Abstract

The present invention provides a method and system for denoising an underwater fish sunlight refraction image. The denoising method includes: collecting a regional image of a target area, segmenting to obtain a fish image and a background image; extracting feature points of the background image to obtain water depth information of the target area; optimizing the background image using the water depth information; obtaining a grayscale image, and obtaining a relative grayscale relationship and a relative gradient relationship based on the grayscale image; obtaining fish breeding environment data of the target area; simulating a standard lighting environment; and denoising the fish image through light difference data, relative grayscale relationship, and relative gradient relationship. The implementation of the present invention can effectively improve the image quality of fish image recognition results, and the improvement of image quality is conducive to more accurately capturing the ecological characteristics or behavioral characteristics of fish.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing, and in particular to a method and system for denoising underwater fish sunlight refraction images. Background Art

[0002] In fish farming and other scenarios, it is often necessary to monitor factors such as the temperature, humidity, and activity of fish in the farming environment, so as to help farmers understand the environmental quality and farming quality in real time. Among them, the real-time collection and monitoring of fish images is a key link.

[0003] In the actual image processing steps of collecting, extracting features and identifying fish images, the different angles of sunlight exposure at different times or locations affect the refraction of sunlight in the water, resulting in different degrees of noise in the captured underwater fish images. Therefore, light factors often affect the quality of image recognition. At present, there is an urgent need on the market for a method to denoise images by considering the refraction factor of sunlight. Summary of the invention

[0004] The invention provides a method and system for denoising an underwater fish sunlight refraction image, so as to solve the technical problem of how to improve the quality of fish image recognition results.

[0005] In order to solve the above technical problems, an embodiment of the present invention provides a method for denoising an underwater fish sunlight refraction image, comprising:

[0006] Collecting a regional image of the target area; identifying fish in the regional image and segmenting the regional image through a preset target recognition model and an image segmentation model to obtain a fish image and a background image;

[0007] Extracting feature points of the background image, and acquiring water depth information of the target area based on the feature points; optimizing the background image using the water depth information to obtain a background optimized image having the same size as the background image;

[0008] Obtaining grayscale images of the background image and the background optimized image; obtaining a relative grayscale relationship and a relative gradient relationship between each pixel of the background image and each pixel of the background optimized image according to the grayscale images of the background image and the background optimized image;

[0009] The fish breeding environment data of the target area are obtained, wherein the fish breeding environment data include three-dimensional modeling data; light based on preset function control is used to simulate a standard lighting environment on the basis of the three-dimensional modeling data to obtain simulation data, wherein the simulation data is light difference data between the standard lighting environment and the three-dimensional modeling data under different lighting conditions; a first denoising process is performed on the fish image through the light difference data to obtain a first denoised image; a second denoising process is performed on the first denoised image using the relative grayscale relationship to obtain a second denoised image; and a third denoising process is performed on the second denoised image using the relative gradient relationship to obtain a processed underwater fish image.

[0010] As a preferred solution, the preset target recognition model and image segmentation model are used to identify the fish in the regional image and segment the regional image to obtain the fish image and the background image, specifically:

[0011] Acquire a first fish body region through the target recognition model, and calculate the radius of the circumscribed circle of the fish body region;

[0012] Constructing a brightness histogram of the first fish body region, taking a region whose brightness value is greater than a preset brightness threshold as a second fish body region; using a dilation operation and an erosion operation to remove noise points in the second fish body region to obtain a third fish body region;

[0013] The SAM segmentation model is adopted, and the fish body center of the first fish body area and the preset marking point of the non-first fish body area are used as segmentation references to segment the third fish body area to obtain the fish image represented by the mask area; wherein the fish body center of the first fish body area is determined according to a preset algorithm;

[0014] The regional image is segmented according to the obtained fish image to obtain the background image.

[0015] As a preferred solution, the preset function is:

[0016] ;

[0017] Among them, S(t) is the illumination intensity of the light, t0 is the initial time, C(t) is the illumination intensity that meets the reproduction conditions of the target area at time t, T(t) is the temperature that meets the reproduction conditions of the target area at time t, p1 is the adjustment factor of C(t), and p2 is The regulatory factor, p3 is The regulatory factor of The adjustment factor of , p5 is the adjustment factor of sin(C(t)), is the correction value of the light intensity of the light.

[0018] As a preferred solution, the water depth information of the target area is obtained based on the feature points, specifically:

[0019] Taking a preset marker in the region image as a center point, and constructing a feature point set of the target region according to the center point and the feature points;

[0020] Calculating the Euclidean distance between the center point and each of the feature points respectively, and using the obtained Euclidean distance as the set data of the feature point set;

[0021] Inputting the background image into a preset deep convolutional neural network, performing prediction based on the output of the deep convolutional neural network and the set data, and obtaining a probability distribution of feature points of the background image;

[0022] Optimizing the background image using the probability distribution of the feature points to obtain a background optimized image;

[0023] The pixels belonging to the water surface of the background optimized image are identified, and the distance from each pixel to the preset base surface along the plumb line direction is calculated in combination with the probability distribution of the feature points, which is used as the water depth of the target area to obtain the water depth information.

[0024] As a preferred solution, the relative grayscale relationship and relative gradient relationship between each pixel of the background image and each pixel of the background optimized image are obtained according to the grayscale images of the background image and the background optimized image, specifically:

[0025] Obtaining the grayscale value, gradient amplitude and gradient direction of the pixel points of the background image, and obtaining the grayscale value, gradient amplitude and gradient direction of the pixel points of the background optimization image;

[0026] Determine the gradient difference value of each pixel of the background image in the first set direction according to the grayscale value, gradient amplitude, gradient direction and first set direction of the pixel; determine the gradient difference value of each pixel of the background optimized image in the second set direction according to the grayscale value, gradient amplitude, gradient direction and second set direction of the pixel;

[0027] The relative grayscale relationship is calculated based on the grayscale value of each pixel of the background image and the grayscale value of each pixel of the background optimized image; the relative gradient relationship is calculated based on the gradient difference value of the background image and the gradient difference value of the background optimized image.

[0028] As a preferred solution, the relative grayscale relationship is:

[0029] B = f(pi, pj);

[0030] The relative gradient relationship is:

[0031] K = g(qi,qj);

[0032] Among them, pi is the grayscale value of the pixel (xi, yi) of the background image i, qi is the gradient difference value of the background image i, pj is the grayscale value of the pixel (xj, yj) of the background optimization image j, qj is the gradient difference value of the background optimization image j, and f and g are both preset relationship functions.

[0033] Accordingly, an embodiment of the present invention further provides a system for denoising an underwater fish sunlight refraction image, comprising a segmentation module, an optimization module, an acquisition module and a noise reduction module; wherein:

[0034] The segmentation module is used to collect the regional image of the target area; identify the fish in the regional image and segment the regional image through a preset target recognition model and image segmentation model to obtain the fish image and the background image;

[0035] The optimization module is used to extract feature points of the background image and obtain water depth information of the target area based on the feature points; optimize the background image using the water depth information to obtain a background optimized image with the same size as the background image;

[0036] The acquisition module is used to acquire the grayscale images of the background image and the background optimization image; and acquire the relative grayscale relationship and relative gradient relationship between each pixel of the background image and each pixel of the background optimization image according to the grayscale images of the background image and the background optimization image;

[0037] The denoising module is used to obtain fish breeding environment data of a target area, wherein the fish breeding environment data includes three-dimensional modeling data; using light controlled based on a preset function, simulating a standard lighting environment based on the three-dimensional modeling data to obtain simulation data, wherein the simulation data is light difference data between the standard lighting environment and the three-dimensional modeling data under different lighting conditions; performing a first denoising process on the fish image using the light difference data to obtain a first denoised image; performing a second denoising process on the first denoised image using the relative grayscale relationship to obtain a second denoised image; and performing a third denoising process on the second denoised image using the relative gradient relationship to obtain a processed underwater fish image.

[0038] As a preferred solution, the segmentation module identifies the fish in the regional image and segments the regional image through a preset target recognition model and an image segmentation model to obtain a fish image and a background image, specifically:

[0039] The segmentation module obtains a first fish body region through the target recognition model;

[0040] Constructing a brightness histogram of the first fish body region, taking a region whose brightness value is greater than a preset brightness threshold as a second fish body region; using a dilation operation and an erosion operation to remove noise points in the second fish body region to obtain a third fish body region;

[0041] The SAM segmentation model is adopted, and the fish body center of the first fish body area and the preset marking point of the non-first fish body area are used as segmentation references to segment the third fish body area to obtain the fish image represented by the mask area; wherein the fish body center of the first fish body area is determined according to a preset algorithm;

[0042] The regional image is segmented according to the obtained fish image to obtain the background image.

[0043] As a preferred solution, the preset function is:

[0044] ;

[0045] Among them, S(t) is the illumination intensity of the light, t0 is the initial time, C(t) is the illumination intensity that meets the reproduction conditions of the target area at time t, T(t) is the temperature that meets the reproduction conditions of the target area at time t, p1 is the adjustment factor of C(t), and p2 is The regulatory factor, p3 is The regulatory factor of The adjustment factor of , p5 is the adjustment factor of sin(C(t)), is the correction value of the light intensity of the light.

[0046] As a preferred solution, the optimization module obtains the water depth information of the target area based on the feature points, specifically:

[0047] The optimization module uses a preset marker in the region image as a center point, and constructs a feature point set of the target region based on the center point and the feature points;

[0048] Calculating the Euclidean distance between the center point and each of the feature points respectively, and using the obtained Euclidean distance as the set data of the feature point set;

[0049] Inputting the background image into a preset deep convolutional neural network, performing prediction based on the output of the deep convolutional neural network and the set data, and obtaining a probability distribution of feature points of the background image;

[0050] Optimizing the background image using the probability distribution of the feature points to obtain a background optimized image;

[0051] The pixels belonging to the water surface of the background optimized image are identified, and the distance from each pixel to the preset base surface along the plumb line direction is calculated in combination with the probability distribution of the feature points, which is used as the water depth of the target area to obtain the water depth information.

[0052] As a preferred solution, the acquisition module acquires the relative grayscale relationship and relative gradient relationship between each pixel of the background image and each pixel of the background optimization image according to the grayscale images of the background image and the background optimization image, specifically:

[0053] The acquisition module acquires the grayscale value, gradient amplitude and gradient direction of the pixel points of the background image, and acquires the grayscale value, gradient amplitude and gradient direction of the pixel points of the background optimization image;

[0054] Determine the gradient difference value of each pixel of the background image in the first set direction according to the grayscale value, gradient amplitude, gradient direction and first set direction of the pixel; determine the gradient difference value of each pixel of the background optimized image in the second set direction according to the grayscale value, gradient amplitude, gradient direction and second set direction of the pixel;

[0055] The relative grayscale relationship is calculated based on the grayscale value of each pixel of the background image and the grayscale value of each pixel of the background optimized image; the relative gradient relationship is calculated based on the gradient difference value of the background image and the gradient difference value of the background optimized image.

[0056] As a preferred solution, the relative grayscale relationship is:

[0057] B = f(pi, pj);

[0058] The relative gradient relationship is:

[0059] K = g(qi,qj);

[0060] Among them, pi is the grayscale value of the pixel (xi, yi) of the background image i, qi is the gradient difference value of the background image i, pj is the grayscale value of the pixel (xj, yj) of the background optimization image j, qj is the gradient difference value of the background optimization image j, and f and g are both preset relationship functions.

[0061] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0062] The embodiment of the present invention provides a method and system for denoising an underwater fish sunlight refraction image. The method comprises: collecting a regional image of a target area; identifying fish in the regional image and segmenting the regional image through a preset target recognition model and an image segmentation model to obtain a fish image and a background image; extracting feature points of the background image, and obtaining water depth information of the target area based on the feature points; optimizing the background image using the water depth information to obtain a background optimized image of the same size as the background image; obtaining a grayscale image of the background image and the background optimized image; and obtaining a correlation between each pixel of the background image and the background optimized image based on the background image and the grayscale image of the background optimized image. The method comprises the following steps: determining the relative grayscale relationship and relative gradient relationship between pixels; obtaining fish breeding environment data of the target area, wherein the fish breeding environment data includes three-dimensional modeling data; using light controlled by a preset function, simulating a standard lighting environment on the basis of the three-dimensional modeling data, and obtaining simulation data, wherein the simulation data is light difference data between the standard lighting environment and the three-dimensional modeling data under different lighting conditions; performing a first denoising process on the fish image through the light difference data to obtain a first denoised image; performing a second denoising process on the first denoised image through the relative grayscale relationship to obtain a second denoised image; and performing a third denoising process on the second denoised image through the relative gradient relationship to obtain a processed underwater fish image. In the implementation of the embodiment of the present invention, by simulating a standard lighting environment on the basis of the three-dimensional modeling data through light controlled by a preset function, obtaining light difference data between the standard lighting environment and the three-dimensional modeling data under different lighting conditions, thereby determining the influence of sunlight refraction factors on the target area, and performing a first denoising process on the fish image through the light difference data, the image quality of the fish image recognition result can be effectively improved, and the improvement of image quality is conducive to more accurately capturing the ecological characteristics or behavioral characteristics of fish. In addition, during the image processing process, the water depth information of the target area is obtained by extracting the feature points of the background image, and then a background optimized image is obtained; based on the background image and the background optimized image, the relative grayscale relationship and the relative gradient relationship are obtained, and then the image is further denoised using the relative grayscale relationship and the relative gradient relationship, which can eliminate the influence of the water depth factor on the fish image and further improve the image quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 : A flow chart of an embodiment of the method for denoising underwater fish sunlight refraction images provided by the present invention.

[0064] Figure 2 : A structural schematic diagram of an embodiment of the underwater fish sunlight refraction image denoising system provided by the present invention. DETAILED DESCRIPTION

[0065] 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.

[0066] Embodiment 1

[0067] Please refer to Figure 1 , Figure 1 A method for denoising an underwater fish sunlight refraction image provided by an embodiment of the present invention comprises steps S1 to S4; wherein:

[0068] Step S1, collecting a regional image of the target area; identifying fish in the regional image and segmenting the regional image through a preset target recognition model and image segmentation model to obtain a fish image and a background image.

[0069] In this embodiment, the underwater fish sunlight refraction image denoising method can be applied to computer devices, including but not limited to smart phones, laptops, tablet computers, desktop computers, and physical servers and cloud servers connected to display units.

[0070] The execution subject of the underwater fish sunlight refraction image denoising method can be connected to a device with a photography function or an image acquisition function, such as a mobile phone, a video camera or a camera. The regional image of the target area is acquired through the above image acquisition device.

[0071] As a preferred implementation, the fish in the regional image are identified and the regional image is segmented by a preset target recognition model and an image segmentation model to obtain a fish image and a background image, specifically:

[0072] The first fish body region is obtained through the target recognition model; a brightness histogram of the first fish body region is constructed, and a region with a brightness value greater than a preset brightness threshold is taken as a second fish body region; a dilation operation and a corrosion operation are used to remove noise points in the second fish body region to obtain a third fish body region; a SAM segmentation model is used to segment the third fish body region using the fish body center of the first fish body region and preset marking points of non-first fish body regions as segmentation references, and the fish image represented by the mask region is obtained; wherein the fish body center of the first fish body region is determined according to a preset algorithm; the regional image is segmented according to the obtained fish image to obtain the background image.

[0073] By implementing the embodiment of the present application, the second fish body area is screened out through the brightness histogram and the preset brightness threshold, which can effectively cover the potential area of ​​the fish body, improve the accuracy of fish image recognition, and improve the efficiency and effect of fish image segmentation; in addition, through the SAM segmentation model, combined with the center point and the preset marker point as the reference for segmentation, the third fish body area can be segmented more accurately, which can overcome the problem of incomplete fish body segmentation caused by the fish body brightness factor, thereby ultimately effectively realizing the segmentation of the fish image and the background image.

[0074] Step S2, extracting feature points of the background image, and acquiring water depth information of the target area based on the feature points; optimizing the background image using the water depth information to obtain a background optimized image having the same size as the background image.

[0075] In this embodiment, image features may be extracted from the background image, and then feature points may be processed and identified to obtain water depth information of the target area.

[0076] Specifically, the acquiring of water depth information of the target area based on the feature points is specifically as follows:

[0077] The preset marker in the area image is taken as the center point, and a feature point set of the target area is constructed based on the center point and the feature points; the Euclidean distance between the center point and each of the feature points is calculated respectively, and the obtained Euclidean distance is used as the set data of the feature point set; the background image is input into a preset deep convolutional neural network, and prediction is performed based on the output of the deep convolutional neural network and the set data to obtain the feature point probability distribution of the background image; the background image is optimized using the feature point probability distribution to obtain a background optimized image; the pixels of the background optimized image belonging to the water surface are identified, and the distance of each pixel along the plumb line direction to the preset base surface is calculated in combination with the feature point probability distribution as the water depth of the target area to obtain the water depth information.

[0078] The present invention is implemented by constructing a set of feature points, using the Euclidean distance between the center point and each feature point as set data; the background image is input into a deep convolutional neural network, and prediction is performed in combination with the set data to obtain a probability distribution of the feature points, thereby calculating the distance of each pixel to a preset base surface along the plumb line direction, and obtaining the water depth of the target area. That is, a non-contact method is used, which can effectively reduce the deployment cost without the need to deploy additional measurement equipment compared to the existing technical solutions of contact measurement equipment.

[0079] Step S3, obtaining grayscale images of the background image and the background optimized image; according to the grayscale images of the background image and the background optimized image, obtaining the relative grayscale relationship and relative gradient relationship between each pixel of the background image and each pixel of the background optimized image.

[0080] As a preferred implementation manner, the relative grayscale relationship and relative gradient relationship between each pixel of the background image and each pixel of the background optimized image are obtained according to the grayscale images of the background image and the background optimized image, specifically:

[0081] Obtaining the grayscale value, gradient amplitude and gradient direction of the pixel points of the background image, and obtaining the grayscale value, gradient amplitude and gradient direction of the pixel points of the background optimization image;

[0082] According to the grayscale value, gradient amplitude, gradient direction and first set direction of the pixel point, the gradient difference value of each pixel point of the background image in the first set direction is determined; according to the grayscale value, gradient amplitude, gradient direction and second set direction of the pixel point, the gradient difference value of each pixel point of the background optimized image in the second set direction is determined; wherein the first set direction and the second set direction are both pre-configured.

[0083] The relative grayscale relationship is calculated based on the grayscale value of each pixel of the background image and the grayscale value of each pixel of the background optimized image; the relative gradient relationship is calculated based on the gradient difference value of the background image and the gradient difference value of the background optimized image.

[0084] The background image is further processed and optimized using the water depth information calculated in step S2 to obtain the background optimized image. In this embodiment, considering that different water depths cause different degrees of refraction, by analyzing the background image and the background optimized image, the relative relationship between the background image and the background optimized image can be extracted by using the difference between the background image and the background optimized image (specifically including grayscale difference and gradient difference). De-noising is performed based on the relative relationship, which can effectively eliminate the influence of the water depth factor on the image quality, thereby further improving the image quality.

[0085] Optionally, the relative grayscale relationship and the relative gradient relationship can be obtained by a preset relationship function. For example, the relative grayscale relationship B is:

[0086] B = f(pi, pj);

[0087] The relative gradient relationship K is:

[0088] K = g(qi,qj);

[0089] Among them, pi is the grayscale value of the pixel (xi, yi) of the background image i, qi is the gradient difference value of the background image i, pj is the grayscale value of the pixel (xj, yj) of the background optimization image j, qj is the gradient difference value of the background optimization image j, and f and g are both preset relationship functions.

[0090] Step S4, obtaining fish breeding environment data of the target area, wherein the fish breeding environment data includes three-dimensional modeling data; using light based on preset function control, simulating a standard lighting environment on the basis of the three-dimensional modeling data, and obtaining simulation data, wherein the simulation data is light difference data between the standard lighting environment and the three-dimensional modeling data under different lighting conditions; performing a first denoising process on the fish image through the light difference data to obtain a first denoised image; performing a second denoising process on the first denoised image using the relative grayscale relationship to obtain a second denoised image; performing a third denoising process on the second denoised image using the relative gradient relationship to obtain a processed underwater fish image.

[0091] In this embodiment, the fish breeding environment data can be obtained from a preset database, and the fish breeding environment data includes three-dimensional modeling data. By simulating a standard lighting environment based on the three-dimensional modeling data, based on the difference between the standard lighting environment and the actual environment (three-dimensional modeling data before simulation), that is, light difference data, the effect of sunlight refraction on the image can be extracted, thereby effectively denoising the fish image, improving the image quality, and facilitating subsequent specific applications of the fish image, such as further extracting the behavioral characteristics, physiological characteristics, and ecological characteristics of the fish.

[0092] As a preferred embodiment, the light can be controlled according to the following functions:

[0093] ;

[0094] Among them, S(t) is the illumination intensity of the light, t0 is the initial time, C(t) is the illumination intensity that meets the reproduction conditions of the target area at time t, T(t) is the temperature that meets the reproduction conditions of the target area at time t, p1 is the adjustment factor of C(t), and p2 is The regulatory factor, p3 is The regulatory factor of The adjustment factor of , p5 is the adjustment factor of sin(C(t)), is the correction value of the light intensity of the light.

[0095] By implementing the present invention and using the function, different intensities of light can be used at different times to standardize and accurately simulate the light in a scene, thereby obtaining relatively more accurate simulation data. In addition, the real-time temperature and the real-time change of temperature are considered during the simulation process, and an adjustment factor is assigned to each factor, and a correction value is used, which can further improve the accuracy of the function and the precision of the simulation.

[0096] Accordingly, refer to Figure 2 The embodiment of the present invention also provides an underwater fish sunlight refraction image denoising system, including a segmentation module 101, an optimization module 102, an acquisition module 103 and a denoising module 104; wherein,

[0097] The segmentation module 101 is used to collect the regional image of the target area; identify the fish in the regional image and segment the regional image through a preset target recognition model and image segmentation model to obtain a fish image and a background image;

[0098] The optimization module 102 is used to extract feature points of the background image and obtain water depth information of the target area based on the feature points; optimize the background image using the water depth information to obtain a background optimized image with the same size as the background image;

[0099] The acquisition module 103 is used to acquire the grayscale images of the background image and the background optimization image; and acquire the relative grayscale relationship and relative gradient relationship between each pixel of the background image and each pixel of the background optimization image according to the grayscale images of the background image and the background optimization image;

[0100] The denoising module 104 is used to obtain fish breeding environment data of a target area, wherein the fish breeding environment data includes three-dimensional modeling data; using light controlled based on a preset function, simulating a standard lighting environment based on the three-dimensional modeling data to obtain simulation data, wherein the simulation data is light difference data between the standard lighting environment and the three-dimensional modeling data under different lighting conditions; performing a first denoising process on the fish image using the light difference data to obtain a first denoised image; performing a second denoising process on the first denoised image using the relative grayscale relationship to obtain a second denoised image; and performing a third denoising process on the second denoised image using the relative gradient relationship to obtain a processed underwater fish image.

[0101] As a preferred solution, the segmentation module 101 identifies the fish in the regional image and segments the regional image through a preset target recognition model and an image segmentation model to obtain a fish image and a background image, specifically:

[0102] The segmentation module 101 obtains a first fish body region through the target recognition model;

[0103] Constructing a brightness histogram of the first fish body region, taking a region whose brightness value is greater than a preset brightness threshold as a second fish body region; using a dilation operation and an erosion operation to remove noise points in the second fish body region to obtain a third fish body region;

[0104] The SAM segmentation model is adopted, and the fish body center of the first fish body area and the preset marking point of the non-first fish body area are used as segmentation references to segment the third fish body area to obtain the fish image represented by the mask area; wherein the fish body center of the first fish body area is determined according to a preset algorithm;

[0105] The regional image is segmented according to the obtained fish image to obtain the background image.

[0106] As a preferred solution, the preset function is:

[0107] ;

[0108] Among them, S(t) is the illumination intensity of the light, t0 is the initial time, C(t) is the illumination intensity that meets the reproduction conditions of the target area at time t, T(t) is the temperature that meets the reproduction conditions of the target area at time t, p1 is the adjustment factor of C(t), and p2 is The regulatory factor, p3 is The regulatory factor of The adjustment factor of , p5 is the adjustment factor of sin(C(t)), is the correction value of the light intensity of the light.

[0109] As a preferred solution, the optimization module 102 obtains the water depth information of the target area based on the feature points, specifically:

[0110] The optimization module 102 uses the preset marker in the region image as a center point, and constructs a feature point set of the target region according to the center point and the feature points;

[0111] Calculating the Euclidean distance between the center point and each of the feature points respectively, and using the obtained Euclidean distance as the set data of the feature point set;

[0112] Inputting the background image into a preset deep convolutional neural network, performing prediction based on the output of the deep convolutional neural network and the set data, and obtaining a probability distribution of feature points of the background image;

[0113] Optimizing the background image using the probability distribution of the feature points to obtain a background optimized image;

[0114] The pixels belonging to the water surface of the background optimized image are identified, and the distance from each pixel to the preset base surface along the plumb line direction is calculated in combination with the probability distribution of the feature points, which is used as the water depth of the target area to obtain the water depth information.

[0115] As a preferred solution, the acquisition module 103 acquires the relative grayscale relationship and relative gradient relationship between each pixel of the background image and each pixel of the background optimization image according to the grayscale images of the background image and the background optimization image, specifically:

[0116] The acquisition module 103 acquires the grayscale value, gradient amplitude and gradient direction of the pixel points of the background image, and acquires the grayscale value, gradient amplitude and gradient direction of the pixel points of the background optimization image;

[0117] Determine the gradient difference value of each pixel of the background image in the first set direction according to the grayscale value, gradient amplitude, gradient direction and first set direction of the pixel; determine the gradient difference value of each pixel of the background optimized image in the second set direction according to the grayscale value, gradient amplitude, gradient direction and second set direction of the pixel;

[0118] The relative grayscale relationship is calculated based on the grayscale value of each pixel of the background image and the grayscale value of each pixel of the background optimized image; the relative gradient relationship is calculated based on the gradient difference value of the background image and the gradient difference value of the background optimized image.

[0119] As a preferred solution, the relative grayscale relationship is:

[0120] B = f(pi, pj);

[0121] The relative gradient relationship is:

[0122] K = g(qi,qj);

[0123] Among them, pi is the grayscale value of the pixel (xi, yi) of the background image i, qi is the gradient difference value of the background image i, pj is the grayscale value of the pixel (xj, yj) of the background optimization image j, qj is the gradient difference value of the background optimization image j, and f and g are both preset relationship functions.

[0124] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0125] The embodiment of the present invention provides a method and system for denoising an underwater fish sunlight refraction image. The method comprises: collecting a regional image of a target area; identifying fish in the regional image and segmenting the regional image through a preset target recognition model and an image segmentation model to obtain a fish image and a background image; extracting feature points of the background image, and obtaining water depth information of the target area based on the feature points; optimizing the background image using the water depth information to obtain a background optimized image of the same size as the background image; obtaining a grayscale image of the background image and the background optimized image; and obtaining a correlation between each pixel of the background image and the background optimized image based on the background image and the grayscale image of the background optimized image. The method comprises the following steps: determining the relative grayscale relationship and relative gradient relationship between pixels; obtaining fish breeding environment data of the target area, wherein the fish breeding environment data includes three-dimensional modeling data; using light controlled by a preset function, simulating a standard lighting environment on the basis of the three-dimensional modeling data, and obtaining simulation data, wherein the simulation data is light difference data between the standard lighting environment and the three-dimensional modeling data under different lighting conditions; performing a first denoising process on the fish image through the light difference data to obtain a first denoised image; performing a second denoising process on the first denoised image through the relative grayscale relationship to obtain a second denoised image; and performing a third denoising process on the second denoised image through the relative gradient relationship to obtain a processed underwater fish image. In the implementation of the embodiment of the present invention, by simulating a standard lighting environment on the basis of the three-dimensional modeling data through light controlled by a preset function, obtaining light difference data between the standard lighting environment and the three-dimensional modeling data under different lighting conditions, thereby determining the influence of sunlight refraction factors on the target area, and performing a first denoising process on the fish image through the light difference data, the image quality of the fish image recognition result can be effectively improved, and the improvement of image quality is conducive to more accurately capturing the ecological characteristics or behavioral characteristics of fish. In addition, during the image processing process, the water depth information of the target area is obtained by extracting the feature points of the background image, and then a background optimized image is obtained; based on the background image and the background optimized image, the relative grayscale relationship and the relative gradient relationship are obtained, and then the image is further denoised using the relative grayscale relationship and the relative gradient relationship, which can eliminate the influence of the water depth factor on the fish image and further improve the image quality.

[0126] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for denoising underwater fish sunlight refraction images, characterized in that: include: Acquire a regional image of a target area; Using a preset target recognition model and an image segmentation model, fish in the regional image are identified and the regional image is segmented to obtain a fish image and a background image; Extracting feature points of the background image, and acquiring water depth information of the target area based on the feature points; optimizing the background image using the water depth information to obtain a background optimized image having the same size as the background image; Obtaining a grayscale image of the background image and a grayscale image of the background optimization image; obtaining a relative grayscale relationship and a relative gradient relationship between each pixel point of the background image and each pixel point of the background optimization image according to the grayscale image of the background image and the grayscale image of the background optimization image; Acquire fish breeding environment data of a target area, the fish breeding environment data including three-dimensional modeling data; use light controlled by a preset function to simulate a standard lighting environment based on the three-dimensional modeling data to obtain simulation data, the simulation data being light difference data between the standard lighting environment and the three-dimensional modeling data under different lighting conditions; Performing a first denoising process on the fish image by using the light difference data to obtain a first denoised image; performing a second denoising process on the first denoised image by using the relative grayscale relationship to obtain a second denoised image; The second denoised image is subjected to a third denoising process by using the relative gradient relationship to obtain a processed underwater fish image.

2. The method for denoising an underwater fish sunlight refraction image according to claim 1, characterized in that: The preset function is: Among them, S(t) is the illumination intensity of the light, t0 is the initial time, C(t) is the illumination intensity that meets the reproduction conditions of the target area at time t, T(t) is the temperature that meets the reproduction conditions of the target area at time t, p1 is the adjustment factor of C(t), and p2 is The regulatory factor, p3 is The regulatory factor of , p5 is the adjustment factor of sin(C(t)), and α is the correction value of the light intensity of the light.

3. The method for denoising an underwater fish sunlight refraction image according to claim 1, characterized in that: The acquiring of water depth information of the target area based on the feature points is specifically as follows: Taking a preset marker in the region image as a center point, and constructing a feature point set of the target region according to the center point and the feature points; Calculating the Euclidean distance between the center point and each of the feature points respectively, and using the obtained Euclidean distance as the set data of the feature point set; Inputting the background image into a preset deep convolutional neural network, performing prediction based on the output of the deep convolutional neural network and the set data, and obtaining a probability distribution of feature points of the background image; Optimizing the background image using the probability distribution of the feature points to obtain a background optimized image; The pixel points belonging to the water surface of the background optimized image are identified, and the distance from each pixel point to the preset base surface along the plumb line direction is calculated in combination with the probability distribution of the feature points, which is used as the water depth of the target area to obtain the water depth information.

4. The method for denoising an underwater fish sunlight refraction image according to claim 1, characterized in that: The step of obtaining the relative grayscale relationship and relative gradient relationship between each pixel point of the background image and each pixel point of the background optimization image according to the grayscale image of the background image and the grayscale image of the background optimization image is specifically as follows: Obtaining the grayscale value, gradient amplitude and gradient direction of the pixel points of the background image, and obtaining the grayscale value, gradient amplitude and gradient direction of the pixel points of the background optimization image; Determine the gradient difference value of each pixel of the background image in the first set direction according to the first set direction, the grayscale value, the gradient amplitude and the gradient direction of the pixel of the background image; determine the gradient difference value of each pixel of the background optimized image in the second set direction according to the second set direction, the grayscale value, the gradient amplitude and the gradient direction of the pixel of the background optimized image; The relative grayscale relationship is calculated based on the grayscale value of each pixel of the background image and the grayscale value of each pixel of the background optimized image; the relative gradient relationship is calculated based on the gradient difference value of the background image and the gradient difference value of the background optimized image.

5. The method for denoising an underwater fish sunlight refraction image as claimed in claim 4, characterized in that: The relative grayscale relationship is: B = f(pi,pj); The relative gradient relationship is: K = g(qi,qj); Among them, pi is the grayscale value of pixel i (xi, yi) of the background image, qi is the gradient difference value of pixel i of the background image, pj is the grayscale value of pixel j (xj, yj) of the background optimization image, qj is the gradient difference value of pixel j of the background optimization image, and f and g are both preset relationship functions.

6. An underwater fish sunlight refraction image denoising system, characterized in that: It includes segmentation module, optimization module, acquisition module and noise reduction module; among them, The segmentation module is used to collect a regional image of the target area; identify the fish in the regional image and segment the regional image through a preset target recognition model and an image segmentation model to obtain a fish image and a background image; The optimization module is used to extract feature points of the background image and obtain water depth information of the target area based on the feature points; optimize the background image using the water depth information to obtain a background optimized image with the same size as the background image; The acquisition module is used to acquire the grayscale image of the background image and the grayscale image of the background optimization image; according to the grayscale image of the background image and the grayscale image of the background optimization image, the relative grayscale relationship and relative gradient relationship between each pixel point of the background image and each pixel point of the background optimization image are acquired; The denoising module is used to obtain fish breeding environment data of a target area, wherein the fish breeding environment data includes three-dimensional modeling data; using light controlled based on a preset function, simulating a standard lighting environment based on the three-dimensional modeling data to obtain simulation data, wherein the simulation data is light difference data between the standard lighting environment and the three-dimensional modeling data under different lighting conditions; performing a first denoising process on the fish image using the light difference data to obtain a first denoised image; performing a second denoising process on the first denoised image using the relative grayscale relationship to obtain a second denoised image; and performing a third denoising process on the second denoised image using the relative gradient relationship to obtain a processed underwater fish image.

7. The underwater fish sunlight refraction image denoising system according to claim 6, characterized in that: The preset function is: Among them, S(t) is the illumination intensity of the light, t0 is the initial time, C(t) is the illumination intensity that meets the reproduction conditions of the target area at time t, T(t) is the temperature that meets the reproduction conditions of the target area at time t, p1 is the adjustment factor of C(t), and p2 is The regulatory factor, p3 is The regulatory factor of , p5 is the adjustment factor of sin(C(t)), and α is the correction value of the light intensity of the light.

8. The underwater fish sunlight refraction image denoising system according to claim 6, characterized in that: The optimization module obtains the water depth information of the target area based on the feature points, specifically: The optimization module uses a preset marker in the region image as a center point, and constructs a feature point set of the target region based on the center point and the feature points; Calculating the Euclidean distance between the center point and each of the feature points respectively, and using the obtained Euclidean distance as the set data of the feature point set; Inputting the background image into a preset deep convolutional neural network, performing prediction based on the output of the deep convolutional neural network and the set data, and obtaining a probability distribution of feature points of the background image; Optimizing the background image using the probability distribution of the feature points to obtain a background optimized image; The pixel points belonging to the water surface of the background optimized image are identified, and the distance from each pixel point to the preset base surface along the plumb line direction is calculated in combination with the probability distribution of the feature points, which is used as the water depth of the target area to obtain the water depth information.

9. The underwater fish sunlight refraction image denoising system according to claim 6, characterized in that: The acquisition module acquires the relative grayscale relationship and relative gradient relationship between each pixel point of the background image and each pixel point of the background optimization image according to the grayscale image of the background image and the grayscale image of the background optimization image, specifically: The acquisition module acquires the grayscale value, gradient amplitude and gradient direction of the pixel points of the background image, and acquires the grayscale value, gradient amplitude and gradient direction of the pixel points of the background optimization image; Determine the gradient difference value of each pixel of the background image in the first set direction according to the first set direction, the grayscale value, the gradient amplitude and the gradient direction of the pixel of the background image; determine the gradient difference value of each pixel of the background optimized image in the second set direction according to the second set direction, the grayscale value, the gradient amplitude and the gradient direction of the pixel of the background optimized image; The relative grayscale relationship is calculated based on the grayscale value of each pixel of the background image and the grayscale value of each pixel of the background optimized image; the relative gradient relationship is calculated based on the gradient difference value of the background image and the gradient difference value of the background optimized image.

10. The underwater fish sunlight refraction image denoising system according to claim 9, characterized in that: The relative grayscale relationship is: B = f(pi,pj); The relative gradient relationship is: K = g(qi,qj); Among them, pi is the grayscale value of pixel i (xi, yi) of the background image, qi is the gradient difference value of pixel i of the background image, pj is the grayscale value of pixel j (xj, yj) of the background optimization image, qj is the gradient difference value of pixel j of the background optimization image, and f and g are both preset relationship functions.