Next Article in Journal
Contributions to the Characterization of Chromogenic Dyes in Color Slides
Previous Article in Journal
SfM Photogrammetric Techniques Applied in the Building Archaeology Works of the Old Cloister of the Monastery of San Francisco from the 16th Century (Cazalla de la Sierra, Seville)
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Extraction of Color Information and Visualization of Color Differences between Digital Images through Pixel-by-Pixel Color-Difference Mapping

1
WaferMasters, Inc., Dublin, CA 94568, USA
2
Institute of Humanities Studies, Kyungpook National University, Daegu 41566, Republic of Korea
3
College of Liberal Arts, Dankook University, Yongin 16890, Republic of Korea
*
Author to whom correspondence should be addressed.
Heritage 2022, 5(4), 3923-3945; https://doi.org/10.3390/heritage5040202
Submission received: 7 November 2022 / Accepted: 1 December 2022 / Published: 4 December 2022

Abstract

:
A novel method of extracting color information on a pixel-by-pixel basis or by the average of the regions of interest (ROIs) from digital images is proposed and demonstrated using newly developed and customized image-processing/analysis software (PicMan). For quantitative and statistical analyses of color, the newly developed software can be used for digital archive or digital forensic applications in various fields. The color differences between unrelated, similar, or identical scenes and or objects were quantified in various formats of desired color spaces such as RGB, HSV, XYZ, CIE L*a*b*, Munsell color, and hexadecimal color values. The color differences were visualized as images of pixel-by-pixel mapping of the ΔL*, Δa*, Δb*, ΔERGB, ΔEHSV, and ΔE*L*a*b* values and block comparison images of desired block sizes. Various color analyses and color-difference mapping examples using an aged and damaged oil painting before and after restoration were introduced. The effects of the image file format differences between PNG and JPG on color distortion are demonstrated by statistics and pixel-by-pixel color-difference mapping. A portrait of Chuk-ki Yoo (兪拓基, 1691–1767) on silk from the 18th century from Korea was used for further color analysis for whole and selected areas. A collector’s ownership stamp of Chuk-ki Yoo stamped in red ink on the text areas in one of his book collections was extracted using the image-processing software and superimposed on the original image as a visualization enhancement example. Image analysis, processing, modification, enhancement, and highlighting, as well as statistical color analysis of digital images in most formats, can conveniently and efficiently be performed using one piece of dedicated software (PicMan). The pixel-by-pixel color information extraction and color comparison technique can be very effective for a variety of applications in art and cultural heritage objects.

1. Introduction

Although the true color reproduction of objects is still a challenge in digital photography, huge numbers of digital images are generated and shared on a daily basis. Colorimetric measurement devices have been introduced for quantitative color analyses and data-driven objective decision-making processes in many applications including food science, biology, pharmacy, medicine, agriculture, art, and cultural heritage, to name a few. However, conventional point-of-use colorimetric devices suffer from poor spatial resolution due to the minimum sampling area requirement (greater than a few millimeters in diameter) and require direct contact with objects under illumination from an internal light source [1,2,3,4]. The colorimetric mapping of any object regardless of size and shape requires significant effort for sampling and the manual processing of the measurement data afterward. Even with these efforts, the number of data points is limited to the actual number of measurements. It is impractical to manually acquire more than a few hundred discrete measurement data, which is usually far from satisfactory for data visualization to comfortably draw statistical analysis-based reasoning or conclusions.
A noncontact, telemetric, color measurement technique with increased spatial resolution is strongly desired to enable the instantaneous acquisition of vast amounts of color information pertaining to the object while providing ease of use. True color reproductions of objects and scenes are still quite a challenge in photography [5,6]. The ultimate goal is to create digital images that are not distinguishable from real-world objects and scenes. The color of objects or scenes varies depending on the lighting and viewing conditions (such as viewing angle, relative direction to the light source, etc.). Nevertheless, digital photography is one of the best options for instantly capturing the color information of objects and scenes under lateral and controlled lighting conditions. Document scanners with an internal light source can be an excellent resource to provide controlled lighting at a predetermined distance between the scanning line camera and a document [7,8]. Digital cameras can be used for the same purpose as document scanners. Compared to a dedicated scanner, a camera image is subject to a degree of distortion, reflections, and shadows and may exhibit low contrast. Image blur can happen when the camera is moved or disturbed during exposure [8].
Nowadays, most digital cameras including smartphone cameras can take very realistic photographs. The color differences between digital photographs and real objects cannot be easily noticed when digital photographs are taken under well-controlled lighting conditions and adhere to predetermined standards for the intensity, direction, quality, color, and spectrum of a light source. Many efforts have been made to utilize digital image files generated from digital cameras and scanners for the quantification of the color information of objects with higher spatial resolution without using conventional chroma meters [2,3,4,5,6,9,10,11].
Most commercially available image-editing software is designed for color, brightness, and contrast adjustments for viewing and printing. There is no image analysis software for quantitative, statistical, and dimensional analyses of the color, brightness, and contrast of regions of interest (ROIs). Due to the difficulties of image analysis and the labor-intensive nature of image analysis tasks using multiple types of software, only a very small fraction of (digital) image data is utilized. It is important and necessary to develop a new user-friendly image-processing/analysis software with the desired functions for quantitative, statistical, and dimensional analyses of the color, brightness, and contrast of ROIs to promote the efficient utilization of image data. This led the authors to develop user-friendly, unified image-processing software, which can support various formats of digital image and movie files [2,3,11].
In this paper, a novel method of the extraction of quantitative color information from digital images and visualization of color differences between digital images through pixel-by-pixel color-difference mapping is proposed. A newly developed and customized image analysis/processing software (PicMan) [2,3,11,12,13,14,15,16] was utilized for demonstrating the proposed concept of quantitative color characterization, image maneuvering, and statistical color analysis of full or partial areas of digital images of art and cultural heritage subjects.

2. Image Analysis/Processing Software (PicMan)

In the digital information age, we are surrounded by a flood of digital information in our daily lives. Digital photographs, images, videos, documents, and music can be reviewed, played, and edited for an intended purpose using more than one type of software. Depending on the complexity of the desired task, a handful of image-editing application software requiring tremendous resources (processing capability and memory) can run on PCs simultaneously in the background to perform very specific tasks. With the increase in image file sizes, the demand for computing resources is increasing exponentially. Image processing and analysis are very different tasks compared to image editing. If we can develop integrated software suitable for frequently needed image editing, processing, and analysis functions with image, video, and numerical data exporting capabilities, it will make image analysis and processing much simpler and more convenient. A regular PC with reasonable capabilities can handle a lot of tasks without opening multiple applications and switching between applications for specific tasks.
To address these deficiencies, the authors’ group has been developing user-friendly software (PicMan, WaferMasters, Inc. Dublin, CA, USA) for image-based dimensional analysis, quantitative color analysis, statistical analysis, and various image-maneuvering (pattern selection, highlighting, editing, etc.) functions. A few of these functions have been applied to archaeology, cultural heritage, and conservation science studies, as have been reported previously [2,3]. PicMan can process and analyze various formats of digital image and video files such as JPG, BMP, GIF, PNG, TGA, TIFF, PDF, CR2, DM3, ND2, MIRAX, MOV, MP4, AVI, WMV, etc.
From the image and video files containing plentiful information generated digitally, only a very small fraction of data is ever utilized. This is mainly due to the difficulties in image analysis and the labor-intensive nature of the image analysis task. All image data contain coordinate, color, brightness, contrast, dimension, and time-related information that can be extracted for useful applications. They are ready to be extracted for further analysis and interpretation of their uniqueness and significance. To promote the efficient utilization of image data, it is important to develop user-friendly image-processing/analysis software with application-specific, customized functions that can significantly simplify workflow and enhance productivity with accuracy and reliability.
All images have a set of pixel information on the x and y coordinates and RGB brightness. Combinations of RGB brightness values determine the color and overall brightness. The pixel-to-pixel RGB brightness difference determines the contrast and shape of an object. Everything starts from the pixel information. Combining the RGB brightness (8 bits per channel) values is very useful in that it can generate millions of colors (28 brightness values × 3 channels = 28×3 colors = 224 colors = 16,777,216 colors) in displays and monitor screens. However, it is less useful for us to understand and interpret how we recognize and feel colors from visual stimulation by differences in the spectrum of light (wavelength dependence of brightness in the visible wavelength range of 400–700 nm or 400–780 nm). Thus, many different concepts of color spaces have been introduced to characterize and classify colors in quantitative and traceable manners.
The most popular color spaces used across disciplines are RGB, HSV, L*a*b*, and Munsell color. The RGB and L*a*b* color spaces are based on cartesian coordinates. The HSV and Munsell color spaces use cylindrical coordinates. Since all photographic images are based on combinations of RGB channel brightness, the color information in the other color spaces is calculated from the RGB values using corresponding transformation formulas. For conversion between RGB and L*a*b* color spaces, a new cartesian coordinate of XYZ is introduced. Details of color space transformations can be found elsewhere [17,18,19].
All 16,777,216 colors are assigned to six-digit hexadecimal color codes for computer graphics. The capability of pixel-by-pixel color extraction, as well as the extraction of the average color for selected areas, can be very useful for quantitative color characterization. All colors can be quantified as numerical values or corresponding codes in all color spaces for many applications including archaeology, cultural heritage, and conservation science studies.
In the following section, the extraction of color information from sample digital images using the newly developed image-processing/analysis software (PicMan) is introduced using sample images and discussions of possible applications in cultural heritage characterization and conservation science are presented.

3. Results and Discussion

Two photographic images of an aged and damaged oil painting on canvas before and after restoration from the website of a gallery located in Franklin, Massachusetts [20], were selected as example images for color information extraction, color analysis, and image comparisons using PicMan. A photograph of a portrait of Chuk-ki Yoo (兪拓基, 1691–1767) on silk from the 18th century during the Joseon Dynasty (1392–1910) in Korea [21] was also tested. A seal image from a book named Garyewonryu (가례원류: 家禮源流) belonging to Chuk-ki Yoo (兪拓基, 1691--1767) [22] was used for color analysis, selection of pixels with a specific color range, and image modification as an application example of the modified image.
For best results, images should be photographed or scanned under standard lighting and image acquisition conditions. The validity of L*a*b* values converted from RGB values should be confirmed by colorimeter measurements. Since the colorimeters simply do not have pixel-by-pixel spatial resolution and provide the average L*a*b* values within a few millimeters of the diameter area [1], a separate color checkerboard may be used for color calibration and validation.

3.1. Block-by-Block Image Comparisons before and after Restoration

Figure 1 shows the combined images of a girl in an aged and damaged oil painting on canvas before and after restoration in the PNG image format [20]. Craquelure reduction, canvas stabilization, lining the painting, and oil painting cleaning were carried out through restoration work. The color became very vivid after restoration. The two images looked identical in terms of the size and proportion of the girl. However, the two images did not perfectly overlap. The image after restoration was cropped slightly and shifted to the right and the width was slightly narrower than the image before restoration. One other important thing to note is that the image before restoration was rotated approximately 1° in the counterclockwise direction. To compare the two images properly, the image′s crop size and rotation must be corrected before proper pixel-by-pixel image comparisons. The image shift, cropping, and rotation were done manually by comparing the overlapped images. The image size was matched to 442 × 652 pixels by adjusting the rotation and cropping only the common areas between the two images. The size and rotation-adjusted images were saved as PNG image files, the same as the source image file, so as not to lose or modify the original color information.
A screen capture of PicMan comparing the two images before and after restoration is shown in Figure 2. The two images on the left and in the center are the source image files for the image comparison. The image on the right shows the block-by-block image comparison results. The block size can be varied depending on the image size and degree of pattern complexity of the images for optimum visualization results. The block size applied in Figure 2 was 50 × 50 pixels. The top-left triangles show the image before restoration and the bottom-right triangles show the image after restoration. The color differences between the before and after images can be easily recognized without alternately looking at two images and committing them to memory. The imaginary differential operation of the two images is not quite accurate and cannot communicate one’s findings to others. Our memory and observation are not as good as we might think. In addition, we cannot record our findings from this mental exercise. The block comparison results of different block sizes can be exported as separate images for record-keeping and clear communication with others.
The color difference analysis did not consider/differentiate the glossy appearance of the painting surface due to the varnish (as seen in the upper-left area of the artwork in Figure 2). The computed color difference was not a difference, possibly due to changes in terms of the degradation of the painting materials but most likely due to the removal of aged and altered varnish in the restoration process. In this study, the image comparison technique is given as an example of the color-difference characterization of images taken under controlled lighting and photography conditions after calibration. Proper lighting, photography, and calibration are required for proper color-difference characterization. The practice for accurate colorimetry measurements from digital cameras can be found in previous reports [5,23,24].

