Prof. Feng Liu. Fall /04/2018

Similar documents
Image Processing. Image Processing. What is an Image? Image Resolution. Overview. Sources of Error. Filtering Blur Detect edges

קורס גרפיקה ממוחשבת 2008 סמסטר ב' Image Processing 1 חלק מהשקפים מעובדים משקפים של פרדו דוראנד, טומס פנקהאוסר ודניאל כהן-אור

Image Processing. What is an image? קורס גרפיקה ממוחשבת 2008 סמסטר ב' Converting to digital form. Sampling and Reconstruction.

Image Processing COS 426

Filters. Materials from Prof. Klaus Mueller

Image Processing. Adam Finkelstein Princeton University COS 426, Spring 2019

Image Processing. Michael Kazhdan ( /657) HB Ch FvDFH Ch. 13.1

Sampling and Reconstruction. Today: Color Theory. Color Theory COMP575

image Scanner, digital camera, media, brushes,

Prof. Feng Liu. Fall /02/2018

Human Vision, Color and Basic Image Processing

Fig 1: Error Diffusion halftoning method

Image Processing Computer Graphics I Lecture 20. Display Color Models Filters Dithering Image Compression

Virtual Restoration of old photographic prints. Prof. Filippo Stanco

Computer Graphics. Si Lu. Fall er_graphics.htm 10/02/2015

The Scientist and Engineer's Guide to Digital Signal Processing By Steven W. Smith, Ph.D.

Graphics and Image Processing Basics

Fourier Transform. Any signal can be expressed as a linear combination of a bunch of sine gratings of different frequency Amplitude Phase

Digital Halftoning. Sasan Gooran. PhD Course May 2013

Evaluation of Visual Cryptography Halftoning Algorithms

Cluster-Dot Halftoning based on the Error Diffusion with no Directional Characteristic

MULTIMEDIA SYSTEMS

Fast Inverse Halftoning

Analysis and Design of Vector Error Diffusion Systems for Image Halftoning

Announcements. Image Processing. What s an image? Images as functions. Image processing. What s a digital image?

Vision Review: Image Processing. Course web page:

A New Hybrid Multitoning Based on the Direct Binary Search

C. A. Bouman: Digital Image Processing - January 9, Digital Halftoning

CS 465 Prelim 1. Tuesday 4 October hours. Problem 1: Image formats (18 pts)

Image Rendering for Digital Fax

ECC419 IMAGE PROCESSING

Aliasing and Antialiasing. What is Aliasing? What is Aliasing? What is Aliasing?

Acquisition and representation of images

Computer Vision. Howie Choset Introduction to Robotics

Sampling and pixels. CS 178, Spring Marc Levoy Computer Science Department Stanford University. Begun 4/23, finished 4/25.

Image Processing (EA C443)

3. The histogram of image intensity levels

DIGITAL IMAGE PROCESSING Quiz exercises preparation for the midterm exam

Performance Evaluation of Edge Detection Techniques for Square Pixel and Hexagon Pixel images

Lecture 2: Digital Image Fundamentals -- Sampling & Quantization

Error Diffusion and Delta-Sigma Modulation for Digital Image Halftoning

What is an image? Images and Displays. Representative display technologies. An image is:

8.2 IMAGE PROCESSING VERSUS IMAGE ANALYSIS Image processing: The collection of routines and

Image Processing. Adrien Treuille

IMAGE PROCESSING Vedat Tavşanoğlu

Multimedia Systems Giorgio Leonardi A.A Lectures 14-16: Raster images processing and filters

Image representation, sampling and quantization

Midterm Examination CS 534: Computational Photography

Low Noise Color Error Diffusion using the 8-Color Planes

Computer Vision, Lecture 3

IMAGE PROCESSING: AREA OPERATIONS (FILTERING)

ECE 484 Digital Image Processing Lec 09 - Image Resampling

Digital Image Processing. Lecture # 3 Image Enhancement

A New Metric for Color Halftone Visibility

Image Forgery. Forgery Detection Using Wavelets

