Image features: Histograms, Aliasing, Filters, Orientation and HOG. D.A. Forsyth

Similar documents
Matlab (see Homework 1: Intro to Matlab) Linear Filters (Reading: 7.1, ) Correlation. Convolution. Linear Filtering (warm-up slide) R ij

CS534 Introduction to Computer Vision. Linear Filters. Ahmed Elgammal Dept. of Computer Science Rutgers University

Filters. Materials from Prof. Klaus Mueller

Image Filtering and Gaussian Pyramids

Last Lecture. photomatix.com

Vision Review: Image Processing. Course web page:

Last Lecture. photomatix.com

Sampling and Reconstruction

Image Filtering. Median Filtering

Prof. Feng Liu. Winter /10/2019

CSCI 1290: Comp Photo

Robert Collins CSE486, Penn State. Lecture 3: Linear Operators

Fourier analysis of images

Image Processing for feature extraction

CS6670: Computer Vision Noah Snavely. Administrivia. Administrivia. Reading. Last time: Convolution. Last time: Cross correlation 9/8/2009

Templates and Image Pyramids

Numerical Derivatives See also T&V, Appendix A.2 Gradient = vector of partial derivatives of image I(x,y) = [di(x,y)/dx, di(x,y)/dy]

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

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

Image Filtering in Spatial domain. Computer Vision Jia-Bin Huang, Virginia Tech

Thinking in Frequency

Templates and Image Pyramids

Computer Vision, Lecture 3

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

Color Space 1: RGB Color Space. Color Space 2: HSV. RGB Cube Easy for devices But not perceptual Where do the grays live? Where is hue and saturation?

Sampling and Pyramids

Continued. Introduction to Computer Vision CSE 252a Lecture 11

Midterm Examination CS 534: Computational Photography

Sampling and Reconstruction

Motion illusion, rotating snakes

Motivation: Image denoising. How can we reduce noise in a photograph?

Images and Filters. EE/CSE 576 Linda Shapiro

Postprocessing of nonuniform MRI

Midterm is on Thursday!

Image processing for gesture recognition: from theory to practice. Michela Goffredo University Roma TRE

Image filtering, image operations. Jana Kosecka

CEE598 - Visual Sensing for Civil Infrastructure Eng. & Mgmt.

Motivation: Image denoising. How can we reduce noise in a photograph?

Digital Image Processing

Image Capture and Problems

CS 4501: Introduction to Computer Vision. Filtering and Edge Detection

Digital Image Processing

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

Sampling and reconstruction

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

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

Lec 04: Image Filtering and Edge Features

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

Image Pyramids. Sanja Fidler CSC420: Intro to Image Understanding 1 / 35

Next Classes. Spatial frequency Fourier transform and frequency domain. Reminder: Textbook. Frequency view of filtering Hybrid images Sampling

IMAGE PROCESSING Vedat Tavşanoğlu

Convolution Pyramids. Zeev Farbman, Raanan Fattal and Dani Lischinski SIGGRAPH Asia Conference (2011) Julian Steil. Prof. Dr.

Sampling and Reconstruction

Sampling and reconstruction. CS 4620 Lecture 13

02/02/10. Image Filtering. Computer Vision CS 543 / ECE 549 University of Illinois. Derek Hoiem

Digital Image Processing. Digital Image Fundamentals II 12 th June, 2017

Sampling and reconstruction

Thinking in Frequency

CPSC 340: Machine Learning and Data Mining. Convolutional Neural Networks Fall 2018

Overview. Neighborhood Filters. Dithering

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

Module 3: Video Sampling Lecture 18: Filtering operations in Camera and display devices. The Lecture Contains: Effect of Temporal Aperture:

Computer Graphics Fundamentals

Filip Malmberg 1TD396 fall 2018 Today s lecture

Image preprocessing in spatial domain

Subband coring for image noise reduction. Edward H. Adelson Internal Report, RCA David Sarnoff Research Center, Nov

Digital Image Processing. Lecture 5 (Enhancement) Bu-Ali Sina University Computer Engineering Dep. Fall 2009

CSE 564: Scientific Visualization

Filtering Images in the Spatial Domain Chapter 3b G&W. Ross Whitaker (modified by Guido Gerig) School of Computing University of Utah

Sampling Rate = Resolution Quantization Level = Color Depth = Bit Depth = Number of Colors

Image Deblurring. This chapter describes how to deblur an image using the toolbox deblurring functions.

Computer Vision Lecture 3

On spatial resolution

CSE 564: Visualization. Image Operations. Motivation. Provide the user (scientist, t doctor, ) with some means to: Global operations:

Image Enhancement. DD2423 Image Analysis and Computer Vision. Computational Vision and Active Perception School of Computer Science and Communication

30 lesions. 30 lesions. false positive fraction

Image Enhancement contd. An example of low pass filters is:

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

Preparing Remote Sensing Data for Natural Resources Mapping (image enhancement, rectifications )

Achim J. Lilienthal Mobile Robotics and Olfaction Lab, AASS, Örebro University

Classification of Road Images for Lane Detection

Analysis and Synthesis of Texture

Image Enhancement in the Spatial Domain Low and High Pass Filtering

IMAGE PROCESSING: AREA OPERATIONS (FILTERING)

!"!#"#$% Lecture 2: Media Creation. Some materials taken from Prof. Yao Wang s slides RECAP

Image Processing Final Test

Frequency Domain Enhancement

>>> from numpy import random as r >>> I = r.rand(256,256);

