Textile fiber classification method based on block comparison
The textile fiber classification method, which uses block comparison and multi-level texture feature correlation analysis, solves the problems of subjectivity and efficiency in traditional fiber classification methods, achieves accurate capture of local fiber structure and reduces the misjudgment rate, and improves adaptability.
Patent Information
- Application Number
- CN202511182438.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-22
- Publication Date
- 2025-12-05
AI Technical Summary
Traditional textile fiber classification methods rely on manual observation, which is highly subjective, inefficient, and difficult to quantify. Existing global feature extraction schemes based on image recognition are not adaptable to local fiber interweaving and texture variation areas, and are prone to misjudgment, especially in the identification of fibers with similar shapes.
A segmented comparison method for textile fiber classification is adopted. Local patterns are obtained through matrix segmentation, combined with multi-level texture feature correlation analysis, and fiber texture features are identified by a preset image feature extraction algorithm. The fiber type is then accurately classified by weight value calculation.
It significantly reduces the misclassification rate of similar fibers such as cashmere and wool, improves processing speed, expands the adaptability of application scenarios, and supports the accurate identification of the shape features of multiple types of fibers.
Smart Images

Figure CN121074486A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image recognition, in particular to a textile fiber classification method based on block comparison. BACKGROUND
[0002] The accurate classification of textile fibers is a core link of textile quality control. The traditional method mainly relies on manual observation, and the fiber texture form is judged by experience, which has the problems of strong subjectivity, low efficiency and difficulty in quantification. In recent years, automatic classification technology based on image recognition has been gradually applied, but the existing scheme mainly extracts global features, which is not suitable for the adaptation of local interweaving and texture variation areas of fibers. Especially for fibers with similar forms (such as cashmere and wool), due to the lack of hierarchical analysis of the correlation of local features, misjudgment is easy to occur. Therefore, there is an urgent need for a classification method that combines block feature comparison and dynamic region sampling to improve the recognition accuracy in complex scenarios through multi-level texture feature correlation analysis. SUMMARY
[0003] The purpose of the present application is to provide a textile fiber classification method based on block comparison to improve the problem that the traditional method mainly relies on manual observation to judge the fiber texture form, which is subjective, low in efficiency and difficult to quantify.
[0004] In order to achieve the above purpose, the embodiments of the present application provide the following technical scheme:
[0005] The embodiments of the present application provide a textile fiber classification method based on block comparison, which comprises: performing matrix segmentation on the collected fiber photos to obtain a plurality of local patterns in matrix distribution, and marking a plurality of local patterns at corresponding positions as primary patterns according to preset sampling unit position information; identifying the fiber texture features corresponding to each primary pattern based on a plurality of preset image feature extraction algorithms of fiber shape classes, denoted as first fiber texture features; determining the sampling area of adjacent secondary patterns based on the fiber texture features corresponding to the primary patterns, and respectively calculating the weight value of the first fiber texture features and the corresponding similar fiber features in the sampling area of the secondary patterns, the weight value including fiber type and weight value; calculating the cumulative sum of the weight value corresponding to each fiber type in the fiber photo, and sorting based on the size of the cumulative sum of the weight value, and classifying the textile fibers in the fiber photo into the fiber type with the maximum weight value.
[0006] Optionally, identifying the fiber texture features corresponding to each primary pattern based on a plurality of preset image feature extraction algorithms of fiber shape classes comprises:
[0007] The image feature extraction algorithm based on linear type identifies a plurality of bar line segments in the primary pattern, counts the average length of the plurality of bar line segments, and screens out a plurality of effective bar line segments based on 75% to 135% of the average length;
[0008] An evaluation value corresponding to the primary pattern is calculated by a weighted algorithm based on the number and length average of the effective bar line segments, and if the evaluation value is greater than a first threshold value, the bar line segments in the primary pattern are marked as cashmere texture features; if the evaluation value is less than the first threshold value, the bar line segments in the primary pattern are marked as wool texture features.
[0009] Optionally, the determination manner of the secondary pattern sampling area of the cashmere texture feature is:
[0010] The vector average of the plurality of effective bar line segments in the primary pattern is obtained, denoted as a first average vector;
[0011] A first extension line is constructed along the direction of the first average vector, and a second extension line segment with a corresponding length is intercepted on the first extension line based on the length of the first average vector and a preset extension multiple;
[0012] A square sampling area is constructed with the second extension line segment as a diagonal, denoted as a secondary pattern sampling area of the cashmere texture feature, and the primary pattern is located in the secondary pattern sampling area.
[0013] Optionally, the manner of calculating the equity value of the cashmere texture feature in the secondary pattern sampling area is:
[0014] The preset cashmere texture feature judgment parameters and the wool texture feature judgment parameters similar to the cashmere texture feature are called, and the judgment parameters are a line segment length threshold range;
[0015] The image feature extraction algorithm based on linear type identifies a plurality of bar line segments in the secondary pattern sampling area, and screens out cashmere texture feature line segments and wool texture feature line segments in the plurality of bar line segments based on the preset cashmere texture feature judgment parameters and the wool texture feature judgment parameters, and counts the number of cashmere texture feature line segments and the number of wool texture feature line segments;
[0016] The area of the secondary pattern sampling area is calculated based on the length of the second extension line segment, and the distribution density of the cashmere texture feature and the distribution density of the wool texture feature in the secondary pattern sampling area are calculated based on the number of cashmere texture feature line segments and the number of wool texture feature line segments;
[0017] The equity value of the cashmere texture feature in the secondary pattern sampling area is found in the equity value distribution table based on the ratio of the distribution density of the cashmere texture feature to the standard cashmere texture feature distribution density;
[0018] Based on the ratio of the wool texture feature distribution density to the standard wool texture feature distribution density, the equity value of the wool texture feature in the secondary pattern sampling area is found in the equity value allocation table.
[0019] Optionally, the sampling area for the secondary pattern of wool texture features is determined as follows:
[0020] Eight sampling areas of the same size as the primary pattern are defined around the primary pattern, thus forming a 3*3 grid area with the primary pattern, and this area is marked as the sampling area of the secondary pattern for wool texture characteristics.
[0021] Optionally, the image feature extraction algorithm based on line classes further includes the following steps before identifying multiple bar segments in the secondary pattern sampling region:
[0022] Gaussian filtering is applied to the sampling area of the secondary pattern for noise reduction, and the size of the filter kernel is positively correlated with the average length of the effective bar segment.
[0023] Optionally, after performing Gaussian filtering to denoise the secondary pattern sampling area, the method further includes:
[0024] The CLAHE algorithm is used to enhance the local contrast of the sampling area of the denoised secondary image, and the contrast enhancement threshold is 3.0-4.0.
[0025] The beneficial effects of this invention are as follows:
[0026] The textile fiber classification method based on block comparison described in this invention extracts primary pattern texture features through matrix block extraction and combines it with secondary dynamic sampling region analysis to achieve accurate capture of local fiber structure. In particular, it solves the problem of identifying subtle differences in texture between similar fibers such as cashmere and wool, and significantly reduces the false judgment rate.
[0027] Secondly, a hierarchical feature processing strategy is adopted. First, key areas are quickly screened through primary patterns, and then secondary area equity values are calculated in a targeted manner to avoid global redundant calculations and improve processing speed.
[0028] Secondly, it supports preset fiber shape feature extraction algorithms. By adjusting the judgment parameters (such as line segment length threshold or line segment bending shape, etc.), it can be adapted to different fibers such as cotton, linen, wool, and cashmere, thus expanding the application scenarios.
[0029] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing embodiments of the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description
[0030] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0031] Figure 1 This is a schematic diagram of a textile fiber classification method based on block comparison as described in an embodiment of the present invention;
[0032] Figure 2 This is a schematic diagram of a textile fiber classification device based on block comparison, as described in an embodiment of the present invention. Detailed Implementation
[0033] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0034] It should be noted that similar reference numerals or letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this invention, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0035] Example 1:
[0036] like Figure 1 As shown, this embodiment provides a textile fiber classification method based on block comparison, the method including steps S100, S200, S300 and S400.
[0037] Step S100, the collected fiber photos are matrix segmented to obtain a plurality of local patterns in matrix distribution, and the local patterns at corresponding positions are marked as primary patterns according to preset sampling unit position information. It should be noted that the placement position of the textile fiber raw material detection block, the magnification of the camera and the shooting angle all have requirements, and they are all set by manual before sample detection. Once set and put into generation, they will not be adjusted. This method is different from the conventional textile fiber detection method based on visual global feature extraction. Only a small part of the area is taken as a sample during sampling, and this part of the area is generally evenly distributed, that is, the primary pattern. The main role of the primary pattern is to preliminarily determine the approximate fiber type, and then determine the size of the secondary pattern sampling area based on the determined type. In the actual production process, the local features of the fiber are not very obvious, so the macro features may correspond to many different fabrics. Therefore, the primary pattern is only used to preliminarily determine the approximate fabric with similar macro features. The first fiber texture feature analyzed based on the primary pattern may have errors, so a larger range of secondary pattern sampling area needs to be introduced for further determination.
[0038] Step S200, based on the preset image feature extraction algorithm of a plurality of fiber shape classes trained and optimized through a large number of real pictures, the fiber texture feature corresponding to each primary pattern is identified, which is recorded as a first fiber texture feature.
[0039] Step S300, based on the fiber texture feature corresponding to the primary pattern, the adjacent secondary pattern sampling area is determined, and the first fiber texture feature and the corresponding similar fiber feature in the secondary pattern sampling area are calculated respectively. The equity value includes the fiber type and the equity value.
[0040] Step S400, the cumulative sum of the equity value corresponding to each fiber type in the fiber photo is counted, and the cumulative sum of the equity value is sorted based on the size, and the textile fiber in the fiber photo is classified as the fiber type with the maximum equity value. Since the similar features of the fibers are small, the equity values of different fiber types in a plurality of secondary pattern sampling areas are summed by this method, so as to reduce the misjudgment degree of the algorithm as much as possible, while avoiding the problem of large calculation amount and long system response time caused by global feature extraction.
[0041] Overall, the present application preliminarily determines the approximate fiber type (may be wrong) by intercepting a plurality of local features corresponding to the first pattern, and then determines the size of the second pattern based on the fiber type. Different fiber types have different sizes of the corresponding second pattern sampling area. For example, if the image feature is spherical or short linear, a circle around the first pattern is sampled. If the image feature is long linear, the vector direction of the long linear needs to be extended for sampling in order to ensure the accuracy of image recognition. Different image features correspond to different second pattern sampling area division methods.
[0042] The textile fiber classification method based on block comparison in the embodiment extracts the first pattern texture feature by matrix block, and realizes accurate capture of the local structure of the fiber by combining the second dynamic sampling area analysis. In particular, it solves the problem of recognizing the subtle differences in the textures of similar fibers such as cashmere (long linear) and wool (short linear), and significantly reduces the misjudgment rate.
[0043] Secondly, a hierarchical feature processing strategy is adopted. The key area is first quickly screened by the first pattern, and then the second area equity value is calculated accordingly, avoiding global redundant calculation and improving processing speed.
[0044] Embodiment 2:
[0045] Based on Embodiment 1, this embodiment is used to further illustrate the method of recognizing the subtle differences in the textures of similar fibers such as cashmere (long linear) and wool (short linear) (mainly based on length). Before explaining the recognition method, some brief descriptions of the physical characteristics of wool and cashmere fabrics are given. In image feature recognition, wool fabric and cashmere fabric both exhibit linear characteristics. The main difference between them is the length and density they exhibit under certain light and shooting angles. Specifically, cashmere fabric exhibits more obvious linear characteristics, i.e., clear linear segments, mainly because the single fiber of cashmere fabric is relatively long and the raw material is good. Although the wool fabric also exhibits short linear segments, the average length of the single fiber of the wool fabric is significantly shorter than that of the cashmere fabric. Moreover, the short linear segments of the single fiber of the wool fabric are distributed in a cross pattern, which leads to a lower success rate of linear image recognition algorithms. Therefore, when identifying the features of wool fabric and cashmere fabric, both of them will be identified as multiple linear features. However, the average length of the linear features and the linear density per unit area of the two will be significantly different. Based on the above differences, this embodiment provides a specific method for identifying wool and cashmere fabrics.
[0046] Step S210: Based on the linear image feature extraction algorithm, a plurality of linear segments are identified in the first pattern, the average length of the plurality of linear segments is calculated, and based on 75% to 135% of the average length, a plurality of effective linear segments are screened out from the linear segments;
[0047] Step S220: Based on the number and average length of the effective bar segments, an evaluation value corresponding to the primary pattern is calculated using a weighted algorithm. If the evaluation value is greater than the first threshold, the bar segments in the primary pattern are marked as cashmere texture features (large number, large average length, and large evaluation value); if the evaluation value is less than the first threshold, the bar segments in the primary pattern are marked as wool texture features (low image recognition success rate, resulting in fewer recognized effective bar segments, and small average length, and small evaluation value).
[0048] The method for determining the secondary pattern sampling area of cashmere texture features is as follows:
[0049] Step S310: Obtain the average vector of multiple valid bar segments in the primary pattern, denoted as the first mean vector. The valid bar segments are distributed in a cross pattern. The first mean vector is used to characterize the overall distribution direction of cashmere fibers, which facilitates the determination of the sampling area of the secondary pattern in the later stage. The area is confirmed according to the direction of this first mean vector.
[0050] Step S320: Construct a first extension line along the direction of the first mean vector, and based on the length of the first mean vector (representing the average length of the effective bar line segments in the first-level pattern), cut a second extension line segment of corresponding length on the first extension line according to a preset extension multiple;
[0051] Step S330: Construct a square sampling area with the second extended line segment as the diagonal, denoted as the secondary pattern sampling area of cashmere texture features. The primary pattern is located within the secondary pattern sampling area. The secondary pattern sampling area is mainly used to further determine whether the primary pattern is correct. At the same time, it will also collect the number of similar features for comprehensive evaluation. For example, both wool fabric and cashmere fabric will be counted here. However, the distribution of the secondary pattern sampling area is more conducive to the identification of cashmere texture features.
[0052] Secondly, the method for determining the secondary pattern sampling area of wool texture features is as follows:
[0053] Step S340: Define 8 sampling areas of the same size as the primary pattern around the primary pattern, thereby forming a 3*3 grid area with the primary pattern, and mark this area as the secondary pattern sampling area of wool texture feature. Wool texture feature is relatively short, so it does not need to construct a secondary pattern sampling area along the direction of cashmere fibers as cashmere feature.
[0054] The calculation method for the equity values of cashmere texture features and wool texture features in the secondary pattern sampling area is as follows:
[0055] Step S410, retrieve the preset cashmere texture feature judgment parameter and the wool texture feature judgment parameter similar to the cashmere texture feature, and the judgment parameter is a line segment length threshold range, that is, the length value is used to distinguish whether the plurality of bar-shaped line segments in the secondary pattern sampling area belong to the cashmere texture feature or the wool texture feature;
[0056] Step S420, identify the plurality of bar-shaped line segments in the secondary pattern sampling area based on the line-based image feature extraction algorithm, and screen out the cashmere texture feature line segments and the wool texture feature line segments in the plurality of bar-shaped line segments based on the preset cashmere texture feature judgment parameter and the wool texture feature judgment parameter, and count the number of cashmere texture feature line segments and the number of wool texture feature line segments;
[0057] Step S430, calculate the area of the secondary pattern sampling area based on the second extended line segment length, and calculate the cashmere texture feature distribution density and the wool texture feature distribution density in the secondary pattern sampling area based on the number of cashmere texture feature line segments and the number of wool texture feature line segments;
[0058] Step S440, find the equity value of the cashmere texture feature in the secondary pattern sampling area in the equity value distribution table based on the ratio of the cashmere texture feature distribution density to the standard cashmere texture feature distribution density, the equity value is similar to the matching degree score of big data, and the data in the equity value distribution table is obtained through a large number of artificial experiments. Under the current light and shooting angle conditions, the density of bar-shaped line segments recognized by the image per unit area of cashmere fabric and the density of bar-shaped line segments recognized by the image per unit area of wool fabric, the closer the detected density value (wool texture feature distribution density / cashmere texture feature distribution density) to the standard value (standard wool texture feature distribution density / standard cashmere texture feature distribution density), the greater the corresponding equity value;
[0059] Step S450, find the equity value of the wool texture feature in the secondary pattern sampling area in the equity value distribution table based on the ratio of the wool texture feature distribution density to the standard wool texture feature distribution density.
[0060] Embodiment 3:
[0061] This embodiment is based on embodiment 2, and before the line-based image feature extraction algorithm identifies the plurality of bar-shaped line segments in the secondary pattern sampling area, it further includes:
[0062] Gaussian filter denoising is performed on the secondary pattern sampling area, and the filter kernel size is positively correlated with the average length of the effective bar-shaped line segments, and then the CLAHE algorithm is used to enhance the local contrast of the denoised secondary pattern sampling area, and the contrast enhancement threshold is 3.0-4.0.
[0063] Embodiment 4:
[0064] The embodiment provides a textile fiber classification device based on block comparison, and the device comprises the following modules.
[0065] A segmentation and identification module is configured to perform matrix segmentation on the collected fiber photos to obtain a plurality of local patterns in matrix distribution, and identify local patterns at corresponding positions as primary patterns according to preset sampling unit position information.
[0066] A feature identification module is configured to identify fiber texture features corresponding to each primary pattern based on preset image feature extraction algorithms of a plurality of fiber shape classes, and the fiber texture features are recorded as first fiber texture features.
[0067] An equity value calculation module is configured to determine a secondary sampling area of adjacent secondary patterns based on the fiber texture features corresponding to the primary patterns, and calculate equity values of the first fiber texture features and corresponding similar fiber features in the secondary sampling area, wherein the equity values comprise fiber types and equity numerical values.
[0068] A statistical module is configured to accumulate and sort the equity numerical values corresponding to each fiber type in the fiber photos based on the size of the equity numerical values, and classify the textile fibers in the fiber photos as a fiber type with the maximum equity value.
[0069] It should be noted that, as to the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be described in detail here.
[0070] Embodiment 5:
[0071] Corresponding to the above method embodiment, the embodiment of the disclosure also provides a textile fiber classification device based on block comparison. The textile fiber classification device based on block comparison described below can be mutually corresponding to the textile fiber classification method based on block comparison described above.
[0072] Figure 2 is a block diagram of a textile fiber classification device based on block comparison according to an example embodiment. As shown in Figure 2 The electronic device 800 can include a processor 801 and a memory 802. The electronic device 800 can also include one or more of a multimedia component 803, an I / O interface 804, and a communication component 805.
[0073] The processor 801 is configured to control overall operations of the electronic device 800 to complete all or part of the steps of the textile fiber classification method based on block comparison described above. The memory 802 is configured to store various types of data to support the operations of the electronic device 800, which can include, for example, instructions for operating any application or method on the electronic device 800, and application-related data, such as contact data, sent and received messages, pictures, audio, video, and the like. The memory 802 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The multimedia component 803 can include a screen and an audio component. The screen can be, for example, a touch screen, and the audio component is configured to output and / or input audio signals. For example, the audio component can include a microphone configured to receive external audio signals. The received audio signals can be further stored in the memory 802 or transmitted through the communication component 805. The audio component also includes at least one speaker configured to output audio signals. The I / O interface 804 provides an interface between the processor 801 and other interface modules, which can be a keyboard, a mouse, a button, and the like. The buttons can be virtual buttons or physical buttons. The communication component 805 is configured to perform wired or wireless communication between the electronic device 800 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, near field communication (NFC), 2G, 3G or 4G, or a combination of one or more of them, so the corresponding communication component 805 can include a Wi-Fi module, a Bluetooth module, an NFC module.
[0074] In an example embodiment, the electronic device 800 can be implemented by one or more Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), controller, microcontroller, microprocessor or other electronic elements for performing the above-described textile fiber classification method based on block comparison.
[0075] In another example embodiment, a computer-readable storage medium including program instructions is also provided, which, when executed by a processor, implement the steps of the above-described textile fiber classification method based on block comparison. For example, the computer-readable storage medium can be the above-described memory 802 including program instructions, which can be executed by the processor 801 of the electronic device 800 to complete the above-described textile fiber classification method based on block comparison.
[0076] Embodiment 6:
[0077] Corresponding to the above method embodiments, the embodiments of the present disclosure also provide a readable storage medium, and the readable storage medium described below can be mutually corresponding with reference to the above-described textile fiber classification method based on block comparison.
[0078] A readable storage medium, on which a computer program is stored, the computer program, when executed by a processor, implements the steps of the above-described textile fiber classification method based on block comparison of the method embodiments.
[0079] The readable storage medium can specifically be a U disk, a mobile hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and various readable storage media that can store program codes.
[0080] The above only describes the preferred embodiments of the present disclosure and is not used to limit the present disclosure. For those skilled in the art, the present disclosure can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A method for classifying textile fibers based on patch contrast, characterized in that, The method comprises: The collected fiber photos are matrix segmented to obtain a plurality of local patterns in matrix distribution, and a plurality of local patterns at corresponding positions are marked as primary patterns according to preset sampling unit position information; The fiber texture features corresponding to each primary pattern are identified based on preset image feature extraction algorithms of a plurality of fiber shape classes, and are recorded as first fiber texture features; Based on the fiber texture features corresponding to the primary patterns, the sampling regions of adjacent secondary patterns are determined, and the first fiber texture features and the corresponding similar fiber features in the secondary pattern sampling regions are calculated respectively, wherein the equity value includes fiber type and equity value; The cumulative sum of the equity value corresponding to each fiber type in the fiber photo is counted, and the cumulative sum of the equity value is sorted based on the size, and the textile fibers in the fiber photo are classified as the fiber type with the maximum equity value.
2. The block contrast-based textile fiber classification method according to claim 1, wherein, The fiber texture features corresponding to each primary pattern are identified based on preset image feature extraction algorithms of a plurality of fiber shape classes, including: Based on the image feature extraction algorithm of the linear class, a plurality of bar line segments are identified in the primary pattern, the average length of the plurality of bar line segments is counted, and a plurality of effective bar line segments are screened out based on 75% to 135% of the average length; The evaluation value corresponding to the primary pattern is calculated by a weighted algorithm based on the number and length average of the effective bar line segments, if the evaluation value is greater than a first threshold value, the bar line segments in the primary pattern are marked as cashmere texture features, and if the evaluation value is less than the first threshold value, the bar line segments in the primary pattern are marked as wool texture features.
3. The block contrast-based textile fiber classification method according to claim 2, wherein, The determination method of the secondary pattern sampling region of the cashmere texture feature is: The vector average of a plurality of effective bar line segments in the primary pattern is obtained, and is recorded as a first average vector; A first extension line is constructed along the direction of the first average vector, and a second extension line segment with a corresponding length is intercepted on the first extension line based on the length of the first average vector according to a preset extension multiple; A square sampling region is constructed with the second extension line segment as the diagonal, which is recorded as the secondary pattern sampling region of the cashmere texture feature, and the primary pattern is located in the secondary pattern sampling region.
4. The block contrast-based textile fiber classification method according to claim 3, wherein, The method for calculating the equity value of the cashmere texture feature in the secondary pattern sampling region is: The preset cashmere texture feature judgment parameter and the wool texture feature judgment parameter similar to the cashmere texture feature are called, and the judgment parameter is a line segment length threshold range; Based on the image feature extraction algorithm of the linear class, a plurality of bar line segments are identified in the secondary pattern sampling region, and the cashmere texture feature line segments and the wool texture feature line segments are screened out in the plurality of bar line segments based on the preset cashmere texture feature judgment parameter and the wool texture feature judgment parameter, and the number of cashmere texture feature line segments and the number of wool texture feature line segments are counted; The area of the secondary pattern sampling region is calculated based on the length of the second extension line segment, and the cashmere texture feature distribution density and the wool texture feature distribution density in the secondary pattern sampling region are calculated based on the number of cashmere texture feature line segments and the number of wool texture feature line segments. Based on the ratio of cashmere texture feature distribution density to standard cashmere texture feature distribution density, the equity value of cashmere texture feature in the secondary pattern sampling area is found in the equity value allocation table. Based on the ratio of the wool texture feature distribution density to the standard wool texture feature distribution density, the equity value of the wool texture feature in the secondary pattern sampling area is found in the equity value allocation table.
5. The block contrast based textile fiber classification method of claim 2, wherein, The method for determining the secondary pattern sampling area of wool texture features is as follows: Eight sampling areas of the same size as the primary pattern are defined around the primary pattern, thus forming a 3*3 grid area with the primary pattern, and this area is marked as the sampling area of the secondary pattern for wool texture characteristics.
6. The block contrast based textile fiber classification method of claim 4, wherein, Before identifying multiple bar line segments in the secondary pattern sampling region, the image feature extraction algorithm based on line classes also includes: Gaussian filtering is applied to the sampling area of the secondary pattern for noise reduction, and the size of the filter kernel is positively correlated with the average length of the effective bar segment.
7. The block contrast-based textile fiber classification method according to claim 6, wherein, After Gaussian filtering and denoising the sampling area of the secondary pattern, the following steps are also included: The CLAHE algorithm is used to enhance the local contrast of the sampling area of the denoised secondary image, and the contrast enhancement threshold is 3.0-4.0.
