1 / 31

Lecture 02 Point Based Image Processing

Lecture 02 Point Based Image Processing. Mata kuliah : T0283 - Computer Vision Tahun : 2010. Learning Objectives. After carefully listening this lecture, students will be able to do the following : understand spatial information based image operation such as point-based processing

conner
Download Presentation

Lecture 02 Point Based Image Processing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture 02Point Based Image Processing Mata kuliah : T0283 - Computer Vision Tahun : 2010

  2. Learning Objectives • After carefullylistening this lecture, students will be able to do the following : • understand spatial information based image operation such as point-based processing • demonstrate how point-based image processing is performed (i.e. contrast enhancement and histogram equalization. T0283 - Computer Vision

  3. Digital Image Representation (Review Last Lecture) • For computer representation, function (e.g. intensity) must be sampled at discrete intervals. • Sampling map the intensity values into discrete intervals. • Points at which an image is sampled are called picture elements or pixels. • Resolution specifies the distance between points - accuracy. T0283 - Computer Vision

  4. Spatial Digitization (Sampling) y f(x,y) s(x,y) grid x I(x,y) = f (x,y) . s(x,y) where s(x,y) = 1 for every value of x and y T0283 - Computer Vision

  5. Spatial Digitization (Sampling) 24 x 36 48 x 72 400 x 267 96 x 144 T0283 - Computer Vision

  6. Image Quantization Output Intensity 5 th level 4 th level 3 rd level 2 nd level 1st level 0 th level Input Intensity T0283 - Computer Vision

  7. Image Quantization 1 bit/piksel 2 bit/piksel 8 bit/piksel 3 bit/piksel T0283 - Computer Vision

  8. Digital Image Representation 0,0 c I(r,c) • A digital image is represented by a matrix of numeric values each representing a quantized intensity value. • I(r,c) - intensity value at position corresponding to row r and column c of the matrix. • Intensity value can be represented by 1 bit for black and white images (binary valued images), 8 bits for monochrome imagery to encode color or grayscale levels, 24 bits (color-RGB). r M-1,N-1 T0283 - Computer Vision

  9. Classification of Image Operations • Spatial Domain Methods • Point processing transformations • Area/Mask processing transformations • Geometric transformations • Frame processing transformations • Frequency Domain Methods T0283 - Computer Vision

  10. Point Processing Methods • The most primitive, yet essential, image processing operations. • Intensity transformations that convert an old pixel into a new pixel based on some predefined function • They operate on a pixel based solely on that pixel’s value • Used primarily for contrast enhancement T0283 - Computer Vision

  11. Binary Images & Thresholding • Comparing an image I(m,n) with threshold T • Separate light object from dark background If I[m,n]  T I[m,n] = object = 1 else I[m,n] = background = 0 • Separate dark object from light background • If I[m,n]  T I[m,n] = object = 1 else I[m,n] = background = 0 T0283 - Computer Vision

  12. T0283 - Computer Vision

  13. Determining Threshold T • Fixed threshold – independently chosen • Histogram derived threshold – automatically • determined using histogram T0283 - Computer Vision

  14. Triangle algorithm T0283 - Computer Vision

  15. Contrast Stretching/CompressionStretch gray-level ranges where we desire more information T0283 - Computer Vision

  16. Negative Transformations T0283 - Computer Vision

  17. Intensity-Level SlicingHighlight a specific range of gray-level only Thresholding T0283 - Computer Vision

  18. Non-Linear TransformationsWe may use any function, provided that is gives a one-to-one or many-to-one mapping Logarithmic Exponential T0283 - Computer Vision

  19. Histogram Equalization • Low contrast images usually mostly dark, mostly light, or mostly gray • High contrast images have large regions of dark and large regions of white (e.g. standing in front of a window on a sunny day) • Good contrast images exhibit a wide range of pixel values (i.e. no single gray level dominates the image) T0283 - Computer Vision

  20. T0283 - Computer Vision

  21. Histogram Equalization (cont’d) • Histogram equalization is a transformation that stretches the contrast by redistributing the gray-level values uniformly T0283 - Computer Vision

  22. Histogram Equalization (cont’d) • In practice, the histogram might not become totally flat ! T0283 - Computer Vision

  23. Histogram Equalization Procedures T0283 - Computer Vision

  24. Histogram Equalized Image T0283 - Computer Vision

  25. After Scaling J = int [7(Fx – 0.125)/0.875 + 0.5] T0283 - Computer Vision

  26. Histogram Equalization Procedures for i=0 :maxgval ihist(i+1) = sum(I(:)==i)/(rows*cols); end icdf(1)= ihist(1); for i=2: 1: 256 icdf(i) = ihist(i) + icdf(i-1); end for i=1:1:rows for j=1: 1: cols k = I(i,j)+1; ieq(i,j) = round(255*(icdf(k)-icdfmin)/(1.00-icdfmin)+0.5); end end T0283 - Computer Vision

  27. T0283 - Computer Vision

  28. Histogram Equalization Procedures(Improvement) for i=0 : maxgval ihist(i+1) = sum(I(:)==i); end icdf(1)= ihist(1); for i=2: 1: 256 icdf(i) = ihist(i) + icdf(i-1); end ideal(:) = uint16((rows*cols)/256); for i=2: 1: 256 ideal(i) = ideal(i) + ideal(i-1); end T0283 - Computer Vision

  29. for i = 1:1:256 map(i) = i-1; end j=1; i=1; while(j<256) while(icdf(i) < ideal(j)) i=i+1; map(i) = j; end j=j+1; end for i=1:1:rows for j=1:1:cols pxval = I(i,j)+1; ieq(i,j) = map(pxval)-1; end end T0283 - Computer Vision

  30. T0283 - Computer Vision

More Related