CN116152115B - Garbage image denoising processing method based on computer vision - Google Patents

Garbage image denoising processing method based on computer vision Download PDF

Info

Publication number
CN116152115B
CN116152115B CN202310347596.1A CN202310347596A CN116152115B CN 116152115 B CN116152115 B CN 116152115B CN 202310347596 A CN202310347596 A CN 202310347596A CN 116152115 B CN116152115 B CN 116152115B
Authority
CN
China
Prior art keywords
image
garbage
similarity
pixel point
connected domain
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
CN202310347596.1A
Other languages
Chinese (zh)
Other versions
CN116152115A (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.)
Hunan Rongcheng Environmental Protection Technology Co ltd
Original Assignee
Hunan Rongcheng Environmental Protection Technology Co ltd
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 Hunan Rongcheng Environmental Protection Technology Co ltd filed Critical Hunan Rongcheng Environmental Protection Technology Co ltd
Priority to CN202310347596.1A priority Critical patent/CN116152115B/en
Publication of CN116152115A publication Critical patent/CN116152115A/en
Application granted granted Critical
Publication of CN116152115B publication Critical patent/CN116152115B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • G06T5/70
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration by the use of more than one image, e.g. averaging, subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20021Dividing image into blocks, subimages or windows
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02WCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO WASTEWATER TREATMENT OR WASTE MANAGEMENT
    • Y02W30/00Technologies for solid waste management
    • Y02W30/10Waste collection, transportation, transfer or storage, e.g. segregated refuse collecting, electric or hybrid propulsion

Abstract

The invention relates to the technical field of image processing, in particular to a garbage image denoising processing method based on computer vision. Firstly, identifying a connected domain in a garbage image, and screening out a concerned connected domain and a concerned point; taking each frame of garbage image as a target image, and obtaining an initial similarity adjustment factor by using the difference of image moment values corresponding to the connected domain where the attention point is located at the same position in the continuous frames of garbage images; obtaining a target similarity adjustment factor according to the gradient direction difference and the distance between the pixel points and the corresponding near-distance pixel points and the initial similarity adjustment factor corresponding to the pixel points; taking the normalized target similarity adjustment factor as a weight to obtain a weighted similarity weight; and denoising the target image by using the weighted similarity weight to obtain a denoised garbage image. The invention improves the similarity weight, and avoids the defect that the subsequent identification and detection of the garbage area are affected when the garbage area is similar to the background sea wave in color.

Description

