Skip to main content
Advertisement
Browse Subject Areas
?

Click through the PLOS taxonomy to find articles in your field.

For more information about PLOS Subject Areas, click here.

  • Loading metrics

A novel skin pigment separation method based on sub-block selection and local clustering

  • Huanyu Yang,

    Roles Investigation, Methodology, Software, Validation, Writing – review & editing

    Affiliation School of Science and Technology, Shanghai Open University, Shanghai, China

  • Junzhu Zhang,

    Roles Data curation, Formal analysis, Methodology, Software, Validation, Visualization, Writing – original draft

    Affiliation College of Information, Mechanical and Electrical Engineering, Shanghai Normal University, Shanghai, China

  • Yan Ma

    Roles Conceptualization, Resources, Writing – review & editing

    ma-yan@shnu.edu.cn

    Affiliation College of Information, Mechanical and Electrical Engineering, Shanghai Normal University, Shanghai, China

Abstract

Background

Skin pigment separation is a key task in the fields of medical aesthetics, clinical analysis, and dermatological diagnosis. Existing pigment separation methods suffer from the problem of unclear separation between melanin and hemoglobin.

Methods

This study proposes a novel approach that combines a sub-block selection algorithm with local clustering for skin pigment separation. The sub-block selection algorithm sorts and filters sub-blocks based on the average pixel difference, reconstructing the input data to ensure accurate separation of melanin and hemoglobin. The local clustering method uses the Euclidean distance between sample points and their surrounding cluster centers to assign sample points to their respective clusters. A random sampling of sample points is performed from each cluster to ensure convergence of independent component analysis during the iteration process.

Results

Experimental evaluations demonstrate that the proposed method achieves accuracy and precise separation in skin pigment separation. Furthermore, the average success convergence rate of this approach reaches 92%, surpassing the performance of existing methods.

Introduction

Melanin and hemoglobin are two main factors that determine the skin color [1]. The goal of skin pigment separation [2] is to extract the distribution information of melanin and hemoglobin from skin color image. Melanin and hemoglobin can more accurately measure the variations in human skin color. Therefore, pigment detection has a wide range of applications in the fields of medical cosmetology, clinical analysis, and skin medical diagnosis, among others [35]. The related research results of pigment analysis based on skin image processing have been applied in various skin analysis instruments. The research on skin pigment separation originated in the 1990s [6]. It can be divided into three categories:

  1. (1) Optical properties and hardware-based: By analyzing the skin structure and its optical properties, Dawson et al. [7] found that the logarithm of the inverse of reflectance (LIR) of the skin surface is proportional to the absorbance of the skin pigment, and further propose the theoretical model concerning skin reflectance and skin pigment content. Moreover, they defined the indices including melanin index and erythema index. Based on the work of Dawson et al., Feather et al. [8,9] developed a portable reflectometer for the quantification of cutaneous hemoglobin and melanin. Masuda et al. [10] proposed to calculate the absorption spectrum of the skin from the reflection spectrum using a spectrophotometer, and determine the concentrations of melanin and hemoglobin using a multiple regression analysis, which can accurately evaluate the changes of epidermal melanin under UV irradiation. Nkengene et al. [11] tested a hyperspectral imaging device (SpectraCam® system) which can quantify melanin, hemoglobin, and oxygen saturation and detect melanin variation.
  2. (2) Color simulation based: Relevant studies have shown that normal skin color is distributed over a certain range. Based on the Kubelka–Munk theory, Cotton et al. [12] developed a skin color prediction model that can generate all possible colors of normal skin. They found that skin colors are mainly influenced by the amount of melanin within the epidermis and hemoglobin in the dermis. The experiments demonstrate that normal skin color value lies in a plane stretched by the axis of the two factors. By analyzing the video images of in vitro cutaneous components, Takiwa et al. [13] estimated the optical parameter values of skin with a video microscope and developed a computer simulation system, which can simulate the skin color changes according to the predicted amount of melanin and hemoglobin. Li et al. [14] proposed a facial markup simulation method based on a physical reflection model. The core idea is to decompose the image into different layers, which are transformed in appearance according to the optical characteristics of cosmetics, and simulate the color effect of different cosmetics on the human face.
  3. (3) Color image-based: By analyzing the relationship between the amount of skin pigment and color value in the optical density domain, Tsumura et al. [15] separated the spatial distributions of melanin and hemoglobin in human skin by independent component analysis (ICA) of skin color image. After that, Tsumura et al. [16] analyzed the influence of shading on skin pigment separation and proposed a shading removal model to obtain more accurate results. Building on this, Xu et al. [17] developed an automatic skin decomposition method using a single image without relying on image databases. However, their framework retained limitations in addressing surface reflection interference. To resolve this, the DL-ICA method [18] was later proposed, leveraging differences between color channels in log space to suppress such artifacts. Given its capability to overcome critical limitations of prior works (e.g., [16,17]), the DL-ICA framework [18] is adopted as the comparative baseline.

Recent advancements harness deep learning to transcend traditional pigment separation limitations, with generative models leading this evolution. Conditional Generative Adversarial Networks (cGANs) [19] now synthesize specialized skin imagery directly from standard photographs, eliminating reliance on dedicated optical hardware—Kojima et al. [20] demonstrated this by generating UV-equivalent images that accentuate pigmentation spots from conventional color photos, enabling quantitative analysis without UV equipment. Furthermore, integrated frameworks employ models like pix2pixHD [21] to produce cross-polarized images from RGB inputs, enhancing melanin and hemoglobin visualization. Beyond image translation, end-to-end regression approaches have emerged: Jung et al. [22] utilized ResUNet++ architectures trained to solve the forward problem of light-tissue interactions, theoretically reconstructing skin images from decomposed melanin, hemoglobin, shading, and specular components without pixel-level ground truths. These methods achieve high clinical correlation while offering accelerated analysis and adaptable deployment across diverse imaging environments.

