CN117689673B - WC particle electron microscope image segmentation and particle size distribution calculation method based on watershed - Google Patents

WC particle electron microscope image segmentation and particle size distribution calculation method based on watershed Download PDF

Info

Publication number
CN117689673B
CN117689673B CN202410155550.4A CN202410155550A CN117689673B CN 117689673 B CN117689673 B CN 117689673B CN 202410155550 A CN202410155550 A CN 202410155550A CN 117689673 B CN117689673 B CN 117689673B
Authority
CN
China
Prior art keywords
image
pixel
particle
watershed
foreground
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410155550.4A
Other languages
Chinese (zh)
Other versions
CN117689673A (en
Inventor
刘翊
钟逸轩
刘凯
刘淑丽
梁云龙
雷高攀
赵又红
李明富
周受钦
刘金刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiangtan University
Original Assignee
Xiangtan University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiangtan University filed Critical Xiangtan University
Priority to CN202410155550.4A priority Critical patent/CN117689673B/en
Publication of CN117689673A publication Critical patent/CN117689673A/en
Application granted granted Critical
Publication of CN117689673B publication Critical patent/CN117689673B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • G06T5/30Erosion or dilatation, e.g. thinning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • 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/20036Morphological image processing
    • 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/20092Interactive image processing based on input by user
    • G06T2207/20104Interactive definition of region of interest [ROI]
    • 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/20112Image segmentation details
    • G06T2207/20152Watershed segmentation

Landscapes

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

Abstract

The invention belongs to the technical field of image processing, and discloses a WC particle electron microscope image segmentation and particle size distribution calculation method based on watershed. The method comprises the steps of preprocessing an original image of WC particles by using a computer vision image processing method, extracting ROI regions from the image, performing image segmentation operation on each ROI region, obtaining a distance conversion image by using Euclidean distance conversion, generating an optimal segmentation threshold value of the ROI region by using a local mean method, analyzing by using a communication component to obtain a marked image, segmenting the marked image by using a watershed algorithm, extracting edge contours of the marked image, and extracting characteristics of the marked image by using image pixel information. And calculating the physical area of the particles through the identified particle profile, converting the particle area into the equivalent circle diameter, and calculating the PSD result. The method can efficiently and accurately complete WC particle segmentation and extract PSD results thereof, can be used for accurately predicting the performance of particles, and is convenient for adjustment and control in the preparation process of hard alloy.

Description

WC particle electron microscope image segmentation and particle size distribution calculation method based on watershed
Technical Field
The invention belongs to the technical field of image processing, and particularly relates to a WC particle electron microscope image segmentation and particle size distribution calculation method based on a watershed.
Background
WC particles are a kind of cemented carbide particles consisting mainly of tungsten carbide and cobalt powder, commonly referred to as tungsten cobalt particles. It has the excellent properties of high hardness, good wear resistance, high temperature resistance, corrosion resistance and the like, therefore, the method is widely applied to various fields and has wide application prospect.
In the preparation of cemented carbide, WC Particle Size Distribution (PSD) has an important influence on micro-domain deformation and mechanical behavior. Microscopic deformation mechanism analysis shows that the alloy with more uniform particle size distribution and more uniform stress distribution, so that the material has better mechanical property. The method affects the microstructure, hardness, fracture toughness and interface bonding strength of the composite coating at the same time, and is an important analysis index of WC quality. At present, the actual measurement of the particle size is a statistical index, and common methods include Fisher size, BET method, laser particle size method and the like. However, these methods measure the relative particle size, and the absolute particle size is difficult to measure. Because the particles are agglomerated and adsorbed, the true particle size cannot be reflected. These all prevent timely guidance by results during production, and therefore timely and accurate on-line PSD analysis methods are highly desirable.
The core of the PSD analysis method is the segmentation identification of the particle edges. However, WC particles are various in shape, irregular and different in size, rough in surface, have many tiny protrusions and depressions, blurred in edges, have a lot of noise on images under an electron microscope, and have flocculent stains similar to the WC particles in shape, which have a great influence on the parting effect. Based on the characteristics of WC particles, the manual identification efficiency is too low, and the traditional segmentation method cannot realize segmentation directly and accurately.
Disclosure of Invention
In order to solve the problems, the invention provides a WC particle electron microscope image segmentation method based on a watershed, which can efficiently and accurately complete WC particle segmentation tasks. The specific technical scheme is as follows.
The WC particle electron microscope image segmentation method based on the watershed comprises the following steps:
s1, acquiring an original image of WC particles and performing image preprocessing;
S2, carrying out preliminary extraction on image contours, and extracting an ROI (region of interest) area for each contour;
s3, traversing each ROI region, and independently carrying out the processing from the step S31 to the step S35 on each ROI region, and covering the processing results of each ROI region on the corresponding region of the original image;
S31, carrying out bilateral filtering pretreatment on the ROI area image, and then carrying out graying and binarization treatment on the image to obtain a binary image;
s32, processing the image by using a Euclidean distance transformation method to obtain a distance transformation image;
s33, processing the distance conversion image by using a Gaussian smoothing function, obtaining an optimal threshold value of a foreground pixel by using a local mean value method, and performing binarization processing;
s34, performing expansion processing on the binary image, and performing difference operation on the binarization result of the morphological processed image and the distance conversion image under each threshold value to obtain an unknown region;
s35, traversing the image pixels after the difference value, finding out non-zero pixels, and marking the positions corresponding to the connected region marking graphs; the application of watershed algorithms uses markers to perform image segmentation.
Further, in the step S31, the method for performing bilateral filtering preprocessing on the ROI area image includes:
For arbitrary images Given its output image/>The bilateral filter function of any pixel at the image coordinates is expressed as follows:
Wherein the method comprises the steps of For bilateral filtered output image/>In coordinates/>Pixel values at; /(I)Is the radius of the filter; /(I)Representing input image/>The middle coordinates are/>Pixel values at; /(I)A representation weight function for calculating the effect of a pixel at a given location on an output pixel; i. j represents the pixel offset in the abscissa and ordinate directions in the input image I, respectively, and the range is from/>To/>;/>Representing normalized bilateral weights, the function of which is expressed as:
Wherein, Representing the radius of the filter; i. j represents the pixel shift amount/>, respectively, in the abscissa direction and the ordinate direction in the input image IThe range is from/>To/>;/>Is a spatial domain weight, measuring the pixel (/ >)) And center pixel/>Spatial distance between,/>Is the gray value domain weight, and measures the pixel/>And center pixel/>Pixel value similarity between the two pixels is calculated by using a Gaussian function:
wherein I, j denote pixel offsets in the abscissa and ordinate directions, respectively, in the input image I The standard deviation of the space domain and the standard deviation of the gray value domain are respectively adopted.
Further, in the step S31, the method for performing the graying and binarization processing on the image to obtain the binary image specifically includes: and (3) through analyzing the characteristics of the gray distribution histogram of the image, selecting an OTSU algorithm to obtain an optimal binarization threshold value of the image interval, and performing binarization processing on the image.
Further, in the step S32, the method for processing the image by using the euclidean distance transform method to obtain the distance transformed image specifically includes: and processing the binary image by using an Euclidean distance conversion method to obtain the distance between each pixel point and the nearest edge pixel, namely calculating the distance from each foreground pixel to the nearest background pixel, normalizing the calculation result, and generating a distance conversion image by taking the calculation result as the gray value of the pixel.
Further, in the step S32, for the binary image I, where the pixel point has a value of 0 or 1, which respectively represents the background and the foreground, the shortest euclidean distance from each foreground pixel to the nearest background pixel point is found, the distance gray value is obtained, and normalized by using a normalization formula; the European calculated distance formula is shown below,
,/>
Wherein,Representing a foreground pixel, x 1、y1 being the abscissa of the foreground pixel p, respectively; /(I)Representing a background pixel, x 2、y2 being the abscissa of the background pixel q, respectively; /(I)Representing foreground pixelsThe Euclidean distance is normalized.
Further, in the step S33, the process of obtaining the optimal threshold value of the foreground pixel by using the local mean value method and performing the binarization processing specifically includes: and generating a binary mask according to the local mean image, marking pixels larger than the local mean in the distance conversion image as foreground pixels, marking pixels smaller than or equal to the local mean as background pixels, and performing binarization processing on the image by taking the average gray value of the foreground pixels as a threshold value to obtain a segmentation result.
Further, before step S34, there is further provided the step of: and analyzing the determined foreground mark by using a connected component analysis algorithm to obtain an initial mark image, wherein the mark value of the foreground area is 2, and the mark value of the background area is 1.
The invention further aims to provide a water-splitting-ridge-based WC particle electron microscope image particle size distribution calculation method which is used for accurately predicting the performance of particles so as to adjust and control in the preparation process of hard alloy, and particle materials suitable for different application scenes can be selected to improve the product performance and meet the production requirements. The method comprises the following steps:
Obtaining segmented WC particle electron microscope images by using the WC particle electron microscope image segmentation method based on the watershed;
Calculating the equivalent circle diameter of the particles, counting the equivalent diameter frequency of each interval, and drawing a histogram to obtain a PSD result.
Further, the method for calculating the equivalent circle diameter of the particles comprises the following steps:
Calculating the image resolution of an electron microscope according to the obtained WC particle contours, traversing each WC particle contour, obtaining the particle area by calculating the number of pixel points in the contour, and converting the particle area into the equivalent circle diameter The specific calculation formulas are as follows:
,/>
where u is the index of the pixel point on the weld spot contour; n is the total number of pixel points on the outline of the welding spot; a u-th pixel on or within the soldered outline; /(I) Is the area of the particle.
Further, the method for obtaining the PSD result by counting the frequency drawing histogram of the equivalent diameter of each interval specifically comprises the following steps:
grouping the equivalent diameter data according to a certain interval, counting the equivalent diameter frequency in each interval, setting the interval as an X axis, setting the equivalent diameter frequency as a Y axis, and drawing a histogram to obtain a PSD result.
Compared with the prior art, one or more of the technical schemes can achieve at least one of the following beneficial effects:
The invention uses the image processing method of computer vision to preprocess the original image of WC particles, extracts the ROI region from the image, and performs image segmentation operation on each ROI region, including using Euclidean distance transformation to obtain a distance transformation image, using a local mean method to generate the optimal segmentation threshold of the ROI region, using a communication component to analyze and obtain a marked image, using a watershed algorithm to segment the marked image, extracting the edge contour of the marked image, and further extracting the characteristics of the marked image through image pixel information. And calculating the physical area of the particles through the identified particle profile, converting the particle area into the equivalent circle diameter, and calculating the PSD result. The WC particle segmentation task can be efficiently and accurately completed, and the online PSD analysis function of WC particles is realized; compared with the traditional method of manual identification, the method can provide a high-efficiency, accurate and nondestructive measurement means, acquire accurate WC particle PSD information, and is convenient for providing timely and effective guidance in the production process.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a WC particle electron microscope image segmentation method based on a watershed in example 2.
FIG. 2 is a schematic diagram of ROI area selection in example 1.
FIG. 3 is a schematic diagram of the individual processing regions of example 1.
Fig. 4 is a diagram showing the effect of the edge filtering processing in embodiment 1.
Fig. 5 is a diagram showing the effect of the binarization processing in example 1.
Fig. 6 is a graph showing the effect of the euclidean distance conversion process according to example 1.
Fig. 7 is a diagram showing the final segmentation effect of the ROI area in example 1.
Fig. 8 is a final image segmentation effect diagram according to embodiment 1.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
The embodiment provides a WC particle electron microscope image segmentation method based on watershed, which comprises the following steps:
s1, acquiring an original image of WC particles by using an electron microscope, preprocessing the original image by using binarization and morphological operation, and filling holes.
S2, as shown in FIG. 2, an edge recognition algorithm such as a Canny operator is used for carrying out preliminary extraction on the image contours, and ROI areas are extracted for each contour.
S3, traversing each ROI area, performing the processing from the step S31 to the step S35 on each ROI area, and covering the processing result to the original image area. As shown in fig. 3,3 of which are shown. The specific treatment method comprises the following steps:
s31, carrying out bilateral filtering pretreatment on the ROI area image, and then carrying out graying and binarization treatment on the image to obtain a binary image.
S311, preprocessing the ROI area image by using bilateral filtering, smoothing a non-edge part, smoothing away detail parts in the image, effectively removing noise and stains in the image, and retaining image edge information, wherein the effect is shown in figure 4.
For arbitrary imagesGiven its output image/>Any pixel/>, at image coordinatesThe bilateral filtering function of (2) is represented as follows.
Wherein the method comprises the steps ofRepresenting bilateral filtered output image/>In coordinates/>Pixel values at; /(I)Representing the radius of the filter; /(I)Representing input image/>The middle coordinates are/>Pixel values at; /(I)A representation weight function for calculating the effect of a pixel at a given location on an output pixel; i. j represents the pixel offset in the abscissa and ordinate directions in the input image I, respectively, and the range is from/>To/>;/>Representing normalized bilateral weights, the function of which is expressed as:
Wherein, Representing the radius of the filter; i. j represents the pixel shift amount/>, respectively, in the abscissa direction and the ordinate direction in the input image IThe range is from/>To/>;/>Is a spatial domain weight that measures the pixel (/ >)) And center pixel/>Spatial distance between,/>Is a gray scale range weight that measures the pixelAnd center pixel/>Pixel value similarity between the two pixels is calculated by using a Gaussian function:
wherein I, j denote pixel offsets in the abscissa and ordinate directions, respectively, in the input image I Spatial domain standard deviation/>Gray value range standard deviation/>All 75 and window size 7.
S312, carrying out gray level processing on the regional image, selecting an OTSU algorithm to obtain an optimal binarization threshold value of an image interval by analyzing the gray level distribution histogram characteristics of the image, and carrying out binarization processing on the image, wherein the processing result is shown in figure 5.
S32, processing the image by using a Euclidean distance conversion method to obtain a distance conversion image.
Specifically, the binary image is processed by using a euclidean distance conversion method to obtain the distance between each pixel point and the nearest edge pixel, that is, the distance between each foreground pixel and the nearest background pixel is calculated, the calculation result is normalized, the calculation result is used as the gray value of the pixel, a distance conversion image is generated, and the generated distance conversion image is shown in fig. 6.
The Euclidean calculated distance formula is shown below, and for a binary image I, wherein the pixel point has a value of 0 or 1, which respectively represents the background and the foreground, the shortest Euclidean distance from each foreground pixel to the nearest background pixel point is found, the distance gray value is obtained and normalized by using a normalization formula, so that the subsequent processing and visualization can be realized.
,/>
Wherein,Representing a foreground pixel, x 1、y1 being the abscissa of the foreground pixel p, respectively; /(I)Representing a background pixel, x 2、y2 being the abscissa of the background pixel q, respectively; /(I)Representing foreground pixelsThe Euclidean distance is normalized.
S33, processing the gray level image by using a Gaussian smoothing function, obtaining the optimal threshold value of the foreground pixel by using a local mean value method, and performing binarization processing.
Specifically, a Gaussian smoothing function is used for smoothing the image after the distance transformation, noise is removed, and then a local mean value method is used for determining the optimal marking threshold value of the distance transformation image to obtain a local mean value image. And generating a binary mask according to the local mean image, marking pixels larger than the local mean in the distance conversion image as foreground pixels, marking pixels smaller than or equal to the local mean as background pixels, and performing binarization processing on the image by taking the average gray value of the foreground pixels as a threshold value to obtain a segmentation result.
The basic idea of the local mean method is to determine the marking threshold value of each pixel by calculating the average gray value of the pixel within a certain range around the pixel point. Setting the gray value of the current pixel point asThe size of the neighborhood is n multiplied by n, and the marking threshold value/>, of the pixel pointThe calculation can be made by the following formula:
Wherein, Expressed as/>Pixel points in n×n neighborhood as center,/>Representing summing the gray values of all pixels in the region. Calculating to obtain a marking threshold value/>After that, the gray value of the pixel point may be set to 1 or 0, that is:
,if/>
,if/>
Wherein, Is pixel/>Is a result of binarization of (2).
And analyzing the determined foreground mark by using a connected component analysis algorithm to obtain an initial mark image, wherein the mark value of the foreground area is 2, and the mark value of the background area is 1.
S34, expanding the binary image obtained in the previous step, expanding the foreground image, eliminating tiny noise, and facilitating subsequent operation to obtain the foreground mark better. And performing difference operation on the binarization result of the morphological processed image and the distance conversion image under each threshold value to obtain a mark of the unknown region, and setting the mark value to be 0.
S35, traversing the image pixels after the difference value, finding out non-zero pixels, and marking the corresponding positions of the connected region marking graphs to obtain the watershed mask marks.
Image segmentation is performed using the mask by applying a watershed algorithm based on the watershed mask, resulting in a final segmented image of the region, the segmentation effect of which is shown in fig. 7.
As shown in fig. 8, the image segmentation is realized by overlaying the processing results of each region on the corresponding region of the original image.
Example 2
As shown in fig. 1, the embodiment provides a method for calculating the particle size distribution of WC particle electron microscopy images based on watershed, which comprises the following steps.
The segmented WC particle electron microscope image obtained by applying the watershed-based WC particle electron microscope image segmentation method of example 1 includes steps S1 to S35, and the detailed implementation manner thereof can be referred to example 1 and will not be repeated here.
S1, acquiring an original image of WC particles and performing image preprocessing.
S2, carrying out preliminary extraction on the image contours, and extracting the ROI area for each contour.
S3, traversing each ROI area, and independently carrying out the processing from the step S31 to the step S35 on each ROI area, and covering the processing results of each ROI area on the corresponding area of the original image.
S31, carrying out bilateral filtering pretreatment on the ROI area image, and then carrying out graying and binarization treatment on the image to obtain a binary image.
S32, processing the image by using a Euclidean distance conversion method to obtain a distance conversion image.
S33, processing the gray level image by using a Gaussian smoothing function, obtaining the optimal threshold value of the foreground pixel by using a local mean value method, and performing binarization processing.
S34, performing expansion processing on the binary image, and performing difference operation on the binarization result of the morphological processed image and the distance conversion image under each threshold value to obtain an unknown region.
S35, traversing the image pixels after the difference value, finding out non-zero pixels, and marking the positions corresponding to the connected region marking graphs; the application of watershed algorithms uses markers to perform image segmentation.
S4, calculating the equivalent circle diameter of the particles, counting the frequency of the equivalent circle diameter of each interval, and drawing a histogram to obtain a PSD result.
And calculating the physical area of the particles through the identified particle profile, and converting the particle area into the equivalent circle diameter. Specifically, according to the image resolution of the electron microscope calculated by the profile of the WC particles obtained as shown in fig. 8, each WC particle profile is traversed, the particle area is obtained by calculating the number of pixels inside the profile, and the particle area is converted into an equivalent circle diameter, and the specific calculation formulas are as follows:
,/>
where u is the index of the pixel point on the weld spot contour; n is the total number of pixel points on the outline of the welding spot; a u-th pixel on or within the soldered outline; /(I) Is the area of the particle.
Grouping the equivalent diameter data according to a certain interval, counting the equivalent diameter frequency in each interval, setting the interval as an X axis, setting the equivalent diameter frequency as a Y axis, and drawing a histogram to obtain a PSD result.
The embodiment can efficiently and accurately finish WC particle segmentation tasks and extract PSD results thereof, can be used for accurately predicting the performance of particles, is convenient for adjustment and control in the preparation process of hard alloy, and can be used for selecting particle materials suitable for different application scenes to improve the product performance and meet production requirements.
It is apparent that the above examples are only examples for clearly illustrating the technical solution of the present invention, and are not limiting of the embodiments of the present invention. Other variations or modifications of the above teachings will be apparent to those of ordinary skill in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the invention are to be included in the protection of the present claims.

