Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Use of Java for Demonstration 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. Moore April 29, 1998 Project 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. 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. Development 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 JpadPro http://www.modelworks.com Color Science Fundamentals Additive Color Mixing Subtractive Color Mixing The Java Demonstrations Three Color Science Demonstrations Simple Subtractive Color Mixing Simple Additive Color Mixing Calculation of Helmholtz coordinates Simple Subtractive Color Mixing Features & Functions • Double Buffered imaging to avoid flicker • Back-light switch to emphasize subtraction of light. • System requirements check. • Instruction panel Show Subtractive Color Mixing Applet Additive 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 Primary Components Super Pixel Concept Monitor Pixel p1 p2 p3 p3 p1 p2 p2 p3 p1 Super pixel p1 = primary 1 p2 = primary 2 p3 = primary 3 • Allows full RGB control over each “Primary” • More pleasing at 45 degree angle Color Picker Space Implementation RadialCenter P1 P2 P1 30 RadialMax Width P3 Where: RadialMax = ( Width / 2 ) / Tan 30 RadialCenter = (Width / 2 ) / Cos 30 Illustration of intensity variation for P1 only Show Additive mixing demonstration Class Hierarchy for Additive Color Mixing coloRama AdditiveMixerPanel GamutPanel gammutScreen Primary ShowMixPanel colorPickerPanel PrimaryDisplay ThreeSliderControl Three things to perceive color Object Eye Source But how do you specify color…. Color Matching Experiments 237 224 103 r, g, b Color Matching Function Wavelength () Transformed to x, y, z CIE 1931 Standard observer • To avoid negative numbers and simplify calculations • set y to equal the spectral luminous efficiency fnct (corresponding to a color’s lightness) Three things to perceive color 300 400 500 600 700 Source Object 300 400 500 600 700 Eye Calculation of Tristimulus Values X = k PRx Y = k PRy Z = k PRz 100 Where: k = Py And P = relative power distribution of CIE standard illuminant R = spectral reflectance of the object Chromaticity Coordinates • Translate the X, Y, Z to two dimensions for convenience x = X X+Y+Z y = Y X+Y+Z • Only need two points since: z = Z X+Y+Z x + y + z = 1.0 Chromaticity Diagram The Helmholtz Demonstration • Helmholtz coordinates are an alternative way to expressing chromaticity values. But what are they…... Calculation of Helmholtz coordinates 0.8 0.6 x 0.4 Select a White Point 0.2 0 0 0.2 0.4 y 0.6 Calculation of Helmholtz coordinates 0.8 0.6 x Select a Sample Point 0.4 0.2 0 0 0.2 0.4 y 0.6 Calculation of Helmholtz coordinates 0.8 Next… Draw a Line through the White point and sample point 0.6 x 0.4 0.2 0 0 0.2 0.4 y 0.6 Calculation of Helmholtz coordinates 0.8 The “Dominant Wavelength” is determined by the intersection with the spectrum Locus. 0.6 x 0.4 0.2 0 0 0.2 0.4 y 0.6 Calculation of Helmholtz coordinates ...and the “excitation Purity” is determined by the ratio of the distances as shown. 0.8 0.6 B x A 0.4 such that Pe = A/B 0.2 0 0 0.2 0.4 y 0.6 Complimentary Wavelength Algorithm 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... Show Helmholtz Application Class Hierarchy for Additive Color Mixing Helmholtz helmholtzPanel chromaticityControls chromaticityPanel illuminantPanel colorSamplePanel ChromaValuesPanel ChromaValuesPanel feedBackPanel feedBackPanel whitePointDataClass Color_kit Package color_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 Discussion of Results • Numerous Java VM inconsistencies –Sun JDK, MS SDK, Netscape (Semantics) • Wide performance variations • Java 1.1.5 VM roll-out Conclusion • Future Work • Acknowledgements