CN118279596B - Underwater fish sunlight refraction image denoising method and system - Google Patents

Underwater fish sunlight refraction image denoising method and system Download PDF

Info

Publication number
CN118279596B
CN118279596B CN202410684594.6A CN202410684594A CN118279596B CN 118279596 B CN118279596 B CN 118279596B CN 202410684594 A CN202410684594 A CN 202410684594A CN 118279596 B CN118279596 B CN 118279596B
Authority
CN
China
Prior art keywords
image
background
gradient
fish
denoising
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410684594.6A
Other languages
Chinese (zh)
Other versions
CN118279596A (en
Inventor
余应淮
彭小红
揭磊平
香钦远
蔡润基
李镇涛
张昊
岑思
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Ocean University
Original Assignee
Guangdong Ocean University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Ocean University filed Critical Guangdong Ocean University
Priority to CN202410684594.6A priority Critical patent/CN118279596B/en
Publication of CN118279596A publication Critical patent/CN118279596A/en
Application granted granted Critical
Publication of CN118279596B publication Critical patent/CN118279596B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)

Abstract

The invention provides a denoising method and a denoising system for sunlight refraction images of underwater fishes, wherein the denoising method comprises the following steps: collecting an area image of a target area, and dividing the area image to obtain a fish image and a background image; extracting characteristic points of the background image to obtain water depth information of a target area; optimizing the background image by utilizing the water depth information; acquiring a gray level diagram, and acquiring a relative gray level relation and a relative gradient relation according to the gray level diagram; acquiring fish propagation environment data of a target area; simulating a standard illumination environment; and denoising the fish image according to the light difference data, the relative gray relation and the relative gradient relation. By implementing the method, the image quality of the fish image recognition result can be effectively improved, and the improvement of the image quality is beneficial to capturing the ecological characteristics or the behavioral characteristics of the fish more accurately.

Description