Claims (10)

1. The WC particle electron microscope image segmentation method based on the watershed is characterized by comprising the following steps of:
s1, acquiring an original image of WC particles and performing image preprocessing;
S2, carrying out preliminary extraction on image contours, and extracting an ROI (region of interest) area for each contour;
s3, traversing each ROI region, and independently carrying out the processing from the step S31 to the step S35 on each ROI region, and covering the processing results of each ROI region on the corresponding region of the original image;
S31, carrying out bilateral filtering pretreatment on the ROI area image, and then carrying out graying and binarization treatment on the image to obtain a binary image;
s32, processing the image by using a Euclidean distance transformation method to obtain a distance transformation image;
s33, processing the distance conversion image by using a Gaussian smoothing function, obtaining an optimal threshold value of a foreground pixel by using a local mean value method, and performing binarization processing;
s34, performing expansion processing on the binary image, and performing difference operation on the binarization result of the morphological processed image and the distance conversion image under each threshold value to obtain an unknown region;
s35, traversing the image pixels after the difference value, finding out non-zero pixels, and marking the positions corresponding to the connected region marking graphs; the application of watershed algorithms uses markers to perform image segmentation.
2. The watershed-based WC particle electron microscope image segmentation method according to claim 1, wherein in the step S31, the method for performing bilateral filtering preprocessing on the ROI area image comprises:
For arbitrary images Given its output image/>The bilateral filter function of any pixel at the image coordinates is expressed as follows:
Wherein the method comprises the steps of Representing bilateral filtered output image/>In coordinates/>Pixel values at; /(I)Representing the radius of the filter; /(I)Representing input image/>The middle coordinates are/>Pixel values at; /(I)A representation weight function for calculating the effect of a pixel at a given location on an output pixel; i. j represents the pixel offset in the abscissa and ordinate directions in the input image I, respectively, and the range is from/>To/>;/>Representing normalized bilateral weights, the function of which is expressed as:
Wherein, Representing the radius of the filter; i. j represents the pixel shift amount/>, respectively, in the abscissa direction and the ordinate direction in the input image IThe range is from/>To/>;/>Is a spatial domain weight, measuring the pixel (/ >)) And a center pixelSpatial distance between,/>Is the gray value domain weight, and measures the pixel/>And center pixel/>Pixel value similarity between the two pixels is calculated by using a Gaussian function:
wherein I, j denote pixel offsets in the abscissa and ordinate directions, respectively, in the input image I 、/>The standard deviation of the space domain and the standard deviation of the gray value domain are respectively adopted.
3. The method for segmenting the WC grain electron microscope image based on the watershed according to claim 1, wherein in the step S31, the method for obtaining the binary image by performing the gray-scale and the binary processing on the image comprises the following steps: and (3) through analyzing the characteristics of the gray distribution histogram of the image, selecting an OTSU algorithm to obtain an optimal binarization threshold value of the image interval, and performing binarization processing on the image.
4. The method for segmenting the WC grain electron microscope image based on the watershed according to claim 1, wherein in the step S32, the method for processing the image by using the euclidean distance transformation method to obtain the distance transformed image is specifically as follows: and processing the binary image by using an Euclidean distance conversion method to obtain the distance between each pixel point and the nearest edge pixel, namely calculating the distance from each foreground pixel to the nearest background pixel, normalizing the calculation result, and generating a distance conversion image by taking the calculation result as the gray value of the pixel.
5. The method for segmenting the WC-particle electron microscope image based on the watershed according to claim 1, wherein in the step S32, for the binary image I, wherein the pixel point has a value of 0 or 1, which respectively represents the background and the foreground, the shortest euclidean distance from each foreground pixel to the nearest background pixel point is found, the distance gray value is obtained and normalized by using a normalization formula; the European calculated distance formula is shown below,
, />
Wherein,Representing a foreground pixel, x 1、y1 being the abscissa of the foreground pixel p, respectively; /(I)Representing a background pixel, x 2、y2 being the abscissa of the background pixel q, respectively; /(I)Representing foreground pixelsThe Euclidean distance is normalized.
6. The method for segmenting the WC-particle electron microscope image based on the watershed according to claim 1, wherein in the step S33, the process of obtaining the optimal threshold value of the foreground pixel by using the local mean value method and performing the binarization processing specifically comprises: and generating a binary mask according to the local mean image, marking pixels larger than the local mean in the distance conversion image as foreground pixels, marking pixels smaller than or equal to the local mean as background pixels, and performing binarization processing on the image by taking the average gray value of the foreground pixels as a threshold value to obtain a segmentation result.
7. The watershed-based WC particle electron microscopy image segmentation method according to claim 1, further comprising the step of, prior to step S34: and analyzing the determined foreground mark by using a connected component analysis algorithm to obtain an initial mark image, wherein the mark value of the foreground area is 2, and the mark value of the background area is 1.
8. A method for calculating the particle size distribution of WC particle electron microscope images based on watershed is characterized in that,
Obtaining segmented WC particle electron microscopy images using the watershed-based WC particle electron microscopy image segmentation method of any one of claims 1 to 7;
Calculating the equivalent circle diameter of the particles, counting the equivalent diameter frequency of each interval, and drawing a histogram to obtain a PSD result.
9. The watershed-based WC particle electron microscopy image particle size distribution calculating method of claim 8, wherein the method of calculating the equivalent circle diameter of the particles comprises:
Calculating the image resolution of an electron microscope according to the obtained WC particle contours, traversing each WC particle contour, obtaining the particle area by calculating the number of pixel points in the contour, and converting the particle area into the equivalent circle diameter The specific calculation formulas are as follows:
,/>
where u is the index of the pixel point on the weld spot contour; n is the total number of pixel points on the outline of the welding spot; a u-th pixel on or within the soldered outline; /(I) Is the area of the particle.
10. The method for calculating the particle size distribution of the WC particle electron microscope image based on the watershed according to claim 8 or 9, wherein the method for calculating the histogram drawn by counting the equivalent diameter frequency of each interval to obtain the PSD result specifically comprises the following steps:
grouping the equivalent diameter data according to a certain interval, counting the equivalent diameter frequency in each interval, setting the interval as an X axis, setting the equivalent diameter frequency as a Y axis, and drawing a histogram to obtain a PSD result.
CN202410155550.4A 2024-02-04 2024-02-04 WC particle electron microscope image segmentation and particle size distribution calculation method based on watershed Active CN117689673B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410155550.4A CN117689673B (en) 2024-02-04 2024-02-04 WC particle electron microscope image segmentation and particle size distribution calculation method based on watershed

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410155550.4A CN117689673B (en) 2024-02-04 2024-02-04 WC particle electron microscope image segmentation and particle size distribution calculation method based on watershed

