CN113470058A - Gravel particle size distribution measuring method and device - Google Patents

Gravel particle size distribution measuring method and device Download PDF

Info

Publication number
CN113470058A
CN113470058A CN202110784549.4A CN202110784549A CN113470058A CN 113470058 A CN113470058 A CN 113470058A CN 202110784549 A CN202110784549 A CN 202110784549A CN 113470058 A CN113470058 A CN 113470058A
Authority
CN
China
Prior art keywords
image
sample
gravel
threshold
particle size
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.)
Withdrawn
Application number
CN202110784549.4A
Other languages
Chinese (zh)
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.)
University of Shaoxing
Original Assignee
University of Shaoxing
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 University of Shaoxing filed Critical University of Shaoxing
Priority to CN202110784549.4A priority Critical patent/CN113470058A/en
Publication of CN113470058A publication Critical patent/CN113470058A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Image Analysis (AREA)

Abstract

本发明公开了一种砾石的粒度分布测量方法及装置。其中,方法包括:将待测的第一图像输入至预设的神经网络模型,得到神经网络模型输出的第一图像对应的第一阈值和第二阈值;基于自动粒度分布算法和第一阈值去除第一图像中的背景物,得到第二图像;采用区域填充技术对第二图像中的各个砾石进行填充,得到第三图像;将第二阈值作为H‑minima变换中的h值,基于H‑minima变换的分水岭算法对第三图像中的各个砾石进行分割,得到第四图像;采用Hotelling变换测量第四图像中各个砾石的短轴,以对第四图像中的各个砾石进行分类,并绘制各类砾石的粒度分布图。本发明实施例能够提高砾石粒度分布测量的准确性。

Figure 202110784549

The invention discloses a method and a device for measuring the particle size distribution of gravel. Wherein, the method includes: inputting the first image to be tested into a preset neural network model to obtain a first threshold and a second threshold corresponding to the first image output by the neural network model; removing the first threshold based on an automatic particle size distribution algorithm and the first threshold The background in the first image is used to obtain the second image; the area filling technology is used to fill each gravel in the second image to obtain the third image; the second threshold is used as the h value in the H-minima transformation, based on the H- The watershed algorithm of minima transform divides each gravel in the third image to obtain the fourth image; uses Hotelling transform to measure the short axis of each gravel in the fourth image to classify each gravel in the fourth image, and draw each gravel in the fourth image. Gravel-like particle size distribution. The embodiment of the present invention can improve the accuracy of gravel particle size distribution measurement.

Figure 202110784549

Description

