Full Colour Image Processing. â«Approach 1: â«Convert from RGB to HSI. â«Process the I component. â«Convert back to RGB. HSI Colour Image Processing.
Colour Image Processing
Colour image processing Can be full colour or pseudo-colour Fundamentals –All colours are combinations of primary colours
–Secondary colours: –A colour can be described by its brightness, hue and saturation
Colour fundamentals Tristimulus values: X, Y and Z Trichromatic coefficients: x, y and z where x=
X , y= Y and z = Z . X+Y+Z X+Y+Z X+Y+Z
Chromaticity diagram is a plot of y against x
Chromaticity diagram
Colour Models RGB model:
Colour Models CMY model: Similar to RGB but uses secondary colours
ƒ
C 1 R M 1 G Y 1 B
YIQ model Used in television ƒY component is the luminance part, which is decoupled from the chrominance (IQ) ƒ
Y 0299 . 0587 . 0114 . R 0596 . 0275 . 0321 . I G . 0523 . 0311 . B Q 0212
Colour Models YUV model Again, the luminance Y is decoupled from the chrominance UV
ƒ
Y 0299 . R 0587 . G 0114 . B U BY V RY
YUV variants
HSI Colour Model Relationship with RGB
HSI Colour Model Relationship with RGB
Converting RGB to HSI Given R,G and B with 0 R, G , B 1 –Step 1: Intensity I 13 R G B 3
–Step 2: If I 0 , then the saturation S 1 R G B min( R, G, B) 1 R G R B 2 –Step 3: If S 0 , then the hue H cos 2 R G R B G B 1
–Step 4: If B G , then correct hue by setting h=3600-h I
I
Converting HSI to RGB Step 1: Calculate r,g,b:
Step 2: Calculate RGB
Pseudo Colour Image Processing Intensity Slicing
Pseudo Colour Image Processing Gray level to colour transformations
Pseudo Colour Image Processing Gray level to colour transformations
Pseudo Colour Image Processing Frequency Filtering approach
f(x,y )
Fourier Transform
Filter
Inverse FT
Other Processing
Filter
Inverse FT
Other Processing
Filter
Inverse FT
Other Processing
Colour Display
Full Colour Image Processing Approach 1: Convert from RGB to HSI Process the I component Convert back to RGB
HSI Colour Image Processing Colour histogram equalisation
Full Colour Image Processing Approach 2: Process in original colour domain 2 approaches can be used: –Process each channel independently and then combine –Directly process colour pixels (as Vectors)
Original Colour Domain Image Processing The results of the 2 approaches may or may not be identical
Vector mean c x,y
1 N
c x , y where c = [R G B]T x , y N
What about the median?
Vector Norms The Lp norm of a vector is defined by: x j xi
p
| x j1 xi1 | | x j 2 xi 2 | | x jn xin | p
p
1 p p
The 3 most commonly used norms are: –L1 norm (City block distance) –L2 norm (Euclidean distance) –L∞ norm (Chessboard distance)
max | x j1 xi1 |, | x j 2 xi 2 |,, | x jn xin |
1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8
Vector Median Filter The vector median of a set of n vectors N is defined by n
i 1
xVM xi
x j xi , j N n
p
p
i 1
Vector median example: x1 3,3 x2 1,1 x3 3,1 x4 3,2
4
i 1
X
x1 x i
2
(3 1) 2 (3 1) 2 (3 3) 2 (3 1) 2 (3 3) 2 (3 2) 2
X X X
Reference J. Astola, P. Haavisto, and Y. Neuvo, “Vector median filters,” Proc. IEEE, vol. 78, pp. 678–689, 1990
Vector Median Filter
Colour Edge Detection Grayscale edge detection only accounts for 90% of total color edge points; color edge detection is required to resolve the remaining 10% Image Recombination Vector Methods
Image Decomposition
Multidimensional Gradient Methods
Model Matching
Output Fusion Methods
Edge Decision
Edge Map
M. Ruzon and C. Tomasi, “Edge, junction, and corner detection using color distributions,” IEEE Trans. PAMI, vol. 23, no. 11, pp. 1281–1295, November 2001.
Vector order statistics colour edge detectors Reduced ordering according to aggregate distances, dis, given by n d i xi x k p , i 1,2 , ,n k 1
Vectors ordered so that when d(1) ≤ d(2) ≤,…,≤ d(n) the vector order is x1 x2 , , xn
Vector Range edge detector = xn x1
p
Vector order statistics colour edge detectors Minimum VR = min{ x n j 1 x1 j
j 1, 2 ,k ;
p
}
k n
l
xi
i 1
l
Min Vector Deviation = min{ x n j 1 j
j 1, 2 ,k ;
} p
k ,l n
P. Trahanias and A.N. Venetsanopoulos, Color edge detection using vector order statistics, IEEE Trans. Image Processing,vol. 2, no. 2, pp. 259–264, 1993. P. Trahanias and A.N. Venetsanopoulos, Vector order statistics operators as color edge detectors, IEEE Trans Systems, Machines and Cybernetics, vol. 26, no. 1, pp. 135–143, February 1996.
Colour morphology gradient operators Inspired by the Morphological Gradient ( f ) g ( f ) g ( f ) max{ f ( x)} min{ f ( x)} xg
xg
max(| fi fj |),i, j g
Does not require an explicit pixel ordering and is easily extended to colour images
CMG max{ xi x j i , jg
p
}
Colour morphology gradient operators
Probability
Consider the CMG performance at a step edge corrupted by Gaussian noise
0
50
100
150
Inte ns ity
200
250
Colour morphology gradient operators Robust Colour Morphological Gradient (RCMG) produces improved performance by –rejecting outliers –finding median centred difference RCMG max { xi x j i , jN R s
p
}
where R s is the set of s vectors removed
Typical values: – s = 1 or 2 for 3x3 mask – s = 8 or 9 for 5x5 mask
Colour morphology gradient operators Figure of Merit evaluation
Colour morphology gradient operators Natural image performance
A.N. Evans and X. Liu, A Morphological Gradient Approach to Colour Edge Detection, IEEE Transactions on Image Processing, 15(6), pp. 1454-1463, June 2006.