CN-121982053-A - Cross fiber image processing method
Abstract
The invention discloses a crossed fiber image processing method, which comprises the steps of extracting a center shaft, identifying an intersection point and an inner circle point, marking the outer circle point, enabling a fiber center shaft to be broken and segmented from the intersection point by taking the intersection point and the inner circle point as the background, rapidly and accurately distinguishing a small bifurcation section from a center shaft main body section by combining the length with the number of the outer circle points, removing the small bifurcation section without damaging the connectivity of the center shaft main body, and being applicable to removing complex small bifurcation, such as nested bifurcation of a tree structure, and when the intersection point is re-identified after fiber follow-up, the real intersection point can be better identified to break fibers due to the influence of the small bifurcation, thereby reducing or even avoiding the situation that the fiber center shaft is broken by the false intersection point to cause the loss of fibers.
Inventors
- Request for anonymity
Assignees
- 广东工业大学
- 贾潇宇
Dates
- Publication Date
- 20260505
- Application Date
- 20260211
Claims (10)
- 1. A method of processing a cross-fiber image for cross-fiber image segmentation, comprising the steps of: 1) Preprocessing the acquired image to obtain a complete fiber binarization image, wherein the binarization image represents a target object, namely a fiber, in a foreground color, and the rest is represented in a background color; 2) Splitting the intersecting fibers, comprising: 2.1 Extracting a central axis to obtain a single-pixel wide fiber central axis image; 2.2 And executing the following operations on each connected domain on the fiber axis image one by one: 2.2.1 Searching for an intersection point, recording the intersection point and an inner circle point thereof, setting the intersection point and the inner circle point thereof as a background, enabling a central axis of the fiber to be broken and segmented at the intersection point, and marking the outer circle point of the intersection point; 2.2.2 Counting sub-connected domains of the segmented medial axis image, and setting the sub-connected domains with the length aaa < threshold value and the number ccc=1 of outer circle points as a background; 2.2.3 Restoring the inner circle point in the image processed by the step 2.2.2 to be a prospect; 2.2.4 Then restoring the intersection point in the image to the foreground; 2.2.5 And searching the crossing point again, setting pixels in the 5 multiplied by 5 field of the crossing point as a background, and breaking the central axis of the fiber in the image from the re-identified bifurcation point to finish the cross fiber image segmentation.
- 2. The method for processing the cross fiber image according to claim 1, wherein the method further comprises the step of removing single-pixel short branches after the crossing point is restored in the step 2.2.4, and the step of repeating the step 2.2.1-2.2.4 is inserted between the step 2.2.4 and the step 2.2.5 until the number of sub-connected domains identified in the two steps is not changed any more.
- 3. The method for processing the cross fiber image according to claim 2, wherein the removing of the single-pixel short branches is achieved by a template method, the single-pixel short branches are matched with each pixel point on the medial axis image through a 3×3 domain template, if matching is successful, a center point is deleted, namely, the center point is set as a background, and the set abnormal mode template comprises: From top to bottom, from left to right, the pixel values in the template are respectively corresponding to numbers arranged from left to right, and then: 000 010 211;000 010 112;200 110 100;002 011 001;112 010 000; 211 010 000;001 011 002;100 110 200;000 011 212;000 110 212; 200 110 210;002 011 012;212 110 000;212 011 000;012 011 002; 210 110 200; Where "1" indicates a foreground point, "0" indicates a background point, and "2" indicates either a foreground point or a background point.
- 4. The method for processing the cross fiber image according to claim 3, wherein after the inner circle point is restored in the step 2.2.3, the center axis noise removing operation is performed, the step 2.1 further comprises the step of removing the center axis noise, the step 2.2.1 further comprises the step of preprocessing the non-single-pixel wide fiber center axis image before searching the cross point, the step is realized by a template method, the step is realized by matching each pixel point on the center axis image through a3×3 domain template, if the matching is successful, the center point is deleted, and then the center point is set as a background, and the set template comprises: From top to bottom, from left to right, the pixel values in the template are respectively corresponding to numbers arranged from left to right, and then: 222 112 112;222 211 211;112 112 222;211 211 222;000 011 212;000 110 212;200 110 210;002 011 012;212 110 000;212 011 000;012 011 002;210 110 200; Where "1" indicates a foreground point, "0" indicates a background point, and "2" indicates either a foreground point or a background point.
- 5. The method for processing a cross-fiber image according to any one of claims 1 to 4, characterized in that it comprises counting the length of the connected domain and the number of its outer circumferential points and removing short branches by: Recording the intersection outer circle points on the image ddd in step 2.2.1, and setting the pixel values of these points to the first set value; Step 2.2.2, counting the number of sub-connected domains while counting the sub-connected domains of the segmented medial axis image, and generating a sub-connected domain counting image eee; then adding pixel values corresponding to the image eee and the image ddd to obtain an image ggg; Traversing the image eee to obtain the length of each sub-connected domain in the image eee as aaa, traversing the image ggg, and counting the number of the outer circle points in each sub-connected domain as ccc according to the characteristic that the pixel value of the outer circle point is increased by the first set value as +2 compared with the pixel value of other points of the same sub-connected domain; then, in the image eee, the sub-connected domain of length aaa < threshold value and the number ccc=1 of outer-circle points is set as a background.
- 6. The method of processing cross-fiber images according to claim 1, wherein step 1) is implemented as follows: 1.1 Converting the acquired fiber image into a gray level image hhh, and then converting into a binarized image kkk; 1.2 In addition, converting the gray level image hhh through an edge detection algorithm to obtain an edge image; 1.3 Filling holes in the edge image, namely filling holes in the fiber; 1.4 Extracting a connected domain from the edge image after hole filling, and filtering out a non-fibrous object through the connected domain with the extraction area larger than a set threshold value; 1.5 And (3) fusing the binarized image kkk with the edge image processed in the step (1.4) to obtain a high-quality fiber binarized image.
- 7. The method for processing the cross fiber image according to claim 6, wherein in the step 1.3, edge sealing processing is performed on the edge image, namely, ends of the cross fiber and the four peripheries of the image are sealed, hole filling operation is performed, in the step 1.4, morphological operation is performed on the edge image after non-fiber objects are filtered, a Canny edge detection algorithm is selected as the edge detection algorithm, and in the step 1.5, hole filling operation is performed on the fused image.
- 8. The method of claim 7, wherein step 1.3 is implemented as follows: And traversing the periphery of the image, when the periphery of the image is changed from the foreground to the background and then from the background to the foreground, recording the number of background pixels traversed in the middle, setting the traversed periphery background pixels as the foreground if the number of the background pixels is smaller than the preset threshold value of the pixel width of the fiber diameter, then performing hole filling operation, recovering the traversed periphery pixels as the background after the operation is completed, and continuing traversing until all the periphery pixels of the image are traversed.
- 9. A method of cross-fiber image processing for removing small branches on the central axis of a fiber, comprising the steps of: the following operations are carried out on each connected domain in the single-pixel wide binarization fiber axis image after the axis extraction one by one: 1) Searching for an intersection point, recording the intersection point and an inner circle point thereof, setting the intersection point and the inner circle point thereof as a background, enabling a central axis of the fiber to be broken and segmented at the intersection point, and marking the outer circle point of the intersection point; 2) Counting sub-connected domains of the segmented medial axis image, and setting the sub-connected domains with the length aaa < threshold value and the number ccc=1 of outer circle points as a background; 3) Restoring the inner circle point in the image processed in the step 2) to be a foreground; 4) The intersection points in the image are then restored to the foreground.
- 10. The method according to claim 9, wherein the step 4) is performed after recovering the crossing point, and the method further comprises the step 5) of repeating the steps 1) to 4) until the number of sub-connected domains identified two times before and after is not changed.
Description
Cross fiber image processing method Technical Field The application relates to a cross fiber image processing method, in particular to a cross fiber image segmentation method and a method for removing small branches in a fiber center shaft in the process. Background With the progress of science and technology, the demands of people are increasing, the performance requirements on textiles are also increasing, and the birth of blend fibers is promoted. The size of the blend ratio plays a key role in the performance of the fabric, and therefore, the fiber content of the fabric is a measure for checking the quality of the textile product and is also a technical regulatory standard requirement in the international trade barrier. The method for identifying the blend fibers is different, 8 textile fiber identification test methods are specified according to the series of FZ/T01057 textile fiber identification standards, and the most common detection methods are a combustion method, a microscopic method and a dissolution method. The combustion method is to identify the fiber by observing the combustion condition of the fiber in flame, the odor emitted during combustion and the residual state, the dissolution method is to identify the fiber by utilizing the dissolution characteristics of different fibers under different chemical reagents, different temperatures and other conditions, and the microscopic method is to manually judge the fiber type and content calculation according to the longitudinal shape and the cross section shape characteristics of the fiber under an optical microscope and a projector. However, no matter which method is adopted for detection, manual intervention is required, so that certain problems exist in detection cost, detection method applicability, timeliness and result accuracy. With the popularity of computers and the rapid development of digital image processing technology, automatic detection methods and systems for textile materials have emerged. The method comprises the steps of carrying out sample preparation treatment on the fibers, namely cutting the fibers with fixed length (0.1-0.5 mm) after arranging and finishing the fibers, then uniformly dispersing the fibers by using liquid paraffin, carrying out microscopic imaging, and carrying out automatic identification on the components and/or the content of the fibers by the acquired fiber images through the technologies of computer image processing, pattern identification and the like, thereby replacing manual detection, improving the precision and efficiency of textile detection and identification, and reducing the labor intensity. Automatic identification of fiber composition, content generally includes determining fiber type, measuring fiber diameter, and fiber count. The fiber is subjected to fixed length treatment, so that the fiber volume can be obtained by knowing the fiber diameter, the fiber density can be obtained according to the fiber type, the quality of single fiber is obtained, and then the total quality of the fiber of the type can be obtained according to the number of the fibers, so that the content data of the fiber can be calculated, and the authenticity of the fiber components and the content data provided by merchants can be judged. Because of the limitations of the sample preparation process and the slender morphology of the fibers, fiber images acquired under a microscope usually have the condition of fiber crossing or adhesion, and whether the fiber diameter measurement or the fiber counting are performed on the fiber images, the fiber separation is required to be performed firstly to ensure the precision, namely the crossed or adhered fibers are separated. The shape information of the fibers is important for the separation of the fibers, which typically requires on-axis extraction for ease of description and extraction of the shape features of the fibers in the image. The central axis (Medial Axis) is a concept describing the core structure of the shape of an object, and refers to a center line or curve extracted from a binarized image, which can represent the topological features of the original shape of the image, and which has a single pixel width (not absolute in practice). The binarized image refers to an image which is acquired under a microscope and is processed by a computer, wherein only two pixel values are reserved, one pixel value is a foreground color and is used for representing a target, such as a fiber, is usually set to 0 and is displayed in black, the other pixel value is a background color and is used for representing a background, is usually set to 255 (sometimes also indicated by 1), is displayed in white, and the background and the foreground values are also exchangeable according to algorithm design. The existing fiber separation method is generally based on a slope segmentation algorithm, namely, the center axis of the fiber is firstly broken by the intersection point according to the