Abstract
Spatial color gamut mapping algorithm is researched to improve the mapping quality by solving halo artifacts and to improve its efficiency. This paper firstly uses guide filtering to filter L channel and get base layer of L channel, and then use the difference between original L channel value with base layer, to get detail layer of L channel. At the same time, makes statistics on distance relationship between each pixel point with target and source color gamut boundary, according to the statistical data to find out the best threshold value. Make the part of detail layer larger than the threshold value compensates to original image. The experiment proved that efficiency of single mapping operation is higher than conventional two-level mapping algorithm and for most of the images, processing effect is better. What’s more, halo artifact is also solved.
Introduction
Color gamut mapping is an important part of color accurately transferring between different devices. The study on color gamut mapping algorithm has developed from color gamut mapping algorithm of device to device to color gamut mapping algorithm of image to device. Traditional color gamut mapping algorithm only pursuits accurate delivery of color, ensures the color difference as small as possible before and after image processing, however, in subsequent study finds that the human eye vision system more sensitive than spatial relationship of the color values [1], so the color gamut mapping algorithm of image to device derives branch of spatial color gamut mapping algorithm.
Spatial color gamut mapping algorithm considers the spatial characteristic of image pixel, for the two points of same color value, due to the different position, affected by surrounding pixel, algorithm is also different for processing between the two, so the computing values also exist difference. This kind of algorithm is proposed by Meyer and Barth early [2]. The algorithm firstly divides brightness channel of source image into low-pass brightness part and high-pass brightness part, and maps the brightness of original image to brightness range of target color gamut in frequency field, and then along the equal lightness line adopts piecewise linear function for color mapping within equal color phase, finally uses cutting algorithm mapping handle color point outside color gamut. Bala et al. [3], Kasson [4], Morovic et al. [5], Zolliker et al. [6] and Ming et al. [7] propose the algorithm of secondary mapping, which firstly maps image to the smallest point within color gamut in equal color phase, then high-pass filtering brightness error image before and after mapping, makes detail of getting overlay on the image after mapping, and then uses CUSP cutting algorithm processing to handle, in order to protect image detail. Nakauchi [8], McCann [9], Kimmel et al. [10] and Alsam et al. [11, 12] propose optimization algorithm, which firstly has initial mapping for input image, and then calculates error before and after mapping, if error less than the threshold value range that human eye can recognize, then the mapping completes, otherwise the gamut mapped image is merged with the error image, and the above operation will not repeat until the error is less than the threshold value range that human eye can recognize. Ali Alsam and Ivar Farup propose that using anisotropic diffusion to solve the halo problem in iterative algorithm, and the method iteration 10
In the traditional spatial color gamut mapping algorithm, the mapping effect of optimization algorithm is comparatively excellent, but its computational complexity is large and computing efficiency is low. The mapping effect of compensation algorithm is not as good as optimization algorithm, although the computing speed is faster than optimization algorithm, mapping mechanism of two mappings leads that its efficiency is lower, and the traditional spatial color gamut mapping algorithm commonly exists halo artifacts, so needs to improve existing algorithm. This paper firstly breaks algorithm architecture of secondary mapping, only one mapping, in order to improve computing efficiency, secondly uses guide filtering of better layer effect to divide original image into base layer and detail layer, which can effectively avoid the occurrence of halo, finally adopts the method of partial compression, not only ensures color is not changed in most color gamut, and partly protects the mutual relationship between colors outside color gamut, the image visual effect after mapping is closer to original image.
Algorithm design
Optimization algorithm using iterative mechanism, the problem of algorithm efficiency cannot have bigger improvement. So this paper mainly starts with compensation algorithm. The root cause of detail loss is the loss of local contrast, but the sensitive degree of human eye is much higher than chroma difference on brightness difference, so it can compensate image detail through compensating high frequency brightness [3]. Traditional spatial color gamut mapping algorithm structure of compensation type is shown in Fig. 1a, also is two-level algorithm proposed by Bala and others. Firstly, it has initial mapping of original image, and then obtains the difference value of L layer before and after mapping, and adds back to image after initial mapping to have secondary mapping. Two-level algorithm effectively enhances the image detail after mapping [6], but the structure of two mappings greatly increases the computation time, and the halo artifacts are unable to avoid. In view of the above problems, this paper proposes new algorithm process as shown in Fig. 1b.
Flowchart of algorithms, (a) the two-level algorithms and (b) the proposed algorithms.
This paper firstly uses guide filtering to filter L channel and get base layer of L channel, and then use the difference between original L channel value with base layer, to get detail layer of L channel. At the same time, makes statistics on distance relationship between each pixel point with target and source color gamut boundary, according to the statistical data to find out the best threshold value. Make the part of detail layer larger than the threshold value compensates to original image. Finally, the part of image less than the threshold value remains the same, the part larger than the threshold value compresses to threshold value in target color gamut boundary according to the CUSP compression algorithm. This paper only maps one time, the computing efficiency is higher than common algorithm, and this algorithm uses guide filtering to extract the image detail, which makes the halo phenomenon have obviously improved [10, 11].
Halo phenomenon is the main artifact of spatial color gamut mapping algorithm, it often occurs in sharp boundary of image. Figure 2 is sketch figure of halo occurring, from top to bottom respectively are original input signal, signal after initial mapping, difference value signal between original input signal and signal after initial mapping, base layer signal of difference value image, detail layer signal of the interpolation image and final output signal of mapping. Figure 2a is color gamut mapping image signal change sketch figure of not occurring halo artifacts and Fig. 2b is color gamut mapping image signal change sketch figure of occurring halo artifacts. The difference between the two is mainly in stratified step of difference value signal. In the Fig. 2b, when filtering difference value image, not only filters detail, and also filters border. When compensating detail layer (the 5
The principle of halo-artifacts.
In order to more visually illustrate, taking the example of Gaussian low-pass filter, the principle can be as Eqs (1) and (2), where (
Enlarged view of local image boundary.
Guide filtering is a kind of edge protection filter proposed by He [13] and others. It can be expressed as weighted average, as shown in Eq. (3):
Assume that
Compute through the linear regression Eqs (6) and (7):
Because p and q are linear relation, therefore we have
We can make derivation on both sides and get Eq. (10):
In this equation:
When j is in window
By inserting Eqs (11) and (12) into Eq. (10), we can get the guided filter kernel
During the derivation of filter core, an important precondition is to assume that
In order to verify the effect of guide filtering for detail extraction, this paper makes the simple test image. The size of test image is 100*50 pixel, which is constituted by yellow and blue, adding into 8% Gaussian noise, so that Gaussian low-pass filter and guide filtering can respectively extract detail. Extract a line of pixel, the result is showed in Fig. 4a. It can be seen that in the position of about the 50
The effect of guide filtering for detail extraction.
The algorithm in this paper only conducts one time mapping, it requires selecting proper algorithm. Cutting algorithm is easy to cause different colors point that out of color gamut mapped to a same point, and cause detail loss, however though the compression algorithm can better maintain the relative relationship of pixel, thus most of the image pixel value all change, thus this paper adopts the partial compression method, to ensure that the color in vast majority of color gamut unchanged, other colors are compressed within a range that close to target color gamut boundary. Considering that nearby the endpoint of lightness axis, because it almost parallels to the lightness axis compression, variation of lightness axis is larger, and human eye is more sensitive to lightness changing in bright tone and dark tone, therefore adopting CUSP cutting to conduct mapping for the colors which lightness value is greater than 90 and less than 10.
The determination of threshold value proportion
Referencing from the compression way of SGCK (Chorma-dependent Sigmoidal Lightness Mapping and Cusp Knee Scaling) algorithm, this paper also adopts the partial compression method, this method can not only ensure most of colors unchanged, also can protect the relationship between image pixels to some extent. However SGCK uniformly compresses the colors that beyond 90% of the target color gamut into between 90% and 100% of the target color gamut, and does not consider the characteristic of the image itself. The proposed algorithm firstly sorts the relationship of image color in target color gamut, according to the detail layer that the filter separates out before, seeking out the location of the details, thus can obtain the detail numbers in and out of color gamut, if the details are all distributed within color gamut, mapping shall not effect rendering of detail, the optimal proportion is naturally 1. Otherwise, computing the distance
The relationship between the Distance
After obtaining the optimal threshold value, compress the color point outside proportion into remaining region of the target color gamut, consider that CUSP algorithm can better preserve the luminance information of original image while protecting the chroma [3], here select CUSP compression as the compression method. Firstly, CUSP algorithm finds out CUSP point in the target color gamut, which is the biggest chroma point in the target color gamut of equal color phase plane, then select the point with equal lightness of CUSP point in lightness axle as mapping center. After this, according to the distance relation between connection line and intersection point, among them, the connection line is between the color point to be mapped and mapping center, the intersection point is between the target color gamut and original color gamut, and then map color point to be mapped to the interior of target color gamut [11], then apply them into the algorithm of this paper, as shown in the following formulas:
In the formulas above,
The problem of CUSP algorithm. Green line is boundary of device color gamut, red line is boundary of image color gamut and the blue line is attachment of mapping center and mapping point.
The default preconditions of CUSP algorithm are that: firstly, the points with equal lightness of CUSP point in lightness axle are in the target color gamut; secondly, it must exist in the intersection point between connection line, target color gamut and original color gamut, among them, the connection line is between color point to be mapped and mapping center. But in the actual application, the edge of target color gamut is not very regular, probably the two intersection points in lightness axle are not the lightness extreme value points in equal color phase plane, as shown in Fig. 3a, thus it may emerge the situation that points in lightness axle with equal lightness of CUSP point are not in the target color gamut. Besides, when apply CUSP algorithm into the color gamut mapping of “image-device”, because the description precision of color gamut edge is limited, then it is more likely to emerge the situation that the color points of image are not included in the described edge, if this mapping is also not in original color gamut as shown in Fig. 3b, thus the intersection point between connection line and original color gamut is not existed, among them, the connection line is between color point to be mapped and mapping center. Both the two problems above will cause that the algorithm mapping cannot be conducted, thus this paper make the following modifications:
Find out the corresponding point of colorfulness maximum point in equal color phase plane of the target color gamut in lightness axle. Judge whether this point is in target color gamut, if yes then take this point as mapping center, if no then search for it in remaining point, until satisfies the condition of judgment. Compute the intersection point of connection line, original color gamut and target color gamut, among them, the connection line is between color input point and mapping center. Judge whether there is interaction point with original color gamut, if the intersection point is existent then conduct step 5, If the intersection point is nonexistent, thus set color input point as the intersection point of connection line, original color gamut and target color gamut, among them, the connection line is between color input point and mapping center. Conduct mapping according to the rules of compression algorithm.
Ten images in TID 2008 image database are selected as test images. ICC of Eizo CG221 monitor is used to transform the test images from RGB to CIELAB color space. The gamut of test images and HP z3200 inkjet printer are extracted as source and target gamut by applying Segment Maxima Gamut Boundary Descriptor (SMGBD). Respectively adopting HpMinDE (Hue Perceived Minimum Color Difference Error) algorithm, Two-Level algorithm that proposed by Bala et al., a classical iterative optimization SGMA (Alsam and Farup), a classical detail-preservation SGMA (P. Zolliker and K. Simon) and the proposed algorithm to conduct mapping processing on test images.
Objective evaluation
Compare spatial color gamut mapping algorithm with common pixel-level algorithm, the biggest difference is considering the spatial characteristic of pixel, the embodiment in image is clearer detail reduction. Therefore, this paper relatively evaluates algorithm from color reduction and detail reduction. Color evaluation is to compute color difference by applying S-CIELAB model, the smaller the color difference proves the more accurate color reduction. Detail evaluation is to compute structure similarity by applying SSIM (structural similarity index measurement) model, the greater the value proves the more similar the mapped image with structure of original image, the better the detail reduction [14, 15, 16].
Color difference of image
Color difference of image
What the Table 1 shows is the image color difference of the mapped image and original image that computed by applying S-CIELAB model, in the selection of 10 test images, after mapped by applying with the algorithm that proposed by this paper, there are 8 images which color difference is smallest compared with original image. Data shows that, the color gamut mapping algorithm that proposed by this paper has a certain advantage on the accurate transmission of color.
Structural similarity by SSIM model
What the Table 2 shows is the structural similarity of mapped image and original image that computed by applying SSIM model, in the selection of 10 test images, after mapped by applying with the algorithm that proposed by this paper, there are 7 images which structural similarity is highest compared with original image. Data shows that, the color gamut mapping algorithm that proposed by this paper is more excellent on detail reduction.
The subjective evaluation of this paper adopts absolute evaluation method, means number the images that have been mapped with five algorithms according to random sequence, compared with original image, let observer sort [17] it according to its proximity with original image. Experiment invites 10 people who have professional knowledge of color and 10 people who without to participate in evaluation, experiment environment is darkroom, experimental equipment is the corrected eizo CG221 professional displayer. Before experiment proper starts, displayer is required to be preheated for 1 hour, observer adapts image for half an hour, after completing experiment, compute approval rating on algorithm of each image. The experimental results are as follows Fig. 7. It can be seen that the performance of the proposed SGMA is best from Fig. 7. The performance of the HpMinDE is worst because it is belong to pointwise GMA and this may cause image detail loss.
Experimental result of subjective evaluation.
In this Fig. 7, it sorts different algorithms mapped images which are selected as the frequency that closest to original image, blue color is statistical result of HPMinDE algorithm, red color is statistical result of Two-Level algorithm, green color is statistical result of the proposed algorithm. It is not hard to see, the detail compensation color gamut mapping algorithm that based on Guided filter is closer to human eye visual experience, and this is also more consistent with objective evaluation data.
The test of halo artifacts (a) and (b) are respectively results of the secondary algorithm and the proposed algorithm.
The reason of halo problem has been analyzed in Section 2.1, it mainly occurs at edge of image, thus for more distinct effect, this paper refers to the test picture in literature to conduct test. This picture is composed of color block with distinct edges, including pure black, pure white, neutral grey high saturation of red, green, yellow and blue. The result of mapping is as shown in Fig. 8, taking center junction of four colors, magnifies to 400 times, can clearly see that there is a halo at junction of each two colors in picture a, yet does not exist in b. Combined with the signal contrast of detail layer in Section 2.2, can obtain conclusions, the proposed algorithm can effectively avoid emergence of halo.
Pixel-level algorithm T (n)
Computing times of the three different algorithms (second)
Computing times of the three different algorithms (second)
This paper utilizes the excellent edge protection effect of Guide filter, solves halo problem of compensation algorithm, and the structure of signal mapping, reduces computing complexity, greatly increases computing efficiency, adopts the method according to threshold value compression, protects the color in most color gamut unchanged, compresses the color that out of threshold value into a small range that close to target color gamut boundary, it not only ensures the reduction of color, also stores the relationship between pixels. Experiment proves that the image quality that obtained by the proposed algorithm mapping is relatively excellent.
