Method for highlighting texture features based on multi-focus images
By employing a multi-layer focusing image processing method, the high subjectivity of texture feature preprocessing in textile fiber detection is addressed, providing a strong feature image foundation and improving the accuracy and efficiency of detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING UNITED VISION TECH
- Filing Date
- 2026-01-22
- Publication Date
- 2026-05-08
AI Technical Summary
In current textile fiber testing, manual microscopic examination or semi-automatic image analysis is highly subjective and lacks automated, objective, and efficient texture feature preprocessing methods, which affects the accuracy and representativeness of the test results.
A multi-layer focusing image processing method is adopted. By acquiring multi-layer focusing sequence images of fiber segments, sharpness and difference maps are calculated to obtain texture enhancement maps, suppress non-feature interference content, and provide a strong feature image basis.
Significant enhancement of texture features was achieved, improving the determinism and robustness of detection, reducing dependence on control, and increasing detection efficiency.
Smart Images

Figure CN121998841A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of textile fiber microscopic image texture feature enhancement technology, specifically involving a method for highlighting texture features based on multi-focus images. Background Technology
[0002] Fiber content testing is a routine item in textile testing. Textiles made from natural fibers (animal fibers and plant fibers) account for a large proportion of this. The testing of these products is usually carried out by manual microscopic examination or semi-automatic image analysis, which mainly relies on the testing engineer's ability to classify and identify microscopically magnified fiber fragment images, and has a high degree of subjectivity.
[0003] In recent years, with the continuous development of digital image processing and artificial intelligence technologies, the inspection industry has increasingly looked forward to automated objective inspection, and machine vision-based inspection is one of the most promising methods. Vision-based (image) inspection typically includes: image acquisition → preprocessing → extraction → recognition → measurement → statistical analysis of results. Each step before the result has factors that can affect the accuracy and representativeness of the result. Therefore, a preprocessing method with good texture highlighting, high determinism, high efficiency, and robustness is particularly needed. Summary of the Invention
[0004] The purpose of this invention is to provide a method for highlighting texture features based on multi-focus images. This method highlights the surface texture features of fibers in an image based on multi-focus images, providing images with significant features for subsequent identification work. It can be used in the image preprocessing stage of a qualitative and quantitative analysis system for fiber components.
[0005] This invention provides a method for highlighting texture features based on multi-focus images, comprising the following steps: Step 1: Acquire multi-layer focused sequence images of fiber segments; Step 2: Accumulate the pixels at corresponding positions in the acquired multi-layer focused sequence images and then average them to obtain the average image; Step 3: Calculate the sharpness of each image layer; Step 4: Calculate the sum of the sharpness of each multi-layer image interval and find the optimal multi-layer image interval with the largest value; Step 5: Subtract the corresponding pixel from the average image in each layer of the multi-layer image interval and take the absolute value to obtain the difference image sequence of each image with respect to the average image; Step 6: Sum and normalize all the difference maps to obtain the final texture enhancement map.
[0006] Further, step 1 includes: Use an image system with an electronically controlled automatic stage to control the Z-axis focusing motor, and collect multi-layer focused sequence images {M1, M2, … M n} within a focusing travel range of 200 - 400 um. The spacing between the collected layers is maintained at 5 - 10 um, including the aggregation states of several sequential sections of blurred - clear - blurred.
[0007] Furthermore, the clarity described in step 3 is obtained by calculating the sum of pixel gradients.
[0008] Furthermore, subtracting the pixels at the corresponding positions of each layer image in the multi-layer image interval described in step 5 from the average image and taking the absolute value includes: setting a sensitivity threshold as a control parameter, setting the value of this pixel less than the threshold to zero, so as to control whether the weak difference is removed as interference.
[0009] Compared with the prior art, the beneficial effects of the present invention are: 1) The texture highlighting effect is good, similar to the electron microscope imaging effect. For the light and sparsely distributed texture features, they are enhanced through the accumulation of multi-layer images, the slow-changing content that is not a feature is suppressed, and the interference content that is not position-preserved is suppressed. It provides a strong feature map basis for the subsequent extraction or recognition based on these highlighted texture features.
[0010] 2) The algorithm has good determinacy: It will not cause texture changes due to different focusing situations like conventional single-layer images, thus affecting subsequent recognition.
[0011] 3) The main process of the algorithm is all matrix addition operations, which is very efficient.
[0012] 4) The algorithm has good robustness: It has a large adaptability range for the illumination of the acquired images, and has low requirements for the illumination uniformity within a single field of view. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 It is a flowchart of the method for highlighting texture features based on multi-focus images of the present invention; Figure 2 It is a texture enhancement diagram in an embodiment of the present invention; Figure 3 It is a focused sequence diagram in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0014] The present invention will be described in detail below in conjunction with the embodiments shown in the drawings. However, it should be noted that these embodiments are not limitations on the present invention. Any equivalent transformation or substitution in terms of function, method, or structure made by those of ordinary skill in the art based on these embodiments shall fall within the protection scope of the present invention.
[0015] Refer Figures 1 to 3As shown, this embodiment provides a method for highlighting texture features based on multi-focus images, including the following steps: Step S1: Acquire multi-layer focused sequence images of fiber fragments. In this embodiment, an imaging system equipped with an electrically controlled automatic stage is used to control the Z-axis focusing motor to acquire multi-layer focused sequence images {M1, M2, ... M} within a relatively small focusing stroke range (e.g., 200~400um). n The interlayer spacing should be kept very small (e.g., 5-10µm), and should contain the aggregation state of several sequential segments: fuzzy-clear-fuzzy.
[0016] Step S2: Accumulate the corresponding pixels of the acquired multi-layer focused sequence images and then average them to obtain the average image M. av .
[0017] Step S3: Calculate the sharpness (sum of pixel gradients) of each image layer.
[0018] Step S4: Calculate the sum of the sharpness of each multi-layer image interval (a layer interval consists of k consecutively acquired images, with the number of layers k serving as a control parameter), and find the optimal multi-layer image interval with the largest value.
[0019] Step S5: Subtract the corresponding pixel value from the average image in each layer image within the multi-layer image interval and take the absolute value (here, a sensitivity threshold is set as a control parameter—the value of the pixel below the threshold is set to zero, thereby controlling whether weak differences are removed as interference), to obtain the difference map sequence {M} of each image to the average image. dif1 M dif2 M difn}
[0020] Step 6: Sum and normalize all difference maps to obtain the final texture enhancement map M. enh .
[0021] The algorithm of this invention has the following technical effects: 1) Excellent texture enhancement, similar to electron microscopy imaging. Faint and sparsely distributed texture features are enhanced through the accumulation of multiple layers, while non-feature-dependent, slowly varying content and non-localized interference are suppressed. This provides a strong feature map foundation for subsequent extraction or recognition based on these enhanced texture features.
[0022] 2) The algorithm has good determinism: unlike conventional single-layer images, the texture will not change due to different focusing conditions, thus affecting subsequent recognition.
[0023] 3) The main process of the algorithm consists entirely of matrix addition operations, which is very efficient.
[0024] 4) The algorithm has good robustness: it has a wide range of adaptability to the illumination of the image and does not have high requirements for the uniformity of illumination within a single field of view.
[0025] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, it is intended that all variations falling within the meaning and scope of equivalents of the claims be included within the present invention.
Claims
1. A method for highlighting texture features based on multi-focus images, characterized in that, Includes the following steps: Step 1: Acquire multi-layer focused sequence images of fiber segments; Step 2: Accumulate the pixels at corresponding positions in the acquired multi-layer focused sequence images and then average them to obtain the average image; Step 3: Calculate the sharpness of each image layer; Step 4: Calculate the sum of the sharpness of each multi-layer image interval and find the optimal multi-layer image interval with the largest value; Step 5: Subtract the corresponding pixel from the average image in each layer of the multi-layer image interval and take the absolute value to obtain the difference image sequence of each image with respect to the average image; Step 6: Sum and normalize all the difference maps to obtain the final texture enhancement map.
2. The method for highlighting texture features based on multi-focus images according to claim 1, characterized in that, Step 1 includes: An imaging system equipped with an electrically controlled automatic stage is used to control the Z-axis focusing motor to acquire multi-layer focusing sequence images {M1, M2, ... M} within a focusing stroke range of 200~400µm. n The layer spacing is maintained at 5-10µm, and the aggregation state includes several sequential segments of blurred-clear-blurred.
3. The method for highlighting texture features based on multi-focus images according to claim 1, characterized in that, The sharpness mentioned in step 3 is obtained by calculating the sum of pixel gradients.
4. The method for highlighting texture features based on multi-focus images according to claim 1, characterized in that, Step 5, which involves subtracting the average pixel value from the corresponding position of the multi-layer image within the multi-layer image interval and taking the absolute value, includes setting a sensitive threshold as a control parameter and setting the value of the pixel that is less than the threshold to zero, thereby controlling whether weak differences are removed as interference.