Steganography & Steganalysis of Images. Mr C Rafferty Msc Comms Sys Theory 2005

Computer Graphics (Fall 2011) Outline. CS 184 Guest Lecture: Sampling and Reconstruction Ravi Ramamoorthi

1.Discuss the frequency domain techniques of image enhancement in detail.

Assistant Lecturer Sama S. Samaan

Image Processing for Mechatronics Engineering For senior undergraduate students Academic Year 2017/2018, Winter Semester

On Filter Techniques for Generating Blue Noise Mask

Chapter 9 Image Compression Standards

Acquisition and representation of images

Image and Video Processing

Transforms and Frequency Filtering

On Filter Techniques for Generating Blue Noise Mask

Error Diffusion without Contouring Effect

EE482: Digital Signal Processing Applications

LAB MANUAL SUBJECT: IMAGE PROCESSING BE (COMPUTER) SEM VII

Filtering. Image Enhancement Spatial and Frequency Based

Computing for Engineers in Python

Image Scaling. This image is too big to fit on the screen. How can we reduce it? How to generate a halfsized

Image Enhancement using Histogram Equalization and Spatial Filtering

The Perceived Image Quality of Reduced Color Depth Images

SECTION I - CHAPTER 2 DIGITAL IMAGING PROCESSING CONCEPTS

Implementation of Colored Visual Cryptography for Generating Digital and Physical Shares

Antialiasing and Related Issues

IMAGES AND COLOR. N. C. State University. CSC557 Multimedia Computing and Networking. Fall Lecture # 10

June 30 th, 2008 Lesson notes taken from professor Hongmei Zhu class.

PRACTICAL IMAGE AND VIDEO PROCESSING USING MATLAB

06: Thinking in Frequencies. CS 5840: Computer Vision Instructor: Jonathan Ventura

A.V.C. COLLEGE OF ENGINEERING DEPARTEMENT OF CSE CP7004- IMAGE PROCESSING AND ANALYSIS UNIT 1- QUESTION BANK

Algorithm-Independent Color Calibration for Digital Halftoning

Image Processing for feature extraction

CoE4TN4 Image Processing. Chapter 3: Intensity Transformation and Spatial Filtering

IMAGE ENHANCEMENT IN SPATIAL DOMAIN

1. (a) Explain the process of Image acquisition. (b) Discuss different elements used in digital image processing system. [8+8]

CSC 320 H1S CSC320 Exam Study Guide (Last updated: April 2, 2015) Winter 2015

INSTITUTIONEN FÖR SYSTEMTEKNIK LULEÅ TEKNISKA UNIVERSITET

Image acquisition. Midterm Review. Digitization, line of image. Digitization, whole image. Geometric transformations. Interpolation 10/26/2016

SAMPLING THEORY. Representing continuous signals with discrete numbers

Ranked Dither for Robust Color Printing

Sampling Theory. CS5625 Lecture Steve Marschner. Cornell CS5625 Spring 2016 Lecture 7

Applications of Linear Algebra in Signal Sampling and Modeling

Advanced Digital Signal Processing Part 2: Digital Processing of Continuous-Time Signals

CSE 564: Scientific Visualization

Images and Displays. Lecture Steve Marschner 1

Sampling and Reconstruction

Digital Image Processing

LECTURE 02 IMAGE AND GRAPHICS

Transcription:

Prof. Feng Liu Fall 2018 http://www.cs.pdx.edu/~fliu/courses/cs447/ 10/04/2018 1

Last Time Image file formats Color quantization 2

Today Dithering Signal Processing Homework 1 due today in class Homework 2 available, due in class on October 18 3

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 4

Dithering to Black-and-White 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 NOTE that it is not the equation implied by the RGB->XYZ color space conversion matrix For all dithering we will assume that the image is gray and that intensities are represented as a value in [0, 1.0) Define new array of floating point numbers new_image[i] = old_image[i] / (float)256; To get back: output[i]=(unsigned char)floor(new_image[i]*256) 5

Sample Images 6

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 7

