River flocculating constituent detection method and device

Through the image processing technology, the target information is extracted from the two -dimensional image of the rivers flocculant, and the particle size and speed of the flocculae can be recognized, and the problem of low measurement accuracy in the existing technology has been solved. And Shengshu measurement.

CN119354823APending Publication Date: 2025-01-24EAST CHINA NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411374161.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

The prior art lacks accurate and efficient methods to track and calculate the particle size and sinking speed of river flocs, especially when facing floc images of independent small particles at the edge of the particle, which can easily lead to misidentification and edge clutter, affecting the accuracy of measurement. Spend.

Method used

By collecting the two -dimensional flocculant images of the river, extraction of the target area information, obtaining the target image of the river flocculant, and identifying the particle size, area, quality position and sinking speed of the flocculation through the image processing technology.

Benefits of technology

The precise measurement of the particle size and sinking speed of the rivers' flocculant compalation, the problem of not being highly affected by the size and distribution of the traditional method due to the size of the flocculant particle size and distribution of the traditional method, improved the simple operation, and applied to the application needs of the actual scenario.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119354823A_ABST
    Figure CN119354823A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of water conservancy measurement, in particular to a river flocculating constituent detection method and device, and the method comprises the steps: collecting a two-dimensional flocculating constituent image of a river; target area information in the two-dimensional flocculating constituent image is extracted, and a target image corresponding to the river flocculating constituent is obtained based on the target area information; and according to the target image, identifying the river flocculating constituent to obtain at least one of the flocculating constituent particle size, the flocculating constituent area, the flocculating constituent mass center position and the flocculating constituent settling velocity information of the river flocculating constituent. According to the method, a digital image processing technology can be applied to measurement of the settling velocity and the particle size of the flocculating constituent, the defect that the precision of a measurement result is not high due to the fact that a traditional flocculating constituent settling velocity and particle size measurement technology is affected by the particle size and distribution of the flocculating constituent is overcome, meanwhile, the operation simplicity and convenience of the method are effectively improved, and the method has wide application prospects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of water conservancy measurement technology, and in particular to a method and device for detecting river floccules. Background Art

[0002] In the relevant technology, the particle size and sedimentation velocity of flocs involve the sedimentation rate of flocs, the sedimentation process, and the evolution of riverbeds and waterways, and are key parameters in river dynamics research. There are many methods for measuring floc particle size, such as LISST (Laser In Situ Scattering and Transmittance), laser diffractometer, acoustic backscattering system, image processing technology and other methods. However, the results measured by LISST in an environment with high suspended matter concentration are uncertain, and the volume of LISST is too large, which is not suitable for floc particle size in a small environment (such as indoor tests). Laser diffractometers require professional operators. In addition, the equipment is expensive and the cost of use is high. Samples with extremely uneven particle size distribution will be seriously affected, and the measurement results will have large deviations. The acoustic backscattering system can only measure the average particle size of flocs. In terms of sedimentation velocity measurement, related studies mostly use empirical formulas to estimate the floc sedimentation velocity based on the data of on-site floc particle size, sediment concentration, water turbulence, etc. The image processing method, that is, using a high-speed camera to photograph the flocs and using image processing technology to process the obtained high-precision images, is an effective method for measuring the particle size and sedimentation rate of flocs.

[0003] However, most of the floc particle size and sedimentation velocity calculation methods in related technologies are based on low-frequency background and simple algorithms. There is no quantitative analysis and research on floc characteristics and sedimentation velocity. There is a lack of accurate, efficient and unified methods to track and calculate floc particle size and sedimentation velocity. When faced with floc images of some independent small particles at the edge of the particles, they are easily misidentified as part of the floc, resulting in messy edges. After removing the edge noise, gaps may appear in the floc image, which affects the continuity of the floc and causes large errors in the centroid identification results. The accuracy cannot be effectively guaranteed, and it is difficult to meet the application needs in actual scenarios, which needs to be solved urgently. Summary of the invention

