CHAPTER 3 COLOR MEASUREMENT USING CHROMATICITY DIAGRAM - SOFTWARE

Similar documents
Lecture 1 Image Formation.

Introduction to color science

Digital Image Processing

(0, 1, 1) (0, 1, 1) (0, 1, 0) What is light? What is color? Terminology

The Elements of Colour

Reading. 2. Color. Emission spectra. The radiant energy spectrum. Watt, Chapter 15.

Topics: Chromaticity, white point, and quality metrics

Lecture 12 Color model and color image processing

Chapter 5 Extraction of color and texture Comunicação Visual Interactiva. image labeled by cluster index

A Data Flow Approach to Color Gamut Visualization

Digital Image Processing COSC 6380/4393. Lecture 19 Mar 26 th, 2019 Pranav Mantini

CSE 167: Lecture #6: Color. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

Computer Graphics. Bing-Yu Chen National Taiwan University

CS770/870 Spring 2017 Color and Shading

CS 111: Digital Image Processing Fall 2016 Midterm Exam: Nov 23, Pledge: I neither received nor gave any help from or to anyone in this exam.

CSE 167: Lecture #6: Color. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

CSE 167: Introduction to Computer Graphics Lecture #6: Colors. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

Spectral Color and Radiometry

Game Programming. Bing-Yu Chen National Taiwan University

CSE 167: Lecture #7: Color and Shading. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

The Display pipeline. The fast forward version. The Display Pipeline The order may vary somewhat. The Graphics Pipeline. To draw images.

Reprint (R30) Accurate Chromaticity Measurements of Lighting Components. Reprinted with permission from Craig J. Coley The Communications Repair depot

When this experiment is performed, subjects find that they can always. test field. adjustable field

MODELING LED LIGHTING COLOR EFFECTS IN MODERN OPTICAL ANALYSIS SOFTWARE LED Professional Magazine Webinar 10/27/2015

Color Vision. Spectral Distributions Various Light Sources

CIE Colour Chart-based Video Monitoring

CS635 Spring Department of Computer Science Purdue University

INTRODUCTION. Slides modified from Angel book 6e

Distributed Algorithms. Image and Video Processing

Color Space Transformations

Reconstruction of Surface Spectral Reflectances Using Characteristic Vectors of Munsell Colors

National Chiao Tung Univ, Taiwan By: I-Chen Lin, Assistant Professor

Digital Image Processing. Introduction

Colour Reading: Chapter 6. Black body radiators

Chapter 1. Light and color

Lecture 1. Computer Graphics and Systems. Tuesday, January 15, 13

VISUAL SIMULATING DICHROMATIC VISION IN CIE SPACE

CS452/552; EE465/505. Color Display Issues

Fall 2015 Dr. Michael J. Reale

ams AG TAOS Inc. is now The technical content of this TAOS document is still valid. Contact information:

Color and Shading. Color. Shapiro and Stockman, Chapter 6. Color and Machine Vision. Color and Perception

ECE-161C Color. Nuno Vasconcelos ECE Department, UCSD (with thanks to David Forsyth)

Multimedia Information Retrieval

Lecture 4 Image Enhancement in Spatial Domain

A New Time-Dependent Tone Mapping Model

2003 Steve Marschner 7 Light detection discrete approx. Cone Responses S,M,L cones have broadband spectral sensitivity This sum is very clearly a dot

Image Formation. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

Color to Binary Vision. The assignment Irfanview: A good utility Two parts: More challenging (Extra Credit) Lighting.

Color, Edge and Texture

Image Formation. Camera trial #1. Pinhole camera. What is an Image? Light and the EM spectrum The H.V.S. and Color Perception

Herding CATs: A Comparison of Linear Chromatic-Adaptation Transforms for CIECAM97s

Quality control database software. Try the new range of spectrophotometers from ColorLite.

Estimation of Reflection Properties of Silk Textile with Multi-band Camera

Image Processing. Color

A DATA FLOW APPROACH TO COLOR GAMUT VISUALIZATION

Visible Color. 700 (red) 580 (yellow) 520 (green)

Spectral Adaptation. Chromatic Adaptation

Color. making some recognition problems easy. is 400nm (blue) to 700 nm (red) more; ex. X-rays, infrared, radio waves. n Used heavily in human vision

Colour computer vision: fundamentals, applications and challenges. Dr. Ignacio Molina-Conde Depto. Tecnología Electrónica Univ.

Introduction to Computer Graphics with WebGL

Announcements. Lighting. Camera s sensor. HW1 has been posted See links on web page for readings on color. Intro Computer Vision.

Light Transport Baoquan Chen 2017

2.2 Scientific Notation & Dimensional Analysis. Monday, September 23, 13

Physical Color. Color Theory - Center for Graphics and Geometric Computing, Technion 2

COMP3421. Global Lighting Part 2: Radiosity

3D graphics, raster and colors CS312 Fall 2010

Color. Phillip Otto Runge ( )

CG T8 Colour and Light

Estimating the wavelength composition of scene illumination from image data is an

Graphics Systems and Models

Three-Dimensional Coordinate Systems

Chapter 4 Color in Image and Video

A Silicon Graphics CRT monitor was characterized so that multispectral images could be

Graphics Hardware and Display Devices

Hyperspectral Remote Sensing

Lecture 16 Color. October 20, 2016

Reading. 4. Color. Outline. The radiant energy spectrum. Suggested: w Watt (2 nd ed.), Chapter 14. Further reading:

Module 3. Illumination Systems. Version 2 EE IIT, Kharagpur 1

COLOR FIDELITY OF CHROMATIC DISTRIBUTIONS BY TRIAD ILLUMINANT COMPARISON. Marcel P. Lucassen, Theo Gevers, Arjan Gijsenij

Appendix 1: Manual for Fovea Software

Thank you for choosing NCS Colour Services, annually we help hundreds of companies to manage their colours. We hope this Colour Definition Report

Multimedia Technology CHAPTER 4. Video and Animation

Analysis of Binary Images

Lighting. Camera s sensor. Lambertian Surface BRDF

XYZ to ADL: Calculating Logvinenko s Object Color Coordinates

Understanding Variability

MAT 090 Brian Killough s Instructor Notes Strayer University

OPTIS Labs Tutorials 2013

Chinle USD CURRICULUM GUIDE. SUBJECT: MATH GRADE: 6th TIMELINE: 2 nd Quarter. Kid Friendly Learning Objective

A Survey of Modelling and Rendering of the Earth s Atmosphere

CS 445 HW#6 Solutions

Integer Operations. Summer Packet 7 th into 8 th grade 1. Name = = = = = 6.

Color Appearance in Image Displays. O Canada!

Motivation. Intensity Levels

A Statistical Model of Tristimulus Measurements Within and Between OLED Displays

Raytracing CS148 AS3. Due :59pm PDT

Comparative Analysis of the Quantization of Color Spaces on the Basis of the CIELAB Color-Difference Formula

Mu lt i s p e c t r a l

Sources, Surfaces, Eyes

Transcription:

49 CHAPTER 3 COLOR MEASUREMENT USING CHROMATICITY DIAGRAM - SOFTWARE 3.1 PREAMBLE Software has been developed following the CIE 1931 standard of Chromaticity Coordinates to convert the RGB data into its equivalent dominant wavelength and purity. The Luminance or brightness equivalent of such RGB data is also displayed in this software. This chapter contains the User Requirements, Design specifications and Validation details for the Software. An application needs to be created to analyze the chromaticity information of an RGB image or an RGB data. It should have options to browse to specify the image file to analyze and it should provide an interactive user interface to verify the color information of that image in various color spaces listed below by performing necessary transformation. CIE 1931 Color space (x, y and z) CIE 1960 Color space (u and v) CIE 1976 Color space (u and v ) Maxwell s Triangle (Normalized X, Y and Z) The application should provide the equivalent wavelength, purity and brightness information for an RGB color input using the transformation

50 specified in section 3.1.1 below. The input RGB color can be specified either from mouse position on the image loaded or it may be fed manually as well. Similarly, for the RGB color chosen, it should display the equivalent coordinates in any of the chromaticity spaces listed above. Also, the application should be able to perform the reverse transformation as well, that is, for a given point in the desired color space, the values of that color in RGB model should be displayed. A marker to specify the point in the Chromaticity Coordinate on the target color space may also be indicated on the screen. 3.1.1 Transformation Calculation: Chromaticity Triangle and Phosphor Triangle The physical perception of color is based upon three color pigments in the retina. The description of color on the basis of Chromaticity Coordinates not only permits an analysis of color but provides a synthesis technique as well. Using a mixture of two color sources, it is possible to generate any of the colors along the line connecting their respective Chromaticity Coordinates. Since we cannot have a negative number of photons, this means the mixing coefficients must be positive. Using three color sources such as the red, green, and blue phosphors on CRT monitors leads to the set of colors defined by the interior of the "phosphor triangle" shown in Figure 3.1. The formulae for converting from the tristimulus values (X,Y,Z) to the well-known CRT colors (R,G,B) and back, in the software are based on the equations from (2.1) to (2.11). As long as the position of a desired color (X,Y,Z) is inside the phosphor triangle in Figure 3.1, the values of R, G, and B will be positive and can therefore be used to drive a CRT monitor.