While existing skin pigment separation algorithms have achieved notable theoretical progress, their practical implementation faces limitations rooted in the FastICA framework [23]. Specifically, two critical issues hinder performance: First, within the DL-ICA framework [18], the direct application of FastICA cannot effectively quantify or suppress the influence of shadow components during separation, leading to signal contamination between melanin and hemoglobin. Second, FastICA inherently exhibits instability during iterative computations, frequently failing to converge when processing skin images with diverse illumination conditions. To address these challenges, we propose a dual optimization strategy. A sub-block selection algorithm first performs secondary filtering on input skin images by sorting and filtering sub-blocks based on the average pixel difference, effectively eliminating shadow-dominated regions to improve separation accuracy. This process is further enhanced by a feature point selection algorithm that optimizes the FastICA workflow through local clustering on whitened data, where representative features are selected according to cluster centers. By reducing data volume and enforcing algorithmic stability, these refinements collectively overcome the limitations of conventional approaches.

Related works

Multi-layered skin model

In anatomical terms, the human skin is divided into three layers from outer to inner: the epidermis, dermis, and subcutaneous tissue [24]. In the multi-layered skin model [18], based on the pigment distribution and optical properties of skin tissues, the stratum corneum (the outermost part of the epidermis) is separately considered as a distinct layer, resulting in the skin being analyzed as a four-layer structure. From the first layer to the fourth layer, it consists of stratum corneum, viable epidermis (ranging from the stratum basale to the stratum granulosum), dermis, and subcutaneous tissue. Although histologically the stratum corneum is part of the epidermis, it is modeled separately in this study due to its distinct optical characteristics. The stratum corneum contains no pigments, consists primarily of dead keratinized cells and surface lipids, and is in direct contact with air, which gives it reflectance properties that differ significantly from the underlying layers. This separation enables more accurate modeling of light–skin interactions, particularly in the context of pigment separation analysis. The inverse of the skin reflectance can be expressed in logarithmic form [7]:

(1)

where L is the logarithmic form of the reciprocal of skin reflectance, I0 is the intensity of incident light, I is the intensity of reflected light, and represents the total reflectance of skin tissue. Following Dawson et al.’s multi-layer model [7], is derived as:

(2)

where Ti is the transmittance of the ith layer, R4 is the reflectivity of the subcutaneous tissue. This formulation inherently captures cumulative intra-layer scattering effects (e.g., diffuse scattering within the dermis) through the bulk transmittance terms, avoiding explicit modeling of inter-layer reflections. Experimental validation in [7] confirms that this simplification maintains accuracy for pigment quantification under visible light conditions.

Then we take the log of both sides of Eq (2) and combine it with Eq (1) to obtain the linear combination of skin pigment absorbance [7]:

(3)

where Ai corresponds to the absorbance of the ith layer.

The improved Lambert-Beer law [25], which extends the classical formulation to account for light scattering in biological tissues, is adopted here to model photon propagation in multilayered skin. This law is well-suited for our study, as it bridges absorption and scattering effects in heterogeneous media like skin. According to the improved Lambert-Beer law, the absorption can be expressed as a function of the absorption coefficient and the mean photon path length . The absorption coefficient is defined as the product of the extinction coefficient and its color concentration c within the tissue, i.e., . The extinction coefficient quantifies the pigment’s intrinsic ability to absorb and scatter light at wavelength ; in our context, we denote for melanin and for hemoglobin, respectively. The term color concentration c refers to the effective density of pigments (e.g., melanin or hemoglobin) within the skin tissue. This formulation is particularly suitable for modeling light propagation in multilayered skin structures, as it captures both absorption and scattering effects [16,17].

The absorbance is then given by:

(4)

where is the wavelength.

Although Ai is not equal to the absorption of the i-th layer, according to the pigment quantification model proposed by Dawson et al. [7], the logarithm of inverse reflectance L can be approximately expressed as the linear superposition of the absorbance of each skin layer. The term “other pigments” mainly refers to the color contributions from fibrous proteins and subcutaneous fat, corresponding to A1 and in Eq (3). These components are typically not our focus in pigment separation tasks and are collectively denoted as , representing the residual difference between the actual absorbance and the simplified expression of L. Dawson et al. experimentally demonstrated that the contributions of A1 and to L are not significant, generally less than 10%. Hence, can be reasonably ignored in our model [16,17]. We therefore approximate the skin reflectance model as:

(5)

where and are the extinction coefficients of melanin and hemoglobin, cm and cn are their respective concentrations, and is the mean photon path length at wavelength .

DL-ICA method

For a color image pixel (x, y), its color value (i = R, G, B) can be expressed as:

(6)

where k is a constant value determined by the gain of the camera and is the wavelength. is the reflected spectral radiance. is the incident spectral radiance. R0 is the surface reflectivity. is the spectral response function of the camera in the i channel (i=R, G, B). The surface reflectivity R0 is related to the pigment concentration whose relationship can be expressed as:

(7)

where is the extinction coefficient of melanin. is the concentration of melanin. is the mean path length of photons in the epidermis layer. , and are the corresponding parameters of hemoglobin in the dermis layer, respectively.

By substituting Eq (7) into Eq (6), we can obtain the equation about the image pixel color related to pigment concentration.

(8)

Assuming that the incident light is uniform and the spectrum of the light source does not vary with direction, the incident spectral irradiance can be expressed as:

(9)

where is the average incident spectral irradiance, and represents shadow variable induced by the shape of the skin surface. By substituting Eq (7) into Eq (6) and performing the log operation on both sides, we can obtain:

(10)

We define , , then Eq (10) can be expressed as:

(11)

where superscript log denotes the log operation, and i (=R, G, B) denotes the color channel.

It should be noted that in Eq (10), the term is simplified as a single variable , where refers to the extinction coefficient and is the mean photon path length. This simplification does not imply that skin reflectance is determined solely by absorption. In fact, both and l are influenced by the absorption and scattering properties of the skin. As discussed in [7], The extinction coefficient —denoted as for melanin and for hemoglobin—incorporates both absorption and scattering effects. The mean path length is also influenced by scattering in multi-layered tissues. Therefore, is a compound variable that reflects the combined impact of absorption and scattering.

According to Eq (11), the difference between the blue channel and red channel, green channel and red channel can be obtained:

(12)

We represent Eq (12) in vector form:

(13)

where

(14)(15)(16)(17)

where c is a two-dimensional signal that denotes the concentration of melanin and hemoglobin. The two pigment concentrations are independent of each other. The color channel difference in the optical density space can be linearly expressed as a function of and , corresponding to melanin and hemoglobin contributions. Therefore, the calculation of pigment concentration distribution can be regarded as a blind source separation problem. The pigment image can be synthesized after solving the coefficient matrix V using the ICA algorithm.

Solving with FastICA algorithm

Prior to delineating the solving steps of FastICA, it is imperative to provide a concise overview of the fundamental concepts underlying the Independent Component Analysis (ICA) algorithm. Suppose there are n independent source signals represented by the vector and n observed signals . n observed signals are a linear mixture of n source signals, that is,

(18)

Eq (18) can be expressed in vector form:

(19)

where A is a mixing matrix and S is a matrix of source signals. Here, both the source data S and the mixing matrix A are unknown. How to determine the mixing matrix A and the source data S given the observation matrix X is the so-called blind source separation problem.

The objective of ICA is to find a separation matrix W so that the source data S can be recovered through the separation matrix W and the observed signals X. Assume that the separated signals are expressed as . Then the separation process can be expressed as:

(20)

Since the order of source signals in the results of ICA cannot be determined, the separation matrix W and the mixed matrix A have the following relationship:

(21)

where R is a permutation matrix and is a diagonal matrix that relates the absolute quantities to relative quantities.

The FastICA algorithm [26] is one of the most widely used methods in independent component analysis (ICA). ICA problems can be solved using several alternative approaches, such as nonlinear principal component analysis [27], the Infomax algorithm [28], and the fast fixed-point iteration scheme (FastICA). Among these, FastICA is favored for its computational efficiency and implementation simplicity. Moreover, it has been successfully applied in related pigment separation studies, such as those by Xu et al. [17,18], which we follow in this work to compute the separation matrix.

  1. 1. Data preprocessing: Perform centering and whitening on the mixed signal data. Centering involves subtracting the mean of the matrix , which can be expressed as:
(22)

After centering the data, perform whitening to remove the correlation between the data points:

(23)

where and represent the eigenvectors and eigenvalues of the covariance matrix .

  1. 2. Establish the objective function: The objective function for FastICA based on negentropy is given by:
(24)

where is a row vector of the separation matrix , is a non-quadratic function, and is a Gaussian random variable with zero mean and unit variance.

  1. 3. Solve the separation matrix : Utilizing the Newton iteration method to compute the vector , the iterative formula is as follows:
(25)

where denotes the derivative of . and represent the iterative values of at the (k+1)-th and k-th iterations, respectively. When the absolute difference between and equals zero, the vector iteration is considered to have converged. When all vectors converge, the separation matrix W can be obtained.

The pigment coefficient matrix V can be derived by combining Eqs (13),(20), and (21).

(26)

where R represents the identity matrix and denotes the normalization of the result in Eq (26) to have a unit magnitude of 1.

In the DL-ICA model and its solving process, there are two main limitations that can affect the separation performance. First, it is difficult to accurately isolate and control the influence of shadow components, which often leads to undesired mixing of pigment information during separation. Second, the FastICA algorithm used for blind source separation tends to exhibit unstable convergence behavior when the input data distribution changes, especially under varying illumination or structural noise [23]. In the following section, we address these two limitations through a sub-block selection strategy and a feature point selection method based on local clustering.

Method

Fig 1 shows the flowchart of the skin pigment separation algorithm proposed in this paper. First, we utilize the sub-block selection algorithm to sort and filter the sub-blocks in the input image, thereby reconstructing the input data. Next, during the process of solving the separation matrix using the FastICA algorithm, we employ local clustering to select feature points. Lastly, based on the pigment concentration matrix, we derive the melanin image and hemoglobin image.

Sub-block selection algorithm

To address the influence of shadow components, we propose a sub-block selection algorithm that filters the input image data based on local channel differences. Unlike previous methods that directly apply ICA to the entire image, our approach selects sub-blocks with more significant color channel variation, which are less affected by uniform shadows. This selection improves the signal-to-noise ratio of the input data and enhances the robustness of the separation process in the DL-ICA framework.

Prior to introducing the sub-block selection algorithm, we first analyze the actual computational errors in the skin pigment separation model.

According to Eq (9), is a constant. Taking without losing generality, we obtain:

(27)

The ideal separation result is obtained by Eq (11):

(28)

Nevertheless, there exist discrepancies between the actual computational outcomes and the theoretical values. The actual result calculated from the skin samples in the image is as follows:

(29)

where , , , and represent the actual computed values of , , , and , respectively. Let be the difference between the shadow variables:

(30)

Then Eq (29) can be expressed as

(31)

In Eq (31), we can see that if the actual result calculated by the algorithm is applied to the original image, the data of the pigment part will be included in the shadow component. Therefore, when synthesizing melanin and hemoglobin images, the size of the shadow component is the sum of and by default.

Next, we calculate :

(32)

The actual value of cannot be determined during the computation process. By default, and cancel out their corresponding values during the differencing operation. Due to the absolute value of being smaller than the absolute value of , the absolute value of may appear larger. When the values of the R, G, and B channels in the image are relatively close, the absolute values of and are smaller. In this case, the absolute value of becomes larger. is then included in the background, making it difficult to accurately separate melanin and hemoglobin.

If we aim to reduce the difference between the actual value of the shadow variable and the true value of , we can employ the method of minimizing . To minimize the error between the actual results and the theoretical values, we propose a sub-block selection method. Here, we define:

(33)(34)(35)

where denotes the average of the data enclosed in parentheses.

The specific steps of the sub-block selection method are as follows:

  1. Divide the input image into sub-blocks of size (typically ranging from 3 to 8).
  2. Calculate the average difference and between channel values within each sub-block and compute the sum of their absolute values, denoted as .
  3. Sort all sub-blocks according to their values and select sub-blocks with larger values (usually the top 20% to 30%).