[0004] The present application provides a method and device for detecting river flocs, so as to solve the problems that most methods for calculating the particle size and sedimentation velocity of flocs in the related art are based on low-frequency background and simple algorithms, without quantitative analysis and research on the characteristics and sedimentation velocity of flocs, and lack of accurate, efficient and unified methods for tracking and calculating the particle size and sedimentation velocity of flocs. When faced with floc images of some independent small particles at the edge of the particles, they are easily misidentified as part of the flocs, resulting in messy edges, and after removing the edge noise, gaps may appear in the floc images, thereby affecting the continuity of the flocs, resulting in large errors in the centroid identification results, the accuracy cannot be effectively guaranteed, and it is difficult to meet the application needs in actual scenarios.

[0005] The first aspect of the present application provides a method for detecting river flocs, comprising the following steps: collecting a two-dimensional floc image of a river; extracting target area information in the two-dimensional floc image, and obtaining a target image corresponding to the river floc based on the target area information; identifying the river floc according to the target image to obtain at least one of the floc particle size, floc area, floc centroid position and floc sedimentation velocity information of the river floc.

[0006] Optionally, in one embodiment of the present application, the acquiring of the target image corresponding to the river flocs based on the target area information includes: preprocessing the target area information to obtain the target image that meets preset processing conditions.

[0007] Optionally, in one embodiment of the present application, identifying the river floc according to the target image includes: extracting at least one floc feature of the target image; detecting the edge of the river floc based on the at least one floc feature to identify the floc area; and performing edge optimization on the floc area to determine the river floc.

[0008] Optionally, in one embodiment of the present application, obtaining at least one of the floc particle size, floc area, floc centroid position and floc sedimentation speed of the river floc includes: taking images of two adjacent frames as a group to obtain at least one group of floc images; judging whether the number of flocs in the floc images is the same; if the number of flocs is the same, calculating the area difference of the flocs closest to the centroid position of the flocs; confirming the particles based on the area difference, wherein if they are the same particles, calculating the vertical displacement of the flocs according to the centroid position coordinates of the corresponding particles, otherwise searching for the corresponding particles within a preset multiple particle diameter range outside the centroid to calculate the sedimentation speed; if the number of flocs is different, filtering the particles that meet the preset redundant conditions based on the numerical values ​​of the previous and next particle diameters to determine the centroid position coordinates after filtering until the shortest distance of the same image in two adjacent frames is obtained to calculate the sedimentation speed.

[0009] Optionally, in one embodiment of the present application, the calculation formula for the average particle size of the river flocs is:

[0010]

[0011] Where D is the average particle size of flocs, D x is the main axis length, D y is the minor axis length.

[0012] The second aspect of the present application provides a device for detecting river flocs, including: an acquisition module for acquiring a two-dimensional floc image of a river; an extraction module for extracting target area information in the two-dimensional floc image, and obtaining a target image corresponding to the river floc based on the target area information; a detection module for identifying the river floc according to the target image to obtain at least one of the floc particle size, floc area, floc centroid position and floc sedimentation velocity information of the river floc.

[0013] Optionally, in one embodiment of the present application, the extraction module includes: a first processing unit, configured to pre-process the target area information to obtain the target image satisfying preset processing conditions.

[0014] Optionally, in one embodiment of the present application, the detection module includes: an extraction unit for extracting at least one floc feature of the target image; an identification unit for detecting the edge of the river floc based on the at least one floc feature to identify the floc area; and an optimization unit for performing edge optimization on the floc area to determine the river floc.

[0015] Optionally, in one embodiment of the present application, the detection module includes: a second processing unit, used to obtain at least one group of floc images by taking images of two adjacent frames as a group; a judgment unit, used to judge whether the number of flocs in the floc images is the same; a first calculation unit, used to calculate the area difference of the flocs closest to the centroid position of the flocs when the number of flocs is the same; a second calculation unit, used to confirm the particles based on the area difference, wherein if it is the same particle, the vertical displacement of the flocs is calculated according to the centroid position coordinates of the corresponding particles, otherwise the corresponding particles are searched within a preset multiple particle diameter range outside the centroid to calculate the sedimentation speed; a filtering unit, used to filter the particles that meet the preset redundant conditions based on the numerical values ​​of the previous and next particle diameters when the number of flocs is different, so as to determine the centroid position coordinates after filtering, until the shortest distance of the same image in two adjacent frames is obtained to calculate the sedimentation speed.

[0016] Optionally, in one embodiment of the present application, the calculation formula for the average particle size of the river flocs is:

[0017]