3.2. Pixel-by-Pixel Image Comparison before and after Restoration

Figure 3 shows a summary of the pixel-by-pixel image comparisons of the images of a girl before and after restoration. The pixel-by-pixel color differences were mapped in terms of the CIE ΔL*, CIE Δa*, CIE Δb*, and CIE ΔE* values at full scale (100% scale), which can be seen in the top row, and at quarter scale (25% of full scale), which can be seen in the bottom row. Since the color differences along the a* and b* axes were small compared to the lightness L* axis, the full-scale pixel-by-pixel color-difference mapping images for the Δa* and Δb* values did not show significant color shifts. The Δa*, Δb*, and ΔE* values became much more recognizable at a 4x magnified scale (equivalent to 25% of full scale).
The CIE ΔL* and CIE ΔE* values only have a magnitude in the brightness and overall color difference. Thus, the resulting image becomes grayscale. The Δa* and Δb* values can be negative, zero (i.e., no color difference along the a* or b* axis), or positive. The CIE L*a*b* color space expresses color as three values: L* for perceptual lightness and a* and b* for the four unique colors of human vision, red, green, blue, and yellow. The lightness value L* defines black as 0 and white as 100. The a* axis is relative to the green-red opponent colors, green (negative a* values) to red (positive a* value). Similarly, the b* axis is relative to the blue-yellow opponent colors, blue (negative b* values) to yellow (positive b* value). The a* and b* axes are independent in the range of −128 to 127.
In Figure 3, the degrees of the color shifts along the a* and b* axes can be easily recognized pixel by pixel. The color difference ΔE* can easily be determined pixel by pixel. This type of detailed color difference characterization cannot be measured or visualized by conventional chroma meter measurements [1,2,3,4,5,6].

3.3. Effect of Image File Format Conversion on Color

Image data can be saved in many different formats. Raster images, such as photographs and scanned documents, are constructed by a series of pixels, or individual blocks, to form an image. We often recklessly save images in JPG format for convenience and file size. The JPG format is designed for the lossy compression of images in return for a file-size reduction. The JPG compression algorithm is designed to operate well on photographs and paintings of realistic scenes with smooth variations of tone and color. For applications where the trueness and traceability of the original color of images are of great concern, it is important to understand and set rules for the image file format of choice. The image file format conversion should be avoided as much as possible because it may modify or damage the integrity of the original images in terms of color, shape, and sharpness. To verify the effect of the JPG compression of photographic images on image quality, the PNG images of an oil painting of a girl (a) before and (b) after restoration were saved as JPG images (c and d), as seen in Figure 4.
The image size did not change before and after file conversion. However, the file sizes of the JPG images were reduced to a fraction of the original sizes of the PNG images (365 KB → 59.4 KB before restoration and 481 KB → 73.4 KB after restoration). The color differences between the PNG and JPG images were minimal. Without paying great attention, it is difficult to notice any differences between them. The only area with noticeable color changes was the top-left corner of the images before restoration (Figure 4a,c). The JPG image is a little brighter than the original PNG image. This is all that we can say about the differences between the PNG and JPG files.
To evaluate the differences between the PNG and JPG files statistically, the color information from all the pixels (442 × 652 pixels = 288,184 pixels) of the four images was exported as CSV files to generate a histogram for the RGB, HSV, and L*a*b* color spaces. For simplicity, the RGB and L*a*b* histograms and statistics are discussed in this paper. Figure 5 shows the histograms of the RGB brightness for the PNG (a and d) and JPG (b and e) images before and after restoration and the differences (c and f) between the PNG and JPG files of the same images. The distribution of the RGB brightness before restoration was skewed left (darker side), whereas it was spread more broadly after restoration. The effect of restoration on the apparent color of the images can also be recognized in the histograms. The area under the individual RGB histogram curves should be equal to the total number of pixels (288,184 pixels). As seen in Figure 5a–c, sharp RGB peaks below the brightness level of 96 in the PNG image (a) became dull in the JPG image (b) before restoration and the differences in histograms between the PNG and JPG images appeared to be quite large (c), suggesting a significant modification of colors from the PNG → JPG conversion.
The RBG statistics for all pixels (442 × 652 = 288,184 pixels) of the PNG and JPG files of the oil painting of a girl before and after restoration are summarized in Table 1. The minimum, average, maximum, range, and standard deviation of the RGB brightness of the 288,184 pixels from each image (PNG and JPG images before and after restoration) are shown. The differences between the before and after restoration are summarized in the three columns on the right in Table 1. The differences between the PNG and JPG images are summarized in the five rows at the bottom of the table. From a statistics point of view, the differences between the PNG and JPG files seem to be very small because they were averaged from the total number of pixels (288,184 pixels) per image. The differences between the PNG and JPG images before and after restoration are very small for the same reason. It is obvious that pixel-by-pixel color-difference mapping has the highest sensitivity to the exact location information of the affected pixels. A histogram can be considered a projected graph of RGB brightness binning ignoring the pixel location information. The dimension of the image data was significantly reduced, as seen in the histogram and the statistics summarized in Table 1. The importance of pixel-by-pixel color-difference mapping cannot be overemphasized.
For completeness, the histograms and statistics of the CIE L*a*b* values of all pixels (442 × 652 = 288,184 pixels) of the PNG and JPG files of the oil painting of a girl before and after restoration are summarized in Figure 6 and Figure 7 and Table 2. The area under the individual L*a*b* histogram curves should be equal to the total number of pixels (288,184 pixels). The color difference ΔE* and overall color difference between the PNG and JPG files ( Δ E PNG−JPG * : Δ E ab * or Δ E * ) were also calculated to understand the impact of restoration and image file format conversion. The ΔE* was calculated using the following CIE76 formula:
Δ E ab * = ( L 2 * L 1 * ) 2 + ( a 2 * a 1 * ) 2 + ( b 2 * b 1 * ) 2
where Δ E ab * 2.3 corresponds to a JND (just noticeable difference). There are other revisions for color difference calculation formulas such as CIE94 and CIEΔE2000 [3,4,25,26].
The lightness L* histograms of the images before (Figure 6a) and after (Figure 7a) restoration show significant differences in distribution reflected from the source images, as shown in Figure 4. The a* and b* axes’ distributions also showed significant differences before and after restoration (Figure 6b,c, and Figure 7b,c). The differences between the PNG and JPG files are also quite noticeable in Figure 6d–f and Figure 7d–f. This verifies that the colors of the JPG files were different from those of the source PNG files even though the changes were not large enough to be distinguished by the human eye without very careful observation.
Compared to the RGB expression of colors, the L*a*b* expression is more insightful for understanding the lightness, as well as color balance, in the a*b* plane of RGYB. The HSV (hue, saturation, value) color space only makes assumptions based on the RGB balance in the cylindrical coordinates. It is an alternative representation of the RGB color model and was designed in the 1970s by computer graphics researchers to more closely align with the way human vision perceives and the color-making attributes from the additive colors of RGB used in monitors and displays [27].

3.4. Application Examples using a Portrait and a Book Ownership Seal

The extraction of the color information and the statistical analysis of the extracted color information were applied to a photograph of a portrait of Chuk-ki Yoo (兪拓基, 1691–1767) on silk from the 18th century during the Joseon Dynasty (1392–1910) in Korea, as shown in Figure 8 [21]. The portrait PNG image file was 740 × 972 pixels (=719,280 pixels) in physical dimensions and 1.37 MB in file size. The RGB and CIE L*a*b* histograms of the image were plotted after extracting the RGB and L*a*b* values of all pixels using PicMan and are shown in Figure 9. The area below the RGB and L*a*b* curves should be the same and equal to 719,280 pixels. The brightness distribution of the RGB colors was visualized by graphing the binning results of the RGB brightness range of 0 to 255 in increments of 1. The distribution of the lightness and relative position of color in the RGYB plane was visualized by plotting the L*a*b* binning results in increments of 0.1. The statistical summary of the RGB and CIE L*a*b* of all pixels (740 × 972 pixels = 719,280 pixels) comprising the portrait image is shown in Table 3.
Figure 10 shows a screen capture from PicMan displaying the line intensity graphs of the RGB and its average intensity across A-A′ on the top of the screen and the quantified color information of the individual pixels and averages of the selected square- or circle-shaped regions of interest (ROIs) on the image in RGB, HSV, and L*a*b* formats. The width and diameter of the square can be selected up to 100 pixels in 1-pixel increments. As for the selected ROIs, 40 × 40 pixels (=1600 pixels) were used for averaging the color information, as seen in Figure 10. The single-pixel color information can be considered an interactive chroma meter with a pixel resolution. The color information can also be displayed in hexadecimal color codes or the Munsell color format, whichever is more convenient. All displayed values and graphical data can be exported as CSV or image files of desired formats for record-keeping and further analyses and/or comparisons.
The upper row in Figure 11 shows the color inversion and grayscale conversion of the original image. The background areas removed from the portrait and the outline image of the portrait using the color selection and illustration functions in PicMan are shown in the lower row in Figure 11. The total number of pixels in the background-removed image was 270,707 out of 719,280 pixels, which was 37.64% of the total area of the portrait. The area of the silk background was measured at 448,573 pixels, which is equal to 62.36% of the total area of the portrait. Outline images can also be easily generated by detecting the pixels with significant color and/or brightness changes compared to the neighboring pixels in the original image.
Figure 12 shows the RGB and CIE L*a*b* histograms for the silk area (448,573 pixels) of the portrait of Chuk-ki Yoo (兪拓基, 1691–1767), former Prime Minister during part of the Joseon Dynasty (1392–1910) in Korea. Since the color of the silk was relatively uniform, the RGB and L*a*b* histograms were quite narrow and symmetrical. By comparing them with the RGB and CIE L*a*b* histograms for the entire portrait shown in Figure 9, the distribution of the RGB and L*a*b* values of the 270,707 pixels (for the background-removed portrait) can be distinguished.
Other useful applications of color-based selection/elimination functions with color homogenization and transparency capabilities are shown in Figure 13. For color analysis, the selection of pixels within specific color ranges, image modifications, and application examples are shown. The modified image of a seal from a book named Garyewonryu (가례원류: 家禮源流) belonging to Chuk-ki Yoo (兪拓基, 1691–1767) [22] was used. The seal-image highlighting was carried out with a series of actions: background removal, color homogenization, background transparency, and superposition of the modified image on the original image. Similarly, paper color homogenization can be applied if needed.
For the physical restoration of paper-based cultural heritage items, any mistakes can result in permanent damage to the item. Photoprints of paper-based cultural heritage documents and paintings are frequently created for introduction to the public. A large portion of paper-based cultural heritage and rare books are in poor condition due to physical damage, decoloring, darkening, foxing, and so on. A photocopy of the as-is condition may not be suitable for the purpose intended. Digital restoration can be an excellent alternative without risking damage to the original. The evaluation of the quantitative color information and digital filtering of noise by color can greatly improve legibility. Newly developed and added functions of the image-processing/analysis software (PicMan) have made these rather complex tasks very simple without the need to use other software. PicMan is designed as an execution file that is <20 MB in size and no installation is required. The small file size of PicMan also significantly frees up computing resources and memory. In addition, there is no need to open other software that requires CPU and memory sharing of the computing device. This greatly reduces the requirement for computing resources such as hardware specifications and memory requirements. Almost all tasks can be performed using tablets or laptops. Relatively large image files can be handled using tablets and laptops with general specifications. This provides great freedom in the working environment. Complex tasks can be accomplished anywhere at any time.
Image capture using the integrated cameras of laptops and tablets can be accomplished using PicMan and the resulting digital photographs and video files can be instantly analyzed and processed as needed. The software allows for the use of a USB camera. The camera can be utilized as an image-capturing device and controlled through PicMan. Digital photographs, images, and video files from other devices or the internet can be analyzed in the same way.

4. Conclusions and Recommendations

In our daily lives, our eyes are stimulated by photons, energized particles, or electromagnetic waves and we perceive them as color and brightness in the visible energy (3.1–1.77 eV or 3.1–1.59 eV) or wavelength (400–700 nm or 400–780 nm) ranges. Each individual has a different experience with the same colors and color information, which cannot be accurately communicated using descriptive language. If a different language is used, the translation between languages adds more distortions to the true meaning of the speaker. The meaning and expression of colors differ from language to language, culture to culture, region to region, country to country, industry to industry, and person to person. To avoid or at least reduce uncertainties and communication/interpretation errors, color information should be described in quantitative terms. In this digital era, this is not an impossible task, even though we still need to improve how it is defined and utilized. All digital images are made up of pixels with color information in a quantitative manner. Indeed, all pixels are expressed as hexadecimal code containing RGB brightness information in the range of 0–255, assuming 24-bit (8-bit per channel) images. As long as we select a hexadecimal color code, it would indicate the same color around the world. Of course, the color representation on different monitors may differ slightly. However, the integrity of the color information is stored in the image file. In the past, the only quantitative way to characterize and express color was by measuring the average color of a sampling area (typically a few mm in diameter) using a chroma meter. Due to the poor spatial resolution of the chroma meter measurement, the color of a small area or sampling area with non-uniform colors cannot be measured and recorded correctly. By using digital photographs and pixel-by-pixel color extraction techniques, the pixel resolution of the color information can be extracted and utilized for further analysis, reproduction, and utilization.
In this paper, a novel method for extracting color information on a pixel-by-pixel basis or by the average of the regions of interest (ROI) from digital images has been proposed. The proposed concept has been demonstrated using newly developed and customized image-processing/analysis software (PicMan). The software can be used for quantitative analysis, statistical analysis, digital archiving of color, and digital forensic applications in various fields. The color differences between images, which were of unrelated, similar, or identical scenes and objects, were quantified in various formats of desired color spaces. The color information of individual pixels was extracted as RGB, HSV, XYZ, CIE L*a*b*, Munsell color, and hexadecimal color values. The color differences were also visualized as images of pixel-by-pixel mapping of ΔL*, Δa*, Δb*, ΔERGB, ΔEHSV, and ΔEL*a*b* values and block comparison images of desired block sizes. The effects of the image file format differences between PNG and JPG on color distortion were investigated and demonstrated by statistics and pixel-by-pixel color-difference mapping. Image analysis, processing, modification, enhancement, and highlighting, as well as statistical color analysis of any digital images in most formats, can be conveniently and efficiently performed using one dedicated piece of software (PicMan). It can be used for a variety of applications for art and cultural heritage objects.
Art restoration is intended to preserve the integrity and value of an original work of art. Many artworks are in need of repair because they have decayed over long periods of time due to storage and climatic conditions, which can have a significant impact on the condition of the artwork [28]. Art restoration is any attempt to preserve and repair drawings, paintings, sculptures, architecture, or other objects of fine and decorative art, whose condition has been negatively altered due to various causes. Quantitative color characterizations from digital images have become increasingly important for recording and documenting color changes over time to properly plan art restoration strategies as museums and cultural institutions work toward protecting invaluable cultural collections.
Recently, in medical fields, attempts to link pain to individual artistic expression have been reported in an objective and quantitative fashion using Frida Kahlo (1907–1954)’s artworks [29]. The intention was to use the linkage to integrate art into the therapeutic armory for pain and pain-related disorders. Frida Kahlo was a Mexican artist who is remembered for her self-portraits expressing pain and passion with bold and vibrant colors. Her artworks were used to examine the effects of physical and emotional pain (rage) on artistic expression with quantitative color analysis results. Quantitative color analyses are required in many areas, including medicine, pharmaceutical, biology, food science, agriculture, animal science, fashion, painting, design, and many other fields. When the proposed method becomes available and has been practiced, the more active usage of quantitative color information in various fields is expected [11,30]. No color information should be overlooked due to a lack of convenient image analysis/processing software.

Author Contributions

Conceptualization, W.S.Y. and K.K.; methodology, W.S.Y. and J.G.K.; software, W.S.Y. and K.K.; validation, all authors; data curation, W.S.Y. and Y.Y.; writing, W.S.Y. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

Not applicable.

Conflicts of Interest

The author declares no conflict of interest.

References

  1. Minolta, K. CR-400 Chroma Meter. Available online: https://sensing.konicaminolta.us/us/products/cr-400-chroma-meter-colorimeter/ (accessed on 25 August 2022).
  2. Kim, G.; Kim, J.G.; Kang, K.; Yoo, W.S. Image-Based Quantitative Analysis of Foxing Stains on Old Printed Paper Documents. Heritage 2019, 2, 2665–2677. [Google Scholar] [CrossRef] [Green Version]
  3. Yoo, W.S.; Kim, J.G.; Kang, K.; Yoo, Y. Extraction of Colour Information from Digital Images Towards Cultural Heritage Characterisation Applications. SPAFA J. 2021, 5, 1–14. [Google Scholar] [CrossRef]
  4. Song, H.R.; Jo, Y.H. A Study on Digital Color Reproduction for Recording Color Appearance of Cultural Heritage. J. Conserv. Sci. 2022, 38, 154–165, (In Korean with English Abstract). [Google Scholar] [CrossRef]
  5. Guarnera, G.C.; Bianco, S.; Schettini, R. Turning a Digital Camera into an Absolute 2D Tele-Colorimeter. Comput. Graph. Forum 2018, 38, 73–86. [Google Scholar] [CrossRef] [Green Version]
  6. Harville, M.; Baker, H.; Bhatti, N.; Süsstrunk, S. Consistent Image-Based Measurement and Classification of Skin Color. In Proceedings of the IEEE International Conference on Image Processing, Genova, Italy, 14 September 2005; pp. II–374. [Google Scholar] [CrossRef] [Green Version]
  7. Montuo, J.S. Image Scanner Technology. Photogramm. Ad Remote Sens. 1980, 46, 49–61. [Google Scholar]
  8. Pushkar, O.I. Information Systems and Technologies. Summary of lectures./O.I. Pushkar, K.S. Sibilyev.—Kharkiv: Publishing House of KhNUE. 2011. Available online: http://www.repository.hneu.edu.ua/bitstream/123456789/5879/1/Summary%20of%20lectures_IS%26T_Pushkar_O.I_Sibilev_K.S.pdf (accessed on 7 November 2022).
  9. Wang, X.; Green, P.J.; Thomas, J.-P.; Hardeberg, J.Y.; Gouton, P. Evaluation of the Colorimetric Performance of Single-Sensor Image Acquisition Systems Employing Colour and Multispectral Filter Array. In Proceedings of the Fifth IAPR Computational Color Imaging Workshop (CCIW’15), Saint Etienne, France, 1 January 2015; pp. 181–191. [Google Scholar]
  10. Zeng, R.; Mannaerts, C.M.; Shang, Z. A Low-Cost Digital Colorimetry Setup to Investigate the Relationship between Water Color and Its Chemical Composition. Sensors 2021, 21, 6699. [Google Scholar] [CrossRef]
  11. Yoo, Y.; Yoo, W.S. Turning Image Sensors into Position and Time Sensitive Quantitative Colorimetric Data Sources with the Aid of Novel Image Processing/Analysis Software. Sensors 2020, 20, 6418. [Google Scholar] [CrossRef]
  12. Yoo, W.S. The World’s Oldest Book Printed by Movable Metal Type in Korea in 1239: The Song of Enlightenment. Heritage 2022, 5, 1089–1119. [Google Scholar] [CrossRef]
  13. Yoo, W.S. How Was the World’s Oldest Metal-Type-Printed Book (The Song of Enlightenment, Korea, 1239) Misidentified for Nearly 50 Years? Heritage 2022, 5, 1779–1804. [Google Scholar] [CrossRef]
  14. Yoo, W.S. Direct Evidence of Metal Type Printing in The Song of Enlightenment, Korea, 1239. Heritage 2022, 5, 3329–3358. [Google Scholar] [CrossRef]
  15. Yoo, Y.; Yoo, W.S. Digital Image Comparisons for Investigating Aging Effects and Artificial Modifications Using Image Analysis Software. J. Conserv. Sci. 2021, 37, 1–12. [Google Scholar] [CrossRef]
  16. Digital Image Analysis Program Manual for Diagnosis of Conservation Status of Painting Cultural Heritage; Konkuk University and National Research Institute of Cultural Heritage (Korea): Daejeon, Republic of Korea, 2022; ISBN 978-89-299-2570-3. (In Korean)
  17. Colantoni, P. Color Space Transformations. 2004. Available online: https://faculty.kfupm.edu.sa/ics/lahouari/Teaching/colorspacetransform-1.0.pdf (accessed on 31 August 2022).
  18. Minolta, K. Precise Color Communication. Available online: https://www.konicaminolta.com/instruments/knowledge/color/pdf/color_communication.pdf (accessed on 31 August 2022).
  19. Lindbloom, B.J. RGB Working Space Information. Available online: http://www.brucelindbloom.com/index.html?WorkingSpaceInfo.html (accessed on 7 November 2022).
  20. Woodshed Art Auctions. Sample Images of Aged and Damaged Oil Painting Before and After Cleaning and Restoration. Available online: https://woodshedartauctions.com/art-services/restoration/restoration-banner-3/ (accessed on 31 August 2022).
  21. Wikipedia. Chuk-ki Yoo. Available online: https://ko.wikipedia.org/wiki/%EC%9C%A0%EC%B2%99%EA%B8%B0 (accessed on 31 August 2022).
  22. Korea University, Center for Overseas Resources on Korean Studies, 가례원류(家禮源流) 유척기인 (兪拓基印). Available online: http://kostma.korea.ac.kr/viewer/viewerJsi?uci=RIKS+CRMA+KSM-WO.1718.0000-20090714.AS_BC_108-SEAL.001_021.010009 (accessed on 27 August 2022).
  23. Melis, M.; Babbi, A.; Miccoli, M. Development of a UV to IR extension to the standard colorimetry, based on a seven band modified DSLR camera to better characterize surfaces, tissues and fabrics. O3A: Optics for Arts, Architecture, and Archaeology III. Society of Photo Optical. 2011. Available online: https://www.spiedigitallibrary.org/conference-proceedings-of-spie/8084/1/Development-of-a-UV-to-IR-extension-to-the-standard/10.1117/12.889560.short?SSO=1 (accessed on 25 August 2022). [CrossRef]
  24. Nixon, M.; Outlaw, F.; Leung, T.S. Accurate device-independent colorimetric measurements using smartphones. PLoS ONE 2020, 15, e0230561. [Google Scholar] [CrossRef]
  25. Sharma, G. Digital Color Imaging Handbook, 1.7.2 ed.; CRC Press: Boca Raton, FL, USA, 2003; Chapter 1; ISBN 0-8493-0900-X. [Google Scholar]
  26. Techkon; A Simple Review of Cie Δe* (Color Difference) Equations. Available online: https://techkonusa.com/a-simple-review-of-cie-%CE%B4e-color-difference-equations/ (accessed on 25 August 2022).
  27. Color Spaces: S4 Classes and Utilities. Available online: https://colorspace.r-forge.r-project.org/articles/color_spaces.html (accessed on 7 November 2022).
  28. National Art Gallery of The Bahamas; Lesson: Art Restoration The scientific aspect of art. Available online: https://nagb.org.bs/wp-content/uploads/2020/12/Lesssonplan-ArtConservation.pdf (accessed on 25 August 2022).
  29. Turkheimer, F.E.; Liu, J.; Fagerholm, E.D.; Dazzan, P.; Loggia, M.L.; Bettelheim, E. The art of pain: A quantitative color analysis of the self-portraits of Frida Kahlo. Front. Hum. Neurosci. 2022, 16, 1000656. [Google Scholar] [CrossRef] [PubMed]
  30. Yoo, W.S.; Han, H.S.; Kim, J.G.; Kang, K.; Jeon, H.S.; Moon, J.Y.; Park, H. Development of a tablet PC-based portable device for colorimetric determination of assays including COVID-19 and other pathogenic microorganisms. RSC Adv. 2020, 10, 32946–32952. [Google Scholar] [CrossRef] [PubMed]
