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

: 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.


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 luminancebased 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 lowrank 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.

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 secondorder 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 nonlinear global mapping method for grayscale conversion, followed by a detail-enhancing algorithm based on rolling guided filtering.

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: 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 Using the related operations of quaternions, the result of RqR 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 : 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, 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: Therefore, the chromaticity difference between two color pixels q 1 and q 2 can be calculated by the following formula where q 1 s represents the chromaticity component of color pixel q 1 , and q 2 s 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 ds between two color pixels can be expressed as: 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: ) 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: 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: 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: minE(I), s.t.w r + w g + w b = 1 (11)

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: 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.
According to the matrix correlation operation rules, the matrix A can be further decomposed into the following vector product linear combination: where σ n represents the singular value and satisfies the size relationship 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 Img can be viewed as a matrix.Let Img_i = δ i u i v i T , according to the Formula (13), we can obtain the following result: where Img_n represents the nth restructuring matrix of image Img.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 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: where Img_r i , Img_g i , Img_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 Gimg: 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.

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 Img = I r , I g , I b , which can be fused by weighting each channel image through generating the contrast weight of each channel.
where GImg is the grayscale image, and (W 1 , W 2 , W 3 ) are the three-channel adaptive contrast-preserving weights, satisfying 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: 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).
the singular value adaptive weighted refusion decolorization method in the previous section to obtain the final grayscale result: where , ,

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 CPU@3.2GHz, 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 Electronics 2024, 13, 191 9 of 16 method proposed by Chen et al. [35] (BtDecolor), and (g) the method proposed in this paper (SVDGray).

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.
To prove the reliability of the algorithm proposed in this paper, experiments were conducted using MATLAB2018a software on a PC with Intel i7-8700 CPU@3.2GHz, 32GB 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).

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.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 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.

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: 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: 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: 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: 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.
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: { } tural 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: 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 Figures 5-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.
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 Figures 5-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.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 Figures 5-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.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.

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.

Figure 1 .
Figure 1.The flow chart of the proposed method.Figure 1.The flow chart of the proposed method.

Figure 1 .
Figure 1.The flow chart of the proposed method.Figure 1.The flow chart of the proposed method.

Figure 2 .
Figure 2. Experimental results for detailed enlargement and comparison where (a) is the original color image, and (b-g) are the decolorization results obtained by CorrC2G, WpmDecolor, PrDecolor, RtGray, BtDecolor, and the proposed method.

Figure 2
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

Figure 2 .
Figure 2. Experimental results for detailed enlargement and comparison where (a) is the original color image, and (b-g) are the decolorization results obtained by CorrC2G, WpmDecolor, PrDecolor, RtGray, BtDecolor, and the proposed method.

Figure 2
Figure2contains 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

Figure 3 .
Figure 3.Comparison of the grayscale results from the Cadik dataset where (a) is the original color image, and (b-g) are the decolorization results obtained by CorrC2G, WpmDecolor, PrDecolor, RtGray, BtDecolor, and the proposed method.

Figure 3 .
Figure 3.Comparison of the grayscale results from the Cadik dataset where (a) is the original color image, and (b-g) are the decolorization results obtained by CorrC2G, WpmDecolor, PrDecolor, RtGray, BtDecolor, and the proposed method.
Θ is the set containing pixel pairs with | x y G G τ − |> .CCFR evaluates the struc-

Figure 4 .
Figure 4.The pictures in the Cadik dataset.

Figure 5 .
Figure 5.The average scores of CCPR of different grayscale methods for the Cadik dataset.

Figure 6 .
Figure 6.The average scores of CCFR of different grayscale methods for the Cadik dataset.

Figure 5 .
Figure 5.The average scores of CCPR of different grayscale methods for the Cadik dataset.

Figure 4 .
Figure 4.The pictures in the Cadik dataset.

Figure 5 .
Figure 5.The average scores of CCPR of different grayscale methods for the Cadik dataset.

Figure 6 .
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.

Figure 6 .
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 2024 , 17 Figure 7 .
Figure 7.The average E-scores of different grayscale methods for the Cadik dataset.

Figure 7 .
Figure 7.The average E-scores of different grayscale methods for the Cadik dataset.

Table 1 .
Average E-score values obtained by different methods.

Table 1 .
Average E-score values obtained by different methods.