[0018] Where D is the average particle size of flocs, D x is the main axis length, D y is the minor axis length.

[0019] The third aspect of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the river floc detection method as described in the above embodiment.

[0020] A fourth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, which, when executed by a processor, implements the above-mentioned method for detecting river flocs.

[0021] The fifth aspect of the present application provides a computer program product, including a computer program, which, when executed, is used to implement the above-mentioned method for detecting river flocs.

[0022] The embodiment of the present application can collect a two-dimensional floc image of a river, and obtain a target image corresponding to the river floc through the target area information in the image, so as to identify the river floc and obtain at least one of the floc particle size, floc area, floc centroid position and floc sedimentation velocity information. Thus, the digital image processing technology is applied to the measurement of floc sedimentation velocity and particle size, overcoming the disadvantage that the traditional floc sedimentation velocity and particle size measurement technology is affected by the floc particle size and distribution, resulting in low measurement accuracy, while effectively improving the ease of operation of the present application, and having broad application prospects. As a result, the problem of most floc particle size and sedimentation velocity calculation methods in related technologies being based on low-frequency background and simple algorithms, without quantitative analysis and research on floc characteristics and sedimentation velocity, and lacking an accurate, efficient and unified method to track and calculate floc particle size and sedimentation velocity is solved. When faced with floc images of some independent small particles at the edge of the particles, they are easily misidentified as part of the floc, resulting in messy edges. After removing the edge noise, gaps may appear in the floc image, which affects the continuity of the floc, resulting in large errors in the centroid identification results, the accuracy cannot be effectively guaranteed, and it is difficult to meet the application needs in actual scenarios.

[0023] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0025] Figure 1 A flow chart of a method for detecting river flocs provided according to an embodiment of the present application;

[0026] Figure 2 This is a schematic diagram of a single flocculant treatment result according to an embodiment of the present application;

[0027] Figure 3 This is a comparison diagram of image area filling results in one embodiment of the present application;

[0028] Figure 4 This is a schematic diagram of the position processing result of a single particle in two adjacent frames according to an embodiment of the present application;

[0029] Figure 5 This is a schematic diagram of the edge optimization effect of an embodiment of the present application;

[0030] Figure 6 This is a flow chart of a method for detecting river flocs according to an embodiment of the present application;

[0031] Figure 7 This is an image processing flow chart of an embodiment of the present application;

[0032] Figure 8 This is a schematic effect diagram of floc feature recognition according to an embodiment of the present application;

[0033] Fig. 9 This is a schematic diagram of the floc particle size recognition effect of an embodiment of the present application;

[0034] Fig.10 This is a schematic diagram of the floc settling speed identification effect of one embodiment of the present application;

[0035] Fig.11 It is a schematic diagram of the structure of a detection device for river flocs provided according to an embodiment of the present application;

[0036] Fig.12 It is a schematic diagram of the structure of an electronic device provided according to an embodiment of the present application.

[0037] Reference numerals:

[0038] 10- River floc detection device: 100- acquisition module, 200- extraction module and 300- detection module; 1201- memory, 1202- processor and 1203- communication interface. DETAILED DESCRIPTION

[0039] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0040] The following describes the detection method and device of river flocs in the embodiment of the present application with reference to the accompanying drawings. Most of the methods for calculating the particle size and sedimentation velocity of flocs in the related technologies mentioned in the above background technology are based on low-frequency background and simple algorithms, and there is no quantitative analysis and research on the characteristics and sedimentation velocity of flocs. There is a lack of accurate, efficient and unified methods for tracking and calculating the particle size and sedimentation velocity of flocs. When facing the floc images of some independent small particles at the edge of the particles, they are easily misidentified as part of the flocs, resulting in messy edges. After removing the edge noise, gaps may appear in the floc image, thereby affecting the continuity of the flocs, resulting in large errors in the centroid identification results, and the accuracy cannot be effectively guaranteed. It is difficult to meet the application requirements in actual scenarios. The present application provides a method for detecting river flocs, in which a two-dimensional floc image of a river can be collected, and a target image corresponding to the river floc is obtained through the target area information in the image, so as to identify the river flocs and obtain at least one of the floc particle size, floc area, floc centroid position and floc sedimentation velocity information. Thus, the digital image processing technology is applied to the measurement of floc sedimentation velocity and particle size, which overcomes the disadvantage that the traditional floc sedimentation velocity and particle size measurement technology is affected by the floc particle size and distribution, resulting in low measurement accuracy. At the same time, the ease of operation of the present application is effectively improved, and it has broad application prospects. Thus, the problems that most of the floc particle size and sedimentation velocity calculation methods in the related art are based on low-frequency background and simple algorithms, do not quantitatively analyze and study floc characteristics and sedimentation velocity, lack accurate, efficient and unified methods to track and calculate floc particle size and sedimentation velocity, and when faced with floc images of some independent small particles at the edge of the particles, they are easily misidentified as part of the floc, resulting in cluttered edges. After removing the edge noise, gaps may appear in the floc image, thereby affecting the continuity of the floc, resulting in large errors in the centroid identification results, and the accuracy cannot be effectively guaranteed, and it is difficult to meet the application needs in actual scenarios.

[0041] Specifically, Figure 1 A flow chart of a method for detecting river flocs provided in an embodiment of the present application.

[0042] like Figure 1 As shown, the method for detecting river flocs comprises the following steps:

[0043] In step S101, a two-dimensional flocculent image of a river is collected.

[0044] It is understood by those skilled in the art that, based on the different reflectivities of water and flocs to light, the calculation of floc sedimentation velocity and particle size can be achieved using image processing technology.

[0045] In some embodiments, the present application can use an image acquisition system to observe and record flocs in a river, and then obtain high-definition images through image processing technology to calculate the particle size and corresponding sedimentation velocity of different flocs, reduce the result error and improve the calculation efficiency.

[0046] Based on this, the embodiment of the present application can first collect a two-dimensional floc image of the river, for example, by continuously shooting each frame image of the river floc through a camera and saving and outputting the high-resolution image to a computer for subsequent calculation and detection.

[0047] Step S102: extracting target region information from the two-dimensional floc image, and acquiring a target image corresponding to the river floc based on the target region information.

[0048] In the actual processing process, the collected two-dimensional floc image of the river may have flocs in some areas and no flocs in other areas. Therefore, the embodiment of the present application can first extract the target area information in the two-dimensional floc image, so as to obtain the target image corresponding to the river floc based on the information.

[0049] For example, the present application can first grayscale the two-dimensional flocculent image: that is, use the "rgb2gray" function in Matlab for the photographed flocculent image: grayscale value = 0.2989×red component + 0.5870×green component + 0.1140×blue component to obtain the grayscale result of the image;

[0050] Next, you can convert the image data type to a double-precision floating point type: use the "im2double" function to convert the pixel values ​​of the input image to a double-precision floating point number between 0 and 1;

[0051] Furthermore, the image can be Gaussian filtered: create a 3x3 matrix and use a Gaussian filter with a standard deviation of 1 to smooth the image, while ensuring that the size of the output image is the same as the input image;

[0052] Finally, the smoothed image is binarized: Figure 2 This is a schematic diagram of the single flocculant treatment result of an embodiment of the present application. Figure 2As shown, the embodiments of the present application can, but are not limited to, use threshold processing technology to binarize the image. For example, a suitable threshold "THRE" can be determined through experiments, and according to the threshold "THRE", pixel values ​​greater than the threshold are set to 1 (white), and pixel values ​​less than or equal to the threshold are set to 0 (black), so as to screen out the area where the flocs (the area with a pixel value of 1) are located, and a morphological opening operation can be performed on the area: a structural element is created, and the flocs are fitted with a "disk" circular structural element. The size of the structure is obtained through repeated experiments, and an erosion operation is performed first and then an expansion operation is performed; the final result is the target area in the embodiments of the present application.

[0053] Next, the process of obtaining the target image corresponding to the river flocs based on the target area information in the embodiment of the present application is further explained.

[0054] Optionally, in one embodiment of the present application, acquiring a target image corresponding to the river floccules based on the target area information includes: preprocessing the target area information to obtain a target image that meets preset processing conditions.

[0055] It is understandable that the preset processing conditions here can be understood as a series of conditions that need to be met when measuring the flocculent particle size and sedimentation velocity, etc. For example, when the flocculent in the target image reaches a certain degree of clarity, the flocculent particle size and sedimentation velocity can be measured.