Fourier transforms, SIM

A Spatial Mean and Median Filter For Noise Removal in Digital Images

CS 111: Programing Assignment 2

Transforms and Frequency Filtering

>>> from numpy import random as r >>> I = r.rand(256,256);

ELEC Dr Reji Mathew Electrical Engineering UNSW

EE482: Digital Signal Processing Applications

CS4495/6495 Introduction to Computer Vision. 2C-L3 Aliasing

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

Image and Video Processing

ECE 484 Digital Image Processing Lec 09 - Image Resampling

Carmen Alonso Montes 23rd-27th November 2015

Transcription:

Image features: Histograms, Aliasing, Filters, Orientation and HOG D.A. Forsyth

Simple color features Histogram of image colors in a window Opponent color representations R-G B-Y=B-(R+G)/2 Intensity=(R+G+B)/3 Blue pixel map Percentage of blue pixels

Matlab slide

Scaled representations Represent one image with many different resolutions Why? find bigger, smaller swimming pools

Obtained pyramid of images by subsampling Carelessness causes aliasing

Matlab slide: subsampling

Aliasing and fast changing signals

More aliasing examples Undersampled sine wave -> Color shimmering on striped shirts on TV Wheels going backwards in movies temporal aliasing

Another aliasing example 1 0.9 0.8 location of a sharp change is known poorly 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 50 100 150 200 250 300 350 400

Fundamental facts A sine wave will alias if sampled less often than twice per period

1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 0 10 20 30 40 50 60 70 80 90 100

1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 0 10 20 30 40 50 60 70 80 90 100

1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 0 10 20 30 40 50 60 70 80 90 100

1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 0 10 20 30 40 50 60 70 80 90 100

1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 0 10 20 30 40 50 60 70 80 90 100

1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 0 10 20 30 40 50 60 70 80 90 100

1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 0 10 20 30 40 50 60 70 80 90 100

1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 0 10 20 30 40 50 60 70 80 90 100

Fundamental facts Sample(A+B)=Sample(A)+Sample(B) if a signal contains a high frequency sine wave, it will alias

1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 0 10 20 30 40 50 60 70 80 90 100

1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 0 10 20 30 40 50 60 70 80 90 100

1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 0 10 20 30 40 50 60 70 80 90 100

Weapons against aliasing Filtering or smoothing take the signal, reduce the fast-changing/high-frequency content can do this by weighted local averaging

Prefiltering (Ideal case) Continuous Image Filter Sampling Discrete Samples Reconstruction Continuous Image 1 1 p Sampling Function p Reconstruction Kernel

Smoothing by Averaging N ij = 1 N Σ uvo i+u,j+v where u, v, is a window of N pixels in total centered at 0, 0

Smoothing with a Gaussian Notice ringing apparently, a grid is superimposed Smoothing with an average actually doesn t compare at all well with a defocussed lens what does a point of light produce? A Gaussian gives a good model of a fuzzy blob

Gaussian filter kernel K uv = 1 u 2 + v 2 2πσ 2 exp 2σ 2 We re assuming the index can take negative values

Smoothing with a Gaussian N ij = uv O i u,j v K uv Notice the curious looking form

Matlab slide: convolution in 2D

Linear Filters Example: smoothing by averaging form the average of pixels in a neighbourhood Example: smoothing with a Gaussian form a weighted average of pixels in a neighbourhood Example: finding a derivative form a weighted average of pixels in a neighbourhood

Finding derivatives N ij = 1 x (I i+1,j I ij )

Convolution Each of these involves a weighted sum of image pixels The set of weights is the same we represent these weights as an image, H H is usually called the kernel Operation is called convolution it s associative Any linear shift-invariant operation can be represented by convolution linear: G(k f)=k G(f) shift invariant: G(Shift(f))=Shift(G(f)) Examples: smoothing, differentiation, camera with a reasonable, defocussed lens system N ij = uv H uv O i u,j v

Filters are templates N ij = uv H uv O i u,j v At one point output of convolution is a (strange) dot-product Filtering the image involves a dot product at each point Insight filters look like the effects they are intended to find filters find effects they look like

Smoothing reduces noise Generally expect pixels to be like their neighbours surfaces turn slowly relatively few reflectance changes Expect noise to be independent from pixel to pixel Scale the parameter in the symmetric Gaussian as this parameter goes up, more pixels are involved in the average and the image gets more blurred and noise is more effectively suppressed Implies that smoothing suppresses noise, for appropriate noise models K uv = 1 2πσ 2 exp u 2 + v 2 2σ 2

Representing image changes: Edges Idea: points where image value change very sharply are important changes in surface reflectance shadow boundaries outlines Finding Edges: Estimate gradient magnitude using appropriate smoothing Mark points where gradient magnitude is Locally biggest and big

Matlab slide: gradients

Matlab slide: smoothed gradients

Scale affects derivatives 1 pixel 3 pixels 7 pixels

Scale affects gradient magnitude

Smoothing and Differentiation Issue: noise smooth before differentiation two convolutions to smooth, then differentiate? actually, no - we can use a derivative of Gaussian filter

Matlab slide: orientations and arrow plots

Matlab slide: rose plots

Hog features Take a window subdivide into boxes, each with multiple pixels these might overlap for each box, build a histogram of gradient orientations possibly weighting by distance from center possibly normalizing by intensity over the box string these histograms together to a vector Extremely strong at spatial coding

Vlfeat pointer

Image HOG features Positive terms in linear classifier Negative terms in linear classifier