CN114693676B - Optical detection method and device for bleaching defects of new material textiles - Google Patents

Optical detection method and device for bleaching defects of new material textiles Download PDF

Info

Publication number
CN114693676B
CN114693676B CN202210603423.7A CN202210603423A CN114693676B CN 114693676 B CN114693676 B CN 114693676B CN 202210603423 A CN202210603423 A CN 202210603423A CN 114693676 B CN114693676 B CN 114693676B
Authority
CN
China
Prior art keywords
image
textile
bleaching
pixels
acquiring
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210603423.7A
Other languages
Chinese (zh)
Other versions
CN114693676A (en
Inventor
邱翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nantong Tongzhou Xiangpeng Textile Co ltd
Original Assignee
Nantong Tongzhou Xiangpeng Textile Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nantong Tongzhou Xiangpeng Textile Co ltd filed Critical Nantong Tongzhou Xiangpeng Textile Co ltd
Priority to CN202210603423.7A priority Critical patent/CN114693676B/en
Publication of CN114693676A publication Critical patent/CN114693676A/en
Application granted granted Critical
Publication of CN114693676B publication Critical patent/CN114693676B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • G06T5/90
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20021Dividing image into blocks, subimages or windows
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30124Fabrics; Textile; Paper
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The invention relates to the field of defect detection, in particular to an optical detection method and device for bleaching defects of new material textiles, wherein the optical detection method for bleaching defects of new material textiles is a method for testing or analyzing bleaching defects of new material textiles by acquiring visible light images by using an optical means, and the method comprises the following steps: acquiring a textile image by an optical means; classifying pixels in the textile image based on the gray level co-occurrence matrix to obtain a plurality of pixel categories; acquiring the centralized distribution degree of each pixel type based on the distribution condition of the pixels; obtaining suspected bleaching defect pixels based on the concentrated distribution degree, and further obtaining suspected bleaching defect areas; and detecting whether the suspected bleaching defect area is a bleaching defect area according to the number of pixels in the suspected bleaching defect area. The bleaching defect detection precision is improved. In addition, the optical detection method and device for the bleaching defects of the new material textiles can realize detection, metering and the like of the new material.

Description

Optical detection method and device for bleaching defects of new material textiles
Technical Field
The invention relates to the field of defect detection, in particular to an optical detection method and device for bleaching defects of new material textiles.
Background
In modern spinning, the research and development of new spinning materials, particularly the development and the use of nano fibers break through the concept of the spinning materials in the traditional sense. The fiber is spun into yarn and further woven into fabric, also called textile, and the fabric is processed into a final finished product through procedures of bleaching, dyeing and the like. Whether the pure white textiles or the colored textiles are produced, the textiles need to be bleached, and the bleaching quality of the textiles can influence the quality of finished pure white textiles and the dyeing quality of the colored textiles, so that the detection of the bleaching quality of the textiles is very important.
At present, a manual inspection or image processing mode is usually adopted, so that the detection efficiency of manually detecting bleaching defects is low; the common mode of acquiring an image by using an optical means and processing the image can only detect a more obvious bleaching defect, and has high missing rate of an unobvious bleaching uneven defect and a pigment point defect; in addition, in the image shot under natural illumination, due to the complex natural illumination, part of the image may be bright and part of the image may be dark, which may interfere with the defect detection of uneven bleaching, so that the false detection rate of the bleaching defect is high.
Disclosure of Invention
In order to solve the technical problems, the invention aims to provide an optical detection method and device for bleaching defects of new material textiles, and the adopted technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for optically detecting bleaching defects of a new material textile, the method including:
acquiring a textile image by an optical means; acquiring the textile texture direction of the textile image, and acquiring a gray level co-occurrence matrix of the textile image based on the textile texture direction;
fitting based on the numerical values and numerical positions in the gray level co-occurrence matrix to obtain a two-dimensional Gaussian mixture model, obtaining a plurality of sub-Gaussian models forming the two-dimensional Gaussian mixture model, and classifying pixels in the textile image according to the probability that the numerical values in the gray level co-occurrence matrix belong to each sub-Gaussian model to obtain a plurality of pixel categories;
acquiring the centralized distribution degree of each pixel type based on the distribution condition of the pixels; obtaining suspected bleaching defect pixels based on the concentrated distribution degree, and further obtaining suspected bleaching defect areas; and detecting whether the suspected bleaching defect area is a bleaching defect area or not according to the number of the pixels in the suspected bleaching defect area.
Further, the centralized distribution degree of each pixel category is obtained based on the distribution condition of the pixels, and specifically, the obtaining of the centralized distribution degree of each pixel category specifically includes:
converting a textile image into a gray image, and carrying out block processing on the gray image to obtain a plurality of image blocks;
for each image block: obtaining the difference value between the pixel quantity corresponding to the pixel type in the image block and the average value of the pixel quantity, wherein the average value of the pixel quantity is obtained according to the pixel quantity corresponding to the pixel type in each image block; performing quantity amplification on the number of pixels corresponding to the pixel type in the image block to obtain the number of amplified pixels, and acquiring the ratio of the total number of the pixels in the image block to the number of the amplified pixels; obtaining the product of the difference value and the ratio value;
and acquiring a product mean value based on the product corresponding to each image block, and acquiring the centralized distribution degree according to the product mean value.
Further, the centralized distribution degree is obtained according to the product mean value: and carrying out normalization processing on the product mean value to obtain the centralized distribution degree.
Further, by utilizing an optical means, a textile image is obtained, specifically:
setting a plurality of monochromatic light sources, wherein the colors of the monochromatic light sources are red, green and blue respectively;
under the irradiation of each monochromatic light source, acquiring a black-and-white image of a single-channel textile;
and obtaining the textile image based on all the obtained black and white images, wherein the textile image is an RGB image.
Further, acquiring the textile texture direction of the textile image specifically comprises: and acquiring a gray-scale image of the textile image, converting the gray-scale image into a spectrogram, and acquiring the textile texture direction of the textile image based on the spectrogram.
In a second aspect, another embodiment of the present invention provides an optical detection apparatus for bleaching defects of new material textiles, the apparatus including:
the image processing module is used for acquiring a textile image by using an optical means; acquiring the textile texture direction of the textile image, and acquiring a gray level co-occurrence matrix of the textile image based on the textile texture direction;
the pixel classification module is used for obtaining a two-dimensional Gaussian mixture model based on the numerical values and numerical positions in the gray level co-occurrence matrix in a fitting manner, obtaining a plurality of sub-Gaussian models forming the two-dimensional Gaussian mixture model, and classifying the pixels in the textile image according to the probability that the numerical values in the gray level co-occurrence matrix belong to each sub-Gaussian model to obtain a plurality of pixel categories;
the defect detection module is used for acquiring the centralized distribution degree of each pixel type based on the distribution condition of the pixels; obtaining suspected bleaching defect pixels based on the concentrated distribution degree, and further obtaining suspected bleaching defect areas; and detecting whether the suspected bleaching defect area is a bleaching defect area according to the number of pixels in the suspected bleaching defect area.
Further, the defect detection module includes:
the system comprises a blocking unit, a processing unit and a processing unit, wherein the blocking unit is used for converting a textile image into a gray image and blocking the gray image to obtain a plurality of image blocks;
a first calculation unit for, for each image block: acquiring a difference value between the number of pixels corresponding to the pixel type in the image block and the mean value of the number of pixels, wherein the mean value of the number of pixels is acquired according to the number of pixels corresponding to the pixel type in each image block; performing quantity amplification on the number of pixels corresponding to the pixel type in the image block to obtain the number of amplified pixels, and acquiring the ratio of the total number of the pixels in the image block to the number of the amplified pixels; obtaining the product of the difference value and the ratio value;
and the second calculation unit is used for acquiring a product mean value based on the product corresponding to each image block and acquiring the centralized distribution degree according to the product mean value.
Further, the second calculation unit includes:
and the normalization processing unit is used for performing normalization processing on the product mean value to obtain the centralized distribution degree.
Further, the image processing module includes:
a light source setting unit for setting a plurality of monochromatic light sources, the colors of which are red, green and blue, respectively;
the black-and-white image acquisition unit is used for acquiring a black-and-white image of a single-channel textile under the irradiation of each monochromatic light source;
and the image integration unit is used for obtaining the textile image based on all the obtained black and white images, and the textile image is an RGB image.
Further, the image processing module includes:
and the texture direction acquisition unit is used for acquiring a gray level image of the textile image, converting the gray level image into a spectrogram and acquiring the textile texture direction of the textile image based on the spectrogram.
The embodiment of the invention at least has the following beneficial effects:
(1) the invention utilizes optical means to obtain textile images, and specifically, a plurality of monochromatic light sources are arranged, and the colors of the monochromatic light sources are respectively red, green and blue; under the irradiation of each monochromatic light source, acquiring a black-and-white image of the single-channel textile; integrating all the obtained black and white images to obtain the textile image; based on the above textile image acquisition mode, the method not only avoids the color interference information when a Bayer array shoots repeated detail pictures, but also can shoot unbleached color elements, and simultaneously avoids the interference of natural illumination on the detection of uneven bleaching defects.
(2) The invention provides a new material textile bleaching defect optical detection method and a new material textile bleaching defect optical detection device, wherein the new material textile bleaching defect optical detection method is a method for acquiring a visible light image by using an optical means so as to test or analyze the new material textile bleaching defect, and specifically, the invention classifies pixels in the textile image based on a gray level co-occurrence matrix to obtain a plurality of pixel classes; acquiring the centralized distribution degree of each pixel type based on the distribution condition of the pixels; obtaining suspected bleaching defect pixels based on the concentrated distribution degree, and further obtaining suspected bleaching defect areas; and detecting whether the suspected bleaching defect area is a bleaching defect area according to the number of pixels in the suspected bleaching defect area. Therefore, based on the distribution characteristics of various pixels, the method can improve the accuracy of defect detection and detect the inconspicuous bleaching defect. In addition, the optical detection method and device for the bleaching defects of the new material textiles can realize new material detection, metering and the like.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of the steps of an embodiment of the method of the present invention.
FIG. 2 is a block diagram of an embodiment of the apparatus of the present invention.
Detailed Description
To further illustrate the technical means and effects of the present invention adopted to achieve the predetermined objects, the following detailed description will be given to a method and an apparatus for optical detection of bleaching defects of new material textile according to the present invention, with reference to the accompanying drawings and preferred embodiments, and the detailed description thereof, the structure, the features and the effects thereof. In the following description, different "one embodiment" or "another embodiment" refers to not necessarily the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The quality of the textile bleaching affects the quality of the finished product, and therefore the main object of the invention is: and processing the collected textile image by using computer vision, analyzing the characteristics of the textile image, detecting the textile bleaching defect, and evaluating the textile bleaching quality.
The following specifically describes a specific scheme of the method and the device for optical detection of bleaching defects of new material textiles, which are provided by the invention, with reference to the accompanying drawings.
After the textile image is obtained, the existing image processing method generally converts the textile image into a gray-scale image, and detects the bleaching defect based on the gray-scale value of the pixel. Due to the fact that the gray level of a pixel fluctuates under noise interference, if the defect of uneven bleaching is not obvious, the defect of uneven bleaching cannot be detected through an existing image processing mode such as threshold segmentation under the noise interference. Aiming at the problems, the gray level co-occurrence matrix is analyzed, two-dimensional Gaussian distribution fitting is carried out on the gray level co-occurrence matrix, pixel points are divided into different categories, defect judgment is carried out on each category of pixel points, and a region possibly having defects is obtained; the method can improve the accuracy of bleaching defect detection and detect the defect of unobvious bleaching unevenness.
Referring to fig. 1, a flow chart of steps of a method for optically detecting bleaching defects of a new material textile according to an embodiment of the present invention is shown, the method includes the following steps:
acquiring a textile image by an optical means; acquiring the textile texture direction of the textile image, and acquiring a gray level co-occurrence matrix of the textile image based on the textile texture direction;
fitting based on the numerical values and numerical positions in the gray level co-occurrence matrix to obtain a two-dimensional Gaussian mixture model, obtaining a plurality of sub-Gaussian models forming the two-dimensional Gaussian mixture model, and classifying pixels in the textile image according to the probability that the numerical values in the gray level co-occurrence matrix belong to each sub-Gaussian model to obtain a plurality of pixel categories;
acquiring the centralized distribution degree of each pixel type based on the distribution condition of the pixels; acquiring suspected bleaching defect pixels based on the centralized distribution degree, and further acquiring suspected bleaching defect areas; and detecting whether the suspected bleaching defect area is a bleaching defect area according to the number of pixels in the suspected bleaching defect area.
The following steps are specifically developed:
step S1, acquiring a textile image by an optical means; and acquiring the textile texture direction of the textile image, and acquiring the gray level co-occurrence matrix of the textile image based on the textile texture direction.
Step S11, acquiring a textile image by optical means, specifically: setting a plurality of monochromatic light sources, wherein the colors of the monochromatic light sources are red, green and blue respectively; under the irradiation of each monochromatic light source, acquiring a black-and-white image of a single-channel textile; and obtaining the textile image based on all the obtained black and white images, wherein the textile image is an RGB image.
On one hand, in an image shot under natural illumination, due to the fact that natural illumination is complex, partial areas in the image are bright and partial areas are dark, and interference is caused on defect detection of uneven bleaching. On the other hand, most of the existing cameras shoot images through a CCD or CMOS sensor, the CCD or CMOS sensor uses a Bayer array, the Bayer array simulates the sensitivity of human eyes to colors, and the gray information is converted into color information by adopting an arrangement mode of 1 red, 2 green and 1 blue; the sensor adopting the technology only has one color information per pixel actually, and interpolation calculation is carried out by utilizing a demosaicing algorithm to finally obtain an image. The bayer array is prone to generate color interference information when a picture with repeated details (such as textiles) is shot, and the problem is caused by a regular distribution mode, which is embodied by generating an unsightly color band in the picture; meanwhile, since the CCD or CMOS sensor is not sensitive to a certain primary color, an unbleached color dot may not be displayed in the photographed image. Based on this, the invention provides a new way of acquiring images of textiles, in particular:
and a red monochromatic light source, a green monochromatic light source and a blue monochromatic light source are respectively erected above the detection table. Placing a camera right above the detection table, conveying the textile subjected to the bleaching process to the detection table through a conveying belt, and shooting monochromatic black-and-white images of the textile under the irradiation of each monochromatic light source respectively, wherein preferably, the images only contain the textile and do not contain a background area; obtaining the textile image based on all the obtained black-and-white images, namely obtaining a textile color image according to three single-color black-and-white textile images: and taking the value of each pixel point of the black-and-white image of the textile, which is obtained under the irradiation of the red monochromatic light source, as the value of a red channel of a pixel point corresponding to the color RGB image, taking the value of each pixel point of the black-and-white image of the textile, which is obtained under the irradiation of the blue monochromatic light source, as the value of a blue channel of a pixel point corresponding to the color RGB image, and taking the value of each pixel point of the black-and-white image of the textile, which is obtained under the irradiation of the green monochromatic light source, as the value of a green channel of a pixel point corresponding to the color RGB image, so as to obtain a final textile image.
The textile image shot in the mode avoids the color interference information when a Bayer array shoots repeated detail pictures, can shoot unbleached pigment points, and avoids the interference of natural illumination on the detection of the defect of uneven bleaching.
Step S12, obtaining a textile grain direction of the textile image, specifically: and acquiring a gray-scale image of the textile image, converting the gray-scale image into a spectrogram, and acquiring the textile texture direction of the textile image based on the spectrogram.
There is a regular linear texture on the textile throughout the textile image, which can be viewed as a two-dimensional sine wave. And converting the textile gray-scale image into a frequency spectrogram, acquiring a brightest pair of symmetrical highlight points in the frequency spectrogram, and calculating the direction of a straight line formed by connecting the highlight points. And combining the characteristic that a pair of symmetrical highlight points form a straight line which is vertical to the wave line direction of the corresponding two-dimensional sine wave in the airspace to obtain the direction of the textile texture. The specific process of obtaining the textile grain direction based on the spectrogram is well known, and the invention is not described in detail.
Step S13, acquiring a gray level co-occurrence matrix of the textile image based on the textile texture direction:
counting the gray scales appearing in the textile gray scale map based on the textile gray scale map to obtain the minimum gray scale value
Figure DEST_PATH_IMAGE002
And maximum value of gray scale
Figure DEST_PATH_IMAGE004
(ii) a To be provided with
Figure 517269DEST_PATH_IMAGE002
To
Figure 168831DEST_PATH_IMAGE004
Each gray value (inclusive)
Figure 745305DEST_PATH_IMAGE002
Figure 140515DEST_PATH_IMAGE004
) As the gray level of the gray level co-occurrence matrix, acquiring the gray level co-occurrence matrix of all pixels in the textile texture direction, wherein the gray level co-occurrence matrix is
Figure DEST_PATH_IMAGE006
And the size matrix is used for representing the number of times of the occurrence of the pixel pairs with different gray scales in the texture direction of the textile.
Step S2, fitting based on the numerical values and numerical positions in the gray level co-occurrence matrix to obtain a two-dimensional Gaussian mixture model, obtaining a plurality of sub-Gaussian models forming the two-dimensional Gaussian mixture model, and classifying pixels in the textile image according to the probability that the numerical values in the gray level co-occurrence matrix belong to each sub-Gaussian model to obtain a plurality of pixel categories.
If the textile does not have any bleaching defect, under the condition of not considering noise, the gray scale of each texture of the textile is the same, only the diagonal line in the obtained gray scale co-occurrence matrix has a numerical value, and the rest part is 0. However, under the interference of noise, the texture gray scale of the textile shows a tendency of gaussian distribution, a larger value is provided around the diagonal line and the diagonal line in the obtained gray scale co-occurrence matrix, the tendency of two-dimensional gaussian distribution is shown, the value is 0 or very small at a part far away from the diagonal line, and the two-dimensional gaussian distribution with very small height and width can be regarded as noise.
If unbleached pigment points exist on the textile, the gray scale of the unbleached pigment points is greatly different from the gray scale of the texture of the textile, but because the pigment points are usually small, numerical values exist in parts far away from a diagonal line in the obtained gray scale co-occurrence matrix, and the numerical values are very small and similar to noise characteristics; if the textile has the defect of uneven bleaching, the texture gray scales of different areas are not consistent, the texture gray scales of different uneven bleaching defect areas in the obtained gray scale co-occurrence matrix are distributed at different positions of a diagonal line and the periphery of the diagonal line, and the texture gray scale of each uneven bleaching defect area shows the trend of two-dimensional Gaussian distribution.
The method comprises the steps of taking numerical values in a gray level co-occurrence matrix and corresponding numerical value positions (coordinates of the numerical value positions) as sample data, fitting a two-dimensional Gaussian mixture model according to the sample data by utilizing an EM (effective electromagnetic) algorithm, splitting the two-dimensional Gaussian mixture model to obtain a plurality of sub-Gaussian models, wherein each sub-Gaussian model represents different characteristics of a textile, and corresponding pixels of the sub-Gaussian models can be textile texture pixels (pixels forming textile textures), normal pixels except the textile texture pixels, noise pixels and bleaching abnormal pixels (pixels corresponding to pigment points). And the number of the sub-Gaussian models is the number of maximum values in the gray level co-occurrence matrix and is marked as K.
And classifying the pixels in the textile image according to the probability that the numerical values in the gray level co-occurrence matrix belong to each sub-Gaussian model to obtain a plurality of pixel categories. Specifically, classifying the numerical values in the gray level co-occurrence matrix according to the probability that the numerical values in the gray level co-occurrence matrix belong to each sub-Gaussian model to obtain a plurality of numerical value categories; the pixels corresponding to the numerical values in each numerical value category are pixels of one category, and then a plurality of pixel categories are obtained.
And calculating the probability that each numerical value in the gray level co-occurrence matrix belongs to each sub-Gaussian model according to a probability density formula, and classifying the numerical values in the gray level co-occurrence matrix according to the probability to obtain K numerical value categories. And if the probability that one numerical value in the gray level co-occurrence matrix belongs to the multiple sub-Gaussian models is the maximum and equal, dividing the numerical value into numerical value categories corresponding to the multiple sub-Gaussian models.
Returning to the textile gray-scale image according to the numerical value in each numerical value category and the coordinate position of the numerical value, and acquiring all pixel points in the image corresponding to each numerical value category; therefore, the pixels corresponding to each numerical value category are classified into one category of pixels, and then the classification of the pixels in the textile image is completed to obtain K pixel categories, wherein the pixels in each pixel category may be textile texture pixels, normal pixels except the textile texture pixels, noise pixels or bleaching abnormal pixels.
Step S3, acquiring the centralized distribution degree of each pixel type based on the distribution condition of the pixels; obtaining suspected bleaching defect pixels based on the concentrated distribution degree, and further obtaining suspected bleaching defect areas; and detecting whether the suspected bleaching defect area is a bleaching defect area or not according to the number of the pixels in the suspected bleaching defect area.
Textile textures are distributed throughout the whole image, if the textile does not have the defect of uneven bleaching, pixel points in pixel categories corresponding to textile texture pixels are distributed throughout the whole image and are distributed uniformly in each image block; if the defect of uneven bleaching exists, pixel points in the pixel categories of the textile texture pixels corresponding to the uniform bleaching area are possibly distributed in the whole image, but the pixel points in the pixel categories of the textile texture pixels corresponding to the uneven bleaching area are concentrated in a plurality of image blocks; the pixel points representing the category of the noise pixel or the bleaching abnormal pixel may be distributed in a plurality of image blocks, but the number of the noise pixel or the bleaching abnormal pixel in each image block is smaller. Therefore, the centralized distribution degree of each category pixel point in the image is calculated.
Step S31, acquiring the centralized distribution degree of each pixel type based on the distribution condition of the pixels; specifically, the obtaining of the centralized distribution degree of each pixel category specifically includes:
(1) and converting the textile image into a gray image, and carrying out block processing on the gray image to obtain a plurality of image blocks.
The gray level image is processed in a blocking way to obtain
Figure DEST_PATH_IMAGE008
Each size is
Figure DEST_PATH_IMAGE010
Preferably, the size of the image block in the embodiment is 15 × 15.
(2) For each image block: acquiring a difference value between the number of pixels corresponding to the pixel type in the image block and the mean value of the number of pixels, wherein the mean value of the number of pixels is acquired according to the number of pixels corresponding to the pixel type in each image block; performing quantity amplification on the number of pixels corresponding to the pixel type in the image block to obtain the number of amplified pixels, and acquiring the ratio of the total number of the pixels in the image block to the number of the amplified pixels; and acquiring the product of the difference value and the ratio.
In order to avoid that the difference is 0, in an embodiment, when the difference is smaller than a preset threshold, a product of the preset threshold and the ratio is obtained. In another embodiment, when the difference is smaller than a preset threshold, a sum of the difference and the preset threshold is obtained, and a product of the sum and the ratio is obtained. Preferably, the preset threshold value is 1 in the embodiment.
(3) Obtaining a product mean value based on the product corresponding to each image block, and obtaining the centralized distribution degree according to the product mean value; specifically, the step of obtaining the concentrated distribution degree according to the product mean value is to perform normalization processing on the product mean value to obtain the concentrated distribution degree.
As an example, the centralized distribution degree of each pixel class is calculated as follows:
Figure DEST_PATH_IMAGE012
Figure DEST_PATH_IMAGE014
is shown as
Figure DEST_PATH_IMAGE016
The centralized distribution degree of each pixel category;
Figure DEST_PATH_IMAGE018
is shown as
Figure DEST_PATH_IMAGE020
In a block of an image
Figure 33515DEST_PATH_IMAGE016
The number of pixels corresponding to each pixel type;
Figure DEST_PATH_IMAGE022
according to the first in each image block
Figure 387136DEST_PATH_IMAGE016
Obtaining a pixel number average value by the pixel number corresponding to each pixel type;
Figure DEST_PATH_IMAGE024
is shown in
Figure DEST_PATH_IMAGE026
And a preset threshold value
Figure DEST_PATH_IMAGE028
Taking a larger value to avoid the difference being 0, preferably, a preset threshold value
Figure 185328DEST_PATH_IMAGE028
Has a value of 1;
Figure DEST_PATH_IMAGE030
representing the total number of pixels in an image block;
Figure 915387DEST_PATH_IMAGE008
the number of the image blocks;
Figure DEST_PATH_IMAGE032
is shown to the first
Figure 131736DEST_PATH_IMAGE020
In each image block
Figure 125099DEST_PATH_IMAGE016
The number of the amplified pixels obtained by quantity amplification of the number of the pixels corresponding to the pixel type,
Figure DEST_PATH_IMAGE034
the number of pixels of the gray scale map other than the textile texture pixels or the textile texture pixels is large for the amplification factor, but the number of pixels is at most half of the total number of pixels in the gray scale map, and therefore, the amplification factor
Figure 410587DEST_PATH_IMAGE034
Is 2;
Figure DEST_PATH_IMAGE036
length or width of image block for normalization
Figure DEST_PATH_IMAGE038
As a normalization coefficient, a pixel type of the pixel concentration distribution and a concentration distribution of the pixel spread image after normalization are performedThe difference in degrees is greater.
If it is first
Figure 678757DEST_PATH_IMAGE016
The pixels corresponding to the pixel category are texture pixels or normal pixels except the texture pixels, and then the second pixel in each image block
Figure 202143DEST_PATH_IMAGE016
The number of pixels corresponding to each pixel category is larger, but at most half of the number of pixels of the whole image block is possible, so that the number of pixels is the first to
Figure 366408DEST_PATH_IMAGE016
The number of each pixel category in each image block is amplified by twice to obtain the number of amplified pixels, the ratio of the total number of the pixels in the image block to the number of the amplified pixels is calculated, at the moment, the ratio is close to 1, and the centralized distribution degree
Figure 608033DEST_PATH_IMAGE014
Is measured by
Figure DEST_PATH_IMAGE040
And (6) determining.
If it is the first
Figure 414315DEST_PATH_IMAGE016
The pixel corresponding to each pixel category is a noise pixel or a bleaching abnormal pixel, and then the second pixel in each image block
Figure 602327DEST_PATH_IMAGE016
The number of pixels corresponding to each pixel category is small, and at this time
Figure 937493DEST_PATH_IMAGE040
The noise pixels and the bleaching abnormal pixels are not distributed in the whole image block but distributed in the image block in a centralized way; based on only
Figure 400835DEST_PATH_IMAGE040
Calculating central distribution degreeThe result is inaccurate, and the ratio of the total number of pixels in the image block to the number of the amplified pixels is very large, so the concentration distribution degree
Figure 276387DEST_PATH_IMAGE014
Is measured by
Figure DEST_PATH_IMAGE042
And (6) determining.
Step S32, obtaining suspected bleaching defect pixels based on the centralized distribution degree, and further obtaining suspected bleaching defect areas; and detecting whether the suspected bleaching defect area is a bleaching defect area according to the number of pixels in the suspected bleaching defect area.
According to the concentration distribution degree, the pixel categories corresponding to the possible bleaching unevenness and the color pixel defects can be distinguished to a certain extent, specifically: if the centralized distribution degree of the pixel category is smaller than a preset distribution degree threshold value, pixels corresponding to the pixel category are uniformly distributed in the image, bleaching defects do not exist, and the label of the pixel category is normal; otherwise, the pixels corresponding to the pixel category are distributed in the image or in the image block in a centralized manner, a bleaching defect may exist, and the label of the pixel category is suspected to be abnormal. Preferably, the empirical value of the preset distribution degree threshold is 0.9.
And the pixels corresponding to the pixel types with the labels as suspected abnormalities are suspected bleaching defect pixels, and a suspected bleaching defect area is obtained based on the suspected bleaching defect pixels.
In one embodiment, connected domain analysis is performed on the suspected bleaching defect pixels to obtain a plurality of suspected bleaching defect areas.
In another embodiment, the pixel proportion of the bleaching defect suspected pixels in each image block is obtained, if the pixel proportion is smaller than a preset proportion threshold, the bleaching defect suspected pixels in the image block form a bleaching defect suspected area, otherwise, the image block is the bleaching defect suspected area.
Based on prior, the areas of the bleaching non-uniform areas are known to be large, and the corresponding number of pixels is known to be large; the corresponding area of the color pixel points is smaller, and the corresponding number of pixels is less. Based on the above, detecting whether the suspected bleaching defect area is a bleaching defect area according to the number of pixels in the suspected bleaching defect area:
if the number of pixels in the suspected bleaching defect area is smaller than a preset number threshold, the area is an area formed by noise points, the textile does not have the defect of uneven bleaching, and the bleaching process is qualified; if the number of pixels in the suspected bleaching defect area is greater than or equal to a preset number threshold and less than the total number of pixels in the image block, the area is a bleaching defect area, specifically an area (corresponding to a pigment point) formed by abnormal bleaching pixels, and the bleaching process is unqualified; if the number of pixels in the suspected bleaching defect area is greater than or equal to the total number of pixels in the image block, the area is a bleaching defect area, specifically a bleaching non-uniform area, and the bleaching process is not qualified. Preferably, the preset number threshold in the embodiment is 4.
Based on the same inventive concept as the above method embodiment, an embodiment of the present invention provides an optical detection apparatus for bleaching defects of new material textiles, please refer to fig. 2, which shows a module configuration diagram of the optical detection apparatus for bleaching defects of new material textiles provided by an embodiment of the present invention, the apparatus includes an image processing module 10, a pixel classification module 20 and a defect detection module 30, specifically:
the image processing module 10 is used for acquiring a textile image by an optical means; acquiring the textile texture direction of the textile image, and acquiring a gray level co-occurrence matrix of the textile image based on the textile texture direction;
the pixel classification module 20 is configured to obtain a two-dimensional gaussian mixture model by fitting based on the numerical values and numerical positions in the gray level co-occurrence matrix, obtain a plurality of sub-gaussian models forming the two-dimensional gaussian mixture model, and classify pixels in the textile image according to the probability that the numerical values in the gray level co-occurrence matrix belong to each sub-gaussian model, so as to obtain a plurality of pixel categories;
a defect detection module 30, configured to obtain a centralized distribution degree of each pixel type based on a distribution condition of the pixels; obtaining suspected bleaching defect pixels based on the concentrated distribution degree, and further obtaining suspected bleaching defect areas; and detecting whether the suspected bleaching defect area is a bleaching defect area according to the number of pixels in the suspected bleaching defect area.
Further, the image processing module 10 includes a light source setting unit 11, a black-and-white image obtaining unit 12, and an image integration unit 13, specifically:
a light source setting unit 11 for setting a plurality of single color light sources, the colors of which are red, green, and blue, respectively;
a black-and-white image obtaining unit 12, configured to obtain a black-and-white image of a single-channel textile under irradiation of each monochromatic light source;
and the image integration unit 13 is configured to obtain the textile image based on all the obtained black-and-white images, where the textile image is an RGB image.
Further, the image processing module 10 further includes a texture direction obtaining unit 14, where the texture direction obtaining unit is configured to obtain a gray-scale image of the textile image, convert the gray-scale image into a spectrogram, and obtain a textile texture direction of the textile image based on the spectrogram.
Further, the defect detection module 30 includes a blocking unit 31, a first calculating unit 32 and a second calculating unit 33, specifically:
the blocking unit 31 is configured to convert a textile image into a grayscale map, and perform blocking processing on the grayscale map to obtain a plurality of image blocks;
a first computing unit 32 for, for each image block: obtaining the difference value between the pixel quantity corresponding to the pixel type in the image block and the average value of the pixel quantity, wherein the average value of the pixel quantity is obtained according to the pixel quantity corresponding to the pixel type in each image block; performing quantity amplification on the number of pixels corresponding to the pixel type in the image block to obtain the number of amplified pixels, and acquiring the ratio of the total number of the pixels in the image block to the number of the amplified pixels; obtaining the product of the difference value and the ratio value;
the second calculating unit 33 is configured to obtain a product mean value based on the product corresponding to each image block, and obtain the centralized distribution degree according to the product mean value.
The second calculation unit 33 further includes: and the normalization processing unit is used for performing normalization processing on the product mean value to obtain the centralized distribution degree.
It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments. And that specific embodiments have been described above. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
All the embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from other embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (6)

