Presentation is loading. Please wait.

Presentation is loading. Please wait.

Image Processing IB Paper 8 – Part A Ognjen Arandjelović Ognjen Arandjelović

Similar presentations


Presentation on theme: "Image Processing IB Paper 8 – Part A Ognjen Arandjelović Ognjen Arandjelović"— Presentation transcript:

1 Image Processing IB Paper 8 – Part A Ognjen Arandjelović Ognjen Arandjelović http://mi.eng.cam.ac.uk/~oa214/

2 – Colour –

3 Why Colour? Useful for perceptual enhancement of images: Original image Samples corresponding to a single pixel After enhancement

4 Why Colour? A useful descriptor for tracking of deformable objects in cluttered environments:

5 CCD Colour Image Acquisition We can think of image processing as a black box that takes an input image and produces an output image. Bayer mask Samples corresponding to a single pixel Red Green Blue

6 RGB Colour Space The RGB is an additive colour model: Red, Green and Blue are combined to produce other colours. +

7 RGB Colour Space It is one of the most frequently used colour models and is particularly attractive as it resembles the workings of the human visual system. The RGB colour model mapped onto a cube Common colours in the RGB colour space

8 RGB Colour Space Limitations The main limitation of the RGB representation is that apparent luminance is differently affected by different colours: NB: Human eye is more sensitive to luminance than chrominance (colour) Same luminance Same R, G, B values

9 YUV Color Space The YUV is an additive colour model, obtained by linear transformation of the RGB space, and it consists of:  The luminance component (Y) Indicates the apparent brightness of the colour  Two chrominance components (U and V) Indicate how far from grey the colour is, in the blue and red directions respectively Why these particular differences?

10 YUV Color Space The linear transformation between RGB and YUV colour spaces can be represented by simple matrix multiplication: YUV coordinates RGB coordinates Note different contributions of R, G and B to the luminance component

11 YUV Color Space The matrix C is non-singular (i.e. no information is lost in the transformation of coordinates) and the reverse conversion is simply:

12 YUV Color Space The YUV space can be visualized by looking at the directions of pure Y, U and V vectors in the orthonormal RGB space:

13 Human Eye Colour Sensitivity

14 Maximal luminance response at ~5 cycles/degree.  Stripe width ~1.8mm at ~1m distance

15 Human Eye Colour Sensitivity Little luminance response above ~100 cycles/degree.  Stripe width ~0.1mm at ~1m distance  19” display at 1280 х 1024 has pixel size ~0.29mm

16 Human Eye Colour Sensitivity Little luminance response at low frequencies.  Humans are bad at estimating absolute luminance levels as long as they do not change with time

17 Human Eye Colour Sensitivity Little luminance response at low frequencies.  Humans are bad at estimating absolute luminance levels as long as they do not change with time

18 Human Eye Colour Sensitivity These observations are often used in practice in image compression or video signal transmission applications:  U and V can be sampled at lower rate than Y due to their narrower bandwidth  U and V can be quantized more coarsely due to their lower contrast sensitivity

19 HSV Color Space The HSV representation shares some similar ideas as YUV, but is a non-linear transformation of RGB:  V(alue) is the maximal value of the R, G and B Approximate luminance  S(aturation) is the difference between the maximal and minimal of the R, G and B  H(ue) is a function of the colour of the maximal of R, G, and B, adjusted by the other two

20 HSV Color Space Formally, H, S and V components are defined as follows: Hue Saturation

21 HSV Color Space The HSV space can be visualized as a disc: Hue Saturation  Different Hue values form a circle  Saturation (normalized by the Value) is given by the distance from the centre of the disc

22 – Brightness and Contrast Correction –

23 Brightness and Contrast Enhancement Images of interest often have poor contrast and/or brightness characteristics:

24 Luminance Histograms Luminance histogram counts the frequency of occurrence of each possible pixel luminance across an image: There are 1966 pixels with luminance 50.

25 Histogram Modelling Key idea: can we devise a map of the original pixel intensities so that the resulting histogram is of particular form? What histogram shape should we aim for?

26 Point-Wise Brightness Correction Each pixel with the intensity i, regardless of the location in the image, is mapped to f(i):

27 Affine Correction In affine brightness correction, f(i) is a linear function:

28 Affine Correction – Example Original imageTransformed image

29 Affine Correction – Histograms Original histogramTransformed histogram Affine brightness correction shifts and stretches the luminance histogram: What is the origin of this?

30 Affine Correction – Clipping Nonlinear effects may be caused by clipping – the resulting pixel luminance must be in the valid range:

31 Gamma Correction Gamma correction is one of the most used histogram transformation techniques: The gamma value

32 Gamma Correction – Varying Gamma Varying the gamma values gives a family of possible intensity transformation curves: γ = 0.2 γ = 1.4

33 Gamma Correction – Varying Gamma What effects do different gamma values have on the appearance of an image? γ = 0.2 γ = 1.4  A small gamma stretches the lower part of the histogram – brings out detail in dark regions of the image

34 Gamma Correction – Varying Gamma What effects do different gamma values have on the appearance of an image? γ = 0.2 γ = 1.4  A large gamma stretches the higher part of the histogram – brings out detail in bright regions of the image

35 Gamma Correction – Example Original imageTransformed image

36 Gamma Correction – Histograms With gamma correction, certain parts of the image are stretched and others compressed: Original histogramTransformed histogram

37 Histogram Equalization In histogram equalization, the original pixel intensities are transformed in such a way that the resulting histogram is flat: How to obtain f(i)?

38 Cumulative Luminance Distribution Consider the cumulative pixel distribution: HistogramCorresponding cumulative distribution

39 Cumulative Luminance Distribution From the target cumulative distribution, we can write: HistogramCorresponding cumulative distribution Target cumulative distribution

40 Histogram Equalization Thus, the algorithm becomes: 1.Compute original histogram h(i) 2.From h(i) compute the cumulative distribution c(i) 3.Map pixels according to:

41 Histogram Equalization Original imageTransformed image

42 Histogram Equalization Note the following about the result: Original histogramTransformed histogram  The histogram is not flat  In some cases, different original intensities i are mapped to the same f(i)

43 – That is All for Today –


Download ppt "Image Processing IB Paper 8 – Part A Ognjen Arandjelović Ognjen Arandjelović"

Similar presentations


Ads by Google