Underwater fish sunlight refraction image denoising method and system
Technical Field
The invention relates to the field of image processing, in particular to a sunlight refraction image denoising method and system for underwater fishes.
Background
In the scenes of fish culture and the like, the temperature, the humidity, the activity condition of fish and the like of a culture environment are often required to be monitored, so that farmers are helped to know the environment quality and the culture quality in real time. The real-time acquisition and monitoring of fish images is a key ring.
In the steps of image processing such as collecting, feature extracting and identifying fish images in practice, due to the relation of different time or different positions, the irradiation angles of sunlight are different, so that refraction of sunlight in water is affected, and noise with different degrees exists in captured underwater fish images. The light factor often affects the quality of image recognition. Currently, there is a need in the market for a method for denoising an image in consideration of sunlight refraction factors.
Disclosure of Invention
The invention provides a method and a system for denoising sunlight refraction images of underwater fishes, which aim to solve the technical problem of how to improve the quality of fish image recognition results.
In order to solve the technical problems, the embodiment of the invention provides a method for denoising sunlight refraction images of underwater fishes, which comprises the following steps:
collecting an area image of the target area; identifying fish in the regional image and segmenting the regional image through a preset target identification model and an image segmentation model to obtain a fish image and a background image;
Extracting characteristic points of the background image, and acquiring water depth information of a target area based on the characteristic points; optimizing the background image by utilizing the water depth information to obtain a background optimized image with the same size as the background image;
Acquiring gray level images of the background image and the background optimized image; acquiring a relative gray scale relation and a relative gradient relation between each pixel of the background image and each pixel of the background optimized image according to the gray scale images of the background image and the background optimized image;
Acquiring fish propagation environment data of a target area, wherein the fish propagation environment data comprises three-dimensional modeling data; adopting light controlled based on a preset function, simulating a standard illumination environment on the basis of the three-dimensional modeling data, and obtaining simulation data, wherein the simulation data are light difference data between the standard illumination environment and the three-dimensional modeling data under different illumination conditions; performing first denoising processing on the fish image according to the light difference data to obtain a first denoising image; performing second denoising processing on the first denoising image by using the relative gray scale relationship to obtain a second denoising image; and performing third denoising treatment on the second denoising image by using the relative gradient relation to obtain a treated underwater fish image.
As a preferred solution, the identifying the fish in the area image and dividing the area image to obtain a fish image and a background image through a preset target identification model and an image division model specifically comprises:
acquiring a first fish body area through the target identification model, and calculating the radius of a circumcircle of the fish body area;
constructing a brightness histogram of the first fish body area, and taking an area with a brightness value larger than a preset brightness threshold value as a second fish body area; removing noise points of the second fish body area by adopting expansion operation and corrosion operation to obtain a third fish body area;
Using a SAM segmentation model, taking a fish center of a first fish body area and a preset mark point of a non-first fish body area as segmentation references, and segmenting the third fish body area to obtain the fish image represented by a mask area; the fish body center of the first fish body area is determined according to a preset algorithm;
and dividing the regional image according to the obtained fish image to obtain the background image.
Preferably, the preset function is:
Wherein S (T) is the illumination intensity of the light, T 0 is the initial time, C (T) is the illumination intensity satisfying the target region propagation condition at the time T, T (T) is the temperature satisfying the target region propagation condition at the time T, p 1 is the regulating factor of C (T), and p 2 is P 3 isP 4 isP 5 is a regulatory factor of sin (C (t)),A correction value for the illumination intensity of the light.
As a preferable solution, the obtaining the water depth information of the target area based on the feature points specifically includes:
Taking a preset marker in the region image as a center point, and constructing and obtaining a feature point set of the target region according to the center point and the feature point;
Respectively calculating Euclidean distances between the center point and each characteristic point, and taking the obtained Euclidean distances as set data of the characteristic point set;
inputting the background image into a preset deep convolutional neural network, and predicting based on the output of the deep convolutional neural network and the set data to obtain the probability distribution of the feature points of the background image;
Optimizing the background image by utilizing the probability distribution of the feature points to obtain a background optimized image;
and identifying pixels belonging to the water surface of the background optimized image, and calculating the distance from each pixel to a preset base plane along the plumb line direction by combining the probability distribution of the characteristic points to obtain the water depth information as the water depth of the target area.
As a preferred solution, the obtaining a relative gray scale relationship and a relative gradient relationship between each pixel of the background image and each pixel of the background optimized image according to the gray scale map of the background image and the gray scale map of the background optimized image specifically includes:
Acquiring the gray value, gradient amplitude and gradient direction of the pixel point of the background image, and acquiring the gray value, gradient amplitude and gradient direction of the pixel point of the background optimized image;
Determining gradient difference values of all pixel points of the background image in a first setting direction according to the gray value, the gradient amplitude, the gradient direction and the first setting direction of the pixel points; determining gradient difference values of all pixel points of the background optimized image in a second setting direction according to the gray value, the gradient amplitude, the gradient direction and the second setting direction of the pixel points;
According to the gray value of each pixel point of the background image and the gray value of each pixel point of the background optimized image, calculating to obtain the relative gray relation; and calculating the relative gradient relation according to the gradient difference value of the background image and the gradient difference value of the background optimized image.
Preferably, the relative gray scale relationship is:
B=f(pi, pj);
the relative gradient relation is as follows:
K=g(qi,qj);
Wherein pi is the gray 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 gray value of the pixel (xj, yj) of the background optimized image j, qj is the gradient difference value of the background optimized image j, and f and g are both preset relationship functions.
Correspondingly, the embodiment of the invention also provides a sunlight refraction image denoising system for the underwater fish, which comprises a segmentation module, an optimization module, an acquisition module and a denoising module; wherein,
The segmentation module is used for acquiring an area image of the target area; identifying fish in the regional image and segmenting the regional image through a preset target identification model and an image segmentation model to obtain a fish image and a background image;
The optimizing module is used for extracting characteristic points of the background image and acquiring water depth information of a target area based on the characteristic points; optimizing the background image by utilizing the water depth information to obtain a background optimized image with the same size as the background image;
The acquisition module is used for acquiring gray level images of the background image and the background optimized image; acquiring a relative gray scale relation and a relative gradient relation between each pixel of the background image and each pixel of the background optimized image according to the gray scale images of the background image and the background optimized image;
The noise reduction module is used for acquiring fish propagation environment data of a target area, wherein the fish propagation environment data comprises three-dimensional modeling data; adopting light controlled based on a preset function, simulating a standard illumination environment on the basis of the three-dimensional modeling data, and obtaining simulation data, wherein the simulation data are light difference data between the standard illumination environment and the three-dimensional modeling data under different illumination conditions; performing first denoising processing on the fish image according to the light difference data to obtain a first denoising image; performing second denoising processing on the first denoising image by using the relative gray scale relationship to obtain a second denoising image; and performing third denoising treatment on the second denoising image by using the relative gradient relation to obtain a treated underwater fish image.
As a preferred scheme, the segmentation module identifies the fish in the region image and segments the region image through a preset target identification model and an image segmentation model to obtain a fish image and a background image, specifically:
the segmentation module acquires a first fish body area through the target identification model;
constructing a brightness histogram of the first fish body area, and taking an area with a brightness value larger than a preset brightness threshold value as a second fish body area; removing noise points of the second fish body area by adopting expansion operation and corrosion operation to obtain a third fish body area;
Using a SAM segmentation model, taking a fish center of a first fish body area and a preset mark point of a non-first fish body area as segmentation references, and segmenting the third fish body area to obtain the fish image represented by a mask area; the fish body center of the first fish body area is determined according to a preset algorithm;
and dividing the regional image according to the obtained fish image to obtain the background image.
Preferably, the preset function is:
Wherein S (T) is the illumination intensity of the light, T 0 is the initial time, C (T) is the illumination intensity satisfying the target region propagation condition at the time T, T (T) is the temperature satisfying the target region propagation condition at the time T, p 1 is the regulating factor of C (T), and p 2 is P 3 isP 4 isP 5 is a regulatory factor of sin (C (t)),A correction value for the illumination intensity of the light.
As a preferred solution, the optimizing module obtains the water depth information of the target area based on the feature points, specifically:
The optimization module takes a preset marker in the region image as a center point, and constructs and obtains a feature point set of the target region according to the center point and the feature point;
Respectively calculating Euclidean distances between the center point and each characteristic point, and taking the obtained Euclidean distances as set data of the characteristic point set;
inputting the background image into a preset deep convolutional neural network, and predicting based on the output of the deep convolutional neural network and the set data to obtain the probability distribution of the feature points of the background image;
Optimizing the background image by utilizing the probability distribution of the feature points to obtain a background optimized image;
and identifying pixels belonging to the water surface of the background optimized image, and calculating the distance from each pixel to a preset base plane along the plumb line direction by combining the probability distribution of the characteristic points to obtain the water depth information as the water depth of the target area.
As a preferred solution, the obtaining module obtains a relative gray scale relationship and a relative gradient relationship between each pixel of the background image and each pixel of the background optimized image according to gray scale maps of the background image and the background optimized image, specifically:
The acquisition module acquires the gray value, the gradient amplitude and the gradient direction of the pixel point of the background image, and acquires the gray value, the gradient amplitude and the gradient direction of the pixel point of the background optimized image;
Determining gradient difference values of all pixel points of the background image in a first setting direction according to the gray value, the gradient amplitude, the gradient direction and the first setting direction of the pixel points; determining gradient difference values of all pixel points of the background optimized image in a second setting direction according to the gray value, the gradient amplitude, the gradient direction and the second setting direction of the pixel points;
According to the gray value of each pixel point of the background image and the gray value of each pixel point of the background optimized image, calculating to obtain the relative gray relation; and calculating the relative gradient relation according to the gradient difference value of the background image and the gradient difference value of the background optimized image.
Preferably, the relative gray scale relationship is:
B=f(pi, pj);
the relative gradient relation is as follows:
K=g(qi,qj);
Wherein pi is the gray 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 gray value of the pixel (xj, yj) of the background optimized image j, qj is the gradient difference value of the background optimized image j, and f and g are both preset relationship functions.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
The embodiment of the invention provides a method and a system for denoising sunlight refraction images of underwater fishes, wherein the method for denoising the sunlight refraction images of the underwater fishes comprises the following steps: collecting an area image of the target area; identifying fish in the regional image and segmenting the regional image through a preset target identification model and an image segmentation model to obtain a fish image and a background image; extracting characteristic points of the background image, and acquiring water depth information of a target area based on the characteristic points; optimizing the background image by utilizing the water depth information to obtain a background optimized image with the same size as the background image; acquiring gray level images of the background image and the background optimized image; acquiring a relative gray scale relation and a relative gradient relation between each pixel of the background image and each pixel of the background optimized image according to the gray scale images of the background image and the background optimized image; acquiring fish propagation environment data of a target area, wherein the fish propagation environment data comprises three-dimensional modeling data; adopting light controlled based on a preset function, simulating a standard illumination environment on the basis of the three-dimensional modeling data, and obtaining simulation data, wherein the simulation data are light difference data between the standard illumination environment and the three-dimensional modeling data under different illumination conditions; performing first denoising processing on the fish image according to the light difference data to obtain a first denoising image; performing second denoising processing on the first denoising image by using the relative gray scale relationship to obtain a second denoising image; and performing third denoising treatment on the second denoising image by using the relative gradient relation to obtain a treated underwater fish image. According to the embodiment of the invention, the standard illumination environment is simulated on the basis of the three-dimensional modeling data through the light controlled by the preset function, and the light difference data between the standard illumination environment and the three-dimensional modeling data under different illumination conditions are obtained, so that the influence of sunlight refraction factors on a target area is determined, and the first denoising treatment is carried out on the fish image by utilizing the light difference data, so that the image quality of the fish image recognition result can be effectively improved, and the improvement of the image quality is beneficial to capturing the ecological characteristics or the behavioral characteristics of fish more accurately. In addition, in the image processing process, the water depth information of the target area is obtained by extracting the characteristic points of the background image, so that a background optimized image is obtained; and obtaining a relative gray scale relation and a relative gradient relation according to the background image and the background optimized image, so that the image is further denoised by adopting the relative gray scale relation and the relative gradient relation, the influence of water depth factors on the fish image can be eliminated, and the image quality is further improved.
Drawings
Fig. 1: the invention provides a flow diagram of an embodiment of a method for denoising sunlight refraction images of underwater fishes.
Fig. 2: the invention provides a structural schematic diagram of one embodiment of an underwater fish sunlight refraction image denoising system.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
Referring to fig. 1, fig. 1 is a schematic diagram of a method for denoising a sunlight refraction image of underwater fish according to an embodiment of the present invention, including steps S1 to S4; wherein,
Step S1, acquiring an area image of the target area; and identifying the fish in the regional image through a preset target identification model and an image segmentation model, and segmenting the regional image to obtain a fish image and a background image.
In this embodiment, the method for denoising sunlight refraction images of underwater fishes can be applied to computer equipment, wherein the computer equipment comprises, but is not limited to, smart phones, notebook computers, tablet computers, desktop computers, physical servers, cloud servers and the like, and the physical servers are connected with display units.
The execution main body of the underwater fish sunlight refraction image denoising method can be connected with equipment with a photographing function or an image acquisition function, such as a mobile phone, a video camera or a camera. By the image acquisition device, the regional image of the target region is acquired.
As a preferred embodiment, the identifying the fish in the area image and dividing the area image by a preset target identification model and an image division model to obtain a fish image and a background image specifically includes:
Acquiring a first fish body area through the target identification model; constructing a brightness histogram of the first fish body area, and taking an area with a brightness value larger than a preset brightness threshold value as a second fish body area; removing noise points of the second fish body area by adopting expansion operation and corrosion operation to obtain a third fish body area; using a SAM segmentation model, taking a fish center of a first fish body area and a preset mark point of a non-first fish body area as segmentation references, and segmenting the third fish body area to obtain the fish image represented by a mask area; the fish body center of the first fish body area is determined according to a preset algorithm; and dividing the regional image according to the obtained fish image to obtain the background image.
By implementing the embodiment of the application, the second fish body area is screened out through the brightness histogram and the preset brightness threshold value, so that the potential area of the fish body can be effectively covered, the accuracy of fish image identification is improved, and the efficiency and effect of fish image segmentation are improved; in addition, through the SAM segmentation model, the center point and the preset mark point are combined to serve as segmentation reference objects, the third fish body area can be segmented more accurately, the problem that fish body segmentation is incomplete due to fish body brightness factors can be solved, and therefore segmentation of the fish images and the background images is achieved finally and effectively.
S2, extracting characteristic points of the background image, and acquiring water depth information of a target area based on the characteristic points; and optimizing the background image by utilizing the water depth information to obtain a background optimized image with the same size as the background image.
In this embodiment, image features may be extracted for the background image, and then processing and identifying are performed for the feature points to obtain the water depth information of the target area.
Specifically, the obtaining the water depth information of the target area based on the feature points specifically includes:
Taking a preset marker in the region image as a center point, and constructing and obtaining a feature point set of the target region according to the center point and the feature point; respectively calculating Euclidean distances between the center point and each characteristic point, and taking the obtained Euclidean distances as set data of the characteristic point set; inputting the background image into a preset deep convolutional neural network, and predicting based on the output of the deep convolutional neural network and the set data to obtain the probability distribution of the feature points of the background image; optimizing the background image by utilizing the probability distribution of the feature points to obtain a background optimized image; and identifying pixels belonging to the water surface of the background optimized image, and calculating the distance from each pixel to a preset base plane along the plumb line direction by combining the probability distribution of the characteristic points to obtain the water depth information as the water depth of the target area.
By implementing the invention, the Euclidean distance between the center point and each characteristic point is used as the set data by constructing the characteristic point set; the background image is input into a deep convolutional neural network, and the characteristic point probability distribution is obtained by combining the set data, so that the distance from each pixel to a preset base plane along the plumb line direction is calculated, and the water depth of a target area is obtained.
Step S3, obtaining gray level images of the background image and the background optimized image; and acquiring a relative gray scale relation and a relative gradient relation between each pixel of the background image and each pixel of the background optimized image according to the gray scale diagrams of the background image and the background optimized image.
As a preferred embodiment, the obtaining the relative gray scale relationship and the relative gradient relationship between each pixel of the background image and each pixel of the background optimized image according to the gray scale map of the background image and the gray scale map of the background optimized image specifically includes:
Acquiring the gray value, gradient amplitude and gradient direction of the pixel point of the background image, and acquiring the gray value, gradient amplitude and gradient direction of the pixel point of the background optimized image;
Determining gradient difference values of all pixel points of the background image in a first setting direction according to the gray value, the gradient amplitude, the gradient direction and the first setting direction of the pixel points; determining gradient difference values of all pixel points of the background optimized image in a second setting direction according to the gray value, the gradient amplitude, the gradient direction and the second setting direction of the pixel points; wherein the first setting direction and the second setting direction are both preconfigured.
According to the gray value of each pixel point of the background image and the gray value of each pixel point of the background optimized image, calculating to obtain the relative gray relation; and calculating the relative gradient relation according to the gradient difference value of the background image and the gradient difference value of the background optimized image.
And (3) further processing and optimizing the background image by using the water depth information calculated in the step (S2) to obtain the background optimized image. In this embodiment, in consideration of refraction caused by different water depths, by analyzing the background image and the background optimized image, the difference (specifically including the gray level difference and the gradient difference) between the background image and the background optimized image is utilized to extract the relative relationship between the background image and the background optimized image, and denoising is performed through the relative relationship, so that the influence of the water depth factor on the image quality can be effectively removed, and the image quality is further improved.
Alternatively, the relative gray scale relationship and the relative gradient relationship may be obtained by a preset relationship function. For example, the relative gray scale relationship B is:
B=f(pi, pj);
The relative gradient relation K is as follows:
K=g(qi,qj);
Wherein pi is the gray 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 gray value of the pixel (xj, yj) of the background optimized image j, qj is the gradient difference value of the background optimized image j, and f and g are both preset relationship functions.
S4, acquiring fish propagation environment data of a target area, wherein the fish propagation environment data comprise three-dimensional modeling data; adopting light controlled based on a preset function, simulating a standard illumination environment on the basis of the three-dimensional modeling data, and obtaining simulation data, wherein the simulation data are light difference data between the standard illumination environment and the three-dimensional modeling data under different illumination conditions; performing first denoising processing on the fish image according to the light difference data to obtain a first denoising image; performing second denoising processing on the first denoising image by using the relative gray scale relationship to obtain a second denoising image; and performing third denoising treatment on the second denoising image by using the relative gradient relation to obtain a treated underwater fish image.
In this embodiment, the fish reproduction environment data may be acquired from a preset database, the fish reproduction environment data including three-dimensional modeling data. By simulating the standard illumination environment on the basis of the three-dimensional modeling data, the influence of sunlight refraction on the image can be extracted on the basis of the difference between the standard illumination environment and the actual environment (the three-dimensional modeling data before being simulated), namely the light difference data, so that the image quality of the fish image is effectively denoised, the subsequent specific application of the fish image is facilitated, such as further extraction of the behavior characteristics, the physiological characteristics, the ecological characteristics and the like of the fish.
As a preferred embodiment, the light may be controlled according to the following function:
Wherein S (T) is the illumination intensity of the light, T 0 is the initial time, C (T) is the illumination intensity satisfying the target region propagation condition at the time T, T (T) is the temperature satisfying the target region propagation condition at the time T, p 1 is the regulating factor of C (T), and p 2 is P 3 isP 4 isP 5 is a regulatory factor of sin (C (t)),A correction value for the illumination intensity of the light.
By implementing the invention, the function can be utilized to adopt rays with different intensities at different moments so as to simulate rays in a scene in a standardized and accurate manner, thereby obtaining relatively more accurate simulation data. In addition, the real-time temperature and the real-time change of the temperature are considered in the simulation process, the adjusting factors are distributed for each factor, and the correction value is adopted, so that the accuracy of the function can be further improved, and the simulation accuracy is further improved.
Correspondingly, referring to fig. 2, the embodiment of the invention also provides an underwater fish sunlight refraction image denoising system, which comprises a segmentation module 101, an optimization module 102, an acquisition module 103 and a denoising module 104; wherein,
The segmentation module 101 is configured to collect an area image of the target area; identifying fish in the regional image and segmenting the regional image through a preset target identification model and an image segmentation model to obtain a fish image and a background image;
The optimizing module 102 is configured to extract feature points of the background image, and obtain water depth information of a target area based on the feature points; optimizing the background image by utilizing the water depth information to obtain a background optimized image with the same size as the background image;
The acquiring module 103 is configured to acquire gray-scale maps of the background image and the background optimized image; acquiring a relative gray scale relation and a relative gradient relation between each pixel of the background image and each pixel of the background optimized image according to the gray scale images of the background image and the background optimized image;
the noise reduction module 104 is configured to obtain fish propagation environment data of a target area, where the fish propagation environment data includes three-dimensional modeling data; adopting light controlled based on a preset function, simulating a standard illumination environment on the basis of the three-dimensional modeling data, and obtaining simulation data, wherein the simulation data are light difference data between the standard illumination environment and the three-dimensional modeling data under different illumination conditions; performing first denoising processing on the fish image according to the light difference data to obtain a first denoising image; performing second denoising processing on the first denoising image by using the relative gray scale relationship to obtain a second denoising image; and performing third denoising treatment on the second denoising image by using the relative gradient relation to obtain a treated underwater fish image.
As a preferred solution, the segmentation module 101 identifies the fish in the area image and segments the area image through a preset target identification model and an image segmentation model to obtain a fish image and a background image, specifically:
The segmentation module 101 acquires a first fish body area through the target recognition model;
constructing a brightness histogram of the first fish body area, and taking an area with a brightness value larger than a preset brightness threshold value as a second fish body area; removing noise points of the second fish body area by adopting expansion operation and corrosion operation to obtain a third fish body area;
Using a SAM segmentation model, taking a fish center of a first fish body area and a preset mark point of a non-first fish body area as segmentation references, and segmenting the third fish body area to obtain the fish image represented by a mask area; the fish body center of the first fish body area is determined according to a preset algorithm;
and dividing the regional image according to the obtained fish image to obtain the background image.
Preferably, the preset function is:
Wherein S (T) is the illumination intensity of the light, T 0 is the initial time, C (T) is the illumination intensity satisfying the target region propagation condition at the time T, T (T) is the temperature satisfying the target region propagation condition at the time T, p 1 is the regulating factor of C (T), and p 2 is P 3 isP 4 isP 5 is a regulatory factor of sin (C (t)),A correction value for the illumination intensity of the light.
As a preferred solution, the optimizing module 102 obtains the water depth information of the target area based on the feature points, specifically:
The optimizing module 102 uses a preset marker in the region image as a center point, and constructs and obtains a feature point set of the target region according to the center point and the feature point;
Respectively calculating Euclidean distances between the center point and each characteristic point, and taking the obtained Euclidean distances as set data of the characteristic point set;
inputting the background image into a preset deep convolutional neural network, and predicting based on the output of the deep convolutional neural network and the set data to obtain the probability distribution of the feature points of the background image;
Optimizing the background image by utilizing the probability distribution of the feature points to obtain a background optimized image;
and identifying pixels belonging to the water surface of the background optimized image, and calculating the distance from each pixel to a preset base plane along the plumb line direction by combining the probability distribution of the characteristic points to obtain the water depth information as the water depth of the target area.
As a preferred solution, the obtaining module 103 obtains, according to the gray level diagrams of the background image and the background optimized image, a relative gray level relationship and a relative gradient relationship between each pixel of the background image and each pixel of the background optimized image, specifically:
The obtaining module 103 obtains the gray value, the gradient amplitude and the gradient direction of the pixel point of the background image, and obtains the gray value, the gradient amplitude and the gradient direction of the pixel point of the background optimized image;
Determining gradient difference values of all pixel points of the background image in a first setting direction according to the gray value, the gradient amplitude, the gradient direction and the first setting direction of the pixel points; determining gradient difference values of all pixel points of the background optimized image in a second setting direction according to the gray value, the gradient amplitude, the gradient direction and the second setting direction of the pixel points;
According to the gray value of each pixel point of the background image and the gray value of each pixel point of the background optimized image, calculating to obtain the relative gray relation; and calculating the relative gradient relation according to the gradient difference value of the background image and the gradient difference value of the background optimized image.
Preferably, the relative gray scale relationship is:
B=f(pi, pj);
the relative gradient relation is as follows:
K=g(qi,qj);
Wherein pi is the gray 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 gray value of the pixel (xj, yj) of the background optimized image j, qj is the gradient difference value of the background optimized image j, and f and g are both preset relationship functions.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
The embodiment of the invention provides a method and a system for denoising sunlight refraction images of underwater fishes, wherein the method for denoising the sunlight refraction images of the underwater fishes comprises the following steps: collecting an area image of the target area; identifying fish in the regional image and segmenting the regional image through a preset target identification model and an image segmentation model to obtain a fish image and a background image; extracting characteristic points of the background image, and acquiring water depth information of a target area based on the characteristic points; optimizing the background image by utilizing the water depth information to obtain a background optimized image with the same size as the background image; acquiring gray level images of the background image and the background optimized image; acquiring a relative gray scale relation and a relative gradient relation between each pixel of the background image and each pixel of the background optimized image according to the gray scale images of the background image and the background optimized image; acquiring fish propagation environment data of a target area, wherein the fish propagation environment data comprises three-dimensional modeling data; adopting light controlled based on a preset function, simulating a standard illumination environment on the basis of the three-dimensional modeling data, and obtaining simulation data, wherein the simulation data are light difference data between the standard illumination environment and the three-dimensional modeling data under different illumination conditions; performing first denoising processing on the fish image according to the light difference data to obtain a first denoising image; performing second denoising processing on the first denoising image by using the relative gray scale relationship to obtain a second denoising image; and performing third denoising treatment on the second denoising image by using the relative gradient relation to obtain a treated underwater fish image. According to the embodiment of the invention, the standard illumination environment is simulated on the basis of the three-dimensional modeling data through the light controlled by the preset function, and the light difference data between the standard illumination environment and the three-dimensional modeling data under different illumination conditions are obtained, so that the influence of sunlight refraction factors on a target area is determined, and the first denoising treatment is carried out on the fish image by utilizing the light difference data, so that the image quality of the fish image recognition result can be effectively improved, and the improvement of the image quality is beneficial to capturing the ecological characteristics or the behavioral characteristics of fish more accurately. In addition, in the image processing process, the water depth information of the target area is obtained by extracting the characteristic points of the background image, so that a background optimized image is obtained; and obtaining a relative gray scale relation and a relative gradient relation according to the background image and the background optimized image, so that the image is further denoised by adopting the relative gray scale relation and the relative gradient relation, the influence of water depth factors on the fish image can be eliminated, and the image quality is further improved.
The foregoing embodiments have been provided for the purpose of illustrating the general principles of the present invention, and are not to be construed as limiting the scope of the invention. It should be noted that any modifications, equivalent substitutions, improvements, etc. made by those skilled in the art without departing from the spirit and principles of the present invention are intended to be included in the scope of the present invention.

