Next Article in Journal
Top-k Graph Similarity Search Algorithm Based on Chi-Square Statistics in Probabilistic Graphs
Next Article in Special Issue
A Tracking-Based Two-Stage Framework for Spatio-Temporal Action Detection
Previous Article in Journal
Adapting Pre-Trained Self-Supervised Learning Model for Speech Recognition with Light-Weight Adapters
Previous Article in Special Issue
SAR Image Ship Target Detection Based on Receptive Field Enhancement Module and Cross-Layer Feature Fusion
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Quaternion Chromaticity Contrast Preserving Decolorization Method Based on Adaptive Singular Value Weighting

1
School of Software, East China Jiaotong University, Nanchang 330013, China
2
School of Information Science and Engineering, Shandong Normal University, Jinan 250358, China
*
Author to whom correspondence should be addressed.
Electronics 2024, 13(1), 191; https://doi.org/10.3390/electronics13010191
Submission received: 6 December 2023 / Revised: 30 December 2023 / Accepted: 31 December 2023 / Published: 1 January 2024
(This article belongs to the Special Issue Modern Computer Vision and Image Analysis)

Abstract

:
Color image decolorization can not only simplify the complexity of image processing and analysis, improving computational efficiency, but also help to preserve the key information of the image, enhance visual effects, and meet various practical application requirements. However, with existing decolorization methods it is difficult to simultaneously maintain the local detail features and global smooth features of the image. To address this shortcoming, this paper utilizes singular value decomposition to obtain the hierarchical local features of the image and utilizes quaternion theory to overcome the limitation of existing color image processing methods that ignore the correlation between the three channels of the color image. Based on this, we propose a singular value adaptive weighted fusion quaternion chromaticity contrast preserving decolorization method. This method utilizes the low-rank matrix approximation principle to design a singular value adaptive weighted fusion strategy for the three channels of the color image and implements image decolorization based on singular value adaptive weighting. To address the deficiency of the decolorization result obtained in this step, which cannot maintain global smoothness characteristics well, a contrast preserving decolorization algorithm based on quaternion chromaticity distance is further proposed, and the global weighting strategy obtained by this algorithm is integrated into the image decolorization based on singular value adaptive weighting. The experimental results show that the decolorization method proposed in this paper achieves excellent results in both subjective visual perception and objective evaluation metrics.

1. Introduction

Converting color images to grayscale is a significant technique in the field of image processing. This transformation may seem simple, but the value and wide range of applications it encompasses should not be overlooked. Color images are typically composed of three color channels: red, green, and blue. Converting them to grayscale simplifies these into a single channel representing luminance. This simplification plays a key role in reducing data complexity, thereby greatly enhancing the efficiency of image processing and computation.
Grayscale images hold unique application value across multiple domains [1]. Their importance is particularly evident in tasks such as pattern recognition [2], moving target tracking [3], and image segmentation [4], where complex color information might interfere with the discernment of critical details. In the field of medical imaging [5,6], grayscale images are widely used as they enhance the visibility of structural details, aiding physicians in making more accurate diagnoses. Similarly, in satellite imagery and aerial photography [7], grayscale images are favored for their high clarity and contrast, providing a clearer perspective for analysis and interpretation. Additionally, grayscale images have a unique aesthetic value in the art world [8]. They can convey rich emotions and textures in a simple form, something that is often challenging for color images. In cutting-edge areas of computer vision and machine learning [9,10], the role of grayscale images is indispensable. These provide algorithms with a simplified form of visual data, making the processing more efficient while still retaining the essential structure and texture information of the images. This simplification not only improves the efficiency of algorithm training and reduces computational burden but often leads to significant improvements in the performance of machine learning models.
Existing decolorization methods primarily fall into two categories: global and local methods. Global methods, such as basic grayscale conversion and luminance-based approaches, apply a uniform transformation across the entire image. While these methods are computationally efficient, they often fail to preserve local image features like textures and structures, leading to a loss of detail in areas with subtle color differences. Local methods, including edge-aware decolorization and region-based techniques, focus on preserving edge information and regional contrasts. However, these methods can sometimes overemphasize edges or create artifacts, thereby distorting the texture and structural integrity of the original image. Moreover, many of these local methods are computationally intensive, making them less suitable for real-time applications.
Both global and local methods often struggle to balance the preservation of local details with overall smoothness, resulting in the loss of texture and structural information. This is because these existing decolorization techniques rely on simple linear transformations or fixed mappings, failing to fully consider the complex relationships between color channels and their impact on image features. For instance, many existing methods use luminance-based techniques, converting color images to grayscale based on brightness values. While effective in certain scenarios, these methods overlook chromatic information, which plays a crucial role in preserving texture details and structural information. Consequently, these methods can produce faded images and noticeable artifacts, such as color bleed or loss of fine details. Furthermore, most of these methods treat the three color channels (red, green, blue) as independent entities, disregarding their interrelations. This approach overlooks the inherent interdependency between channels, leading to disjointed handling of texture and structural information.
In summary, the main limitations of current color image grayscale conversion methods lie in information loss and the blurring of details. The decolorization method based on weighted averaging simplifies multiple color channels of a color image into a single grayscale channel. This simplification often results in the loss of a large amount of color information, making the converted grayscale image lack the rich details, color layers, and contrast of the original image. This loss of information not only reduces the visual effect of the image, but may also have a negative impact on the accuracy of subsequent image processing and analysis. In addition, existing decolorization methods only consider brightness information during the decolorization process, ignoring the interaction and correlation between color channels, often resulting in blurring and confusion of textures and details. In complex image scenes with rich natural textures or multiple similar color regions, this challenge is particularly evident, making it difficult to accurately distinguish the boundaries and details of different regions after decolorization, which in turn poses challenges for image segmentation, feature extraction, and object recognition tasks. Although there are many approaches that attempt to address these two major limitations, there has been no good solution due to the inherent complexity of balancing local detail preservation and global image integrity.
This paper addresses the shortcomings of existing decolorization methods, which fail to adequately maintain both local detail features and global smooth features simultaneously. It proposes a quaternion-based contrast-preserving decolorization method with singular value adaptive weighting, which more effectively preserves key information and thus enhances the quality and clarity of grayscale images. This method utilizes quaternion theory to overcome the limitations of existing color image processing methods that neglect the correlation between the three channels of color images, failing to maintain global smooth features. It also uses the theory of low-rank approximation decomposition of singular values to overcome the limitations of existing color image processing methods that fail to maintain local detail features of color images effectively. The contributions of this paper are primarily in the following four aspects:
(1)
Proposing a contrast-preserving decolorization algorithm based on quaternion chromatic distance.
(2)
Proposing a singular value-weighted fusion decolorization algorithm based on low-rank matrix approximation.
(3)
Proposing an adaptive singular value-weighted fusion strategy to combine the above two algorithms.
(4)
Conducting extensive experimental validation of the proposed decolorization method. The experimental results show that the quaternion-based contrast-preserving decolorization method with singular value adaptive weighting proposed in this paper achieves excellent results in both subjective visual perception and objective evaluation metrics.
This paper is organized as follows: In Section 2, related studies on image decolorization are briefly introduced. Section 3 introduces the decolorization method based on quaternion chromaticity contrast preservation. Section 4 introduces the decolorization method based on singular value adaptive weighted fusion. Section 5 introduces the strategy of fusing the two decolorization methods to obtain the final proposed singular value adaptive weighted quaternion chromaticity contrast preservation decolorization method. Section 6 describes the experimental results and analysis. Finally, we provide our conclusions in Section 7.

