02/05/2002 (C) University of Wisconsin 2002, CS 559 Last Time Color Quantization Mach Banding –Humans exaggerate sharp boundaries, but not fuzzy ones.

Slides:



Advertisements
Similar presentations
3-D Computational Vision CSc Image Processing II - Fourier Transform.
Advertisements

CS 551 / CS 645 Antialiasing. What is a pixel? A pixel is not… –A box –A disk –A teeny tiny little light A pixel is a point –It has no dimension –It occupies.
School of Computing Science Simon Fraser University
EEE 498/591- Real-Time DSP1 What is image processing? x(t 1,t 2 ) : ANALOG SIGNAL x : real value (t 1,t 2 ) : pair of real continuous space (time) variables.
General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F(  ) is the spectrum of the function.
Advanced Computer Graphics (Spring 2006) COMS 4162, Lecture 3: Sampling and Reconstruction Ravi Ramamoorthi
1 Image Filtering Readings: Ch 5: 5.4, 5.5, 5.6,5.7.3, 5.8 (This lecture does not follow the book.) Images by Pawan SinhaPawan Sinha formal terminology.
CSCE 641 Computer Graphics: Fourier Transform Jinxiang Chai.
CS5520 Image-Based Rendering © Chun-Fa Chang, Spring 2003 Sampling Theorem & Antialiasing April 15, 2003.
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Sampling Week 7, Fri 17 Oct 2003 p1 demos sampling.
Half Toning. Continuous Half Toning Color Half Toning.
CPSC 641 Computer Graphics: Fourier Transform Jinxiang Chai.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 3: Sampling and Reconstruction Ravi Ramamoorthi
Computational Photography: Fourier Transform Jinxiang Chai.
T.Sharon-A.Frank 1 Multimedia Image Compression 2 T.Sharon-A.Frank Coding Techniques – Hybrid.
Basic Image Processing January 26, 30 and February 1.
1 JPEG Compression CSC361/661 Burg/Wong. 2 Fact about JPEG Compression JPEG stands for Joint Photographic Experts Group JPEG compression is used with.jpg.
School of Computer Science & Information Technology G6DPMM - Lecture 6 Colour Science & Colour Models.
02/12/02 (c) 2002 University of Wisconsin, CS 559 Filters A filter is something that attenuates or enhances particular frequencies Easiest to visualize.
01/31/02 (C) 2002, UNiversity of Wisconsin, CS 559 Last Time Color and Color Spaces.
Trevor McCasland Arch Kelley.  Goal: reduce the size of stored files and data while retaining all necessary perceptual information  Used to create an.
Advanced Computer Graphics CSE 190 [Spring 2015], Lecture 3 Ravi Ramamoorthi
CS559-Computer Graphics Copyright Stephen Chenney Image File Formats How big is the image? –All files in some way store width and height How is the image.
9/16/04© University of Wisconsin, CS559 Spring 2004 Last Time Color –The principle of trichromacy says that any spectrum can be matched using three primaries.
G52IIP, School of Computer Science, University of Nottingham 1 Image Transforms Fourier Transform Basic idea.
© Chun-Fa Chang Sampling Theorem & Antialiasing. © Chun-Fa Chang Motivations “ My ray traced images have a lot more pixels than the TV screen. Why do.
Topic 7 - Fourier Transforms DIGITAL IMAGE PROCESSING Course 3624 Department of Physics and Astronomy Professor Bob Warwick.
Image Processing 고려대학교 컴퓨터 그래픽스 연구실 cgvr.korea.ac.kr.
Diffraction from point scatterers Wave: cos(kx +  t)Wave: cos(kx +  t) + cos(kx’ +  t) max min.
Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?
Screen Ruling, Print Resolution AM, FM and Hybrid Halftoning Sasan Gooran Linköping University LiU-Norrköping.
IMAGE SAMPLING AND IMAGE QUANTIZATION 1. Introduction
Lab #5-6 Follow-Up: More Python; Images Images ● A signal (e.g. sound, temperature infrared sensor reading) is a single (one- dimensional) quantity that.
2/3/04© University of Wisconsin, CS559 Spring 2004 Last Time Color –Transforming between two color spaces –A gamut is the set of displayable colors in.
Antialiasing CAP4730: Computational Structures in Computer Graphics.
Simple Image Processing Speaker : Lin Hsiu-Ting Date : 2005 / 04 / 27.
Filtering Robert Lin April 29, Outline Why filter? Filtering for Graphics Sampling and Reconstruction Convolution The Fourier Transform Overview.
Indiana University Purdue University Fort Wayne Hongli Luo
Image Processing and Sampling
09/19/2002 (C) University of Wisconsin 2002, CS 559 Last Time Color Quantization Dithering.
Digital image processing Chapter 3. Image sampling and quantization IMAGE SAMPLING AND IMAGE QUANTIZATION 1. Introduction 2. Sampling in the two-dimensional.
Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.
09/17/02 (C) 2002, University of Wisconsin, CS 559 Last Time Color Spaces File formats.
Copyright Howie Choset, Renata Melamud, Al Costa, Vincent Lee-Shue, Sean Piper, Ryan de Jonckheere. All Rights Reserved Computer Vision.
DIGITAL IMAGE. Basic Image Concepts An image is a spatial representation of an object An image can be thought of as a function with resulting values of.
7- 1 Chapter 7: Fourier Analysis Fourier analysis = Series + Transform ◎ Fourier Series -- A periodic (T) function f(x) can be written as the sum of sines.
Sampling Theorem & Antialiasing
Fourier Transform.
(c) 2002 University of Wisconsin, CS 559
Introduction to JPEG m Akram Ben Ahmed
Lecture 4-1CS251: Intro to AI/Lisp II Where did that edge go? April 29th, 1999.
Many of the figures from this book may be reproduced free of charge in scholarly articles, proceedings, and presentations, provided only that the following.
1 of 32 Computer Graphics Color. 2 of 32 Basics Of Color elements of color:
Fourier Transform (Chapter 4) CS474/674 – Prof. Bebis.
Misc. Non-linear Image Processing - Pixel to pixel operations - Histogram equalization - Grey level and colour enhancement - Neighbourhood operations.
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Sampling and Reconstruction.
Advanced Computer Graphics
Dithering (Digital Halftoning)
- photometric aspects of image formation gray level images
Image Processing and Sampling
(C) 2002 University of Wisconsin, CS 559
Image quantization By Student Manar naji. quantization The values obtained by sampling a continuous function usually comprise of an infinite set or.
General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F() is the spectrum of the function.
Fourier Transform.
All about convolution.
Data Conversion Slides by Prof. Brian L. Evans, Dept. of ECE, UT Austin, and Dr. Thomas D. Kite, Audio Precision, Beaverton, OR
Image filtering Images by Pawan Sinha.
CSCE 643 Computer Vision: Thinking in Frequency
Basic Image Processing
Filtering Images Work in the spatial domain
Presentation transcript:

02/05/2002 (C) University of Wisconsin 2002, CS 559 Last Time Color Quantization Mach Banding –Humans exaggerate sharp boundaries, but not fuzzy ones

02/05/2002 (C) University of Wisconsin 2002, CS 559 Today Homework 1 is due –Box up front Dithering (Digital Halftoning)

02/05/2002 (C) University of Wisconsin 2002, CS 559 Dithering (Digital Halftoning) Mach bands can be removed by adding noise along the boundary lines General perceptive principle: replaced structured errors with noisy ones and people complain less Old industry dating to the late 1800’s –(Can’t say since the turn of the century!) –Methods for producing grayscale images in newspapers and books

02/05/2002 (C) University of Wisconsin 2002, CS 559 Dithering to Black-and-White Black-and-white is still the preferred way of displaying images in many areas –Black ink is cheaper than color –Printing with black ink is simpler and hence cheaper –Paper for black inks is not special To get color to black and white, first turn into grayscale: I=0.299R+0.587G+0.114B –This formula reflects the fact that green is more representative of perceived brightness than blue is

02/05/2002 (C) University of Wisconsin 2002, CS 559 Sample Images

02/05/2002 (C) University of Wisconsin 2002, CS 559 Threshold Dithering For every pixel: If the intensity < 0.5, replace with black, else replace with white –0.5 is the threshold –This is the naïve version of the algorithm To keep the overall image brightness the same, you should: –Compute the average intensity over the image –Use a threshold that gives that average –For example, if the average intensity is 0.6, use a threshold that is higher than 40% of the pixels, and lower than the remaining 60% For all dithering we will assume that the image is gray and that intensities are represented as –If you have a image, you can scale all the thresholds (multiply by 255)

02/05/2002 (C) University of Wisconsin 2002, CS 559 Naïve Threshold Algorithm

02/05/2002 (C) University of Wisconsin 2002, CS 559 Random Modulation Add a random amount to each pixel before thresholding –Typically add uniformly random amount from [-a,a] Pure addition of noise to the image –As stated above, we are adding uniformly random noise –For better results, add better quality noise –For instance, use Gaussian noise Should use same procedure as before for choosing threshold Not good for black and white, but OK for more colors –Add a small random color to each pixel before finding the closest color in the table

02/05/2002 (C) University of Wisconsin 2002, CS 559 Random Modulation