Claims (10)

1. The method for denoising the sunlight refraction image of the underwater fish is characterized by comprising the following steps of:
collecting an area image of a target area; identifying fish in the regional image and segmenting the regional image through a preset target identification model and an image segmentation model to obtain a fish image and a background image;
Extracting characteristic points of the background image, and acquiring water depth information of a target area based on the characteristic points; optimizing the background image by utilizing the water depth information to obtain a background optimized image with the same size as the background image;
Acquiring a gray level image of the background image and a gray level image of the background optimized image; acquiring a relative gray scale relationship and a relative gradient relationship between each pixel point of the background image and each pixel point of the background optimized image according to the gray scale image of the background image and the gray scale image of the background optimized image;
Acquiring fish propagation environment data of a target area, wherein the fish propagation environment data comprises three-dimensional modeling data; adopting light controlled based on a preset function, simulating a standard illumination environment on the basis of the three-dimensional modeling data, and obtaining simulation data, wherein the simulation data are light difference data between the standard illumination environment and the three-dimensional modeling data under different illumination conditions; performing first denoising processing on the fish image according to the light difference data to obtain a first denoising image; performing second denoising processing on the first denoising image by using the relative gray scale relationship to obtain a second denoising image; and performing third denoising treatment on the second denoising image by using the relative gradient relation to obtain a treated underwater fish image.
2. The method for denoising an underwater fish sunlight refraction image according to claim 1, wherein the predetermined function is:
wherein S (T) is the illumination intensity of the light, T 0 is the initial time, C (T) is the illumination intensity satisfying the target region propagation condition at the time T, T (T) is the temperature satisfying the target region propagation condition at the time T, p 1 is the regulating factor of C (T), and p 2 is P 3 isP 4 isP 5 is a sin (C (t)) adjustment factor, and α is a correction value of the illumination intensity of the light.
3. The method for denoising the sunlight refraction image of the underwater fish according to claim 1, wherein the obtaining the 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 and obtaining a feature point set of the target region according to the center point and the feature point;
Respectively calculating Euclidean distances between the center point and each characteristic point, and taking the obtained Euclidean distances as set data of the characteristic point set;
inputting the background image into a preset deep convolutional neural network, and predicting based on the output of the deep convolutional neural network and the set data to obtain the probability distribution of the feature points of the background image;
Optimizing the background image by utilizing the probability distribution of the feature points to obtain a background optimized image;
And identifying pixel points belonging to the water surface of the background optimized image, and calculating the distance from each pixel point to a preset base plane along the plumb line direction by combining the probability distribution of the characteristic points to obtain the water depth information of the target area.
4. The method for denoising the sunlight refraction image of the underwater fish according to claim 1, wherein the obtaining the relative gray scale relationship and the relative gradient relationship between each pixel point of the background image and each pixel point of the background optimization image according to the gray scale image of the background image and the gray scale image of the background optimization image specifically comprises:
Acquiring the gray value, gradient amplitude and gradient direction of the pixel point of the background image, and acquiring the gray value, gradient amplitude and gradient direction of the pixel point of the background optimized image;
Determining gradient difference values of all pixel points of the background image in a first setting direction according to the first setting direction, the gray value, the gradient amplitude and the gradient direction of the pixel points of the background image; determining gradient difference values of all pixel points of the background optimized image in a second setting direction according to the second setting direction, the gray value, the gradient amplitude and the gradient direction of the pixel points of the background optimized image;
According to the gray value of each pixel point of the background image and the gray value of each pixel point of the background optimized image, calculating to obtain the relative gray relation; and calculating the relative gradient relation according to 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 according to claim 4, wherein the relative gray scale relationship is:
B=f(pi,pj);
the relative gradient relation is as follows:
K=g(qi,qj);
Wherein pi is the gray value of the pixel point i (xi, yi) of the background image, qi is the gradient difference value of the pixel point i of the background image, pj is the gray value of the pixel point j (xj, yj) of the background optimized image, qj is the gradient difference value of the pixel point j of the background optimized image, and f and g are preset relation functions.
6. The sunlight refraction image denoising system for the underwater fish is characterized by comprising a segmentation module, an optimization module, an acquisition module and a denoising module; wherein,
The segmentation module is used for acquiring an area image of the target area; identifying fish in the regional image and segmenting the regional image through a preset target identification model and an image segmentation model to obtain a fish image and a background image;
The optimizing module is used for extracting characteristic points of the background image and acquiring water depth information of a target area based on the characteristic points; optimizing the background image by utilizing the water depth information to obtain a background optimized image with the same size as the background image;
The acquisition module is used for acquiring the gray level image of the background image and the gray level image of the background optimized image; acquiring a relative gray scale relationship and a relative gradient relationship between each pixel point of the background image and each pixel point of the background optimized image according to the gray scale image of the background image and the gray scale image of the background optimized image;
The noise reduction module is used for acquiring fish propagation environment data of a target area, wherein the fish propagation environment data comprises three-dimensional modeling data; adopting light controlled based on a preset function, simulating a standard illumination environment on the basis of the three-dimensional modeling data, and obtaining simulation data, wherein the simulation data are light difference data between the standard illumination environment and the three-dimensional modeling data under different illumination conditions; performing first denoising processing on the fish image according to the light difference data to obtain a first denoising image; performing second denoising processing on the first denoising image by using the relative gray scale relationship to obtain a second denoising image; and performing third denoising treatment on the second denoising image by using the relative gradient relation to obtain a treated underwater fish image.
7. The underwater fish sunlight refraction image denoising system of claim 6, wherein the preset function is:
wherein S (T) is the illumination intensity of the light, T 0 is the initial time, C (T) is the illumination intensity satisfying the target region propagation condition at the time T, T (T) is the temperature satisfying the target region propagation condition at the time T, p 1 is the regulating factor of C (T), and p 2 is P 3 isP 4 isP 5 is a sin (C (t)) adjustment factor, and α is a correction value of the illumination intensity of the light.
8. The underwater fish sunlight refraction image denoising system as claimed in claim 6, wherein the optimizing module obtains the water depth information of the target area based on the feature points, specifically:
The optimization module takes a preset marker in the region image as a center point, and constructs and obtains a feature point set of the target region according to the center point and the feature point;
Respectively calculating Euclidean distances between the center point and each characteristic point, and taking the obtained Euclidean distances as set data of the characteristic point set;
inputting the background image into a preset deep convolutional neural network, and predicting based on the output of the deep convolutional neural network and the set data to obtain the probability distribution of the feature points of the background image;
Optimizing the background image by utilizing the probability distribution of the feature points to obtain a background optimized image;
And identifying pixel points belonging to the water surface of the background optimized image, and calculating the distance from each pixel point to a preset base plane along the plumb line direction by combining the probability distribution of the characteristic points to obtain the water depth information of the target area.
9. The underwater fish sunlight refraction image denoising system as claimed in claim 6, wherein the obtaining module obtains the relative gray scale relationship and the relative gradient relationship between each pixel point of the background image and each pixel point of the background optimization image according to the gray scale map of the background image and the gray scale map of the background optimization image, specifically:
The acquisition module acquires the gray value, the gradient amplitude and the gradient direction of the pixel point of the background image, and acquires the gray value, the gradient amplitude and the gradient direction of the pixel point of the background optimized image;
Determining gradient difference values of all pixel points of the background image in a first setting direction according to the first setting direction, the gray value, the gradient amplitude and the gradient direction of the pixel points of the background image; determining gradient difference values of all pixel points of the background optimized image in a second setting direction according to the second setting direction, the gray value, the gradient amplitude and the gradient direction of the pixel points of the background optimized image;
According to the gray value of each pixel point of the background image and the gray value of each pixel point of the background optimized image, calculating to obtain the relative gray relation; and calculating the relative gradient relation according to the gradient difference value of the background image and the gradient difference value of the background optimized image.
10. An underwater fish sunlight refraction image denoising system as claimed in claim 9, wherein the relative gray scale relationship is:
B=f(pi,pj);
the relative gradient relation is as follows:
K=g(qi,qj);
Wherein pi is the gray value of the pixel point i (xi, yi) of the background image, qi is the gradient difference value of the pixel point i of the background image, pj is the gray value of the pixel point j (xj, yj) of the background optimized image, qj is the gradient difference value of the pixel point j of the background optimized image, and f and g are preset relation functions.
CN202410684594.6A 2024-05-30 2024-05-30 Underwater fish sunlight refraction image denoising method and system Active CN118279596B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410684594.6A CN118279596B (en) 2024-05-30 2024-05-30 Underwater fish sunlight refraction image denoising method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410684594.6A CN118279596B (en) 2024-05-30 2024-05-30 Underwater fish sunlight refraction image denoising method and system