[0056] In actual implementation, when obtaining a target image corresponding to a river floc based on the target area information of a two-dimensional floc image, the present application may preprocess the target area information in the extracted two-dimensional floc image to obtain a preprocessed target image.

[0057] Specifically, after obtaining the relevant information of the target area, the embodiment of the present application can then perform area filling on the image: Figure 3 This is a comparison diagram of image area filling results according to an embodiment of the present application. Figure 3 As shown, the embodiment of the present application can fill all holes in the floc background after identification, so that the image structure is complete, that is, the target image that meets certain processing conditions in the embodiment of the present application can be obtained.

[0058] Step S103, identifying river flocs according to the target image to obtain at least one of the floc particle size, floc area, floc centroid position and floc sedimentation velocity information of the river flocs.

[0059] As a possible implementation method, after obtaining a target image that meets certain processing conditions, the present application can identify river flocs in the image from the target image, and then perform floc feature recognition, calculate and record the geometric properties of the flocs in the target image: such as using the "regionprops" function to directly calculate the major axis length, minor axis length, and equivalent circle diameter of the image based on pixel points and record them, so as to obtain at least one of the floc particle size, floc area, floc center of mass position, and floc sedimentation velocity information.

[0060] For example, in the embodiment of the present application, based on the geometric characteristics of the flocs, the coordinates of the center point of the image are used as the center of mass of the flocs, and the "regionprops" function is also used to calculate the area of ​​the flocs according to the pixels in the image, and the main axis D is recorded. x and secondary axis D y length to obtain the average particle size of the flocs. It should be noted that the average particle size of the flocs and the equivalent circle diameter in the embodiments of the present application are both within the range of the particle size of the flocs. Among them, the equivalent circle diameter can be calculated by a computer program, etc. In the embodiments of the present application, the average particle size of the flocs is mainly but not limited to being used as the final particle size of the flocs.

[0061] Specifically, the calculation formula of the average particle size D of flocs can be expressed as follows:

[0062]

[0063] Where D is the average particle size of flocs, D x is the main axis length, D y is the minor axis length.

[0064] Furthermore, the embodiment of the present application can also identify the settling speed of the flocs to obtain the settling speed of the flocs. Figure 4 This is a schematic diagram of the position processing result of a single particle in two adjacent frames according to an embodiment of the present application. Figure 4 As shown, the embodiment of the present application can use the particle tracking method to calculate the shortest distance between the same floc image in two adjacent frames of photos, and obtain the sedimentation distance and sedimentation speed of the same floc within a fixed time interval. It should be noted that in the calculation process, the particle tracking method can be used to match the flocs existing in two adjacent frames of images one by one to obtain the coordinates of the center of mass position of the same floc in different photos.

[0065] Optionally, in one embodiment of the present application, identifying river flocs based on a target image includes: extracting at least one floc feature of the target image; detecting the edge of the river floc based on the at least one floc feature to identify the floc area; and performing edge optimization on the floc area to determine the river flocs.

[0066] It can be understood based on the relevant descriptions of other embodiments that before obtaining various information of flocs, it is necessary to first identify the river flocs according to the target image.

[0067] Specifically, the recognition process can be expressed as: first extract at least one floc feature of the target image, then detect the edge of the river floc based on the at least one floc feature to identify the floc area, then optimize the edge of the floc area, and finally determine the river floc. For example, Figure 5 FIG. 1 is a schematic diagram of the edge optimization effect of an embodiment of the present application. Figure 5 As shown, in the embodiment of the present application, an area threshold can be set to remove small particles with an area smaller than the specified threshold from the image, thereby achieving an effect of optimizing the edge to determine the final river flocs.

[0068] Optionally, in one embodiment of the present application, at least one of the floc particle size, floc area, floc centroid position and floc sedimentation speed of river flocs is obtained, including: taking images of two adjacent frames as a group to obtain at least one group of floc images; judging whether the number of flocs in the floc images is the same; if the number of flocs is the same, calculating the area difference of the flocs closest to the floc centroid position; confirming the particles based on the area difference, wherein if they are the same particles, calculating the vertical displacement of the flocs according to the centroid position coordinates of the corresponding particles, otherwise searching for the corresponding particles within a preset multiple particle diameter range outside the centroid to calculate the sedimentation speed; if the numbers are different, filtering the particles that meet the preset redundant conditions based on the values ​​of the previous and next particle diameters to determine the centroid position coordinates after filtering, until the shortest distance of the same image in two adjacent frames is obtained to calculate the sedimentation speed.