51 Figure 3.1 Chromaticity diagram containing the CIE chromaticity triangle associated with pure spectral colors and the triangle associated with CRT phosphors 3.2 SOFTWARE DESIGN Design of software Color measurement using Chromaticity Diagram has been carried out as detailed below: 3.2.1 Software Description This software consists of an executable file, namely Color measurement. This utility provides the equivalent wavelength, purity and brightness for either the selected RGB color input from the image or the RGB data fed into it. It also shows the coordinates of that color in the chromaticity spaces such as CIE 1931 Color space (x, y and z) CIE 1960 Color space (u and v) CIE 1976 Color space (u and v ), and Maxwell s Triangle (Normalized X, Y and Z)

52 The position of the Chromaticity Coordinate on the corresponding color space is also indicated on the screen. Similarly, for a given point in the desired color space, the values of that color in RGB model is also displayed. 3.2.2 User Interface and Functionality Design The Visual basic project Color measurement.vbp contains three forms such as Chromaticity.frm, GetColor.frm and Get Coordinates.frm and two modules such as Conversion.bas and Display.bas as shown in the Project Explorer window of Figure 3.2. Figure 3.2 Project explorer window of color measurement.vbp 3.2.2.1 Chromaticity.frm form This form provides the main User Interface. User can open any kind of picture file by clicking Load Picture button. The loaded picture will be displayed in the left hand side part of the screen. By navigating the mouse on the loaded image, the RGB values of the corresponding pixel is depicted in the display. By clicking on a particular pixel, its equivalent wavelength, purity

53 and luminance (brightness) are shown. The user can select the desired color space and the chosen pixel s coordinates in the selected color space is displayed. By default, the software selects the CIE 1931 color space only. A sample output of Color measurement using Chromaticity Diagram is shown in Figure 3.3. Figure 3.3 Sample output of color measurement using chromaticity diagram 3.2.2.2 GetColor.frm form This form is launched when the user clicks the Check for Color command button in Chromaticity.frm screen. It prompts the user to enter Red, Green and Blue values between 0 and 255. Its equivalent wavelength, purity and luminance are displayed on the screen.

54 3.2.2.3 GetCoordinates.frm form This form is loaded when the user clicks the Find Color command button in the main screen. It prompts the user to enter the x and y coordinates values of the target color space. Its equivalent wavelength, purity and luminance are displayed on the screen. We can also see the equivalent RGB data for that (x, y) coordinate. The fact of inefficiency of the CRT display in displaying the negative valued RGB data can be verified here. For example, when x=0.1 and y=0.5, the RGB values are R=-135, G=255 and B=145. This point goes out of the Phosphor-triangle; however its equivalent wavelength, purity and luminance can be seen as shown in the Figure 3.4. Figure 3.4 Sample output for GetCoordinates.frm

55 3.2.2.4 Conversion.bas module This is the main module that contains functions for convertion between different color spaces for given coordinate values. It also contains type and definitions for color systems and initializing procedures. It also converts x and y CIE Chromaticity Coordinates into its equivalent wavelength, purity and luminance. It also mutually converts the color coordinates of various color spaces such as CIE 1931, CIE 1960, CIE 1976 and Maxwell s triangle. 3.2.2.5 Display.bas module This module contains the public function display() which takes the RGB values as input and displays different chromaticity measurements in the main form Chromaticity.frm. 3.2.3 Implementation The set of common and core implementations include Color System type definition with set of functions and procedures. A color system is defined by the CIE x and y coordinates of its three primary illuminants and the x and y coordinates of the white point. 3.2.3.1 Type definition A Color system is defined by the CIE x and y coordinates of its three primary illuminants and the x and y coordinates of the white point. The primary illuminants are Red (700 nm) with Chromaticity Coordinates x r =0.7350, y r =0.2650, Green (545 nm) with Chromaticity Coordinates x g =0.2740, y g =0.7170, and Blue (400 nm) with Chromaticity Coordinates x b =0.1670, y b =0.0090. The Coordinates for the reference illuminant White is x w =0.3333, y w =0.3333.

56 3.2.3.2 Calculation of brightness The public function Brightness() calculates the luminance value of the given Red, Green and Blue values as per the equation (2.4). This function has been written as follows in the Software. Public Function brightness(byval r As Double, ByVal g As Double, ByVal b As Double) As Double Dim greatest As Integer greatest = 255 brightness = ((100#/greatest) * (0.299 * r + 0.587 * g + 0.114*b)) End Function 3.2.3.3 Conversion of x and y coordinate to its equivalent wavelength and purity The xyz_to_wp() function finds the wavelength and purity for the given x and y Chromaticity Coordinates of CIE 1931 Chromaticity Diagram. This uses the geometry of the RGB triangle and CIE color space to find dominant wavelength. From the white point of the color space, a virtual line is drawn to the color specified by the XYZ coordinates. This line is extended until it reaches the Color space contour. The wavelength specified by the color space at the point of intersection of this line in the color space outer curve gives the dominant wavelength. Similarly the purity is calculated as the percentage of proximity of the color point specified by XYZ coordinates to the outer contour of the CIE Color space in the virtual line. This process of conversion of x and y Chromaticity Coordinate to its equivalent wavelength and purity is schematically shown in Figure 3.5.

57 Figure 3.5 Flow chart of conversion of (x, y) coordinate to its equivalent wavelength and purity

58 Appendix 3. The complete software for this function has been given in 3.2.3.4 Conversion of RGB data to x, y and z chromaticity coordinates For a given RGB data, its equivalent x, y and z coordinates in CIE 1931 Color space is displayed from this function. The following preliminary requirements are in this function: R, G and B are between the range 0 and 255 If all RGB values are positive, then they fall into the phosphor triangle x and y are calculated using the equations from (2.1) to (2.9) Equal energy White with x=y=z=1/3 is adopted z is derived trivially as 1-(x+y) Color system is CIE 1931 Color space Appendix 3. The software for this function has been completely given in 3.2.3.5 Conversion of x, y and z chromaticity coordinates to RGB data For a given x, y and z coordinates in CIE 1931 Color space, its equivalent RGB data is displayed from this function. The following preliminary requirements are in this function: x, y and z are between the range 0 and 1 If all RGB values are not positive for some values of x and y, then the (x,y) coordinate may fall out of the phosphor triangle. However, its equivalent Wavelength, purity and Brightness will be displayed.

59 This function uses the inverse of transformation specified in the Section 3.2.3.4. The software for this function has also been completely given in Appendix 3. 3.3 TESTING Testing of Software includes giving various inputs to the Software and studying the output. Figure 3.6 RGB data to wavelength and purity conversion An image is loaded in to the picture box by clicking on load picture command button. By moving the mouse on the image loaded, the RGB content of the corresponding pixel is displayed. When the mouse button is clicked on any pixel, the pixel s equivalent RGB data, wavelength, purity and luminance are displayed as shown in Figure 3.6.

60 Similar testing can be run for the Check for a Color command button. Using this button, any RGB data can be fed into the software. After feeding the RGB data, if Ok button is clicked, the RGB data s equivalent x and y coordinates, wavelength, purity and luminance are displayed as shown in Figure 3.7. Figure 3.7 RGB to xyz conversion Find Color command button can be tested by clicking on and feeding the x and y Chromaticity Coordinates. Equivalent RGB data, wavelength, purity and Luminance are displayed on the screen as shown in Figure 3.8.

61 Figure 3.8 xyz to RGB conversion 3.4 APPLICATION OF SOFTWARE This Color measurement using Chromaticity Diagram software has been utilized in this thesis for two purposes. First by capturing image of the assay and getting RGB data from the pixel of the image, calculation of the concentration of glucose from the purity of the color has been done. Next, with the help of RGB color sensor, RGB equivalent of the color of the assay is directly obtained. From this RGB data, purity of the color of the assay has been obtained in this software and measurement of concentration of glucose has been done. This Software is a general purpose software. Wherever a color s wavelength and its spectral purity are needed, this software can be used.