Publications (2)

Publication Number Publication Date
CN118279596A CN118279596A (en) 2024-07-02
CN118279596B true CN118279596B (en) 2024-08-23

Family

ID=91648838

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410684594.6A Active CN118279596B (en) 2024-05-30 2024-05-30 Underwater fish sunlight refraction image denoising method and system

Country Status (1)

Country Link
CN (1) CN118279596B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108596853A (en) * 2018-04-28 2018-09-28 上海海洋大学 Underwater picture Enhancement Method based on bias light statistical model and transmission map optimization
CN109949247A (en) * 2019-03-26 2019-06-28 常州工学院 A kind of gradient field adaptive gain underwater picture Enhancement Method based on YIQ space optics imaging model

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113436106B (en) * 2021-07-02 2023-01-24 鹏城实验室 Underwater image enhancement method and device and computer storage medium
CN117095444B (en) * 2023-08-29 2024-02-13 广州市星飞达电子科技有限公司 Image recognition method based on artificial intelligence
CN117408890B (en) * 2023-12-14 2024-03-08 武汉泽塔云科技股份有限公司 Video image transmission quality enhancement method and system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108596853A (en) * 2018-04-28 2018-09-28 上海海洋大学 Underwater picture Enhancement Method based on bias light statistical model and transmission map optimization
CN109949247A (en) * 2019-03-26 2019-06-28 常州工学院 A kind of gradient field adaptive gain underwater picture Enhancement Method based on YIQ space optics imaging model