Garbage image denoising processing method based on computer vision
Technical Field
The invention relates to the technical field of image processing, in particular to a garbage image denoising processing method based on computer vision.
Background
With the rapid development of coastal industry, ocean garbage has increased dramatically. The marine garbage can cause water pollution and influence marine organisms, and serious navigation safety can be threatened. At present, marine garbage is monitored and managed according to marine images acquired by unmanned aerial vehicles, and the marine images are subjected to noise pollution due to various interferences in acquisition and transmission, so that generated noise can influence the classification and identification of the subsequent marine garbage, and the marine images are required to be subjected to denoising treatment, so that the image quality is improved. Because the non-local mean filtering algorithm has better retention of edge detail information in the image than other denoising algorithms, the non-local mean filtering algorithm is generally used for denoising the garbage image. However, in the conventional non-local mean filtering algorithm, the denoising effect on the pixel points is measured through the similarity of gray values in the image blocks, and for ocean garbage, the pixel points are usually formed by plastic products, wherein the ocean garbage similar to a plastic bag is close to ocean self sea wave color, so that the similarity of the garbage and ocean background is too high, the denoising degree of the pixel points is close to the background area, further details are lost, and the subsequent classification and identification of the ocean garbage are affected.
Disclosure of Invention
In order to solve the technical problem that the recognition of the marine garbage can be influenced due to the fact that the similarity between the marine garbage and the marine background is too high, the invention aims to provide a garbage image denoising processing method based on computer vision, and the adopted technical scheme is as follows:
acquiring a marine surface gray level map containing garbage as a garbage image;
identifying connected domains in the garbage image, and screening out concerned connected domains; taking edge points on the connected domain as attention points;
taking each frame of garbage image as a target image, and obtaining an initial similarity adjustment factor corresponding to the attention point according to the difference of image moment values corresponding to the connected domain where the attention point is located at the same position in the continuous frames of garbage images before the target image; for any pixel point on the target image, acquiring the pixel point on the concerned connected domain closest to the pixel point as a near-distance pixel point; obtaining a target similarity adjustment factor according to gradient direction difference of the pixel point and the corresponding close-range pixel point, the distance between the pixel point and the corresponding close-range pixel point and the initial similarity adjustment factor corresponding to the pixel point;
dividing a target image into a plurality of image blocks, obtaining similarity weight values of pixel points in each image block, taking a normalized target similarity adjustment factor as the weight of the similarity weight values, and obtaining weighted similarity weight values;
and denoising the target image by using the weighted similarity weight to obtain a denoised garbage image.
Preferably, the obtaining the initial similarity adjustment factor corresponding to the attention point according to the difference of the image moment values corresponding to the connected domain where the attention point is located at the same position in the continuous frame garbage image before the target image includes:
calculating the absolute value of the difference value of the image moment values corresponding to the connected domain where the attention point is located at the same position in every two adjacent frames of garbage images before the target image; for any attention point, taking the average value of absolute values of differences of moment values of images in all two adjacent frames of garbage images as an initial difference value; taking the sum of the initial difference value and a preset first adjusting value as a first difference value; taking the normalized first difference value as an initial similarity adjustment factor.
Preferably, after obtaining the initial similarity adjustment factor corresponding to the attention point according to the difference of the image moment values corresponding to the connected domain where the attention point is located at the same position in the continuous frame garbage image before the target image, the method includes:
and setting the initial similarity adjustment factors of other pixel points not focused on as a preset first adjustment value.
Preferably, the obtaining the target similarity adjustment factor according to the gradient direction difference between the pixel point and the corresponding near-distance pixel point, the distance between the pixel point and the corresponding near-distance pixel point, and the initial similarity adjustment factor corresponding to the pixel point includes:
calculating the absolute value of the difference value of the gradient direction angles of the pixel points and the corresponding close-range pixel points; calculating the ratio of the absolute value of the difference value to the distance between the pixel point and the corresponding short-distance pixel point, and taking the ratio as an initial adjustment value; taking the normalized initial adjustment value as a similarity adjustment value; and taking the sum of the similarity adjustment value and the initial similarity adjustment factor corresponding to the pixel point as a target similarity adjustment factor corresponding to the pixel point.
Preferably, the acquiring the pixel point on the attention connected domain closest to the pixel point as the close-range pixel point includes:
and acquiring a concerned connected domain closest to the pixel point as a near connected domain, and taking the pixel point closest to the pixel point on the near connected domain as a near pixel point.
Preferably, denoising the target image by using the weighted similarity weight to obtain a denoised garbage image, including:
and denoising the target image by using a non-local mean filtering algorithm based on the weighted similarity weight to obtain a denoising garbage image.
Preferably, the identifying the connected domain in the garbage image includes:
performing edge detection on the garbage image to obtain an edge image;
and carrying out morphological closing operation treatment on the edge image, and connecting edge break points in the edge image to obtain at least two connected domains.
Preferably, the screening out the connected domain of interest includes:
a connected domain in which a pixel having a pixel value of 0 is present is defined as a focused connected domain.
The embodiment of the invention has at least the following beneficial effects:
according to the invention, the connected domain in the garbage image is firstly identified, and the concerned connected domain is screened out, so that the preliminary identification of the garbage area in the garbage image is realized. Taking each frame of garbage image as a target image, and obtaining an initial similarity adjustment factor corresponding to the attention point according to the difference of image moment values corresponding to the connected domain where the attention point is positioned at the same position in the continuous frames of garbage images in front of the target image, wherein the initial similarity adjustment factor is constructed according to sea waves and internal texture features of garbage, and can more accurately reflect the probability that the pixel point belongs to the garbage region; obtaining a pixel point on a concerned connected domain closest to the pixel point as a near-distance pixel point, obtaining a target similarity adjustment factor according to gradient direction difference of the pixel point and the near-distance pixel point corresponding to the pixel point, distance between the pixel point and the near-distance pixel point corresponding to the pixel point and an initial similarity adjustment factor corresponding to the pixel point, and improving a similarity weight obtained by combining garbage features, ocean wave features, water wave conditions around garbage and a situation that the garbage partial area possibly has high similarity with a background; dividing a target image into a plurality of image blocks, acquiring similarity weights of pixel points in each image block, taking a normalized target similarity adjustment factor as the weight of the similarity weights, obtaining weighted similarity weights, and denoising the ocean surface image by using the weighted similarity weights to obtain a denoising garbage image. The original similarity weight obtained only according to the gray value of the pixel point is improved, the weighted similarity weight is obtained, and the defect that when the color of the garbage area is similar to that of the background sea wave, the similarity of the garbage area and the background area is high, and then the area is affected by fuzzy treatment during denoising to subsequently identify and detect the garbage area is avoided.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for denoising a garbage image based on computer vision according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a garbage image according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an edge image corresponding to a garbage image according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a connected domain with edge break points before performing a bridging operation according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a connected domain after performing a bridging operation according to an embodiment of the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following detailed description refers to the specific implementation, structure, characteristics and effects of the garbage image denoising processing method based on computer vision according to the invention, which is provided by the invention, with reference to the accompanying drawings and the preferred embodiment. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The embodiment of the invention provides a concrete implementation method of a garbage image denoising processing method based on computer vision, which is suitable for detecting a scene of garbage on the sea surface. The ocean surface image is detected and acquired through the unmanned aerial vehicle under the scene. The technical problem that the recognition of the ocean garbage can be influenced by the fact that the similarity between the ocean garbage and the ocean background is too high. The invention improves the similarity weight obtained by the original gray value of the pixel point. The defect that the area is affected by fuzzy treatment to subsequently identify and detect the garbage area during denoising due to higher similarity between the garbage area and the background area when the colors of the garbage area and the background sea wave are similar is avoided.
The following specifically describes a specific scheme of the garbage image denoising processing method based on computer vision provided by the invention with reference to the accompanying drawings.
Referring to fig. 1, a method flowchart of a method for denoising a garbage image based on computer vision according to an embodiment of the invention is shown, and the method includes the following steps:
step S100, obtaining a marine surface gray scale map containing garbage as a garbage image.
And acquiring ocean surface images containing garbage floating on the sea surface in the acquired images by using the unmanned aerial vehicle, and acquiring continuous frames of ocean surface images.
And carrying out weighted average graying treatment on each image in the acquired ocean surface images of the continuous frames to acquire ocean surface gray images corresponding to each ocean surface image, and taking the ocean surface gray images containing garbage as garbage images.
And finally, obtaining a marine surface image, finishing pretreatment such as graying on the marine surface image, obtaining a gray image, and obtaining a garbage image.
Step S200, identifying connected domains in the garbage image, and screening out the concerned connected domains; the edge points on the connected domain are regarded as the attention points.
For the ocean surface image, as the colors and shapes of the garbage floating on the sea surface are different, when the color of the garbage at a certain position is similar to that of the ocean background, namely the pixel value of the garbage at the position is similar to that of the ocean background, the similarity weight is larger, and therefore the noise removing effect of the garbage area is poor.
In order to achieve the purposes of enabling the similarity of the garbage area to be higher and enabling the similarity of the garbage area to be lower than the background, the similarity weight is adjusted according to the ocean wave characteristics and the garbage characteristics, and the initial similarity adjustment factor is obtained. Further, considering that water waves exist around the garbage under the actual situation, the initial similarity adjustment factor is improved according to the water wave characteristics, and the target similarity adjustment factor is obtained. And then the original similarity weight is adjusted according to the target similarity adjustment factor to obtain the improved similarity weight.
Therefore, the garbage image corresponding to the acquired ocean surface image is processed, and the process for obtaining the improved similarity weight value comprises the following steps: (1) Constructing a target similarity adjustment factor according to ocean wave characteristics and garbage characteristics; (2) And adjusting the original similarity weight according to the target similarity adjustment factor to obtain the improved similarity weight.
Because of the fluctuation of sea surface waves, for continuous frame garbage images, the change of sea wave areas is larger, the change of garbage areas is smaller than that of sea wave areas, further, the change difference of textures at sea waves in continuous frame images is larger, and the change difference of textures of garbage areas is smaller.
Meanwhile, as the colors of some garbage partial areas are too similar to those of the background ocean, partial edges are missed to be detected when edge detection is carried out, partial bending lines exist in the garbage areas, and meanwhile, water waves appear on the periphery of the garbage in an actual scene due to the fact that the garbage floats on the water surface, and the water waves are also the bending lines on the image. However, the water wave is caused by the floating of the garbage, the bending degree of the water wave is similar to that of the garbage, and the bending line existing in the garbage area is different from that of the garbage. And constructing and obtaining a similarity adjustment factor according to the analysis.
The invention improves the defect that the garbage area is blurred when the noise is removed when some garbage areas are similar to ocean sea wave colors according to the gray value and the similarity weight. And then, an improved similarity measurement standard is constructed according to the characteristics of the garbage area and the ocean waves, and the garbage area and the ocean waves are required to be analyzed.
Further, a Sobel operator is used for solving the gradient value and the gradient direction of each point in the image. Performing edge detection on the garbage image by using a Canny edge detection algorithm to obtain at least two connected domains, and specifically: and obtaining an edge image through edge detection. In order to ensure that the noise and the edge of the graph are detected, the threshold value to be set is required to be smaller, in the embodiment of the invention, the value of the low threshold value in the Canny edge detection algorithm is set to be 0.1, the value of the high threshold value is set to be 0.2, and in other embodiments, an implementer can adjust the value according to actual conditions. Referring to fig. 2 and 3, fig. 2 is a schematic diagram of a garbage image according to an embodiment of the invention, and fig. 3 is a schematic diagram of an edge image corresponding to fig. 2 of the garbage image.
Because of the existence of break points or edge break points in the edge image obtained by edge detection, morphological closing operation is performed on the image obtained by edge detection, and edge break points are subjected to bridging operation, so to speak, connection operation is performed on the edge break points, and the broken break points are connected together to form a connected domain. FIG. 4 is a schematic diagram of a connected domain with edge break points before performing a bridging operation; fig. 5 is a schematic diagram of the connected domain after performing the bridging operation. And recording all edge points in the obtained edge image after the bridging operation as attention points.
The connected domain obtained after the bridging operation is used as the connected domain in the edge image directly through edge detection. All edge points on the connected domain are regarded as the points of interest, and it is noted that the edge points on the connected domain formed after the bridging operation are also regarded as the points of interest.
And further screening out a connected domain of interest from the plurality of connected domains, specifically: a connected domain in which a pixel having a pixel value of 0 is present is defined as a focused connected domain.
Step S300, taking each frame of garbage image as a target image, and obtaining an initial similarity adjustment factor corresponding to the attention point according to the difference of image moment values corresponding to the connected domain where the attention point is located at the same position in the continuous frame of garbage images before the target image; for any pixel point on the target image, acquiring the pixel point on the concerned connected domain closest to the pixel point as a near-distance pixel point; and obtaining a target similarity adjustment factor according to the gradient direction difference of the pixel point and the corresponding near-distance pixel point, the distance between the pixel point and the corresponding near-distance pixel point and the initial similarity adjustment factor corresponding to the pixel point.
Because the closed communicating area is easy to distinguish from sea waves for the garbage edge. And for the inner texture edge of the garbage, the inner texture edge is further distinguished from the sea wave area.
But because of the randomness of the sea surface wave, there is a difference in the same position of the image under different frames for sea surface wave regions, and a smaller difference for garbage regions.
And acquiring all connected domains in the edge image.
Because the image moment has rotation invariance, the characteristic texture change of the image can be described, and the corresponding image moment value is calculated for all acquired connected domains. At this time, the gray value corresponding to the point on the connected domain in the garbage image is calculated, that is, the binary mask image of the obtained edge image is multiplied by the garbage image.
The sea surface has fluctuation, and the fluctuation degree of the sea wave is larger than that of sea surface garbage. I.e. for sea waves, the images of the sea waves in different frames differ at the same position and are large, while for the texture of the garbage itself, the images of the sea waves in different frames differ less. Therefore, further, according to the difference of the image moment values corresponding to the connected domain where the attention point is located at the same position in the continuous frame garbage images, an initial similarity adjustment factor corresponding to the attention point is obtained, specifically: calculating the absolute value of the difference value of the image moment values corresponding to the connected domain where the attention point is located at the same position in every two adjacent frames of garbage images before the target image; for any attention point, taking the average value of absolute values of differences of moment values of images in all two adjacent frames of garbage images as an initial difference value; taking the sum of the initial difference value and a preset first adjusting value as a first difference value; taking the normalized first difference value as an initial similarity adjustment factor. In the embodiment of the present invention, the value of the first adjustment value is preset to be 0.1, and in other embodiments, the practitioner can adjust the value according to the actual situation.
The calculation formula of the initial similarity adjustment factor is as follows:
Figure SMS_1
wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure SMS_3
an initial similarity adjustment factor;
Figure SMS_6
is shown in the first
Figure SMS_9
Image moment corresponding to the connected domain where the attention point j is located on the frame garbage image;
Figure SMS_2
the number of frames corresponding to the target image;
Figure SMS_7
is shown in the first
Figure SMS_10
Image moment corresponding to the connected domain where the attention point j is located on the frame garbage image;
Figure SMS_11
is the initial difference value;
Figure SMS_4
is the first difference value;
Figure SMS_5
is a normalization function; and 0.1 is a preset first regulating value. Mapping of the resulting data to a normalization function implementation
Figure SMS_8
For a purpose within the scope.
The first preset adjustment value is added to the calculation formula of the initial similarity adjustment factor to ensure that the initial similarity adjustment factor is provided for other points which do not belong to the attention point, and 0.1 is set to ensure that the background and the garbage area similarity adjustment factor are different due to the fact that the background points in the other points which do not belong to the attention point occupy a larger proportion. Therefore, the initial similarity adjustment factors of the pixels of other non-attention points except the attention point are preset first adjustment values, and the initial similarity adjustment factors corresponding to the attention point and the initial similarity adjustment factors corresponding to the non-attention point are collectively called as initial similarity adjustment factors of the pixels.
For sea wave regions, its variation on every frame of garbage imageTo a greater extent and for the garbage area to a lesser extent over each frame of garbage image. Initial variance value
Figure SMS_12
Representing the change condition of the image moment of the connected domain where each concern point is located under different frame garbage images, and when the initial difference value is
Figure SMS_13
When the value is larger, the change degree of the point under different frames of garbage images is larger, the possibility that the point is positioned in the sea wave area is higher, and the initial difference value is higher
Figure SMS_14
When the value is smaller, the change degree of the garbage image of the point under different frames is smaller, and the possibility that the point is in the garbage area is larger.
So far, the initial similarity adjustment factor is obtained according to the construction of the internal texture features of sea waves and garbage.
Further, considering that in an actual scene, garbage colors are different, water waves are generated on the periphery of the garbage due to sinking and floating on the water surface, meanwhile, the color similarity between partial regions of the garbage and the color of a background ocean region is higher, the gradient value of the edges of the partial regions is smaller, missed detection is caused when edge detection is used for processing according to the steps, the detected closed connected region of the garbage is not the real edge connected region of the garbage, partial missing occurs, and initial similarity adjustment factors corresponding to discrete points of the missed detection at the moment
Figure SMS_15
Smaller but belonging to the garbage area, which needs to be treated in an enlarged way.
At this time, the detection missing edge points of the garbage partial area caused by the color being similar to the background do not belong to the attention points; meanwhile, the peripheral water wave of the garbage is similar to the background color, and partial missed detection exists when the peripheral water wave of the garbage is subjected to edge detection, and the initial similarity adjustment factor corresponding to the peripheral water wave of the garbage is similar to the initial similarity adjustment factor of the missed detection edge point of the missed detection of the garbage area
Figure SMS_16
The same, smaller; for the difference of denoising degree between the water wave area and the garbage area, the similarity measurement standard is different, and the obtained initial similarity adjustment factor is needed
Figure SMS_17
Further adjustments are made.
The water wave is caused by the fact that the garbage floats on the water surface, the bending degree of the water wave is similar to that of the peripheral garbage edge, and the bending degree of the water wave is different from that of the peripheral garbage edge for the garbage partial area. It can also be said that the floating of the refuse causes slight wave motion of the sea wave, and thus water waves similar to the edges of the refuse are generated around the refuse.
Namely, for the pixel points on the water ripple, the gradient direction corresponding to the pixel points is similar to the gradient direction of the nearest garbage edge. According to the analysis, for any pixel point on the target image, the pixel point on the focus connected domain closest to the pixel point is acquired as a near-distance pixel point. Further, the obtained initial similarity adjustment factor
Figure SMS_18
Further adjusting to obtain a similarity adjustment factor, and obtaining a target similarity adjustment factor according to gradient direction difference of the pixel points and the corresponding close-range pixel points, the distance between the pixel points and the corresponding close-range pixel points and the initial similarity adjustment factor corresponding to the pixel points, wherein the target similarity adjustment factor is specifically: calculating the absolute value of the difference value of the gradient direction angles of the pixel points and the corresponding close-range pixel points; calculating the ratio of the absolute value of the difference value to the distance between the pixel point and the corresponding short-distance pixel point, and taking the ratio as an initial adjustment value; taking the normalized initial adjustment value as a similarity adjustment value; and taking the sum of the similarity adjustment value and the initial similarity adjustment factor corresponding to the pixel point as a target similarity adjustment factor corresponding to the pixel point. The gradient direction angle is the angle formed by the gradient direction and the horizontal line of 0 degree.
The calculation formula of the target similarity adjustment factor is as follows:
Figure SMS_19
wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure SMS_22
adjusting factors for target similarity;
Figure SMS_25
an initial similarity adjustment factor corresponding to the pixel point i;
Figure SMS_28
the gradient direction angle corresponding to the pixel point i;
Figure SMS_21
the gradient direction angle of the short-distance pixel point corresponding to the pixel point;
Figure SMS_24
representing the distance between the pixel point i and the corresponding close-range pixel point;
Figure SMS_27
representing normalization of data, mapping data to
Figure SMS_30
Within the range;
Figure SMS_20
to pair(s)
Figure SMS_23
Performing normalization operation;
Figure SMS_26
is an initial adjustment value;
Figure SMS_29
is a similarity adjustment value.
The similarity adjustment factor is the initial similarity adjustment factor plus an improvement factor, where the improvement factor is the normalized initial adjustment value. When the pixel isThe closer the point is to the garbage area, the larger the difference between the direction of the pixel point and the direction of the peripheral garbage is, which means that the point is a garbage area which is not detected, and the similarity weight of the pixel point is increased at the moment, so that
Figure SMS_31
The value increases.
Wherein, in the calculation formula of the target similarity adjustment factor, the distance between the pixel point and the corresponding close-range pixel point is set
Figure SMS_32
The purpose is to ensure that the pixels considered to improve the initial similarity adjustment factor are all pixels near the garbage area. The points around the garbage can be water waves caused by garbage floating, and can be edge points which are extremely close to the background and are not detected by edge detection.
Figure SMS_33
The larger the point is, the closer the point is to the garbage area, and the higher the necessity of adjusting the initial similarity adjustment factor for the point is.
Figure SMS_34
Representing the gradient direction difference of the pixel point i and the close-range pixel point on the close-up attention connected domain, when
Figure SMS_35
And when the gradient direction of the point is similar to that of the point on the peripheral concerned communicating domain, the gradient direction of the point on the peripheral water wave of the garbage is similar to that of the edge point of the garbage due to the sink and float of the garbage, and further the possibility that the point belongs to the point on the water wave is higher.
While when
Figure SMS_36
When the gradient direction difference between the pixel point and the near point on the surrounding attention communication domain is larger, the possibility that the point belongs to a discrete point which is not processed to the attention communication domain of garbage itself because the color is similar to the color of the background area in the garbage area is larger. The pixel point needs to be corresponding to the initial pixel pointAnd adjusting the similarity adjustment factor, and increasing the initial similarity adjustment factor.
According to the situation that the garbage partial area is likely to be highly similar to the background in reality and water waves are generated around the garbage, the obtained original similarity adjustment factor is further improved according to the characteristics of the water waves and the characteristics of the missed detection garbage, the similarity of the missed detection garbage area is ensured to be higher than that of the garbage area, and the final target similarity adjustment factor is obtained. The method ensures that the similarity of garbage and garbage areas is higher, and the similarity of garbage and background sea, spoondrift and water wave areas is lower.
So far, the similarity adjustment factor is constructed according to the ocean wave characteristics and the garbage characteristics.
Step S400, dividing the target image into a plurality of image blocks, obtaining the similarity weight of each pixel point in each image block, and taking the normalized target similarity adjustment factor as the weight of the similarity weight to obtain the weighted similarity weight.
And adjusting the original water wave similarity weight according to the target similarity adjustment factor to obtain an improved similarity weight.
Because the obtained adjustment factors of the similarity weights, namely the target similarity adjustment factors, are required to be combined with the target similarity adjustment factors to obtain improved similarity weights. And denoising the target image by using the improved similarity weight.
Dividing a target image into a plurality of image blocks, and obtaining the similarity weight of each pixel point in each image block. According to paper document Wang Yinjie, "image denoising algorithm based on non-local mean filtering", the method for calculating the weight w disclosed in the 16 th page of the paper of the institute of engineering and filling of the university of Harbin, 3 th month in 2019, takes the obtained weight w as the similarity weight in the embodiment of the invention.
As another embodiment of the present invention, the similarity between image blocks may also be reflected by the mean square error between image blocks, but since the smaller the mean square error is, the more similar between image blocks, the inverse of the mean square error is taken as the similarity weight of the image blocks.
Setting a large window larger than the size of an image block, setting a relatively smaller small window in the large window, setting any one image block A in the large window, simultaneously sliding another any image block B in the large window, continuously updating parameters in the image block B once in sliding, wherein the updated image block B has a similarity with the image block A, normalizing the similarity between all the image blocks B obtained by sliding in the large window and the image block A, and adding the normalized similarity of all the image blocks B to obtain a result value serving as a similarity weight of the image block A.
Each image block corresponds to a similarity weight, that is, the similarity weights corresponding to all the pixel points in each image block are the same value. And after obtaining the similarity weight of each pixel point in the image block, taking the normalized target similarity adjustment factor as the weight of the similarity weight to obtain the weighted similarity weight.
The calculation formula of the similarity weight value is as follows:
Figure SMS_37
wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure SMS_38
the similarity weight after being weighted;
Figure SMS_39
is the similarity weight;
Figure SMS_40
adjusting factors for target similarity;
Figure SMS_41
is a normalization function;
Figure SMS_42
and (5) adjusting the factor for the normalized target similarity.
Reconstructing the similarity weight according to the target similarity adjustment factors of the pixel points to obtain an improved similarity weight, namely obtaining the weighted similarity weight. The original similarity weight and the weighted similarity weight are in a direct proportion relation, and the target similarity adjustment factor corresponding to the pixel point only realizes the purpose of adjusting the similarity weight, so that when the similarity weight is larger, the corresponding weighted similarity weight is larger. The target similarity adjustment factor is in a direct proportion relation with the weighted similarity weight, and when the similarity between the pixel point and the garbage area is larger, the target similarity adjustment factor is larger, and the similarity weight weighted by the target similarity adjustment factor is also larger.
So far, the collected garbage gray level map is analyzed, a similarity adjustment factor is obtained according to sea wave and garbage characteristics, and the initial similarity weight is adjusted to obtain an improved similarity weight.
And S500, denoising the target image by using the weighted similarity weight to obtain a denoised garbage image.
By analyzing the characteristics of sea waves and garbage, the similarity weight obtained by the gray value of the pixel point is improved. The defect that the area is affected by fuzzy treatment to subsequently identify and detect the garbage area during denoising due to higher similarity between the garbage area and the background area when the colors of the garbage area and the background sea wave are similar is avoided.
And finally, denoising the image by using a non-local mean value filtering algorithm based on the weighted similarity weight to obtain a denoised garbage image. The method comprises the steps of obtaining a weighted similarity weight, processing a target image by using a non-local mean filtering algorithm according to the weighted similarity weight, and obtaining a denoised image. It should be noted that the calculation steps of the non-local mean filtering algorithm are known to those skilled in the art, and are not described herein in detail. Compared with other denoising algorithms, the non-local mean filtering algorithm considers local information, searches similar blocks for the global image, fully utilizes rich repeated redundant information of the image, has strong maintainability on image edge details, and selects non-local mean filtering to denoise the image. However, the similarity measurement in the non-local mean filtering is based on pixel values of pixel points, for the marine garbage image, the shapes and colors of garbage are different, when the garbage partial area is similar to the background sea, the similarity between the garbage partial area and the marine background area is too high, and the garbage area is subjected to fuzzy processing at the moment, so that the subsequent recognition and detection of the garbage area are affected. According to the invention, the original similarity weight is improved by combining the garbage features and the ocean spray features, so that the weighted similarity weight is obtained, the similarity weight of garbage and a garbage area is larger, and meanwhile, the similarity weight of garbage and a background ocean area is smaller, so that the degree of reservation of detail information of the garbage area during denoising is improved, and the accuracy of the subsequent garbage classification and recognition is improved.
The method realizes the denoising treatment of the image by using the improved similarity weight and a non-local mean filtering algorithm, and obtains the denoised garbage image after denoising. The improved similarity weight is a weighted similarity weight.
In summary, the present invention relates to the field of image processing technology. Firstly, acquiring a marine surface gray scale image containing garbage as a garbage image; identifying connected domains in the garbage image, and screening out concerned connected domains; taking edge points on the connected domain as attention points; taking each frame of garbage image as a target image, and obtaining an initial similarity adjustment factor corresponding to the attention point according to the difference of image moment values corresponding to the connected domain where the attention point is located at the same position in the continuous frames of garbage images before the target image; for any pixel point on the target image, acquiring the pixel point on the concerned connected domain closest to the pixel point as a near-distance pixel point; obtaining a target similarity adjustment factor according to gradient direction difference of the pixel point and the corresponding close-range pixel point, the distance between the pixel point and the corresponding close-range pixel point and the initial similarity adjustment factor corresponding to the pixel point; dividing a target image into a plurality of image blocks, obtaining similarity weight values of pixel points in each image block, taking a normalized target similarity adjustment factor as the weight of the similarity weight values, and obtaining weighted similarity weight values; and denoising the target image by using the weighted similarity weight to obtain a denoised garbage image. And improving the similarity weight value which is obtained originally only according to the gray value of the pixel point. The defect that the area is affected by fuzzy treatment to subsequently identify and detect the garbage area during denoising due to higher similarity between the garbage area and the background area when the colors of the garbage area and the background sea wave are similar is avoided.
It should be noted that: the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.