1. An optical detection method for bleaching defects of new material textiles is characterized by comprising the following steps:
acquiring a textile image by an optical means; acquiring a textile texture direction of the textile image, and acquiring a gray level co-occurrence matrix of the textile image based on the textile texture direction;
fitting to obtain a two-dimensional Gaussian mixture model based on the numerical values and numerical positions in the gray level co-occurrence matrix, obtaining a plurality of sub-Gaussian models forming the two-dimensional Gaussian mixture model, and classifying pixels in the textile image according to the probability that the numerical values in the gray level co-occurrence matrix belong to each sub-Gaussian model to obtain a plurality of pixel categories;
acquiring the centralized distribution degree of each pixel type based on the distribution condition of the pixels; acquiring suspected bleaching defect pixels based on the centralized distribution degree, and further acquiring suspected bleaching defect areas; detecting whether the suspected bleaching defect area is a bleaching defect area or not according to the number of pixels in the suspected bleaching defect area;
acquiring the concentrated distribution degree of each pixel category based on the distribution condition of the pixels, specifically, acquiring the concentrated distribution degree of each pixel category specifically includes:
converting a textile image into a gray-scale image, and carrying out block processing on the gray-scale image to obtain a plurality of image blocks;
for each image block: obtaining the difference value between the pixel quantity corresponding to the pixel type in the image block and the average value of the pixel quantity, wherein the average value of the pixel quantity is obtained according to the pixel quantity corresponding to the pixel type in each image block; performing quantity amplification on the number of pixels corresponding to the pixel type in the image block to obtain the number of amplified pixels, and acquiring the ratio of the total number of the pixels in the image block to the number of the amplified pixels; obtaining the product of the difference value and the ratio value;
obtaining a product mean value based on the product corresponding to each image block, and obtaining the centralized distribution degree according to the product mean value;
obtaining the centralized distribution degree according to the product mean value: and carrying out normalization processing on the product mean value to obtain the centralized distribution degree.
2. The optical detection method for bleaching defects of new material textiles as claimed in claim 1, characterized in that the textile image is acquired by optical means, specifically:
setting a plurality of monochromatic light sources, wherein the colors of the monochromatic light sources are red, green and blue respectively;
under the irradiation of each monochromatic light source, acquiring a black-and-white image of the single-channel textile;
and obtaining the textile image based on all the obtained black and white images, wherein the textile image is an RGB image.
3. The optical detection method for bleaching defects of new material textiles according to claim 2, characterized in that the textile grain direction of the textile image is obtained by: and acquiring a gray-scale image of the textile image, converting the gray-scale image into a spectrogram, and acquiring the textile texture direction of the textile image based on the spectrogram.
4. An optical detection device for bleaching defects of new material textiles is characterized by comprising:
the image processing module is used for acquiring a textile image by using an optical means; acquiring the textile texture direction of the textile image, and acquiring a gray level co-occurrence matrix of the textile image based on the textile texture direction;
the pixel classification module is used for obtaining a two-dimensional Gaussian mixture model based on the numerical values and numerical positions in the gray level co-occurrence matrix in a fitting manner, obtaining a plurality of sub-Gaussian models forming the two-dimensional Gaussian mixture model, and classifying the pixels in the textile image according to the probability that the numerical values in the gray level co-occurrence matrix belong to each sub-Gaussian model to obtain a plurality of pixel categories;
the defect detection module is used for acquiring the centralized distribution degree of each pixel type based on the distribution condition of the pixels; obtaining suspected bleaching defect pixels based on the concentrated distribution degree, and further obtaining suspected bleaching defect areas; detecting whether the suspected bleaching defect area is a bleaching defect area or not according to the number of pixels in the suspected bleaching defect area;
the defect detection module includes:
the system comprises a blocking unit, a processing unit and a processing unit, wherein the blocking unit is used for converting a textile image into a gray image and blocking the gray image to obtain a plurality of image blocks;
a first calculation unit for, for each image block: acquiring a difference value between the number of pixels corresponding to the pixel type in the image block and the mean value of the number of pixels, wherein the mean value of the number of pixels is acquired according to the number of pixels corresponding to the pixel type in each image block; performing quantity amplification on the number of pixels corresponding to the pixel type in the image block to obtain the number of amplified pixels, and acquiring the ratio of the total number of the pixels in the image block to the number of the amplified pixels; obtaining the product of the difference value and the ratio value;
the second calculation unit is used for acquiring a product mean value based on the product corresponding to each image block and acquiring the centralized distribution degree according to the product mean value;
the second calculation unit includes:
and the normalization processing unit is used for performing normalization processing on the product mean value to obtain the centralized distribution degree.
5. The optical detection device for bleaching defects of new material textiles according to claim 4, wherein the image processing module comprises:
a light source setting unit for setting a plurality of monochromatic light sources, the colors of which are red, green and blue, respectively;
the black-and-white image acquisition unit is used for acquiring a black-and-white image of the single-channel textile under the irradiation of each monochromatic light source;
and the image integration unit is used for obtaining the textile image based on all the obtained black-and-white images, and the textile image is an RGB image.
6. The optical detection device for the bleaching defect of the new material textile as claimed in claim 5, wherein the image processing module comprises:
and the texture direction obtaining unit is used for obtaining a gray level image of the textile image, converting the gray level image into a frequency spectrogram and obtaining the textile texture direction of the textile image based on the frequency spectrogram.
CN202210603423.7A 2022-05-31 2022-05-31 Optical detection method and device for bleaching defects of new material textiles Active CN114693676B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210603423.7A CN114693676B (en) 2022-05-31 2022-05-31 Optical detection method and device for bleaching defects of new material textiles

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210603423.7A CN114693676B (en) 2022-05-31 2022-05-31 Optical detection method and device for bleaching defects of new material textiles

