1 / 29

Sampling

This section explores the optimal number of samples needed to minimize information loss in image digitization. It covers the concept of band-limited functions, the effects of sample spacing, and the use of anti-aliasing techniques. Practical issues and considerations are discussed.

rstonge
Download Presentation

Sampling

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. Sampling CS474/674 – Prof. Bebis Section 4.3

  2. Image Digitization • How many samples should we obtain to minimize information loss? • Hint: take enough samples to allow reconstructing the “continuous” image from its samples.

  3. Example Very few samples: sampled signal looks like a sinusoidal of a lower frequency !

  4. Definition: “band-limited” functions • A function whose spectrum is of finite duration • Are all functions band-limited? max frequency No!

  5. Properties of band-limited functions • Band-limited functions have infinite duration in the spatial domain. • Functions with finite duration in the spatial domain have infinite duration in the frequency domain.

  6. Sampling a 1D function • Multiply f(x) with s(x) (i.e., train of impulses) sampled f(x) x Question: what is the DFT of f(x) s(x)? Hint: use convolution theorem!

  7. Sampling a 1D function (cont’d) • Suppose f(x) F(u) • What is the DFT of s(x)?

  8. = * Sampling a 1D function (cont’d) So:

  9. x Reconstructing f(x) from its samples • Need to isolate a single period: • Multiply by a window G(u)

  10. Reconstructing f(x) from its samples (cont’d) • Then, take the inverse FT:

  11. What is the effect of Δx? • Large Δx (i.e., few samples) results to overlapping periods!

  12. x Effect of Δx (cont’d) • But, if the periods overlap, we cannot anymore isolate a single period  aliasing!

  13. What is the effect of Δx? (cont’d) • Smaller Δx (i.e., more samples) alleviates aliasing!

  14. How should we choose Δx? • The center of the overlapped region is at

  15. How to choose Δx? (cont’d) • Choose Δx as follows: where W is the max frequency of f(x)

  16. Example

  17. Example (cont’d)

  18. Sampling a 2D function • 2D train of impulses s(x,y) x y Δy Δx f(x,y)s(x,y) F(u,v)*S(u,v)

  19. What is the effect of Δx? (cont’d) • 2D case u u vmax umax v v

  20. Example • Suppose that we need to digitize checkerboard patterns.

  21. Example (cont’d) • Suppose that the number of samples is fixed at 96 x 96 pixels. • We can resolve patterns that are up to 96 x 96 pixel squares (i.e., each square is 1 x 1). • What happens when squares are less than 1 x 1 pixels?

  22. Example (cont’d) square size: 16 x 16 6 x 6 (same as 12 x 12 squares) square size: 0.9174 x 0.9174 0.4798 x 0.4798

  23. Practical Issues • Band-limited functions have infinite duration in the time domain. • But, we can only sample a function over a finite interval!

  24. x = Practical Issues (cont’d) • We would need to obtain a finite set of samples • by multiplying with a “box” function: • [s(x)f(x)] h(x)

  25. Practical Issues (cont’d) • This is equivalent to convolution in the frequency domain! [s(x)f(x)] h(x)  [F(u)*S(u)] * H(u)

  26. instead of this! Practical Issues (cont’d) *

  27. How does this affect things in practice? • Even if the Nyquist criterion is satisfied, recovering a function that has been sampled in a finite region is in general impossible! • Special case:periodic functions • If f(x) isperiodic, then a single period can be isolated assuming that the Nyquist theorem is satisfied! • e.g., sin/cos functions

  28. Anti-aliasing • In practice, aliasing in almost inevitable! • The effect of aliasing can be reduced by smoothing the input signal to attenuate its higher frequencies. • This has to be done before the function is sampled. • Many commercial cameras have true anti-aliasing filtering built in the lens of the sensor itself. • Most commercial software have a feature called “anti-aliasing” which is related to blurring the image to reduce aliasing artifacts (i.e., not trueanti-aliasing)

  29. Example 50% less samples and 3 x 3 blurring 50% less samples

More Related