Abstract
INTRODUCTION
Traditional fiber component analysis combining Herzberg and Graff “C” staining methods achieves high accuracy but relies on manual fiber length measurement using an ImageJ software, making it cumbersome and subjective. This study developed a MATLAB-based image preprocessing approach utilizing HSV color space transformation and color threshold segmentation to achieve precise extraction of different fibers from stained microscopic images. Experiments employed four two-component and two three-component mixed slurry samples to compare accuracy and efficiency against the ImageJ method. Optimal color rendering was attained with saturation and lightness gain factors of 1.5 and 1.1 after Herzberg staining and 2.0 and 1.1 after Graff “C” staining. The new method matched ImageJ’s accuracy while significantly improving processing efficiency. Applied to commercial cigarette paper, it accurately identified fiber components, consistent with raw material data. Integrating staining techniques with image recognition maintains analytical precision while substantially boosting detection speed. This approach provides an efficient high-throughput solution for cigarette paper fiber analysis with clear industrial application potential.
Download PDF
Full Article
Image Recognition of Dyed Fibers and Component Analysis of Cigarette Paper Based on Hue, Saturation, and Value (HSV) Threshold Segmentation
Jinsheng Rui,a Min You,a Haiying Wei,a Yueyue Wang,b Xinke Yan,b Lidong Zhou,b
Chengwen Zhu,a,* and Hao Ren b,*
Traditional fiber component analysis combining Herzberg and Graff “C” staining methods achieves high accuracy but relies on manual fiber length measurement using an ImageJ software, making it cumbersome and subjective. This study developed a MATLAB-based image preprocessing approach utilizing HSV color space transformation and color threshold segmentation to achieve precise extraction of different fibers from stained microscopic images. Experiments employed four two-component and two three-component mixed slurry samples to compare accuracy and efficiency against the ImageJ method. Optimal color rendering was attained with saturation and lightness gain factors of 1.5 and 1.1 after Herzberg staining and 2.0 and 1.1 after Graff “C” staining. The new method matched ImageJ’s accuracy while significantly improving processing efficiency. Applied to commercial cigarette paper, it accurately identified fiber components, consistent with raw material data. Integrating staining techniques with image recognition maintains analytical precision while substantially boosting detection speed. This approach provides an efficient high-throughput solution for cigarette paper fiber analysis with clear industrial application potential.
DOI: 10.15376/biores.21.2.4408-4435
Keywords: Combination of the dyeing methods; Image recognition; HSV color space; Threshold segmentation
Contact information: a: China Tobacco Jiangsu Industrial Co., Ltd., Nanjing 210019, China; b: Jiangsu Provincial Key Lab of Pulp and Paper Science and Technology, Nanjing Forestry University, Nanjing, Jiangsu Province, 210037, China;
* Corresponding authors: zhucw@jszygs.com (Chengwen Zhu); renhao@njfu.edu.cn (Hao Ren)
Graphical Abstract
INTRODUCTION
Accurate analysis of fiber components in cigarette paper is crucial for regulating the combustion performance and smoke quality of cigarettes (Liu 2011; Chokshi et al. 2020). In previous studies, although the combined use of Herzberg (Sun and Zhang 2021) and Graff “C” (Li et al. 2023) stains with ImageJ software could distinguish fiber types based on color differences, the quantitative analysis relied on manual measurement of fiber length in ImageJ, with several bottlenecks including complex workflows, strong manual subjectivity, and low efficiency, making it difficult to meet industrial analysis requirements. As the tobacco industry shifts toward intelligent and refined production, developing automated and high-efficiency fiber analysis technology has become an urgent need.
Digital image processing (Vyas et al. 2018; Newell 2020) technology has already shown great potential in medical microscopy (Robertson et al. 2016; Zhang and Dong 2016), materials science (Xing et al. 2019; Abdelkader 2022), and other fields. This is due to its fast and objective characteristics, providing a new approach to solve this challenge by using methods such as color space conversion (Jraissati and Douven 2018; Cinko and Becerir 2024), threshold segmentation (Zortea et al. 2017; Abd Elaziz et al. 2021; Vohra et al. 2021), and image preprocessing (He et al. 2019; Mo and Chen 2021). By such measures, extraction and separation of target feature can be achieved. The HSV color space shows unique advantages in stained image analysis because it simulates the human visual perception characteristics of hue, saturation, and value. For example, Herzberg-stained hemp pulp fibers appear burgundy in the HSV space, while wood pulp fibers show a blue tone, and accurate segmentation can be achieved through threshold setting. Compared with the traditional RGB color space (Liu et al. 2023; Tadahiro et al. 2024), the HSV space is more robust against variations in staining concentration and uneven lighting, and the analysis results better align with subjective perception. Although MATLAB’s image processing toolbox has already been used for fiber diameter measurement (Murphy et al. 2020; Ruan et al. 2020) and deformation analysis (Belyaev et al. 2010), there is still a lack of systematic studies on multicomponent quantitative analysis in mixed pulp systems. To address the efficiency limitations of traditional methods, this study innovatively introduced digital image recognition technology and built an HSV color space model using MATLAB. The preprocessing parameters of the stained fiber images were optimized, and the fiber color features were extracted using threshold segmentation. The experiment consisted of 4 sets of two-component and 2 sets of three-component mixed pulps. By combining pixel value visualization and fiber mass factor, rapid analysis of fiber mass ratios was achieved. The results showed that this method had no significant difference in accuracy compared with the ImageJ analysis method, but the time required for the determination was significantly shortened. This technique was further applied to seven types of commercial cigarette paper to verify its feasibility in practical applications. This study integrates staining techniques with image processing technology, thereby overcoming the subjectivity of manual interpretation and providing an efficient analytical method for selecting raw materials and optimizing the production process of cigarette paper, demonstrating industrial application potential.
EXPERIMENTAL
Materials
Hardwood pulp: Bleached kraft eucalyptus pulp, brand Carabin (Eucalyptus), origin: Brazil. Softwood pulp: Bleached kraft pine pulp, brand Forest (Picea asperata Mast), origin: Sweden. Hemp pulp: Flax (Linum usitatissimum L), imported hemp pulp. All the above pulp samples were provided by Zhejiang Minfeng Special Paper Co., Ltd. (Jiaxing, China).
Based on current market sales and production processes, seven types of commercial cigarette paper samples were selected. Detailed sample information is shown in Table 1. Sample S1 was provided by Hengfeng Paper Co., Ltd. Samples S2 and S3 were both provided by Modipap (France). Sample S4 was provided by Zhejiang Huafeng Paper Group Co., Ltd. Sample S5 was provided by China Tobacco Modipap (Jiangmen) Paper Co., Ltd., and samples S6 and S7 were also provided by China Tobacco Modipap (Jiangmen) Paper Co., Ltd.
Zinc chloride (ZnCl2, 98%) was purchased from Shanghai Aladdin Biochemical Technology Co., Ltd.; potassium iodide (KI), iodine (I2), and calcium chloride (CaCl2, 97%) were purchased from Nanjing Chemical Reagent Co., Ltd.; aluminum chloride (AlCl3, 97%) was purchased from Sinopharm Chemical Reagent Co., Ltd. All reagents were of analytical grade.
IMT-SJ01 standard fiber disintegrator from Intane Precision Instruments Co., Ltd.; BX41 optical microscope from Olympus (China) Co., Ltd.; and Morfi Compact fiber quality analyzer was from Techpap (France) were used for analysis.
Table 1. Specific Information of the Seven Commercial Cigarette Paper Samples
Preparation of Herzberg Staining Solution
The standard Herzberg staining solution was prepared following GB/T 4688-2020 (National Technical Committee for Standardization of the Paper Industry, 2020). The procedure says to mix 15 mL of Solution A (saturated ZnCl2 solution prepared at room temperature) and 5 mL of Solution B (prepared by completely dissolving 2.1 g of potassium iodide and 0.1 g of iodine in 5 mL of water). The mixture was left in the dark for more than 6 hours until all precipitates have settled. Then, the upper clear solution is poured into a brown dropper bottle and a small piece of iodine (I2) is added to complete the preparation.
Preparation of Graff “C” Standard Staining Solution
The standard Graff “C” staining solution was prepared in accordance with GB/T 4688-2020 standard (National Technical Committee for Standardization of the Paper Industry, 2020). About 20 mL of Solution A (40 g of aluminum chloride hexahydrate dissolved in 100 mL of water), 10 mL of Solution B (100 g of calcium chloride dissolved in 150 mL of water), 10 mL of Solution C (100 g of dry zinc chloride dissolved in 50 mL of warm water), and 12.5 mL of Solution D (0.9 g of potassium iodide and 0.65 g of iodine dissolved in 50 mL of distilled water) were mixed. The mixture was left in the dark for 12 to 24 h until complete precipitation occurs. The supernatant was gently poured into a brown dropper bottle, and a small piece of iodine (I2) was added to complete the preparation.
Preparation of Mixed Pulps and Samples
To determine the water content, about 0.1 g of oven-dried fiber sample or commercial paper fiber sample was weighed according to different proportions. The fibers were soaked in 100 mL of deionized water and stirred with a glass rod until the fibers were dispersed to form a 0.1% fiber suspension. About 1 to 2 drops of the fiber suspension were placed in the center of a glass slide and dried in a 60 °C oven. After cooling, about 1 to 2 drops of staining solution were added. A coverslip was pressed using tweezers on one side of it at a 45° angle. Then, it was slowly lowered to avoid bubbles. A filter paper was used to absorb excess staining solution around the coverslip. Once the sample was confirmed to be ready, it was observed immediately. Separate stained microscope slides were prepared for Herzberg and Graff “C” staining solutions. The stained slides were observed under an optical microscope. The digital images were acquired using the integrated digital imaging system of the Olympus BX41 optical microscope. The raw data were delivered in a standard 24-bit RGB color format. In this format, each image was stored as a 3D matrix in MATLAB, where each pixel is represented by an RGB triple. Each channel (Red, Green, Blue) uses 8 bits, with intensity values ranging from 0 to 255. The resolution for image acquisition was set to 2048 × 1536 pixels. Each pixel in the digital image is associated with its own unique RGB value. No spatial averaging or downsampling was performed during acquisition or prior to the HSV conversion to ensure that the fine morphology and edges of the stained fibers were preserved for accurate segmentation. The analysis was performed using 40× and 100× objective lenses. At 40× magnification, the corresponding physical field of view is approximately 0.65 mm × 0.48 mm. For each sample, ten representative images were selected for analysis to ensure statistical representativeness. Each observation experiment was repeated more than three times from sample preparation.
HSV Color Space Conversion and Image Preprocessing
In this study, MATLAB R2023b (Meiswok Software Co., Ltd.) software was used for color space selection and conversion. The RGB color space was converted to the HSV color space to facilitate more stable color segmentation. The primary advantage of the HSV color space is its ability to separate the hue channel from the intensity and saturation channels, thereby providing better value stability compared to the RGB color space. This rationale was central to the research design, as it ensures that the target fiber colors remain identifiable even under slight variations in lighting conditions during image acquisition. Fiber images stained with Herzberg and Graff “C” staining solutions were processed separately to ensure optimal image quality. To identify the optimal enhancement conditions, the saturation gain factors were set at 1.0, 1.5, and 2.0 for Herzberg staining, and 1.0, 2.0, and 3.0 for Graff “C” staining, while brightness enhancement factors were tested at 1.0, 1.1, and 1.2 respectively. These specific candidate values were chosen based on preliminary experimental observations, aiming to explore the boundary between effectively enhancing color contrast for segmentation and avoiding unnatural artifacts or overexposure that could lead to information loss. For images stained with Graff “C” solution, the saturation gain factor was set to 1.0, 2.0, and 3.0, and the brightness gain factor was set to 1.0, 1.1, and 1.2. The processed images were compared to determine the best optimization parameters. The relevant program code in MATLAB is shown as follows:
hsv_img = rgb2hsv(img);
increase_saturation_factor = 1.5;
hsv_img(:,:,2) = hsv_img(:,:,2) * increase_saturation_factor;
hsv_img(hsv_img > 1) = 1;
increase_value_factor = 1.1;
hsv_img(:,:,3) = hsv_img(:,:,3) * increase_value_factor.
Color Threshold Segmentation Based on H, S, and V
The RGB color space was converted to the HSV color space, which is conceptualized as a hexcone model. Based on the optical characteristics of stained fibers and visual perception principles, threshold ranges were manually set to specify the maximum and minimum values of desired hue (H), saturation (S), and value (V). To identify the optimal enhancement conditions, saturation gain factors were specifically set at 1.0, 1.5, and 2.0, while brightness enhancement factors were fixed at 1.0, 1.1, and 1.2. These values were chosen to create a controlled gradient for testing, aiming to find the precise balance where color contrast is sufficiently enhanced for segmentation without introducing overexposure or “color distortion” that could compromise fiber morphology. The hue (H) range was determined based on a standard color chart and the actual values measured from microscopic images. Next, binarization was performed, and a mask was constructed and applied to the original image to facilitate segmentation, enabling the extraction and separation of different types of fibers, which were then visualized based on pixel values. After HSV color space converting, fiber morphology and thickness affect color feature extraction. For example, curled or branched fibers can lead to uneven staining and localized color variations. The naturally crimped structure of jute pulp fibers may cause different areas of the same fiber to show hue differences in the HSV space, increasing the likelihood of misclassification during segmentation. Over-segmentation or omission will be caused if apply uniform threshold. Additionally, fiber overlap can cause HSV values in overlapping regions to exhibit mixed effects, where hues may shift, forming an intermediate color characteristic between the two, which can lead to incorrect classification during threshold segmentation as an independent fiber type.
Fiber Coarseness and Quality Factor Analysis Based on FQA
A 40 mg of absolute-dried sample of mixed pulp was placed in a 50 mL test tube, mixed with one-third deionized water. A few glass beads were added to disperse the pulp fully into single fibers. Then, the sample was transferred to the sample beaker of the fiber quality analyzer and mixed with deionized water to bring the total volume to 1 L. The fiber quality analyzer was used to measure the mass parameters. The coarseness of the mixed or commercial paper fibers was recorded, and the corresponding quality factor was calculated using the following formula,
where fx is mass factor of blended pulp fibers and Cx is coarseness of blended pulp fibers (mg/m).
Fiber Composition Analysis
After separating different types of fibers, the number of pixels of each fiber type stained with either Herzberg or Graff “C” staining agents was measured using MATLAB R2023b, and the total number of fiber pixels was also determined. Combined with fiber width and quality factor, the proportion of each fiber type in the mixed pulp was calculated using Eqs. 2 and 3.
In Eqs. 2 and 3, Xn is mass ratio (%) of a specific fiber type; fn is mass factor of a specific fiber type; Nn is total length (mm) of a specific fiber type; is average mass factor of blended fibers; Nt is total length (mm) of all fiber types; Mn is pixel area of a specific fiber; and Wn is width (μm) of a specific fiber.
RESULTS AND DISCUSSION
Determination of Image Preprocessing Conditions
In digital image processing, saturation gain factors typically range from 1.0 to 2.0 to achieve optimal contrast enhancement while preserving natural color boundaries (Gonzalez and Woods 2018; Vyas et al. 2018). It is well-documented that excessively high saturation enhancement factors can lead to significant color distortion, such as the loss of fine structural details and the occurrence of “clipping” artifacts, which would compromise the reliability of subsequent fiber segmentation (Tadahiro et al. 2024).
Fig. 1. Micrographs of a three-component fiber mixture (softwood pulp: hardwood pulp: hemp pulp = 5:3:2) under an optical microscope: (a) images of the mixture stained with Herzberg reagent; (b) images of the mixture stained with Graff “C” reagent. The pretreatment conditions of the images after dyeing with two kinds of dyes were established: a1, a2, and a3 were images with constant brightness and saturation gain factors of 1.0, 1.5, and 2.0 after Herzberg staining, respectively; b1, b2, and b3 were images with the saturation gain fixed at 1.5 and brightness gain factors of 1.0, 1.1, and 1.2, respectively; c1, c2, and c3 were images stained with Graff “C” obtained with saturation gain factors of 1.0, 2.0, and 3.0, respectively; and d1, d2, and d3 were images obtained with a saturation gain factor of 2.0 and brightness gain factors of 1.0, 1.1, and 1.2, respectively.
Excessively high saturation gain can lead to color distortion or unnatural appearance of the image. As shown in Fig. 1, keeping brightness constant, saturation gain factors were set to 1.0 (a1), 1.5 (a2), and 2.0 (a3). Results showed that when the saturation gain factor was 1.5, the color improved significantly, and the image showed no distortion. When the saturation gain factor was 2.0, the image showed obvious color distortion and unnatural phenomena; thus, 1.5 was identified as the optimal saturation gain value. Furthermore, the saturation gain factor was kept at 1.5, while the brightness gain factors were set to 1.0 (b1), 1.1 (b2), and 1.2 (b3). It was found that, when the brightness gain factor was 1.1, the image brightness improved effectively without overexposure problems. When the brightness gain was 1.2, the highlight areas of bright parts of the image showed obvious detail losses. For images stained with Graff “C”, saturation gain factors were set to 1.0 (c1), 2.0 (c2), and 3.0 (c3). The results showed that when the saturation gain factor was 2.0, the optimization of color vividness was the most significant. When the saturation gain factor was 3.0, the image exhibited color distortion. Based on this, brightness gain factors were set to 1.0 (d1), 1.1 (d2), and 1.2 (d3), and founded that when the brightness gain factor is 1.1, best color presentation occurred, and at 1.2, detail losses occurred at the highlight areas, thus 1.1 was confirmed as the optimal brightness gain factor.
Analysis of Mixed Pulp Fiber Composition through Staining Method Combined with Image Recognition Method
Two-component pulp mixture of softwood and hardwood pulps
A total of 0.1 g of absolute-dried pulp (with softwood-to-hardwood ratios of 2:3 and 3:2) was weighed and used to prepare a 0.01% fiber suspension. Two drops were pipetted onto the center of a glass slide and dried in an oven at 60 °C. The samples were stained with Herzberg and Graff “C” dyes diluted to 90% of their original concentration for 20 s and 30 s, respectively. Prepared into microscopic slides after dyeing, and the images were captured using an optical microscope.
Since the samples contained both softwood and hardwood pulps, ten images stained with Graff “C” dye were selected from each experimental group for image preprocessing (Fig. 2).
Fig. 2. Image of two-component pulp (softwood pulp: broadleaf pulp = 2:3) under an optical microscope. Group a is the microscope images of Softwood (softwood pulp): Hardwood (broadleaf pulp) = 2:3 pulp stained by Helzberg and Graff “C”, when the saturation factor is set to 2.0 and the brightness gain factor is 1.5.
For the first experimental group (softwood:hardwood = 2:3), the fiber images underwent preprocessing with the saturation gain factor set to 2.0 and the brightness gain factor set to 1.5. The images were then converted to the HSV color space, and the color thresholding method was used to extract all types of fibers as well as specifically the blue-gray fibers (hardwood pulp fibers), as shown in Fig. 3. Subsequently, the number of pixels corresponding to all fibers and to hardwood fibers was counted to analyze the mass ratio of hardwood to total fibers. The fiber analysis for the second experimental group (softwood:hardwood = 3:2) followed the identical procedure described above. The resulting images showing the extracted fibers for this group are presented in Figs. 4 and 5.
Fig. 3. Images of the fibers after separation and extraction of two-component pulp (softwood pulp: broadleaf pulp = 2:3). Here group b is the picture of extracting all fibers, group, and c is the picture of extracting broadleaf fibers.
Fig. 4. Image of two-component pulp (softwood pulp: broadleaf pulp = 3:2) under an optical microscope. Group a is the microscope images of Softwood (softwood pulp): Hardwood (broadleaf pulp) = 3:2 pulp stained by Helzberg and Graff “C”, when the saturation factor is set to 2.0 and the brightness gain factor is 1.5.
Following the method described in experimental section, the fiber coarseness and fiber width of both mixed pulp samples were measured using a fiber quality analyzer. The corresponding mixed fiber quality factors were calculated. The mass proportion of each fiber type was determined separately, combined with the pixel counts. The results are shown in Table 2.
Fig. 5. Images of the fibers after separation and extraction of two-component pulp (softwood pulp: broadleaf pulp = 3: 2). Here group b is the picture of extracting all fibers, group and c is the picture of extracting broadleaf fibers.
Table 2. Quantitative Accuracy Analysis of Two-Component Mixed Pulp Fiber
Two-component pulp mixture (softwood and hemp pulps)
A total of 0.1 g of absolute-dried pulp (with softwood-to-Hemp pulp ratios of 2:3 and 72.7:27.3) was weighed and used to prepare a 0.01% fiber suspension. Two drops were pipetted onto the center of a glass slide and dried in an oven at 60 °C. The samples were stained with Herzberg and Graff “C” dyes diluted to 90% of their original concentration for 20 s and 30 s, respectively. Prepared into microscopic slides after dyeing, and the images were captured using an optical microscope. Since the samples contained only softwood and hemp pulp, only the fiber images after being stained with Herzberg dye need to be analyzed. For the first experimental group (softwood pulp: hemp fiber pulp = 2:3), ten images stained with Herzberg dye were selected for fiber analysis (Fig. 6). In MATLAB, the acquired fiber images underwent preprocessing with the saturation gain factor set to 2.0 and the brightness gain factor set to 1.5. The images were then converted to the HSV color space. Using the color thresholding method, all types of fibers and specifically the blue fibers (softwood pulp fibers) were extracted, as shown in Fig. 7, followed by binarization. Subsequently, the number of pixels corresponding to all fibers and to the Hemp fibers was counted to analyze the mass ratio of hemp fibers to total fibers. The fiber analysis for the second experimental group (softwood pulp: hardwood pulp = 3:2) followed the identical procedure described above. The resulting extracted fiber images for this group are presented in Figs. 8 and 9.
Fig. 6. Image of two-component slurry (softwood pulp: hemp pulp = 2: 3) taken under an optical microscope. Group a is the microscope images of softwood: hemp = 2:3 pulp stained by Helzberg and Graff “C”, when the saturation factor is set to 2.0 and the brightness gain factor is 1.5.
Fig. 7. Images of the fibers after separation and extraction of two-component pulp (softwood pulp: hemp pulp = 3: 2). Here group b is the picture of extracting all fibers, and group c is the picture of separating hemp pulp fibers.
Fig. 8. Image of two-component slurry (softwood: hemp = 72.7:27.3) taken under an optical microscope. Group a is the microscope images of softwood: hemp = 72.7:27.3 pulp stained by Helzberg and Graff “C”, when the saturation factor is set to 2.0 and the brightness gain factor is 1.5.
Fig. 9. Images of the fibers after separation and extraction of two-component pulp (softwood pulp: hemp pulp = 72.7:27.3). Here group b is the picture of extracting all fibers, group and c is the picture of separating hemp pulp fibers.
Following the method described before, the fiber coarseness and fiber width of both mixed pulp samples were measured using a fiber quality analyzer. The corresponding mixed fiber quality factors were calculated. The mass proportion of each fiber type was determined separately, combined with the pixel counts. The results are shown in Table 3.
Table 3. Quantitative Accuracy Analysis of Two-Component Mixed Pulp Fiber
Three-component pulp mixture (softwood, hardwood, and hemp pulps)
A total of 0.1 g of absolute-dried pulp (with softwood: hardwood: hemp ratios of 5:3:2 and 5:2:3) was weighed and prepared a 0.01% fiber suspension. Two drops were pipetted onto the center of a glass slide and dried in an oven at 60 °C. The samples were stained with Herzberg and Graff “C” dyes diluted to 90% of their original concentration for 20 s and 30 s, respectively. Prepared into microscopic slides after dying, and the images were captured using an optical microscope.
For the first experimental group (softwood pulp : hemp fiber pulp = 2:3), ten stained images were selected for analysis as shown in Fig. 10.