CN115082465B - Wool and cashmere classification method based on scanning electron microscope image processing - Google Patents

Wool and cashmere classification method based on scanning electron microscope image processing Download PDF

Info

Publication number
CN115082465B
CN115082465B CN202211002556.5A CN202211002556A CN115082465B CN 115082465 B CN115082465 B CN 115082465B CN 202211002556 A CN202211002556 A CN 202211002556A CN 115082465 B CN115082465 B CN 115082465B
Authority
CN
China
Prior art keywords
gray
texture
scale
cashmere
calculating
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
CN202211002556.5A
Other languages
Chinese (zh)
Other versions
CN115082465A (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.)
Nantong Jiusu Environmental Protection Technology Co ltd
Original Assignee
Nantong Jiusu Environmental Protection Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nantong Jiusu Environmental Protection Technology Co ltd filed Critical Nantong Jiusu Environmental Protection Technology Co ltd
Priority to CN202211002556.5A priority Critical patent/CN115082465B/en
Publication of CN115082465A publication Critical patent/CN115082465A/en
Application granted granted Critical
Publication of CN115082465B publication Critical patent/CN115082465B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • 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
    • 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
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/54Extraction of image or video features relating to texture
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30124Fabrics; Textile; Paper

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Image Processing (AREA)
  • Analysing Materials By The Use Of Radiation (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to the technical field of image processing, in particular to a wool and cashmere classification method based on scanning electron microscope image processing, which comprises the following steps: acquiring a binary image and a gray image corresponding to the electron microscope image of the textile fiber, and determining the contour texture and the scale texture of the textile fiber texture in the gray image; calculating the roughness of the contour texture; calculating the chaos degree of scale textures; calculating the texture definition of the textile fibers, calculating the uniformity of the texture thickness of the textile fibers, taking the roughness, the chaos, the texture definition and the uniformity of the texture thickness corresponding to the textile fibers as the input of a random forest classification model, taking the fiber types of the textile fibers as the output of the random forest classification model, training the random forest classification model, and classifying the textile fibers to be detected by utilizing the trained random forest classification model.

Description

Wool and cashmere classification method based on scanning electron microscope image processing
Technical Field
The invention relates to the technical field of image processing, in particular to a wool and cashmere classification method based on scanning electron microscope image processing.
Background
Cashmere is a pure natural fiber, and because textiles made of the cashmere are comfortable to wear, good in elasticity and good in heat retention, the cashmere products are popular with people, more and more people begin to chase after with the development of economy.
At present, the detection and identification of textile fibers in the textile industry are generally carried out on-site identification in factories or farms, and the textile fibers are mainly detected and identified by a portable microscope, but the method is mainly used for classifying according to different edge profiles of cashmere and wool fibers, so that detection personnel are required to have strong judgment capability and identification experience, the detection results are influenced by human factors, and the detection results are inaccurate.
Therefore, it is necessary to provide a method for classifying wool and cashmere based on scanning electron microscope image processing to solve the above problems.
Disclosure of Invention
The invention provides a wool and cashmere classification method based on scanning electron microscope image processing, which aims to solve the existing problems.
The invention discloses a wool and cashmere classification method based on scanning electron microscope image processing, which adopts the following technical scheme: the method comprises the following steps:
acquiring a binary image and a gray image corresponding to an electron microscope image of the textile fiber, wherein the fiber type of the textile fiber is wool or cashmere;
acquiring edge pixel points in the gray level image, performing linear fitting on the edge pixel points to obtain a fitting straight line, and determining contour texture and scale texture of textile fiber texture in the gray level image according to the slope of the fitting straight line;
calculating the roughness of the contour texture according to a Tamura texture feature algorithm;
acquiring a gray level co-occurrence matrix of scale textures in a gray level image, and calculating the chaos degree of the scale textures according to the value of each element in the gray level co-occurrence matrix;
constructing a gray level difference matrix in a corresponding angle direction according to the absolute value of the gray level difference value of each pixel point in the gray level image and the adjacent pixel points in different angle directions, determining a total gray level difference matrix of the gray level image according to the gray level difference matrices in all angle directions, and calculating the texture definition of the textile fibers according to the total gray level difference matrix;
performing distance transformation on the binary image to obtain a target gray image, acquiring the maximum gray value in each row of pixels in the target gray image, constructing a gray sequence according to the maximum gray value corresponding to each row of pixels, calculating the dispersion of the gray sequence according to each maximum gray value in the gray sequence, and taking the dispersion as the uniformity of the texture thickness of the textile fibers;
and constructing a random forest classification model, taking the roughness, the chaos, the texture definition and the uniformity of the texture thickness corresponding to the textile fibers as the input of the random forest classification model, taking the fiber types of the textile fibers as the output of the random forest classification model, training the random forest classification model, and determining the fiber types corresponding to the electron microscope images of the textile fibers to be detected by using the trained random forest classification model.
Preferably, the step of determining the contour texture and the scale texture of the textile fiber texture in the gray-scale image according to the slope of the fitted straight line comprises the following steps:
setting wool or cashmere in the collected electronic microscope image of the textile fiber to be in the horizontal direction;
the edge pixel points corresponding to the fitting straight line with the small slope are contour texture pixel points of wool or cashmere, wherein the edge pixel points form contour textures of textile fiber textures in the gray level image;
the edge pixel points corresponding to the fitting straight line with the large slope are scale texture pixel points of wool or cashmere, wherein the scale texture pixel points form scale textures of textile fiber textures in the gray level image.
Preferably, the step of calculating the roughness of the contour texture according to the Tamura texture feature algorithm comprises:
acquiring a plurality of sliding windows in a gray scale image;
calculating the gray average value in each sliding window;
respectively calculating the average gray level difference between sliding windows of which the pixels of the contour texture do not intersect in the horizontal direction and the vertical direction according to the gray level average value in each sliding window;
determining the optimal size of the sliding window according to the average gray difference;
and calculating the roughness of the contour texture according to the optimal size of the sliding window where each pixel point is located and the size of the gray level image.
Preferably, the formula for calculating the chaos of the scale texture is as follows:
Figure DEST_PATH_IMAGE001
in the formula (I), the compound is shown in the specification,
Figure 100002_DEST_PATH_IMAGE002
representing scale linesDegree of disorder of the theory;
Figure DEST_PATH_IMAGE003
express the second in the gray level co-occurrence matrix
Figure 100002_DEST_PATH_IMAGE004
The corresponding element value;
Figure DEST_PATH_IMAGE005
representing the gray level of the gray co-occurrence matrix.
Preferably, the formula for determining the total gray level difference matrix of the gray image is:
Figure 100002_DEST_PATH_IMAGE006
in the formula (I), the compound is shown in the specification,
Figure DEST_PATH_IMAGE007
a total gray level difference matrix representing a gray image;
Figure 100002_DEST_PATH_IMAGE008
represents the ith angle
Figure DEST_PATH_IMAGE009
A gray scale difference matrix in direction;
Figure 100002_DEST_PATH_IMAGE010
indicating the total number of angles.
Preferably, the formula for calculating the texture sharpness of the textile fiber:
Figure DEST_PATH_IMAGE011
in the formula (I), the compound is shown in the specification,
Figure 100002_DEST_PATH_IMAGE012
representing calculating the texture definition of the textile fiber;
Figure DEST_PATH_IMAGE013
in a matrix representing grey-scale difference levels
Figure 100002_DEST_PATH_IMAGE014
The corresponding element value;
Figure DEST_PATH_IMAGE015
representing the second in a grey-scale difference level matrix
Figure 949841DEST_PATH_IMAGE015
A row;
Figure 100002_DEST_PATH_IMAGE016
representing the second in a grey-scale difference level matrix
Figure 319511DEST_PATH_IMAGE016
And (4) columns.
Preferably, the step of calculating the dispersion of the gray scale sequence according to each maximum gray scale value in the gray scale sequence includes:
calculating the average gray value of all the maximum gray values in the gray sequence;
and calculating the dispersion of the gray sequence according to the average gray value of all the maximum gray values in the gray sequence, each maximum gray value and the number of the maximum gray values.
Preferably, a dispersion formula of the gray sequence is calculated:
Figure DEST_PATH_IMAGE017
in the formula (I), the compound is shown in the specification,
Figure 100002_DEST_PATH_IMAGE018
representing the dispersion of the gray sequence;
l represents the number of maximum gray values in the gray sequence;
Figure DEST_PATH_IMAGE019
to express the second in a gray sequence
Figure 100002_DEST_PATH_IMAGE020
A maximum gray value;
Figure DEST_PATH_IMAGE021
is shown as
Figure 373617DEST_PATH_IMAGE020
The position coordinates of the maximum gray values;
Figure 100002_DEST_PATH_IMAGE022
representing the average gray value of all the largest gray values in the gray sequence.
The beneficial effects of the invention are: the wool and cashmere classifying method based on scanning electron microscope image processing collects images of wool or cashmere fibers through a scanning electron microscope, extracts texture features such as roughness, chaos, texture definition and uniformity of texture thickness of the wool and the cashmere through the image processing method, then takes the texture features as input, takes fiber types of textile fibers corresponding to the features as output, trains in a random forest classification model, and determines the fiber types corresponding to the electron microscope images of the textile fibers to be detected through the trained random forest classification model, so that the wool or cashmere textiles are accurately classified, and the accuracy of detection results is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art 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 for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart of the general steps of an embodiment of a wool and cashmere classification method based on scanning electron microscope image processing.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the embodiment of the method for classifying wool and cashmere based on scanning electron microscope image processing of the present invention, it should be noted that, in this embodiment, only textiles made of cashmere fibers or wool fibers are classified, specifically, as shown in fig. 1, the method includes:
s1, obtaining a binary image and a gray image corresponding to an electron microscope image of the textile fiber, wherein the fiber type of the textile fiber is wool or cashmere.
Specifically, because the wool fibers have the characteristics of small width and thinness, for example, the diameter of high-quality fine wool fibers is basically below 25 micrometers, the requirement on acquisition equipment is high, in order to control the cost and not influence the quality of subsequent detection, a scanning electron microscope is selected to acquire an electron microscope image of the fibers of the textile, namely, the electron microscope image of wool or cashmere, then the electron microscope image is subjected to threshold-based binarization processing to obtain a binary image, the threshold is empirically set to be 100, the area containing the cashmere or wool is set to be 1, the background is set to be 0, the processed image is multiplied by the original electron microscope image, the wool or cashmere area in the electron microscope image is extracted to obtain a gray level image of the cashmere or wool, wherein in order to ensure that the edge information of the image completely removes noise in the gray level image at the same time, the gray level image is processed by adopting a method combining median filtering and wiener filtering, the fusion filter combines the advantages of the two filtering, so that the integrity of the edge information can be protected, and the background noise can be well removed.
S2, obtaining edge pixel points in the gray level image, performing linear fitting on the edge pixel points to obtain a fitting straight line, and determining the contour texture and the scale texture of the textile fiber texture in the gray level image according to the slope of the fitting straight line.
Specifically, edge detection is carried out on a gray scale image of the textile fibers by using a canny operator to obtain edge pixel points of the textile fibers, the size of a Gaussian filter is 3 x 3, so that a fuzzy effect generated by filtering is less, fine lines with small and obvious changes can be detected, wool or cashmere edges in each textile fiber are analyzed to obtain edge pixel points of each cashmere or wool, then linear fitting is carried out on the edge pixel points to obtain a fitting straight line formula y = ax + b, a represents a slope, b represents a constant, and the wool or cashmere in an acquired electron microscope image of the textile fibers is set to be in the horizontal direction; the edge pixel points corresponding to the fitting straight line with the small slope are edge pixel points of wool or cashmere, wherein the contour texture pixel points form contour textures of the wool or the cashmere; the edge pixel points corresponding to the fitting straight line with the large slope are scale texture pixel points of wool or cashmere, wherein the scale texture pixel points form scale textures of the wool or the cashmere.
And S3, calculating the roughness of the contour texture according to a Tamura texture feature algorithm.
Specifically, in the embodiment, the roughness of the contour texture is calculated by adopting a method for calculating the roughness in plate classification research based on Gabor filtering and Tamura texture features, and a plurality of sizes of the contour texture are obtained from a gray-scale image
Figure DEST_PATH_IMAGE023
The sliding window of (2); formula for calculating the mean value of the gray levels in each sliding window:
Figure 100002_DEST_PATH_IMAGE024
in the formula (I), the compound is shown in the specification,
Figure DEST_PATH_IMAGE025
the size of the sliding window is shown, and k is 0,1,2,3,4,5;
Figure 100002_DEST_PATH_IMAGE026
represents a coordinate point in the sliding window of
Figure DEST_PATH_IMAGE027
A pixel value of the location;
Figure 100002_DEST_PATH_IMAGE028
to represent
Figure 18093DEST_PATH_IMAGE026
The average value of the gray scale of the sliding window, and the sliding window
Figure DEST_PATH_IMAGE029
A sliding window with a coordinate point as a center;
respectively calculating the average gray difference between the sliding windows of each pixel of the contour texture which are not crossed in the horizontal and vertical directions according to the gray average value in each sliding window, and calculating the formula:
Figure 100002_DEST_PATH_IMAGE030
wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE031
represents an average gray difference in the horizontal direction;
Figure 100002_DEST_PATH_IMAGE032
representing the average gray difference in the vertical direction;
Figure DEST_PATH_IMAGE033
is shown in
Figure 100002_DEST_PATH_IMAGE034
A gray average value of a sliding window with a coordinate point as a center;
Figure DEST_PATH_IMAGE035
is shown in
Figure 100002_DEST_PATH_IMAGE036
A gray average value of a sliding window with a coordinate point as a center;
Figure DEST_PATH_IMAGE037
is shown in
Figure 100002_DEST_PATH_IMAGE038
A gray average value of a sliding window with a coordinate point as a center;
Figure DEST_PATH_IMAGE039
is shown in
Figure 100002_DEST_PATH_IMAGE040
A gray average value of a sliding window with a coordinate point as a center;
the optimal size of the sliding window is determined based on the average gray difference, wherein,
Figure 209297DEST_PATH_IMAGE031
+
Figure 562918DEST_PATH_IMAGE032
= E, when the E reaches the maximum value, the size of the sliding window corresponding to the k value at the moment is the optimal size of the sliding window; calculating the roughness of the contour texture according to the optimal size of the sliding window where each pixel point is located and the size of the gray level image, wherein a roughness formula for calculating the contour texture is as follows:
Figure DEST_PATH_IMAGE041
in the formula, C represents the roughness of the contour texture of the textile raw material, C represents the difference of the gray values on the gray level graph, and the larger the C is, the larger the gray level difference is, the rougher the contour texture of cashmere or wool representing the textile raw material is;
Figure 100002_DEST_PATH_IMAGE042
representing the size of the grayscale image;
Figure DEST_PATH_IMAGE043
to express the second in a gray scale image
Figure 220164DEST_PATH_IMAGE004
The optimal size of the sliding window where each pixel point is located.
S4, because cashmere scale texture and wool scale texture also have the difference, cashmere scale texture looks more chaotic, and the degree of torsion is bigger, and the connection between the texture is more random, and cashmere scale texture is compared with wool scale texture, and the randomness of cashmere scale texture is bigger promptly more chaotic, so with the chaos degree of scale texture as the characteristic of distinguishing cashmere and wool, at first, obtain the grey level co-occurrence matrix of scale texture in the grey level image, according to every element' S value calculates the chaos degree of scale texture in the grey level co-occurrence matrix, specific, the formula of the chaos degree of calculation scale texture:
Figure 100002_DEST_PATH_IMAGE044
in the formula (I), the compound is shown in the specification,
Figure 606015DEST_PATH_IMAGE002
the disorder degree of scale textures is shown, the larger the disorder degree is, the stronger the randomness of cashmere scale textures or wool scale textures is, and the more disordered the scale textures are;
Figure 681418DEST_PATH_IMAGE003
express the second in the gray level co-occurrence matrix
Figure 409203DEST_PATH_IMAGE004
Corresponding element values;
Figure 694691DEST_PATH_IMAGE005
representing the gray levels of the gray co-occurrence matrix, this embodiment
Figure DEST_PATH_IMAGE045
And 8, taking.
S5, the definition of the cashmere or wool textures is different, wherein the cashmere or wool textures comprise: the method comprises the steps of firstly constructing a gray level difference matrix in a corresponding angle direction according to the absolute value of the gray level difference value of each pixel point in a gray level image and adjacent pixel points in different angle directions, determining a total gray level difference matrix of the gray level image according to the gray level difference matrix in all the angle directions, calculating the texture definition of textile fibers according to the total gray level difference matrix, directly reflecting the difference of gray levels, better reflecting the texture definition of the texture on each wool or cashmere, and reflecting the contrast condition of the brightness of a certain pixel value and the pixel value in the field of the texture definition.
Specifically, an arbitrary pixel point on a gray scale image is taken, the gray scale value of the pixel point is g1 (x, y), and the gray scale value of the pixel point in the theta degree direction is g2 (x, y), an absolute value of the gray scale difference value between the gray scale value of the pixel point and the gray scale value of the adjacent pixel point is calculated, then a gray scale difference matrix in the theta degree direction is constructed according to the absolute value of the gray scale difference value between each pixel point and the pixel point in the theta degree direction, and then a total gray scale difference matrix of the gray scale image is determined according to the gray scale difference matrices in all the angle directions, wherein a formula for determining the total gray scale difference matrix of the gray scale image is as follows:
Figure 100002_DEST_PATH_IMAGE046
in the formula (I), the compound is shown in the specification,
Figure 22248DEST_PATH_IMAGE007
a total gray level difference matrix representing a gray image;
Figure DEST_PATH_IMAGE047
denotes the first
Figure DEST_PATH_IMAGE048
A single angle
Figure DEST_PATH_IMAGE049
A gray scale difference matrix in direction;
Figure 670267DEST_PATH_IMAGE010
representing the total number of angles, wherein 4 is taken as the total number of the angles and respectively represents a gray level difference matrix in the horizontal direction, the vertical direction and the diagonal direction;
wherein, the formula for calculating the texture definition of the textile fiber is as follows:
Figure DEST_PATH_IMAGE050
in the formula (I), the compound is shown in the specification,
Figure 287062DEST_PATH_IMAGE012
representing calculating the texture definition of the textile fiber;
Figure 59846DEST_PATH_IMAGE013
in a matrix representing grey-scale difference levels
Figure 741494DEST_PATH_IMAGE014
Corresponding element values;
Figure 916124DEST_PATH_IMAGE015
representing the second in a grey-scale difference level matrix
Figure 172661DEST_PATH_IMAGE015
A row;
Figure 432741DEST_PATH_IMAGE016
representing the second in a grey-scale difference level matrix
Figure 918081DEST_PATH_IMAGE016
And (4) columns.
S6, because the thickness of the cashmere texture is smaller than that of the wool texture, the uniformity of the texture thickness is used as a characteristic for distinguishing wool from cashmere, the distance transformation is carried out on the binary image to obtain a target gray level image, the maximum gray level value in each row of pixels in the target gray level image is obtained, a gray level sequence is constructed according to the maximum gray level value corresponding to each row of pixels, the dispersion of the gray level sequence is calculated according to each maximum gray level value in the gray level sequence, and the dispersion is used as the uniformity of the texture thickness of the textile fibers.
Specifically, the distance transformation of the binary image to obtain the target gray level image is the prior art, and this embodiment does not excessively describe the target gray level image, and calculates the average gray level value of all the maximum gray levels in the gray level sequence; calculating the dispersion of the gray sequence according to the average gray value of all the maximum gray values in the gray sequence, each maximum gray value and the number of the maximum gray values, and calculating the dispersion formula of the gray sequence:
Figure 947216DEST_PATH_IMAGE017
in the formula (I), the compound is shown in the specification,
Figure 377585DEST_PATH_IMAGE018
representing the dispersion of the gray sequence;
l represents the number of maximum gray values in the gray sequence;
Figure 859382DEST_PATH_IMAGE019
representing the first in a grey scale sequence
Figure 148412DEST_PATH_IMAGE020
A maximum gray value;
Figure 32055DEST_PATH_IMAGE021
is shown as
Figure 709024DEST_PATH_IMAGE020
The position coordinates of the maximum gray values;
Figure 802750DEST_PATH_IMAGE022
representing the average gray value of all the largest gray values in the gray sequence.
S7, constructing a random forest classification model, taking the roughness, the chaos, the texture definition and the texture thickness uniformity corresponding to the textile fibers as the input of the random forest classification model and the fiber type corresponding to each textile fiber as the output of the random forest classification model, training the random forest classification model, and determining the fiber type corresponding to the electron microscope image of the textile fiber to be detected by using the trained random forest classification model.
In summary, the invention provides a wool and cashmere classification method based on scanning electron microscope image processing, which includes collecting images of wool or cashmere fibers through a scanning electron microscope, extracting texture features such as roughness, chaos, texture definition and uniformity of texture thickness of the wool and the cashmere by using the image processing method, then using the texture features as input, using fiber types of textile fibers corresponding to the features as output, training a random forest classification model, and determining the fiber types corresponding to the electron microscope images of the textile fibers to be detected by using the trained random forest classification model, thereby realizing accurate classification of wool or cashmere textiles and improving accuracy of detection results.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and should not be taken as limiting the scope of the present invention, which is intended to cover any modifications, equivalents, improvements, etc. within the spirit and scope of the present invention.

Claims (7)

1. A wool and cashmere classification method based on scanning electron microscope image processing is characterized by comprising the following steps:
acquiring a binary image and a gray image corresponding to an electron microscope image of the textile fiber, wherein the textile fiber is wool or cashmere;
acquiring edge pixel points in the gray level image, performing linear fitting on the edge pixel points to obtain a fitting straight line, and determining contour texture and scale texture of textile fiber texture in the gray level image according to the slope of the fitting straight line; the steps of determining the contour texture and the scale texture of the textile fiber texture in the gray level image according to the slope of the fitting straight line comprise: setting wool or cashmere in the collected electronic microscope image of the textile fiber to be in the horizontal direction; the edge pixel points corresponding to the fitting straight line with the small slope are contour texture pixel points of wool or cashmere, wherein the edge pixel points form contour textures of textile fiber textures in the gray level image; edge pixel points corresponding to the fitting straight line with the large slope are scale texture pixel points of wool or cashmere, wherein the scale texture pixel points form scale textures of textile fiber textures in the gray level image;
calculating the roughness of the contour texture according to a Tamura texture feature algorithm;
acquiring a gray level co-occurrence matrix of scale textures in a gray level image, and calculating the chaos of the scale textures according to the value of each element in the gray level co-occurrence matrix;
constructing a gray level difference matrix in the corresponding angle direction according to the absolute value of the gray level difference value of each pixel point in the gray level image and the adjacent pixel points in different angle directions, determining a total gray level difference matrix of the gray level image according to the gray level difference matrices in all the angle directions, and calculating the texture definition of the textile fibers according to the total gray level difference matrix;
performing distance conversion on the binary image to obtain a target gray image, acquiring the maximum gray value in each row of pixels in the target gray image, constructing a gray sequence according to the maximum gray value corresponding to each row of pixels, calculating the dispersion of the gray sequence according to each maximum gray value in the gray sequence, and taking the dispersion as the uniformity of the texture thickness of the textile fibers;
and constructing a random forest classification model, taking the roughness, the chaos, the texture definition and the uniformity of the texture thickness corresponding to the textile fibers as the input of the random forest classification model, taking the fiber type of the textile fibers as the output of the random forest classification model, training the random forest classification model, and determining the fiber type corresponding to the electron microscope image of the textile fibers to be detected by using the trained random forest classification model.
2. The wool and cashmere classification method based on scanning electron microscope image processing according to claim 1, wherein the step of calculating the roughness of the contour texture according to Tamura texture feature algorithm comprises:
acquiring a plurality of sliding windows in a gray scale image;
calculating the gray average value in each sliding window;
respectively calculating the average gray level difference between sliding windows of which the pixels of the contour texture do not intersect in the horizontal direction and the vertical direction according to the gray level average value in each sliding window;
determining the optimal size of the sliding window according to the average gray difference;
and calculating the roughness of the contour texture according to the optimal size of the sliding window where each pixel point is located and the size of the gray level image.
3. The method for classifying wool and cashmere based on scanning electron microscope image processing according to claim 1, wherein a formula for calculating the degree of disorder of scale texture is:
Figure DEST_PATH_IMAGE002
in the formula (I), the compound is shown in the specification,
Figure DEST_PATH_IMAGE004
representing the chaos of scale texture;
Figure DEST_PATH_IMAGE006
express the second in the gray level co-occurrence matrix
Figure DEST_PATH_IMAGE008
Corresponding element values;
Figure DEST_PATH_IMAGE010
representing the gray levels of the gray co-occurrence matrix.
4. The method for classifying wool and cashmere based on scanning electron microscope image processing according to claim 1, characterized in that the formula for determining the total gray level difference matrix of the gray level image is:
Figure DEST_PATH_IMAGE012
in the formula (I), the compound is shown in the specification,
Figure DEST_PATH_IMAGE014
a total gray level difference matrix representing a gray image;
Figure DEST_PATH_IMAGE016
is shown as
Figure DEST_PATH_IMAGE018
A single angle
Figure DEST_PATH_IMAGE020
A gray scale difference matrix in direction;
Figure DEST_PATH_IMAGE022
indicating the total number of angles.
5. A method for classifying wool and cashmere based on sem image processing according to claim 1, characterized in that the formula for calculating the texture sharpness of the textile fibers is:
Figure DEST_PATH_IMAGE024
in the formula (I), the compound is shown in the specification,
Figure DEST_PATH_IMAGE026
representing calculating the texture definition of the textile fiber;
Figure DEST_PATH_IMAGE028
in a matrix representing grey-scale difference levels
Figure DEST_PATH_IMAGE030
Corresponding element values;
Figure DEST_PATH_IMAGE032
representing the first in a grey-scale difference level matrix
Figure 563486DEST_PATH_IMAGE032
A row;
Figure DEST_PATH_IMAGE034
representing the first in a grey-scale difference level matrix
Figure 239318DEST_PATH_IMAGE034
And (4) columns.
6. A method for classifying wool and cashmere based on sem image processing according to claim 1, wherein the step of calculating the dispersion of the gray scale sequence according to each maximum gray scale value in the gray scale sequence includes:
calculating the average gray value of all the maximum gray values in the gray sequence;
and calculating the dispersion of the gray sequence according to the average gray value of all the maximum gray values in the gray sequence, each maximum gray value and the number of the maximum gray values.
7. The method for classifying the wool and cashmere based on the scanning electron microscope image processing as claimed in claim 1, wherein the formula of the dispersion of the gray level sequence is calculated as follows:
Figure DEST_PATH_IMAGE036
in the formula (I), the compound is shown in the specification,
Figure DEST_PATH_IMAGE038
representing the dispersion of the gray sequence;
l represents the number of maximum gray values in the gray sequence;
Figure DEST_PATH_IMAGE040
representing the first in a grey scale sequence
Figure DEST_PATH_IMAGE042
A maximum gray value;
Figure DEST_PATH_IMAGE044
is shown as
Figure 664352DEST_PATH_IMAGE042
The position coordinates of the maximum gray values;
Figure DEST_PATH_IMAGE046
representing the average gray value of all the largest gray values in the gray sequence.
CN202211002556.5A 2022-08-22 2022-08-22 Wool and cashmere classification method based on scanning electron microscope image processing Active CN115082465B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211002556.5A CN115082465B (en) 2022-08-22 2022-08-22 Wool and cashmere classification method based on scanning electron microscope image processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211002556.5A CN115082465B (en) 2022-08-22 2022-08-22 Wool and cashmere classification method based on scanning electron microscope image processing

Publications (2)

Publication Number Publication Date
CN115082465A CN115082465A (en) 2022-09-20
CN115082465B true CN115082465B (en) 2022-11-11

Family

ID=83244688

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211002556.5A Active CN115082465B (en) 2022-08-22 2022-08-22 Wool and cashmere classification method based on scanning electron microscope image processing

Country Status (1)

Country Link
CN (1) CN115082465B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115861310B (en) * 2023-02-23 2023-05-16 深圳市富安娜艺术家居有限公司 Method for detecting textile defects on surface of bed sheet
CN117934461B (en) * 2024-03-21 2024-06-07 广州航海学院 Method, system and equipment for analyzing polishing surface roughness of side polishing optical fiber

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105760877B (en) * 2016-02-19 2019-03-05 天纺标检测认证股份有限公司 A kind of woollen and cashmere recognizer based on gray level co-occurrence matrixes model
KR101824691B1 (en) * 2017-01-05 2018-02-02 서울여자대학교 산학협력단 Method for differentiation of fat-poor angiomyolipoma from clear cell renal cell carcinoma in contrast-enhanced mdct images using quantitative feature classification
CN113792648A (en) * 2021-09-13 2021-12-14 杨凌龙翔数字科技有限公司 Satellite remote sensing orchard classification method based on multiple time phases

Also Published As

Publication number Publication date
CN115082465A (en) 2022-09-20

Similar Documents

Publication Publication Date Title
CN115082465B (en) Wool and cashmere classification method based on scanning electron microscope image processing
CN114937055B (en) Image self-adaptive segmentation method and system based on artificial intelligence
CN115082467B (en) Building material welding surface defect detection method based on computer vision
US8358846B2 (en) Scanning images for pornography
CN116188462B (en) Noble metal quality detection method and system based on visual identification
CN111862194B (en) Deep learning plant growth model analysis method and system based on computer vision
EP1259931B1 (en) Method for analysing fingerprint images
CN116664559B (en) Machine vision-based memory bank damage rapid detection method
CN107038416B (en) Pedestrian detection method based on binary image improved HOG characteristics
CN116611748B (en) Titanium alloy furniture production quality monitoring system
CN116205919A (en) Hardware part production quality detection method and system based on artificial intelligence
JP4000380B2 (en) Texture image classification device
CN106326834B (en) method and device for automatically identifying sex of human body
CN115311507B (en) Building board classification method based on data processing
CN109215010A (en) A kind of method and robot face identification system of picture quality judgement
CN105095907B (en) A kind of heterogeneous fibre identification method of cotton based on RBF neural
CN114549492B (en) Quality evaluation method based on multi-granularity image information content
CN114219794A (en) Method and system for evaluating surface quality of shaving board based on machine vision
CN106529543A (en) Method and system for dynamically calculating multi-color-grade binary adaptive threshold
CN111753794A (en) Fruit quality classification method and device, electronic equipment and readable storage medium
CN114881960A (en) Feature enhancement-based cloth linear defect detection method and system
CN117635609B (en) Visual inspection method for production quality of plastic products
CN115731493A (en) Rainfall micro physical characteristic parameter extraction and analysis method based on video image recognition
CN114882010A (en) Surface defect detection method based on picture recognition
CN116757972B (en) Fabric defect detection method capable of resisting influence of shadow noise

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