36
Use of Java for Use of Java for Demonstration of Color Demonstration of Color Science Concepts Science Concepts Presentation of an MS Project, submitted to The Faculty of the Computer Science Department, in partial fulfillment of the requirements for the degree of Master of Science in Computer Science from Rochester Institute of Technology John A. Moore April 29, 1998

Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

Embed Size (px)

DESCRIPTION

Why Java ? Java is rich in it’s support of imaging and color. Demonstrations can (easily) be shared on the web Inherent portability to different platforms and hardware.

Citation preview

Page 1: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

Use of Java for Demonstration Use of Java for Demonstration of Color Science Concepts of Color Science Concepts

Presentation of an MS Project, submitted to The Faculty of the Computer Science Department, in

partial fulfillment of the requirements for the degree of Master of Science in Computer

Science from Rochester Institute of Technology

John A. MooreApril 29, 1998

Page 2: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

Project ObjectivesProject Objectives

• Gain knowledge and experience with Java Programming.

• Apply my knowledge of Color Science.• Generate a Package of general purpose

Color Science Java classes for others to use and grow.

• Complete requirements for MS Degree.

Page 3: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

Why Java ?Why Java ?

• Java is rich in it’s support of imaging and color.

• Demonstrations can (easily) be shared on the web

• Inherent portability to different platforms and hardware.

Page 4: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

Development EnvironmentDevelopment Environment

• Experimented with many…– Microsoft Visual J++– Semantics Visual Café for Java– Basic JDK

• Settled on JpadPro– Basic project management– Support for custom Packages– Colored coded text editor– Easy to use and learn

Page 5: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

JpadPro JpadPro http://www.modelworks.comhttp://www.modelworks.com

Page 6: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

Color Science FundamentalsColor Science Fundamentals

Additive Color Mixing Subtractive Color Mixing

Page 7: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

The Java DemonstrationsThe Java Demonstrations

Three Color Science Demonstrations

Simple Subtractive Color MixingSimple Additive Color Mixing

Calculation of Helmholtz coordinates

Page 8: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

Simple Subtractive Color Simple Subtractive Color MixingMixing

Features & Functions• Double Buffered imaging to avoid

flicker• Back-light switch to emphasize

subtraction of light.• System requirements check.• Instruction panel

Page 9: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

Show Subtractive Show Subtractive Color Mixing AppletColor Mixing Applet

Page 10: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

Additive Color MixingAdditive Color Mixing

Features & Functions• Allows user to choose color of each

primary• Select a color ‘mixture’ from a color

picker• Allows the user to see the selected

color in a mixer panel.• Utilizes a ‘super cell’ technique

Page 11: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

Primary ComponentsPrimary Components

Page 12: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

p1 p2 p3

p3 p1 p2

p2 p3 p1

p1 = primary 1p2 = primary 2p3 = primary 3

Monitor Pixel

Super pixel

Super Pixel ConceptSuper Pixel Concept

• Allows full RGB control over each “Primary”• More pleasing at 45 degree angle

Page 13: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

Illustration of intensity variation for P1 only

P1

Where:RadialMax = ( Width / 2 ) / Tan 30RadialCenter = (Width / 2 ) / Cos 30

RadialCenter

RadialMax

30P1 P2

P3

Width

Color Picker Space Color Picker Space ImplementationImplementation

Page 14: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

Show Additive mixing Show Additive mixing demonstrationdemonstration

Page 15: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

coloRama

AdditiveMixerPanel

Primary

GamutPanel

PrimaryDisplay

colorPickerPanelShowMixPanel

ThreeSliderControl

gammutScreen

Class HierarchyClass Hierarchyfor Additive Color Mixingfor Additive Color Mixing

Page 16: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

Three things to perceive colorThree things to perceive color

Source

Object

Eye

But how do you specify color….But how do you specify color….

Page 17: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

237

224

103

Color Matching ExperimentsColor Matching Experiments

Page 18: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

r, g, b Color Matching Functionr, g, b Color Matching Function

Wavelength ()

Page 19: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

Transformed to x, y, zTransformed to x, y, z

• To avoid negative numbers and simplify calculations

• set y to equal the spectral luminous efficiency fnct (corresponding to a color’s lightness)

CIE 1931 Standard observer

Page 20: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

