Detection system and detection method for bending defect of elastic braid of underwear
Technical Field
The invention belongs to the technical field of fabric quality detection, and particularly relates to a detection system and a detection method for detecting the bending belt defect of an elastic woven belt of underwear.
Background
With the progress of modern industry in China, automation of textile industry becomes a necessary trend for development. However, in the textile production process, the quality detection of the elastic woven belt of the underwear is not completely automated, that is, the detection of most of the defects of the woven belt is still completed by manual visual inspection. However, many influencing factors cause low manual detection efficiency, and the development requirements of the modern textile industry cannot be met, so that an automatic detection device is needed to replace manual detection.
In recent years, the rapid development of computer technology and the maturity of image processing technology in China make the computer technology have wider application in the aspect of industrial automation. In the process of detecting the defects of the elastic woven belt of the underwear, the image processing technology is used, so that various defects of manual detection can be overcome, and the obtained detection result can be subjected to data processing and analysis, so that the quality of the woven belt is improved.
The bending defects of the elastic woven belt of the underwear are common in the weaving process, and the generation reasons are as follows: the wrong reed is inserted while the chain or the steel wire is locked, the thickness of the raw material of the weft yarn is not consistent, the problem of weft yarn supply, the grid of the reed is not consistent, the position of the reed moves and the like.
The ribbon technical data figure generally indicates the slight bending-out, slight bending-in amount or straightness of the ribbon. If the bending degree is large, the subsequent production is inevitably influenced, and the difficulty of dyeing and finishing is increased.
Wuning, guan Yin and Xushuaihua in the article of fabric defect detection based on the periodicity and local directionality of the texture edge disclose a new detection method, the method extracts a straight line through Hough transformation, finds a typical straight line capable of representing the local texture direction in an image, thereby obtaining the texture direction of a twill fabric, and then distinguishes normal texture from defects by using the directional characteristics of the texture. According to the method, when the texture features of the twill fabric are extracted, the detection effect is obvious, however, when the method is applied to the elastic woven belt for the underwear, the detection result of the method is inaccurate, large errors exist, further detection is needed, and the specific bending degree of the woven belt is obtained.
Disclosure of Invention
The invention aims to provide a detection system for detecting the bending defect of an elastic woven belt of underwear, which realizes real-time accurate measurement of the slope of the elastic woven belt of the underwear.
Another object of the present invention is a method for monitoring a system for detecting bending defects in an elastic webbing of an undergarment.
The technical scheme adopted by the invention is as follows: the utility model provides a detection system of curved defect of taking of underwear elasticity meshbelt, includes image acquisition unit and image processing unit, and image acquisition unit is used for the sample image of the underwear elasticity meshbelt that awaits measuring in real time, and image processing unit is used for carrying out the straightway to the sample image of gathering and draws and calculate the slope of straightway.
The present invention is also characterized in that,
the image acquisition unit is an industrial camera.
The image processing unit is an industrial control computer.
The industrial camera is connected with an industrial control computer by adopting a gigabit Ethernet interface.
A detection method of the detection system for detecting the bending defects of the elastic woven belt of the underwear specifically comprises the following steps:
step 1: an image acquisition unit is used for acquiring an elastic braid image of the underwear to be detected in real time;
step 2: the image processing unit is used for carrying out image enhancement on the acquired elastic braid image of the underwear to be detected, so that noise interference is filtered, and the definition of the image is improved;
and step 3: carrying out edge detection on the image obtained in the step 2 by adopting a canny edge detection algorithm to obtain a binary image;
and 4, step 4: carrying out Hough transform on the binary image to determine an edge straight line parameter equation:
establishing a two-dimensional coordinate system by using an image processing unit, processing the coordinates (x, y) of each pixel point in a binary image to obtain corresponding parameters rho and theta, establishing a two-dimensional array related to the parameters rho and theta, searching for the (rho, theta) with the same value in the two-dimensional array, recording each same (rho, theta) and the corresponding repetition number n in the two-dimensional array, wherein the number of the same (rho, theta) represents the number of straight lines in the binary image, processing each same (rho, theta) to obtain an accumulated sum S, the number of the same (rho, theta) with the highest accumulated sum S represents the number of edge straight lines, the rho and theta with the highest accumulated sum S are parameters of the edge straight lines, and the process of processing the coordinates (x, y) of each pixel point in the binary image is as follows:
wherein rho is the vertical distance from the straight line to the origin, theta is the angle from the x axis to the vertical line of the straight line, the value range of theta is-90 degrees to +90 degrees, k is the slope of the straight line, and b is the intercept of the straight line on the y axis;
substituting rho and theta which are the same as rho and theta and have the highest sum S into the expression (1) for processing to obtain an edge straight line parameter equation;
and 5: according to the edge straight line parameter equation in the step 4, judging whether the woven belt to be tested is a bent belt or not according to the slope of the edge straight line, wherein the judging process is as follows:
when the slope of the edge straight line is more than or equal to-0.01 and less than or equal to 0.01, the normal woven belt is formed, and when the slope of the edge straight line is more than 0.01 or the slope of the edge straight line is less than-0.01, the bent belt is formed.
The process of processing each of the same (ρ, θ) in step 4 is:
S=(ρ+θ)×n (2)
where S is the cumulative sum of each of the same (ρ, θ).
The invention has the beneficial effects that: the detection system for detecting the bending belt defect of the elastic braid of the underwear extracts the characteristic of the texture of the elastic braid of the underwear through an image processing technology, detects a straight line in a texture image of the braid by adopting Hough transform, then detects the slope of the straight line, judges whether the braid is a bending belt or not according to the slope, realizes real-time and accurate detection of the slope of the elastic braid of the underwear, and has the advantages of non-contact property, objectivity, real-time property, high efficiency and high accuracy; the slope of the elastic braid of the underwear can be detected on line in real time through an industrial camera arranged in a standard light source lamp box and an industrial control computer provided with related software and a database, whether the defect of the bent braid exists or not is judged, and the corresponding detection cost is greatly reduced on the premise of ensuring the measurement precision.
Drawings
FIG. 1 is a schematic diagram of a system for detecting bending defects of an elastic woven belt of underwear according to the present invention;
FIG. 2 is a flow chart of a monitoring method of the detecting system for detecting the bending belt defect of the elastic woven belt of the underwear.
Detailed Description
The invention provides a detection system for detecting defects of bending belts of elastic webbings of underwear, which comprises an image acquisition unit and an image processing unit, wherein the image acquisition unit is used for acquiring sample images of the elastic webbings of the underwear to be detected in real time, and the image processing unit is used for extracting straight-line segments of the acquired sample images and calculating the slope of the straight-line segments.
The image acquisition unit is an industrial camera.
The image processing unit is an industrial control computer.
The industrial camera is connected with an industrial control computer by adopting a gigabit Ethernet interface.
The invention provides a detection system for detecting the bending defects of an elastic braid of underwear, wherein an industrial camera acquires images of the elastic braid of the underwear to be detected in real time and transmits the images to an industrial control computer.
The industrial camera is arranged in a standard light source lamp box near the ribbon loom, and because the change of external illumination can cause the fluctuation of the brightness and the contrast of the elastic braid of the underwear, the standard light source lamp box is required to be used for isolating the article to be detected from the external illumination, thereby ensuring the constant illumination intensity during each detection.
The industrial camera uses a 500 ten thousand pixel black and white industrial camera C125-0618-5M of German basler, the industrial camera adopts a 500 ten thousand pixel area array type 1/2.5' CCD industrial lens, the aperture value is F1.8-F22, the resolution is 1388 multiplied by 1038, the C mouth lens provides a fixed focal length of 6mm, the volume is small, and the installation is easy.
And the industrial control computer receives the braid image provided by the industrial camera, performs linear extraction on the image and detects the slope of the braid to be detected.
The industrial control computer adopts a Huan industrial control computer, and the machine adopts an Intel dual-core processor, a master frequency 3.0G, a 1100M network card, a 1G memory, a 160G hard disk and a 19-inch liquid crystal display, so that the requirement of severe environment of an industrial field is met.
The industrial control computer is provided with image preprocessing software, a sample database and straight line slope measuring software and is connected with the industrial camera through a gigabit Ethernet.
The detection method of the detection system for detecting the bending defects of the elastic webbing of the underwear as shown in fig. 2 specifically comprises the following steps:
step 1: an image acquisition unit is used for acquiring an elastic braid image of the underwear to be detected in real time;
step 2: the image processing unit is used for carrying out image enhancement on the acquired elastic braid image of the underwear to be detected, so that noise interference is filtered, and the definition of the image is improved;
and step 3: carrying out edge detection on the image obtained in the step 2 by adopting a canny edge detection algorithm to obtain a binary image;
and 4, step 4: carrying out Hough transform on the binary image to determine an edge straight line parameter equation:
establishing a two-dimensional coordinate system by using an image processing unit, processing the coordinates (x, y) of each pixel point in a binary image to obtain corresponding parameters rho and theta, establishing a two-dimensional array related to the parameters rho and theta, searching for the (rho, theta) with the same value in the two-dimensional array, recording each same (rho, theta) and the corresponding repetition number n in the two-dimensional array, wherein the number of the same (rho, theta) represents the number of straight lines in the binary image, processing each same (rho, theta) to obtain an accumulated sum S, the number of the same (rho, theta) with the highest accumulated sum S represents the number of edge straight lines, the rho and theta with the highest accumulated sum S are parameters of the edge straight lines, and the process of processing the coordinates (x, y) of each pixel point in the binary image is as follows:
wherein rho is the vertical distance from the straight line to the origin, theta is the angle from the x axis to the vertical line of the straight line, the value range of theta is-90 degrees to +90 degrees, k is the slope of the straight line, and b is the intercept of the straight line on the y axis;
substituting rho and theta which are the same as rho and theta and have the highest sum S into the expression (1) for processing to obtain an edge straight line parameter equation;
and 5: according to the edge straight line parameter equation in the step 4, judging whether the woven belt to be tested is a bent belt or not according to the slope of the edge straight line, wherein the judging process is as follows:
when the slope of the edge straight line is more than or equal to-0.01 and less than or equal to 0.01, the normal woven belt is formed, and when the slope of the edge straight line is more than 0.01 or the slope of the edge straight line is less than-0.01, the bent belt is formed.
The process of processing each of the same (ρ, θ) in step 4 is:
S=(ρ+θ)×n (2)
where S is the cumulative sum of each of the same (ρ, θ).
It should be noted that, theoretically, when the slope of the straight line is 0, the mesh belt is a normal mesh belt; when the slope of the straight line is not 0, the webbing is a curved webbing. But certain error exists during image acquisition, and the slope of the normal braid is not 0. The slope of the normal woven belt is +/-0.0141 after being tested by a plurality of experiments, so that the slope of the normal woven belt is 0.01 as a threshold value, the normal woven belt is when the slope of the edge straight line is more than or equal to-0.01 and less than or equal to 0.01, and the bent belt is when the slope of the edge straight line is more than 0.01 or the slope of the edge straight line is less than-0.01.
The detection method of the detection system for detecting the bending belt defect of the elastic woven belt of the underwear carries out feature extraction on the texture feature of the elastic woven belt of the underwear through an image processing technology, detects the straight line in the texture image of the woven belt by adopting Hough transform, then detects the slope of the edge straight line, judges whether the woven belt is a bending belt or not according to the slope, realizes real-time accurate detection of the slope of the elastic woven belt of the underwear, and has the advantages of non-contact property, objectivity, real-time property, high efficiency and high precision; meanwhile, the invention also discloses a detection system for detecting the bending belt defect of the elastic braid of the underwear, which comprises an image acquisition unit and an image processing unit, and the detection system is used for detecting the slope of the elastic braid of the underwear in real time and judging whether the bending belt defect exists or not, so that the corresponding detection cost is greatly reduced on the premise of ensuring the measurement precision.