The size q of sub-blocks and the proportion of selected sub-blocks are determined based on the dimensions and characteristics of the input image. The sub-block size q controls the granularity of local feature extraction: smaller values of q capture finer color variations but may lose structural texture, while larger values preserve overall texture but may dilute local pigment features. Similarly, selecting too few sub-blocks may result in inadequate data for separation, whereas selecting too many may reintroduce the effects of shadow or noise, making the separation similar to that of unfiltered input. Based on empirical evaluation, we typically set q within the range of 3–8, and retain 20% to 30% of the sub-blocks with the highest feature differences, which achieves a good balance between detail retention and shadow suppression.

By employing a sub-block selection approach, each small block preserves the same tissue structure as the original skin image while preventing excessive similarity between channels.

Feature point selection

As shown in Fig 2, the FastICA algorithm consists of three steps: data centering, data whitening, and iteration. In the pigment separation algorithms, it is usually necessary to use clear original images as the data source to ensure recognizability. However, due to the instability of the FastICA iterative process, the separation matrix often fails to converge when solving the pigment separation results. Therefore, we propose a feature point selection method based on local clustering to further sparsify the data in the skin region and choose an appropriate number of sample points to optimize the iterative convergence of FastICA.

Next, we will provide a detailed explanation of the feature point selection algorithm.

Suppose that represents the whitened data and represents the number of cluster centers.

  1. 1. Distribute K initial cluster centers evenly within the sample points:
(36)

where zj represents the sample points within a neighborhood range centered around pi.

Fig 3 provides an example of uniformly distributing initial cluster centers, where , , and . The black dots represent the sample points, and the red dots represent the initial cluster centers. In Fig 3, the dashed box represents a neighborhood centered around pi.

  1. 2. Calculate the distance between the sample point and its neighboring cluster centers, and update the labels of the sample points.

Set the search range be r. For each sample zj, if it belongs to the cluster center pi, calculate the distance from zi to the neighboring cluster centers :

(37)

where . Assign the cluster center pi with the minimum distance to zj as the cluster to which zj belongs. Update the class label of zj to i.

  1. 3. Update the cluster centers

Compute the mean value of all sample points within each cluster ci and update the cluster center pi with this value.

(38)
  1. 4. Iteration process

Repeat steps 2 and 3 until the class labels of the sample points no longer change between consecutive iterations. In practice, we define convergence as the condition where fewer than 1% of the sample points change their cluster assignments in an iteration. This threshold balances efficiency and stability: allowing a small margin avoids unnecessary iterations caused by minor fluctuations. Once this condition is met, the cluster centers corresponding to each point remain stable, and the clustering process is considered complete. If the convergence condition is too strict, the algorithm may require excessive computation without significantly improving accuracy; if too loose, it may lead to unstable or inaccurate feature point selection. The adopted condition was determined empirically based on experimental stability across a range of skin images.

  1. 5. Feature point selection method

To avoid under-sampling or overfitting during feature point selection, we adopt a controlled sampling strategy within each cluster. Assume that the number of basic feature points is m. For each cluster, we randomly select m representative sample points. If a cluster contains fewer than m samples, we retain all available points. This strategy ensures a consistent sampling density across clusters, while preventing sparse clusters from being overrepresented or dense clusters from contributing excessive redundancy.

Through empirical testing across various image sizes and clustering configurations, we found that choosing m in the range of 3–5 yields effective convergence behavior. Smaller values (e.g., m = 1 or 2) may lead to insufficient representation of cluster characteristics, while larger values (e.g., m > 5) tend to introduce overlapping or redundant information that negatively affects the stability of FastICA. In all clustering-based experiments, we set m = 3 per cluster unless otherwise specified.

This sampling scheme directly influences the input size of ICA and thus affects its convergence rate. As demonstrated in Figs 7 and 8, the local clustering approach with controlled feature selection significantly improves the success convergence rate of FastICA compared to other methods. Therefore, our method achieves a balance between computational efficiency and separation robustness by combining localized clustering with fixed-point sampling per cluster.

thumbnail
Fig 4. A sample image.

(a) The original image. (b) Rectangular skin area on forehead. Reprinted with permission from Shanghai Siyan Software Technology Co., Ltd. under a CC BY license.

https://doi.org/10.1371/journal.pone.0332849.g004

thumbnail
Fig 5. Hemoglobin images obtained from three methods.

(a) Method 1 (b) Method 2 (c) Our method. Reprinted with permission from Shanghai Siyan Software Technology Co., Ltd. under a CC BY license.

https://doi.org/10.1371/journal.pone.0332849.g005

thumbnail
Fig 6. Melanin images obtained from three methods.

(a) Method 1 (b) Method 2 (c) Our method. Reprinted with permission from Shanghai Siyan Software Technology Co., Ltd. under a CC BY license.

https://doi.org/10.1371/journal.pone.0332849.g006

Image synthesis

Following the data processing of the skin image and obtaining the separation matrix through FastICA algorithm, the synthesis of the pigment image is performed. Firstly, the elements in V are rearranged.

(39)

If the ratio satisfies: , , then , , otherwise , ; The elements in V are rearranged to satisfy the condition: .

Substitute the RGB channel values () of the original image into Eq (12), we obtain . We can obtain the pigment concentration matrix c by combining the pigment coefficient matrix V*:

(40)

In practical computations, the value of is commonly set to 0.

The melanin image and hemoglobin image are represented as follows:

(41)(42)

We can obtain the values of the B and G channels for the melanin image and hemoglobin image according to Eqs (41) and(42), respectively. By combining these values with the R channel values of the original image, we obtain the melanin image and hemoglobin image of the skin.

Ethics statement

The facial images used in this study were all original measurement images provided by Shanghai Siyan Software Technology Co., Ltd. No images from public datasets, the internet, or previously published works were used. The company conducted data collection between October 2021 and April 2022, during which written informed consent was obtained from all participants. Each participant voluntarily signed a consent form after being informed of the study’s purpose and procedures.

The facial images were captured using a professional facial imaging system based on cross-polarized light, which minimizes surface reflections and enhances the visibility of subsurface skin features such as pigmentation and vascular structures. During image acquisition, participants were seated in a controlled environment with a black background and uniform lighting to ensure consistent illumination and minimize external interference. The use of cross-polarized imaging improves the reliability of pigment separation algorithms by reducing specular reflection and enhancing contrast in melanin and hemoglobin distributions.