Naïve Threshold Algorithm 8

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% 9

Brightness Preserving Algorithm 10

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 For better results, add better quality noise For instance, use Gaussian noise (random values sampled from a normal distribution) 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 11

Random Modulation 12

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 1 0.75 0.5 0.25 1 16 2 10 4 12 1 0 1 0 0.75 0.75 0.5 0.25 16 6 14 0.5 0.5 0.5 0.25 3 11 1 8 9 Result 0 1 0 0 1 0 1 0 0.25 0.25 0.25 0.25 13 7 15 5 0 0 0 0 13

Clustered Dithering.75.0625.5.1875.375 1.8125.5625.625.875.9375.3125.25.4375.125.6875

Dot Dispersion.125.625.25.75 1.375.875.5.1875.6875.0625.5625.8125.4375.9375.3125

Comparison Clustered Dot Dispersion

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 Used when display resolution is higher than image resolution not uncommon with printers Use 3x3 output for each input pixel 17

Pattern Dither (1) 18

Pattern Dither (2) 19

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 If you made the pixel 0, e = original; if you made it 1, e = original-1 Propagate error to neighbors by adding some proportion of the error to each unprocessed neighbor A mask tells you how to distribute the error e 7/16 Easiest to work with floating point image Convert all pixels to 0-1 floating point 3/16 5/16 1/16 More detail in class reading materials

Floyd-Steinberg Dithering 21

Color Dithering All the same techniques can be applied, with some modification Example is Floyd-Steinberg: Uniform color table Error is difference from nearest color in the color table Error propagation same as that for greyscale Each color channel treated independently 22

Color Dithering 23

Comparison to Uniform Quant. Same color table! 24

Today Dithering Signal Processing Homework 2 available, due October 18 25

Image Manipulation We have now looked at basic image formats and color, including transformations of color Next, operations involving image resampling Scaling, rotating, morphing, But first, we need some signal processing Also important for anti-aliasing, later in class 26

Enlarging an Image To enlarge an image, you have to add pixels between the old pixels What values do you choose for those pixels? 27

Rotating an Image Pixels in the new image come from their rotated positions in the original image These rotated locations might not be in nice places The positions of the new pixels in the original image New image 28

Images as Samples of Functions We can view an image as a set of samples from an ideal function If we knew what the function was, we could enlarge the image by resampling the function Failing that, we can reconstruc the function and then resample it reconstruct resample 29

Why Signal Processing? Signal processing provides the tools for understanding sampling and reconstruction 30

Function representations A function can be represented as a sum of sin s and cos s of (possibly) all frequencies: f 1 i e x ( x) F( ) d 2 i cosx isinx e x 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 31

Fourier Transform F() is computed from f(x) by the Fourier Transform: F( ) f ( x) e ix dx 32

Example: Box Function 1 f ( x) 0 F( ) sinf f sinc f x x f 1 2 1 2 2 33

Box Function and Its Transform 1.5 1.3 1.1 0.9 0.7 0.5 0.3 0.1-0.1-0.3-0.5 1.5 1.3 1.1 0.9 0.7 0.5 0.3 0.1-0.1-0.3-0.5 Two different representations of the same function f(x) spatial domain F() frequency domain 34

Cosine and Its Transform 1.5 1 0.5 0-0.5-1 1-1 -1.5 If f(x) is even, so is F() 35

Sine and Its Transform 1.5 1 0.5 0-0.5-1 1-1 - -1.5 If f(x) is odd, so is F() 36

Constant Function and Its Transform The constant function only contains the 0 th frequency it has no wiggles 37

Delta Function and Its Transform 38

Gaussian and Its Transform 0.18 0.13 1 2 2 2 e x 0.18 0.13 0.08 0.08 0.03 0.03-0.02 They are the same -0.02 39

Qualitative Properties The spectrum of a function 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 40

Functions to Images Images are 2D, discrete functions 2D Fourier transform uses product of sin s and cos s 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 41

Next Time Filtering Resampling Aliasing Compositing 42