Three things to perceive colorThree things to perceive color

ObjectSource Eye

300 400 500 600 700

300 400 500 600 700

Page 21: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

Calculation of Tristimulus Calculation of Tristimulus ValuesValues

X = k PRxY = k PRyZ = k PRz

Where: k = 100Py

And P = relative power distribution of CIE standard illuminant R = spectral reflectance of the object

Page 22: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

Chromaticity CoordinatesChromaticity Coordinates

• Translate the X, Y, Z to two dimensions for convenience

x = XX+Y+Z

y = YX+Y+Z

z = ZX+Y+Z

• Only need two points since: x + y + z = 1.0

Page 23: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

Chromaticity DiagramChromaticity Diagram

Page 24: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

The Helmholtz DemonstrationThe Helmholtz Demonstration

• Helmholtz coordinates are an alternative way to expressing chromaticity values.

But what are they…...

Page 25: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

00

0.8

0.60.40.2

0.2

0.4

0.6

x

y

Select a White Point

Calculation of Helmholtz coordinatesCalculation of Helmholtz coordinates

Page 26: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

Select a Sample Point

00

0.8

0.60.40.2

0.2

0.4

0.6

x

y

Calculation of Helmholtz coordinatesCalculation of Helmholtz coordinates

Page 27: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

Next…Draw a

Line through

theWhite pointand

samplepoint

00

0.8

0.60.40.2

0.2

0.4

0.6

x

y

Calculation of Helmholtz coordinatesCalculation of Helmholtz coordinates

Page 28: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

The “Dominant Wavelength”is determined

by the intersection

with the spectrum Locus.

00

0.8

0.60.40.2

0.2

0.4

0.6

x

y

Calculation of Helmholtz coordinatesCalculation of Helmholtz coordinates

Page 29: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

...and the “excitation Purity” is

determined by the ratio of the

distances as shown.

00

0.8

0.60.40.2

0.2

0.4

0.6

x

y

Calculation of Helmholtz coordinatesCalculation of Helmholtz coordinates

AB

such thatPe = A/B

Page 30: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

Complimentary WavelengthComplimentary Wavelength

Page 31: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

The condition shown in yellow is met when...• The slope of the line is positive.• The y-value of the line at x is less than the y-value of the

locus at x.• The sample point x-chroma value is greater than the

White Point x-chroma value OR Sample point is a Complimentary Color...

The condition shown in green is met when…• The slope of the line is positive.• The y-value of the line at x is greater than the y-value of

the locus at x.• Sample point x-chroma value is less than the White Point

x-chroma value AND The sample point is not a Complimentary Color.

The condition shown in blue is met when...

• The slope of the line is negative.• The y-value of the line at x is greater than the y-value of

the locus at x.• Sample point x-chroma value is less than the White Point

x-chroma value OR The Sample point is a Complimentary Color...

The condition shown in pale red is met when...• The slope of the line is negative.• The y-value of the line at x is less than the y-value of the

locus at x.• Sample point x-chroma value is greater than the White

Point x-chroma value AND The Sample point is not a Complimentary Color...

AlgorithmAlgorithm

Page 32: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

Show Show Helmholtz ApplicationHelmholtz Application

Page 33: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

Helmholtz

helmholtzPanelchromaticityControls

illuminantPanel

colorSamplePanel

ChromaValuesPanel feedBackPanel

ChromaValuesPanel

feedBackPanel

chromaticityPanel

whitePointDataClass

Class HierarchyClass Hierarchyfor Additive Color Mixingfor Additive Color Mixing

Page 34: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

Color_kit PackageColor_kit Packagecolor_kit.color_space

color_kit.color_space.uv_chromaticity color_kit.color_space.xy_10degree_chromaticity color_kit.color_space.xy_chromaticity

color_kit.dialogs color_kit.panels

color_kit.panels.bundles color_kit.panels.controls color_kit.panels.displays

color_kit.toolkit

Page 35: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

Discussion of ResultsDiscussion of Results

• Numerous Java VM inconsistencies–Sun JDK, MS SDK, Netscape (Semantics)

• Wide performance variations• Java 1.1.5 VM roll-out

Page 36: Use of Java for Demonstration of Color Science Concepts Presentation of an MS Project, submitted to…

ConclusionConclusion

• Future Work• Acknowledgements