2. Related Work

Image decolorization is the conversion of a color image with three channels into a gray image with a single channel. With the advantages of low data redundancy and fast processing, graying images can be used for the efficient calculation of image gradient information. However, image decolorization shrinks the size of the input image and certainly cannot preserve full detail information of the original color images [11]. To retain as much information as possible from the original input color images, a plethora of decolorization methods have been continuously proposed.
Traditional image decolorization algorithms typically extract the luminance channel values to produce a final grayscale image after converting the RGB color space of the input image to another color space [12]. These methods are unable to discern between areas of the picture that have distinct colors but the same luminance. In addition to the traditional method, other researchers have proposed a variety of innovative image decolorization algorithms to better preserve the contrast, structure and other feature information of the original color image in the obtained grayscale images [13]. Depending on whether the mapping function can be applied to all pixels of the input image, these algorithms can be classified into global mapping methods and local mapping methods.
Global mapping methods usually apply the same transformation to the over-all pixels of a color image. Kuk et al. [14] have considered both local and global contrast and measure contrast by using gradient fields. Grund land et al. [15] have proposed a dimensionality reduction analysis method to make real-time improvements using Gaussian pairing for image sampling and principal component analysis. Song et al. [16] have presented a global energy function that transforms the color image grayscale problem into a supervised dimensionality reduction and regression problem. Lu et al. [17] have developed a second-order multi-variate parametric model and have minimized the energy function to maintain image contrast. Zhou et al. have proposed a visual contrast model based on saliency [18]. Chen et al. have chosen gradient and saliency as grayscale processes to preserve the features of local and global visual perception [19]. Because it is the same mapping of all pixels, it is highly possible that the local features of the color image will not be preserved after decoloring the image.
In contrast with the global method, the local mapping methods use different mapping functions for pixels. Bala et al. [12] have introduced high-frequency chromaticity information into the luminance channel, which locally preserved the differences between adjacent colors. Neumann et al. [20] have solved the gradient field inconsistency problem by treating color and luminance as gradient fields. Ancuti et al. [21] have improved the matching performance by local operators, which avoided the use of color quantization or the corruption of gradient information.
The grayscale image obtained by the local mapping method can maintain partial structural information and local contrast information of the image. However, these methods are often mapped unevenly, which leads to the problems of halos and noise in the grayscale results. Moreover, the application of local methods often requires a huge amount of computation.
In the field of image processing, mixed methods have effectively addressed both the global structure and local details in color images. Liu and Zhang [22] have demonstrated the efficacy of a full convolutional network when integrating a diverse range of features, including global and local semantics, as well as exposure aspects, into their methodology. This approach marks a significant stride in capturing the essence of color images in a comprehensive manner. Yu et al. [23] have developed a two-stage decolorization method involving histogram equalization and local variance maximization. Zhang and Wang [24] have introduced a parametric model combining image entropy with the Canny edge retention ratio for decolorization. Additionally, Yu et al. [25] have utilized an enhanced non-linear global mapping method for grayscale conversion, followed by a detail-enhancing algorithm based on rolling guided filtering.

3. Quaternion Chromaticity Contrast Preserving Decolorization