Claims (6)

1. The garbage image denoising processing method based on computer vision is characterized by comprising the following steps of:
acquiring a marine surface gray level map containing garbage as a garbage image;
identifying connected domains in the garbage image, and screening out concerned connected domains; taking edge points on the connected domain before screening as attention points;
taking each frame of garbage image as a target image, and obtaining an initial similarity adjustment factor corresponding to the attention point according to the difference of image moment values corresponding to the connected domain where the attention point is located at the same position in the continuous frames of garbage images before the target image; for any pixel point on the target image, acquiring the pixel point on the concerned connected domain closest to the pixel point as a near-distance pixel point; obtaining a target similarity adjustment factor according to gradient direction difference of the pixel point and the corresponding close-range pixel point, the distance between the pixel point and the corresponding close-range pixel point and the initial similarity adjustment factor corresponding to the pixel point;
dividing a target image into a plurality of image blocks, obtaining similarity weight values of pixel points in each image block, taking a normalized target similarity adjustment factor as the weight of the similarity weight values, and obtaining weighted similarity weight values;
denoising the target image by using the weighted similarity weight to obtain a denoised garbage image;
the acquisition method of the concerned connected domain comprises the following steps: taking a connected domain with pixel points with pixel values of 0 inside the connected domain as a concerned connected domain;
the method for obtaining the target similarity adjustment factor according to the gradient direction difference of the pixel point and the corresponding close-range pixel point, the distance between the pixel point and the corresponding close-range pixel point and the initial similarity adjustment factor corresponding to the pixel point comprises the following steps: calculating the absolute value of the difference value of the gradient direction angles of the pixel points and the corresponding close-range pixel points; calculating the ratio of the absolute value of the difference value to the distance between the pixel point and the corresponding short-distance pixel point, and taking the ratio as an initial adjustment value; taking the normalized initial adjustment value as a similarity adjustment value; and taking the sum of the similarity adjustment value and the initial similarity adjustment factor corresponding to the pixel point as a target similarity adjustment factor corresponding to the pixel point.
2. The method for denoising a garbage image based on computer vision according to claim 1, wherein the obtaining an initial similarity adjustment factor corresponding to a focus point according to a difference of image moment values corresponding to a connected domain where the focus point is located at the same position in a garbage image of a continuous frame before a target image comprises:
calculating the absolute value of the difference value of the image moment values corresponding to the connected domain where the attention point is located at the same position in every two adjacent frames of garbage images before the target image; for any attention point, taking the average value of absolute values of differences of moment values of images in all two adjacent frames of garbage images as an initial difference value; taking the sum of the initial difference value and a preset first adjusting value as a first difference value; taking the normalized first difference value as an initial similarity adjustment factor.
3. The method for denoising a garbage image based on computer vision according to claim 1, wherein the obtaining the initial similarity adjustment factor corresponding to the attention point according to the difference of the image moment values corresponding to the connected domain where the attention point is located at the same position in the garbage image of the continuous frame before the target image comprises:
and setting the initial similarity adjustment factors of other pixel points not focused on as a preset first adjustment value.
4. The method for denoising a garbage image based on computer vision according to claim 1, wherein the acquiring the pixel point on the connected domain of interest closest to the pixel point as the near-distance pixel point comprises:
and acquiring a concerned connected domain closest to the pixel point as a near connected domain, and taking the pixel point closest to the pixel point on the near connected domain as a near pixel point.
5. The method for denoising a garbage image based on computer vision according to claim 1, wherein denoising the target image using the weighted similarity weight to obtain a denoised garbage image comprises:
and denoising the target image by using a non-local mean filtering algorithm based on the weighted similarity weight to obtain a denoising garbage image.
6. The method for denoising a garbage image based on computer vision according to claim 1, wherein the identifying a connected domain in the garbage image comprises:
performing edge detection on the garbage image to obtain an edge image;
and carrying out morphological closing operation treatment on the edge image, and connecting edge break points in the edge image to obtain at least two connected domains.
CN202310347596.1A 2023-04-04 2023-04-04 Garbage image denoising processing method based on computer vision Active CN116152115B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310347596.1A CN116152115B (en) 2023-04-04 2023-04-04 Garbage image denoising processing method based on computer vision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310347596.1A CN116152115B (en) 2023-04-04 2023-04-04 Garbage image denoising processing method based on computer vision

Publications (2)

Publication Number Publication Date
CN116152115A CN116152115A (en) 2023-05-23
CN116152115B true CN116152115B (en) 2023-07-07

Family

ID=86350833

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310347596.1A Active CN116152115B (en) 2023-04-04 2023-04-04 Garbage image denoising processing method based on computer vision

Country Status (1)

Country Link
CN (1) CN116152115B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116645297B (en) * 2023-07-24 2023-11-07 济宁龙纳智能科技有限公司 AGV forklift control method based on artificial intelligence
CN117456395B (en) * 2023-12-26 2024-03-29 广州大学 Sea and land two-domain garbage recycling planning method based on machine vision

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9262810B1 (en) * 2014-09-03 2016-02-16 Mitsubishi Electric Research Laboratories, Inc. Image denoising using a library of functions
US9576346B2 (en) * 2015-03-24 2017-02-21 Intel Corporation Non-local means image denoising with an adaptive directional spatial filter
CN106204462A (en) * 2015-05-04 2016-12-07 南京邮电大学 Non-local mean denoising method based on image multiple features fusion
CN110852351A (en) * 2019-10-22 2020-02-28 苏州幻岛信息科技有限公司 Image-based garbage classification method and device, terminal equipment and storage medium
CN111259809B (en) * 2020-01-17 2021-08-17 五邑大学 Unmanned aerial vehicle coastline floating garbage inspection system based on DANet
CN111079724B (en) * 2020-03-25 2020-06-30 速度时空信息科技股份有限公司 Unmanned aerial vehicle-based sea floating garbage identification method
CN112381727B (en) * 2020-11-03 2023-12-15 中航航空电子有限公司 Image denoising method and device, computer equipment and storage medium
CN113065486A (en) * 2021-04-09 2021-07-02 中电科数字科技(集团)有限公司 Floater identification method, system, equipment and medium suitable for river channel
CN115147733B (en) * 2022-09-05 2022-11-25 山东东盛澜渔业有限公司 Artificial intelligence-based marine garbage recognition and recovery method
CN115456983A (en) * 2022-09-05 2022-12-09 中冶赛迪信息技术(重庆)有限公司 Water surface floater detection method, system, equipment and medium
CN115861359B (en) * 2022-12-16 2023-07-21 兰州交通大学 Self-adaptive segmentation and extraction method for water surface floating garbage image
CN115797813B (en) * 2023-02-10 2023-04-25 山东汇蓝环保科技有限公司 Water environment pollution detection method based on aerial image

