Color Spaces YCH and Ysch for Color Specification and Image Processing in Multi-Core Computing and Mobile Systems
Total Page:16
File Type:pdf, Size:1020Kb
Programación Matemática y Software (2012) Vol. 4. No 2. ISSN: 2007-3283 Recibido: 14 de septiembre del 2011 Aceptado: 3 de enero del 2012 Publicado en línea: 8 de enero del 2013 Color spaces YCH and YScH for color specification and image processing in multi-core computing and mobile systems Yuriy Kotsarenko, Fernando Ramos Tecnológico de Monterrey, Campus Cuernavaca [email protected], [email protected] Resumen. En este trabajo dos nuevos espacios de color se describen para especificación de colores y procesamiento de imágenes utilizando la forma cilíndrica del espacio de color YIQ. Los espacios de colores clásicos tales como HSL y HSV no toman en cuenta la visión humana y son perceptualmente inexactos. Los espacios de colores perceptualmente uniformes como CIELAB y CIELUV son muy costosos computacionalmente para aplicaciones interactivas de tiempo real y son difíciles de implementar. Las alternativas propuestas, por otro lado, tienen un balance entre uniformidad perceptual, desempeño y simplicidad de cálculo. Estos espacios modelan colores de forma más exacta y son rápidos de calcular. Los resultados experimentales en este trabajo comparan espacios de colores clásicos con los propuestos en términos de uniformidad, riqueza de colores y desempeño, incluyendo numerosas pruebas de rapidez en procesadores de varios núcleos y sistemas móviles tales como ultra portátiles y los tablets tipo iPad. Los resultados evidencian que los espacios de colores propuestos son mejores alternativas para la industria de computación donde actualmente se utilicen los espacios de colores clásicos. Abstract. Two novel color spaces are described for color specification and image processing using cylindrical variants of YIQ color space. The classical color spaces HSL and HSV do not take human perception into account and are perceptually inaccurate. Perceptually uniform color spaces such as CIELAB and CIELUV are computationally expensive for real-time interactive applications and are difficult to implement. Proposed alternatives in this work provide a reasonable balance between perceptual uniformity, performance and calculation simplicity. They model colors more accurately are fast to compute. Experimental results are provided, where the classical color spaces are compared to the proposed ones in terms of perceptual uniformity, color richness and performance, including numerous benchmarks on multi-core processors and mobile systems such as ultraportable computers and tablets such as iPad. The results provide evidence that the proposed color spaces are better alternatives for computer industry where classical color spaces are currently being used. KEYWORDS: COLOR SPACE, PERCEIVED BRIGHTNESS, COLOR SELECTION, IMAGE PROCESSING, MOBILE SYSTEMS, PARALLEL COMPUTING, MULTI-CORE PROCESSORS. 13 Yuriy Kotsarenko, Fernando Ramos Introduction In the context of color perception more uniform color spaces have been proposed In image editing and manipulation software it is common to use HSV and HSL color spaces based on hue and lightness for such as CIE XYZ, CIELAB and CIELUV [7]. image manipulation and intuitive color Several formal definitions are necessary to selection. These color spaces are so compute the color components in these popular that they made their way into CSS3 spaces from the red, green and blue specification [1]. The HSV and HSL color values, such as the primaries specifying the spaces were originally proposed by A. R. RGB color space and white point Smith back in 1978 [2]. They have an coordinates [6], [7]. Other candidates for elegant way of color specification – using perceptually uniform color spaces include hue, saturation and lightness (or value in Guth’s ATD95 Color Model [8] and DIN99 HSV). This specification makes it easy to color space [9], [10]. All these color spaces define colors both numerically and visually share several characteristics – having the using sliders, rings and so on. The values advantage of being more perceptually of hue, saturation and lightness can be uniform with the major drawback of being directly calculated from the red, green and cumbersome to compute and difficult to blue components. The conversion process implement. The mathematical complexity of was initially described by A. R. Smith [2] the aforementioned color spaces makes and can be found in popular books [3], [4]. them a very expensive alternative for real- However, the main drawback of the HSV time processing, especially in mobile and HSL color spaces is that they do not applications such as those running on model colors as they are seen by the ultraportable PCs, smartphones and tablets human eye. According to Charles Poynton such as iPad. Another drawback is that the [5], these color spaces are ―useless for chroma component in the aforementioned conveyance of accurate color information‖, models has range of values that varies suggesting that they should be abandoned. depending on other values. This makes it In his works [5], [6], Charles Poynton difficult, if not impossible, to display the describes HSV and HSL models as flawed color wheel given a specific value of in respect to color vision and that they do brightness because some areas of the color not define the color objectively. The major wheel will have invalid colors, being either drawback of the HSL color space is the out of range or not visible by the human eye lightness (or similarly value in HSV) at all. component does not take into account the An alternative color space inspired by HSV perception of the color brightness as it is and HSL called HCL Color Space has been perceived by the human eye. recently introduced by M. Sarifuddin and R. Missaoui [11]. The authors have taken into Color spaces YCH and YScH for color specification and image processing in multi-core computing and mobile systems 14 account the fact that the human eye reacts in a logarithmic manner to color intensity, making the color model more closely related to color perception. However, the HCL color space shares the drawbacks with Fig. 1. Colors plotted in the HCL color space with L=34 (a), L=68 (b) and L=101 (c). Bright gray indicates that the HSL and CIELAB color spaces and the resulting RGB values are out of the valid range. none of their advantages. The ―luminance‖ It can be seen on the Fig. 1 that HCL color (marked in quotes because according to space looks similar to HSV, where different Poynton the term luminance is commonly hue shades have different perceived misused [6]) component L in the HCL color brightness. That is, green appears brighter space is calculated using minimum and than red and blue appears darker. For a maximum RGB values, similarly to how it is reference, the colors in the CIELUV space done in HSL color space, making it [7], [13] are displayed in Fig. 2 for the same inherently perceptually incorrect. The percentages of the maximum value of chroma component C has a non-normalized luminance L*. variable range, depending on the given ―luminance‖ L, making its selection unintuitive. Last but not least, the conversion between RGB and HCL is cumbersome with some parameters not explained in sufficient detail (such as the Fig. 2. Colors plotted in the CIELUV color space with L*=25 (a), L*=50 (b) and L*=75 (c). Bright gray origin of Y0 parameter and the tuning of indicates that the resulting color is outside of sRGB parameter γ). color gamut. The colors in the HCL color space plotted at The above figures show that different constant values of L, namely 25%, 50% and shades of color like green versus blue 75% of maximum value, are illustrated on produce colors with similar perceived Fig. 1. The chroma at each position is brightness (note that the printed version calculated as C x2 y 2 and the hue may slightly differ depending on the color space used by the printer). Comparing the is calculated as H atan2y, x . The figures of HCL and CIELUV color spaces it atan2 function is an arctangent of y/x with is evident that colors with the same L value the resulting angle in range of [-π, π] [12]. in HCL color space do not appear with the same brightness. This problem occurs also in HSV and HSL color spaces, but not in CIELAB, CIELUV and DIN99, and their cylindrical variants. However, the range of chroma C* in these color spaces (the distance from the center to any point on 15 Yuriy Kotsarenko, Fernando Ramos diagram) varies a lot – that is, with the As shown previously on Fig. 2 the specific values of chroma C* and luminance cylindrical version of CIELUV uses terms of L*, different values of H* may produce chroma and hue based on the angle colors either inside or outside the sRGB between u and v. A similar approach can be color gamut [14]. applied to YIQ, introducing the terms Y’, C’ and H’: The proposed coordinate system Y Y (1) Many different television standards share 2 2 (2) common characteristics, one such standard C I Q is the YIQ color space, introduced by the H atan2Q, I (3) National Television System Committee The parameters described by the equations (NTSC) [3], [15]. The particularities of this (1), (2) and (3) form a new color space color space are that its Y, I and Q denoted YCH, with a cylindrical coordinate components can be calculated quickly right system. The parameter Y’ is defined in the from RGB color values, and that the range [0, 1], H’ is defined in the range [-π, component Y called luma is proportional to π] and C’ values range from 0 to 0.7925 in the gamma-corrected luminance of a color typical applications. The reverse [5], [6], [15]. That is, the luma models the transformation from YCH to YIQ color perceived brightness more precisely than spaces is the following: the ―brightness‖ component in color models (4) such as HSV, HSL and HCL.