Publications (2)

Publication Number Publication Date
CN114693676A CN114693676A (en) 2022-07-01
CN114693676B true CN114693676B (en) 2022-08-19

Family

ID=82131284

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210603423.7A Active CN114693676B (en) 2022-05-31 2022-05-31 Optical detection method and device for bleaching defects of new material textiles

Country Status (1)

Country Link
CN (1) CN114693676B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114792314B (en) * 2022-06-21 2022-09-02 南通永卓金属制品有限公司 Laser beam-based metal mesh defect detection method and artificial intelligence system
CN115063424B (en) * 2022-08-18 2022-10-28 南通永安纺织有限公司 Textile bobbin yarn detection method based on computer vision
CN115115635B (en) * 2022-08-30 2022-11-15 江苏万喜登家居科技有限公司 Bleaching quality identification method for textile bleaching process
CN116843688B (en) * 2023-09-01 2023-11-24 山东虹纬纺织有限公司 Visual detection method for quality of textile

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114445348A (en) * 2021-12-31 2022-05-06 扬州中卓泵业有限公司 New material water pump defect detection method and system based on optical means
CN114529549A (en) * 2022-04-25 2022-05-24 南通东德纺织科技有限公司 Cloth defect labeling method and system based on machine vision

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100401043C (en) * 2000-04-18 2008-07-09 香港大学 Image inspecting method and device for detecting faults
CN111815601B (en) * 2020-07-03 2021-02-19 浙江大学 Texture image surface defect detection method based on depth convolution self-encoder
CN112348773B (en) * 2020-09-28 2022-09-23 歌尔股份有限公司 Screen defect detection method and device and electronic equipment
CN114549497B (en) * 2022-02-28 2022-11-29 扬州市恒邦机械制造有限公司 Method for detecting surface defects of walking board based on image recognition and artificial intelligence system
CN114511471B (en) * 2022-04-18 2022-07-01 广州骏天科技有限公司 Image optimization method and system based on gray level co-occurrence matrix

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114445348A (en) * 2021-12-31 2022-05-06 扬州中卓泵业有限公司 New material water pump defect detection method and system based on optical means
CN114529549A (en) * 2022-04-25 2022-05-24 南通东德纺织科技有限公司 Cloth defect labeling method and system based on machine vision