[0069] In the actual implementation process, when using the particle tracking method to calculate the sedimentation distance and sedimentation velocity of different flocs, the specific steps can be expressed as follows:

[0070] (1) All photos are divided into several groups, with two adjacent frames as a group;

[0071] (2) determine whether the number of flocs in a group of photos is the same;

[0072] (3) If the number of particles in the photo is the same, calculate the difference in area between the flocs closest to the centroid. If it does not exceed 5%, they are considered to be the same particle. If it exceeds 5%, they are not.

[0073] (4) If it is confirmed to be the same particle, calculate the vertical displacement of the particle (the same flocculent) according to the coordinates of the center of mass of the corresponding particle in a set of photos, that is, the sedimentation velocity. If it is not the same particle, find the corresponding particle within 1.5 times the particle diameter outside the center of mass of the particle;

[0074] (5) After finding the corresponding particle, calculate the sedimentation velocity of the corresponding particle according to the center of mass position;

[0075] (6) If the number of particles in two adjacent photos is different, the particles with a diameter no greater than 0.05 in a group of photos are considered relevant particles, and the excess particles are filtered out;

[0076] (7) determining the coordinates of the center of mass position of the filtered flocs;

[0077] (8) Repeat the calculation to obtain the shortest distance between the same floc image in two adjacent frames of photos and calculate the sedimentation speed of the floc.

[0078] The present application is described in detail below with reference to a specific embodiment.

[0079] Figure 6 This is a flow chart of a method for detecting river flocs according to an embodiment of the present application. Figure 7 This is an image processing flow chart of an embodiment of the present application. Figure 6 and Figure 7 As shown:

[0080] (1) Obtaining original high-precision flocculent images;

[0081] (2) After obtaining the original high-precision floc image, the floc image is relatively blurred and the floc boundary cannot be identified. Therefore, the embodiment of the present application can perform a binarization process on the image;

[0082] (3) After the binary image is obtained, in view of the chaotic image boundaries, some blurred ghosts are also considered to be flocs. In the embodiment of the present application, a morphological opening operation can be performed, and the floc image is first eroded and then expanded according to the size of the general floc structure obtained in the experiment;

[0083] (4) Region filling: filling the holes in the complete image to make the structure complete;

[0084] (5) After removing small particles according to the threshold, record the main axis (D x ) and the secondary axis (D y ) length, and equivalent circle diameter; the average particle size D of the floccules is obtained according to the following formula:

[0085]

[0086] Where D is the average particle size of flocs, D x is the main axis length, D y is the minor axis length.

[0087] The final result is Figure 8 , Fig. 9 and Fig.10 As shown, Figure 8 This is a schematic effect diagram of floc feature recognition according to an embodiment of the present application; Fig. 9This is a schematic diagram of the floc particle size recognition effect of an embodiment of the present application; Fig.10 This is a schematic diagram of the floc sedimentation rate identification effect of an embodiment of the present application, such as Fig.10 As shown, by comparing the floc settling velocity identification results with the measured values, it can be seen that the floc settling velocity obtained based on image processing has a very high degree of coincidence with the measured settling velocity.

[0088] According to the detection method of river flocs proposed in the embodiment of the present application, a two-dimensional floc image of a river can be collected, and the target image corresponding to the river floc can be obtained through the target area information in the image, so as to identify the river flocs and obtain at least one of the floc particle size, floc area, floc centroid position and floc sedimentation velocity information. Thus, the digital image processing technology is applied to the measurement of floc sedimentation velocity and particle size, overcoming the disadvantage that the traditional floc sedimentation velocity and particle size measurement technology is affected by the floc particle size and distribution, resulting in low measurement accuracy, while effectively improving the ease of operation of the present application, and having broad application prospects. As a result, the problem of most floc particle size and sedimentation velocity calculation methods in related technologies being based on low-frequency background and simple algorithms, without quantitative analysis and research on floc characteristics and sedimentation velocity, and lacking an accurate, efficient and unified method to track and calculate floc particle size and sedimentation velocity is solved. When faced with floc images of some independent small particles at the edge of the particles, they are easily misidentified as part of the floc, resulting in messy edges. After removing the edge noise, gaps may appear in the floc image, which affects the continuity of the floc, resulting in large errors in the centroid identification results, the accuracy cannot be effectively guaranteed, and it is difficult to meet the application needs in actual scenarios.

