CN114913122A - Method and system for detecting content of short fibers in textile fibers - Google Patents
Method and system for detecting content of short fibers in textile fibers Download PDFInfo
- Publication number
- CN114913122A CN114913122A CN202210345083.2A CN202210345083A CN114913122A CN 114913122 A CN114913122 A CN 114913122A CN 202210345083 A CN202210345083 A CN 202210345083A CN 114913122 A CN114913122 A CN 114913122A
- Authority
- CN
- China
- Prior art keywords
- fiber
- fibers
- complete
- pixel points
- short
- 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
- 239000000835 fiber Substances 0.000 title claims abstract description 433
- 239000004753 textile Substances 0.000 title claims abstract description 39
- 238000000034 method Methods 0.000 title claims abstract description 38
- 230000002159 abnormal effect Effects 0.000 claims abstract description 27
- 230000006870 function Effects 0.000 claims description 8
- 230000011218 segmentation Effects 0.000 claims description 7
- 238000004590 computer program Methods 0.000 claims description 6
- 230000008859 change Effects 0.000 claims description 4
- 238000000605 extraction Methods 0.000 claims description 4
- 238000001514 detection method Methods 0.000 description 7
- 230000008569 process Effects 0.000 description 5
- 238000002834 transmittance Methods 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000001788 irregular Effects 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 238000005070 sampling Methods 0.000 description 2
- 206010020112 Hirsutism Diseases 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000005452 bending Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000003708 edge detection Methods 0.000 description 1
- 239000004744 fabric Substances 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
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
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
- G06T7/64—Analysis of geometric attributes of convexity or concavity
-
- 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
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Geometry (AREA)
- Quality & Reliability (AREA)
- Treatment Of Fiber Materials (AREA)
Abstract
The invention relates to the field of textiles, in particular to a method and a system for detecting the content of short fibers in textile fibers. The method comprises the following steps: collecting a gray image of the textile fiber, obtaining single fiber pixel points and overlapping pixel points, and respectively carrying out connected domain combination to obtain a plurality of fiber regions and a plurality of overlapping regions; separating a plurality of individual fibers from the fiber region; combining the overlapped area with the single fiber to which the overlapped area belongs according to the membership degree to form a secondary complete fiber; for every two complete fibers, acquiring merged fibers after merging, and counting the number of abnormal curvatures of the merged fibers; acquiring the shape index of the combined fiber; obtaining the degree of engagement according to the number of the repeated pixel points of the complete fibers, the number of abnormal curvatures and the shape index of every two times; and combining a plurality of complete fibers according to the fitting degree, and judging whether the fibers are short fibers or not so as to obtain the content of the short fibers. The embodiment of the invention can accurately and quickly obtain the content of the short fibers by analyzing the image characteristics of the textile fibers.
Description
Technical Field
The invention relates to the field of textiles, in particular to a method and a system for detecting the content of short fibers in textile fibers.
Background
Textile fibers are often different in length, the fiber length is an important factor determining the spinnability of the fibers, the content of short fibers has a greater influence on the strength and the evenness of spun yarns, the tensile property, the surface hairiness amount, the fabric style and the like of the spun yarns are influenced, and the method is an important basis for process design, equipment selection, product grading, trade pricing and the like, so that the content of the short fibers in the textile fibers needs to be detected.
At present, a manual sampling detection mode is usually adopted in production, a bundle of fibers needs to be separated and then subjected to length measurement through manual sampling detection, efficiency is low, the requirement on the proficiency of detection personnel is high, and results obtained by different detection personnel are different. Some automatic detection systems are also available in the market, most of the automatic detection systems need machines with large volume and complex operation, and are equipped with environments with certain requirements on temperature and humidity, and the cost is high.
Disclosure of Invention
In order to solve the technical problems, the invention aims to provide a method and a system for detecting the content of short fibers in textile fibers, and the adopted technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for detecting the content of short fibers in textile fibers, the method comprising the steps of:
collecting a gray image of textile fibers, and performing threshold segmentation on the gray image to obtain single-fiber pixel points and overlapped pixel points; respectively merging the connected domains to obtain a plurality of fiber regions and a plurality of overlapped regions;
separating a plurality of individual fibers from the fiber region; for each single fiber, combining the single fiber with the adjacent overlapping area, acquiring the membership degree of the overlapping area belonging to the single fiber according to the curvature of a combining position, and combining the overlapping area with the single fiber belonging to the overlapping area according to the membership degree to form a secondary complete fiber;
for every two secondary complete fibers, merging fibers after merging are obtained, and the number of abnormal curvatures in the curvatures of edge pixel points of the merging fibers is counted; acquiring the shape index of the combined fiber according to the skeleton length and the fiber width of the secondary complete fiber; acquiring the fitting degree of each two times of complete fibers according to the number of repeated pixel points of each two times of complete fibers, the number of abnormal curvatures and the shape index;
and merging the secondary complete fibers according to the degree of engagement to obtain a plurality of complete fibers, judging whether each complete fiber is a short fiber, and obtaining the content of the short fiber according to the number of pixel points of the short fiber.
Preferably, the obtaining of the single fiber pixel point and the overlapped pixel point includes:
obtaining an inverse image of the gray image, drawing a gray histogram of the inverse image, and obtaining single fiber pixel points and overlapping pixel points by utilizing Gaussian distribution of gray values according to a statistical value of the gray histogram.
Preferably, the step of acquiring the overlapping area includes:
and grouping the overlapped pixel points according to the gray value, and combining the overlapped pixel points which are mutually communicated in the same group to obtain a plurality of overlapped areas.
Preferably, the membership obtaining process includes:
and obtaining curvature difference according to the curvature change of the combined region edge, obtaining the membership grade according to the curvature difference, wherein the curvature difference and the membership grade are in a negative correlation relationship.
Preferably, the process for obtaining the secondary intact fiber comprises the following steps:
and connecting each single fiber with an adjacent overlapping area, calculating the corresponding membership degree, and combining the overlapping area with the membership degree larger than the membership threshold with the single fiber to form the secondary complete fiber.
Preferably, the process of acquiring the number of abnormal curvatures includes:
and acquiring curvatures of all edge pixel points of the combined fibers, drawing a box-shaped graph of all the curvatures of the combined fibers to acquire abnormal curvatures, and counting the number of the abnormal curvatures.
Preferably, the shape index acquiring step includes:
performing skeleton extraction on each secondary complete fiber to obtain the skeleton length, and making a plurality of vertical skeletons which are vertical to the skeleton of the secondary complete fiber and intersect with the edge of the secondary complete fiber, wherein the maximum length of each vertical skeleton is taken as the fiber width;
when the skeleton length of the combined fiber is greater than the sum of the skeleton lengths of the two corresponding secondary complete fibers, and the fiber width of the combined fiber is not greater than the width of any one of the two corresponding secondary complete fibers, the shape index is a first preset value; otherwise, the value is the second preset value.
Preferably, the step of obtaining the degree of engagement includes:
acquiring the quantity of a pixel point union set of two secondary complete fibers corresponding to the merged fiber as the quantity of the repeated pixel points; taking a piecewise function corresponding to the number of the repeated pixel points as a first factor;
and calculating the product of the first factor, the second factor and the third factor as the fitting degree of the merged fiber by taking a piecewise function corresponding to the number of the abnormal curvatures as a second factor and the shape index as a third factor.
Preferably, the short fiber content is obtained by the following steps:
and combining the two secondary complete fibers with the fitting degree being a preset fitting threshold value to form the complete fiber, analyzing the length of the complete fiber, and when the length is not more than the preset length, taking the proportion of the pixel points of all the short fibers in the gray level image as the content of the short fibers, wherein the complete fiber is a short fiber.
In a second aspect, another embodiment of the present invention provides a system for detecting a short fiber content in a textile fiber, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method for detecting a short fiber content in a textile fiber when executing the computer program.
The embodiment of the invention at least has the following beneficial effects:
the single fibers and the overlapping regions are connected with each other by calculating the membership degrees of the single fibers and the overlapping regions to obtain secondary complete fibers, the degree of engagement between every two secondary complete fibers is calculated, the secondary complete fibers belonging to the same fiber are connected to form the complete fibers, the length of the complete fibers is calculated, whether the complete fibers are short fibers or not is judged, and the content of the short fibers is calculated. According to the embodiment of the invention, the content of the short fibers can be accurately and quickly obtained by analyzing the image characteristics of the textile fibers, the labor cost is reduced, and the detection efficiency and accuracy are improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart illustrating the steps of a method for detecting the short fiber content of textile fibers according to an embodiment of the present invention;
FIG. 2 is a schematic cross-sectional view of a fiber;
FIG. 3 is a schematic illustration of the single fiber and the overlap region being adjoined according to one embodiment of the present invention;
FIG. 4 is a schematic illustration of the single fiber abutting the overlap region according to another embodiment of the present invention.
Detailed Description
To further illustrate the technical means and effects of the present invention adopted to achieve the predetermined objects, the following detailed description will be given for the method and system for detecting the content of short fibers in textile fibers according to the present invention, with reference to the accompanying drawings and preferred embodiments, and the detailed implementation, structure, features and effects thereof. In the following description, different "one embodiment" or "another embodiment" refers to not necessarily the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The following describes a specific scheme of the method and system for detecting the content of short fibers in textile fibers provided by the invention in detail by combining with the accompanying drawings.
Referring to fig. 1, a flow chart of steps of a method for detecting the short fiber content in a textile fiber according to an embodiment of the present invention is shown, the method including the following steps:
step S001, collecting a gray level image of the textile fiber, and performing threshold segmentation on the gray level image to obtain single fiber pixel points and overlapped pixel points; and respectively carrying out connected domain combination to obtain a plurality of fiber regions and a plurality of overlapping regions.
The method comprises the following specific steps:
1. gray scale images of the textile fibers are collected.
The textile fiber to be detected is thinned, laid flatly and placed, the uniform light source is placed below the textile fiber to polish the textile fiber from bottom to top. And (3) placing a camera right above the textile fiber, shooting the textile fiber image, and converting the textile fiber image into a gray image.
2. And carrying out threshold segmentation on the gray level image to obtain single fiber pixel points and overlapped pixel points.
Obtaining an inverse image of the gray image, drawing a gray histogram of the inverse image, and obtaining single fiber pixel points and overlapping pixel points by utilizing Gaussian distribution of gray values according to the statistic value of the gray histogram.
The distribution direction of the fibers in the textile fibers is irregular, and different fibers can be overlapped or crossed. Since the textile fibers have a certain light transmittance, the individual fibers appear as a lighter gray color in the gray scale image under the irradiation of the light source. The overlapped part of the fibers is influenced by the light transmittance, and a part of light is lost through each fiber, so that the overlapped part of the fibers is darker in color in a gray scale image.
And (5) inverting the gray level image of the textile fiber to obtain an inverted image. The darkest colored portions of the inverse image are the fiber-free portions and the lighter colored portions are the individual fibers. And performing threshold segmentation on the reverse phase image, wherein pixel points with the gray values larger than the gray threshold are fiber pixel points, and obtaining N fiber pixel points.
And drawing a gray level histogram of the inverse image by taking the gray level values of the N fiber pixel points as horizontal coordinates and the number of the pixel points corresponding to the gray level values as vertical coordinates. The fibers of the non-overlapping part have deep color at the overlapping part of a plurality of fibers in the reversed phase image, namely, the gray value of the pixel point of the fibers of the non-overlapping part is smaller and is positioned at the leftmost side in the fiber gray histogram. The fibers at the non-overlapped part have consistent gray scale under uniform illumination, and the gray scale value shows the tendency of Gaussian distribution under the action of noise.
And acquiring a left peak value of the gray histogram, and performing Gaussian distribution fitting on the gray value and the number of left pixels by using a least square method by taking the gray value corresponding to the peak value as a mean value mu to obtain a Gaussian distribution standard deviation parameter sigma. The probability that the gray value of the fiber pixel point of the non-overlapping part falls outside the range of (mu-3 sigma, mu +3 sigma) is less than three thousandths, and corresponding events are considered to be not generated in practical problems, so that the range (mu-3 sigma, mu +3 sigma) is considered as the practical possible value range of the gray value of the fiber pixel point of the non-overlapping part. Taking mu +3 sigma as a threshold value, carrying out threshold value segmentation on all fiber pixel points, taking single fiber pixel points smaller than the threshold value as non-overlapping parts, and totaling N 1 A plurality of; the overlapped pixel points which are more than or equal to the threshold value and are overlapped part, N is total 2 N ═ N 1 +N 2 。
3. And respectively carrying out connected domain combination to obtain a plurality of fiber regions and a plurality of overlapping regions.
For N 1 The single-fiber pixel points are mutually combined into a fiber area to obtain M fiber areas, and each fiber area can be a single fiber and a plurality of adjacent single fibers as far as possible.
For N 2 And the overlapping pixel points are grouped according to the gray value, and the overlapping pixel points which are mutually communicated in the same group are combined to obtain a plurality of overlapping areas.
Specifically, mean shift clustering is performed on the gray values of all overlapped pixel points, the overlapped pixel points are divided into different categories according to the gray values, the gray values of the overlapped pixel points of each category are basically consistent, adjacent overlapped pixel points in the same category are combined, and a plurality of overlapped fiber regions are obtained.
Step S002, separating a plurality of single fibers from the fiber area; and combining each single fiber with the adjacent overlapping area, acquiring the membership degree of the overlapping area belonging to the single fiber according to the curvature of the combining position, and combining the overlapping area and the single fiber subordinate to the overlapping area according to the membership degree to form the secondary complete fiber.
The method comprises the following specific steps:
1. a plurality of individual fibers are separated from the fiber region.
The fibers are in a long cylindrical shape, as shown in a schematic cross-sectional view of the fibers in fig. 2, the thickness of the adjacent part of two adjacent single fibers is thinner than that of the single fiber, the light transmittance of the adjacent part is larger, the color after phase inversion is darker than that of the fibers at the non-overlapped part, but the gray scale difference between the two parts is small, so that the two adjacent single fibers are difficult to be separated by threshold value separation in step S001. Therefore, edge detection is performed on each region by using a canny operator, the detected edge is a part adjacent to the adjacent single fiber, and each region is divided into the single fibers according to the detected edge. And (3) dividing the M fiber areas to obtain M' single fibers, wherein the single fibers are single fibers.
2. And acquiring the membership degree of the overlapping area belonging to the single fiber.
In the obtained M' single fibers, some single fibers may be only one part of a complete fiber, so the probability that the overlapping region around each single fiber belongs to the single fiber is calculated, so that the overlapping region is divided into the corresponding fibers according to the probability.
The specific method for acquiring the membership degree comprises the following steps:
and connecting the single fiber with the adjacent overlapping area, obtaining curvature difference according to the curvature change of the combined area edge, and obtaining the membership degree according to the curvature difference, wherein the curvature difference and the membership degree are in a negative correlation relationship.
Connecting the ith single fiber with the jth adjacent overlapping area to obtain an area ij, calculating the curvature of each pixel point on the edge of the area ij to obtain a curvature sequence: r ij ={r ij1 ,r ij2 ,…,r ijk ,r ijk+1 ,…,r ijo ,r ijo+1 … } according to the curvature r of the point k at the end of the connecting line 301, as shown in FIG. 3 ijk Curvature r at pixel point k +1 ijk+1 Curvature r of pixel o ijo And curvature r at pixel point k +1 ijo+1 Calculating the membership degree p of the jth overlapping area adjacent to the ith single fiber and belonging to the ith single fiber ij :
Wherein, Δ r ijk The curvature difference, Δ r, corresponding to the pixel point k at the edge point of the adjacent position is represented ijo And representing the curvature difference corresponding to another pixel point o at the edge point of the adjacent position.
Wherein,the average curvature corresponding to the pixel point k at the edge point of the adjacent position is represented,and the average curvature corresponding to another pixel point o at the edge point of the adjacent position is represented.
The average curvature is calculated as follows:to select not to include r ijk And r ijk+1 A preset number of curvatures before and after (c) are averaged.The same is true.
As an example, the preset number is 10 in the embodiment of the present invention.
Similarly, as shown in fig. 4, the curvature r of the pixel point k at the end of the connection line 401 is determined ijk Curvature r at pixel point k +1 ijk+1 Curvature r of pixel o ijo And curvature r at pixel point k +1 ijo+1 Calculating the membership degree p of the jth overlapping area adjacent to the ith single fiber and belonging to the ith single fiber ij 。
The larger the curvature difference is, the larger the bending degree of the area ij at the adjacent part is, and the membership p of the j-th overlapping area adjacent to the ith single fiber belongs to the ith single fiber ij The smaller; conversely, the smaller the curvature difference is, the greater the smoothness of the edge of the area ij at the adjacent part is, and the membership p of the j-th overlapping area adjacent to the ith single fiber belongs to the ith single fiber ij The larger.
3. And connecting each single fiber with the adjacent overlapping area, calculating the corresponding membership degree, and combining the overlapping area with the membership degree larger than the membership threshold with the single fiber to form the secondary complete fiber.
According to degree of membership p ij And judging whether the jth overlapping area adjacent to the ith single fiber belongs to the ith single fiber or not. If the membership degree is greater than the membership threshold beta, the fiber belongs to the ith single fiber, and the overlapped area is merged into the ith single fiber; if the probability is less than or equal to the membership threshold β, the overlapping region does not belong to the ith single fiber.
As an example, in the embodiment of the present invention, β is 0.5.
Similarly, all the overlapping areas of each single fiber adjacent to each other are calculated to belong to the singleAnd merging the overlapping region and the single fiber according to the membership degree of the fiber. It should be noted that the same overlapping area may belong to multiple individual fibers simultaneously. After the division of all the overlapped regions is finished, M' single fibers containing overlapped parts are obtained and recorded as secondary complete fibers, and the collection of pixel points contained in each secondary complete fiber is W 1 ,W 2 ,…,W M′ 。
S003, acquiring merged fibers after merging for every two complete fibers, and counting the number of abnormal curvatures in the curvatures of edge pixel points of the merged fibers; acquiring the shape index of the combined fiber according to the skeleton length and the fiber width of the secondary complete fiber; and acquiring the fitting degree of the two complete fibers according to the number of repeated pixel points of the two complete fibers, the number of abnormal curvatures and the shape index.
The method comprises the following specific steps:
1. and (3) acquiring curvatures of all edge pixel points of the combined fibers, drawing a box-shaped graph for all the curvatures of the combined fibers to acquire abnormal curvatures, and counting the number of the abnormal curvatures.
And (3) merging the u-th complete fiber and the v-th complete fiber, wherein if the two are the same complete fiber, the merged shape is a slender rectangle, and if the two are not the same complete fiber, the merged shape is irregular and an included angle is formed. And calculating the curvature of each edge pixel point of the merged fiber to obtain a curvature sequence. Except 4 inflection points of the curvature of the pixel points at the edge of the complete fiber, namely 4 corners of the slender rectangle, the curvatures of the rest pixel points are basically consistent or slowly change, the curvature difference is small, and the difference between the area of the 4 inflection points and the curvatures of the rest pixel points is large; if the two are not the same complete fiber, the curvature of the included angle part and the curvature of the rest pixel points are different greatly except that the curvature of the inflection point and the curvature of the rest pixel points of the merged image are different greatly.
And drawing the box-type graph to obtain abnormal data in the curvature sequence, wherein the abnormal data is the curvature of an inflection point part or the curvature of an included angle part. And counting the number g (uv) of abnormal data to obtain the number of abnormal curvatures.
2. And acquiring the shape index of the combined fiber.
Performing skeleton extraction on each secondary complete fiber to obtain skeleton length, and making a plurality of vertical skeletons which are vertical to the skeleton of the secondary complete fiber and intersect with the edge of the secondary complete fiber, wherein the maximum length of the vertical skeletons is used as the fiber width; when the skeleton length of the combined fiber is greater than the sum of the skeleton lengths of the two corresponding secondary complete fibers, and the fiber width of the combined fiber is not greater than the width of any fiber of the two corresponding secondary complete fibers, the shape index is a first preset value; otherwise, the value is a second preset value.
Performing skeleton extraction on the u-th complete fiber to obtain the skeleton of the u-th complete fiber and the skeleton length l u Making a vertical line intersecting the edge of the u-th complete fiber as a vertical skeleton, calculating the length of each vertical skeleton by using the Euclidean distance, and acquiring the maximum value of the length, namely the fiber width of the u-th complete fiber, and recording the maximum value as b u 。
Obtaining the skeleton length l of the v-th complete fiber in the same way v And width b of the v-th sub-complete fiber v Skeleton length l of the combined fibers uv And the fiber width b of the combined fibers uv 。
The shape index h (uv) of the combined fibers is:
if the u-th complete fiber and the v-th complete fiber belong to the same complete fiber, the length of the combined fibers is increased: l uv >l u And l uv >l v While the width does not increase: b uv =max(b u ,b v ) When h (uv) is 1; if the two are combined, the width is increased by b uv >b u And b is uv >b v It is possible that two sub-whole fibers are partially connected in parallel, but the two sub-whole fibers are not the same whole fiber, and h (uv) is 0.
3. And calculating the integrating degree between the two secondary complete fibers corresponding to the combined fibers.
Acquiring the quantity of a union set of pixel points of two secondary complete fibers corresponding to the merged fiber as the quantity of repeated pixel points; taking a piecewise function corresponding to the number of the repeated pixel points as a first factor; and taking the piecewise function corresponding to the number of the abnormal curvatures as a second factor, taking the shape index as a third factor, and calculating the product of the first factor, the second factor and the third factor as the fitting degree of the combined fibers.
The calculation method of the first factor comprises the following steps:
obtaining a pixel point set W of the u-th complete fiber u And the pixel point set W of the v-th complete fiber v Taking the intersection and counting the number of the pixels in the intersection as the number n (W) of the repeated pixels u ∩W v ) If n (W) u ∩W v ) Is 0, then f (n (W) u ∩W v ) 0, if n (W) u ∩W v )>0, then f (n (W) u ∩W v ) 1), i.e. the corresponding piecewise function is:
the second factor is calculated by:
if the number of abnormal curvatures g (uv) >4, i.e. 4-g (uv) +1 ≦ 0, the u-th and v-th intact fibers may not be the same intact fiber, and f (4-g (uv) +1) ≦ 0; conversely, if 4-g (uv) +1>0, then f (4-g (uv) +1) ═ 1, i.e. the number of abnormal curvatures corresponds to a piecewise function of:
taking the shape index as a third factor, and calculating the product of the first factor, the second factor and the third factor as the integrating degree q of the combined fiber uv :
q uv =f(n(W u ∩W v ))×f(4-g(uv)+1)×h(uv)
When no repeated pixel point exists in the pixel point set of the u-th complete fiber and the v-th complete fiber, the u-th complete fiber and the v-th complete fiber do not belong to the same complete fiber, and the degree of engagement between the u-th complete fiber and the v-th complete fiber is 0; when a repeated pixel point exists in the pixel point set of the u-th complete fiber and the v-th complete fiber, but other pixel points with larger curvature difference exist in the curvature of the pixel point at the edge of the area formed by the u-th complete fiber and the v-th complete fiber except 4 inflection points, the u-th complete fiber and the v-th complete fiber do not belong to the same complete fiber, and the degree of engagement of the two is 0; when a repeated pixel point exists in the pixel point set of the u-th complete fiber and the v-th complete fiber, the curvature of the pixel point at the edge of the area formed by the u-th complete fiber and the v-th complete fiber is smooth, but the width of the area formed by combining the u-th complete fiber and the v-th complete fiber is increased, the u-th complete fiber and the v-th complete fiber can be two parallel fibers with overlapped fibers, and the degree of engagement between the two fibers is 0; when a repeated pixel point exists in the pixel point set of the u-th complete fiber and the v-th complete fiber, the curvature of the pixel point at the edge of the region formed by the u-th complete fiber and the v-th complete fiber is smooth, the width of the region formed by combining the u-th complete fiber and the v-th complete fiber is not increased, the length is increased, the u-th complete fiber and the v-th complete fiber belong to the same complete fiber, and the degree of engagement between the u-th complete fiber and the v-th complete fiber is 1.
The fit between every two complete fibers was calculated in the same way.
And step S004, merging the secondary complete fibers according to the degree of engagement to obtain a plurality of complete fibers, judging whether each complete fiber is a short fiber, and obtaining the content of the short fibers according to the number of pixel points of the short fibers.
The method comprises the following specific steps:
1. and merging the secondary complete fibers according to the fitting degree to obtain a plurality of complete fibers.
Combining two secondary complete fibers with the degree of fit of 1 to obtain a plurality of complete fibers, wherein if the degree of fit between the secondary complete fiber A and the secondary complete fiber B is 1, the degree of fit between the secondary complete fiber B and the secondary complete fiber C is also 1, and at this time, the secondary complete fiber A, the secondary complete fiber B and the secondary complete fiber C are the same complete fiber.
2. The short fiber content was calculated.
And combining the two secondary complete fibers with the degree of fitting being a preset fitting threshold value to form a complete fiber, analyzing the length of the complete fiber, and when the length is not more than the preset length, taking the complete fiber as a short fiber, and taking the ratio of the number of pixel points of all the short fibers in the gray level image as the content of the short fibers.
Firstly, calculating the length of each complete fiber, wherein each complete fiber is a connected domain, and obtaining the short axis l of the connected domain of the t-th complete fiber through connected domain analysis t The length d of the t-th intact fiber t Comprises the following steps:
wherein S is t And (3) representing a pixel point set, n (S), of a connected domain corresponding to the t-th complete fiber t ) And the number of the pixel points of the connected domain corresponding to the t-th complete fiber is represented, namely the area of the connected domain.
When the length is not greater than the preset length α, the intact fiber is a short fiber, the preset length α is given according to practical production experience, and as an example, the value of α in the embodiment of the present invention is 15.
After all the short fibers are obtained, calculating the content c of the short fibers in the textile fibers according to the number of pixel points of the short fibers:
wherein S is 1′ Representing the pixel point set contained in the 1 st short fiber, T representing the total amount of the short fibers, S T′ Representing the pixel point set, n (S), contained in the T-th short fiber 1′ ∪S 2′ ∪…∪S T′ ) The number of pixel points of all short fibers is represented, and N represents the total number of pixels in the gray-scale image.
In summary, the embodiment of the present invention collects the gray image of the textile fiber, and performs threshold segmentation on the gray image to obtain single fiber pixel points and overlapped pixel points; respectively merging the connected domains to obtain a plurality of fiber regions and a plurality of overlapped regions; separating a plurality of individual fibers from the fiber region; for each single fiber, combining the single fiber with an adjacent overlapping area, acquiring the membership degree of the overlapping area belonging to the single fiber according to the curvature of the combining position, and combining the overlapping area and the single fiber subordinate to the overlapping area according to the membership degree to form a secondary complete fiber; for every two complete fibers, merging fibers after merging are obtained, and the number of abnormal curvatures in the curvatures of edge pixel points of the merging fibers is counted; acquiring the shape index of the combined fiber according to the skeleton length and the fiber width of the secondary complete fiber; acquiring the integrating degree of the two complete fibers according to the number of repeated pixel points of each two complete fibers, the number of abnormal curvatures and the shape index; and merging the secondary complete fibers according to the degree of engagement to obtain a plurality of complete fibers, judging whether each complete fiber is a short fiber, and obtaining the content of the short fiber according to the number of pixel points of the short fiber. According to the embodiment of the invention, the short fiber content can be accurately and quickly obtained by analyzing the image characteristics of the textile fibers, and the required equipment cost is low.
The embodiment of the invention also provides a system for detecting the content of short fibers in textile fibers, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor implements the steps of the method when executing the computer program. Since the method for detecting the content of short fibers in textile fibers is described in detail above, it is not repeated.
It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments. And specific embodiments thereof have been described above. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
All the embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from other embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (10)
1. The method for detecting the content of short fibers in textile fibers is characterized by comprising the following steps:
collecting a gray image of textile fibers, and performing threshold segmentation on the gray image to obtain single-fiber pixel points and overlapped pixel points; respectively merging the connected domains to obtain a plurality of fiber regions and a plurality of overlapped regions;
separating a plurality of individual fibers from the fiber region; for each single fiber, combining the single fiber with the adjacent overlapping area, acquiring the membership degree of the overlapping area belonging to the single fiber according to the curvature of a combining position, and combining the overlapping area with the single fiber belonging to the overlapping area according to the membership degree to form a secondary complete fiber;
for every two secondary complete fibers, merging fibers after merging are obtained, and the number of abnormal curvatures in the curvatures of edge pixel points of the merging fibers is counted; acquiring the shape index of the combined fiber according to the skeleton length and the fiber width of the secondary complete fiber; acquiring the degree of fit of every two times of complete fibers according to the number of repeated pixel points of every two times of complete fibers, the number of abnormal curvatures and the shape index;
and merging the secondary complete fibers according to the degree of engagement to obtain a plurality of complete fibers, judging whether each complete fiber is a short fiber, and obtaining the content of the short fiber according to the number of pixel points of the short fiber.
2. The method of claim 1, wherein the obtaining single-fiber pixel points and overlapping pixel points comprises:
obtaining an inverse image of the gray image, drawing a gray histogram of the inverse image, and obtaining single fiber pixel points and overlapping pixel points by utilizing Gaussian distribution of gray values according to the statistic value of the gray histogram.
3. The method of claim 1, wherein the step of obtaining the overlap region comprises:
and grouping the overlapped pixel points according to the gray value, and combining the overlapped pixel points which are mutually communicated in the same group to obtain a plurality of overlapped areas.
4. The method of claim 1, wherein the membership is obtained by:
and obtaining curvature difference according to the curvature change of the combined region edge, obtaining the curvature difference, and obtaining the membership degree according to the curvature difference, wherein the curvature difference and the membership degree are in a negative correlation relationship.
5. The method of claim 1, wherein the sub-whole fiber is obtained by:
and connecting each single fiber with an adjacent overlapping area, calculating the corresponding membership degree, and combining the overlapping area with the membership degree larger than the membership threshold with the single fiber to form the secondary complete fiber.
6. The method according to claim 1, wherein the number of abnormal curvatures is obtained by:
and acquiring curvatures of all edge pixel points of the combined fibers, drawing a box-shaped graph of all the curvatures of the combined fibers to acquire abnormal curvatures, and counting the number of the abnormal curvatures.
7. The method of claim 1, wherein the step of obtaining the shape index comprises:
performing skeleton extraction on each secondary complete fiber to obtain the skeleton length, and making a plurality of vertical skeletons which are vertical to the skeleton of the secondary complete fiber and intersect with the edge of the secondary complete fiber, wherein the maximum length of each vertical skeleton is taken as the fiber width;
when the skeleton length of the combined fiber is greater than the sum of the skeleton lengths of the two corresponding secondary complete fibers, and the fiber width of the combined fiber is not greater than the width of any one of the two corresponding secondary complete fibers, the shape index is a first preset value; otherwise, the value is a second preset value.
8. The method of claim 1, wherein the obtaining of the degree of engagement comprises:
acquiring the quantity of a pixel point union set of two secondary complete fibers corresponding to the merged fiber as the quantity of the repeated pixel points; taking a piecewise function corresponding to the number of the repeated pixel points as a first factor;
and calculating the product of the first factor, the second factor and the third factor as the fitting degree of the merged fiber by taking a piecewise function corresponding to the number of the abnormal curvatures as a second factor and the shape index as a third factor.
9. The method according to claim 1, characterized in that the short fiber content is obtained by:
and combining the two secondary complete fibers with the fitting degree being a preset fitting threshold value to form the complete fiber, analyzing the length of the complete fiber, and when the length is not more than the preset length, taking the proportion of the pixel points of all the short fibers in the gray level image as the content of the short fibers, wherein the complete fiber is a short fiber.
10. A system for detecting the content of short fibers in textile fibers, comprising a memory, a processor and a computer program stored in said memory and executable on said processor, wherein said processor when executing said computer program performs the steps of the method according to any one of claims 1 to 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210345083.2A CN114913122A (en) | 2022-03-31 | 2022-03-31 | Method and system for detecting content of short fibers in textile fibers |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210345083.2A CN114913122A (en) | 2022-03-31 | 2022-03-31 | Method and system for detecting content of short fibers in textile fibers |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114913122A true CN114913122A (en) | 2022-08-16 |
Family
ID=82763785
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210345083.2A Pending CN114913122A (en) | 2022-03-31 | 2022-03-31 | Method and system for detecting content of short fibers in textile fibers |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114913122A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116883688A (en) * | 2023-09-08 | 2023-10-13 | 泗水县锦川花生食品有限公司 | Intelligent picking method for fried peanuts |
-
2022
- 2022-03-31 CN CN202210345083.2A patent/CN114913122A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116883688A (en) * | 2023-09-08 | 2023-10-13 | 泗水县锦川花生食品有限公司 | Intelligent picking method for fried peanuts |
CN116883688B (en) * | 2023-09-08 | 2023-12-01 | 泗水县锦川花生食品有限公司 | Intelligent picking method for fried peanuts |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114549522B (en) | Textile quality detection method based on target detection | |
CN109523520B (en) | Chromosome automatic counting method based on deep learning | |
CN111402226A (en) | Surface defect detection method based on cascade convolution neural network | |
CN105550660B (en) | A kind of recognition methods of woven fabric structure structure species | |
CN106529559A (en) | Pointer-type circular multi-dashboard real-time reading identification method | |
CN107256406A (en) | Overlapping fibers image partition method, device, storage medium and computer equipment | |
WO1992017848A1 (en) | Automated method and apparatus for determining characteristics of nerve fibers | |
CN111079620A (en) | Leukocyte image detection and identification model construction method based on transfer learning and application | |
CN103020609B (en) | The recognition methods of complicated fibre image | |
CN117152158B (en) | Textile defect detection method and system based on artificial intelligence | |
CN114913122A (en) | Method and system for detecting content of short fibers in textile fibers | |
CN114581376B (en) | Automatic sorting method and system for textile silkworm cocoons based on image recognition | |
CN115719344A (en) | Fabric defect analysis and identification method for textile fabric quality inspection | |
CN118154605B (en) | Textile AI flaw detection method, system and equipment | |
CN112184615A (en) | Fabric colored fiber detection system based on image processing | |
CN110648312A (en) | Method for identifying wool and cashmere fibers based on scale morphological characteristic analysis | |
CN116008289A (en) | Nonwoven product surface defect detection method and system | |
CN113936001B (en) | Textile surface flaw detection method based on image processing technology | |
US5299133A (en) | Method for determining and controlling fiber luster properties | |
CN108389194A (en) | The image-recognizing method and device of denim water washing effect evaluation based on artificial intelligence | |
CN106770372A (en) | White glass detection method of surface flaw based on micro-vision | |
CN111353247A (en) | Method for identifying and reconstructing mesoscopic components of plain weave structure of ceramic matrix composite | |
CN107169466B (en) | Palm print image quality comprehensive evaluation method based on rank-sum ratio method | |
CN110906887A (en) | Method for detecting flatness of clothing sewing | |
Huang et al. | A vision based method for automated measurement of circular fiber cross-sections |
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 |