Also Published As

Publication number Publication date
CN114693676A (en) 2022-07-01

Similar Documents

Publication Publication Date Title
CN114693676B (en) Optical detection method and device for bleaching defects of new material textiles
CN114549522A (en) Textile quality detection method based on target detection
Guha et al. Measurement of yarn hairiness by digital image processing
CN115018844B (en) Plastic film quality evaluation method based on artificial intelligence
CN106596073A (en) Method and system for detecting image quality of optical system, and testing target plate
KR101776355B1 (en) Apparatus and methods for setting up optical inspection parameters
CN102221559A (en) Online automatic detection method of fabric defects based on machine vision and device thereof
Liyakat et al. Yarn quality detection for textile industries using image processing
CN110189670A (en) A kind of LED display screen defect inspection method
CN110186937A (en) Reject mirror article surface two-dimensional defect detection method and system that dust influences
CN114445330A (en) Method and system for detecting appearance defects of components
CN113936001B (en) Textile surface flaw detection method based on image processing technology
CN108414531A (en) A kind of fexible film defect detecting device and its detection method based on machine vision
US8526717B2 (en) Rich color transition curve tracking method
Park et al. Automated defect inspection systems by pattern recognition
CN112730407A (en) Detection device and detection method for detecting yarn hairiness index by using linear array digital camera
JP2021196304A (en) Color change evaluation method of fiber product or the like
CN103927544A (en) Machine vision grading method for ginned cotton rolling quality
Li et al. Real-time segmentation of yarn images based on an FCM algorithm and intensity gradient analysis
CN115546141A (en) Small sample Mini LED defect detection method and system based on multi-dimensional measurement
JP7411155B2 (en) Color unevenness inspection device and color unevenness inspection method
US10789702B2 (en) Systems and methods for analyzing a fabric article
CN112630155A (en) Color difference detection device and color difference detection method
CN206292816U (en) A kind of automatic identification equipment of yarn dyed fabric tissue
CN109211937A (en) A kind of detection system and its detection method of underwear elastic woven tape curved strip defect

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant