Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Lecture 02 Point Based Image Processing Lecture 02 Point Based Image Processing Mata kuliah: T0283 - Computer Vision Tahun: 2010."— Presentation transcript:

1

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

3 January 20, 2010T0283 - Computer Vision3 After carefullylistening this lecture, students will be able to do the following : After carefully listening this lecture, students will be able to do the following : understand spatial information based image operation such as point-based processing 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. demonstrate how point-based image processing is performed (i.e. contrast enhancement and histogram equalization. Learning Objectives

4 January 20, 2010T0283 - Computer Vision4 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. Digital Image Representation (Review Last Lecture)

5 January 20, 2010T0283 - Computer Vision5 Spatial Digitization (Sampling) x y f(x,y) s(x,y) grid I(x,y) = f (x,y). s(x,y) where s(x,y) = 1 for every value of x and y

6 January 20, 2010T0283 - Computer Vision6 Spatial Digitization (Sampling) 24 x 36 400 x 267 96 x 144 48 x 72

7 January 20, 2010T0283 - Computer Vision7 3 rd level 2 nd level 1st level 0 th level Input Intensity 5 th level 4 th level Output Intensity Image Quantization

8 January 20, 2010T0283 - Computer Vision8 Image Quantization 1 bit/piksel 3 bit/piksel 2 bit/piksel 8 bit/piksel

9 January 20, 2010T0283 - Computer Vision9 Digital Image Representation 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). c r 0,0 M-1,N-1 I(r,c)

10 January 20, 2010T0283 - Computer Vision10 Spatial Domain Methods Point processing transformations Area/Mask processing transformations Geometric transformations Frame processing transformations Frequency Domain Methods Classification of Image Operations

11 January 20, 2010T0283 - Computer Vision11 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

12 January 20, 2010T0283 - Computer Vision12 Comparing an image I(m,n) with threshold T Separate light object from dark background If I[m,n]  TI[m,n] = object = 1 elseI[m,n] = background = 0 Separate dark object from light background If I[m,n]  TI[m,n] = object = 1 elseI[m,n] = background = 0 Binary Images & Thresholding

13 January 20, 2010T0283 - Computer Vision13

14 January 20, 2010T0283 - Computer Vision14 Fixed threshold – independently chosen Histogram derived threshold – automatically determined using histogram Determining Threshold T

15 January 20, 2010T0283 - Computer Vision15 Triangle algorithm

16 January 20, 2010T0283 - Computer Vision16 Contrast Stretching/Compression Stretch gray-level ranges where we desire more information

17 January 20, 2010T0283 - Computer Vision17 Negative Transformations

18 January 20, 2010T0283 - Computer Vision18 Intensity-Level Slicing Highlight a specific range of gray-level only Thresholding

19 January 20, 2010T0283 - Computer Vision19 Non-Linear Transformations We may use any function, provided that is gives a one-to-one or many-to-one mapping LogarithmicExponential

20 January 20, 2010T0283 - Computer Vision20 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)

21 January 20, 2010T0283 - Computer Vision21

22 January 20, 2010T0283 - Computer Vision22 Histogram Equalization (cont’d) Histogram equalization is a transformation that stretches the contrast by redistributing the gray-level values uniformly

23 January 20, 2010T0283 - Computer Vision23 Histogram Equalization (cont’d) In practice, the histogram might not become totally flat !

24 January 20, 2010T0283 - Computer Vision24 I x I = I/7 (scaled) nInInInIP(I)(freq.) F x (x I ) (CDF)JOutputP(J)(freq.) 00.00080.1250.12500.125 10.14300.00.12500.0 20.28600.00.12500.0 30.42900.00.12500.0 40.571310.4840.60940.484 50.714160.2500.85960.250 60.85780.1250.98470.141 71.00010.0161.0007- Histogram Equalization Procedures

25 January 20, 2010T0283 - Computer Vision25.609.609.609.609.609.609.6090.125.609.859.859.859.859.859.6090.125.609.859.984.984.984.859.6090.125.609.859.9841.000.984.859.6090.125.609.859.984.984.984.859.6090.125.609.859.859.859.859.859.6090.125.609.609.609.609.609.609.6090.125.609.609.609.609.609.609.6090.125 Histogram Equalized Image

26 January 20, 2010T0283 - Computer Vision26 44444440 46444640 46777640 46777640 46777640 46666640 44444440 44444440 J = int [7(Fx – 0.125)/0.875 + 0.5] After Scaling

27 January 20, 2010T0283 - Computer Vision27 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 Histogram Equalization Procedures

28 January 20, 2010T0283 - Computer Vision28

29 January 20, 2010T0283 - Computer Vision29 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 Histogram Equalization Procedures (Improvement)

30 January 20, 2010T0283 - Computer Vision30 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

31 January 20, 2010T0283 - Computer Vision31


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

Similar presentations


Ads by Google