Gravel particle size distribution measuring method and device
Technical Field
The invention belongs to the field of complex particle image segmentation, and particularly relates to a method and a device for measuring the particle size distribution of gravel.
Background
The topography of the river bed is affected by various shapes and sizes of gravel, and particle size distribution measurements of gravel are an important task in hydraulics, topography, and ecology. The development of digital image technology and computer software has increased the possibility of automated image analysis, thus facilitating the development of particle size distribution measurements of gravel, enabling the measurement of gravel particle size distribution by an automated particle size distribution Algorithm (AGS).
The river bed image generally comprises a plurality of gravels and background objects, the background objects are sand grounds, and researches show that a proper binary threshold value is determined in the AGS, so that the gravels and the sand grounds can be distinguished from the grayed binary image, namely the gray image of the colorful river bed image (generally, the white part is the gravels, and the black part is the sand grounds), an image only containing the gravels is obtained, and a foundation is laid for the subsequent measurement of the gravel particle size distribution.
In the prior art, an expert can determine a proper binary threshold value by manually identifying a riverbed image, but the process is a long and tedious process, and human subjective judgment is easy to make mistakes, so that the accuracy of subsequent gravel particle size distribution measurement is low.
Disclosure of Invention
In view of the above drawbacks and needs of the prior art, the present invention provides a method and an apparatus for measuring the particle size distribution of gravel, which aims to improve the accuracy of measuring the particle size distribution of gravel, thereby solving the technical problem of inaccurate measurement of the particle size distribution of gravel.
To achieve the above object, according to one aspect of the present invention, there is provided a method for measuring a particle size distribution of gravel, comprising:
inputting a first image to be detected into a preset neural network model to obtain a first threshold value and a second threshold value corresponding to the first image output by the neural network model; wherein the first image comprises a plurality of gravel and background objects;
removing background objects in the first image based on an automatic particle size distribution algorithm and the first threshold value to obtain a second image;
filling each gravel in the second image by adopting an area filling technology to obtain a third image;
taking the second threshold value as an H value in H-minima transformation, and segmenting each gravel in the third image based on a watershed algorithm of the H-minima transformation to obtain a fourth image;
and measuring the short axis of each gravel in the fourth image by adopting a Hotelling transformation to classify each gravel in the fourth image, and drawing a particle size distribution diagram of each type of gravel.
Preferably, the neural network model is a back propagation based fuzzy neural network.
Preferably, the first image to be measured is input to a preset neural network model, and the method further includes:
acquiring an original color image to be detected; wherein the original color image comprises a plurality of gravel and background objects;
and performing downsampling on the original color image by adopting discrete wavelet transform to obtain a first image to be detected.
Preferably, the neural network model is obtained as follows:
obtaining a plurality of sample original color images; wherein the sample original color image comprises a plurality of gravel and background objects;
adopting discrete wavelet transform to carry out downsampling on each sample original image to obtain a first sample image corresponding to each sample original image;
acquiring a first sample threshold value and a second sample threshold value corresponding to each first sample image, and combining each sample original image and the corresponding first sample threshold value and second sample threshold value to form a sample;
combining a plurality of the samples to form a training set, training the neural network model based on the training set to adjust parameters of the neural network model.
Preferably, training the neural network model based on the training set to adjust parameters of the neural network model comprises:
for any one sample, inputting the first sample image in the sample into the neural network model, and outputting a first prediction threshold value and a second prediction threshold value corresponding to the first sample image;
calculating a loss value according to the first prediction threshold value and the first sample threshold value in the sample, and the second prediction threshold value and the second sample threshold value in the sample by adopting a preset loss function;
and if the loss value is smaller than a preset threshold value, finishing the training of the neural network model.
Preferably, acquiring a first sample threshold and a second sample threshold corresponding to each of the first sample images includes:
and acquiring a first sample threshold and a second sample threshold corresponding to each first sample image based on an automatic particle size distribution algorithm.
According to another aspect of the present invention, there is provided a gravel particle size distribution measuring apparatus comprising:
the device comprises an input module, a first image acquisition module and a second image acquisition module, wherein the input module is used for inputting a first image to be detected to a preset neural network model to obtain a first threshold value and a second threshold value corresponding to the first image output by the neural network model; wherein the first image comprises a plurality of gravel and background objects;
the background removing module is used for removing background objects in the first image based on an automatic particle size distribution algorithm and the first threshold value to obtain a second image;
the filling module is used for filling each gravel in the second image by adopting an area filling technology to obtain a third image;
the segmentation module is used for taking the second threshold value as an H value in H-minima transformation and segmenting each gravel in the third image based on a watershed algorithm of the H-minima transformation to obtain a fourth image;
and the drawing module is used for measuring the short axis of each gravel in the fourth image by adopting Hotelling transformation so as to classify each gravel in the fourth image and draw a particle size distribution diagram of each type of gravel.
Preferably, the apparatus further comprises:
the image acquisition module is used for acquiring a plurality of sample original color images; wherein the sample original color image comprises a plurality of gravel and background objects;
the down-sampling module is used for carrying out down-sampling on each sample original image by adopting discrete wavelet transform to obtain a first sample image corresponding to each sample original image;
a threshold obtaining module, configured to obtain a first sample threshold and a second sample threshold corresponding to each first sample image, and combine each sample original image and the corresponding first sample threshold and second sample threshold as a sample;
and the training module is used for combining a plurality of samples to form a training set, and training the neural network model based on the training set to adjust the parameters of the neural network model.
According to a further aspect of the invention, there is provided an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method as provided in the first aspect when executing the program.
According to a further aspect of the present invention, there is provided a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method as provided by the first aspect.
Generally speaking, compared with the prior art, the technical scheme of the invention captures 2 key parameters (namely the first threshold and the second threshold) of each digital image (namely the first image to be measured) through the neural network model, can automatically and accurately measure the particle size distribution of the gravel, effectively overcomes the problem that the prior art cannot fully identify the 2 key parameters of each digital image, and improves the accuracy of the measurement of the particle size distribution of the gravel.
Drawings
FIG. 1 is a flow chart of a method for measuring the particle size distribution of gravel according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a gravel particle size distribution measuring apparatus according to an embodiment of the present invention;
fig. 3 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. In addition, the technical features involved in the embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
It should be noted that, in the first place, the embodiments of the present invention aim to overcome the disadvantages of the prior art and provide a method for measuring the particle size distribution of river bed gravels based on digital images, which facilitates the full-automatic accurate measurement of the particle size distribution of the gravels, has the ability to simultaneously reduce the quantification of the particle size distribution of the gravels, the labor-intensive and time-consuming laboratory, and automatically and accurately measures the particle size distribution of the gravels with less labor intensity for each digital image. The technical scheme of the invention is as follows:
fig. 1 is a flow chart of a method for measuring a particle size distribution of gravel according to an embodiment of the present invention, as shown in fig. 1, the method includes:
step S1, inputting a first image to be detected into a preset neural network model, and obtaining a first threshold value and a second threshold value corresponding to the first image output by the neural network model; wherein the first image comprises a plurality of gravel and background objects; wherein the first threshold is used for identifying sand as background, and the second threshold is used for controlling WST over-segmentation by using the threshold of H-minima transformation.
It should be noted that Artificial Neural Networks (ANNs) are a branch of artificial intelligence and perform well in various fields. In the embodiment of the invention, the preset neural network model is based on a back propagation fuzzy neural network (CFNN) to learn and infer the relationship between the input (a first image) of the CFNN and the corresponding output (a first threshold and a second threshold), the images are similar due to gravel and sand background objects, and the gravel and sand background objects which are distinguished are a fuzzy problem without absolute standards, so that the neural fuzzy network which can better simulate a human fuzzy judgment process is adopted, and the accuracy of an output result is higher compared with a common neural network classification algorithm.
Wherein the first image is an image input to the neural network model, which includes a plurality of gravels and background objects, which are typically sand.
And step S2, removing background objects in the first image based on an automatic particle size distribution algorithm and the first threshold value to obtain a second image.
Specifically, an appropriate binary threshold is determined in the AGS, so that gravel and sand can be distinguished from each other (usually, the white part is gravel and the black part is sand) from the grayed binary image of the colored riverbed image, namely the grayscale image, thereby obtaining an image only containing gravel and laying a foundation for subsequent measurement of gravel particle size distribution. The first threshold in the embodiment of the present invention, i.e. the binary threshold mentioned above, is used to identify a background object, such as sand, in the first image.
And taking the first threshold as a binary threshold in the AGS to remove background scenes in the first image, and taking the image without the background scenes as a second image.
And step S3, filling each gravel in the second image by adopting an area filling technology to obtain a third image.
And step S4, taking the second threshold as an H value in H-minima transformation, and segmenting each gravel in the third image based on a watershed algorithm of the H-minima transformation to obtain a fourth image.
In particular, the watershed transform algorithm (WST) is one of the most commonly used image segmentation methods in image processing, however, over-segmentation often occurs in segmentation procedures. In order to avoid over-segmentation, a second threshold value is used as an H value in the H-minima transformation, each gravel in the third image is segmented based on a watershed algorithm of the H-minima transformation, and the segmented image is used as a fourth image.
And step S5, measuring the short axis of each gravel in the fourth image by adopting Hotelling transformation to classify each gravel in the fourth image, and drawing a particle size distribution diagram of each type of gravel.
According to the method provided by the embodiment of the invention, 2 key parameters (namely the first threshold and the second threshold) of each digital image (namely the first image to be measured) are captured through the neural network model, the particle size distribution of the gravel can be automatically and accurately measured, the problem that the prior art cannot fully identify the 2 key parameters of each digital image is effectively solved, and the accuracy of measuring the particle size distribution of the gravel is improved.
Based on the above embodiment, in the embodiment of the present invention, the neural network model is obtained according to the following method:
acquiring an original color image to be detected; wherein the original color image includes a plurality of gravel and background objects. And performing downsampling on the original color image by adopting discrete wavelet transform to obtain a first image to be detected.
In particular, the input metric is reduced using a Discrete Wavelet Transform (DWT). For example, an original color image is a 256-metric input signal, down-sampled by DWT to 2 128-metric signals, where the noise is filtered by a high-pass filter and an approximation is retained by a low-pass filter. Starting with 256 metrics, the DWT based down-sampling procedure is repeated five times and after the 5 th down-sampling an 8-metric signal is generated by the low-pass filter as the first image.
Based on the above embodiment, in the embodiment of the present invention, the inputting the first image to be measured to the preset neural network model further includes:
obtaining a plurality of sample original color images; wherein the sample original color image includes a plurality of gravel and background objects.
Specifically, the steps of obtaining a plurality of sample original color images are as follows: bed images of 20 river sections and 40-80 river beds per river section were taken in a square area of 1 square meter. The collected images are classified into 2 types according to the boundary density: class a (with no significant sand) and class B (with significant sand). For a few high boundary density but not sandy images, manual image analysis manually removes these poor quality images, taking each of the remaining images as a sample original color image.
And performing downsampling on each sample original image by adopting discrete wavelet transform to obtain a first sample image corresponding to each sample original image.
Specifically, for each sample original color image, the Discrete Wavelet Transform (DWT) is used to reduce the input metric. For example, an original color image is a 256-metric input signal, down-sampled by DWT to 2 128-metric signals, where the noise is filtered by a high-pass filter and an approximation is retained by a low-pass filter. Starting with 256 metrics, the DWT based down-sampling procedure is repeated five times and after the 5 th down-sampling, an 8-metric signal is generated by the low-pass filter as the first sample image corresponding to the original color image of the sample.
And acquiring a first sample threshold value and a second sample threshold value corresponding to each first sample image, and combining each sample original image and the corresponding first sample threshold value and second sample threshold value to form a sample.
Specifically, a first sample threshold T corresponding to each first sample image is used for identifying a background object in the first sample image, and a second sample threshold H corresponding to each first sample image is an H value in H-minima transformation performed on the first sample image. In the embodiment of the present invention, a method for calculating Accuracy (AR) based on AGS obtains a first sample threshold T and a second sample threshold H corresponding to each first sample image, and includes the following specific steps: see first the following formula, where tob,tesAnd n is the observed, measured and total grain size grade numbers (increased from 4 to 9psi in 0.5psi increments). In each first sample image, AGS measures grain size by trying different T and H. T is in [50, 250 ]]Is searched at 5 intervals, and H is in [1, 15 ]]Is searched at intervals of 1. Therefore, a total of 615(═ 15 × 41) ARs need to be calculated for each first sample image, and thus, for each first sample image, T and H are obtained in association with the maximum AR value.
Figure BDA0003158676130000081
A first portion of the samples are combined in a plurality of the samples to form a training set, and the neural network model is trained based on the training set to adjust parameters of the neural network model.
Based on the foregoing embodiments, in the embodiments of the present invention, training the neural network model based on the training set to adjust parameters of the neural network model includes:
and for any one sample, inputting the first sample image in the sample into the neural network model, and outputting a first prediction threshold value and a second prediction threshold value corresponding to the first sample image.
Calculating a loss value by adopting a preset loss function according to the first prediction threshold value and the first sample threshold value in the samples, and the second prediction threshold value and the second sample threshold value in the samples, wherein the loss value is a weighted sum of a first prediction threshold value accumulated error and a second prediction threshold value accumulated error, and the first prediction threshold value accumulated error is an absolute value of a difference between the first prediction threshold value and the first sample prediction threshold value of each sample; the second prediction threshold accumulated error is the second prediction threshold of each sample and the absolute value of the second sample prediction threshold difference.
And if the loss value is smaller than a preset threshold value, finishing the training of the neural network model.
Based on the above embodiment, in the embodiment of the present invention, a second part of the samples may be further combined to form a validation set in a plurality of the samples, and the optimal neural network model may be determined based on the validation set.
Based on the above embodiments, the embodiments of the present invention are described as a preferred embodiment of a CFNN:
in inputting the first image selected in the above embodiments into the CFNN, the CFNN analyzes the characteristics of the first image by calculating the probability of occurrence of each gray level, where n is the total number of pixels (e.g., n is 1000 × 1000), and n is the total number of pixels in the first imagekIs the gray scale gkP (g) is the number of pixelsk) Has 256 measurements (0-255 gray levels), and
Figure BDA0003158676130000091
according to the input first image, the CFNN calculates the characteristics of the first image, and then performs pattern matching (performed by a gaussian function) to output a first threshold and a second threshold corresponding to the first image.
Based on the above embodiment, an embodiment of the present invention further provides a device for measuring a particle size distribution of gravel, fig. 2 is a schematic structural diagram of the device for measuring a particle size distribution of gravel provided by an embodiment of the present invention, as shown in fig. 2, the device includes:
the input module 201 is configured to input a first image to be detected to a preset neural network model, so as to obtain a first threshold and a second threshold corresponding to the first image output by the neural network model; wherein the first image comprises a plurality of gravel and background objects. And the background removing module 202 is configured to remove a background scene in the first image based on an automatic particle size distribution algorithm and the first threshold to obtain a second image. And the filling module 203 is configured to fill each gravel in the second image by using a region filling technique, so as to obtain a third image. And a segmentation module 204, configured to use the second threshold as an H value in an H-minima transformation, and segment each gravel in the third image based on a watershed algorithm of the H-minima transformation to obtain a fourth image. A drawing module 205, configured to measure a short axis of each gravel in the fourth image by using a Hotelling transform, to classify each gravel in the fourth image, and to draw a particle size distribution map of each type of gravel.
The apparatus provided in the embodiment of the present invention is used for executing the method in the above embodiment, and the method has been described in detail in the above embodiment, so the apparatus is not described herein again. The device provided by the embodiment of the invention can automatically and accurately measure the particle size distribution of the gravel by capturing 2 key parameters (namely the first threshold value and the second threshold value) of each digital image (namely the first image to be measured) through the neural network model, effectively overcomes the problem that the prior art cannot fully identify 2 key parameters of each digital image, and improves the accuracy of measuring the particle size distribution of the gravel.
Based on the above embodiment, the apparatus provided in the embodiment of the present invention further includes:
the image acquisition module is used for acquiring a plurality of sample original color images; wherein the sample original color image includes a plurality of gravel and background objects.
And the downsampling module is used for downsampling each sample original image by adopting discrete wavelet transform to obtain a first sample image corresponding to each sample original image.
And the threshold acquisition module is used for acquiring a first sample threshold and a second sample threshold corresponding to each first sample image, and combining each sample original image and the corresponding first sample threshold and second sample threshold as a sample.
And the training module is used for combining a plurality of samples to form a training set, and training the neural network model based on the training set to adjust the parameters of the neural network model.
In summary, the method and the apparatus provided in the embodiments of the present invention have the following advantages:
a fine automatic grain size sorting (R-AGS) method is provided, AGS and CFNN are fused, in order to ensure that the R-AGS has strong robustness and can be applied to complex images of natural river beds, the constructed CFNN is enough to provide a proper binary threshold value for each river bed image so as to distinguish gravel and sand from the river bed image, and the CFNN is allocated to H-minima to transform a proper threshold value so as to effectively control WST over-segmentation, so the R-AGS is superior to the prior AGS in terms of gravel particle size distribution measurement.
Furthermore, when the image sample under investigation is significantly different from the image of this study, it is easy to reconstruct the CFNN by updating and/or adding rule nodes, and therefore its applicability and utility can be expanded.
In summary, the R-AGS presented by the embodiments of the present invention not only can automatically and adaptively process various captured riverbed images to obtain corresponding gravel size distributions, thereby replacing complex and time-consuming manual sampling methods, but also has the ability to simultaneously reduce the quantification of gravel size distributions, the labor-intensive and time-consuming laboratory, and automatically and accurately measure the gravel size distributions with less labor intensity for each digital image.
Fig. 3 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 3, the electronic device may include: a processor (processor)301, a communication Interface (communication Interface)302, a memory (memory)303 and a communication bus 304, wherein the processor 301, the communication Interface 302 and the memory 303 complete communication with each other through the communication bus 304. The processor 301 may invoke a computer program stored on the memory 303 and executable on the processor 301 to perform the methods provided by the various embodiments described above, including, for example: inputting a first image to be detected into a preset neural network model to obtain a first threshold value and a second threshold value corresponding to the first image output by the neural network model; wherein the first image comprises a plurality of gravel and background objects; removing background objects in the first image based on an automatic particle size distribution algorithm and the first threshold value to obtain a second image; filling each gravel in the second image by adopting an area filling technology to obtain a third image; taking the second threshold value as an H value in H-minima transformation, and segmenting each gravel in the third image based on a watershed algorithm of the H-minima transformation to obtain a fourth image; and measuring the short axis of each gravel in the fourth image by adopting a Hotelling transformation to classify each gravel in the fourth image, and drawing a particle size distribution diagram of each type of gravel.
In addition, the logic instructions in the memory 303 may be implemented in the form of software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or make a contribution to the prior art, or may be implemented in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Embodiments of the present invention further provide a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program is implemented to perform the transmission method provided in the foregoing embodiments when executed by a processor, and the method includes: inputting a first image to be detected into a preset neural network model to obtain a first threshold value and a second threshold value corresponding to the first image output by the neural network model; wherein the first image comprises a plurality of gravel and background objects; removing background objects in the first image based on an automatic particle size distribution algorithm and the first threshold value to obtain a second image; filling each gravel in the second image by adopting an area filling technology to obtain a third image; taking the second threshold value as an H value in H-minima transformation, and segmenting each gravel in the third image based on a watershed algorithm of the H-minima transformation to obtain a fourth image; and measuring the short axis of each gravel in the fourth image by adopting a Hotelling transformation to classify each gravel in the fourth image, and drawing a particle size distribution diagram of each type of gravel.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
It will be understood by those skilled in the art that the foregoing is only a preferred embodiment of the present invention, and is not intended to limit the invention, and that any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1.一种砾石的粒度分布测量方法,其特征在于,包括:1. a particle size distribution measuring method of gravel, is characterized in that, comprises: 将待测的第一图像输入至预设的神经网络模型,得到所述神经网络模型输出的所述第一图像对应的第一阈值和第二阈值;其中,所述第一图像包括多个砾石和背景物;Inputting the first image to be tested into a preset neural network model to obtain a first threshold and a second threshold corresponding to the first image output by the neural network model; wherein the first image includes a plurality of gravels and background; 基于自动粒度分布算法和所述第一阈值去除所述第一图像中的背景物,得到第二图像;Remove the background in the first image based on the automatic particle size distribution algorithm and the first threshold to obtain a second image; 采用区域填充技术对所述第二图像中的各个砾石进行填充,得到第三图像;Fill each gravel in the second image by using the area filling technology to obtain a third image; 将所述第二阈值作为H-minima变换中的h值,基于所述H-minima变换的分水岭算法对所述第三图像中的各个砾石进行分割,得到第四图像;Taking the second threshold as the h value in the H-minima transformation, and dividing each gravel in the third image based on the watershed algorithm of the H-minima transformation to obtain a fourth image; 采用Hotelling变换测量所述第四图像中各个砾石的短轴,以对所述第四图像中的各个砾石进行分类,并绘制各类砾石的粒度分布图。The short axis of each gravel in the fourth image is measured by using Hotelling transform, so as to classify each gravel in the fourth image and draw a particle size distribution map of each type of gravel. 2.如权利要求1所述的砾石的粒度分布测量方法,其特征在于,所述神经网络模型为基于反向传播的模糊神经网络。2 . The particle size distribution measurement method of gravel according to claim 1 , wherein the neural network model is a fuzzy neural network based on back-propagation. 3 . 3.如权利要求1所述的砾石的粒度分布测量方法,其特征在于,将待测的第一图像输入至预设的神经网络模型,之前还包括:3. The method for measuring the particle size distribution of gravel as claimed in claim 1, wherein the first image to be measured is input into a preset neural network model, further comprising: 获取待测的原始彩色图像;其中,所述原始彩色图像包括多个砾石和背景物;Obtain the original color image to be tested; wherein, the original color image includes multiple gravels and background objects; 采用离散小波变换对所述原始彩色图像进行下采样,得到待测的第一图像。The original color image is down-sampled by discrete wavelet transform to obtain the first image to be tested. 4.如权利要求1所述的砾石的粒度分布测量方法,其特征在于,所述神经网络模型按照如下方法获取:4. the particle size distribution measuring method of gravel as claimed in claim 1, is characterized in that, described neural network model obtains according to the following method: 获取多个样本原始彩色图像;其中,所述样本原始彩色图像包括多个砾石和背景物;acquiring a plurality of original color images of samples; wherein, the original color images of samples include a plurality of gravels and background objects; 采用离散小波变换对每个所述样本原始图像进行下采样,得到每个所述样本原始图像对应的第一样本图像;Using discrete wavelet transform to downsample each of the sample original images to obtain a first sample image corresponding to each of the sample original images; 获取每个所述第一样本图像对应的第一样本阈值和第二样本阈值,并将每个所述样本原始图像及对应的第一样本阈值和第二样本阈值组合作为一个样本;Obtain the first sample threshold value and the second sample threshold value corresponding to each of the first sample images, and combine each of the sample original images and the corresponding first sample threshold value and the second sample threshold value as a sample; 将多个所述样本组合形成训练集,基于所述训练集训练所述神经网络模型以调整所述神经网络模型的参数。A plurality of the samples are combined to form a training set, and the neural network model is trained based on the training set to adjust parameters of the neural network model. 5.如权利要求4所述的砾石的粒度分布测量方法,其特征在于,基于所述训练集训练所述神经网络模型以调整所述神经网络模型的参数,包括:5. The method for measuring particle size distribution of gravel according to claim 4, wherein training the neural network model based on the training set to adjust the parameters of the neural network model, comprising: 对于任意一个所述样本,将所述样本中的所述第一样本图像输入至所述神经网络模型,输出所述第一样本图像对应的第一预测阈值和第二预测阈值;For any one of the samples, the first sample image in the sample is input to the neural network model, and the first prediction threshold and the second prediction threshold corresponding to the first sample image are output; 采用预设的损失函数根据所述第一预测阈值与所述样本中的所述第一样本阈值,以及所述第二预测阈值与所述样本中的所述第二样本阈值,计算损失值;Using a preset loss function, a loss value is calculated according to the first prediction threshold and the first sample threshold in the samples, and the second prediction threshold and the second sample threshold in the samples ; 若所述损失值小于预设阈值,则所述神经网络模型训练完成。If the loss value is less than the preset threshold, the training of the neural network model is completed. 6.如权利要求4所述的砾石的粒度分布测量方法,其特征在于,获取每个所述第一样本图像对应的第一样本阈值和第二样本阈值,包括:6. The method for measuring the particle size distribution of gravel according to claim 4, wherein obtaining the first sample threshold and the second sample threshold corresponding to each of the first sample images, comprising: 基于自动粒度分布算法,获取每个所述第一样本图像对应的第一样本阈值和第二样本阈值。Based on an automatic particle size distribution algorithm, a first sample threshold and a second sample threshold corresponding to each of the first sample images are obtained. 7.一种砾石的粒度分布测量装置,其特征在于,包括:7. A particle size distribution measuring device of gravel, characterized in that, comprising: 输入模块,用于将待测的第一图像输入至预设的神经网络模型,得到所述神经网络模型输出的所述第一图像对应的第一阈值和第二阈值;其中,所述第一图像包括多个砾石和背景物;an input module, configured to input the first image to be tested into a preset neural network model to obtain a first threshold and a second threshold corresponding to the first image output by the neural network model; wherein the first The image includes multiple gravel and background objects; 背景去除模块,用于基于自动粒度分布算法和所述第一阈值去除所述第一图像中的背景物,得到第二图像;A background removal module, configured to remove the background in the first image based on the automatic particle size distribution algorithm and the first threshold to obtain a second image; 填充模块,用于采用区域填充技术对所述第二图像中的各个砾石进行填充,得到第三图像;a filling module, used for filling each gravel in the second image by using an area filling technology to obtain a third image; 分割模块,用于将所述第二阈值作为H-minima变换中的h值,基于所述H-minima变换的分水岭算法对所述第三图像中的各个砾石进行分割,得到第四图像;a segmentation module, configured to use the second threshold as the h value in the H-minima transformation, and segment each gravel in the third image based on the watershed algorithm of the H-minima transformation to obtain a fourth image; 绘制模块,用于采用Hotelling变换测量所述第四图像中各个砾石的短轴,以对所述第四图像中的各个砾石进行分类,并绘制各类砾石的粒度分布图。The drawing module is used to measure the short axis of each gravel in the fourth image by using Hotelling transformation, so as to classify each gravel in the fourth image, and draw a particle size distribution diagram of each type of gravel. 8.如权利要求7所述的砾石的粒度分布测量装置,其特征在于,还包括:8. The particle size distribution measuring device of gravel as claimed in claim 7, further comprising: 图像获取模块,用于获取多个样本原始彩色图像;其中,所述样本原始彩色图像包括多个砾石和背景物;an image acquisition module for acquiring multiple original color images of samples; wherein, the original color images of samples include multiple gravels and background objects; 下采样模块,用于采用离散小波变换对每个所述样本原始图像进行下采样,得到每个所述样本原始图像对应的第一样本图像;a downsampling module, configured to downsample each of the sample original images by using discrete wavelet transform to obtain a first sample image corresponding to each of the sample original images; 阈值获取模块,用于获取每个所述第一样本图像对应的第一样本阈值和第二样本阈值,并将每个所述样本原始图像及对应的第一样本阈值和第二样本阈值组合作为一个样本;A threshold value acquisition module is used to acquire a first sample threshold value and a second sample threshold value corresponding to each of the first sample images, and to obtain each of the sample original images and the corresponding first sample threshold value and the second sample threshold value Threshold combination as a sample; 训练模块,用于将多个所述样本组合形成训练集,基于所述训练集训练所述神经网络模型以调整所述神经网络模型的参数。A training module, configured to combine a plurality of the samples to form a training set, and train the neural network model based on the training set to adjust parameters of the neural network model. 9.一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时实现如权利要求1至7任一项所述方法的步骤。9. An electronic device, comprising a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor implements any one of claims 1 to 7 when the processor executes the program the steps of the method described in item. 10.一种非暂态计算机可读存储介质,其上存储有计算机程序,其特征在于,该计算机程序被处理器执行时实现如权利要求1至7任一项所述方法的步骤。10. A non-transitory computer-readable storage medium on which a computer program is stored, characterized in that, when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
CN202110784549.4A 2021-07-12 2021-07-12 Gravel particle size distribution measuring method and device Withdrawn CN113470058A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110784549.4A CN113470058A (en) 2021-07-12 2021-07-12 Gravel particle size distribution measuring method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110784549.4A CN113470058A (en) 2021-07-12 2021-07-12 Gravel particle size distribution measuring method and device

Publications (1)

Publication Number Publication Date
CN113470058A true CN113470058A (en) 2021-10-01

Family

ID=77879819

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110784549.4A Withdrawn CN113470058A (en) 2021-07-12 2021-07-12 Gravel particle size distribution measuring method and device

Country Status (1)

Country Link
CN (1) CN113470058A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114612450A (en) * 2022-03-17 2022-06-10 无锡东如科技有限公司 Image detection segmentation method and system based on data augmentation machine vision and electronic equipment
CN114881938A (en) * 2022-04-20 2022-08-09 山东省科学院激光研究所 Grain size detection method and system based on wavelet analysis and neural network

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112733920A (en) * 2020-12-31 2021-04-30 中国地质调查局成都地质调查中心 Image identification method and system based on deep learning

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112733920A (en) * 2020-12-31 2021-04-30 中国地质调查局成都地质调查中心 Image identification method and system based on deep learning

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CHANG-HAN CHUNG 等: "A refined automated grain sizing method for estimating river-bed grain size distribution of digital images", 《JOURNAL OF HYDROLOGY(WWW.ELSEVIER.COM/LOCATE/JHYDROL)》, pages 2 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114612450A (en) * 2022-03-17 2022-06-10 无锡东如科技有限公司 Image detection segmentation method and system based on data augmentation machine vision and electronic equipment
CN114612450B (en) * 2022-03-17 2023-09-05 无锡东如科技有限公司 Image detection segmentation method and system based on data augmentation machine vision and electronic equipment
CN114881938A (en) * 2022-04-20 2022-08-09 山东省科学院激光研究所 Grain size detection method and system based on wavelet analysis and neural network