[0089] Next, a device for detecting river flocs according to an embodiment of the present application will be described with reference to the accompanying drawings.

[0090] Fig.11 It is a schematic diagram of the structure of a detection device for river flocculants according to an embodiment of the present application.

[0091] like Fig.11 As shown, the river floc detection device 10 includes: a collection module 100 , an extraction module 200 and a detection module 300 .

[0092] The acquisition module 100 is used to acquire a two-dimensional floc image of the river.

[0093] The extraction module 200 is used to extract the target area information in the two-dimensional floc image, and obtain the target image corresponding to the river floc based on the target area information.

[0094] The detection module 300 is used to identify river flocs according to the target image to obtain at least one of the floc particle size, floc area, floc centroid position and floc sedimentation velocity information of the river flocs.

[0095] Optionally, in one embodiment of the present application, the extraction module 200 includes: a first processing unit.

[0096] Wherein, the first processing unit is used to pre-process the target area information to obtain a target image that meets preset processing conditions.

[0097] Optionally, in one embodiment of the present application, the detection module 300 includes: an extraction unit, a recognition unit and an optimization unit.

[0098] The extraction unit is used to extract at least one floc feature of the target image.

[0099] The identification unit is used to detect the edge of the river flocs based on at least one floc feature to identify the floc area.

[0100] Optimization unit for edge optimization of floc area and determination of river flocs.

[0101] Optionally, in one embodiment of the present application, the detection module 300 includes: a second processing unit, a judgment unit, a first calculation unit and a second calculation unit.

[0102] The second processing unit is used to obtain at least one group of flocculent images by taking two adjacent frames of images as one group.

[0103] The judging unit is used to judge whether the numbers of flocs in the floc images are the same.

[0104] The first calculation unit is used to calculate the area difference of the flocs closest to the centroid of the flocs when the number of flocs is the same.

[0105] The second calculation unit is used to confirm the particle based on the area difference. If it is the same particle, the vertical displacement of the flocculent is calculated according to the coordinates of the center of mass position of the corresponding particle. Otherwise, the corresponding particle is searched within a preset multiple particle diameter range outside the center of mass to calculate the sedimentation velocity.

[0106] The filtering unit is used to filter particles that meet the preset redundant conditions based on the numerical values ​​of the previous and next particle sizes when the number of flocs is different, so as to determine the coordinates of the centroid position after filtering, until the shortest distance between two adjacent frames of the same image is obtained to calculate the sedimentation velocity.

[0107] Optionally, in one embodiment of the present application, the calculation formula for the average particle size of river flocs can be expressed as:

[0108]

[0109] Where D is the average particle size of flocs, D xis the main axis length, D y is the minor axis length.

[0110] It should be noted that the above explanations of the embodiment of the method for detecting river flocs are also applicable to the device for detecting river flocs in this embodiment, and will not be described in detail here.

[0111] According to the river floc detection device proposed in the embodiment of the present application, a two-dimensional floc image of the river can be collected, and the target image corresponding to the river floc can be obtained through the target area information in the image, so as to identify the river floc and obtain at least one of the floc particle size, floc area, floc centroid position and floc sedimentation speed information. Thus, the digital image processing technology is applied to the measurement of floc sedimentation speed and particle size, overcoming the disadvantage that the traditional floc sedimentation speed and particle size measurement technology is affected by the floc particle size and distribution, resulting in low measurement accuracy, while effectively improving the ease of operation of the present application, and having broad application prospects. As a result, the problem of most floc particle size and sedimentation velocity calculation methods in related technologies being based on low-frequency background and simple algorithms, without quantitative analysis and research on floc characteristics and sedimentation velocity, and lacking an accurate, efficient and unified method to track and calculate floc particle size and sedimentation velocity is solved. When faced with floc images of some independent small particles at the edge of the particles, they are easily misidentified as part of the floc, resulting in messy edges. After removing the edge noise, gaps may appear in the floc image, which affects the continuity of the floc, resulting in large errors in the centroid identification results, the accuracy cannot be effectively guaranteed, and it is difficult to meet the application needs in actual scenarios.