Many studies have shown that using the theory and methods of quaternions to study color image processing techniques can overcome many of the shortcomings and deficiencies of existing color image processing methods [26,27,28]. Using the representation of quaternions, a color pixel with three components can be represented as a whole, and the relevant operation rules of quaternions can be used to process color images without destroying the correlation between the three channels of color pixels. A color pixel q with three channels r, g and b, can be represented as a pure quaternion:
q = r i + g j + b k
The main diagonal of a pure quaternion space is defined as a grayscale line, because all points on this line correspond to grayscale pixels. Based on the concept of the grayscale line, Sangwine et al. [29] derived and analyzed the rotation theory of quaternions. According to the rotation theory of quaternions, a unit quaternion and its conjugate quaternion can be expressed as:
{ R = ( i + j + k ) / 3 R ¯ = ( i j k ) / 3
Using the related operations of quaternions, the result of R q R ¯ represents the new quaternion obtained by rotating the quaternion q by 180 degrees around the grayscale line. Using geometric calculation rules, the projection of any quaternion on the grayscale line can be obtained as q l :
q l = ( q + R q R ¯ ) / 2
The grayscale line represents the brightness level of the color pixel, so q l can represent the brightness component of the color pixel. In addition to the brightness component, the color pixel also contains a chromaticity component. Because, in the quaternion space, the color pixel and its brightness component are represented by appropriate amounts, it can be considered that the color pixel is obtained by adding the two vectors of the brightness component and the chromaticity component, that is,
q = q l + q s
where q s represents the chromaticity component of the color pixel. According to Formulas (3) and (4), we can obtain the following formula for calculating the chromaticity component of a color pixel:
q s = ( q R q R ¯ ) / 2
Therefore, the chromaticity difference between two color pixels q 1 and q 2 can be calculated by the following formula
q s d = q s 1 - q s 2
where q s 1 represents the chromaticity component of color pixel q 1 , and q s 2 represents the chromaticity component of color pixel q 2 . It is clear that the chromaticity differences calculated by Equation (6) are all quaternions, and cannot be directly used for distance measurement, as distance is a scalar. A common approach is to use the magnitude of the quaternion to represent the distance, that is, the chromaticity distance d s between two color pixels can be expressed as:
d s ( q 1 , q 2 ) = | q s d | / 2
The constant in Formula (7) is used to normalize the distance, ensuring that the maximum value of the chromaticity distance is 255. This ensures that the chromaticity distance has the same dimension as the distance between single-channel grayscale pixels.
This article uses this chromaticity distance formula to improve the real-time contrast preserving grayscale method proposed by Lu et al. [17] and proposes a contrast preserving grayscale method based on quaternion chromaticity distance. The specific implementation process is as follows:
Step 1: Construct an objective function for contrast preservation:
{ E ( I ) = x , y Ω ln ( f 1 ( x , y ) + f 2 ( x , y ) ) f 1 ( x , y ) = α x , y exp ( ( Δ g x , y   +   δ x , y ) 2 2 σ 2 ) f 2 ( x , y ) = ( 1 α x , y ) exp ( ( Δ g x , y     δ x , y ) 2 2 σ 2 )
where I represents the input color image, ( I r , I g , I b ) is the grayscale value corresponding to the three channels of the color image; x and y represent the positions of the two pixels; Ω represents a specified region; Δ g x , y represents the grayscale contrast between the two pixels after grayscale processing; δ x , y represents the chromaticity contrast between the two pixels; σ is a given constant used to control the color distribution in the color image; α x , y is a weight value determined according to the following formula:
α x , y = { 1.0 , r x r y , g x g y , b x b y 0.5 , o t h e r w i s e
Step 2: After reducing the image to a size of 64 × 64 using the nearest neighbor interpolation method, the color image is gray scaled according to the given combination coefficients, ( w r , w g , w b ) . The gray-scaling process can be represented by the following formula:
g = w r I r + w g I g + w b I b
Step 3: Selecting the optimal combination coefficients as the coefficients for grayscale conversion of the color image. The optimal combination coefficients refer to the set of coefficients that minimize the value of the objective function, which can be expressed mathematically as:
min E ( I ) , s . t . w r + w g + w b = 1

4. Singular Value Adaptive Weighted Refusion Decolorization

Singular value decomposition (SVD) is a matrix numerical analysis tool that is widely used in image processing [30], typically focusing on image quality evaluation, image compression, image watermarking, and other fields. For a real matrix A with size m × n , the singular value decomposition can be expressed as:
A = U Σ V T
where U is an m × m orthogonal matrix, V is an n × n orthogonal matrix, and Σ is an m × n diagonal matrix with singular values on the diagonal and 0 elsewhere. The singular values decrease sequentially down the diagonal. In image processing tasks based on singular value decomposition, most of the singular values in the Σ matrix are split, and then the rows and columns of the U matrix and V matrix are split to achieve matrix reorganization for extracting important features in the image. Let U = [ u 1 , u 2 , , u m ] and V = [ v 1 , v 2 , , v n ] . According to the matrix correlation operation rules, the matrix A can be further decomposed into the following vector product linear combination:
A = i = 1 r δ i u i v i T = δ 1 u 1 v 1 T + δ 2 u 2 v 2 T + + δ r u r v r T
where σ n represents the singular value and satisfies the size relationship σ 1 > σ 2 > σ 3 > > σ n . From the above formula, it can be seen that each singular value has its corresponding energy contribution when the matrix is restructured. In practical scenarios, the larger the singular value, the greater the energy contribution, and the more features are retained after restructuring. A single-channel image I m g can be viewed as a matrix. Let I m g _ i = δ i u i v i T , according to the Formula (13), we can obtain the following result:
I m g = I m g _ 1 + I m g _ 2 + + I m g _ n
where I m g _ n represents the nth restructuring matrix of image I m g . The amount of information contained in the original image is determined by the size of the singular value σ n corresponding to the restructuring matrix. The larger the singular value, the greater the information energy, representing the richer the features contained in the part. For color images, the size of the singular value for each channel represents the proportion of information energy in the entire color image. Based on this analysis, the proportion of the singular value size can be used as an adaptive weight for the fusion of each restructuring matrix. The calculation formula for the adaptive weight can be expressed as
{ w r i = ( δ i _ r ) / T δ i w g i = ( δ i _ g ) / T δ i w b i = ( δ i _ b ) / T δ i T δ i = ( δ i _ r + δ i _ g + δ i _ b )
where, δ i _ r , δ i _ g , δ i _ b represent the ith singular value of the r, g and b channels, respectively. Using this adaptive weight, we can obtain the adaptive weighted reconstruction expression for the three channels of the color image:
{ f r = i = 1 n w r i I m g _ r i f g = i = 1 n w g i I m g _ g i f b = i = 1 n w b i I m g _ b i
where I m g _ r i , I m g _ g i , I m g _ b i are the reconstructed matrices of the ith singular value of the r, g and b channels, respectively, and w is the adaptive weight described above. Finally, the resulting channel adaptive weighting matrix is fused to obtain the final grayscale image G i m g :
G i m g = f r + f g + f b
It is clear that the grayscale result obtained by this method is based on the distribution characteristics of information energy at the pixel level for three-channel fusion, so the resulting grayscale result can well preserve the local feature information of the original color image.

5. Contrast Preserving Decolorization Based on Singular Value Adaptive Weighting

Most of the current contrast-preserving color image grayscale algorithms only consider the overall contrast between each channel. Due to the use of weighting and fusion of the overall channels, these methods do not perform well for detailed features and contrast. Although there are also some local contrast-preserving grayscale algorithms, these algorithms often cause the overall image to be unsmooth. Although the singular value adaptive weighted fusion grayscale method can well preserve the local details of the original color image, it does not consider the global smoothing feature, which can easily lead to inconsistencies between different detailed regions. To address this problem, this paper further proposes a fusion strategy that combines the contrast-preserving grayscale method based on quaternion chromaticity distance with the singular value adaptive weighted fusion grayscale method and proposes a singular value adaptive weighted fusion quaternion chromaticity contrast-preserving grayscale method. This method can capture the local features and contrast of the image while obtaining the global features, thus refining the grayscale features. The specific operation steps are shown in Figure 1.
Through the quaternion chromaticity contrast preserving decolorization, we can finally obtain a global weight grayscale representation: a color image I m g = { I r , I g , I b } , which can be fused by weighting each channel image through generating the contrast weight of each channel.
G I m g = W 1 I r + W 2 I g + W 3 I b
where G I m g is the grayscale image, and ( W 1 , W 2 , W 3 ) are the three-channel adaptive contrast-preserving weights, satisfying W 1 + W 2 + W 3 = 1 .
Finally, in order to preserve more overall contrast, we fused the global weights with the singular value adaptive weighted refusion decolorization method in the previous section to obtain the final grayscale result:
G I m g = W 1 × f r + W 2 × f g + W 3 × f b
where f r ,   f g ,   f b are gained by the Formula (16), ( W 1 , W 2 , W 3 ) are gained by the Formula (18).

6. Experiments

To prove the reliability of the algorithm proposed in this paper, experiments were conducted using MATLAB2018a software on a PC with Intel i7-8700 [email protected] GHz, 32 GB memory, and Windows10 system. We compared the following methods on public datasets: (a) the original color image, (b) the method proposed by Nafchi et al. [31] (CorrC2G), (c) the method proposed by Liu et al. [32] (WpmDecolor), (d) the method proposed by Xiong et al. [33] (PrDecolor), (e) the method proposed by Lu et al. [34] (RtGray), (f) the method proposed by Chen et al. [35] (BtDecolor), and (g) the method proposed in this paper (SVDGray).

6.1. Qualitative Evaluation

Figure 2 shows images with obvious details and grayscale selected from some public datasets, and the images in Figure 3 are from the Cadik dataset.
Figure 2 contains images of landscapes, flowers, etc. It can be seen that our method has an advantage over other methods in maintaining details. The portion within the yellow circle is enlarged above the image. In the first image, the details of the method show that the method proposed in this chapter maintains the outline and detailed features of the clouds better. In the second flower image, it can be seen that our method performs better when maintaining the flower pattern, and can restore the internal features of the flower in the color image. In the third image, it can be seen that the boundary and feature preservation of the sky and clouds in the color image is better preserved by the method proposed in this paper. In the last image, it can be seen that our method performs better when preserving the features of the sun rays and water waves. Overall, our method maintains more complete details and features in color images after grayscale, which is due to our proposed grayscale method based on singular value energy weighted fusion, which can maximize the preservation of image details and features.
The Cadik dataset contains 24 images of different sizes, including synthetic images and images with rich color composition. It is more challenging to test the method’s ability to preserve the contrast of image colors. Figure 3 shows the comparison results of our method with other methods. Overall, our method has an advantage over other methods in terms of contrast preservation. For example, for the pepper image in the first row, our method clearly shows a stronger contrast than other methods. For the methods in columns 1, 3, 4, and 5, the color contrast between different peppers cannot be highlighted. Another example is the color blindness image in the second row, where our method most clearly shows the number 2 and the number 5 in the upper right corner. In addition, the images in other rows also maintain good contrast. In addition, our method can better reflect the original color sequence of color images, such as the grayscale effect of the image in row 7, where the sweater worn by the person and the graffiti on the right eye can show the color sequence compared with other methods. The color progressive sequence of the image in row 8 is also well represented, as well as the watercolor graffiti in row 12. It is worth mentioning that, due to our use of SVD decomposition and weighted fusion, which is equivalent to performing multi-level feature preservation on the image, our method can preserve more complete image details, such as the butterfly image in row 4. Note the position of the butterfly’s lower half. Only our method preserves the details of the butterfly’s middle contour. In addition, for the ink painting in row 11, our method results show good preservation of the boats, sun, woods, reeds, and even the sunset. It can be seen that other methods basically lose the details of the woods and reeds. In general, our method (SVDGray) can well preserve the contrast while preserving the details of the image, and is more in line with human perception.

6.2. Quantitative Evaluation

In order to objectively verify the effectiveness of the proposed method in this paper, we selected the CCPR, CCFR and E-score metrics to compare it with five other methods. Lu et al. [36] verified that the E-score metric is basically consistent with human perception and can be used for the evaluation of grayscale image quality. E-score is the harmonic mean of CCPR and CCFR. CCPR is the color contrast preserving ratio. This metric is based on a color perception phenomenon wherein, when the Euclidean distance between two colors is less than a certain value, the human visual system usually cannot see the difference, so the task of the contrast preserving method is to maintain only the human-perceptible color contrast. CCFR is the color content fidelity ratio. The more specific calculation formula can be found in [36].
CCPR is the color contrast preserving ratio and is defined as follows:
C C P R = # { ( x , y ) | ( x , y ) Ω , | G x G y τ } Ω
where Ω represents the set of all adjacent pixel pairs in the original color image with color difference δ ( x , y ) τ , and Ω is the number of pixel pairs. # { ( x , y ) | ( x , y ) Ω , | G x G y τ } denotes the number of pixel pairs that remain visually perceptible after grayscale transformation. δ ( x , y ) represents the color dissimilarity in the human visual system which is defined as follows:
δ ( x , y ) = ( L x L y ) 2 + ( a x a y ) 2 + ( b x b y ) 2
where (L, a, b) are the color pixel values in the corresponding CIELab color space. CCPR is a metric designed to assess the loss of contrast when a color image is converted to grayscale. This is based on a key observation: if the color difference δ ( x , y ) is smaller than a certain threshold τ , it becomes nearly imperceptible to human vision. Therefore, CCPR utilizes this criterion to calculate the contrast loss incurred during the color-to-gray conversion. The rationale for using CCPR as a metric lies in its ability to more accurately mimic the human eye’s perception of color differences. This is crucial for understanding and evaluating the effectiveness of color-to-gray conversions, especially in terms of preserving image details and structures. By quantifying the contrast loss in such conversions, CCPR provides an effective means by which to assess and optimize image processing algorithms, ensuring that the resulting grayscale images visually resemble their color originals as closely as possible. A higher CCPR value indicates an enhanced contrast in the grayscale image, signifying superior grayscale results.
CCFR is the color content fidelity ratio and defined as follows:
CCFR = 1 # { ( x , y ) ( x , y ) Θ , δ ( x , y ) τ } Θ
where Θ is the set containing pixel pairs with | G x G y > τ . CCFR evaluates the structural fidelity of grayscale images to their color counterparts, while also quantifying the presence of unintended artifacts in the output. While CCPR is effective when measuring the contrast loss following a color-to-gray conversion, it does not address how faithfully the grayscale image represents the structural details of the original color image. CCFR fills this gap by specifically assessing the degree to which the grayscale image retains the structural elements of the color input.
The E-score rating is based on the harmonic mean of CCPR and color content fidelity ratio (CCFR). E-score is defined as follows:
E s c o r e = 2   ·   C C P R   ·   C C F R     C C P R + C C F R  
In our study, we employed the Cadik dataset for qualitative evaluation, which consists of 24 diverse color input images, spanning a broad spectrum of themes, origins, and color ranges. The details of these images are precisely outlined in Figure 4. Each image was resized to a maximum of 390 × 390 pixels for two main reasons. First, to ensure they fit well on the display next to the reference image, facilitating easier presentation. Second, to meet the computational needs of the various color-to-grayscale conversion methods applied in our research. The Cadik dataset is well known for its variety and thoroughness, making it an exemplary benchmark for assessing different color-to-grayscale conversion approaches. Its wide range of visual content and rich color details provided a robust basis for an in-depth and nuanced evaluation.
According to the experimental scheme in [36], the range of τ is selected from 1 to 40 to calculate the values of these three objective evaluation indicators. The average scores of CCPR, CCFR, and E-score that were obtained using different grayscale methods for the Cadik dataset are shown in Figure 5, Figure 6 and Figure 7. The higher the average score of CCPR, CCFR, and E-score, the better the quality of the grayscale image obtained using the method. As can be seen from the figure, the proposed method in this article generally leads other methods in terms of CCPR score. In terms of CCFR score, the proposed method in this article is slightly inferior to RtGray, but in terms of the comprehensive metric E-score, our method leads other methods by a large margin. Overall, the proposed method in this article achieves satisfactory results in quantitative scoring.
In Figure 6, we can see that, when the threshold is greater than 25, the CCFR values obtained by the CorrC2G method show a significant upward trend, while the CCFR values obtained by the BtDecolor method maintain a downward trend. The main reason for this phenomenon is that the CorrC2G method does not use any optimization method, and that the weighting coefficients required for grayscale are only determined by the Pearson correlation between the three channels and the contrast map, so the color preservation is not stable enough. When the threshold is large, the difference between color and grayscale is not clearly distinguishable, which leads to an upward trend in the CCFR values. However, Lu et al. [36] have pointed out that a higher CCFR or CCFR does not necessarily correspond with better results. Only their harmonic mean, E-score, determines the final quality. Therefore, we refer to the experimental protocol of Lu et al. [36] and select different methods by which to obtain the average E-score values in the Cadik database when the threshold is set to between 4 and 9 to verify the effectiveness of our method. Table 1 lists the average E-score values obtained by different methods when the threshold is set to between 4 and 9. It is evident that our method can obtain the optimal E-score value under these threshold conditions. This result is consistent with the subjective visual effect obtained by our method, indicating that our method can obtain better decolorization results.

7. Conclusions

In this work, we introduce an innovative contrast-preserving image decolorization technique utilizing singular value decomposition (SVD). This method is the first to adopt the idea of image decomposition for color image decolorization. Through a novel application of SVD, we determine the energy weights of a three-channel image, thereby effectively capturing its subtle local details based on the energy contributions of singular values. Additionally, our method ingeniously integrates global weights derived from a quaternion chromatic distance-based decolorization approach, harnessing the benefits of global mapping in the decolorization process. The proposed method adeptly balances the reduction of image dimensionality with the preservation of intricate details. This balance renders it particularly advantageous for fast-paced and accuracy-demanding applications such as real-time monitoring, real-time image editing, and advanced image recognition systems. In these contexts, the preservation of structural details and contrast is paramount, and our approach adeptly processes images while minimizing the loss of these critical visual features.
Furthermore, the potential applications of this method extend to the realms of digital media and web design. Its efficacy in maintaining the visual attractiveness and informational richness of the original color images during grayscale conversion makes it an invaluable tool in these fields. Additionally, given its proficiency when conserving essential visual features, this technique is also highly applicable in sophisticated computer vision and digital imaging tasks, like automatic image analysis and processing, where the stakes for image quality are particularly high.
In summary, the method presented in this paper offers a technically sound and efficient solution for high-quality grayscale image conversion across various practical applications. This innovation is not merely a significant stride in image processing research but also a practical asset for diverse real-world applications.

Author Contributions

Conceptualization, Z.Z. and X.H. (Xiaosheng Huang); methodology, Z.Z. and Y.Z.; software, M.G.; validation, X.H. (Xiaojun Huang) and Y.Z.; formal analysis, M.G.; resources, X.H. (Xiaojun Huang); data curation, M.G.; writing—original draft preparation, Z.Z.; writing—review and editing, X.H. (Xiaosheng Huang); project administration, Z.Z.; funding acquisition, Z.Z. and M.G. All authors have read and agreed to the published version of the manuscript.

Funding

This work has been jointly supported by the National Natural Science Foundation of China under Grants 62202165 and 61962021; the Natural Science Foundation of Jiangxi Province under Grants 20224BAB202016 and 20232ABC03A04; the Key Research and Development Program of Jiangxi Province under Grants 20223BBE51039 and 20232BBE50020; the Science Fund for Distinguished Young Scholars of Jiangxi Province under Grant 20232ACB212007; the Jiangxi Province Graduate Student Innovation Special Fund Project under Grant YC2022-s551.

Data Availability Statement

The dataset Cadik used in this study is available at this link https://www.cse.cuhk.edu.hk/~leojia/projects/color2gray/ (accessed 24 December 2023).

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Liu, S.; Wang, H.; Zhang, X. Video decolorization based on the CNN and LSTM neural network. ACM Trans. Multimed. Comput. Commun. Appl. (TOMM) 2021, 17, 1–18. [Google Scholar] [CrossRef]
  2. Chaabane, S.B.; Hijji, M.; Harrabi, R.; Seddik, H. Face recognition based on statistical features and SVM classifier. Multimed. Tools Appl. 2022, 81, 8767–8784. [Google Scholar] [CrossRef]
  3. García-Fernández, Á.F.; Rahmathullah, A.S.; Svensson, L. A metric on the space of finite sets of trajectories for evaluation of multi-target tracking algorithms. IEEE Trans. Signal Process. 2020, 68, 3917–3928. [Google Scholar] [CrossRef]
  4. Iqbal, A.; Sharif, M.; Yasmin, M.; Raza, M. Generative adversarial networks and its applications in the biomedical image segmentation: A comprehensive survey. Int. J. Multimed. Inf. Retr. 2022, 11, 333–368. [Google Scholar] [CrossRef] [PubMed]
  5. Zhang, Y.; Wang, M.; Xia, X.; Sun, D.; Zhou, X.; Wang, Y.; Dai, Q.; Jin, M.; Liu, L.; Huang, G. Medical image fusion based on quasi-cross bilateral filtering. Biomed. Signal Process. Control. 2023, 80, 104259. [Google Scholar] [CrossRef]
  6. Hsu, C.-M.; Hsu, C.-C.; Hsu, Z.-M.; Shih, F.-Y.; Chang, M.-L.; Chen, T.-H. Colorectal polyp image detection and classification through grayscale images and deep learning. Sensors 2021, 21, 5995. [Google Scholar] [CrossRef]
  7. Pei, H.; Owari, T.; Tsuyuki, S.; Zhong, Y. Application of a Novel Multiscale Global Graph Convolutional Neural Network to Improve the Accuracy of Forest Type Classification Using Aerial Photographs. Remote Sens. 2023, 15, 1001. [Google Scholar] [CrossRef]
  8. Zujovic, J.; Gandy, L.; Friedman, S.; Pardo, B.; Pappas, T.N. Classifying paintings by artistic genre: An analysis of features & classifiers. In Proceedings of the 2009 IEEE International Workshop on Multimedia Signal Processing, Rio de Janeiro, Brazil, 5–7 October 2009; pp. 1–5. [Google Scholar] [CrossRef]
  9. Xie, Y.; Richmond, D. Pre-training on grayscale imagenet improves medical image classification. In Proceedings of the European Conference on Computer Vision (ECCV) Workshops, Munich, Germany, 8–14 September 2018. [Google Scholar] [CrossRef]
  10. Paracchini, M.; Marcon, M.; Villa, F.; Tubaro, S. Deep skin detection on low resolution grayscale images. Pattern Recognit. Lett. 2020, 131, 322–328. [Google Scholar] [CrossRef]
  11. Akbulut, O. A new perspective on decolorization: Feature-preserving decolorization. Signal Image Video Process. 2021, 15, 645–653. [Google Scholar] [CrossRef]
  12. Bala, R.; Eschbach, R. Spatial color-to-grayscale transform preserving chrominance edge information. In Proceedings of the Color and Imaging Conference, Scottsdale, AZ, USA, 9–12 November 2004; pp. 82–86. [Google Scholar]
  13. Wang, W.; Li, Z.; Wu, S.; Zeng, L. Hazy image decolorization with color contrast restoration. IEEE Trans. Image Process. 2019, 29, 1776–1787. [Google Scholar] [CrossRef]
  14. Kuk, J.G.; Ahn, J.H.; Cho, N.I. A color to grayscale conversion considering local and global contrast. In Proceedings of the Asian Conference on Computer Vision, Queenstown, New Zealand, 8–12 November 2011; Springer: Berlin/Heidelberg, Germany, 2011; pp. 513–524. [Google Scholar] [CrossRef]
  15. Grundland, M.; Dodgson, N.A. Decolorize: Fast, contrast enhancing, color to grayscale conversion. Pattern Recognit. 2007, 40, 2891–2896. [Google Scholar] [CrossRef]
  16. Song, M.; Tao, D.; Chen, C.; Li, X.; Chen, C.W. Color to gray: Visual cue preservation. IEEE Trans. Pattern Anal. Mach. Intell. 2010, 32, 1537–1552. [Google Scholar] [CrossRef] [PubMed]
  17. Lu, C.; Xu, L.; Jia, J. Contrast preserving decolorization. In Proceedings of the 2012 IEEE International Conference on Computational Photography (ICCP), Seattle, WA, USA, 28–29 April 2012; pp. 1–7. [Google Scholar] [CrossRef]
  18. Zhou, M.; Sheng, B.; Ma, L. Saliency preserving decolorization. In Proceedings of the 2014 IEEE International Conference on Multimedia and Expo (ICME), Chengdu, China, 14–18 July 2014; pp. 1–6. [Google Scholar] [CrossRef]
  19. Chen, J.; Li, X.; Zhu, X.; Wang, J. Visual perception preserving decolorization method. Int. J. Signal Process. Image Process. Pattern Recognit. 2016, 9, 65–78. [Google Scholar] [CrossRef]
  20. Neumann, L.; Adık, M.; Nemcsics, A. An efficient perception-based adaptive color to gray transformation. In Proceedings of the Third Eurographics Conference on Computational Aesthetics in Graphics, Visualization and Imaging, Alberta, AB, Canada, 20–22 June 2007; pp. 73–80. [Google Scholar]
  21. Ancuti, C.O.; Ancuti, C.; Bekaert, P. Decolorizing images for robust matching. In Proceedings of the 2010 IEEE International Conference on Image Processing, Hong Kong, China, 26–29 September 2010; pp. 149–152. [Google Scholar] [CrossRef]
  22. Liu, S.; Zhang, X. Image decolorization combining local features and exposure features. IEEE Trans. Multimed. 2019, 21, 2461–2472. [Google Scholar] [CrossRef]
  23. Yu, J.; Li, F.; Hu, X. Two-Stage Decolorization Based on Histogram Equalization and Local Variance Maximization. SIAM J. Imaging Sci. 2023, 16, 740–769. [Google Scholar] [CrossRef]
  24. Zhang, L.; Wan, Y. Decolorization based on the weighted combination of image entropy and canny edge retention ratio. J. Electron. Imaging 2023, 32, 013024. [Google Scholar] [CrossRef]
  25. Yu, N.; Li, J.; Hua, Z. Detail enhancement decolorization algorithm based on rolling guided filtering. Multimed. Tools Appl. 2022, 81, 2711–2731. [Google Scholar] [CrossRef]
  26. Wang, X.; Ma, L.; Kwong, S.; Zhou, Y. Quaternion representation based visual saliency for stereoscopic image quality assessment. Signal Process. 2018, 145, 202–213. [Google Scholar] [CrossRef]
  27. Zhu, Z.; Jin, L.; Song, E.; Hung, C. Quaternion switching vector median filter based on local reachability density. IEEE Signal Process. Lett. 2018, 25, 843–847. [Google Scholar] [CrossRef]
  28. Cao, Y.; Fu, Y.; Zhu, Z.; Rao, Z. Color random valued impulse noise removal based on quaternion convolutional attention denoising network. IEEE Signal Process. Lett. 2021, 29, 369–373. [Google Scholar] [CrossRef]
  29. Sangwine, S.J.; Ell, T.A. Colour image filters based on hypercomplex convolution. IEEE Proc.-Vis. Image Signal Process. 2000, 147, 89–93. [Google Scholar] [CrossRef]
  30. Andrews, H.; Patterson, C. Singular value decompositions and digital image processing. IEEE Trans. Acoust. Speech Signal Process. 1976, 24, 26–53. [Google Scholar] [CrossRef]
  31. Nafchi, H.Z.; Shahkolaei, A.; Hedjam, R.; Cheriet, M. CorrC2G: Color to gray conversion by correlation. IEEE Signal Process. Lett. 2017, 24, 1651–1655. [Google Scholar] [CrossRef]
  32. Liu, Q.; Li, S.; Xiong, J.; Qin, B. WpmDecolor: Weighted projection maximum solver for contrast-preserving decolorization. Vis. Comput. 2019, 35, 205–221. [Google Scholar] [CrossRef]
  33. Xiong, J.; Lu, H.; Liu, Q.; Xu, X. Parametric ratio-based method for efficient contrast-preserving decolorization. Multimed. Tools Appl. 2018, 77, 15721–15745. [Google Scholar] [CrossRef]
  34. Lu, C.; Xu, L.; Jia, J. Real-time contrast preserving decolorization. In Proceedings of the SIGGRAPH Asia 2012 Technical Briefs, Singapore, 28 November–1 December 2012; pp. 1–4. [Google Scholar] [CrossRef]
  35. Chen, H.; Fang, F. Bregman-Tanimoto Based Method for Contrast Preserving Decolorization. In Proceedings of the 2019 IEEE International Conference on Multimedia and Expo (ICME), Shanghai, China, 8–12 July 2019. [Google Scholar] [CrossRef]
  36. Lu, C.; Xu, L.; Jia, J. Contrast preserving decolorization with perception-based quality metrics. Int. J. Comput. Vis. 2014, 110, 222–239. [Google Scholar] [CrossRef]
Figure 1. The flow chart of the proposed method.
Figure 1. The flow chart of the proposed method.
Electronics 13 00191 g001
Figure 2. Experimental results for detailed enlargement and comparison where (a) is the original color image, and (bg) are the decolorization results obtained by CorrC2G, WpmDecolor, PrDecolor, RtGray, BtDecolor, and the proposed method.
Figure 2. Experimental results for detailed enlargement and comparison where (a) is the original color image, and (bg) are the decolorization results obtained by CorrC2G, WpmDecolor, PrDecolor, RtGray, BtDecolor, and the proposed method.
Electronics 13 00191 g002
Figure 3. Comparison of the grayscale results from the Cadik dataset where (a) is the original color image, and (bg) are the decolorization results obtained by CorrC2G, WpmDecolor, PrDecolor, RtGray, BtDecolor, and the proposed method.
Figure 3. Comparison of the grayscale results from the Cadik dataset where (a) is the original color image, and (bg) are the decolorization results obtained by CorrC2G, WpmDecolor, PrDecolor, RtGray, BtDecolor, and the proposed method.
Electronics 13 00191 g003
Figure 4. The pictures in the Cadik dataset.
Figure 4. The pictures in the Cadik dataset.
Electronics 13 00191 g004
Figure 5. The average scores of CCPR of different grayscale methods for the Cadik dataset.
Figure 5. The average scores of CCPR of different grayscale methods for the Cadik dataset.
Electronics 13 00191 g005
Figure 6. The average scores of CCFR of different grayscale methods for the Cadik dataset.
Figure 6. The average scores of CCFR of different grayscale methods for the Cadik dataset.
Electronics 13 00191 g006
Figure 7. The average E-scores of different grayscale methods for the Cadik dataset.
Figure 7. The average E-scores of different grayscale methods for the Cadik dataset.
Electronics 13 00191 g007
Table 1. Average E-score values obtained by different methods.
Table 1. Average E-score values obtained by different methods.
τ CorrC2GWpmDecolorPrDecolorRtGrayBtDecolorProposed
40.93770.93690.94030.94000.91400.9403
50.92900.92910.93140.93200.90270.9334
60.92220.91980.92220.92390.89070.9247
70.91380.91230.91320.91650.87970.9182
80.90500.90510.90450.90910.86990.9116
90.89700.89750.89540.90060.86040.9049
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Zhu, Z.; Gao, M.; Huang, X.; Huang, X.; Zhao, Y. Quaternion Chromaticity Contrast Preserving Decolorization Method Based on Adaptive Singular Value Weighting. Electronics 2024, 13, 191. https://doi.org/10.3390/electronics13010191

AMA Style

Zhu Z, Gao M, Huang X, Huang X, Zhao Y. Quaternion Chromaticity Contrast Preserving Decolorization Method Based on Adaptive Singular Value Weighting. Electronics. 2024; 13(1):191. https://doi.org/10.3390/electronics13010191

Chicago/Turabian Style

Zhu, Zhiliang, Mengxi Gao, Xiaojun Huang, Xiaosheng Huang, and Yuxiao Zhao. 2024. "Quaternion Chromaticity Contrast Preserving Decolorization Method Based on Adaptive Singular Value Weighting" Electronics 13, no. 1: 191. https://doi.org/10.3390/electronics13010191

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop