The present invention relates to a
data processing apparatus (170) and a computer-implemented method for calculating an output color of an output pixel (150c) in an output
color image (160) by mixing a
background color and an
overlay color of a first pixel (150a) in a
background color image (114) depending on a
light intensity value (204) of a second pixel (150b) in a second image (112). In order to reach a
color mixing that is adapted to human color
perception and thus retains all visually recognizable information without introducing artifacts, each of the following steps is performed. That is, a
background color coordinate (202) of the background color in a uniform
color space (400), an
overlay color coordinate (200) of the
overlay color in the uniform
color space (400), and a
light intensity value (204) are acquired. The background color has a predetermined maximum luminance value (440) and a predetermined minimum luminance value (442) in the uniform
color space. The
light intensity value is within a range extending from the predetermined maximum light intensity value (446) including the predetermined maximum light intensity value (446) to the predetermined maximum light intensity value (448) including the predetermined maximum light intensity value (448). Further, in the uniform color space (400), a luminance line extending from the overlay color coordinate (200) to an end point (406) is calculated along a point having the chroma of the overlay color coordinate (200). Note that the luminance at the end point is lower than the luminance at the overlay color coordinate. A first point (408) on the luminance line (402) is determined, where the ratio of the difference between the predetermined maximum luminance value and the luminance of the background color coordinate (202) to the difference between the luminance of the background color coordinate (202) and the predetermined minimum luminance value corresponds to the ratio of the length (410) of the luminance line from the first point (408) to the overlay color coordinate (200) to the length (412) of the luminance line from the end point (406) to the first point (410). Then, an overlay color line (404) linearly extending from the background color coordinate (202) to the first point (408) is calculated.Furthermore, a second point (414) on the overlay color line (404) is determined, where the ratio of the difference between the predetermined maximum light intensity value and the light intensity value to the difference between the light intensity value and the predetermined minimum light intensity value corresponds to the ratio of the length (420) of the overlay color line (404) from the second point (414) to the first point (408) to the length (422) of the overlay color line (404) from the background
color coordinates (202) to the second point (414). The
color coordinates (206) of the second point (414) within the uniform color space (400) are output as the output color of the output pixel (150c).