The individual in this manuscript has given written informed consent (as outlined in the PLOS consent form) to publish these case details. The signed consent forms are securely filed by the data provider.

Since the data were collected with full consent and no personally identifiable information is disclosed in the manuscript, and considering that the data provider ensured participant privacy and study compliance, no additional ethics committee approval was sought for this study.

Results

Dataset description and external validity

The dataset used in this study includes 50 facial images collected from 50 unique individuals, all of Chinese ethnicity, aged between 25 and 45 years. The gender distribution is approximately balanced, with 26 female and 24 male participants. Based on the Fitzpatrick skin type classification, all subjects fall within Type III to IV, which is representative of East Asian populations.

All facial images were collected using a high-resolution professional facial imaging system developed by Shanghai Siyan Software Technology Co., Ltd., equipped with cross-polarized lighting and standardized RGB sensors. During image acquisition, participants were seated in a controlled indoor environment with a black background and uniform diffuse lighting, ensuring consistent illumination and minimal specular reflections. Cross-polarized imaging was adopted to enhance subsurface pigment visibility while suppressing surface glare.

It should be noted that the current dataset is limited in diversity, as it represents a single ethnic group and skin type range (Fitzpatrick III–IV). Consequently, the external validity of the proposed method across other populations—such as individuals with Fitzpatrick Types I–II (lighter skin) or Types V–VI (darker skin)—has not yet been evaluated. However, as the method relies on data-driven mechanisms (e.g., sub-block selection and local clustering) rather than hard-coded skin characteristics, it is potentially adaptable to other skin types. Future work will expand the dataset to include broader ethnic and phototype diversity, and incorporate clinical validation with dermatologists to assess generalizability across clinical and demographic settings.

Performance of sub-block selection algorithm

This section presents the evaluation of the sub-block selection algorithm. The experimental data consists of 50 face images captured under cross-polarized light conditions. The original image, as shown in Fig 4(a), has dimensions of 1501 pixels wide and 2301 pixels high. For the purpose of analysis, a rectangular region of skin area measuring 300 pixels in width and 600 pixels in height is chosen as the input for data analysis. Care has been taken to exclude non-skin areas such as eyes, nose, and eyebrows, to minimize interference from unrelated data.

In this study, a rectangular region on the forehead was manually selected as the input region for pigment separation, as it provides a relatively large, flat, and uniform skin area. Non-skin regions such as the eyes, eyebrows, and nose were manually excluded to minimize interference. The same forehead region was used consistently across all comparative methods to ensure fairness in evaluation.

The proposed method does not require a specific region shape or size, as the sub-block selection and local clustering are applied only within the selected region. During local clustering, no special treatment is applied to the boundary pixels of the selected region. This is because the algorithm assumes that human facial skin exhibits local texture similarity, and the clustering process is based on local neighborhoods rather than global continuity. Therefore, minor discontinuities at the edges do not significantly affect the clustering results or convergence performance.

In the subsequent experiments, the selected rectangular skin image from the forehead area is depicted in Fig 4(b). 20% of the sub-block pixels are chosen to recombine the input data using the sub-block selection method. A total of 7200 sub-blocks are obtained, which are then substituted into Eq (12) to calculate the corresponding data matrix C.

The experimental results of the shadow removal method proposed by Tsumura et al. [16] (hereinafter referred to as Method 1) and the DL-ICA method proposed by Xu et al. [18] (hereinafter referred to as Method 2), which improves upon their earlier framework [17] by incorporating the difference of each color channel in log space to eliminate surface reflection interference, are compared with the experimental results of the sub-block selection algorithm.

Fig 5 illustrates the hemoglobin images obtained from the three methods. Compared with the original image, both Method 1 and Method 2 (Fig 5(a) and 5(b)) are able to capture the general distribution of hemoglobin. However, they fail to accurately differentiate hemoglobin from melanin in certain areas. For example, melanin spots near the nasal bridge are erroneously included in the hemoglobin images generated by Method 1 and Method 2, as highlighted in the enlarged region. This indicates an insufficient separation between the two pigments. In contrast, our method (Fig 5(c)) produces a hemoglobin map that better suppresses melanin interference, particularly around the bridge of the nose, the cheeks, and the area around the eyes. The evaluation is based on visual comparison with the original image, where clearer boundaries and pigment-specific localization indicate a more accurate separation.

Fig 6 shows the melanin images obtained from the three methods. Method 1 (Fig 6(a)) can highlight melanin spots but fails to suppress shadow-induced artifacts, especially on both sides of the face and the nasal area. These regions, which appear dark due to lighting, are incorrectly interpreted as melanin. Method 2 (Fig 6(b)) provides a more comprehensive estimation of melanin distribution and corrects some shadow effects, but it lacks the spatial resolution to capture local pigment spots. Our method (Fig 6(c)) combines the advantages of both approaches. It effectively removes shadow interference while preserving detailed melanin spot information, as shown in the enlarged area. This improvement benefits from the proposed sub-block selection algorithm, which adaptively selects facial regions to enhance pigment separability while mitigating lighting artifacts.

Although all experiments in this section were conducted on the forehead region to ensure consistency and minimize the interference from occlusions and non-skin elements, the proposed method is not limited to this area. The sub-block selection and local clustering algorithms are region-independent and can be applied to other facial areas such as the eyebrow and eye. To qualitatively illustrate this, we provide additional examples in Supplementary S1 Fig showing pigment separation results when applying our method to rectangular regions on the eyebrow, eye, and nose. These regions exhibit more complex textures, curvature, and specular reflections, which can negatively impact separation quality. As shown, the pigment maps generated from these areas are less stable compared to those from typical skin regions. This supports our choice of using the forehead for performance benchmarking.

Performance of local clustering

This section presents the experimental results of feature point selection using local clustering. Six facial images captured under cross-polarized light were used, and four methods were evaluated: the shadow removal method (Method 1), the DL-ICA method (Method 2), the Sub-block selection algorithm (Method 3), and the proposed local clustering method (our method), which is implemented based on Method 3.

In all experiments, the same facial region was used across methods. Input sizes ranged from 4,000–75,000 pixels, with a step of 500 pixels. Since FastICA involves random initialization of the separation matrix, each method was run 100 times per input size to assess its stability, and the success convergence rate was calculated accordingly.