[0112] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include:

[0113] A memory 1201 , a processor 1202 , and a computer program stored in the memory 1201 and executable on the processor 1202 .

[0114] When the processor 1202 executes the program, the river floc detection method provided in the above embodiment is implemented.

[0115] Furthermore, the electronic device further comprises:

[0116] The communication interface 1203 is used for communication between the memory 1201 and the processor 1202 .

[0117] The memory 1201 is used to store computer programs that can be executed on the processor 1202 .

[0118] The memory 1201 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0119] If the memory 1201, the processor 1202 and the communication interface 1203 are implemented independently, the communication interface 1203, the memory 1201 and the processor 1202 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.12 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0120] Optionally, in a specific implementation, if the memory 1201, the processor 1202 and the communication interface 1203 are integrated on a chip, the memory 1201, the processor 1202 and the communication interface 1203 can communicate with each other through an internal interface.

[0121] The processor 1202 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.

[0122] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned method for detecting river flocs.

[0123] The embodiment of the present application also provides a computer program product, including a computer program, which can run computer instructions. When the computer instructions are executed by a processor, the river floc detection method provided by the embodiment of the present application is implemented.

[0124] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0125] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0126] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or N executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0127] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or N wirings (electronic devices), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways as necessary and then storing it in a computer memory.

[0128] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented by hardware, as in another embodiment, it can be implemented by any one or a combination of multiple of the following technologies known in the art: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0129] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0130] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0131] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A method for detecting river flocs, characterized in that: The following steps are involved: Collect 2D floc images of rivers; Extracting target area information from the two-dimensional floc image, and acquiring a target image corresponding to the river floc based on the target area information; The river flocs are identified according to the target image to obtain at least one of the floc particle size, floc area, floc centroid position and floc sedimentation velocity information of the river flocs.

2. The method according to claim 1, characterized in that: The step of acquiring a target image corresponding to the river flocs based on the target area information includes: The target area information is preprocessed to obtain the target image that meets preset processing conditions.

3. The method according to claim 1, characterized in that The step of identifying the river flocs according to the target image comprises: extracting at least one floc feature of the target image; detecting edges of the river flocs based on the at least one floc feature to identify floc regions; The floc region is edge optimized to determine the river floc.

4. The method according to claim 1, characterized in that: The step of obtaining at least one of the floc particle size, floc area, floc centroid position and floc sedimentation velocity of the river floc comprises: Taking two adjacent frames of images as a group, at least one group of flocculent images is obtained; Determine whether the number of flocs in the floc images is the same; If the number of the flocs is the same, the area difference of the flocs closest to the centroid of the flocs is calculated; the particles are confirmed based on the area difference, wherein if they are the same particles, the vertical displacement of the flocs is calculated according to the centroid position coordinates of the corresponding particles, otherwise the corresponding particles are searched within a preset multiple particle diameter range outside the centroid to calculate the sedimentation velocity; If the number of flocs is different, the particles that meet the preset redundant conditions are filtered based on the numerical values ​​of the previous and next particle sizes to determine the coordinates of the centroid position after filtering, until the shortest distance between two adjacent frames of the same image is obtained to calculate the sedimentation speed.

5. The method according to claim 4, characterized in that The calculation formula of the average particle size of the river flocs is: Where D is the average particle size of flocs, D x is the main axis length, D y is the minor axis length.

6. A device for detecting river flocs, characterized in that: include: An acquisition module, used for acquiring two-dimensional flocculent images of rivers; An extraction module, used for extracting target area information from the two-dimensional floc image, and acquiring a target image corresponding to the river floc based on the target area information; The detection module is used to identify the river flocs according to the target image to obtain at least one of the floc particle size, floc area, floc centroid position and floc sedimentation velocity information of the river flocs.

7. The device according to claim 6, characterized in that The extraction module comprises: The processing unit is used to pre-process the target area information to obtain the target image that meets preset processing conditions.

8. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method for detecting river flocs according to any one of claims 1 to 5.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the method for detecting river flocs as described in any one of claims 1 to 5.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed, it is used to implement the method for detecting river flocs as described in any one of claims 1-5.