CN114693680A - Method for detecting textile fibers, electronic device and computer-readable storage medium - Google Patents
Method for detecting textile fibers, electronic device and computer-readable storage medium Download PDFInfo
- Publication number
- CN114693680A CN114693680A CN202210607802.3A CN202210607802A CN114693680A CN 114693680 A CN114693680 A CN 114693680A CN 202210607802 A CN202210607802 A CN 202210607802A CN 114693680 A CN114693680 A CN 114693680A
- Authority
- CN
- China
- Prior art keywords
- fiber
- image
- fabric
- fibers
- determining
- 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.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/60—Editing figures and text; Combining figures or text
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformation in the plane of the image
- G06T3/40—Scaling the whole image or part thereof
- G06T3/4038—Scaling the whole image or part thereof for image mosaicing, i.e. plane images composed of plane sub-images
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/40—Analysis of texture
- G06T7/41—Analysis of texture based on statistical description of texture
- G06T7/45—Analysis of texture based on statistical description of texture using co-occurrence matrix computation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2200/00—Indexing scheme for image data processing or generation, in general
- G06T2200/32—Indexing scheme for image data processing or generation, in general involving image mosaicing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10056—Microscopic image
- G06T2207/10061—Microscopic image from scanning electron microscope
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
- G06T2207/30124—Fabrics; Textile; Paper
Abstract
The invention relates to the technical field of image processing, and discloses a detection method of fabric fibers, electronic equipment and a computer-readable storage medium. The method comprises the following steps: collecting a plurality of microscopic images of a fabric to be detected, and carrying out image splicing on the plurality of microscopic images to obtain a global image; carrying out image preprocessing on the global image, and carrying out fabric fiber framework extraction on the processed image to obtain a corresponding framework image; splitting fibers of overlapped fibers in the skeleton image to obtain a single fiber image corresponding to each split single fiber; extracting the characteristics of each single fiber image to obtain at least one texture characteristic parameter of the corresponding single fiber, and determining the fiber type of the single fiber according to the at least one texture characteristic parameter; and counting the fiber quantity corresponding to each fiber type, and determining the proportion of various fiber types of the fabric according to the fiber quantity corresponding to various fiber types. The invention realizes the improvement of the efficiency and the accuracy of the fabric fiber detection.
Description
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method for detecting textile fibers, an electronic device, and a computer-readable storage medium.
Background
The identification of fabric fibers is an important link of textile inspection, and at present, fiber identification methods are various, such as a combustion test method, a solubility test method, a chemical analysis method, a coloring identification method, a microscopic observation method, a chromatographic analysis method, a thermal analysis method and the like. However, these detection methods have their limitations, such as cotton and hemp have the same chemical properties, and chemical analysis methods are not suitable for distinguishing between the two; the burn test method can identify the kind of fibers contained in the fabric, but cannot quantitatively analyze the content of various fibers of the fabric; the solubility test method is complex to operate, and various used reagents have inflammability and corrosiveness, so that high requirements are provided for the operation technology and safety consciousness of operators; the microscopic observation method needs professional technicians to observe longitudinal and transverse sections of the fibers through a microscope, and the types and the content of the fibers are judged by analyzing morphological characteristics of the fibers under microscopic scales according to experience, so that the method has certain technical requirements on the technicians, and the tedious work is carried out for a long time, so that the labor is consumed, and the situations of identification errors, statistical errors and the like easily occur.
Therefore, how to improve the efficiency and accuracy of fabric fiber detection becomes an urgent problem to be solved.
Disclosure of Invention
The invention mainly aims to solve the technical problems of low efficiency and low accuracy of fabric fiber detection.
The invention provides a method for detecting fabric fibers, which comprises the following steps:
collecting a plurality of microscopic images of a fabric to be detected, and carrying out image splicing on the plurality of microscopic images to obtain a global image;
carrying out image preprocessing on the global image, and carrying out fabric fiber framework extraction on the processed image to obtain a corresponding framework image;
splitting fibers of the overlapped fibers in the skeleton image to obtain a single fiber image corresponding to each split single fiber;
performing feature extraction on each single fiber image to obtain at least one texture feature parameter of the corresponding single fiber, and determining the fiber type of the single fiber according to the at least one texture feature parameter;
and counting the fiber quantity corresponding to each fiber type, and determining the various fiber type ratios of the fabric according to the fiber quantity corresponding to various fiber types.
Optionally, in a first implementation manner of the first aspect of the present invention, the performing feature extraction on each single fiber image to obtain at least one texture feature parameter of the corresponding single fiber includes:
carrying out gray level transformation on each single fiber image to obtain a corresponding gray level image;
carrying out gray stretching and binarization processing on the gray image to obtain a corresponding binary image;
performing wavelet transformation processing on the binary image to obtain a plurality of corresponding wavelet sub-band images, and generating a gray level co-occurrence matrix according to each wavelet sub-band image;
and determining the texture characteristic parameters according to the elements in the gray level co-occurrence matrix.
Optionally, in a second implementation manner of the first aspect of the present invention, the determining, according to at least one of the texture feature parameters, a fiber type of the single fiber includes:
if the texture characteristic parameters comprise a plurality of types, selecting one or more texture characteristic parameters from the plurality of texture characteristic parameters, and determining the selected texture characteristic parameters as target texture characteristic parameters, wherein the target texture characteristic parameters have the capability of better distinguishing fiber types than other unselected texture characteristic parameters;
and determining the fiber type of the single fiber according to the target texture characteristic parameter.
Optionally, in a third implementation manner of the first aspect of the present invention, the determining, according to at least one of the texture feature parameters, a fiber type of the single fiber includes:
substituting at least one texture characteristic parameter into a preset fiber classification mapping function to obtain a classification function value corresponding to at least one texture characteristic parameter;
and comparing the classification function value with a preset function threshold corresponding to the fiber type to determine the fiber type of the single fiber.
Optionally, in a fourth implementation manner of the first aspect of the present invention, the fiber type includes cotton and hemp, and the determining the fiber type of the single fiber by comparing the classification function value with a preset function threshold corresponding to the fiber type includes:
if the classification function value is smaller than the function threshold value, determining that the fiber type of the single fiber is cotton;
and if the classification function value is larger than or equal to the function threshold value, determining the fiber type of the single fiber to be hemp.
Optionally, in a fifth implementation manner of the first aspect of the present invention, the substituting the at least one texture feature parameter into a preset fiber classification mapping function to obtain a classification function value corresponding to the at least one texture feature parameter includes:
determining a target fiber classification mapping function from a plurality of preset fiber classification mapping functions, wherein different fabrics correspond to different fiber classification mapping functions;
and substituting at least one texture characteristic parameter into the target fiber classification mapping function to obtain the classification function value corresponding to at least one texture characteristic parameter.
Optionally, in a sixth implementation manner of the first aspect of the present invention, the fiber types include cotton and hemp, and determining various fiber type ratios of the fabric according to the fiber numbers corresponding to the various fiber types includes:
substituting the first fiber quantity corresponding to the cotton, the second fiber quantity corresponding to the linen, the density corresponding to the cotton, the density corresponding to the linen, the average width corresponding to the cotton, the average width corresponding to the linen, a preset cotton correction coefficient and a preset linen correction coefficient into a preset cotton/linen blending ratio calculation formula, and calculating to obtain the cotton/linen blending ratio of the fabric.
Optionally, in a seventh implementation manner of the first aspect of the present invention, the splitting the fibers of the overlapped fibers in the skeleton image includes:
calculating the curvature of the framework along each end point of the framework corresponding to the overlapped fibers in the direction of the intersection point of the framework by a preset step length;
fiber splitting the overlapping fibers based on the curvature of the skeleton.
A second aspect of the present invention provides an electronic apparatus, comprising: a memory and at least one processor, the memory having instructions stored therein;
the at least one processor invokes the instructions in the memory to cause the electronic device to perform a method of detecting a fabric fibre as defined in any one of the above.
A third aspect of the invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of detecting a textile fibre as defined in any one of the above.
In the technical scheme provided by the invention, when detecting the fabric fiber, a plurality of microscopic images of the fabric to be detected are collected, the plurality of microscopic images are subjected to image splicing to obtain a global image, the global image is subjected to image preprocessing, the processed image is subjected to fabric fiber framework extraction to obtain a corresponding framework image, then the overlapped fibers in the framework image are subjected to fiber splitting to obtain a single fiber image corresponding to each split single fiber, each single fiber image is subjected to feature extraction to obtain at least one texture feature parameter of the corresponding single fiber, the fiber type of the single fiber is determined according to at least one texture feature parameter, the fiber quantity corresponding to each fiber type is counted, and the proportion of various fiber types of the fabric is determined according to the fiber quantity corresponding to various fiber types, the method does not need to depend on manual operation, not only improves the efficiency of fabric fiber detection, but also improves the accuracy of fabric fiber detection.
Drawings
FIG. 1 is a schematic diagram of one embodiment of a method of detecting fabric fibers in an embodiment of the present invention;
FIG. 2 is a schematic diagram of a skeleton image corresponding to a cross fiber according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a probability density function curve of homogeneity corresponding to cotton and linen in an embodiment of the present invention;
FIG. 4 is a schematic diagram of a probability density function curve of energy corresponding to cotton and linen in an embodiment of the present invention;
fig. 5 is a schematic diagram of an embodiment of an electronic device in an embodiment of the invention.
Detailed Description
The embodiment of the invention provides a detection method of fabric fibers, electronic equipment and a computer readable storage medium, wherein when the fabric fibers are detected, a plurality of microscopic images of a fabric to be detected are collected and are subjected to image splicing to obtain a global image, the global image is subjected to image preprocessing, the processed image is subjected to fabric fiber framework extraction to obtain a corresponding framework image, then fiber splitting is carried out on overlapped fibers in the framework image to obtain a single fiber image corresponding to each split single fiber, feature extraction is carried out on each single fiber image to obtain at least one texture feature parameter of the corresponding single fiber, the fiber type of the single fiber is determined according to the at least one texture feature parameter, the fiber quantity corresponding to each fiber type is counted, and according to the fiber quantity corresponding to each fiber type, the method determines the proportion of various fiber types of the fabric without depending on manual operation, thereby not only improving the efficiency of fabric fiber detection, but also improving the accuracy of fabric fiber detection.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," or "having," and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For convenience of understanding, a specific flow of the embodiment of the present invention is described below, and according to the technical solution provided by the embodiment of the present invention, the execution subject of each step may be an electronic device. In one possible implementation, the electronic device may be an image processor. It should be noted that, in other possible implementations, the electronic device may also be other types of terminal devices besides the image processor, and is not particularly limited in this application.
Referring to fig. 1, an embodiment of a method for detecting fabric fibers according to an embodiment of the present invention includes:
101. collecting a plurality of microscopic images of a fabric to be detected, and carrying out image splicing on the plurality of microscopic images to obtain a global image;
the fabric to be detected can be cotton-hemp blended fabric or other blended fabric. Illustratively, the fabric is cut using a haar slicer to obtain a sample of its broken fiber-clastic fabric, and the sample is placed on a glass slide, dropped with paraffin oil, smeared with paraffin oil using a hard substance such as a glass rod, and finally covered with a cover slip. The sample was placed under an optical microscope and imaged by a microscope camera.
Due to high magnification, a microscope can only image an area with the actual size of about 1mm multiplied by 1mm, and to detect the textile fibers on the whole glass slide, the area on the glass slide needs to be scanned to obtain microscopic images of different areas, and a plurality of microscopic images are spliced to obtain a global image.
Illustratively, the image stitching operation includes, but is not limited to, performing image processing such as feature extraction, image deformation, image fusion, and the like on the microscopic image by using a feature extraction algorithm. The Feature extraction algorithm includes, but is not limited to, sift (scale artifact Feature transform) Feature point detection algorithm, fast (features from accessed Segment test) corner point detection algorithm, and the like. Image warping is the shifting and mapping of each microscopic image with respect to the global image. Image fusion is the fusion of overlapping regions of multiple microscopic images, including but not limited to feathering.
102. Carrying out image preprocessing on the global image, and carrying out fabric fiber framework extraction on the processed image to obtain a corresponding framework image;
the image preprocessing includes, but is not limited to, at least one of a plurality of image processing modes such as gray scale transformation, image enhancement, image filtering, morphological processing, and grain analysis.
In order to accurately detect the fabric fibers, the fabric fiber framework extraction is carried out on the image after the image preprocessing, and a corresponding framework image is obtained. The skeleton image describes fibers in a single form and fibers in a cross-overlapped form in a skeleton in a simplified form. For example, as shown in FIG. 2, FIG. 2 is a skeleton image corresponding to crossed fibers.
103. Splitting fibers of the overlapped fibers in the skeleton image to obtain a single fiber image corresponding to each split single fiber;
if the fibers in the skeleton image are not cross-overlapped, no fiber splitting is required. For the overlapped fibers in the skeleton image, the skeleton corresponding to the overlapped fibers is used to split the overlapped fibers, for example, the crossed fibers as shown in fig. 2 are split into fibers 1 in the upper and lower directions and fibers 2 in the left and right directions. Each single fiber after splitting corresponds to a single fiber image.
Optionally, in an embodiment, the step 103 specifically includes:
calculating the curvature of the framework along each end point of the framework corresponding to the overlapped fibers in the direction of the intersection point of the framework by a preset step length;
fiber splitting the overlapping fibers based on the curvature of the skeleton.
For example, the step length s is preset, and the specific value of the preset step length s can be flexibly set according to the actual situation, which is not particularly limited herein. Calculating the curvature | K | of the framework along the direction from each end point of the framework corresponding to the overlapped fibers to the intersection point of the framework by a preset step length s according to the following formula:
illustratively, the first threshold T1 and the second threshold T2 corresponding to the curvature are preset, wherein specific values of the first threshold T1 and the second threshold T2 can be flexibly set according to practical situations, and are not particularly limited herein. If the curvature | K | corresponding to a certain point on the skeleton is greater than the first threshold value T1, the point is determined to be the intersection point of the fibers, and the fibers are broken at the intersection point. If the curvature | K | corresponding to a certain point on the skeleton is smaller than the second threshold value T2, the fiber directions are determined to be consistent, and the fiber sections connected with the point are regarded as the same fiber. And (4) completing fiber splitting according to the above steps to obtain each split single fiber.
104. Performing feature extraction on each single fiber image to obtain at least one texture feature parameter of the corresponding single fiber, and determining the fiber type of the single fiber according to the at least one texture feature parameter;
unlike the conventional method of identifying the fiber type by using the fiber geometry, the fiber type is determined by using the distribution of the texture inside the fiber in the embodiment.
Optionally, in an embodiment, the step 104 specifically includes:
carrying out gray level transformation on each single fiber image to obtain a corresponding gray level image;
carrying out gray stretching and binarization processing on the gray image to obtain a corresponding binary image;
performing wavelet transformation processing on the binary image to obtain a plurality of corresponding wavelet sub-band images, and generating a gray level co-occurrence matrix according to each wavelet sub-band image;
and determining the texture characteristic parameters according to the elements in the gray level co-occurrence matrix.
For each single fiber image, firstly, the gray level of the single fiber image is transformed to obtain a gray level image. Then, for example, the gray scale image is subjected to gray scale stretching in a 0-255 gray scale space, and the image after the gray scale stretching is subjected to binarization processing to obtain a corresponding binary image, which is performed to reduce the amount of disturbance information such as disordered texture and noise of the image, so that the distribution uniformity of the prominent texture can be visually displayed.
And then, carrying out wavelet transformation processing on the binary image to obtain a plurality of wavelet sub-band images. For example, a one-level wavelet transform is performed on the binary image to obtain four wavelet subband images of LL, LH, HL and HH. For another example, the binary image is subjected to two-level wavelet transform to obtain four wavelet sub-band images of LLL, LLH, LHL and LHH.
Then, a gray level co-occurrence matrix is generated for each wavelet sub-band image, the gray level co-occurrence matrix counts texture features existing in the original image, and various texture feature parameters of the fibers can be extracted based on the gray level co-occurrence matrix. The texture characteristic parameters of the fiber include, but are not limited to, energy, contrast, entropy, homogeneity, variability, correlation, etc.
Illustratively, the energy is determined from the elements p (i, j) in the gray level co-occurrence matrix according to the following formula:
wherein i, j respectively represent row number and column number in the gray level co-occurrence matrix. The energy reflects the uniformity degree of the image gray level distribution and the texture thickness, and the corresponding texture thicknesses are different for different fiber types.
As another example, the entropy is determined according to the following formula:
then, the fiber type of the single fiber is determined according to the obtained at least one texture characteristic parameter. The fiber types include cotton, hemp, etc.
Optionally, in an embodiment, the step 104 specifically includes:
if the texture characteristic parameters comprise a plurality of types, selecting one or more texture characteristic parameters from the plurality of texture characteristic parameters, and determining the selected texture characteristic parameters as target texture characteristic parameters, wherein the target texture characteristic parameters have the capability of better distinguishing fiber types than other unselected texture characteristic parameters;
and determining the fiber type of the single fiber according to the target texture characteristic parameter.
For a plurality of texture characteristic parameters, some texture characteristic parameters can better distinguish different fiber types, and some texture characteristic parameters can not obviously distinguish different fiber types. Therefore, optionally, one or more texture feature parameters capable of obviously distinguishing different fiber types are selected from the multiple texture feature parameters to serve as target texture feature parameters, and texture feature parameters with low distinguishing degrees are abandoned. And determining the fiber type of the single fiber only according to the selected target texture characteristic parameters.
For example, using the characteristic values of the energies corresponding to different fiber types, a probability density function curve of a corresponding normal distribution can be obtained, for example, as shown in fig. 3, a curve 1 is a probability density function curve of homogeneity corresponding to cotton, and a curve 2 is a probability density function curve of homogeneity corresponding to hemp, where the abscissa of the curve is the characteristic value and the ordinate is the probability density. The discrimination between the curve 1 and the curve 2 is high, so that the homogeneity is determined as the target texture characteristic parameter, and the fiber type of the single fiber is determined to be cotton or hemp based on the homogeneity.
For another example, by using the characteristic values of entropies corresponding to different fiber types, a probability density function curve graph of corresponding normal distribution can be obtained, for example, as shown in fig. 4, a curve 3 is a probability density function curve of energy corresponding to cotton, a curve 4 is a probability density function curve of energy corresponding to hemp, where an abscissa of the curve is the characteristic value and an ordinate is the probability density. The distinction between curve 3 and curve 4 is not high, so that energy is discarded, and the energy, the textural characteristic parameter, is not used to determine whether the type of fiber of a single fiber is cotton or hemp.
Optionally, in an embodiment, the step 104 specifically includes:
substituting at least one texture characteristic parameter into a preset fiber classification mapping function to obtain a classification function value corresponding to at least one texture characteristic parameter;
and comparing the classification function value with a preset function threshold corresponding to the fiber type to determine the fiber type of the single fiber.
Illustratively, the fiber classification mapping function is preset:
y=f(x1,x2,…,xn)
wherein x is1,x2,…,xnAnd substituting the various texture characteristic parameters into the formula to calculate and obtain the corresponding classification function value y.
Illustratively, a function threshold T corresponding to the fiber type is preset, and a specific value of the function threshold T may be flexibly set according to an actual situation, which is not particularly limited herein.
And after the corresponding classification function value y is obtained through calculation, comparing the classification function value y with a function threshold value T, and determining the fiber type of the single fiber according to the comparison result.
For example, taking the fiber of the cotton-flax blended fabric as an example, if the classification function value y is smaller than the function threshold value T, the fiber type of the single fiber is determined to be cotton; otherwise, if the classification function value y is larger than or equal to the function threshold value T, the fiber type of the single fiber is determined to be hemp.
Optionally, in an embodiment, the step 104 specifically includes:
determining a target fiber classification mapping function from a plurality of preset fiber classification mapping functions, wherein different fabrics correspond to different fiber classification mapping functions;
and substituting at least one texture characteristic parameter into the target fiber classification mapping function to obtain the classification function value corresponding to at least one texture characteristic parameter.
Illustratively, various fiber classification mapping functions are preset, such as: f. of1(x1,x2,…,xn)、f2(x1,x2,…,xn) And determining a fiber classification mapping function corresponding to the fabric from a plurality of fiber classification mapping functions according to the fabric to be detected as a target fiber classification mapping function, for example, using f in the target fiber classification mapping function1(x1,x2,…,xn) As a target fiber classification mapping function, then substituting at least one texture characteristic parameter into the target fiber classification mapping function f1(x1,x2,…,xn) And obtaining corresponding classification function values.
And determining the fiber type of the single fiber according to the obtained classification function value in the manner described above.
In the above embodiment, it is not necessary to use complex methods such as machine learning and deep learning to construct a classifier, and it is only necessary to construct a simple fiber classification mapping function, and fiber classification can be implemented by comparing an output value of the fiber classification mapping function with a function threshold corresponding to a fiber type, so as to determine the fiber type of a single fiber.
105. And counting the fiber quantity corresponding to each fiber type, and determining the various fiber type ratios of the fabric according to the fiber quantity corresponding to various fiber types.
After the fiber type of each single fiber is determined through the steps, the number of the fibers corresponding to each fiber type is counted and recorded. For example, taking the fiber of the cotton-hemp blended fabric as an example, the number of the fiber corresponding to cotton and the number of the fiber corresponding to hemp are counted. And then determining the proportion of various fiber types of the fabric based on the number of fibers corresponding to the various fiber types. For example, the cotton and hemp ratios in the fabric are determined based on the fiber number corresponding to cotton and the fiber number corresponding to hemp.
Optionally, in an embodiment, the step 105 specifically includes:
substituting the first fiber quantity corresponding to the cotton, the second fiber quantity corresponding to the hemp, the density corresponding to the cotton, the density corresponding to the hemp, the average width corresponding to the cotton, the average width corresponding to the hemp, and the preset cotton correction coefficient and hemp correction coefficient into a preset cotton/hemp blending ratio calculation formula to calculate the cotton/hemp blending ratio of the fabric.
Illustratively, the preset cotton/linen blending ratio calculation formula is as follows:
wherein, PcIs the percentage (weight percentage) of cotton, PrIs the ratio (weight percentage) of hemp, NcFirst number of fibres being cotton, NrA second amount of fibres of hemp, KcIs the correction factor of cotton, KrCorrection for numbnessCoefficient, WcIs the average width of the cotton, WrIs the average width of the hemp, pcIs the density of cotton, prIs the density of hemp, Dc、SrIs an intermediate variable.
In the above embodiment, when detecting the fabric fiber, a plurality of microscopic images of the fabric to be detected are collected, the plurality of microscopic images are subjected to image splicing to obtain a global image, the global image is subjected to image preprocessing, the processed image is subjected to fabric fiber skeleton extraction to obtain a corresponding skeleton image, then the overlapped fibers in the skeleton image are subjected to fiber splitting to obtain a single fiber image corresponding to each split single fiber, each single fiber image is subjected to feature extraction to obtain at least one texture feature parameter of the corresponding single fiber, the fiber type of the single fiber is determined according to the at least one texture feature parameter, the fiber quantity corresponding to each fiber type is counted, the fiber types of the fabric are determined according to the fiber quantity corresponding to each fiber type, and the proportion of each fiber type is determined without depending on manual operation, the efficiency of fabric fiber detection is improved, and the accuracy of fabric fiber detection is also improved.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, the electronic device 500 may have a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 510 (e.g., one or more processors) and a memory 520, and one or more storage media 530 (e.g., one or more mass storage devices) storing applications 533 or data 532. Memory 520 and storage media 530 may be, among other things, transient storage or persistent storage. The program stored on the storage medium 530 may include one or more modules (not shown), each of which may include a sequence of instructions for operating the electronic device 500. Further, the processor 510 may be configured to communicate with the storage medium 530 to execute a series of instruction operations in the storage medium 530 on the electronic device 500.
The electronic device 500 may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input-output interfaces 560, and/or one or more operating systems 531, such as Android, Windows Server, Mac OS X, Unix, Linux, FreeBSD, and so forth. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 5 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The memory 520 stores computer readable instructions, which when executed by the processor 510, cause the electronic device 500 to perform the steps of the method for detecting textile fibers in the embodiments described above.
The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium, or a volatile computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method for detecting textile fibers in the above embodiments are implemented.
The technical solution of the present invention may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied 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 method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (10)
1. A method of detecting fabric fibers, comprising:
collecting a plurality of microscopic images of a fabric to be detected, and carrying out image splicing on the plurality of microscopic images to obtain a global image;
carrying out image preprocessing on the global image, and carrying out fabric fiber framework extraction on the processed image to obtain a corresponding framework image;
splitting fibers of the overlapped fibers in the skeleton image to obtain a single fiber image corresponding to each split single fiber;
performing feature extraction on each single fiber image to obtain at least one texture feature parameter of the corresponding single fiber, and determining the fiber type of the single fiber according to the at least one texture feature parameter;
and counting the fiber quantity corresponding to each fiber type, and determining the various fiber type ratios of the fabric according to the fiber quantity corresponding to various fiber types.
2. The method for detecting fabric fibers according to claim 1, wherein the performing feature extraction on each single fiber image to obtain at least one texture feature parameter of the corresponding single fiber comprises:
carrying out gray level transformation on each single fiber image to obtain a corresponding gray level image;
carrying out gray stretching and binarization processing on the gray image to obtain a corresponding binary image;
performing wavelet transformation processing on the binary image to obtain a plurality of corresponding wavelet sub-band images, and generating a gray level co-occurrence matrix according to each wavelet sub-band image;
and determining the texture characteristic parameters according to the elements in the gray level co-occurrence matrix.
3. The method for detecting fabric fibers according to claim 1, wherein the determining the fiber type of the single fiber according to at least one of the texture feature parameters comprises:
if the texture characteristic parameters comprise a plurality of types, selecting one or more texture characteristic parameters from the plurality of texture characteristic parameters, and determining the selected texture characteristic parameters as target texture characteristic parameters, wherein the target texture characteristic parameters have the capability of better distinguishing fiber types than other unselected texture characteristic parameters;
and determining the fiber type of the single fiber according to the target texture characteristic parameter.
4. The method for detecting fabric fibers according to claim 1, wherein the determining the fiber type of the single fiber according to at least one of the texture feature parameters comprises:
substituting at least one texture characteristic parameter into a preset fiber classification mapping function to obtain a classification function value corresponding to at least one texture characteristic parameter;
and comparing the classification function value with a preset function threshold value corresponding to the fiber type, and determining the fiber type of the single fiber.
5. The method for detecting the fabric fiber according to claim 4, wherein the fiber types include cotton and hemp, and the step of comparing the classification function value with a preset function threshold corresponding to the fiber type to determine the fiber type of the single fiber includes:
if the classification function value is smaller than the function threshold value, determining that the fiber type of the single fiber is cotton;
and if the classification function value is larger than or equal to the function threshold value, determining the fiber type of the single fiber to be hemp.
6. The method for detecting fabric fibers according to claim 4, wherein the step of substituting at least one of the texture feature parameters into a preset fiber classification mapping function to obtain a classification function value corresponding to at least one of the texture feature parameters comprises:
determining a target fiber classification mapping function from a plurality of preset fiber classification mapping functions, wherein different fabrics correspond to different fiber classification mapping functions;
and substituting at least one texture characteristic parameter into the target fiber classification mapping function to obtain the classification function value corresponding to at least one texture characteristic parameter.
7. The method for detecting the fabric fiber according to claim 1, wherein the fiber types comprise cotton and hemp, and the determining the various fiber type ratios of the fabric according to the fiber numbers corresponding to the various fiber types comprises:
substituting the first fiber quantity corresponding to the cotton, the second fiber quantity corresponding to the linen, the density corresponding to the cotton, the density corresponding to the linen, the average width corresponding to the cotton, the average width corresponding to the linen, a preset cotton correction coefficient and a preset linen correction coefficient into a preset cotton/linen blending ratio calculation formula, and calculating to obtain the cotton/linen blending ratio of the fabric.
8. The method for detecting the fabric fiber according to any one of claims 1 to 7, wherein the fiber splitting of the overlapped fibers in the skeleton image comprises:
calculating the curvature of the framework along each end point of the framework corresponding to the overlapped fibers in the direction of the intersection point of the framework by a preset step length;
fiber splitting the overlapping fibers based on the curvature of the skeleton.
9. An electronic device, characterized in that the electronic device comprises: a memory and at least one processor, the memory having instructions stored therein;
the at least one processor invokes the instructions in the memory to cause the electronic device to perform the method of detecting a fabric fiber of any of claims 1-8.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method for detecting a fabric fibre according to any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210607802.3A CN114693680A (en) | 2022-05-31 | 2022-05-31 | Method for detecting textile fibers, electronic device and computer-readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210607802.3A CN114693680A (en) | 2022-05-31 | 2022-05-31 | Method for detecting textile fibers, electronic device and computer-readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114693680A true CN114693680A (en) | 2022-07-01 |
Family
ID=82131225
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210607802.3A Pending CN114693680A (en) | 2022-05-31 | 2022-05-31 | Method for detecting textile fibers, electronic device and computer-readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114693680A (en) |
Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090042475A1 (en) * | 2007-08-02 | 2009-02-12 | North Carolina State University | Mixed fibers and nonwoven fabrics made from the same |
CN101739570A (en) * | 2009-12-28 | 2010-06-16 | 中国农业大学 | Cotton foreign fiber online classifying method and system |
CN102096827A (en) * | 2011-01-18 | 2011-06-15 | 东华大学 | Profiled fiber automatic recognition method based on scale invariability and support vector machine classification |
US20130301913A1 (en) * | 2012-05-08 | 2013-11-14 | Steven J. Simske | Selecting metrics for substrate classification |
CN105760877A (en) * | 2016-02-19 | 2016-07-13 | 天纺标检测科技有限公司 | Wool and cashmere identification algorithm based on gray level co-occurrence matrix model |
EP3203218A1 (en) * | 2014-09-29 | 2017-08-09 | IHI Corporation | Image analysis device, image analysis method, and program |
US20180105965A1 (en) * | 2016-10-19 | 2018-04-19 | North Carolina State University | Nonwoven fabrics and methods of making and using same |
CN109540898A (en) * | 2019-01-15 | 2019-03-29 | 天津工业大学 | A kind of testing system for content of profiled fibre and method |
CN111665244A (en) * | 2019-03-05 | 2020-09-15 | 温力力 | Method based on textile fiber identification and component detection system |
CN111665243A (en) * | 2019-03-05 | 2020-09-15 | 温力力 | Textile fiber identification and component detection system |
US20200299880A1 (en) * | 2019-03-18 | 2020-09-24 | The Procter & Gamble Company | Shaped Nonwovens that Exhibit High Visual Resolution |
CN111721765A (en) * | 2019-03-22 | 2020-09-29 | 温力力 | Textile fiber identification and component detection system and use method thereof |
CN111899233A (en) * | 2020-07-20 | 2020-11-06 | 中纺标(深圳)检测有限公司 | Blended fiber morphological characteristic identification model, training method and identification method thereof |
US20220044389A1 (en) * | 2018-10-30 | 2022-02-10 | University Of North Texas | Reconfigurable fabric inspection system |
-
2022
- 2022-05-31 CN CN202210607802.3A patent/CN114693680A/en active Pending
Patent Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090042475A1 (en) * | 2007-08-02 | 2009-02-12 | North Carolina State University | Mixed fibers and nonwoven fabrics made from the same |
CN101739570A (en) * | 2009-12-28 | 2010-06-16 | 中国农业大学 | Cotton foreign fiber online classifying method and system |
CN102096827A (en) * | 2011-01-18 | 2011-06-15 | 东华大学 | Profiled fiber automatic recognition method based on scale invariability and support vector machine classification |
US20130301913A1 (en) * | 2012-05-08 | 2013-11-14 | Steven J. Simske | Selecting metrics for substrate classification |
EP3203218A1 (en) * | 2014-09-29 | 2017-08-09 | IHI Corporation | Image analysis device, image analysis method, and program |
CN105760877A (en) * | 2016-02-19 | 2016-07-13 | 天纺标检测科技有限公司 | Wool and cashmere identification algorithm based on gray level co-occurrence matrix model |
US20180105965A1 (en) * | 2016-10-19 | 2018-04-19 | North Carolina State University | Nonwoven fabrics and methods of making and using same |
US20220044389A1 (en) * | 2018-10-30 | 2022-02-10 | University Of North Texas | Reconfigurable fabric inspection system |
CN109540898A (en) * | 2019-01-15 | 2019-03-29 | 天津工业大学 | A kind of testing system for content of profiled fibre and method |
CN111665244A (en) * | 2019-03-05 | 2020-09-15 | 温力力 | Method based on textile fiber identification and component detection system |
CN111665243A (en) * | 2019-03-05 | 2020-09-15 | 温力力 | Textile fiber identification and component detection system |
US20200299880A1 (en) * | 2019-03-18 | 2020-09-24 | The Procter & Gamble Company | Shaped Nonwovens that Exhibit High Visual Resolution |
CN111721765A (en) * | 2019-03-22 | 2020-09-29 | 温力力 | Textile fiber identification and component detection system and use method thereof |
CN111899233A (en) * | 2020-07-20 | 2020-11-06 | 中纺标(深圳)检测有限公司 | Blended fiber morphological characteristic identification model, training method and identification method thereof |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Holt et al. | Principles and methods for automated palynology | |
Holt et al. | Progress towards an automated trainable pollen location and classifier system for use in the palynology laboratory | |
US11328420B2 (en) | Quality control of automated whole-slide analyses | |
KR20130118275A (en) | Optimization of unknown defect rejection for automatic defect classification | |
KR20130118276A (en) | Integration of automatic and manual defect classification | |
Alper Selver et al. | Textural fabric defect detection using statistical texture transformations and gradient search | |
US7283659B1 (en) | Apparatus and methods for searching through and analyzing defect images and wafer maps | |
EP4250143A2 (en) | Systems and methods for spectral unmixing of microscopic images using pixel grouping | |
US9070203B2 (en) | Identification and quantification of microtextured regions in materials with ordered crystal structure | |
Perciano et al. | Insight into 3D micro-CT data: exploring segmentation algorithms through performance metrics | |
Fabijańska | A survey of thresholding algorithms on yarn images | |
US20210312620A1 (en) | Generating annotation data of tissue images | |
Brixtel et al. | Whole slide image quality in digital pathology: review and perspectives | |
CN111710360B (en) | Method, system, device and medium for predicting protein sequence | |
CN112699919B (en) | Wood identification method and device based on three-dimensional convolutional neural network model | |
CN114693680A (en) | Method for detecting textile fibers, electronic device and computer-readable storage medium | |
CN109859218B (en) | Pathological graph key area determination method and device, electronic equipment and storage medium | |
Li et al. | A two-scale attention model for intelligent evaluation of yarn surface qualities with computer vision | |
Bechar et al. | An image‐analysis technique for accurate counting of pollen on stigmas | |
Tan et al. | Simple Landscapes Analysis for Relevant Regions Detection in Breast Carcinoma Histopathological Images | |
US10482314B2 (en) | Automatic calculation for ploidy classification | |
CN112967223A (en) | Artificial intelligence-based textile detection system, method and medium | |
Olson | Image analysis using the Aperio ScanScope | |
KR102098794B1 (en) | Web based system and method for analyzing cell profile using 3d brain neural circuit image | |
JP2004227279A (en) | Failure cause diagnosing method using mahalanobis distance and program |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20220701 |