02/05/2002 (C) University of Wisconsin 2002, CS 559 Ordered Dithering Break the image into small blocks Define a threshold matrix –Use a different threshold for each pixel of the block –Compare each pixel to its own threshold The thresholds can be clustered, which looks like newsprint The thresholds can be “random” which looks better Threshold matrix

02/05/2002 (C) University of Wisconsin 2002, CS 559 Clustered Dithering

02/05/2002 (C) University of Wisconsin 2002, CS 559 Dot Dispersion

02/05/2002 (C) University of Wisconsin 2002, CS 559 Pattern Dithering Compute the intensity of each sub-block and index a pattern NOT the same as before –Here, each sub-block has one of a fixed number of patterns – pixel is determined only by average intensity of sub-block –In ordered dithering, each pixel is checked against the dithering matrix before being turned on

02/05/2002 (C) University of Wisconsin 2002, CS 559 Floyd-Steinberg Dithering Start at one corner and work through image pixel by pixel –Usually scan top to bottom in a zig-zag Threshold each pixel Compute the error at that pixel: The difference between what should be there and what you did put there Propagate error to neighbors by adding some proportion of the error to each unprocessed neighbor e 3/165/161/16 7/16

02/05/2002 (C) University of Wisconsin 2002, CS 559 Floyd-Steinberg Dithering

02/05/2002 (C) University of Wisconsin 2002, CS 559 Color Dithering All the same techniques can be applied, with some modification –Below is Floyd-Steinberg: Error is difference from nearest color in the color table, error propagation is the same

02/05/2002 (C) University of Wisconsin 2002, CS 559 Images as Signals We can view images as a signal - a value that changes over space Spatial domain: signal is given as values at points in space Frequency Domain: signal is given as values of frequency components

02/05/2002 (C) University of Wisconsin 2002, CS 559 Why Signal Processing? Reconstruction: –What happens when a monitor converts a set of points into a continuous picture? –How do we enlarge images? Sampling: –How do we know how many pixels are required? Jaggies, Aliasing –How do we avoid jagged, pixelated lines Digital Signal Processing provides the tools

02/05/2002 (C) University of Wisconsin 2002, CS 559 A Striking Example

02/05/2002 (C) University of Wisconsin 2002, CS 559 Periodic Functions Fact: Any periodic signal can be represented as a sum of sine and cosine waves with harmonic frequencies –If one function has frequency f, then its harmonics are function with frequency nf for integer n Sequence of boxes is:

02/05/2002 (C) University of Wisconsin 2002, CS 559 Boxes as Sum of Cosines

02/05/2002 (C) University of Wisconsin 2002, CS 559 General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F(  ) is the spectrum of the function f(x) –The spectrum is how much of each frequency is present in the function –We’re talking about functions, not colors, but the idea is the same

02/05/2002 (C) University of Wisconsin 2002, CS 559 Fourier Transform F(  ) is computed from f(x) by the Fourier Transform:

02/05/2002 (C) University of Wisconsin 2002, CS 559 Example: Box Function

02/05/2002 (C) University of Wisconsin 2002, CS 559 Box Function and Its Transform

02/05/2002 (C) University of Wisconsin 2002, CS 559 Cosine and Its Transform 1  If f(x) is even, so is F(  )

02/05/2002 (C) University of Wisconsin 2002, CS 559 Sine and Its Transform 1  -- If f(x) is odd, so is F(  )

02/05/2002 (C) University of Wisconsin 2002, CS 559 Constant Function and Its Transform The constant function only contains the 0 th frequency – it has no wiggles

02/05/2002 (C) University of Wisconsin 2002, CS 559 Delta Function and Its Transform Fourier transform and inverse Fourier transform are qualitatively the same, so knowing one direction gives you the other

02/05/2002 (C) University of Wisconsin 2002, CS 559 Shah Function and Its Transform

02/05/2002 (C) University of Wisconsin 2002, CS 559 Gaussian and Its Transform (the same)

02/05/2002 (C) University of Wisconsin 2002, CS 559 The spectrum of a functions tells us the relative amounts of high and low frequencies –Sharp edges give high frequencies –Smooth variations give low frequencies A function is bandlimited if its spectrum has no frequencies above a maximum limit –sin, cos are band limited –Box, Gaussian, etc are not Qualitative Properties

02/05/2002 (C) University of Wisconsin 2002, CS 559 Functions to Images Images are 2D, discrete functions 2D Fourier transform uses product of sin’s and cos’s (things carry over naturally) Fourier transform of a discrete, quantized function will only contain discrete frequencies in quantized amounts –In particular, we can store the Fourier transform of a discrete image in the same amount of space as we can store the image Numerical algorithm: Fast Fourier Transform (FFT) computes discrete Fourier transforms