Also Published As

Publication number Publication date
CN118279596A (en) 2024-07-02

Similar Documents

Publication Publication Date Title
Xie et al. Multilevel cloud detection in remote sensing images based on deep learning
Zhou et al. On detecting road regions in a single UAV image
CN113111947B (en) Image processing method, apparatus and computer readable storage medium
WO2019071976A1 (en) Panoramic image saliency detection method based on regional growth and eye movement model
CN110599514B (en) Image segmentation method and device, electronic equipment and storage medium
CN116935447B (en) Self-adaptive teacher-student structure-based unsupervised domain pedestrian re-recognition method and system
CN110276831B (en) Method and device for constructing three-dimensional model, equipment and computer-readable storage medium
CN112733711B (en) Remote sensing image damaged building extraction method based on multi-scale scene change detection
CN114092450B (en) Real-time image segmentation method, system and device based on gastroscopy video
CN113762009B (en) Crowd counting method based on multi-scale feature fusion and double-attention mechanism
CN110853070A (en) Underwater sea cucumber image segmentation method based on significance and Grabcut
CN110110618B (en) SAR target detection method based on PCA and global contrast
CN114596500A (en) Remote sensing image semantic segmentation method based on channel-space attention and DeeplabV3plus
CN113706562B (en) Image segmentation method, device and system and cell segmentation method
CN112435252B (en) Warhead fragment perforation and pit detection method
CN109886170A (en) A kind of identification of oncomelania intelligent measurement and statistical system
CN114758249A (en) Target object monitoring method, device, equipment and medium based on field night environment
CN115294483A (en) Small target identification method and system for complex scene of power transmission line
CN111598144A (en) Training method and device of image recognition model
CN113012167B (en) Combined segmentation method for cell nucleus and cytoplasm
CN113033386A (en) High-resolution remote sensing image-based transmission line channel hidden danger identification method and system
CN118279596B (en) Underwater fish sunlight refraction image denoising method and system
CN111797832A (en) Automatic generation method and system of image interesting region and image processing method
CN113642410B (en) Method for detecting ampullaria gigas eggs based on multi-scale feature fusion and dynamic convolution
CN114627534A (en) Living body discrimination method, electronic device, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant