

技术领域technical field
本发明涉及图像识别技术领域,具体涉及一种基于人工智能的纺织品定性分类方法。The invention relates to the technical field of image recognition, in particular to a method for qualitative classification of textiles based on artificial intelligence.
背景技术Background technique
在纺织行业中,纺织工艺品的准确分类是关乎到后续包装、整理以及染色等重要步骤,例如,面料种类为针织物的经编纺织工艺品和纬编纺织工艺品在染整工序中的染色步骤和熨烫步骤是完全不同的,面料种类为机织物的混纺纺织工艺品和交织纺织工艺品的一些重要的生产参数的设定也是不同的。因此,为了保证纺织工艺品的质量,就需要在纺织工艺品制成时对其进行定性分类。In the textile industry, the accurate classification of textile crafts is related to important steps such as subsequent packaging, finishing and dyeing. The ironing steps are completely different, and the settings of some important production parameters are also different for blended textile handicrafts and interwoven textile handicrafts whose fabric types are woven fabrics. Therefore, in order to ensure the quality of textile handicrafts, it is necessary to qualitatively classify textile handicrafts when they are made.
传统的分类方式是利用图像识别技术中的灰度共生矩阵进行定性分类,也就是通过灰度共生矩阵的各种统计特性进行分类,本质上是对大量图像数据的统计指标的一种经验性总结,该方法的准确性较低。随着计算机视觉技术和人工智能系统的发展,现有技术中对纺织工艺品的定性分类除了依赖人工目检的方法外,还出现了利用计算机视觉、人工智能等技术对纺织工艺品进行定性分类的方法,例如利用人工神经网络算法进行纺织工艺品定性分类,但是该方法需要大量的带标签的图像数据对网络进行训练,数据成本高且标签需要人工进行标记,浪费了人力资源,增加了工作人员的工作量,并且不同的面料种类的纺织工艺品对应的人工神经网络算法不同,无法实现分类方法的集成,导致纺织工艺品的定性分类的适用性低。The traditional classification method is to use the gray-scale co-occurrence matrix in image recognition technology for qualitative classification, that is, to classify according to various statistical characteristics of the gray-scale co-occurrence matrix, which is essentially an empirical summary of the statistical indicators of a large number of image data. , the accuracy of this method is low. With the development of computer vision technology and artificial intelligence systems, the qualitative classification of textile handicrafts in the prior art not only relies on manual visual inspection, but also uses computer vision, artificial intelligence and other technologies to qualitatively classify textile handicrafts. For example, the artificial neural network algorithm is used for qualitative classification of textile handicrafts, but this method requires a large amount of labeled image data to train the network, the data cost is high, and the labels need to be manually labeled, which wastes human resources and increases the work of the staff. In addition, the artificial neural network algorithms corresponding to textile handicrafts of different fabric types are different, and the integration of classification methods cannot be realized, resulting in low applicability of qualitative classification of textile handicrafts.
发明内容SUMMARY OF THE INVENTION
为了解决上述现有纺织工艺品的定性分类方法适用性低的问题,本发明的目的在于提供一种基于人工智能的纺织品定性分类方法。In order to solve the problem of low applicability of the existing qualitative classification methods for textile handicrafts, the purpose of the present invention is to provide a qualitative classification method for textiles based on artificial intelligence.
本发明提供了一种基于人工智能的纺织品定性分类方法,包括以下步骤:The invention provides a method for qualitative classification of textiles based on artificial intelligence, comprising the following steps:
获取待分类纺织品的表面图像,并对表面图像进行多尺度下采样,得到各个采样图像及其采样尺度;Obtain the surface image of the textile to be classified, and perform multi-scale down-sampling on the surface image to obtain each sampling image and its sampling scale;
根据各个采样图像,确定各个采样图像对应的每个角度的灰度游程矩阵,进而确定各个采样图像对应的纤维垂直量;According to each sampled image, determine the grayscale run-length matrix of each angle corresponding to each sampled image, and then determine the fiber vertical amount corresponding to each sampled image;
获取待分类纺织品的面料种类,根据待分类纺织品的面料种类以及各个采样图像对应的采样尺度,确定各个采样图像对应的采样尺度权重;Obtain the fabric types of the textiles to be classified, and determine the sampling scale weights corresponding to each sampling image according to the fabric types of the textiles to be classified and the sampling scales corresponding to each sampling image;
根据各个采样图像对应的采样尺度权重和纤维垂直量,确定待分类纺织品的分类系数;Determine the classification coefficient of the textiles to be classified according to the sampling scale weight and the vertical amount of fibers corresponding to each sampling image;
根据待分类纺织品的分类系数,确定待分类纺织品的种类。According to the classification coefficient of the textile to be classified, the type of the textile to be classified is determined.
进一步的,确定各个采样图像对应的纤维垂直量的步骤包括:Further, the step of determining the vertical amount of fibers corresponding to each sampled image includes:
根据各个采样图像对应的每个角度的灰度游程矩阵,确定各个采样图像对应的第一灰度游程差矩阵和第二灰度游程差矩阵;Determine the first grayscale run-difference matrix and the second grayscale run-difference matrix corresponding to each sampled image according to the grayscale run-length matrix of each angle corresponding to each sampled image;
根据各个采样图像对应的第一灰度游程差矩阵和第二灰度游程差矩阵以及各个采样图像,确定各个采样图像对应的纤维垂直量。According to the first grayscale run-difference matrix and the second grayscale run-difference matrix corresponding to each sampled image and each sampled image, the fiber perpendicularity corresponding to each sampled image is determined.
进一步的,确定各个采样图像对应的纤维垂直量的计算公式:Further, determine the calculation formula of the vertical amount of fibers corresponding to each sampled image:
其中,为第i个采样图像对应的纤维垂直量,为第i个采样图像对应的第一灰度游程差矩阵中的灰度级别为k且游程长度为d的元素的数值, 第i个采样图像对应的第二灰度游程差矩阵中的灰度级别为k且游程长度为d的元素的数值,K为第i个采样图像对应的第一灰度游程差矩阵和第二灰度游程差矩阵中的灰度级别的级数,D为第i个采样图像对应的第一灰度游程差矩阵和第二灰度游程差矩阵中的游程长度的最大值。in, is the vertical fiber corresponding to thei -th sampled image, is the value of the element whose gray level is k and the run length is d in the first grayscale run-difference matrix corresponding to thei -th sampled image, The value of the element in the second grayscale run-difference matrix corresponding to thei -th sampled image has a gray level of k and a run-length of d, where K is the first grayscale run-difference matrix and the second grayscale run-difference matrix corresponding to thei -th sampled image. The number of levels of gray levels in the grayscale run-difference matrix, D is the maximum value of the run lengths in the first and second grayscale run-difference matrices corresponding to thei -th sampled image.
进一步的,若待分类纺织品的面料种类为针织物面料,则确定各个采样图像对应的采样尺度权重的计算公式:Further, if the fabric type of the textile to be classified is knitted fabric, the calculation formula of the sampling scale weight corresponding to each sampling image is determined:
其中,为待分类纺织品的面料种类为针织物面料时第i个采样图像对应的采样尺度权重,为第i个采样图像对应的采样尺度,为各个采样图像对应的采样尺度中的最大值。in, is the sampling scale weight corresponding to thei -th sampling image when the fabric type of the textile to be classified is knitted fabric, is the sampling scale corresponding to theith sampled image, is the maximum value in the sampling scale corresponding to each sampled image.
进一步的,若待分类纺织品的面料种类为机织物面料,则确定各个采样图像对应的采样尺度权重的计算公式:Further, if the fabric type of the textile to be classified is woven fabric, the calculation formula of the sampling scale weight corresponding to each sampling image is determined:
其中,为待分类纺织品的面料种类为机织物面料时第i个采样图像对应的采样尺度权重,为第i个采样图像对应的采样尺度,为各个采样图像对应的采样尺度中的最大值。in, is the sampling scale weight corresponding to thei -th sampling image when the fabric type of the textile to be classified is woven fabric, is the sampling scale corresponding to theith sampled image, is the maximum value in the sampling scale corresponding to each sampled image.
进一步的,若待分类纺织品的面料种类为针织物面料,则确定待分类纺织品的分类系数的计算公式:Further, if the fabric type of the textile to be classified is knitted fabric, then determine the calculation formula of the classification coefficient of the textile to be classified:
其中,为待分类纺织品的面料种类为针织物面料时待分类纺织品的分类系数,为待分类纺织品的面料种类为针织物面料时第i个采样图像对应的采样尺度权重,为第i个采样图像对应的纤维垂直量,I为各个采样图像的个数。in, is the classification coefficient of the textile to be classified when the fabric type of the textile to be classified is knitted fabric, is the sampling scale weight corresponding to thei -th sampling image when the fabric type of the textile to be classified is knitted fabric, is the fiber vertical amount corresponding to theith sampled image, andI is the number of each sampled image.
进一步的,若待分类纺织品的面料种类为机织物面料,则确定待分类纺织品的分类系数的计算公式:Further, if the fabric type of the textile to be classified is woven fabric, then determine the calculation formula of the classification coefficient of the textile to be classified:
其中,为待分类纺织品的面料种类为机织物面料时待分类纺织品的分类系数,为待分类纺织品的面料种类为机织物面料时第i个采样图像对应的采样尺度权重,为第i个采样图像对应的纤维垂直量,I为各个采样图像的个数。in, is the classification coefficient of the textile to be classified when the fabric type of the textile to be classified is woven fabric, is the sampling scale weight corresponding to thei -th sampling image when the fabric type of the textile to be classified is woven fabric, is the fiber vertical amount corresponding to theith sampled image, andI is the number of each sampled image.
进一步的,确定待分类纺织品的种类的步骤包括:Further, the step of determining the type of textiles to be classified includes:
待分类纺织品的面料种类为针织物面料时,若针织物面料的待分类纺织品的分类系数大于等于第一预设分类系数且小于等于第二预设分类系数,则待分类纺织品为经编针织物纺织品,若针织物面料的待分类纺织品的分类系数大于第二预设分类系数且小于等于第三预设分类系数,则待分类纺织品为纬编针织物纺织品;When the fabric type of the textile to be classified is knitted fabric, if the classification coefficient of the textile to be classified of the knitted fabric is greater than or equal to the first preset classification coefficient and less than or equal to the second preset classification coefficient, the textile to be classified is warp knitted fabric For textiles, if the classification coefficient of the knitted fabric to be classified is greater than the second preset classification coefficient and less than or equal to the third preset classification coefficient, the to-be-classified textile is a weft-knitted textile;
待分类纺织品的面料种类为机织物面料时,若机织物面料的待分类纺织品的分类系数大于等于第一预设分类系数且小于等于第二预设分类系数,则待分类纺织品为混纺机织物纺织品,若机织物面料的待分类纺织品的分类系数大于第二预设分类系数且小于等于第三预设分类系数,则待分类纺织品为交织机织物纺织品。When the fabric type of the textile to be classified is woven fabric, if the classification coefficient of the textile to be classified of the woven fabric is greater than or equal to the first preset classification coefficient and less than or equal to the second preset classification coefficient, the to-be-classified textile is a blended woven fabric , if the classification coefficient of the textiles to be classified of the woven fabric is greater than the second preset classification coefficient and less than or equal to the third preset classification coefficient, the textiles to be classified are interwoven woven textiles.
进一步的,确定各个采样图像对应的每个角度的灰度游程矩阵的步骤包括:Further, the step of determining the grayscale run-length matrix of each angle corresponding to each sampled image includes:
根据各个采样图像,对各个采样图像进行灰度化处理,得到灰度化处理后的各个采样图像;According to each sampled image, grayscale processing is performed on each sampled image to obtain each sampled image after grayscale processing;
根据灰度化处理后的各个采样图像,确定各个采样图像中的每个灰度值对应的灰度级别;According to each sampled image after grayscale processing, determine the grayscale level corresponding to each grayscale value in each sampled image;
根据各个采样图像中的每个灰度值对应的灰度级别和各个采样图像,确定各个采样图像对应的每个角度的灰度游程矩阵。According to the gray level corresponding to each gray value in each sampled image and each sampled image, a grayscale run-length matrix of each angle corresponding to each sampled image is determined.
进一步的,确定各个采样图像中的每个灰度值对应的灰度级别的步骤包括:Further, the step of determining the gray level corresponding to each gray value in each sampled image includes:
根据灰度化处理后的各个采样图像,得到各个采样图像的灰度直方图;According to each sampled image after grayscale processing, the grayscale histogram of each sampled image is obtained;
根据各个采样图像的灰度直方图,得到各个采样图像的一维高斯混合模型,进而得到各个采样图像对应的各子高斯模型;According to the grayscale histogram of each sampled image, a one-dimensional Gaussian mixture model of each sampled image is obtained, and then each sub-Gaussian model corresponding to each sampled image is obtained;
获取各子高斯模型的权重,根据各个采样图像的灰度直方图、各个采样图像对应的各子高斯模型及其权重,确定各个采样图像中的每个灰度值对应的灰度级别。The weight of each sub-Gaussian model is obtained, and the gray level corresponding to each gray value in each sampled image is determined according to the grayscale histogram of each sampled image, each sub-Gaussian model corresponding to each sampled image and its weight.
本发明具有如下有益效果:The present invention has the following beneficial effects:
本发明提供了一种基于人工智能的纺织品定性分类方法,该方法可用于生产领域人工智能系统、人工智能优化操作系统和人工智能中间件,具体是电子设备利用图像识别技术对获取的待分类纺织品的各个采样图像进行识别,从而得到各个采样图像的纤维垂直量和采样尺度权重,根据各个采样图像的纤维垂直量和采样尺度权重,确定待分类纺织品的分类系数,进而确定待分类纺织品的种类。The invention provides a method for qualitative classification of textiles based on artificial intelligence, which can be used for artificial intelligence systems in the production field, artificial intelligence optimized operating systems and artificial intelligence middleware, in particular, electronic equipment uses image recognition technology to obtain textiles to be classified. Identify each sampled image, thereby obtaining the fiber vertical amount and sampling scale weight of each sampled image. According to the fiber vertical amount and sampling scale weight of each sampled image, the classification coefficient of the textiles to be classified is determined, and then the type of textiles to be classified is determined.
本发明将纺织品定性分类的运算结果结合成一种,也就是通过待分类纺织品的分类系数,就可以确定待分类纺织品的种类,提高了纺织品定性分类的适用性。另外,本发明通过对纺织品的表面图像进行多尺度下采样,得到各个采样图像,通过对各个采样图像中的图像特征进行数据处理,从而确定待分类纺织品的种类,有效提高了待分类纺织品定性分类的准确性。因此,本发明所提供的一种基于人工智能的纺织品定性分类方法可以用于计算机视觉软件等应用软件开发。The invention combines the operation results of the qualitative classification of textiles into one, that is, through the classification coefficient of the textiles to be classified, the type of the textiles to be classified can be determined, and the applicability of the qualitative classification of the textiles is improved. In addition, the present invention obtains each sampled image by performing multi-scale downsampling on the surface image of the textile, and performs data processing on the image features in each sampled image to determine the type of the textile to be classified, which effectively improves the qualitative classification of the textile to be classified. accuracy. Therefore, the artificial intelligence-based textile qualitative classification method provided by the present invention can be used for the development of application software such as computer vision software.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案和优点,下面将对实施例或现有技术描述中所需要使用的附图作简单的介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它附图。In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or in the prior art, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description The drawings are only some embodiments of the present invention, and for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.
图1为本发明一种基于人工智能的纺织品定性分类方法的流程图;Fig. 1 is the flow chart of a kind of artificial intelligence-based textile qualitative classification method of the present invention;
图2为本发明的实施例中的确定各个采样图像中的每个灰度值对应的灰度级别的流程图。FIG. 2 is a flowchart of determining a gray level corresponding to each gray value in each sampled image in an embodiment of the present invention.
具体实施方式Detailed ways
为了更进一步阐述本发明为达成预定发明目的所采取的技术手段及功效,以下结合附图及较佳实施例,对依据本发明提出的技术方案的具体实施方式、结构、特征及其功效,详细说明如下。在下述说明中,不同的“一个实施例”或“另一个实施例”指的不一定是同一个实施例。此外,一个或多个实施例中的特定特征、结构、或特点可由任何合适形式组合。In order to further illustrate the technical means and effects adopted by the present invention to achieve the predetermined purpose of the invention, the following describes the specific implementation, structure, features and effects of the technical solutions proposed by the present invention in detail with reference to the accompanying drawings and preferred embodiments. described as follows. In the following description, different "one embodiment" or "another embodiment" are not necessarily referring to the same embodiment. Furthermore, the particular features, structures, or characteristics in one or more embodiments may be combined in any suitable form.
除非另有定义,本文所使用的所有的技术和科学术语与属于本发明的技术领域的技术人员通常理解的含义相同。Unless otherwise defined, 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 prior art designs corresponding classification methods according to different classification features of textiles, which requires collecting various types of image features of textile images to achieve the purpose of qualitatively classifying textiles. Multiple types of image features to accommodate qualitative classification of textiles of different fabric types. For example, classification according to fiber types can be divided into blended and interwoven, that is, the types of textiles whose fabric types are woven fabrics include blended and interwoven, and classified according to weaving methods can be divided into weft knitting and warp knitting, that is, fabric types are knitted Types of textile fabrics include weft knitting and warp knitting. Qualitative classification of textiles of these different fabric types requires separate design of methods for extracting image features and methods for classifying image features, which is time-consuming and labor-intensive. Based on the above analysis, this implementation uses the same type of image features to qualitatively classify textiles whose fabric types are woven fabrics and knitted fabrics at the same time.
本实施例提出了一种基于人工智能的纺织品定性分类方法,其对应的流程图如图1所示,包括以下步骤:This embodiment proposes a method for qualitative classification of textiles based on artificial intelligence, and the corresponding flowchart is shown in Figure 1, including the following steps:
(1)获取待分类纺织品的表面图像,并对表面图像进行多尺度下采样,得到各个采样图像及其采样尺度。(1) Obtain the surface image of the textile to be classified, and perform multi-scale downsampling on the surface image to obtain each sampling image and its sampling scale.
在对纺织品进行定性分类的过程中,首先,通过工业相机拍摄待分类纺织品,得到待分类纺织品的表面图像,该表面图像的图像规格为长宽相等,也就是该表面图像的形状是正方形。然后,对待分类纺织品的表面图像进行多尺度金字塔下采样,得到各个采样图像,每个采样图像均存在对应的采样尺度。将各个采样图像标记为,,I为对待分类纺织品的表面图像进行多尺度金字塔下采样的采样次数,为多尺度金字塔下采样前的表面图像,也就是采样尺度为0的采样图像。对表面图像进行多尺度金字塔下采样的过程为现有技术,不在本发明保护范围内,此处不再进行详细阐述。In the process of qualitatively classifying textiles, first, the textile to be classified is photographed by an industrial camera to obtain a surface image of the textile to be classified. The image specification of the surface image is equal in length and width, that is, the shape of the surface image is a square. Then, multi-scale pyramid downsampling is performed on the surface image of the textile to be classified to obtain each sampled image, and each sampled image has a corresponding sampling scale. Label each sampled image as , ,I is the sampling times of multi-scale pyramid downsampling for the surface image of the textile to be classified, The surface image before downsampling for the multi-scale pyramid, that is, the sampled image with the sampling scale of 0. The process of performing multi-scale pyramid downsampling on the surface image is in the prior art, which is not within the protection scope of the present invention, and will not be described in detail here.
(2)根据各个采样图像,确定各个采样图像对应的每个角度的灰度游程矩阵,进而确定各个采样图像对应的纤维垂直量,其步骤包括:(2) According to each sampled image, determine the grayscale run-length matrix of each angle corresponding to each sampled image, and then determine the fiber vertical amount corresponding to each sampled image, and the steps include:
(2-1)根据各个采样图像,确定各个采样图像对应的每个角度的灰度游程矩阵。(2-1) According to each sampled image, determine the grayscale run-length matrix of each angle corresponding to each sampled image.
首先,需要说明的是,若纺织品的面料种类为针织物,那么纺织品的表面图像对应的灰度游程矩阵中的灰度游程就表征着纺织品的编织方向,不同的编织方向的纺织品,其针织的毛线圈突出纺织品表面的程度不同,整个纺织品表面的光照条件相同时,纺织品表面的灰度会有所不同;若纺织品的面料种类为机织物,纺织品的纱线中的不同的纤维对光反射的能力不同,也就是不同的纤维对应的灰度不同,而纺织品表面图像对应的灰度游程矩阵中的灰度游程表征了纺织品中的某一个方向的灰度值相同的元素连续出现的长度,其灰度游程的长度越大,说明在该方向出现某一类的纤维或是毛线圈的概率会越大。本实施例为了后续便于确定不同面料种类的待分类纺织品的种类,需要确定各个采样图像对应的每个角度的灰度游程矩阵,也就是确定每个角度的灰度游程矩阵中的灰度游程信息,其步骤包括:First of all, it should be noted that if the fabric type of the textile is knitted fabric, then the grayscale runlength in the grayscale runlength matrix corresponding to the surface image of the textile represents the weaving direction of the textile. The degree to which the wool loops protrude from the surface of the textile is different. When the lighting conditions of the entire textile surface are the same, the grayscale of the textile surface will be different; if the fabric type of the textile is woven fabric, the different fibers in the yarn of the textile reflect light. The ability is different, that is, the grayscale corresponding to different fibers is different, and the grayscale runlength in the grayscale runlength matrix corresponding to the textile surface image represents the length of the continuous occurrence of elements with the same grayscale value in a certain direction in the textile, which is The greater the length of the grayscale run, the greater the probability of a certain type of fibers or loops appearing in this direction. In this embodiment, in order to facilitate the subsequent determination of the types of textiles to be classified with different fabric types, it is necessary to determine the grayscale run-length matrix of each angle corresponding to each sampled image, that is, to determine the grayscale run-length information in the grayscale run-length matrix of each angle. , the steps include:
(2-1-1)根据各个采样图像,对各个采样图像进行灰度化处理,得到灰度化处理后的各个采样图像。(2-1-1) According to each sampled image, grayscale processing is performed on each sampled image to obtain each sampled image after the grayscale processing.
本实施例为了确定各个采样图像中的每个像素点的灰度值,对步骤(1)得到的各个采样图像进行灰度化处理,从而得到灰度化处理后的各个采样图像。灰度化处理的过程为现有技术,不在本发明保护范围内,此处不再进行详细阐述。In this embodiment, in order to determine the grayscale value of each pixel in each sampled image, each sampled image obtained in step (1) is subjected to grayscale processing, thereby obtaining each sampled image after grayscale processing. The process of grayscale processing is in the prior art, which is not within the protection scope of the present invention, and will not be described in detail here.
(2-1-2)根据灰度化处理后的各个采样图像,确定各个采样图像中的每个灰度值对应的灰度级别,其流程图如图2所示,其步骤包括:(2-1-2) Determine the grayscale level corresponding to each grayscale value in each sampled image according to each sampled image after grayscale processing. The flowchart is shown in Figure 2, and the steps include:
(2-1-2-1)根据灰度化处理后的各个采样图像,得到各个采样图像的灰度直方图。(2-1-2-1) Obtain a grayscale histogram of each sampled image according to each sampled image after grayscale processing.
根据步骤(2-1-1)得到的灰度化处理后的各个采样图像,对灰度化处理后的各个采样图像进行灰度直方图统计,从而得到各个采样图像的灰度直方图,灰度直方图表示采样图像中的每个灰度值在整张采样图像中出现的频率。灰度直方图统计的过程为现有技术,不在本发明保护范围内,此处不再进行详细阐述。According to each sampled image after grayscale processing obtained in step (2-1-1), perform grayscale histogram statistics on each sampled image after grayscale processing, so as to obtain the grayscale histogram of each sampled image. The degree histogram represents how often each gray value in the sampled image occurs in the entire sampled image. The process of grayscale histogram statistics is in the prior art, which is not within the scope of protection of the present invention, and will not be described in detail here.
(2-1-2-2)根据各个采样图像的灰度直方图,得到各个采样图像的一维高斯混合模型,进而得到各个采样图像对应的各子高斯模型。(2-1-2-2) According to the grayscale histogram of each sampled image, a one-dimensional Gaussian mixture model of each sampled image is obtained, and then each sub-Gaussian model corresponding to each sampled image is obtained.
在本实施例中,首先,根据各个采样图像的灰度直方图,得到各个采样图像中的每个灰度值在整张采样图像中出现的频率。然后,以各个采样图像中的每个灰度值及其在整张采样图像中出现的频率为样本数据,利用EM算法(Expectation-maximization,期望最大化算法)对每个采样图像的灰度直方图进行拟合,得到每个采样图像对应的一维高斯混合模型,该一维高斯混合模型可描述每个采样图像中的每个灰度值在整张采样图像中出现的概率。最后,根据每个采样图像对应的一维高斯混合模型,得到每个采样图像对应的各子高斯模型。In this embodiment, first, according to the grayscale histogram of each sampled image, the frequency of each grayscale value in each sampled image appearing in the entire sampled image is obtained. Then, using each gray value in each sampled image and its frequency in the entire sampled image as sample data, the EM algorithm (Expectation-maximization, expectation maximization algorithm) is used to calculate the grayscale histogram of each sampled image. The graph is fitted to obtain a one-dimensional Gaussian mixture model corresponding to each sampled image, and the one-dimensional Gaussian mixture model can describe the probability that each gray value in each sampled image appears in the entire sampled image. Finally, according to the one-dimensional Gaussian mixture model corresponding to each sampled image, each sub-Gaussian model corresponding to each sampled image is obtained.
需要说明的是,一维高斯混合模型中的子高斯模型的数目为K,子高斯模型的数目为自设参数,本实施例将K设置为10,并将各子高斯模型按照其均值大小从大到小进行排列,各子高斯模型的序号记为1,2,…,K。利用EM算法拟合得到一维高斯混合模型的过程为现有技术,不在本发明保护范围内,此处不再进行详细阐述。It should be noted that the number of sub-Gaussian models in the one-dimensional Gaussian mixture model isK , and the number of sub-Gaussian models is a self-set parameter. In this embodiment,K is set to 10, and each sub-Gaussian model is changed from Arrange from largest to smallest, and the serial number of each sub-Gaussian model is marked as 1,2,…,K . The process of obtaining a one-dimensional Gaussian mixture model by fitting with the EM algorithm is in the prior art, which is not within the scope of the present invention, and will not be described in detail here.
(2-1-2-3)获取各子高斯模型的权重,根据各个采样图像的灰度直方图、各个采样图像对应的各子高斯模型及其权重,确定各个采样图像中的每个灰度值对应的灰度级别。(2-1-2-3) Obtain the weight of each sub-Gaussian model, and determine each gray level in each sampled image according to the grayscale histogram of each sampled image, each sub-Gaussian model corresponding to each sampled image and its weight The grayscale level corresponding to the value.
在本实施例中,每个采样图像对应的各子高斯模型都有与其对应的权重,根据各个采样图像的灰度直方图、各个采样图像对应的各子高斯模型及其权重,可计算每个采样图像中的每个灰度值在整张采样图像中出现的概率,其计算公式如下:In this embodiment, each sub-Gaussian model corresponding to each sampled image has its corresponding weight. According to the grayscale histogram of each sampled image, each sub-Gaussian model corresponding to each sampled image and its weight, each sub-Gaussian model can be calculated. The probability that each gray value in the sampled image appears in the entire sampled image is calculated as follows:
其中,为每个采样图像中的第H个灰度值在整张采样图像中出现的概率,为每个采样图像的第k个子高斯模型的权重,为每个采样图像中的第H个灰度值在其对应的采样图像的第k个子高斯模型的概率值,K为每个采样图像的各子高斯模型的数目。in, is the probability that theH -th gray value in each sampled image appears in the entire sampled image, is the weight of thek -th sub-Gaussian model for each sampled image, is the probability value of thehth gray value in each sampled image in thekth sub-Gaussian model of the corresponding sampled image, andK is the number of each sub-Gaussian model of each sampled image.
根据每个采样图像中的每个灰度值在整张采样图像中出现的概率的计算公式可知,采样图像中的每个灰度值均对应K个,获取K个中的最大值,将该最大值对应的子高斯模型的序号记为对应灰度值的灰度级别,从而得到各个采样图像中的每个灰度值对应的灰度级别。According to the calculation formula of the probability that each gray value in each sampled image appears in the whole sampled image, it can be known that each gray value in the sampled image corresponds toK , getK The maximum value in the sub-Gaussian model corresponding to the maximum value is marked as the gray level of the corresponding gray value, so as to obtain the gray level corresponding to each gray value in each sampled image.
至此,对于每个采样图像中的每个灰度值,其均会对应一个灰度级别,每个采样图像均会存在多个灰度级别。So far, for each gray value in each sampled image, it corresponds to one grayscale level, and each sampled image has multiple grayscale levels.
(2-1-3)根据各个采样图像中的每个灰度值对应的灰度级别和各个采样图像,确定各个采样图像对应的每个角度的灰度游程矩阵。(2-1-3) Determine the grayscale run-length matrix of each angle corresponding to each sampled image according to the grayscale level corresponding to each grayscale value in each sampled image and each sampled image.
通过步骤(1)得到的各个采样图像,可以确定各个采样图像的尺寸,其尺寸是指各个采样图像的长和宽,由于各个采样图像的形状是正方形,所以各个采样图像的长和宽是相等的,将各个采样图像的尺寸记为D。根据各个采样图像的尺寸D和步骤(2-1-2)得到的各个采样图像中的每个灰度值对应的灰度级别,构建各个采样图像对应的灰度游程矩阵。各个采样图像对应的灰度游程矩阵中的灰度级别为从1到K,游程长度为从1到D,K为灰度游程矩阵中的灰度级别的级数,也就是每个采样图像的各子高斯模型的序号中的最大值,D为灰度游程矩阵中的游程长度的最大值,也就是每个采样图像的尺寸。构建灰度游程矩阵的过程为现有技术,不在本发明保护范围内,此处不再进行详细阐述。Through each sampled image obtained in step (1), the size of each sampled image can be determined, and its size refers to the length and width of each sampled image. Since the shape of each sampled image is a square, the length and width of each sampled image are equal. , denote the size of each sampled image asD . According to the sizeD of each sampled image and the grayscale level corresponding to each grayscale value in each sampled image obtained in step (2-1-2), a grayscale run-length matrix corresponding to each sampled image is constructed. The grayscale levels in the grayscale run-length matrix corresponding to each sampled image are from 1 toK , the run length is from 1 toD , andK is the series of grayscale levels in the grayscale run-length matrix, that is, the number of each sampled image. The maximum value in the serial number of each sub-Gaussian model,D is the maximum value of the run length in the grayscale run length matrix, that is, the size of each sampled image. The process of constructing the grayscale run-length matrix is in the prior art, which is not within the protection scope of the present invention, and will not be described in detail here.
在本实施例中,根据灰度游程的统计角度,灰度游程矩阵可分为4种,其统计角度分别为0°,45°,90°,135°。至此,每个采样图像均会对应4个角度的灰度游程矩阵。In this embodiment, according to the statistical angles of the grayscale run lengths, the grayscale runlength matrices can be divided into four types, and the statistical angles are respectively 0°, 45°, 90°, and 135°. So far, each sampled image corresponds to the grayscale run-length matrix of 4 angles.
(2-2)根据各个采样图像对应的每个角度的灰度游程矩阵,确定各个采样图像对应的纤维垂直量,其步骤包括:(2-2) According to the grayscale run-length matrix of each angle corresponding to each sampled image, determine the vertical amount of fiber corresponding to each sampled image, and the steps include:
(2-2-1)根据各个采样图像对应的每个角度的灰度游程矩阵,确定各个采样图像对应的第一灰度游程差矩阵和第二灰度游程差矩阵。(2-2-1) Determine the first grayscale run difference matrix and the second grayscale run difference matrix corresponding to each sampled image according to the grayscale runlength matrix of each angle corresponding to each sampled image.
首先,需要说明的是,确定各个采样图像对应的第一灰度游程差矩阵和第二灰度游程差矩阵有助于后续确定待分类纺织的种类,原因为:First of all, it should be noted that determining the first grayscale run-difference matrix and the second grayscale run-difference matrix corresponding to each sampled image is helpful for the subsequent determination of the types of textiles to be classified. The reasons are as follows:
待分类纺织品为针织物面料种类时,需要区分待分类纺织品的织造方式,织造方式包括纬编和经编。经编纺织品的线圈为之字形延伸,也就是说明经编纺织品的表面图像对应的每个角度的灰度游程矩阵中的各个同灰度级别的游程相互垂直,而纬编纺织品的线圈为往复平行式排列,也就是说明纬编纺织品的表面图像对应的每个角度的灰度游程矩阵中的同灰度级别的游程并不互相垂直。When the textiles to be classified are knitted fabrics, it is necessary to distinguish the weaving methods of the textiles to be classified, and the weaving methods include weft knitting and warp knitting. The loops of the warp knitted textiles extend in a zigzag shape, that is to say, the runs of the same gray level in the grayscale run length matrix of each angle corresponding to the surface image of the warp knitted textiles are perpendicular to each other, while the loops of the weft knitted textiles are reciprocating parallel. That is to say, the run lengths of the same gray level in the gray scale run length matrix of each angle corresponding to the surface image of the MEAN-WEFT knitted textile are not perpendicular to each other.
待分类纺织品为机织物面料种类时,需要区分待分类纺织品的纤维种类,纤维种类包括混纺和交织。混纺纺织品的同种类纤维的经线和纬线是互相垂直的,也就是混纺纺织品的表面图像对应的每个角度的灰度游程矩阵中的各个同灰度级别的游程是相互垂直的,而交织纺织品同种类纤维的经线和纬线并不是互相垂直的,也就是交织纺织品的表面图像对应的每个角度的灰度游程矩阵中的同灰度级别的游程并不是互相垂直的,这里的经线和纬线是指纺织品的纱线,纺织品的纱线是由众多纤维组成。When the textile to be classified is a woven fabric type, it is necessary to distinguish the fiber types of the textile to be classified, and the fiber types include blended and interwoven. The warp and weft of the same type of fibers of the blended textile are perpendicular to each other, that is, the runs of the same gray level in the grayscale run-length matrix of each angle corresponding to the surface image of the blended textile are perpendicular to each other, while the interwoven textiles are the same. The warp and weft of the type of fiber are not perpendicular to each other, that is, the runs of the same gray level in the grayscale run-length matrix of each angle corresponding to the surface image of the interwoven textile are not perpendicular to each other. The warp and weft here refer to Textile yarn, textile yarn is composed of many fibers.
在本实施例中,以确定第i个采样图像对应的第一灰度游程差矩阵和第二灰度游程差矩阵为例,根据步骤(2-1)得到第i个采样图像对应的4个角度的灰度游程矩阵,将第i个采样图像对应的4个角度的灰度游程矩阵分别标记为,计算第i个采样图像对应的第一灰度游程差矩阵和第二灰度游程差矩阵,其计算公式如下:In this embodiment, the first grayscale run-difference matrix and the second grayscale run-difference matrix corresponding to thei -th sampled image are determined as an example, and four samples corresponding to thei -th sampled image are obtained according to step (2-1). The grayscale run-length matrix of the angle, the grayscale run-length matrix of the four angles corresponding to thei -th sampled image is marked as , calculate the first grayscale run-difference matrix and the second grayscale run-difference matrix corresponding to thei -th sampled image, and the calculation formula is as follows:
其中,为第i个采样图像的第一灰度游程差矩阵,为第i个采样图像对应的角度为0度的灰度游程矩阵,为第i个采样图像对应的角度为90度的灰度游程矩阵,第i个采样图像的第二灰度游程差矩阵,为第i个采样图像对应的角度为45度的灰度游程矩阵,第i个采样图像对应的角度为135度的灰度游程矩阵。in, is the first grayscale run-difference matrix of theith sampled image, is the grayscale run-length matrix with an angle of 0 degrees corresponding to thei -th sampled image, is the grayscale run-length matrix with an angle of 90 degrees corresponding to thei -th sampled image, The second grayscale run-difference matrix of theith sampled image, is the grayscale run-length matrix with an angle of 45 degrees corresponding to thei -th sampled image, The grayscale run-length matrix with an angle of 135 degrees corresponding to thei -th sampled image.
参考第i个采样图像对应的第一灰度游程差矩阵和第二灰度游程差矩阵的确定步骤,得到每个采样图像对应的第一灰度游程差矩阵和第二灰度游程差矩阵。至此,各个采样图像均对应两个灰度游程差矩阵。Referring to the steps of determining the first grayscale run-difference matrix and the second grayscale run-difference matrix corresponding to theith sampled image, the first and second grayscale run-difference matrices corresponding to each sampled image are obtained. So far, each sampled image corresponds to two grayscale run-difference matrices.
需要说明的是,第i个采样图像对应的第一灰度游程差矩阵和第二灰度游程差矩阵内的元素为两两不同角度的灰度游程矩阵内对应元素的差值的绝对值,第i个采样图像灰度游程差矩阵内的元素的数值越趋于0,越能说明该采样图像对应的每个角度的灰度游程矩阵中的各个同灰度级别的游程相互垂直,也就是待分类纺织的种类越有可能是经编或是混纺。It should be noted that the first grayscale run-difference matrix corresponding to thei -th sampled image and the second grayscale run-difference matrix The element inside is the absolute value of the difference between the corresponding elements in thegrayscale run-length matrix of two different angles. The runs of the same gray level in the grayscale run length matrix of each angle are perpendicular to each other, that is, the more likely the type of weaving to be classified is warp knitting or blended weaving.
(2-2-2)根据各个采样图像对应的第一灰度游程差矩阵和第二灰度游程差矩阵以及各个采样图像,确定各个采样图像对应的纤维垂直量。(2-2-2) According to the first grayscale run-difference matrix and the second grayscale run-difference matrix corresponding to each sampled image and each sampled image, determine the fiber vertical amount corresponding to each sampled image.
在本实施例中,根据步骤(2-2-1)得到的各个采样图像对应的第一灰度游程差矩阵和第二灰度游程差矩阵以及步骤(2-1-3)得到的各个采样图像的尺寸,计算各个采样图像对应的纤维垂直量,其计算公式如下:In this embodiment, according to the first grayscale run-difference matrix and the second grayscale run-difference matrix corresponding to each sampled image obtained in step (2-2-1) and each sample obtained in step (2-1-3) The size of the image, the vertical amount of fibers corresponding to each sampled image is calculated, and the calculation formula is as follows:
其中,为第i个采样图像对应的纤维垂直量,为第i个采样图像对应的第一灰度游程差矩阵中的灰度级别为k且游程长度为d的元素的数值, 第i个采样图像对应的第二灰度游程差矩阵中的灰度级别为k且游程长度为d的元素的数值,K为第i个采样图像对应的第一灰度游程差矩阵和第二灰度游程差矩阵中的灰度级别的级数,D为第i个采样图像对应的第一灰度游程差矩阵和第二灰度游程差矩阵中的游程长度的最大值,也就是第i个采样图像的尺寸。in, is the vertical fiber corresponding to thei -th sampled image, is the value of the element whose gray level is k and the run length is d in the first grayscale run-difference matrix corresponding to thei -th sampled image, The value of the element in the second grayscale run-difference matrix corresponding to thei -th sampled image has a gray level of k and a run-length of d, where K is the first grayscale run-difference matrix and the second grayscale run-difference matrix corresponding to thei -th sampled image. The series number of the gray level in the grayscale run-difference matrix, D is the maximum value of the run length in the first grayscale run-difference matrix and the second grayscale run-difference matrix corresponding to thei -th sampled image, that is, thei -th The size of the sampled image.
至此,每个采样图像均对应一个纤维垂直量,需要说明的是,采样图像对应的纤维垂直量越趋于0,越能说明采样图像对应的每个角度的灰度游程矩阵中的各个同灰度级别的相互垂直的游程的数量比较均衡,也就是越能说明待分类纺织品的纱线纤维相互垂直,反之,则说明待分类纺织品的纱线纤维单向分布,也就是待分类纺织品的纱线纤维并不垂直。So far, each sampled image corresponds to a fiber vertical amount. It should be noted that the more the fiber vertical amount corresponding to the sampled image tends to 0, the better it can illustrate the grayscale run-length matrix of each angle corresponding to the sampled image. The number of mutually perpendicular runs of the degree level is relatively balanced, that is, the more it can indicate that the yarn fibers of the textile to be classified are perpendicular to each other, on the contrary, it means that the yarn fibers of the textile to be classified are unidirectionally distributed, that is, the yarn of the textile to be classified. Fibers are not vertical.
(3)获取待分类纺织品的面料种类,根据待分类纺织品的面料种类以及各个采样图像对应的采样尺度,确定各个采样图像对应的采样尺度权重。(3) Obtain the fabric types of the textiles to be classified, and determine the sampling scale weights corresponding to each sampling image according to the fabric types of the textiles to be classified and the sampling scale corresponding to each sampling image.
首先,需要说明的是,不同的面料种类的纺织品进行定性分类时,对采样图像对应的采样尺度的关注程度的要求不同。First of all, it should be noted that when different types of textiles are qualitatively classified, the requirements for the degree of attention to the sampling scale corresponding to the sampling image are different.
在确定针织物面料种类的纺织品的种类时,其更为关注采样尺度较大的采样图像,也就是针织物面料种类的纺织品进行定性分类时,更关注采样图像的整体,在采样尺度较大的采样图像中的垂直信息表征的是经编和纬编的区别;在确定机织物面料种类的纺织品的种类时,其更为关注采样尺度较小的采样图像,也就是机织物面料种类的纺织品进行定性分类时,更关注采样图像中的细节内容,在采样尺度较小的采样图像中的垂直信息表征的是混纺和交织的区别。另外,采样图像的采样尺度越小,越能够得到机织物面料种类的纺织品的纱线纤维的垂直信息,也就是采样图像的采样尺度越小,采样图像中的细节内容越清晰真实。因此,待分类纺织品的面料种类不同,各个采样图像对应的采样尺度权重的计算方式不同,具体内容包括:When determining the type of textiles of knitted fabric types, it pays more attention to the sampling images with larger sampling scale, that is, when qualitatively classifying textiles of knitted fabric types, it pays more attention to the overall sampling image. The vertical information in the sampling image represents the difference between warp knitting and weft knitting; when determining the type of textiles of woven fabrics, it pays more attention to the sampling images with smaller sampling scale, that is, the textiles of woven fabrics. In qualitative classification, more attention is paid to the details in the sampled image, and the vertical information in the sampled image with a smaller sampling scale represents the difference between blending and interweaving. In addition, the smaller the sampling scale of the sampled image, the more vertical information of the yarn fibers of the woven fabric type textiles can be obtained, that is, the smaller the sampling scale of the sampled image, the clearer and more realistic the details in the sampled image. Therefore, the fabric types of the textiles to be classified are different, and the calculation methods of the sampling scale weight corresponding to each sampling image are different, and the specific contents include:
(3-1)若待分类纺织品的面料种类为针织物面料,则确定各个采样图像对应的采样尺度权重的计算公式:(3-1) If the fabric type of the textile to be classified is knitted fabric, determine the calculation formula of the sampling scale weight corresponding to each sampling image:
其中,为待分类纺织品的面料种类为针织物面料时第i个采样图像对应的采样尺度权重,为第i个采样图像对应的采样尺度,为各个采样图像对应的采样尺度中的最大值。in, is the sampling scale weight corresponding to thei -th sampling image when the fabric type of the textile to be classified is knitted fabric, is the sampling scale corresponding to theith sampled image, is the maximum value in the sampling scale corresponding to each sampled image.
(3-2)若待分类纺织品的面料种类为机织物面料,则确定各个采样图像对应的采样尺度权重的计算公式:(3-2) If the fabric type of the textile to be classified is woven fabric, determine the calculation formula of the sampling scale weight corresponding to each sampling image:
其中,为待分类纺织品的面料种类为机织物面料时第i个采样图像对应的采样尺度权重,为第i个采样图像对应的采样尺度,为各个采样图像对应的采样尺度中的最大值。in, is the sampling scale weight corresponding to thei -th sampling image when the fabric type of the textile to be classified is woven fabric, is the sampling scale corresponding to theith sampled image, is the maximum value in the sampling scale corresponding to each sampled image.
(4)根据各个采样图像对应的采样尺度权重和纤维垂直量,确定待分类纺织品的分类系数。(4) Determine the classification coefficient of the textiles to be classified according to the sampling scale weight and the vertical amount of fibers corresponding to each sampling image.
在本实施例中,根据步骤(3)得到的待分类纺织品的面料种类为针织物面料时各个采样图像对应的采样尺度权重、待分类纺织品的面料种类为机织物面料时各个采样图像对应的采样尺度权重以及步骤(2-2-2)得到的各个采样图像对应的纤维垂直量,计算待分类纺织品为不同面料种类时待分类纺织品的分类系数,具体内容包括:In this embodiment, the sampling scale weight corresponding to each sampling image when the fabric type of the textile to be classified is knitted fabric obtained according to step (3), and the sampling corresponding to each sampling image when the fabric type of the textile to be classified is woven fabric The scale weight and the vertical amount of fibers corresponding to each sampling image obtained in step (2-2-2) are used to calculate the classification coefficient of the textiles to be classified when the textiles to be classified are different types of fabrics. The specific contents include:
(4-1)若待分类纺织品的面料种类为针织物面料,则确定待分类纺织品的分类系数的计算公式:(4-1) If the fabric type of the textile to be classified is knitted fabric, determine the calculation formula of the classification coefficient of the textile to be classified:
其中,为待分类纺织品的面料种类为针织物面料时待分类纺织品的分类系数,为待分类纺织品的面料种类为针织物面料时第i个采样图像对应的采样尺度权重,为第i个采样图像对应的纤维垂直量,I为各个采样图像的个数。in, is the classification coefficient of the textile to be classified when the fabric type of the textile to be classified is knitted fabric, is the sampling scale weight corresponding to thei -th sampling image when the fabric type of the textile to be classified is knitted fabric, is the fiber vertical amount corresponding to theith sampled image, andI is the number of each sampled image.
(4-2)若待分类纺织品的面料种类为机织物面料,则确定待分类纺织品的分类系数的计算公式:(4-2) If the fabric type of the textiles to be classified is woven fabrics, determine the calculation formula of the classification coefficient of the textiles to be classified:
其中,为待分类纺织品的面料种类为机织物面料时待分类纺织品的分类系数,为待分类纺织品的面料种类为机织物面料时第i个采样图像对应的采样尺度权重,为第i个采样图像对应的纤维垂直量,I为各个采样图像的个数。in, is the classification coefficient of the textile to be classified when the fabric type of the textile to be classified is woven fabric, is the sampling scale weight corresponding to thei -th sampling image when the fabric type of the textile to be classified is woven fabric, is the fiber vertical amount corresponding to theith sampled image, andI is the number of each sampled image.
至此,根据待分类纺织品的表面图像面料种类,确定待分类纺织品的分类系数。需要说明的是,待分类纺织品的面料种类为针织物面料时的待分类纺织品的分类系数以及待分类纺织品的面料种类为机织物面料时的待分类纺织品的分类系数均为归一化后的值。So far, the classification coefficient of the textile to be classified is determined according to the fabric type of the surface image of the textile to be classified. It should be noted that the classification coefficient of the textile to be classified when the fabric type of the textile to be classified is knitted fabric And the classification coefficient of the textile to be classified when the fabric type of the textile to be classified is woven fabric All are normalized values.
(5)根据待分类纺织品的分类系数,确定待分类纺织品的种类。(5) Determine the type of textiles to be classified according to the classification coefficient of the textiles to be classified.
在本实施例中,根据步骤(4)得到的待分类纺织品的面料种类为针织物面料时的待分类纺织品的分类系数和待分类纺织品的面料种类为机织物面料时的待分类纺织品的分类系数,确定待分类纺织品的种类,具体内容如下:In this embodiment, the classification coefficient of the textile to be classified when the fabric type of the textile to be classified is a knitted fabric obtained according to step (4) and the classification coefficient of the textile to be classified when the fabric type of the textile to be classified is a woven fabric , to determine the types of textiles to be classified, the details are as follows:
(5-1)待分类纺织品的面料种类为针织物面料时,若针织物面料的待分类纺织品的分类系数大于等于第一预设分类系数且小于等于第二预设分类系数,则待分类纺织品为经编针织物纺织品,若针织物面料的待分类纺织品的分类系数大于第二预设分类系数且小于等于第三预设分类系数,则待分类纺织品为纬编针织物纺织品。(5-1) When the fabric type of the textile to be classified is knitted fabric, if the classification coefficient of the textile to be classified of the knitted fabric is greater than or equal to the first preset classification coefficient and less than or equal to the second preset classification coefficient, the textile to be classified For warp knitted fabrics, if the classification coefficient of the knitted fabrics to be classified is greater than the second preset classification coefficient and less than or equal to the third preset classification coefficient, the to-be-classified textiles are weft knitted fabrics.
(5-2)待分类纺织品的面料种类为机织物面料时,若机织物面料的待分类纺织品的分类系数大于等于第一预设分类系数且小于等于第二预设分类系数,则待分类纺织品为混纺机织物纺织品,若机织物面料的待分类纺织品的分类系数大于第二预设分类系数且小于等于第三预设分类系数,则待分类纺织品为交织机织物纺织品。(5-2) When the fabric type of the textile to be classified is woven fabric, if the classification coefficient of the textile to be classified of the woven fabric is greater than or equal to the first preset classification coefficient and less than or equal to the second preset classification coefficient, the textile to be classified For blended woven fabrics, if the classification coefficient of the woven fabrics to be classified is greater than the second preset classification coefficient and less than or equal to the third preset classification coefficient, the to-be-classified textiles are interwoven woven fabrics.
本实施例中的第一预设分类系数、第二预设分类系数以及第三预设分类系数依次增大,并将第一预设分类系数设置为0,将第二预设分类系数设置为0.5,将第三预设分类系数设置为1。因此,此时有:若∈[0,0.5]则说明待分类纺织品为经编针织物纺织品;若∈(0.5,1]则说明待分类纺织品为纬编针织物纺织品。若∈[0,0.5]则说明待分类纺织品为混纺机织物纺织品;若∈(0.5,1]则说明待分类纺织品为交织机织物纺织品。In this embodiment, the first preset classification coefficient, the second preset classification coefficient, and the third preset classification coefficient increase sequentially, and the first preset classification coefficient is set to 0, and the second preset classification coefficient is set to 0.5, the third preset classification coefficient is set to 1. Therefore, at this time there are: ∈[0,0.5] means that the textiles to be classified are warp knitted textiles; if ∈(0.5,1] means that the textiles to be classified are weft-knitted textiles. If ∈[0,0.5] means that the textiles to be classified are blended woven textiles; if ∈(0.5,1] means that the textiles to be classified are interwoven woven textiles.
本发明通过应用电子设备识别得到各个采样图像,确定各个采样图像的垂直纤维量和不同面料种类对应的各个采样图像的采样尺度权重,进而确定不同面料种类对应的待分类纺织品的分类系数,根据待分类纺织品的分类系数,确定待分类纺织品的种类。本发明所提供的一种基于人工智能的纺织品定性分类方法可适用于不同面料种类的纺织品的定性分类,简化了纺织品定性分类的过程,提高了纺织品定性分类的适用性,并且本发明可以用于生产领域人工智能系统和计算机视觉软件等应用软件开发。The invention obtains each sampled image by applying electronic equipment to identify, determines the vertical fiber amount of each sampled image and the sampling scale weight of each sampled image corresponding to different fabric types, and then determines the classification coefficient of the textiles to be classified corresponding to different fabric types. The classification coefficient of classified textiles determines the type of textiles to be classified. The artificial intelligence-based textile qualitative classification method provided by the invention can be applied to the qualitative classification of textiles of different fabric types, simplifies the process of qualitative classification of textiles, improves the applicability of qualitative classification of textiles, and the invention can be used for qualitative classification of textiles. Application software development such as artificial intelligence systems and computer vision software in the production field.
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the above-mentioned embodiments, those of ordinary skill in the art should understand that: it can still be used for the above-mentioned implementations. The technical solutions described in the examples are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions in the embodiments of the application, and should be included in the within the scope of protection of this application.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211022235.1ACN115100481B (en) | 2022-08-25 | 2022-08-25 | A Qualitative Classification Method of Textiles Based on Artificial Intelligence |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211022235.1ACN115100481B (en) | 2022-08-25 | 2022-08-25 | A Qualitative Classification Method of Textiles Based on Artificial Intelligence |
| Publication Number | Publication Date |
|---|---|
| CN115100481Atrue CN115100481A (en) | 2022-09-23 |
| CN115100481B CN115100481B (en) | 2022-11-18 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202211022235.1AExpired - Fee RelatedCN115100481B (en) | 2022-08-25 | 2022-08-25 | A Qualitative Classification Method of Textiles Based on Artificial Intelligence |
| Country | Link |
|---|---|
| CN (1) | CN115100481B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116203016A (en)* | 2022-12-21 | 2023-06-02 | 广州番禺电缆集团有限公司 | Intelligent detection device, method and equipment for cable insulation layer slice |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20190205758A1 (en)* | 2016-12-30 | 2019-07-04 | Konica Minolta Laboratory U.S.A., Inc. | Gland segmentation with deeply-supervised multi-level deconvolution networks |
| CN114220012A (en)* | 2021-12-16 | 2022-03-22 | 池明旻 | Textile cotton and linen identification method based on deep self-attention network |
| CN114913178A (en)* | 2022-07-19 | 2022-08-16 | 山东天宸塑业有限公司 | Melt-blown fabric defect detection method and system |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20190205758A1 (en)* | 2016-12-30 | 2019-07-04 | Konica Minolta Laboratory U.S.A., Inc. | Gland segmentation with deeply-supervised multi-level deconvolution networks |
| CN114220012A (en)* | 2021-12-16 | 2022-03-22 | 池明旻 | Textile cotton and linen identification method based on deep self-attention network |
| CN114913178A (en)* | 2022-07-19 | 2022-08-16 | 山东天宸塑业有限公司 | Melt-blown fabric defect detection method and system |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116203016A (en)* | 2022-12-21 | 2023-06-02 | 广州番禺电缆集团有限公司 | Intelligent detection device, method and equipment for cable insulation layer slice |
| Publication number | Publication date |
|---|---|
| CN115100481B (en) | 2022-11-18 |
| Publication | Publication Date | Title |
|---|---|---|
| Silvestre Blanes et al. | A public fabric database for defect detection methods and results | |
| CN107870172A (en) | A Method of Cloth Defect Detection Based on Image Processing | |
| CN111402226A (en) | A Surface Defect Detection Method Based on Cascaded Convolutional Neural Networks | |
| CN105844278B (en) | A multi-feature fusion method for fabric scanning pattern recognition | |
| CN112102224B (en) | A cloth defect recognition method based on deep convolutional neural network | |
| CN111861996A (en) | A kind of printing fabric defect detection method | |
| CN116664565A (en) | Hidden crack detection method and system for photovoltaic solar cell | |
| CN110188806A (en) | A Method of Detection and Classification of Large Circular Woven Fabric Defects Based on Machine Vision | |
| CN109509171A (en) | A kind of Fabric Defects Inspection detection method based on GMM and image pyramid | |
| CN110570418B (en) | Woven label defect detection method and device | |
| CN101739570A (en) | Cotton foreign fiber online classifying method and system | |
| CN109978830A (en) | A kind of fabric defect detection method | |
| Margraf et al. | An evolutionary learning approach to self-configuring image pipelines in the context of carbon fiber fault detection | |
| CN115294136A (en) | Artificial intelligence-based construction and detection method for textile fabric flaw detection model | |
| CN115100481B (en) | A Qualitative Classification Method of Textiles Based on Artificial Intelligence | |
| Guo et al. | Intelligent quality control of surface defects in fabrics: A comprehensive research progress | |
| Elemmi et al. | Defective and nondefective classif ication of fabric images using shallow and deep networks | |
| Thakur et al. | Automated fabric inspection through convolutional neural network: an approach | |
| CN113936001B (en) | Textile surface flaw detection method based on image processing technology | |
| Rauf et al. | Fabric weave pattern recognition and classification by machine learning | |
| Pan et al. | Automatic detection of structure parameters of yarn-dyed fabric | |
| CN107945164B (en) | A Textile Defect Detection Method Based on Peak Thresholding, Rotation Calibration and Hybrid Features | |
| Mohanty et al. | Detection and classification of fabric defects in textile using image mining and association rule miner | |
| CN118864418A (en) | A fabric surface defect detection method based on multi-scale feature map fusion | |
| CN117291925B (en) | Textile surface defect detection system based on image characteristics |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee | ||
| CF01 | Termination of patent right due to non-payment of annual fee | Granted publication date:20221118 |