To emphasize the improvement achieved by our method over its base method (Method 2), Fig 7 presents a direct comparison between the two. Fig 8 provides a comprehensive comparison of all four methods, where each point represents the average convergence rate from 10 batches of experiments. The results show that our method consistently achieves higher convergence rates, especially as image size increases. A high convergence rate is crucial for real-world applications. Poor convergence can result in inconsistent pigment separation, requiring repeated parameter tuning or even re-acquisition of images, thereby increasing time and labor costs.

Table 1 presents the average success convergence rates of the four methods. Our method exhibits an average success convergence rate of 0.9276, which is higher than the other three methods. Compared to Method 3, we can observe that the local clustering method significantly improves convergence efficiency. In addition, Figs 911 present the results of pigment separation on three facial images using our method. It is evident from Figs 911 that our method effectively separates the hemoglobin and melanin in skin images. The experiments demonstrate that our method, using single-image data, exhibits higher stability in pigment separation and maintains better separation effects when processing the same fixed skin area. This advantage becomes more pronounced as the volume of image data increases.

thumbnail
Table 1. Total average convergence rate of the four methods.

https://doi.org/10.1371/journal.pone.0332849.t001

In our proposed method, certain fixed parameters are used, such as sub-block size and selection ratio (Section: Sub-block selection algorithm), as well as the convergence threshold in local clustering (Section: Feature point selection). These values were determined empirically and have a measurable impact on the convergence rate and separation quality. However, as discussed in earlier sections, the convergence condition was designed to balance efficiency and accuracy, and does not negatively affect the overall performance.

Regarding the compared methods (Method 1 and Method 2), no additional parameter tuning or manual adjustment was applied; we implemented these methods strictly according to their respective original literature [16,17]. All methods were tested using the same input region, which was manually selected from the forehead area, and all algorithms were applied to identically preprocessed data to ensure a fair comparison.

Therefore, the observed improvement in convergence rate can be attributed to the design of the proposed method, rather than to differences in data preprocessing or parameter tuning between methods.

To ensure a fair and reproducible comparison, all baseline methods were implemented in accordance with their original designs and parameter configurations:

  • Method 1 (Tsumura et al. [16]): Used default settings for shading removal and ICA computation, as described in the original study.
  • Method 2 (DL-ICA [18]): Followed the procedure of taking logarithmic differences between RGB channels and applying FastICA directly to the transformed data. The FastICA implementation used the standard whitening and fixed-point iteration scheme with no additional tuning.

For all methods, the same input region (forehead skin) was used, and no extra pre-processing or filtering was applied beyond what was prescribed in the original publications. We did not perform hyperparameter sweeps for the baseline methods, as they do not include tunable parameters in their canonical forms, and the goal was to replicate their reported behavior rather than optimize them under new conditions. This consistent evaluation strategy allows us to highlight the performance improvements achieved by our proposed framework, which introduces data selection and clustering mechanisms not present in prior works.

In this study, the convergence rates presented in Table 1 are based on randomly selected facial images, with each image representing a unique subject. While we ensured subject independence, we did not perform formal statistical tests such as paired t-tests, nor did we report standard deviations or confidence intervals. Our choice was motivated by the exploratory nature of this study and the limited dataset size. We acknowledge this as a limitation and plan to incorporate more rigorous statistical evaluation—including reporting mean ± SD, 95% CIs, and effect sizes—in future work.

Parameter sensitivity analysis

In our method, three key parameters may affect the performance of pigment separation: the sub-block size (q), the number of clustering centers (k), and the percentage of selected sub-blocks used for ICA. To evaluate the sensitivity of each parameter independently, we conducted controlled experiments where only one parameter was varied at a time, while the other two were fixed to reasonable default values.

Unless otherwise specified, we set the sub-block size q to 5, the number of clustering centers k to 1200, and the selected block percentage to 25%. These values were chosen based on empirical performance and represent a good trade-off between efficiency and accuracy in our method. The following subsections detail the sensitivity analysis for each parameter individually.

To evaluate the sensitivity of our method to the sub-block size q, we conducted experiments on five cross-polarized facial images, varying q from 1 to 15. For each value of q, we measured the convergence rate of the FastICA algorithm, defined as the proportion of 10 runs that successfully completed pigment separation. As shown in Fig 12, the convergence rate increases quickly when q grows from 1 to 3, and stays at a relatively high level between q = 3 and q = 8 across all five images. This supports our empirical choice of using q within this range, which offers a good balance between capturing local texture details and keeping the overall structure intact. When the sub-block size is too small, the results become unstable due to noise. When it is too large, important local pigment features may be smoothed out, making separation less accurate.

To further evaluate the robustness of our method, we conducted a sensitivity analysis on the number of clustering centers k, which determines how many representative samples are used in FastICA. We varied k from 100 to 3000 and measured the convergence rate across five cross-polarized facial images. For each value of k, we ran the algorithm 10 times and calculated the proportion of runs that successfully completed the pigment separation task.

As shown in Fig 13, the convergence rate increases quickly as k grows from 100 to around 1100, suggesting that more representative samples lead to better and more stable ICA performance. However, when k becomes too large (above 1300), the convergence rate starts to fluctuate and even slightly drops in some cases. This may be caused by too many similar or overlapping samples being included, which can reduce the effectiveness of the separation. Overall, the best results are achieved when k is between 900 and 1500, where all five images show consistently high convergence rates above 90%. This supports our choice of using a moderate number of clusters to ensure both accuracy and efficiency.

thumbnail
Fig 7. Success convergence rates of Method 2 and our method.

https://doi.org/10.1371/journal.pone.0332849.g007

thumbnail
Fig 9. Pigment separation results of sample image 1. Reprinted with permission from Shanghai Siyan Software Technology Co., Ltd. under a CC BY license.

https://doi.org/10.1371/journal.pone.0332849.g009

thumbnail
Fig 10. Pigment separation results of sample image 2. Reprinted with permission from Shanghai Siyan Software Technology Co., Ltd. under a CC BY license.

https://doi.org/10.1371/journal.pone.0332849.g010

thumbnail
Fig 11. Pigment separation results of sample image 3. Reprinted with permission from Shanghai Siyan Software Technology Co., Ltd. under a CC BY license.

https://doi.org/10.1371/journal.pone.0332849.g011

thumbnail
Fig 12. Convergence rate of FastICA under different sub-block sizes q.

https://doi.org/10.1371/journal.pone.0332849.g012

thumbnail
Fig 13. Convergence rate of FastICA under different cluster number k.

https://doi.org/10.1371/journal.pone.0332849.g013

We also investigated the sensitivity of our method to the percentage of selected blocks used for ICA. After clustering, we varied the proportion of retained blocks from 10% to 50% and evaluated the convergence rate on five cross-polarized facial images. As shown in Fig 14, the convergence rate increases from 10% to 25%, reaching the highest performance between 25% and 30%. This suggests that using too few blocks may lose important structural information, while including too many may introduce redundant or noisy regions that hinder separation quality. The results support our empirical choice of selecting around 25%–30% of clustered regions, which provides a good trade-off between data compactness and separation reliability.

thumbnail
Fig 14. Convergence rate of FastICA with different selected sub-block percentages.

https://doi.org/10.1371/journal.pone.0332849.g014

Runtime analysis

To comprehensively evaluate the computational efficiency of pigment separation methods, we conducted runtime comparisons under a standardized environment using MATLAB R2019a on a PC equipped with an Intel® Core™ i7-13700 processor and 32GB RAM. Five face images of varying complexity were processed by Method 1, Method 2, and our proposed approach. The execution time for each method is summarized in Table 2.

thumbnail
Table 2. Execution time for Method 1, Method 2, and our method (second).

https://doi.org/10.1371/journal.pone.0332849.t002

Our method achieves a 23.3% reduction in average runtime (0.726 seconds), compared to Method 1 (0.946 seconds) and Method 2 (0.947 seconds). This improvement results from two algorithmic optimizations. First, the sub-block selection phase eliminates low-information regions (e.g., homogeneous or shadowed areas), reducing the initial data volume by approximately 75%. Second, the local clustering step condenses the remaining data into 1,200 representative feature points, significantly reducing the input size for FastICA—the most computationally expensive component. This dual-stage compression effectively mitigates the quadratic time complexity associated with FastICA, leading to faster overall execution.

Conclusion

This study focuses on exploring skin pigment separation methods. Firstly, precise separation of skin pigments is achieved through the sub-block selection algorithm. Subsequently, local clustering is employed for feature point selection, resulting in enhanced convergence efficiency and improved overall stability of the pigment separation algorithm. Future research will involve further investigations and quantitative evaluations of the separation effectiveness.

Future research will involve further investigations and quantitative evaluations of the separation effectiveness. At present, such quantitative analysis is not conducted in this study due to several practical limitations. Specifically, a reliable quantitative assessment requires establishing a mapping model between image pixel values and actual pigment concentrations. This process demands a large amount of ground-truth data, which involves standardized imaging equipment, controlled acquisition environments, and accurate biochemical or optical measurement systems for melanin and hemoglobin concentrations. Additionally, variations across different skin types, measurement techniques, and quantification protocols must be considered to ensure consistency. These factors collectively pose significant challenges that need to be addressed before a robust quantitative evaluation framework can be implemented.

Although oxygen saturation analysis was not within the scope of this study, the proposed method could theoretically be extended to this domain in future work. Prior studies, such as the hyperspectral imaging system described in [11], have demonstrated the feasibility of quantifying oxygen saturation by acquiring images across multiple wavelengths and applying spectral absorption models to estimate the concentrations of chromophores including melanin, oxyhemoglobin, and deoxyhemoglobin.

In contrast, our method relies solely on standard RGB images, which inherently limits spectral resolution. Nevertheless, two potential avenues may allow for estimating oxygen saturation from RGB data. The first involves further decomposing the hemoglobin component obtained by our method into its oxygenated and deoxygenated forms. This would likely require either fixed separation coefficients, estimated empirically, or the use of synthetic spectral data to model the relationship between hemoglobin states and oxygen saturation.

The second approach would be data-driven: by collecting a large dataset of facial images annotated with corresponding oxygen saturation levels (e.g., from pulse oximetry), a supervised learning model could be trained to predict spatial oxygen saturation maps. These strategies, while challenging, represent promising directions for expanding the clinical applicability of our method in the future.

Although metrics such as SSIM, PSNR, or inter-class variance are commonly used in image quality assessment or segmentation tasks, they are not applicable in our scenario due to the absence of ground truth pigment maps. Unlike synthetic images or standard segmentation benchmarks, skin pigment distributions vary significantly across individuals and cannot be objectively measured without invasive biochemical or optical quantification. Therefore, commonly used internal metrics (e.g., SSIM, PSNR) that require a reference image are not meaningful in this context. Similarly, inter-class variance assumes well-defined spatial regions, which does not align with the continuous nature of pigment distributions.

As explained earlier, a reliable quantitative evaluation of pigment separation would require a comprehensive ground-truth dataset with pixel-level melanin and hemoglobin concentrations, which is currently impractical to obtain. We acknowledge this limitation and plan to explore alternative evaluation strategies in future work, potentially through synthetic data or collaborative clinical imaging studies.

In this study, we selected DL-ICA and related ICA-based methods as baselines due to their relevance to the blind source separation formulation of pigment decomposition. While deep learning approaches such as GANs and U-Net variants have shown strong performance in tasks like skin lesion segmentation and facial image enhancement, they typically require large-scale annotated datasets and are focused on high-level semantic features rather than low-level pigment separation. Moreover, the lack of pixel-level ground truth for melanin and hemoglobin concentrations currently limits the feasibility of supervised deep models in this domain. We acknowledge this as a promising future direction and plan to explore hybrid approaches that combine data-driven learning with physical priors in future work.

Supporting information

S1 Fig. Hemoglobin and melanin images obtained from our method in rectangular skin regions: eyebrow, eye and nose.

Reprinted with permission from Shanghai Siyan Software Technology Co., Ltd. under a CC BY license.

https://doi.org/10.1371/journal.pone.0332849.s001

(DOCX)

References

  1. 1. Kato M, Sato H, Mizokami Y. Effect of skin colors due to hemoglobin or melanin modulation on facial expression recognition. Vision Res. 2022;196:108048. pmid:35429703
  2. 2. Li B, Mei H, Zhou Z, Yang J, Zhang Y, Qi F. The main causes and corresponding solutions of skin pigmentation in the body. J Dermatol Sci Cosm Technol. 2024;1(2):100020.
  3. 3. Saravanan TS, Gopikrishnan V, Manikkam R, Kaari M, Annamalai KK, Song J, et al. Translational value of natural pigments with reference to healthcare and cosmetic applications. Translational research in biomedical sciences: recent progress and future prospects. Springer; 2024. pp. 235–50.
  4. 4. Pathania YS, Apalla Z, Salerni G, Patil A, Grabbe S, Goldust M. Non-invasive diagnostic techniques in pigmentary skin disorders and skin cancer. J Cosmet Dermatol. 2022;21(2):444–50. pmid:34724325
  5. 5. Smak Gregoor AM, Sangers TE, Bakker LJ, Hollestein L, Uyl-de Groot CA, Nijsten T, et al. An artificial intelligence based app for skin cancer detection evaluated in a population based setting. NPJ Digit Med. 2023;6(1):90. pmid:37210466
  6. 6. Young AR. Chromophores in human skin. Phys Med Biol. 1997;42(5):789–802. pmid:9172259
  7. 7. Dawson JB, Barker DJ, Ellis DJ, Grassam E, Cotterill JA, Fisher GW, et al. A theoretical and experimental study of light absorption and scattering by in vivo skin. Phys Med Biol. 1980;25(4):695–709. pmid:7454759
  8. 8. Feather JW, Ellis DJ, Leslie G. A portable reflectometer for the rapid quantification of cutaneous haemoglobin and melanin. Phys Med Biol. 1988;33(6):711–22. pmid:3406055
  9. 9. Feather JW, Hajizadeh-Saffar M, Leslie G, Dawson JB. A portable scanning reflectance spectrophotometer using visible wavelengths for the rapid measurement of skin pigments. Phys Med Biol. 1989;34(7):807–20. pmid:2780799
  10. 10. Masuda Y, Yamashita T, Hirao T, Takahashi M. An innovative method to measure skin pigmentation. Skin Res Technol. 2009;15(2):224–9. pmid:19416468
  11. 11. Nkengne A, Robic J, Seroul P, Gueheunneux S, Jomier M, Vie K. SpectraCam® : A new polarized hyperspectral imaging system for repeatable and reproducible in vivo skin quantification of melanin, total hemoglobin, and oxygen saturation. Skin Res Technol. 2018;24(1):99–107. pmid:28771832
  12. 12. Cotton S, Claridge E. Developing a predictive model of human skin coloring. Medical Imaging 1996: Physics of Medical Imaging. SPIE; 1996.
  13. 13. Takiwaki H, Kanno Y, Miyaoka Y, Arase S. Computer simulation of skin color based on a multilayered skin model. Skin Res Technol. 1997;3(1):36–41. pmid:27333171
  14. 14. Chen L, Kun Z, Hsiang-Tao Wu, Lin S. Physically-based simulation of cosmetics via intrinsic image decomposition with facial priors. IEEE Trans Pattern Anal Mach Intell. 2019;41(6):1455–69. pmid:29993567
  15. 15. Tsumura N, Haneishi H, Miyake Y. Independent component analysis of spectral absorbance image in human skin. Opt Rev. 2000;7(6):479–82.
  16. 16. Tsumura N, Ojima N, Sato K, Shiraishi M, Shimizu H, Nabeshima H, et al. Image-based skin color and texture analysis/synthesis by extracting hemoglobin and melanin information in the skin. In: ACM SIGGRAPH 2003 Papers. 2003. pp. 770–9.
  17. 17. Xu S, Ye X, Wu Y, Giron F, Leveque JL, Querleux B. Automatic skin decomposition based on single image. Comput Vis Image Understand. 2008;110(1):1–6.
  18. 18. Xu S. Skin image synthesis based on pigment concentration distribution. In: International Conference on Electronic Information Technology and Intellectualization. 2016.
  19. 19. Goodfellow IJ, Pouget-Abadie J, Mirza M, Xu B, Warde-Farley D, Ozair S. Generative adversarial nets. Adv Neural Inf Process Syst. 2014;27.
  20. 20. Kojima K, Shido K, Tamiya G, Yamasaki K, Kinoshita K, Aiba S. Facial UV photo imaging for skin pigmentation assessment using conditional generative adversarial networks. Sci Rep. 2021;11(1):1213. pmid:33441756
  21. 21. Jung G, Lee J, Kim S. Integrated deep learning approach for generating cross-polarized images and analyzing skin melanin and hemoglobin distributions. Biomed Eng Lett. 2024;14(6):1355–64. pmid:39465115
  22. 22. Jung G, Kim S, Lee J, Yoo S. Deep learning-based optical approach for skin analysis of melanin and hemoglobin distribution. J Biomed Opt. 2023;28(3):035001. pmid:36992693
  23. 23. Hyvärinen A, Oja E. Independent component analysis: algorithms and applications. Neural Netw. 2000;13(4–5):411–30. pmid:10946390
  24. 24. Kanitakis J. Anatomy, histology and immunohistochemistry of normal human skin. Eur J Dermatol. 2002;12(4):390–9; quiz 400–1. pmid:12095893
  25. 25. Rose HE. Breakdown of the Lambert-Beer Law. Nature. 1952;169(4294):287–8.
  26. 26. Adali T, Hualiang Li, Novey M, Cardoso J-F. Complex ICA using nonlinear functions. IEEE Trans Signal Process. 2008;56(9):4536–44.
  27. 27. Oja E. The nonlinear PCA learning rule in independent component analysis. Neurocomputing. 1997;17(1):25–45.
  28. 28. Bell AJ, Sejnowski TJ. An information-maximization approach to blind separation and blind deconvolution. Neural Comput. 1995;7(6):1129–59. pmid:7584893