einf hrung in visual computing
play

Einfhrung in Visual Computing U it 11 P i t O Unit 11: Point - PowerPoint PPT Presentation

Einfhrung in Visual Computing U it 11 P i t O Unit 11: Point Operations ti http:// www.caa.tuwien.ac.at/cvl/teaching/sommersemester/evc Content: Introduction to Point Operations Operations Histogram Histogram Normalization


  1. Einführung in Visual Computing U it 11 P i t O Unit 11: Point Operations ti http:// www.caa.tuwien.ac.at/cvl/teaching/sommersemester/evc  Content:  Introduction to Point Operations Operations  Histogram  Histogram Normalization Histogram Normali ation  Histogram Equalization 1 Robert Sablatnig, Computer Vision Lab, EVC ‐ 11: Point Operations

  2. Point Operations p mainly applied in the pre ‐ processing step:  Intensity of a new pixel is dependent on the original pixel only:  Intensity of a new pixel is dependent on the original pixel only:  Example: Inversion, Threshold, Brightness Enhancement, Contrast Enhancement Contrast Enhancement… 2 Robert Sablatnig, Computer Vision Lab, EVC ‐ 11: Point Operations

  3. Point Operations p  Point Operations perform a mapping of the pixel values without changing the size, geometry, or local structure of the image g g , g y, g  Each new pixel value I’(u,v) depends on the previous value I(u,v) at the same position and on a mapping function f() at the same position and on a mapping function f()  The function f() is independent of the coordinates  Such operation is called “homogeneous” S ch operation is called “homogeneo s” 3 Robert Sablatnig, Computer Vision Lab, EVC ‐ 11: Point Operations

  4. Point Operations p 4 Robert Sablatnig, Computer Vision Lab, EVC ‐ 11: Point Operations

  5. Point Operations p Example of homogeneous point operations:  Modifying image brightness or contrast  Modifying image brightness or contrast  Applying arbitrary intensity transformation (curves)  Quantizing (posterizing) images Q ti i ( t i i ) i  Global thresholding  Gamma correction  Color transformations 5 Robert Sablatnig, Computer Vision Lab, EVC ‐ 11: Point Operations

  6. Definition of Point Operations p  New intensity value (gray ‐ level) of a pixel only depends on the previous value . l  Transformation is performed on the pixel intensity value using a pixel intensity value using a mapping function :  linear or  non ‐ linear.  Mapping is usually implemented pp g y p with look ‐ up tables (LUT).  Following functions are possible:  Linear  stepwise linear I‘(u,v) ← a · I (u,v) + b  non ‐ linear 6 Robert Sablatnig, Computer Vision Lab, EVC ‐ 11: Point Operations

  7. Point Operations: Identity Function p y Before:  The identity function does not alter any pixel values. y p I‘(u,v) ← a · I (u,v) + b After: a = 1, b = 0 7 Robert Sablatnig, Computer Vision Lab, EVC ‐ 11: Point Operations

  8. Point Operations: Inversion Function p Before:  Inversion means that dark become bright and vice versa. g I‘(u,v) ← a · I (u,v) + b After: a = ‐ 1, b = q = 255 8 Robert Sablatnig, Computer Vision Lab, EVC ‐ 11: Point Operations

  9. Example: Inversion Transformation p Fi Figure is from slides at Gonzalez/ Woods DIP book website (Chapter 3) i f lid G l / W d DIP b k b i (Ch 3)

  10. Inversion Transformation  Inverting Images I‘(u,v) ← − I(u,v) + q = q − I(u, v).

  11. Threshold Operation p  Thresholding an image is a special type of quantization that separates the pixel values in two classes, depending on a given p p , p g g threshold value p th  The threshold function maps all the pixels to one of two fixed The threshold function maps all the pixels to one of two fixed intensity values p o , p 1 0 < p th ≤ p max  Example: binarization: p o =0 , p 1 =1 11 Robert Sablatnig, Computer Vision Lab, EVC ‐ 11: Point Operations

  12. Threshold Operation p p 0 p 1 p th Histograms 12 Robert Sablatnig, Computer Vision Lab, EVC ‐ 11: Point Operations

  13. Point Operations: Threshold Function p Before: Before:  Thresholding means a reduction to only two different color levels y upon a certain threshold value. After: 13 Robert Sablatnig, Computer Vision Lab, EVC ‐ 11: Point Operations

  14. Point Operations: Gray Level Reduction F nction Function Before: Before:  Gray ‐ level reduction reduces the number of intensity levels (e.g. 4 y ( g different levels). After: 14 Robert Sablatnig, Computer Vision Lab, EVC ‐ 11: Point Operations

  15. Point Operations: Brightness Increasing Function F nction Before: Before: Before: Before:  Generally the intensity values are increased. Note: Clipping may occur. pp g y I‘(u,v) ← a · I (u,v) + b After: After: a = 1, b = 90 15 Robert Sablatnig, Computer Vision Lab, EVC ‐ 11: Point Operations

  16. Point Operations: Brightness Reducing F nction Function Before: Before:  Generally the intensity values are reduced I‘(u,v) ← a · I (u,v) + b After: a = 1, b = ‐ 90 16 Robert Sablatnig, Computer Vision Lab, EVC ‐ 11: Point Operations

  17. Point Operations: Contrast Enhancing F nction Function Before: Before:  Intensity value that formerly were close together are now further apart (spreading). Note: Clipping may occur. I‘(u,v) ← a · I (u,v) + b After: a = 0,01, b = 1 17 Robert Sablatnig, Computer Vision Lab, EVC ‐ 11: Point Operations

  18. Point Operations: Contrast Reducing Function p g Before: Before:  Intensity value that formerly were wider apart are now closer (narrowing). The resulting ( g) g image does not contain the full intensity range. I‘(u,v) ← a · I (u,v) + b After: a = 90, b = 1 18 Robert Sablatnig, Computer Vision Lab, EVC ‐ 11: Point Operations

  19. Point Operations: Gamma Correcting F nction Function Before: Before:  Example of a non ‐ linear mapping function. After: 19 Robert Sablatnig, Computer Vision Lab, EVC ‐ 11: Point Operations

  20. Photoshop: Image ‐ Adjustments ‐ Curves p g j 20 Robert Sablatnig, Computer Vision Lab, EVC ‐ 11: Point Operations

  21. Histogram

  22. Histogram g  The histogram function is defined over all possible intensity levels.  For each intensity level its value is equal to the number of the  For each intensity level, its value is equal to the number of the pixels with that intensity.  Consider a 5x5 image with integer intensities in the range  Consider a 5x5 image with integer intensities in the range between one and eight: 1 8 4 3 4 1 1 1 7 8 1 1 1 7 8 8 8 3 3 1 2 2 1 5 2 2 2 1 5 2 1 1 8 5 2 22 Robert Sablatnig, Computer Vision Lab, EVC ‐ 11: Point Operations

  23. Example p 1 8 4 3 4 1 1 1 7 8 8 8 3 3 1 2 2 1 5 2 1 1 8 5 2 1 2 3 4 5 6 7 8 23 Robert Sablatnig, Computer Vision Lab, EVC ‐ 11: Point Operations

  24. Histogram Function g H(x) = card{(u,v) | I(u,v)=k}, k  {0,...,q} n n n n n n n n 3 5 6 7 8 1 2 4  ( ( ) ) f f r n k k 1 1 2 3 4 5 6 7 8 2 3 4 5 6 7 8

  25. Histogram Function g   f f ( ( r r ) ) 8 8 1 n n n n n n n n  3 5 6 7 8 1 2 4 f ( r ) 4 2  f ( r ) 3 3  f f ( ( r ) ) 3 4 4  f ( r ) 2 5  f f ( ( r ) ) 0 0 6  f ( r ) 1 7 1 1 2 3 4 5 6 7 8 2 3 4 5 6 7 8 ( 8  f r ) 5

  26. Histogram g  Assume that the digital image has q discrete gray levels and that n k , k = 0, ..., q ‐ 1 , is the number of pixel having intensity k . The histogram is given by: h ( r ) n   k k p ( r ) k n n where p is the normalized histogram function, n the total number of image pixels. n k are the number of pixels in the bin assigned to pixels with intensity level k .  It gives a measure of how likely is for a pixel to have a certain intensity. That is, it gives the probability of occurrence the intensity intensity.  The sum of the normalized histogram function over the range of all intensities is 1 all intensities is 1. 26 Robert Sablatnig, Computer Vision Lab, EVC ‐ 11: Point Operations

  27. Histogram g  The histogram function can be plotted graphically. The image histogram carries g p y g g important information about the image content. 27 Robert Sablatnig, Computer Vision Lab, EVC ‐ 11: Point Operations

  28. Histogram g  Distribution of gray ‐ levels can be judged by measuring a histogram: g g  For B ‐ bit image, initialize q=2 B counters with 0  Loop over all pixels x y  Loop over all pixels x,y  When encountering gray level f(r k )=i, increment co nter r increment counter r k  Histogram can be interpreted as an estimate of the probability density function (pdf) of the h b bili d i f i ( df) f h underlying random process.  You can also use fewer, larger bins to trade off amplitude resolution against sample size. 28 Robert Sablatnig, Computer Vision Lab, EVC ‐ 11: Point Operations

  29. Histogram g  Histogram on the right corresponds to the image on the left. It is a statistical measure of the occurrence of different color levels. 29 Robert Sablatnig, Computer Vision Lab, EVC ‐ 11: Point Operations

  30. Histogram g  Represents the relative frequency of occurrence of the various gray R h l i f f f h i levels in the image  For each gray level count the # of pixels having that level  For each gray level, count the # of pixels having that level  Can group nearby levels to form a big bin & count #pixels in it ( From Matlab Image Toolbox Guide Fig.10 ‐ 4 ) 30 Robert Sablatnig, Computer Vision Lab, EVC ‐ 11: Point Operations

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend