CN116863323A - Visual detection method and system for pollution of water source for fishery culture - Google Patents

Visual detection method and system for pollution of water source for fishery culture Download PDF

Info

Publication number
CN116863323A
CN116863323A CN202311126704.9A CN202311126704A CN116863323A CN 116863323 A CN116863323 A CN 116863323A CN 202311126704 A CN202311126704 A CN 202311126704A CN 116863323 A CN116863323 A CN 116863323A
Authority
CN
China
Prior art keywords
water source
image
pollution
duckweed
edge
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.)
Granted
Application number
CN202311126704.9A
Other languages
Chinese (zh)
Other versions
CN116863323B (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.)
Jining Xinhuisheng Aquaculture Professional Cooperative
Original Assignee
Jining Xinhuisheng Aquaculture Professional Cooperative
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 Jining Xinhuisheng Aquaculture Professional Cooperative filed Critical Jining Xinhuisheng Aquaculture Professional Cooperative
Priority to CN202311126704.9A priority Critical patent/CN116863323B/en
Publication of CN116863323A publication Critical patent/CN116863323A/en
Application granted granted Critical
Publication of CN116863323B publication Critical patent/CN116863323B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/05Underwater scenes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • G06V10/267Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/30Noise filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/54Extraction of image or video features relating to texture
    • 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/10024Color image
    • 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
    • Y02A20/00Water conservation; Efficient water supply; Efficient water use
    • Y02A20/20Controlling water pollution; Waste water treatment

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a visual detection method and a visual detection system for pollution of a water source for fishery cultivation, wherein the visual detection method for pollution of the water source for fishery cultivation comprises the following steps: shooting a top view of a water source of animal husbandry through shooting equipment, and preprocessing RGB images of the water source; after the preprocessing is carried out on target characteristics in the animal husbandry water source, carrying out image enhancement processing on the obtained water source gray level image by using an adaptive histogram equalization algorithm, wherein the target characteristics comprise: duckweed pollution distribution and duckweed density; obtaining a binary image of the duckweed region by using a threshold segmentation algorithm on the enhanced water source gray level image; and processing the binary image of the duckweed area through a preset algorithm to determine the pollution degree of the water source of the animal husbandry. According to the visual detection method for the pollution of the water source of the fishery culture, the accuracy of water source pollution detection is improved.

Description

