High-precision Detection Method and Application of Key Points of Textiles Based on Ultraviolet Light
By applying different kinds of colorless fluorescent agents on textiles and using ultraviolet and RGBD information, the high-precision detection difficulties caused by textile key points deformation and occlusion are solved, and a high-quality data set suitable for deep learning is generated.
Patent Information
- Application Number
- CN202310617337.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-29
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2043-05-29
AI Technical Summary
In the prior art, the deformation and occlusion of key points of textile fabrics lead to large workloads and poor accuracy of manual labeling, making it difficult to achieve high-precision key point detection and data set acquisition.
UV-based method is adopted, different types of colorless fluorescent agents are used to emit different colors of light under the ultraviolet lamp. Combined with RGB and RGBD information, the location and shape of key points are extracted through the color extraction method, and a deep learning training data set is generated.
It realizes high-precision and fast textile key point detection, reduces manual workload, and generates high-quality data sets for deep learning training to adapt to textile deformation and occlusion.
Smart Images

Figure CN116862835B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of key point detection, and particularly relates to a high-precision detection method for key points of textile based on ultraviolet rays and its application. Background Art
[0002] Textiles are everywhere in our lives. Daily tasks include identifying and operating on key points of textiles, and in scientific research, it includes obtaining datasets of key points of textiles, etc. The commonly used method for obtaining key points is to take images of objects and then manually draw and label the key areas after shooting. However, due to the high deformability and easy occlusion of textiles, the key points of textiles are deformed and occluded, resulting in a huge workload for manual annotation and extremely poor annotation accuracy, and the shape and position information of the key points cannot be accurately depicted. Summary of the Invention
[0003] In view of the above problems, the present invention provides a high-precision detection method for key points of textile based on ultraviolet rays, which can realize rapid, convenient and high-precision detection and annotation of key points of highly deformable textiles, and can be used for obtaining textile datasets for deep learning and identifying and displaying key points.
[0004] The purpose of the present invention is achieved through the following technical solutions: A high-precision detection method for key points of textile based on ultraviolet rays, comprising the following steps:
[0005] Step S1, prepare the target textile;
[0006] Step S2, confirm the positions and areas of the key points of the textile, as well as the types of the key points, and apply different types of colorless fluorescent agents to the key point areas and key point positions of different types. Different types of colorless fluorescent agents emit different colors of light under ultraviolet lamps. After application, wait for the fluorescent agent to dry, and there is no visible mark at the key points under visible light after drying;
[0007] Step S3, prepare an ultraviolet lamp and a camera above the textile;
[0008] Step S4, operate on the textile and place the textile in any shape;
[0009] Step S5, turn on the ultraviolet lamp. The areas of the textile coated with fluorescent agent emit different colors of light according to the types of the coated fluorescent agents, and other areas of the textile are invisible under ultraviolet light. Use the camera to record the RGB information Image uv ;
[0010] Step S6, according to the image information Image obtained under ultraviolet light above uv , use a color extraction method to extract the key point labels, and obtain the positions and shapes of the key points through the labels.
[0011] Furthermore, the specific implementation method for extracting the shape and position of key points using the color extraction method is as follows;
[0012] Convert the image information Image under ultraviolet light uv from RGB format to HSV format Image uv-hsv , with a size of 256*256*3;
[0013] Iteratively traverse each pixel of the 256*256 of Image uv-hsv , set A hsv-lower as the lower color limit, A hsv-upper as the upper color limit, set the value of each pixel within the lower and upper color limits to [1,0,0], and set the value of each pixel outside the range to [0,0,0]. After the traversal is completed, take the first dimension of each pixel to obtain an image matrix of 256*256*1, and name it Lable to represent the key point label of the textile. A value of 1 in the matrix indicates that the pixel is a key point of the textile, and a value of 0 indicates that the pixel is not a key point of the textile.
[0014] Furthermore, randomly measure the average value of several pixels that show color under ultraviolet light on Image uv , denoted as A = [x r ,y r ,z r , convert the value of A to the value A hsv in the HSV space, set the lower color limit A hsv-lower = [A hsv [0]-15,100,100], and the upper color limit A hsv-upper = [A hsv [0]+15,255,255].
[0015] Furthermore, it also includes taking pictures of the current state of the textile using a camera under visible light sources, recording the RGBD image information Image sun , with an image size of 256*256*4. Each pixel in the image represents the RGBD value of the current image. Combine the key point label and Image sun to form textile data as the training data for deep learning.
[0016] Furthermore, in step S2, two types of key points are defined, including one side edge of the textile and two corners of the textile. One side edge of the textile is a rectangular area, and the two corners of the textile are two small square areas.
[0017] Furthermore, randomly measure Image uvThe average value of at least 10 pixel points that are visible under ultraviolet light.
[0018] The present invention also provides an application of the above-mentioned high-precision detection method for key points of textiles based on ultraviolet light in textile manipulation, including calculating the midpoint of the pixel positions with a value of 1 in the matrix, and recording the coordinates of the midpoint in the image as P camera , multiply P camera by the transformation matrix from the camera coordinate system to the robot coordinate system to obtain the working point in the robot coordinate system The robot manipulates the textile according to the received coordinate position P robot for textile manipulation operations.
[0019] Compared with the prior art, the beneficial effects of the present invention are:
[0020] 1. It can conveniently and quickly obtain the positions and shapes of the key points of highly deformed textiles, greatly reducing the manual workload and time consumption;
[0021] 2. It can record the positions of key points of any shape with high precision, and at the same time, the deformation of the textile does not affect the accurate acquisition of the positions and shapes of the key points;
[0022] 3. It can identify multiple different key points of the textile, and the deformation of the textile does not affect the acquisition of multiple key points;
[0023] 4. It can be used to generate the data sets required by models such as deep learning. The generated data sets include the RGB and RGBD information of the object images under visible light, as well as the position and shape labels of the key points generated by ultraviolet light, and can be input into the training of deep learning. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 is a schematic flow chart for obtaining a textile data set in the present invention:
[0025] Figure 2 is a schematic diagram for generating color extraction labels in an embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0026] In order to more clearly understand the above-mentioned objects, features and advantages of the present invention, the present invention will be further described in detail below with reference to the drawings and specific embodiments. It should be noted that, without conflict, the embodiments of the present application and the features in the embodiments can be combined with each other.
[0027] In the following description, many specific details are set forth in order to fully understand the present invention. However, the present invention can also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited by the specific embodiments disclosed below.
[0028] In the description of the present invention, the term "key point" can represent a point or a region of any shape.
[0029] In the description of the present invention, the term "high precision" means that the recognition of key points of the textile can reach the pixel-level precision of the camera.
[0030] Embodiment 1
[0031] As shown in the attached Figure 1 It shows the application of the high-precision detection method for key points of textiles based on ultraviolet rays in the acquisition of textile data sets in deep learning, including the following steps:
[0032] Step S1: Prepare the target textile for which the data set needs to be collected, which can be any textile flexible object;
[0033] Step S2: Customize the types, positions and corresponding regions of the key points of the textile. As Figure 2 shown, two types of key points are defined, including one side edge of the textile and two corners of the textile. One side edge of the textile is a rectangular area, and the two corners of the textile are two small square areas. Different types of colorless fluorescent agents are applied to these two different types of key point regions. Different types of colorless fluorescent agents can emit different colors of light under ultraviolet light. Red fluorescent agent is applied to the textile corners, and blue fluorescent agent is applied to one side edge of the textile. After application, wait for the fluorescent agent to dry. After drying, there is no visible mark on the key points under visible light;
[0034] Step S3: Prepare an ultraviolet lamp and a visible light source above the textile, and place a camera to record image information;
[0035] Step S4: Operate on the textile on the desktop and place it in any shape required. The textile can be deformed arbitrarily;
[0036] Step S5: Under the visible light source, use the camera to take a picture of the current state of the textile and record the RGBD image information Image sun , the image size is 256*256*4, and each pixel point in the image represents the RGBD value of the current image, and there is no mark of any key point in the image;
[0037] Step S6: Turn off all visible light sources and turn on the ultraviolet lamp at the same time. The areas of the textile coated with fluorescent agent emit different colors of light according to the types of fluorescent agent applied. The two corners emit red light, and one side edge emits blue light, and the other areas of the textile are invisible under ultraviolet light. Record the RGB information Image uv at this state, the image size is 256*256*3. Then turn off the ultraviolet lamp and turn on the visible light source;
[0038] Step S7: Randomly measure Image uv The average value of the top 10 red pixels is denoted as A = [x r , y r , z r , and the average value of the 10 blue pixels is denoted as B = [x b , y b , z b . Convert the values of A and B to the values A hsv and B hsv in the HSV color space respectively. Set the upper and lower limits of red and blue in the HSV color space, namely the lower limit of red A hsv-lower = [A hsv [0] - 15, 100, 100], the upper limit of red A hsv-upper = [A hsv [0] + 15, 255, 255], the lower limit of blue B hsv-lower = [B hsv [0] - 15, 100, 100], the upper limit of blue B hsv-upper = [B hsv [0] + 15, 255, 255]. After obtaining the above values, no further updates are made;
[0039] Step S8: According to the image information Image uv under ultraviolet light and the color upper and lower limits obtained above, extract the shape and position of the key points;
[0040] Step S8.1: Convert the image information Image uv under ultraviolet light from the RGB format to the HSV format Image uv-hsv , with a size of 256 * 256 * 3;
[0041] Step S8.2: Iteratively traverse each pixel of the 256 * 256 of Image uv-hsv , with A hsv-lower as the color lower limit and A hsv-upper as the upper limit. Set the value of each pixel within the range to [1, 0, 0], and the value of each pixel outside the range to [0, 0, 0]. After the traversal is completed, take the first dimension of each pixel to obtain an image matrix of 256 * 256 * 1, and name it Lable1 to represent the two corners of the textile. The value of 1 in the matrix Lable1 indicates that the point is the two corners of the textile, and the value of 0 indicates that it is not the two corners of the textile;
[0042] Step S8.3: Iteratively traverse each pixel of the 256 * 256 of Image uv-hsv , with B hsv-lower as the color lower limit and B hsv-upperTake it as the upper limit. The value of each pixel point within the range is set to [1, 0, 0], and the value of each pixel point outside the range is set to [0, 0, 0]. After the traversal is completed, the first dimension of each pixel point is taken to obtain an image matrix of 256 * 256 * 1, which is named Lable2 to represent one side edge of the textile. The value of 1 in the matrix Lable2 indicates that the point is one side edge of the textile, and the value of 0 indicates the non-textile side edge;
[0043] Step S8.4: Combine Lable1, Lable2 and the textile information Image under the visible light source sun , to form a set of textile data;
[0044] Step S9: Repeat the above steps S4 - S8 until a sufficient data set is generated.
[0045] Step S10: This data set can be used to train a deep learning model to identify key points of textiles of any shape. During the training process, this data set can be used to train the model using RGB or RGBD or Depth images. The labels in the data set are Lable1 and Lable2 of each image.
[0046] Example 2
[0047] This implementation case demonstrates the application of the high-precision key point detection method for textiles based on ultraviolet rays in textile recognition and manipulation, including the following steps:
[0048] Step S1: Prepare the target textile to be manipulated, which can be any textile flexible object;
[0049] Step S2: Confirm the types of key points of the textile, and the corresponding positions and regions. Then apply different types of colorless fluorescent agents to the key point regions of different types. Different types of colorless fluorescent agents can emit different colors of light under ultraviolet lamps. After application, wait for the fluorescent agent to dry. There is no any mark on the key points under visible light after drying;
[0050] Step S3: Prepare a visible light source, an ultraviolet lamp, a camera around the textile, and at the same time prepare the equipment for manipulating the textile. The equipment can be a robot;
[0051] Step S4: Measure the average HSV values A hsv , B hsv , C hsv of each different fluorescent agent under ultraviolet light, and manually set the upper and lower limits A hsv-upper , A hsv-lower , B hsv-upper , B hsv-lower , C hsv-upper , C hsv-lower ;
[0052] Step S5: When the fabric needs to be processed, turn on the ultraviolet lamp and turn off the visible light source. Different colors of fluorescence are emitted from each key point of the fabric, and the camera records the current image Image uv , with a size of 256*256*3;
[0053] Step S6: Perform image processing on the currently recorded image under the ultraviolet light source, converting from RGB to HSV Image uv-hsv ;
[0054] Step S7: Iteratively traverse each pixel of the 256*256 of Image uv-hsv , with A hsv-lower as the lower color limit and A hsv-upper as the upper limit. The value of each pixel within the range is set to [1,0,0], and the value of each pixel outside the range is set to [0,0,0]. After the traversal is completed, take the first dimension of each pixel to obtain an image matrix of 256*256*1, calculate the midpoint of the pixel positions with a value of 1 in the matrix, and record the coordinates of this midpoint in the image as P camera .
[0055] Step S8: Multiply P camera by the transformation matrix from the camera coordinate system to the robot coordinate system to obtain the operation point in the robot coordinate system
[0056] Step S9: The robot performs operations according to the received coordinate position P robot ;
[0057] Step S10: Execute steps S5 - S9 for other key points as needed.
[0058] The above - described embodiments only represent the specific implementation manners of the present invention. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the patent of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several deformations and improvements can still be made, and these all belong to the protection scope of the present invention.
Claims
1. A high-precision detection method for key points of textiles based on ultraviolet light, characterized in that, Including the following steps: Step S1: Prepare the target textile fabric; Step S2: Confirm the positions and areas of the key points on the textile fabric, as well as the types of the key points, and apply different types of colorless fluorescent agents to the key point areas and positions of different types. Different types of colorless fluorescent agents emit different colors of light under ultraviolet light. After application, wait for the fluorescent agent to dry. After drying, there is no visible mark on the key points under visible light; Step S3: Prepare an ultraviolet lamp and a camera above the textile fabric; Step S4: Operate on the textile fabric and place the textile fabric in any shape; Step S5: Turn on the ultraviolet lamp. The area of the fabric coated with the fluorescent agent emits light of different colors according to the type of the coated fluorescent agent, and other areas of the fabric are invisible under ultraviolet light. Use a camera to record the RGB information in this state ; Step S6, according to the image information under ultraviolet light obtained above , extract the key point labels using the color extraction method, and obtain the positions and shapes of the key points through these labels; The specific implementation method for extracting the shapes and positions of the key points by using the color extraction method is as follows; The image information under ultraviolet light is converted from RGB format to HSV format , with a size of 256*256*3; Iterative pair Traverse each pixel of 256*256 of as the lower color limit, as the upper color limit, set the value of each pixel within the range of the lower and upper color limits to [1,0,0], and set the value of each pixel outside the range to [0,0,0]. After the traversal, take the first dimension of each pixel to obtain a 256*256*1 image matrix, and name it Represents the key point label of the textile. The value of 1 in the matrix indicates that the pixel is a key point of the textile, and the value of 0 indicates that the pixel is not a key point of the textile.
2. The high-precision detection method for key points of textiles based on ultraviolet rays according to claim 1, wherein: Random measurement The average value of several pixel points that are visible under ultraviolet light is denoted as A = , , , and the value of A is converted to the HSV space . Set the lower color limit = [0] - 15, 100, 100], and the upper color limit = [0] + 15, 255, 255].
3. The high-precision detection method for key points of textiles based on ultraviolet rays according to claim 1, wherein: It also includes taking pictures of the current textile under a visible light source using a camera and recording the RGBD image information , the image size is 256*256*4, and each pixel point in the image represents the RGBD value of the current image. Combine the key point labels and to form textile data as the training data for deep learning.
4. The high-precision detection method for key points of textiles based on ultraviolet rays according to claim 1, wherein: Define two types of key points in Step S2, including one side edge of the textile fabric and two corners of the textile fabric. One side edge of the textile fabric is a rectangular area, and the two corners of the textile fabric are two small square areas.
5. The high-precision detection method for key points of textile based on ultraviolet rays according to claim 2, wherein: Random measurement The average value of at least 10 pixel points that are visible under ultraviolet light.
6. Application of the high-precision detection method for key points of textiles based on ultraviolet rays in textile manipulation, characterized in that: It also includes calculating the midpoint of the pixel positions with a value of 1 in the matrix and recording the coordinates of this midpoint in the image as , multiplying by the transformation matrix from the camera coordinate system to the robot coordinate system , obtaining the working point in the robot coordinate system , and the robot performs a manipulation operation on the textile according to the received coordinate position .
Citation Information
Patent Citations
System and method for defect detection
CN115398214A