Cotton fabric desizing monitoring method based on computer vision
Through computer vision technology, the color reaction area images in cotton fabric desizing treatment were obtained, the slurry content difference was calculated, and the desizing effect was monitored, which solved the problem of inaccurate human visual monitoring and achieved accurate evaluation of cotton fabric desizing uniformity.
Patent Information
- Application Number
- CN202210462411.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-28
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2042-04-28
AI Technical Summary
In the prior art, when monitoring cotton fabric desizing treatment through human eye vision, the accuracy rate is not high and there is an error in monitoring results.
Using a computer vision-based method, by obtaining the image of the color reaction area on the cotton fabric after the droplets of the iodine-containing solution, the difference in the slurry content of each pixel and the adjacent area is calculated, the possibility index of the slurry formation is obtained, the degree of slurry formation is calculated, and the deslurry effect is monitored.
Accurate monitoring of the desizing effect is achieved, and it can determine whether the cotton fabric is uniformly desorbed, improving the accuracy of monitoring.
Smart Images

Figure CN115049585B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of computer vision, and in particular to a computer vision-based cotton fabric desizing processing monitoring method. Background Art
[0002] In the desizing treatment results, a rapid determination method can be used to monitor the uniformity of the desizing results. However, this simple comparison of edge color and color card through conventional human visual means will make the desizing monitoring results inaccurate and have certain errors. Summary of the invention
[0003] In order to solve the above technical problems, the purpose of the present invention is to provide a method for monitoring the desizing of cotton fabrics based on computer vision. The technical solution adopted is as follows:
[0004] An embodiment of the present invention provides a method for monitoring desizing of cotton fabric based on computer vision, the method comprising the following specific steps:
[0005] Acquire a reaction area image, where the reaction area image is an image of an area on the cotton fabric where a color reaction occurs after the iodine-containing solution is dropped;
[0006] Obtain the pulp content at each pixel according to the color of the pixel in the reaction area image;
[0007] Each pixel in the reaction area image is a central pixel, and the neighboring area of each pixel is obtained. According to the difference in pulp content between the central pixel and other pixels in the neighboring area, a possibility index characterizing the possibility that the central pixel is a block pulp pixel is calculated;
[0008] Based on the possibility index and position of each pixel in the reaction area image, a number of agglomerated slurries are obtained, and the agglomeration degree of each agglomerated slurry is calculated;
[0009] The desizing effect is monitored according to the agglomeration degree of each agglomerated pulp.
[0010] Furthermore, according to the difference in pulp content between the central pixel and other pixels in the adjacent area, the possibility index characterizing the possibility that the central pixel is a block pulp pixel is calculated, specifically:
[0011] The maximum value of the difference in pulp content between the central pixel and other pixels in the adjacent area is the possibility index of the central pixel.
[0012] Furthermore, according to the difference in pulp content between the central pixel and other pixels in the adjacent area, the possibility index characterizing the possibility that the central pixel is a block pulp pixel is calculated, specifically:
[0013] The pulp content difference is weighted according to the distance between the central pixel and other pixels in the adjacent area, and the maximum value of the weighted result is the possibility index of the central pixel.
[0014] Furthermore, the possibility index of the central pixel is corrected based on the pulp content of the central pixel to obtain a corrected possibility index.
[0015] Further, based on the possibility index and position of each pixel in the reaction area image, several agglomerated slurries are obtained, specifically:
[0016] Eliminate pixels whose corrected likelihood index is less than a preset index threshold;
[0017] Based on the possibility index and position of the remaining pixels, the remaining pixels are grouped, and the pixels in each group form a block pulp.
[0018] Furthermore, the agglomeration degree of the corresponding agglomerated slurry is calculated according to the possibility index of the pixels in each group.
[0019] Furthermore, the desizing effect is monitored according to the agglomeration degree of each agglomerated pulp, specifically:
[0020] The desizing uniformity is calculated based on the distance between any two agglomerated pulps and the probability of occurrence of the difference in agglomeration degree;
[0021] The desizing effect is monitored based on the desizing uniformity.
[0022] Furthermore, the acquisition of the reaction area image is specifically as follows:
[0023] The cotton fabric images before and after the iodine-containing solution is dropped are obtained, and the reaction area image is obtained according to the color change of the pixels at the same position in the two cotton fabric images.
[0024] The embodiments of the present invention have at least the following beneficial effects: the present invention calculates a possibility index characterizing the possibility of each pixel being a block pulp pixel based on the difference in pulp content between each pixel and other pixels in its adjacent area; obtains a number of block pulps based on the possibility index and position of each pixel in the reaction area image, and calculates the block degree of each block pulp; monitors the desizing effect based on the block degree of each block pulp, specifically, monitors whether the cotton fabric is uniformly desized. The present invention can accurately monitor the desizing effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0026] Figure 1 The figure is a flowchart of the steps of an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, characteristics and effects of a cotton fabric desizing treatment monitoring method based on computer vision proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures, or characteristics in one or more embodiments may be combined in any suitable form.
[0028] 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.
[0029] The present invention is described by taking the following application scenario as an example:
[0030] The application scenario is: after the desizing process is completed, the desizing is monitored by iodine solution. Since this solution is aimed at judging the uniformity of the desizing effect in the area of the cloth surface where a color reaction occurs after each drop of iodine-containing solution, the volume of the droplet can be appropriately increased, otherwise the droplet is too small and there is no need to monitor it.
[0031] The specific scheme of the cotton fabric desizing monitoring method based on computer vision provided by the present invention is described in detail below with reference to the accompanying drawings.
[0032] See also Figure 1 , which shows a flowchart of a method for monitoring desizing of cotton fabric based on computer vision according to an embodiment of the present invention, the method comprising the following steps:
[0033] Acquire a reaction area image, where the reaction area image is an image of an area on the cotton fabric where a color reaction occurs after the iodine-containing solution is dropped;
[0034] Obtain the pulp content at each pixel according to the color of the pixel in the reaction area image;
[0035] Each pixel in the reaction area image is a central pixel, and the neighboring area of each pixel is obtained. According to the difference in pulp content between the central pixel and other pixels in the neighboring area, a possibility index characterizing the possibility that the central pixel is a block pulp pixel is calculated;
[0036] Based on the possibility index and position of each pixel in the reaction area image, a number of agglomerated slurries are obtained, and the agglomeration degree of each agglomerated slurry is calculated;
[0037] The desizing effect is monitored according to the agglomeration degree of each agglomerated pulp.
[0038] The following is an example of cotton fabric images obtained before and after the iodine solution is dropped to explain the above content in detail:
[0039] (1) Obtaining a reaction area image, wherein the reaction area image is an image of the area on the cotton fabric where a color reaction occurs after the iodine-containing solution is dropped.
[0040] The cotton fabric images before and after the iodine-containing solution is dropped are obtained, and the reaction area images are obtained according to the color changes of the pixels at the same position in the two cotton fabric images. Specifically:
[0041] On the cotton fabric surface of paving, the iodine-containing solution is quantitatively dripped by the mechanical arm in a randomly distributed manner, and the cotton fabric is imaged after the iodine-containing solution drips at intervals of a preset time. In the embodiment, the preset time is 20 seconds, and the implementer can adjust the size of the preset time according to the specific implementation scene; that is, after the iodine-containing solution drips, the image is collected by a camera placed just above the cloth, and the camera can be fixed or mobile. Since the dripping position of each iodine-containing solution on the cloth surface is known (the mechanical arm moving position is known), the image corresponding to the dripping point of the tracking type can be obtained from the collected image. Specifically, the known dripping point is used to collect the image of the cotton fabric before and after the iodine-containing solution drips. Based on the position of the dripping point, an image of a preset size is intercepted in the collected image to obtain the cotton fabric image before and after the iodine-containing solution drips. Preferably, the size of the image of the preset size intercepted in the embodiment is 100*100. The two cotton fabric images obtained before and after the iodine-containing solution is dropped are transferred to the LAB color space, and it is determined whether the colors of the same pixel in the two images are the same. Then, the pixels whose colors have changed are screened out, the coordinate information of the pixels whose colors have changed is obtained, and a mask is generated. The mask is multiplied by the cotton fabric image obtained after the iodine-containing solution is dropped to obtain a reaction area image.
[0042] (2) Obtain the pulp content at each pixel based on the color of the pixel in the reaction area image.
[0043] In one implementation, a neural network for predicting pulp content may be trained, and the trained neural network may be used to process the reaction area image to obtain the pulp content at each pixel in the reaction area image.
[0044] In another embodiment, an iodine-containing solution is dripped onto cotton fabrics with different pulp contents, and a plurality of standard reaction area images are obtained to form a comparison library; wherein the amount of each dripped iodine-containing solution is the same, and the pulp content at each pixel in each standard reaction area image is known and may be unequal. For each pixel in the reaction area image actually obtained, the color at the pixel is compared with the color value of the pixel at the same position as the pixel in each standard reaction area image in the comparison library, and the pulp content corresponding to the corresponding pixel in the standard reaction area image when the color is closest is the pulp content at the pixel in the reaction area image.
[0045] At this point, the pulp content at each pixel in the reaction area image can be obtained.
[0046] (3) Each pixel in the reaction area image is a central pixel. The neighboring area of each pixel is obtained. According to the difference in pulp content between the central pixel and other pixels in the neighboring area, a possibility index characterizing the possibility that the central pixel is a block pulp pixel is calculated.
[0047] In one embodiment, based on the difference in pulp content between the central pixel and other pixels in the adjacent area, a possibility index characterizing the possibility that the central pixel is a block pulp pixel is calculated, specifically: the maximum value of the difference in pulp content between the central pixel and each other pixel in the adjacent area is the possibility index of the central pixel, that is, the maximum value of the absolute value of the difference in pulp content between the central pixel and each other pixel in the adjacent area is the possibility index of the central pixel.
[0048] In one implementation, based on the pulp content difference between the central pixel and other pixels in the adjacent area, a possibility index characterizing the possibility that the central pixel is a block pulp pixel is calculated, specifically: based on the distance between the central pixel and each other pixel in the adjacent area, the pulp content difference is weighted, and the maximum value of the weighted result is the possibility index of the central pixel; the smaller the distance, the greater the weight of the pulp content difference. An example of calculating a possibility index is given below:
[0049]
[0050] M is the possibility index of the central pixel. The larger the M value is, the more likely the central pixel is to be a block pulp pixel. jis the pulp content of the central pixel, hj′ is the pulp content of another pixel in the vicinity of the central pixel; (x, y) is the coordinate information of the central pixel, (x′, y′) is the coordinate information of another pixel in the vicinity of the central pixel; max means taking the maximum value; |hj-hj′| is the absolute value of the difference between the pulp content of the central pixel and another pixel in the vicinity of the central pixel (difference in pulp content). At the same distance, the larger the value of |hj-hj′| is, the greater the difference in pulp content is, the greater the possibility index should be, and the higher the possibility that the central pixel is a blocky pulp pixel. When the pulp content difference between the central pixel and multiple other pixels in the vicinity is the same, the pulp content difference corresponding to other pixels with a smaller distance from the central pixel should have a larger weight, because the closer the distance is, the greater the correlation between other pixels and the central pixel.
[0051] If the central pixel is located at the center of the block pulp, then the central pixel and other pixels in its adjacent areas may have a small difference in pulp content, but the central pixel itself has a very high pulp content. Therefore, the present invention also corrects the possibility index of the central pixel based on the pulp content of the central pixel to obtain a corrected possibility index. Specifically, the sum of the possibility index of the central pixel and the pulp content of the central pixel is the corrected possibility index.
[0052] At this point, the likelihood index of each pixel in the reaction area image can be obtained.
[0053] (4) Based on the possibility index and position of each pixel in the reaction area image, a number of agglomerated slurries are obtained, and the agglomeration degree of each agglomerated slurry is calculated.
[0054] Since the distribution of the slurry in the reaction area is not absolutely uniform, the agglomerated slurry in the reaction area is obtained, and the degree of agglomeration of each agglomerated slurry is calculated, and whether the distribution of the slurry is uniform is explained based on the degree of agglomeration.
[0055] Based on the possibility index and position of each pixel in the reaction area image, a number of agglomerated pulps are obtained, specifically: pixels whose corrected possibility index is less than a preset index threshold are eliminated, and pixels whose possibility index is less than the preset index threshold are pixels whose desizing effect meets the requirements. In the embodiment, the preset index threshold is 5; based on the possibility index and position of the remaining pixels, the remaining pixels are grouped, and the pixels in each group constitute a agglomerated pulp; preferably, the remaining pixels are clustered and grouped using a density clustering algorithm to obtain a number of agglomerated pulps.
[0056] The degree of agglomeration of the corresponding agglomerated pulp is calculated according to the possibility index of the pixels in each group. Specifically, the average value of the possibility index of the pixels in each group is the degree of agglomeration of the corresponding agglomerated pulp.
[0057] (5) Monitor the desizing effect according to the degree of agglomeration of each agglomerated pulp.
[0058] The desizing effect is monitored according to the degree of agglomeration of each agglomerated pulp, specifically: the desizing uniformity is calculated according to the distance between any two agglomerated pulps and the probability of occurrence of the difference in the degree of agglomeration; the desizing effect is monitored based on the desizing uniformity, specifically, the desizing uniformity is monitored.
[0059] As an example, the method for calculating the uniformity of desizing of cotton fabric in the reaction area is:
[0060]
[0061] jy is the uniformity of desizing of cotton fabric in the reaction area. The larger the jy value is, the more uniform the desizing is. Any two agglomerated pulps constitute an agglomerated pulp pair. After traversal, T agglomerated pulp pairs are obtained. jl t is the distance between the two agglomerated pulps in the t-th agglomerated pulp pair, preferably, the distance between the center points of the two agglomerated pulps, jl t The smaller the value, the higher the uniformity, and the larger the jy value, so for jl t Negative correlation mapping is performed through the negative correlation mapping function, and the negative correlation mapping function can make jl t The larger it is, the larger the value of jy will be; is the difference in the degree of agglomeration between the two agglomerate pulps in the tth agglomerate pulp pair, ch t The probability of occurrence can be obtained from ch t The number of occurrences is greater than the T value. The larger the value, the stronger the ch t The more times it appears, the more slurry blocks with similar blockiness are, which means that the desizing uniformity of the reaction area corresponding to the current reaction area image is higher; The larger the value of , the larger the value of jy.
[0062] The calculated desizing uniformity value is compared with the preset degree threshold to monitor the desizing effect. Specifically, when the desizing uniformity value is less than the preset degree threshold, it is considered that the desizing is uneven and the desizing effect is not good. In the embodiment, the preset degree threshold is -1. The implementer can also judge whether secondary desizing is required based on the pulp content of each agglomerated pulp. If the desizing is uniform, but the pulp content of the cotton fabric in the reaction area is high, it still does not meet the preset requirements and secondary desizing is required.
[0063] It should be noted that the sequence of the embodiments of the present invention described above is for description only and does not represent the advantages and disadvantages of the embodiments. The above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0064] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0065] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for monitoring desizing of cotton fabrics, characterized in that: The method includes: Acquire a reaction area image, where the reaction area image is an image of an area on the cotton fabric where a color reaction occurs after the iodine-containing solution is dropped; Obtain the pulp content at each pixel according to the color of the pixel in the reaction area image; Each pixel in the reaction area image is a central pixel, and the neighboring area of each pixel is obtained. According to the difference in pulp content between the central pixel and other pixels in the neighboring area, a possibility index characterizing the possibility that the central pixel is a block pulp pixel is calculated, specifically including: weighting the pulp content difference according to the distance between the central pixel and other pixels in the neighboring area, and the maximum value of the weighted result is the possibility index of the central pixel; Based on the possibility index and position of each pixel in the reaction area image, a number of agglomerated slurries are obtained, and the agglomeration degree of each agglomerated slurry is calculated; Monitor the desizing effect according to the agglomeration degree of each agglomerated pulp; The probability index of the center pixel is calculated as: M is the possibility index of the central pixel, hj is the pulp content of the central pixel, hj′ is the pulp content of another pixel in the vicinity of the central pixel; (x, y) is the coordinate information of the central pixel, (x′, y′) is the coordinate information of another pixel in the vicinity of the central pixel; max means taking the maximum value; The possibility index of the central pixel is corrected based on the pulp content of the central pixel to obtain a corrected possibility index; Based on the possibility index and position of each pixel in the reaction area image, several agglomerated slurries are obtained, specifically: Eliminate pixels whose corrected likelihood index is less than a preset index threshold; The remaining pixels are grouped based on the possibility index and position of the remaining pixels, and the pixels in each group form a block pulp; the average value of the possibility index of the pixels in each group is the block degree of the corresponding block pulp; The desizing effect is monitored according to the agglomeration degree of each agglomerated pulp, specifically: The desizing uniformity is calculated based on the distance between any two agglomerated pulps and the probability of occurrence of the difference in agglomeration degree; The calculation method for the uniformity of desizing of cotton fabrics in the reaction area is: Wherein, jy is the uniformity of desizing of cotton fabric in the reaction area, any two agglomerated pulps constitute an agglomerated pulp pair, and after traversal, T agglomerated pulp pairs are obtained, jl t is the distance between the two agglomerates in the t-th agglomerate pair, is the difference in the degree of agglomeration between the two agglomerate pulps in the tth agglomerate pulp pair, ch t The probability of occurrence, exp() represents an exponential function with a natural constant as the base; The desizing effect is monitored based on the desizing uniformity.
2. The method according to claim 1, characterized in that The acquisition of the reaction area image is specifically as follows: The cotton fabric images before and after the iodine-containing solution is dropped are obtained, and the reaction area image is obtained according to the color change of the pixels at the same position in the two cotton fabric images.
Citation Information
Patent Citations
Image processing method and device, equipment and storage medium
CN114092576A