Publications (2)

Publication Number Publication Date
CN117689673A CN117689673A (en) 2024-03-12
CN117689673B true CN117689673B (en) 2024-04-23

Family

ID=90130465

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410155550.4A Active CN117689673B (en) 2024-02-04 2024-02-04 WC particle electron microscope image segmentation and particle size distribution calculation method based on watershed

Country Status (1)

Country Link
CN (1) CN117689673B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202216890U (en) * 2011-06-30 2012-05-09 河海大学 Sand grain analysis device based on digital image technology
WO2016150873A1 (en) * 2015-03-20 2016-09-29 Ventana Medical Systems, Inc. System and method for image segmentation
CN110766702A (en) * 2019-10-18 2020-02-07 沈阳农业大学 Agaricus bisporus grading judgment method
CN111060442A (en) * 2019-04-30 2020-04-24 威海戥同测试设备有限公司 Oil particle detection method based on image processing
CN111223115A (en) * 2020-04-22 2020-06-02 杭州涂鸦信息技术有限公司 Image segmentation method, device, equipment and medium
CN113552028A (en) * 2020-04-23 2021-10-26 中冶长天国际工程有限责任公司 Mixture visual analysis device, and method and system for detecting granularity composition of mixture
CN116385382A (en) * 2023-03-23 2023-07-04 济南大学 Network model for visceral tumor segmentation in ultrasonic image
CN117455824A (en) * 2023-11-01 2024-01-26 武汉华中天经通视科技有限公司 Image detail self-adaptive enhancement method based on bilateral filtering

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3747189A4 (en) * 2018-01-30 2021-11-10 Rebus Biosystems, Inc. Method for detecting particles using structured illumination

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202216890U (en) * 2011-06-30 2012-05-09 河海大学 Sand grain analysis device based on digital image technology
WO2016150873A1 (en) * 2015-03-20 2016-09-29 Ventana Medical Systems, Inc. System and method for image segmentation
CN111060442A (en) * 2019-04-30 2020-04-24 威海戥同测试设备有限公司 Oil particle detection method based on image processing
CN110766702A (en) * 2019-10-18 2020-02-07 沈阳农业大学 Agaricus bisporus grading judgment method
CN111223115A (en) * 2020-04-22 2020-06-02 杭州涂鸦信息技术有限公司 Image segmentation method, device, equipment and medium
CN113552028A (en) * 2020-04-23 2021-10-26 中冶长天国际工程有限责任公司 Mixture visual analysis device, and method and system for detecting granularity composition of mixture
CN116385382A (en) * 2023-03-23 2023-07-04 济南大学 Network model for visceral tumor segmentation in ultrasonic image
CN117455824A (en) * 2023-11-01 2024-01-26 武汉华中天经通视科技有限公司 Image detail self-adaptive enhancement method based on bilateral filtering

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于数学形态学的硬质合金图像分割算法;肖闻宇 等;计算机应用;20151215;第35卷;277-279 *