Figure 1. Sample images of aged and damaged oil painting before and after cleaning and restoration. Craquelure reduction, canvas stabilization, alignment of the painting, and oil painting cleaning were carried out during the restoration work [20].
Figure 1. Sample images of aged and damaged oil painting before and after cleaning and restoration. Craquelure reduction, canvas stabilization, alignment of the painting, and oil painting cleaning were carried out during the restoration work [20].
Heritage 05 00202 g001
Figure 2. Screen capture of image-processing/analysis software (PicMan) performing block comparison of images of a girl with a doll in her right arm before and after restoration. The block size was set at 50 × 50 pixels. Upper-left and lower-right triangles show partial images before and after restoration for an easy comparison of the image size matching, color, damage, and cracks.
Figure 2. Screen capture of image-processing/analysis software (PicMan) performing block comparison of images of a girl with a doll in her right arm before and after restoration. The block size was set at 50 × 50 pixels. Upper-left and lower-right triangles show partial images before and after restoration for an easy comparison of the image size matching, color, damage, and cracks.
Heritage 05 00202 g002
Figure 3. Pixel-by-pixel color-difference maps of images of a girl with a doll in her right arm before and after restoration. Color-difference maps were exported from PicMan in CIE ΔL*, CIE Δa*, CIE Δb*, CIE ΔΕ* at full scale and quarter scale (25% of full scale). Legends are also given for easy recognition of pixel-by-pixel brightness, color shift, and color difference.
Figure 3. Pixel-by-pixel color-difference maps of images of a girl with a doll in her right arm before and after restoration. Color-difference maps were exported from PicMan in CIE ΔL*, CIE Δa*, CIE Δb*, CIE ΔΕ* at full scale and quarter scale (25% of full scale). Legends are also given for easy recognition of pixel-by-pixel brightness, color shift, and color difference.
Heritage 05 00202 g003
Figure 4. Oil painting images of a girl before (a) and after (b) restoration in PNG file format and their newly saved images (c,d) in JPG format. Number of pixels and image sizes were kept constant. Image file size was significantly reduced by saving it in JPG format.
Figure 4. Oil painting images of a girl before (a) and after (b) restoration in PNG file format and their newly saved images (c,d) in JPG format. Number of pixels and image sizes were kept constant. Image file size was significantly reduced by saving it in JPG format.
Heritage 05 00202 g004
Figure 5. Graphical summary of color information in RGB expression of all pixels in the PNG and JPG images before and after restoration. Histograms of RGB brightness before restoration: (a) PNG, (b) JPG, (c) difference between PNG and JPG. Histograms of RGB brightness after restoration: (d) PNG, (e) JPG, (f) difference between PNG and JPG.
Figure 5. Graphical summary of color information in RGB expression of all pixels in the PNG and JPG images before and after restoration. Histograms of RGB brightness before restoration: (a) PNG, (b) JPG, (c) difference between PNG and JPG. Histograms of RGB brightness after restoration: (d) PNG, (e) JPG, (f) difference between PNG and JPG.
Heritage 05 00202 g005
Figure 6. Graphical summary of color information in CIE L*a*b* values of all pixels in the PNG and JPG images before restoration. Histograms of CIE L*a*b* values of PNG and JPG files before restoration: (a) L*, (b) a*, (c) b*. Histograms of differences in CIE L*a*b* values between PNG and JPG files before restoration: (d) ΔL*, (e) Δa*, (f) Δb*.
Figure 6. Graphical summary of color information in CIE L*a*b* values of all pixels in the PNG and JPG images before restoration. Histograms of CIE L*a*b* values of PNG and JPG files before restoration: (a) L*, (b) a*, (c) b*. Histograms of differences in CIE L*a*b* values between PNG and JPG files before restoration: (d) ΔL*, (e) Δa*, (f) Δb*.
Heritage 05 00202 g006
Figure 7. Graphical summary of color information in CIE L*a*b* values of all pixels in the PNG and JPG images after restoration. Histograms of CIE L*a*b* values of PNG and JPG files after restoration: (a) L*, (b) a*, (c) b*. Histograms of differences between PNG and JPG files in CIE L*a*b* values after restoration: (d) ΔL*, (e) Δa*, (f) Δb*.
Figure 7. Graphical summary of color information in CIE L*a*b* values of all pixels in the PNG and JPG images after restoration. Histograms of CIE L*a*b* values of PNG and JPG files after restoration: (a) L*, (b) a*, (c) b*. Histograms of differences between PNG and JPG files in CIE L*a*b* values after restoration: (d) ΔL*, (e) Δa*, (f) Δb*.
Heritage 05 00202 g007
Figure 8. A portrait of Chuk-ki Yoo (兪拓基, 1691–1767), former Prime Minister during part of the Joseon Dynasty (1392–1910) in Korea.
Figure 8. A portrait of Chuk-ki Yoo (兪拓基, 1691–1767), former Prime Minister during part of the Joseon Dynasty (1392–1910) in Korea.
Heritage 05 00202 g008
Figure 9. RGB and CIE L*a*b* histograms of the portrait of Chuk-ki Yoo (兪拓基, 1691–1767), former Prime Minister during part of the Joseon Dynasty (1392–1910) in Korea.
Figure 9. RGB and CIE L*a*b* histograms of the portrait of Chuk-ki Yoo (兪拓基, 1691–1767), former Prime Minister during part of the Joseon Dynasty (1392–1910) in Korea.
Heritage 05 00202 g009
Figure 10. A portrait of Chuk-ki Yoo (兪拓基, 1691–1767), former Prime Minister during part of the Joseon Dynasty (1392–1910) in Korea, under color information extraction in the RGB, HSV, L*a*b*, Munsell, and hexadecimal color spaces using PicMan. Color information can be extracted either pixel by pixel or as the average of predetermined square- or circle-shaped regions of interest.
Figure 10. A portrait of Chuk-ki Yoo (兪拓基, 1691–1767), former Prime Minister during part of the Joseon Dynasty (1392–1910) in Korea, under color information extraction in the RGB, HSV, L*a*b*, Munsell, and hexadecimal color spaces using PicMan. Color information can be extracted either pixel by pixel or as the average of predetermined square- or circle-shaped regions of interest.
Heritage 05 00202 g010
Figure 11. Original image of the portrait of Chuk-ki Yoo (兪拓基, 1691–1767) and a few examples of image modifications (inversion, grayscale conversion, selection, masking, and outline extraction) using PicMan for paper-based cultural heritage applications.
Figure 11. Original image of the portrait of Chuk-ki Yoo (兪拓基, 1691–1767) and a few examples of image modifications (inversion, grayscale conversion, selection, masking, and outline extraction) using PicMan for paper-based cultural heritage applications.
Heritage 05 00202 g011
Figure 12. RGB and CIE L*a*b* histograms of the silk area of the portrait of Chuk-ki Yoo (兪拓基, 1691–1767), former Prime Minister during part of the Joseon Dynasty (1392–1910) in Korea.
Figure 12. RGB and CIE L*a*b* histograms of the silk area of the portrait of Chuk-ki Yoo (兪拓基, 1691–1767), former Prime Minister during part of the Joseon Dynasty (1392–1910) in Korea.
Heritage 05 00202 g012
Figure 13. Seal image highlighting example of background removal, color homogenization, background transparency maximization, and superposition of the image with a transparent background on the original image. A seal image from a book named Garyewonryu (가례원류:家禮源流) belonging to Chuk-ki Yoo (兪拓基, 1691–1767) was used as an example.
Figure 13. Seal image highlighting example of background removal, color homogenization, background transparency maximization, and superposition of the image with a transparent background on the original image. A seal image from a book named Garyewonryu (가례원류:家禮源流) belonging to Chuk-ki Yoo (兪拓基, 1691–1767) was used as an example.
Heritage 05 00202 g013
Table 1. Statistical summary of RGB of all pixels (442 × 652 = 288,184 pixels) of PNG and JPG files of the oil painting of a girl before and after restoration.
Table 1. Statistical summary of RGB of all pixels (442 × 652 = 288,184 pixels) of PNG and JPG files of the oil painting of a girl before and after restoration.
Restoration StatusBeforeAfterDifference
Color VariableRedGreenBlueRedGreenBlueRedGreenBlue
PNGMinimum1515404215112
Average92.676.355.2113.388.480.0−20.7−12.1−24.8
Maximum227227225255255245−28−28−20
Range212212221255251243−43−39−22
Std. Dev.32.030.530.171.365.153.1−39.3−34.6−23.1
JPGMinimum1515200115151
Average92.576.355.4113.388.480.1−20.8−12.1−24.6
Maximum227227225255255246−28−28−21
Range212212223255255245−43−43−22
Std. Dev.31.930.530.071.265.153.1−39.3−34.6−23.1
PNG-JPGMinimum002041
Average0.0−0.1−0.20.00.0−0.1
Maximum00000−1
Range00−20−4−2
Std. Dev.0.10.00.00.10.00.0
Table 2. Statistical summary of CIE L*a*b* values of all pixels (442 × 652 = 288,184 pixels) of PNG and JPG files of the oil painting of a girl before and after restoration. Overall ΔE* between the PNG and JPG files before and after restoration (columns on the right) are also calculated (bottom row).
Table 2. Statistical summary of CIE L*a*b* values of all pixels (442 × 652 = 288,184 pixels) of PNG and JPG files of the oil painting of a girl before and after restoration. Overall ΔE* between the PNG and JPG files before and after restoration (columns on the right) are also calculated (bottom row).
Restoration StatusBeforeAfterDifference
Color VariableL*a*b*L*a*b*ΔL*Δa*Δb*ΔE*
PNGMinimum4.3−12.9−7.01.5−12.0−31.02.8−0.924.024.2
Average33.44.115.239.510.29.6−6.1−6.15.710.3
Maximum90.223.338.599.550.852.0−9.4−27.5−13.532.0
Range85.936.245.598.062.883.0−12.2−26.6−37.447.5
Std. Dev.12.46.710.225.113.716.4−12.6−7.0−6.215.7
JPGMinimum4.4−10.8−6.81.4−13.6−28.73.02.821.922.3
Average33.44.115.139.510.39.5−6.1−6.25.610.3
Maximum90.223.437.499.652.751.1−9.4−29.4−13.733.8
Range85.834.144.298.266.379.9−12.4−32.2−35.649.6
Std. Dev.12.46.610.225.113.716.4−12.6−7.0−6.215.7
PNG-JPGMinimum−0.1−2.1−0.20.21.6−2.3
Average0.00.00.10.00.00.0
Maximum0.0−0.11.10.0−1.90.8
Range0.12.01.3−0.2−3.53.1
Std. Dev.0.00.10.00.00.10.1
Overall ΔE*PNG-JPG0.10.0
Table 3. Statistical summary of RGB and CIE L*a*b* values of all pixels (740 × 972 pixels = 719,280 pixels) of a PNG image of a portrait of Chuk-ki Yoo.
Table 3. Statistical summary of RGB and CIE L*a*b* values of all pixels (740 × 972 pixels = 719,280 pixels) of a PNG image of a portrait of Chuk-ki Yoo.
RestorationColor Statistics
Color VariableRedGreenBlueL*a*b*
PNGMinimum151524.4−10.8−6.8
Average92.576.355.433.44.115.1
Maximum22722722590.223.437.4
Range21221222385.834.144.2
Std. Dev.31.930.530.012.46.610.2
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Yoo, W.S.; Kang, K.; Kim, J.G.; Yoo, Y. Extraction of Color Information and Visualization of Color Differences between Digital Images through Pixel-by-Pixel Color-Difference Mapping. Heritage 2022, 5, 3923-3945. https://doi.org/10.3390/heritage5040202

AMA Style

Yoo WS, Kang K, Kim JG, Yoo Y. Extraction of Color Information and Visualization of Color Differences between Digital Images through Pixel-by-Pixel Color-Difference Mapping. Heritage. 2022; 5(4):3923-3945. https://doi.org/10.3390/heritage5040202

Chicago/Turabian Style

Yoo, Woo Sik, Kitaek Kang, Jung Gon Kim, and Yeongsik Yoo. 2022. "Extraction of Color Information and Visualization of Color Differences between Digital Images through Pixel-by-Pixel Color-Difference Mapping" Heritage 5, no. 4: 3923-3945. https://doi.org/10.3390/heritage5040202

APA Style

Yoo, W. S., Kang, K., Kim, J. G., & Yoo, Y. (2022). Extraction of Color Information and Visualization of Color Differences between Digital Images through Pixel-by-Pixel Color-Difference Mapping. Heritage, 5(4), 3923-3945. https://doi.org/10.3390/heritage5040202

Article Metrics

Back to TopTop