Visual detection method and system for pollution of water source for fishery culture
Technical Field
The invention relates to the technical field of image processing, in particular to a visual detection method and a visual detection system for pollution of water sources in fishery cultivation.
Background
Animal husbandry is an important component of human agriculture, and is one of the important development stages of human agriculture civilization; with population growth and economic development, the demand of animal husbandry is also increasing; water is an indispensable important resource in animal husbandry production; the source water has important influence on the production efficiency, animal health, product quality and the like of the animal husbandry; if the water quality of the water source is poor, animal health problems can be caused, the production efficiency and the product quality can be influenced, and even epidemic diseases and other problems can be caused; therefore, detection of water source pollution in animal husbandry is very important, wherein the conventional physical detection method is easy to be interfered by environment and has large limitation, in the prior art, the water source pollution can be detected by a visual detection method, but in the prior art, the quality of an image and the duckweed distribution information in the image are ignored, so that the detection reference is low.
Disclosure of Invention
The present invention aims to at least solve the technical problems existing in the prior art. Therefore, an object of the present invention is to provide a visual inspection method for water source pollution in fishery cultivation, which is beneficial to improving the precision of water source pollution inspection.
The invention also provides a visual detection system for pollution of the water source of the fishery culture.
The visual detection method for pollution of the water source of the fishery culture, provided by the embodiment of the invention, comprises the following steps of:
shooting a top view of an animal husbandry water source through shooting equipment, and preprocessing an RGB image of the water source, wherein the preprocessing comprises: converting the photographed RGB image of the water source into a gray scale image by using a maximum value method, and reducing noise of the gray scale image by using Gaussian filtering;
after the preprocessing is carried out on target characteristics in the animal husbandry water source, carrying out image enhancement processing on the obtained water source gray level image by using an adaptive histogram equalization algorithm, wherein the target characteristics comprise: duckweed pollution distribution and duckweed density; obtaining a binary image of the duckweed region by using a threshold segmentation algorithm on the enhanced water source gray level image;
and processing the binary image of the duckweed area through a preset algorithm to determine the pollution degree of the water source of the animal husbandry.
According to the visual detection method for the pollution of the water source of the fishery culture, the accuracy of water source pollution detection is improved.
According to the visual detection method for pollution of the water source for the fishery culture, according to one embodiment of the invention, adaptive window division is carried out according to the growth condition of duckweed in the water source for the animal husbandry, and pixels are usedFor this, the adaptive window partitioning is processed once by the center, which includes edge detection of the duckweed leaves using the Canny edge detection algorithm.
According to the visual detection method for pollution of the water source of the fishery culture, the pixel points are detectedAnd performing secondary processing on texture features in the neighborhood window, wherein the secondary processing comprises the steps of using a Sobel operator to process pixel points in the neighborhood window into gradient directions and gradient magnitudes in the edge detection, wherein the gradient directions are used for representing directions of textures in the neighborhood window, and the gradient magnitudes are used for representing change information of the textures in the neighborhood window.
According to the visual detection method for pollution of the water source of the fishery culture, texture complexity in the neighborhood window is determined through the joint entropy of the gradient direction and the gradient amplitude of the pixel points in the neighborhood window, and the calculation formula is as follows:
wherein For the value of gradient direction, +.>Then it is the maximum value of the value; />For the value of the gradient amplitude +.>Is pixel dot +.>Gradient amplitude maximum in the neighborhood window; />Is a directional amplitude matrix->The gradient direction and amplitude of the middle pixel point are +.>Is a probability of (2).
According to the visual detection method for pollution of the water source of the fishery culture, according to the edge detection result, edge points are processed for three times, wherein the three times of processing comprise the steps of constructing a neighborhood window by taking the edge points as the center, and sequentially encoding the rest pixel points of the neighborhood window clockwise, and the length of the encoding sequence is used for representing the edge length; wherein the longest branch sequence is denoted as,/>An edge line representing the intersection of the duckweed distribution region with the water source surface.
According to one embodiment of the invention, a visual detection method for pollution of a water source for fishery culture is provided, and a branching sequence is dividedCalculating a differential sequence, said differential sequence being denoted +.>The differential sequence record is used for representing the difference degree between adjacent codes in the sequence; the median absolute deviation of the differential sequence +.>The calculation formula is as follows:
wherein Is a differential sequence->Element length of->For the differential value in the differential sequence, +.>Is the median of the differential sequence, +.>Then the difference between each element in the differential sequence and the median.
According to one embodiment of the invention, the visual detection method for pollution of the water source of the fishery culture is implemented when the differential sequence is adoptedThe element length is +.>When branching sequence->The element length is->Edge smooth continuity index +.>The calculation formula of (2) is as follows:
wherein For edge points->Total number of elements at longest edge line, +.>The longest edge line corresponds to the median absolute deviation of the differential sequence.
According to the visual detection method for pollution of the water source of the fishery culture, pixel points are detectedFour times of processing are carried out on the continuity index of the edge texture constructed by the neighborhood window, and the continuity index is marked as +.>The calculation formula of the four times of processing is as follows:
wherein Dividing the number of windows into equal window number in the neighborhood window, +.>Normalized values of edge pixel points in the equally divided window; />To divide the texture complexity in the window +.>Is equal window +.>Is a smooth continuous index of the edges of (a).
According to the visual detection method for pollution of the water source for the fishery culture, according to the edge texture continuity index corresponding to the pixel points in the water source gray level image, the water source gray level image is converted into an edge texture continuous image, super-pixel segmentation is carried out on the edge texture continuous image, and a segmented edge texture continuous image is obtained; enhancing the segmented edge texture continuous graph by using histogram equalization to obtain an enhanced gray level image; threshold segmentation is carried out on the enhanced gray level image by using an Otsu algorithm, so that a binary image of a water source gray level image is obtained; processing the binary image of the water source gray level map through the preset algorithm, wherein the formula of the preset algorithm is as follows:
wherein ,representing the dark area pixel area in the binary image, < >>Representing the total area of the image>Representing the coverage of the duckweed in the area of the water area photographed by the photographing device, wherein +.>The empirical value of (2) was set to 40%.
In summary, according to the method of the first aspect of the present invention, by improving the image quality, and then extracting the duckweed pollution distribution condition and the duckweed density as the target features, an accurate binary image of the duckweed region is further obtained, and by accurately dividing the duckweed region, effective evaluation of duckweed information is achieved, which is beneficial to improving the accuracy of water source pollution detection.
A visual inspection system for pollution of a water source for fishery farming according to a second aspect of the present invention comprises:
the system comprises an acquisition module, a preprocessing module and a display module, wherein the acquisition module is used for shooting a top view of a water source of animal husbandry through shooting equipment and preprocessing an RGB image of the water source, and the preprocessing comprises the following steps: converting the photographed RGB image of the water source into a gray scale image by using a maximum value method, and reducing noise of the gray scale image by using Gaussian filtering;
the analysis module is used for carrying out image enhancement processing on the obtained water source gray level image by using an adaptive histogram equalization algorithm after carrying out the pretreatment on target characteristics in the animal husbandry water source, and the target characteristics comprise: duckweed pollution distribution and duckweed density; obtaining a binary image of the duckweed region by using a threshold segmentation algorithm on the enhanced water source gray level image;
and the judging module is used for processing the binary image of the duckweed area through a preset algorithm and determining the pollution degree of the stock raising water source.
The system according to the second aspect of the present invention has the same advantages as the above-described method over the prior art and is not described in detail here.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
The foregoing and/or additional aspects and advantages of the invention will become apparent and may be better understood from the following description of embodiments taken in conjunction with the accompanying drawings in which:
FIG. 1 is a flow chart of a visual inspection method for pollution of a water source for fishery farming according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a visual inspection system for pollution of a water source for fishery farming according to an embodiment of the present invention;
FIG. 3 is a top view of an unmanned aerial vehicle capturing a water source with an onset of duckweed in accordance with an embodiment of the present invention;
FIG. 4 is a schematic diagram of adaptive window partitioning according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a neighborhood window according to an embodiment of the present invention;
FIG. 6 is a schematic illustration of leaf reflection near a water source in accordance with an embodiment of the invention;
FIG. 7 is a binary image diagram according to an embodiment of the present invention;
FIG. 8 is a binary image diagram according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of edge point analysis according to an embodiment of the invention;
FIG. 10 is a schematic diagram of an edge point neighborhood window according to an embodiment of the present invention;
fig. 11 is a schematic diagram of edge point encoding according to an embodiment of the present invention.
Reference numerals:
10-a detection system; 101-an acquisition module; 102-an analysis module; 103-decision module.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative only and are not to be construed as limiting the invention.
In the present invention, unless explicitly specified and limited otherwise, the terms "mounted," "connected," "secured," and the like are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; either directly or indirectly, through intermediaries, or both, may be in communication with each other or in interaction with each other, unless expressly defined otherwise. The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art according to the specific circumstances.
A visual inspection method and system for pollution of a water source for fishery farming according to an embodiment of the present invention will be described with reference to fig. 1 to 11. Aiming at the problems that in the prior art mentioned in the background technology center, in the detection of water source pollution in animal husbandry, a physical detection method is easy to be interfered by environment and has larger limitation, the invention provides a visual detection method for water source pollution in fishery cultivation, which is beneficial to improving the precision of water source pollution detection.
Specifically, fig. 1 provides a visual detection method for pollution of a water source for fishery cultivation according to an embodiment of the first aspect of the present invention, which includes the following steps:
step 1, shooting a top view of a water source of animal husbandry through shooting equipment, and preprocessing an RGB image of the water source, wherein the preprocessing comprises the following steps: the photographed RGB image of the water source is converted into a gray scale image using a maximum method, and the gray scale image is noise-reduced using Gaussian filtering.
In a specific embodiment, the photographing device may be a drone device; further, for the water source of the animal husbandry, due to the fact that the water source is polluted to cause the disease of livestock infection due to the fact that factors such as livestock manure eutrophication, water source siltation and the like possibly occur in industry specificity, the monitoring of the growth condition of the duckweed on the surface of the water source is very important for detecting the pollution of the water source of the animal husbandry. Further, a top view of the animal husbandry water source 4k resolution may be photographed using a professional aerial unmanned aerial vehicle device.
Step 2, preprocessing target characteristics in the water source of animal husbandry, and performing image enhancement processing on the obtained water source gray level image by using a self-adaptive histogram equalization algorithm, wherein the target characteristics comprise: duckweed pollution distribution and duckweed density; and (3) obtaining a binary image of the duckweed region by using a threshold segmentation algorithm on the enhanced water source gray level image.
And step 3, processing the binary image of the duckweed area through a preset algorithm, and determining the pollution degree of the water source in the animal husbandry.
According to the visual detection method for the pollution of the water source of the fishery culture, the accuracy of water source pollution detection is improved.
Further, as shown in fig. 3, an image of the onset of duckweed in the water source photographed by the unmanned aerial vehicle, in which duckweed is almost spread in the whole water area, is an extreme case, the duckweed growth periods of different strains are different in practice and grow in dot or flake form, if a proper amount of duckweed exists on the water surface to have a purifying effect on the water source, the water source is polluted only when the onset of duckweed occurs, so that the content of duckweed in the water can be periodically detected for water source pollution detection.
Furthermore, the duckweed growing conditions of different growing areas are different, when the pollution detection is realized by carrying out image analysis on the duckweed, compared with the completely-generated duckweed, the incompletely-grown duckweed is lighter in color and loose in distribution and not in a piece, so that the problems of inaccurate result, low precision and the like can occur when the water source gray image is directly detected, and the subsequent analysis detection is realized after the noise-reduced water source gray image is subjected to image enhancement; a histogram equalization algorithm is selected here to enhance the animal husbandry water source image. When the image is enhanced by the conventional algorithm, the main body is the whole image, and further, if the whole image is enhanced for the duckweed water sources containing different distribution conditions of different growth states, the enhancement effect is not obvious, so that the gray level image of the water source is enhanced by adopting the adaptive histogram equalization algorithm, and the adaptive window division is performed according to the growth conditions of the duckweed in the water source, so that the local enhancement is realized to achieve a better pollution detection result.
According to the visual detection method for pollution of the water source for the fishery culture, according to one embodiment of the invention, adaptive window division is carried out according to the growth condition of duckweed in the water source for the animal husbandry, and pixels are usedThe adaptive window partitioning is processed once for the center, including edge detection of the duckweed leaves using a Canny edge detection algorithm.
Further, as shown in fig. 4, the adaptive window division is analyzed, the duckweed can be gathered in a sheet shape during growth and has a large number of leaves covered, the adaptive window area can be divided according to the characteristic, and the image enhancement can be realized for different window areas. In single pixel pointConstruct its 25 x 25 neighborhood window for the center and divide the neighborhood window 16 equally.
Further, as shown in fig. 4, after division, there are 16 small windows equally divided by a single pixel, and the neighborhood of the windows is enough to analyze the features near the pixel, taking the above-mentioned duckweed-generated dense region as an example, assuming the pixelIn this area, there will be a number of staggered and overlapping duckweed leaves around it, with a number of leaf edges around the pixel and a rich texture. Firstly, detecting the edge of a blade of a water source gray level image by using a Canny edge detection algorithm, and recording pixel points +.>First->The number of edge pixels in each halving window is +.>And the total number of pixels in the pixel neighborhood window is +.>The normalization of the number of the pixel points at the inner edge of each small window is realized through the ratio of the two, namely +.>The method reflects the edge condition of the blade near the pixel point, and when the more and more the blade coverage in the halving window are staggered, the larger the normalized value of the number of the edge pixel points is.
According to the visual detection method for pollution of the water source of the fishery culture, pixel points are detectedAnd performing secondary processing on texture features in the neighborhood window, wherein the secondary processing comprises the steps of using a Sobel operator to process pixel points in the neighborhood window into gradient directions and gradient magnitudes in edge detection, wherein the gradient directions are used for representing directions of textures in the neighborhood window, and the gradient magnitudes are used for representing change information of the textures in the neighborhood window.
Further, as shown in fig. 5, the equally divided window of the pixel neighborhood window can be primarily judged based on the gradient direction and the gradient amplitudeThe complexity of the internal texture, wherein the gradient direction determined by the Sobel operator is only 8 main directions, namely 0 °, 45 °, 90 °, 135 °, 180 °, 225 °, 270 °, 315 °, and the window +.>The gradient direction in->Gradient amplitude is/>Then every pixel in the neighborhood window has a corresponding +.>Constructing an aliquoting window based on the two elements>Is a directional amplitude matrix>
Further, the abscissa is the pixel pointEqually dividing window of neighborhood window->The non-repeated gradient direction of the inner pixel point, the ordinate is the non-repeated gradient amplitude of the pixel point, and the numerical value in the table is +.>The number of the corresponding pixels is +.>For example, it represents gradient direction and magnitude in the neighborhood window +.>The number of all the corresponding pixels is +.>If the matrix is->The total amount of the Chinese herbal medicines is->Then +.>The probability of occurrence is->Is marked asCorresponding will->The probability is generally expressed as +.>
According to the visual detection method for pollution of the water source of the fishery culture, texture complexity in a neighborhood window is determined through the joint entropy of the gradient direction and the gradient amplitude of the pixel points in the neighborhood window, and the calculation formula is as follows:
wherein For the value of gradient direction, +.>Then it is the maximum value of the value; />For the value of the gradient amplitude +.>Is pixel dot +.>Gradient amplitude maximum in the neighborhood window; />Is a directional amplitude matrix->Middle pixelThe direction and amplitude of the dot gradient are +.>The more confusing the values are, the more entropy is associated within the neighborhood window>The larger the texture complexity within the window is.
Further, as shown in fig. 6, for the pixel pointEqually dividing window of neighborhood window->Combined entropy calculation of gradient direction and amplitude was performed, denoted +.>. Further, the calculation can determine the distribution of duckweed, but when the water is in the form of a ghost, especially a leaf ghost near the water source (as shown by the ghost of the identified area in fig. 6), the ghost in the water source is used as the duckweed growing area for unified calculation processing in index calculation, so that the duckweed in the water still needs to be distinguished from the ghost in the water source.
Further, as shown in fig. 7 and 8, the gray level image of the water source is subjected to threshold segmentation to obtain binary images under different thresholds, specifically, the large-area black part in fig. 7 is the water surface part of the water source which is not covered by the duckweed, and the water surface edge is also the edge where the duckweed is intensively distributed, which has certain continuity. Further, as shown in fig. 8, the dark portions that are scattered are actually the reflection of leaves or other objects in the water surface, and the edge staggering is not smooth and the continuity is low. Further, whether the edge is a duckweed distribution region is determined by evaluating the edge continuity, where an edge smooth continuity index is designed, and the following construction process is performed.
According to the visual detection method for pollution of the water source of the fishery culture, according to the edge detection result, edge points are treated for three timesConstructing a neighborhood window by taking an edge point as a center, and sequentially encoding the rest pixel points of the neighborhood window clockwise, wherein the length of a coding sequence is used for representing the edge length; wherein the longest branch sequence is denoted as,/>An edge line representing the intersection of the duckweed distribution region with the water source surface.
Further, as shown in fig. 9, the edge detection result of the water source gray level chart is used as a basis, edge points are analyzed, a 3×3 neighborhood window is constructed by taking the edge points as the center, and the other 8 pixel points in the neighborhood window are sequentially coded clockwise to be 1-8.
Further, as shown in fig. 10, there are other edge points in the neighborhood window of the edge point, the codes of the edge point are recorded, meanwhile, the 3×3 neighborhood window is reconstructed by taking the edge point as the center to find the edge point in the neighborhood, and the like until no other edge point exists in the neighborhood window of the last edge point. Further, when the neighbor edge points are recorded, a plurality of other edge points may appear in a single edge point neighborhood due to duckweed or water reflection blending, and at this time, the codes of the other edge points are recorded clockwise, and finally, each edge point code is recorded in a tree sequence.
Further, as shown in FIG. 10, with edge pointsThe first neighborhood window is the center, two edge points exist in the neighborhood, the codes are 1 and 3 respectively, then the neighborhood window is reconstructed by the edge points coded as 1, and the adjacent edge points are divided in the neighborhood as shown in the upper right corner window>That is, there is another edge point encoded as "8" in addition to the edge point encoded as "5", wherein the encoding sequence is "18"; likewise, for edge points->The edge point coded as '3' in the neighborhood, the edge point coded as '4' also exists in the neighborhood, the coding sequence of the branch can be marked as '34', and when no other edge points exist in the neighborhood window of the edge points corresponding to the two branches, the sequence is ended.
Further, as shown in FIG. 11, for edge pointsIs encoded as a tree sequence. Further, the above tree sequence is constructed for each non-repeated edge point, and an edge smooth continuous index is constructed by analyzing the sequence. The codes in the edge point neighborhood window have certain directivity, and the length of the code sequence represents the edge length. It should be noted that the longest edge may be an edge line where the duckweed distribution area blends with the water source surface.
Further, edge pointsThe longest branching sequence +.>The difference between adjacent codes represents the azimuth change of the adjacent edge points in the edge line, when the edge points belong to the water reflection edge, the codes in the branch sequence have larger difference degree, and when the edge points are positioned at the interface edge of the water source surface and the duckweed, the codes in the sequence are relatively gentle.
According to one embodiment of the invention, a visual detection method for pollution of a water source for fishery culture is provided, and a branching sequence is dividedCalculating a differential sequence, which is marked +.>The differential sequence record is used for representing the difference degree between adjacent codes in the sequence; median absolute deviation of differential sequence +.>The calculation formula is as follows:
wherein Is a differential sequence->Element length of->For the differential value in the differential sequence, +.>Is the median of the differential sequence, +.>Then the difference between each element in the differential sequence and the median. Further, the sum of the differences between each element and the median is averaged to obtain the median absolute deviation +.>The smaller the value, the more concentrated the differential degree, the smoother the sequence, i.e. the flatter the trend of the edge line corresponding to the differential sequence.
According to one embodiment of the invention, the visual detection method for pollution of the water source of the fishery culture is implemented when the differential sequence is adoptedThe element length is +.>When branching sequence->The element length is->Edge smooth continuity index +.>The calculation formula of (2) is as follows:
wherein For edge points->The total number of elements of the longest edge line, the larger the value of the total number is, the more edge elements are, the more continuous the edges are,/>The greater the value of (2); />The longer the value of the median absolute deviation of the differential sequence corresponding to the longest edge line is, the smoother the differential value in the sequence is, the flatter the change trend of the edge line corresponding to the differential sequence is, the edge smooth continuous index>The larger the more likely it is that the duckweed edge line will be.
Further, for the pixel pointEqually dividing window of neighborhood window->With normalized number of edge points->Texture complexity->. Advancing oneStep by step, peer-to-peer windowing>The edge points in the inner are calculated to have their edge smooth continuous index +.>Then, the edge smooth continuous indexes of each edge point in the aliquoting window are added to obtain an aliquoting window +.>Is marked as +.>. Further, let normalized edge point number be the per aliquoting window +.>Is a weight of (a).
According to the visual detection method for pollution of the water source of the fishery culture, pixel points are detectedFour times of processing are carried out on the continuity index of the edge texture constructed by the neighborhood window, and the continuity index is marked as +.>The calculation formula of the four treatments is as follows:
wherein Dividing the number of windows into equal window numbers in the neighborhood window, namely a specific value 16; />When the normalized value of the pixel points at the edge in the aliquoting window is larger, the more the number of the edges in the aliquoting window is, the more the duckweed distribution coverage is, the more the interleaving is complicated; />For equally dividing the complexity of the texture in the window, the larger the value is, the more complex the texture in the equally dividing window is, and the greater the duckweed density is; />Is equal window +.>The larger the value of the edge smooth continuity index, which indicates that the better the continuity of the edge points in the window, the higher the smoothness, and the more likely the edge line of the duckweed distribution.
According to the visual detection method for pollution of the water source for the fishery culture, according to the edge texture continuity index corresponding to the pixel points in the water source gray level image, the water source gray level image is converted into an edge texture continuous image, and super-pixel segmentation is carried out on the edge texture continuous image to obtain a segmented edge texture continuous image; enhancing the segmented edge texture continuous graph by using histogram equalization to obtain an enhanced gray level image; threshold segmentation is carried out on the enhanced gray level image by using an Otsu algorithm, so that a binary image of a water source gray level image is obtained; the binary image of the water source gray level map is processed through a preset algorithm, and the formula of the preset algorithm is as follows:
wherein ,representing the dark area pixel area in the binary image, < >>Representing the total area of the image>Indicating the coverage rate of duckweed in the area of the water photographed by the photographing device. The method for determining the pollution degree of the water source of the animal husbandry according to the coverage rate of the green screen comprises the following steps: when duckweed is coveredThe empirical value of the cover rate is not less than 40%, so that the water source can be considered to have duckweed outbreak phenomenon, and the water source is polluted; when the coverage rate of the duckweed is below 40%, the duckweed is in a safe range, and has the effect of purifying the water source.
In summary, according to the method of the first aspect of the present invention, an unmanned aerial vehicle is used to capture a top view of a water source, texture complexity is calculated according to the duckweed distribution characteristics in the water source, an edge smooth continuous index is constructed according to the duckweed distribution and water reflection distinguishing characteristics, and an edge texture continuous index is jointly designed to represent the density, distribution state and distinction degree between duckweed and reflection in the water surface in the area where the pixel points are located, the gray level image of the water source is converted into an edge texture continuous image, super-pixel segmentation is performed, and the super-pixel block is used as an adaptive irregular window, so that an adaptive histogram equalization algorithm is realized, and the accuracy of water source pollution detection is improved.
A visual inspection system 10 for pollution of a source of aquaculture water according to a second aspect of the invention, as shown in fig. 2, includes:
the acquisition module 101, further, the acquisition module 101 is used for shooting a top view of the water source of the animal husbandry through shooting equipment, and preprocessing the RGB image of the water source, wherein the preprocessing comprises: converting the photographed RGB image of the water source into a gray scale image by using a maximum value method, and reducing noise of the gray scale image by using Gaussian filtering;
the analysis module 102, further, the analysis module 102 is configured to perform image enhancement processing on the obtained water source gray level image by using an adaptive histogram equalization algorithm after preprocessing the target features in the animal husbandry water source, where the target features include: duckweed pollution distribution and duckweed density; a threshold segmentation algorithm is used for the enhanced water source gray level image to obtain a binary image of the duckweed region;
the judging module 103 is further configured to process the binary image of the duckweed area by a preset algorithm, so as to determine the pollution level of the water source in animal husbandry.
In summary, a visual inspection system 10 for water source pollution in fishery farming according to the second aspect of the present invention is advantageous for improving the accuracy of water source pollution detection.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or N embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings are merely for convenience in describing the present invention and simplifying the description, and do not indicate or imply that the device or element being referred to must have a specific orientation, be configured and operated in a specific orientation, and therefore should not be construed as limiting the present invention.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "N" means at least two, for example, two, three, etc., unless specifically defined otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more N executable instructions for implementing specific logical functions or steps of the process, and further implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present invention.
Logic and/or steps represented in the flowcharts or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or N wires, a portable computer cartridge (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the N steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. As with the other embodiments, if implemented in hardware, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
Those of ordinary skill in the art will appreciate that all or a portion of the steps carried out in the method of the above-described embodiments may be implemented by a program to instruct related hardware, where the program may be stored in a computer readable storage medium, and where the program, when executed, includes one or a combination of the steps of the method embodiments.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing module, or each unit may exist alone physically, or two or more units may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules may also be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product.
The above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, or the like. While embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the invention, and that variations, modifications, alternatives and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the invention.

Claims (10)

1. The visual detection method for the pollution of the water source of the fishery cultivation is characterized by comprising the following steps of:
shooting a top view of an animal husbandry water source through shooting equipment, and preprocessing an RGB image of the water source, wherein the preprocessing comprises: converting the photographed RGB image of the water source into a gray scale image by using a maximum value method, and reducing noise of the gray scale image by using Gaussian filtering;
after the preprocessing is carried out on target characteristics in the animal husbandry water source, carrying out image enhancement processing on the obtained water source gray level image by using an adaptive histogram equalization algorithm, wherein the target characteristics comprise: duckweed pollution distribution and duckweed density; obtaining a binary image of the duckweed region by using a threshold segmentation algorithm on the enhanced water source gray level image;
and processing the binary image of the duckweed area through a preset algorithm to obtain the duckweed coverage rate, and determining the pollution degree of the water source of the animal husbandry according to the green screen coverage rate.
2. A visual inspection method for pollution of a water source for fishery according to claim 1, wherein adaptive window division is performed according to the growth condition of duckweed in the water source for animal husbandry, so as to use pixelsThe adaptive window partitioning is processed once for centering, including edge detection of duckweed leaves using a Canny edge detection algorithm.
3. A visual inspection method for pollution of aquaculture water according to claim 2, wherein said pixel points areAnd performing secondary processing on texture features in the neighborhood window, wherein the secondary processing comprises the step of using a Sobel operator to process pixel points in the neighborhood window into gradient directions and gradient amplitudes in the edge detection.
4. A visual inspection method for pollution of aquaculture water according to claim 3, wherein texture complexity in said neighborhood window is determined by the joint entropy of the gradient direction and the gradient amplitude of pixels in said neighborhood window, and the calculation formula is as follows:
wherein For the value of gradient direction, +.>Then it is the maximum value of the value; />For the value of the gradient amplitude +.>Is pixel dot +.>Gradient amplitude maximum in the neighborhood window; />Is a directional amplitude matrix->The gradient direction and amplitude of the middle pixel point are +.>Is a probability of (2).
5. The visual inspection method for pollution of aquaculture water according to claim 4, wherein edge points are processed three times according to the result of the edge inspection, the three times processing includes constructing a neighborhood window with the edge points as the center, and encoding the remaining pixels of the neighborhood window clockwise in sequence, wherein the length of the encoding sequence is used for representing edge lengthA degree; wherein the longest branch sequence is denoted as,/>An edge line representing the intersection of the duckweed distribution region with the water source surface.
6. A visual inspection method for pollution of aquaculture water according to claim 5, characterized by a branching sequenceCalculating a differential sequence, said differential sequence being denoted +.>The differential sequence record is used for representing the difference degree between adjacent codes in the sequence; the median absolute deviation of the differential sequence +.>The calculation formula is as follows:
wherein Is a differential sequence->Element length of->For the differential value in the differential sequence, +.>Is the median of the differential sequence, +.>Then the difference between each element in the differential sequence and the median.
7. A visual inspection method for pollution of aquaculture water according to claim 6, wherein the sequence of differences isThe element length is +.>When branching sequence->The element length is->Edge smooth continuity index +.>The calculation formula of (2) is as follows:
wherein For edge points->Total number of elements at longest edge line, +.>The longest edge line corresponds to the median absolute deviation of the differential sequence.
8. A method for producing a water source for fishery farming according to claim 7A visual detection method of dyeing is characterized in that the method is applied to pixel pointsFour times of processing are carried out on the continuity index of the edge texture constructed by the neighborhood window, and the continuity index is marked as +.>The calculation formula of the four times of processing is as follows:
wherein Dividing the number of windows into equal window number in the neighborhood window, +.>Normalized values of edge pixel points in the equally divided window;to divide the texture complexity in the window +.>Is equal window +.>Is a smooth continuous index of the edges of (a).
9. The visual inspection method for water source pollution in fishery culture according to claim 8, wherein according to an edge texture continuity index corresponding to pixel points in a water source gray level image, converting the water source gray level image into an edge texture continuity image, and performing super-pixel segmentation on the edge texture continuity image to obtain a segmented edge texture continuity image; enhancing the segmented edge texture continuous graph by using histogram equalization to obtain an enhanced gray level image; threshold segmentation is carried out on the enhanced gray level image by using an Otsu algorithm, so that a binary image of a water source gray level image is obtained; processing the binary image of the water source gray level map through the preset algorithm, wherein the formula of the preset algorithm is as follows:
wherein ,representing the dark area pixel area in the binary image, < >>Representing the total area of the image>Indicating the coverage rate of duckweed in the area of the water photographed by the photographing device.
10. A visual inspection system for pollution of a water source for fishery farming, comprising:
the system comprises an acquisition module, a preprocessing module and a display module, wherein the acquisition module is used for shooting a top view of a water source of animal husbandry through shooting equipment and preprocessing an RGB image of the water source, and the preprocessing comprises the following steps: converting the photographed RGB image of the water source into a gray scale image by using a maximum value method, and reducing noise of the gray scale image by using Gaussian filtering;
the analysis module is used for carrying out image enhancement processing on the obtained water source gray level image by using an adaptive histogram equalization algorithm after carrying out the pretreatment on target characteristics in the animal husbandry water source, and the target characteristics comprise: duckweed pollution distribution and duckweed density; obtaining a binary image of the duckweed region by using a threshold segmentation algorithm on the enhanced water source gray level image;
and the judging module is used for processing the binary image of the duckweed area through a preset algorithm and determining the pollution degree of the stock raising water source.
CN202311126704.9A 2023-09-04 2023-09-04 Visual detection method and system for pollution of water source for fishery culture Active CN116863323B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311126704.9A CN116863323B (en) 2023-09-04 2023-09-04 Visual detection method and system for pollution of water source for fishery culture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311126704.9A CN116863323B (en) 2023-09-04 2023-09-04 Visual detection method and system for pollution of water source for fishery culture

Publications (2)

Publication Number Publication Date
CN116863323A true CN116863323A (en) 2023-10-10
CN116863323B CN116863323B (en) 2023-11-24

Family

ID=88234510

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311126704.9A Active CN116863323B (en) 2023-09-04 2023-09-04 Visual detection method and system for pollution of water source for fishery culture

Country Status (1)

Country Link
CN (1) CN116863323B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117576692A (en) * 2024-01-17 2024-02-20 大连云智信科技发展有限公司 Method for detecting water source pollution of animal husbandry based on image recognition
CN117893532A (en) * 2024-03-14 2024-04-16 山东神力索具有限公司 Die crack defect detection method for die forging rigging based on image processing

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019223069A1 (en) * 2018-05-25 2019-11-28 平安科技(深圳)有限公司 Histogram-based iris image enhancement method, apparatus and device, and storage medium
CN110765941A (en) * 2019-10-23 2020-02-07 张学玲 Seawater pollution area identification method and equipment based on high-resolution remote sensing image
CN113989890A (en) * 2021-10-29 2022-01-28 河南科技大学 Face expression recognition method based on multi-channel fusion and lightweight neural network
CN115797378A (en) * 2022-11-23 2023-03-14 复旦大学 Prostate contour segmentation method based on geometric intersection ratio loss
CN116168026A (en) * 2023-04-24 2023-05-26 山东拜尔检测股份有限公司 Water quality detection method and system based on computer vision
CN116665137A (en) * 2023-08-01 2023-08-29 聊城市彩烁农业科技有限公司 Livestock breeding wastewater treatment method based on machine vision

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019223069A1 (en) * 2018-05-25 2019-11-28 平安科技(深圳)有限公司 Histogram-based iris image enhancement method, apparatus and device, and storage medium
CN110765941A (en) * 2019-10-23 2020-02-07 张学玲 Seawater pollution area identification method and equipment based on high-resolution remote sensing image
CN113989890A (en) * 2021-10-29 2022-01-28 河南科技大学 Face expression recognition method based on multi-channel fusion and lightweight neural network
CN115797378A (en) * 2022-11-23 2023-03-14 复旦大学 Prostate contour segmentation method based on geometric intersection ratio loss
CN116168026A (en) * 2023-04-24 2023-05-26 山东拜尔检测股份有限公司 Water quality detection method and system based on computer vision
CN116665137A (en) * 2023-08-01 2023-08-29 聊城市彩烁农业科技有限公司 Livestock breeding wastewater treatment method based on machine vision

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ZHE WANG ET AL.: "A JND-Based Pixel-Domain Algorithm and Hardware Architecture for Perceptual Image Coding", JOURNAL OF IMAGING, pages 1 - 29 *
李赓飞: "自适应图像实时增强算法的技术研究", 中国博士学位论文全文数据库 信息科技辑, vol. 2018, no. 04, pages 138 - 9 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117576692A (en) * 2024-01-17 2024-02-20 大连云智信科技发展有限公司 Method for detecting water source pollution of animal husbandry based on image recognition
CN117576692B (en) * 2024-01-17 2024-03-29 大连云智信科技发展有限公司 Method for detecting water source pollution of animal husbandry based on image recognition
CN117893532A (en) * 2024-03-14 2024-04-16 山东神力索具有限公司 Die crack defect detection method for die forging rigging based on image processing
CN117893532B (en) * 2024-03-14 2024-05-24 山东神力索具有限公司 Die crack defect detection method for die forging rigging based on image processing

Also Published As

Publication number Publication date
CN116863323B (en) 2023-11-24

Similar Documents

Publication Publication Date Title
CN116863323B (en) Visual detection method and system for pollution of water source for fishery culture
CN109447945B (en) Quick counting method for basic wheat seedlings based on machine vision and graphic processing
CN110009653A (en) Increase limb recognition point sharp picture based on gray level threshold segmentation method and knows method for distinguishing
CN111784721A (en) Ultrasonic endoscopic image intelligent segmentation and quantification method and system based on deep learning
Chopin et al. RootAnalyzer: a cross-section image analysis tool for automated characterization of root cells and tissues
CN112765556B (en) Method for evaluating tree age of new-born mangrove forest based on intensive time remote sensing data
CN108830149A (en) A kind of detection method and terminal device of target bacteria
Korohou et al. Wheat grain yield estimation based on image morphological properties and wheat biomass
CN116385438B (en) Nuclear magnetic resonance tumor region extraction method
CN112526097A (en) Aquaculture water body environment intelligent monitoring management system based on big data analysis
CN115861721B (en) Livestock and poultry breeding spraying equipment state identification method based on image data
CN115760858A (en) Kidney pathological section cell identification method and system based on deep learning
Yu et al. Segmentation and density statistics of mariculture cages from remote sensing images using mask R-CNN
Gournia et al. Automatic detection of trawl-marks in sidescan sonar images through spatial domain filtering, employing haar-like features and morphological operations
CN112634274B (en) Machine vision-based fattening pork quality evaluation method and system
CN117291843B (en) Efficient management method for image database
CN114821158A (en) Dried jujube quality classification method and system based on image processing
CN116912260B (en) Broiler chicken breeding health state detection method based on artificial intelligence
CN111783656B (en) Self-adaptive infrared small target detection method based on statistical characteristic pre-segmentation
CN112016391B (en) Fishpond identification method, system and medium based on high-resolution satellite remote sensing image
CN115994870B (en) Image processing method for enhancing denoising
CN115248436A (en) Imaging sonar-based fish resource assessment method
CN114677525B (en) Edge detection method based on binary image processing
CN114066881A (en) Nonlinear transformation based detection method, computer equipment and storage medium
CN113744184A (en) Snakehead ovum counting method based on image processing

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