Also Published As

Publication number Publication date
CN116152115A (en) 2023-05-23

Similar Documents

Publication Publication Date Title
CN111310558B (en) Intelligent pavement disease extraction method based on deep learning and image processing method
CN116152115B (en) Garbage image denoising processing method based on computer vision
CN110414411B (en) Sea surface ship candidate area detection method based on visual saliency
CN116168026B (en) Water quality detection method and system based on computer vision
CN108229342B (en) Automatic sea surface ship target detection method
CN113963042B (en) Metal part defect degree evaluation method based on image processing
CN109427055B (en) Remote sensing image sea surface ship detection method based on visual attention mechanism and information entropy
CN108830832A (en) A kind of plastic barrel surface defects detection algorithm based on machine vision
CN110766689A (en) Method and device for detecting article image defects based on convolutional neural network
CN111161222B (en) Printing roller defect detection method based on visual saliency
CN116110053B (en) Container surface information detection method based on image recognition
CN116309600B (en) Environment-friendly textile quality detection method based on image processing
CN113191979B (en) Non-local mean denoising method for partitioned SAR (synthetic aperture radar) image
CN109377450A (en) A kind of edge-protected denoising method
CN109829858B (en) Ship-borne radar image oil spill monitoring method based on local adaptive threshold
CN111476120A (en) Unmanned aerial vehicle intelligent ship water gauge identification method and device
CN114764801A (en) Weak and small ship target fusion detection method and device based on multi-vision significant features
Rahnemoonfar et al. Automatic seagrass disturbance pattern identification on sonar images
CN110348442B (en) Shipborne radar image offshore oil film identification method based on support vector machine
CN117094914A (en) Smart city road monitoring system based on computer vision
CN116934762B (en) System and method for detecting surface defects of lithium battery pole piece
CN109872358B (en) Marine oil film identification method for shipborne radar image based on active contour model
CN113053164A (en) Parking space identification method using look-around image
CN109993744B (en) Infrared target detection method under offshore backlight environment
Wu et al. Research on crack detection algorithm of asphalt pavement

Legal Events

Date Code Title Description
PB01 Publication
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