COM366 - PowerPoint PPT Presentation

1 / 33
About This Presentation
Title:

COM366

Description:

Using colour maps. colormap(hsv(16)) COM366. improfile : which will reveal the colour intensity profile along a line defined on the image. ... – PowerPoint PPT presentation

Number of Views:23
Avg rating:3.0/5.0
Slides: 34
Provided by: ericfl
Category:
Tags: colour | com366 | violet

less

Transcript and Presenter's Notes

Title: COM366


1
TOPIC 9 LIGHT AND COLOUR
RAY TRACING
COM366
2
Spectral colours
COM366
3
Colour saturation
COM366
4
With real colours an additive system is
impossible
Red Green unknown blue
unknown Red Green - blue
COM366
5
The human eye
COM366
6
Colour sensitivity
Luminous efficiency
COM366
7
The theoretical CIE colours
COM366
8
A colour combination
Normalised components
Now x y z 1 hence z 1 - x - y and
!
COM366
9
COM366
10
COM366
11
COM366
12
COM366
13
COM366
14
Colour Gamuts
Short Persistence phosphor
Long Persistence phosphor
Red Green Blue
Red Green Blue
x 0.61 0.29 0.15 y
0.35 0.59 0.063
x 0.62 0.21 0.15 y
0.33 0.685 0.063
COM366
15
The RGB cube
COM366
16
The HSV model
COM366
17
RGB to HSV conversion
procedure RGB_to_HSV (r,g,b real h,s,v real)
max lt-- max(r,g,b) min lt-- min(r,g,b) v lt--
max if max ltgt 0 then s lt-- (max -
min)/max else s 0 end if s 0 then
h is undefined else delta lt-- (max -
min) if r max then h lt-- (g - b)/delta
if g max then h lt-- 2 (b-r)/delta
if b max then h lt-- 4 (r - g)/delta h
lt-- h 60 convert to degrees if h lt 0
then h lt-- h 360 end
COM366
18
Using colour in MATLAB
Finding the colour depth in your system
get(0,'screendepth')
For an m x n image MATLAB creates
For an RGB image an array of double m x n x 3
For a uint8 image an array of byte m x n x 3
COM366
19
Displaying individual colour images
function colourdisplay To demonstrate the
splitting of an image into its primary colours A
imread('monar.jpg') subplot(2,2,1)
imshow(A) title('RGB image') Redimage
A(,,1) subplot(2,2,2) imshow(Redimage) title(
'Red image') Greenimage A(,,2) subplot(2,2,3
) imshow(Greenimage) title('Green
image') Blueimage A(,,3) subplot(2,2,4)
imshow(Blueimage) title('Blue image')
COM366
20
COM366
21
A1 rgb2hsv(A)
COM366
22
Using colour maps
colormap(hsv(16))
COM366
23
Inspecting colours in an image
improfile which will reveal the colour
intensity profile along a line defined on the
image.   pixval which will interactively record
the location and colour components of each pixel
as you move a cursor across the image.   impixel
returns the RGB values for a specified pixel.
COM366
24
COM366
25
COM366
26
Ray Tracing
COM366
27
COM366
28
COM366
29
COM366
30
Ray intersection with a bounding sphere
?i (c - s) ?d
COM366
31
COM366
32
COM366
33
COM366
Write a Comment
User Comments (0)
About PowerShow.com