Also Published As

Publication number Publication date
CN117689673A (en) 2024-03-12

Similar Documents

Publication Publication Date Title
Yu et al. A machine vision method for measurement of machining tool wear
CN114723681B (en) Concrete crack defect detection method based on machine vision
CN109682839B (en) Online detection method for surface defects of metal arc-shaped workpiece
CN116993731B (en) Shield tunneling machine tool bit defect detection method based on image
CN111060442B (en) Oil particle detection method based on image processing
CN109584253B (en) Oil abrasive particle image segmentation method
CN115096206B (en) High-precision part size measurement method based on machine vision
CN115131359B (en) Method for detecting pitting defects on surface of metal workpiece
CN115330758B (en) Welding quality detection method based on denoising treatment
CN115331119B (en) Solid waste identification method
CN112258444A (en) Elevator steel wire rope detection method
CN116503462A (en) Method and system for quickly extracting circle center of circular spot
CN113781413B (en) Electrolytic capacitor positioning method based on Hough gradient method
CN113763404B (en) Foam image segmentation method based on optimization mark and edge constraint watershed algorithm
Shahid et al. A hybrid vision-based surface coverage measurement method for robotic inspection
CN117689673B (en) WC particle electron microscope image segmentation and particle size distribution calculation method based on watershed
CN111862178B (en) Improved LBP feature extraction method
CN112927257A (en) Stamping part defect image segmentation method based on improved MRF
CN112184619A (en) Metal part surface defect detection method based on deep learning
CN115423816B (en) Metal surface grinding quality detection method
CN114354631A (en) Valve blank surface defect detection method based on vision
CN112288679B (en) Interactive extraction method and system for defect area of automobile hub X-ray image
Li et al. Adaptive image enhancement and dynamic-template-matching-based edge extraction method for diamond roller on-machine profile measurement
CN113744241A (en) Cell image segmentation method based on improved SLIC algorithm
CN117670916B (en) Coating edge detection method based on deep learning

Legal Events

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