Similar Documents

Publication Publication Date Title
CN109191459B (en) Automatic identification and rating method for continuous casting billet macrostructure center segregation defect
CN107507173B (en) A no-reference sharpness assessment method and system for whole slice images
CN107644420B (en) Vascular image segmentation method and MRI system based on centerline extraction
CN100545865C (en) An Automatic Segmentation Method for Optimizing the Initial Segmentation Boundary of Image
CN110232670B (en) A method for image visual effect enhancement based on high and low frequency separation
CN104978715A (en) Non-local mean image denoising method based on filtering window and parameter self-adaption
CN113435460A (en) Method for identifying brilliant particle limestone image
CN109118445A (en) A kind of underwater picture Enhancement Method generating confrontation network based on multiple-limb
CN104376556A (en) Rock CT image target segmentation method
CN113470058A (en) Gravel particle size distribution measuring method and device
CN113012124B (en) Shoe print hole and embedded object feature detection and description method
CN109241867B (en) Method and device for recognizing digital rock core image by adopting artificial intelligence algorithm
CN111161224A (en) Classification and evaluation system and method of casting internal defects based on deep learning
CN108122221A (en) The dividing method and device of diffusion-weighted imaging image midbrain ischemic area
CN109544571A (en) A kind of metallic phase image edge detection method based on mathematical morphology
Chung et al. A refined automated grain sizing method for estimating river-bed grain size distribution of digital images
CN110517226B (en) Tobacco stem region extraction method based on bilateral filtering and multi-feature texture image fusion
CN117788345B (en) Land remote sensing image correction and enhancement method
Purnama et al. Follicle detection on the usg images to support determination of polycystic ovary syndrome
CN105631890A (en) Defocused image quality evaluation method based on image gradient and phase consistency
CN115797473A (en) A Concrete Forming Evaluation Method for Civil Engineering
CN109829879B (en) Method and device for detecting vascular bundle
CN115908142A (en) Contact net tiny part damage testing method based on visual recognition
CN117237245B (en) Industrial material quality monitoring method based on artificial intelligence and Internet of things
CN110443790B (en) Cartilage identification method and system in medical image

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20211001