CAP 5415 Computer Vision. Marshall Tappen Fall Lecture 1

Similar documents
Images and Filters. EE/CSE 576 Linda Shapiro

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

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

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

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

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

Image Processing for feature extraction

Computing for Engineers in Python

Digital Image Processing

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

IMAGE PROCESSING: AREA OPERATIONS (FILTERING)

Computer Vision, Lecture 3

Prof. Feng Liu. Winter /10/2019

IMAGE ENHANCEMENT IN SPATIAL DOMAIN

Lecture 3: Linear Filters

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

ACM Fast Image Convolutions. by: Wojciech Jarosz

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

Frequency Domain Enhancement

Vision Review: Image Processing. Course web page:

Midterm is on Thursday!

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

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

Image Enhancement using Histogram Equalization and Spatial Filtering

CIS581: Computer Vision and Computational Photography Homework: Cameras and Convolution Due: Sept. 14, 2017 at 3:00 pm

Filtering in the spatial domain (Spatial Filtering)

Table of contents. Vision industrielle 2002/2003. Local and semi-local smoothing. Linear noise filtering: example. Convolution: introduction

Image filtering, image operations. Jana Kosecka

Practical Image and Video Processing Using MATLAB

Part I Feature Extraction (1) Image Enhancement. CSc I6716 Spring Local, meaningful, detectable parts of the image.

Last Lecture. photomatix.com

Motion illusion, rotating snakes

More image filtering , , Computational Photography Fall 2017, Lecture 4

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

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

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

Filip Malmberg 1TD396 fall 2018 Today s lecture

Lane Detection in Automotive

Image Processing : Introduction

Image Enhancement in spatial domain. Digital Image Processing GW Chapter 3 from Section (pag 110) Part 2: Filtering in spatial domain

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

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

Image analysis. CS/CME/BIOPHYS/BMI 279 Fall 2015 Ron Dror

Image Filtering. Median Filtering

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

Image preprocessing in spatial domain

Fourier analysis of images

Spatial Domain Processing and Image Enhancement

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

Last Lecture. photomatix.com

Module 1 : Numerical Methods for PDEs : Course Introduction, Lecture 1

Image Enhancement in the Spatial Domain Low and High Pass Filtering

Digital Image Processing

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

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

Image Filtering and Gaussian Pyramids

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

MATLAB 6.5 Image Processing Toolbox Tutorial

Head, IICT, Indus University, India

Sensors and Sensing Cameras and Camera Calibration

CSCI 1290: Comp Photo

Digital Image Processing Questions With Answer

Filtering. Image Enhancement Spatial and Frequency Based

Introduction. Computer Vision. CSc I6716 Fall Part I. Image Enhancement. Zhigang Zhu, City College of New York

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

Sampling and Reconstruction

CS/ECE 545 (Digital Image Processing) Midterm Review

Filters. Materials from Prof. Klaus Mueller

CSE 564: Scientific Visualization

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

EECS 473. Review etc.

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

Installation. Binary images. EE 454 Image Processing Project. In this section you will learn

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

Templates and Image Pyramids

PRACTICAL IMAGE AND VIDEO PROCESSING USING MATLAB

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

Image Filtering. Reading Today s Lecture. Reading for Next Time. What would be the result? Some Questions from Last Lecture

Image Enhancement II: Neighborhood Operations

Deconvolution , , Computational Photography Fall 2018, Lecture 12

Making PHP See. Confoo Michael Maclean

Chapter 3. Study and Analysis of Different Noise Reduction Filters

Image Deblurring and Noise Reduction in Python TJHSST Senior Research Project Computer Systems Lab

Image analysis. CS/CME/BioE/Biophys/BMI 279 Oct. 31 and Nov. 2, 2017 Ron Dror

Non Linear Image Enhancement

TIRF, geometric operators

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

Math + 4 (Red) SEMESTER 1. { Pg. 1 } Unit 1: Whole Number Sense. Unit 2: Whole Number Operations. Unit 3: Applications of Operations

MATH 2420 Discrete Mathematics Lecture notes

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?

CoE4TN4 Image Processing. Chapter 4 Filtering in the Frequency Domain

Chapter 3 Image Enhancement in the Spatial Domain. Chapter 3 Image Enhancement in the Spatial Domain

EECS 473. Review etc.

Overview. Neighborhood Filters. Dithering

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

Image Denoising with Linear and Non-Linear Filters: A REVIEW

Image Processing and Computer Graphics

EE482: Digital Signal Processing Applications

Templates and Image Pyramids

I. INTRODUCTION II. EXISTING AND PROPOSED WORK

Transcription:

CAP 5415 Computer Vision Marshall Tappen Fall 21 Lecture 1

Welcome! About Me Interested in Machine Vision and Machine Learning Happy to chat with you at almost any time May want to e-mail me first Office Hours: Tuesday-Thursday before class

Grading Problem Sets 5% 3 Solo Problem Sets 5% You may not collaborate on these

Doing the problems Finishing the problem sets will require access to an interpreted environment MATLAB Octave Numerical Python NO COMPILED LANGUAGES!!!!! No C/C++ No Java No x86 Assembler My Compiled Languages Rant

MATLAB Environments Pro:Well-established package. You can find many tutorials on the net. Con: Not free. If your lab does not already have it, talk to me about getting access. Octave Free MATLAB look-alike Pro: Should be able to handle anything you will do in this class Con: Should be. I'm not sure about support in Windows

Environments Numerical Python All the capabilities of MATLAB Free! Real programming language Used for lots of stuff besides numerical computing Cons: Documentation is a bit sparse and can be outdated I can get you started I am working on a tutorial

Math We will use it We will be talking about mathematical models of images and image formation This class is not about proving theorems My goal is to have you build intuitions about the models Try and visualize the computation that each equation is expressing Basic Calculus and Basic Linear Algebra should be sufficient

Course Text We will use Szeliski Book Free this year! Not required more of a reference

Course Structure This year, we will be covering pattern recognition more deeply than in previous years Machine learning is critical to modern computer vision You need to understand it well Important Foundational Topics: Image Processing Optimization Machine Learning Geometry

Image Processing For now, we won't worry about the physical aspects of getting images View image as an array of continuous values

Simple Modification What if we wanted to blur this image We could take a local average Replace each pixel with the mean of an NxN pixel neighborhood surrounding that pixel.

3x3 Neighborhood Original Averaged

5x5 Neighborhood Original Averaged

7x7 Neighborhood Original Averaged

Let's represent this more generally 3 6 1 16 2 46 2 43

Let's represent this more generally 3 6 1 2 2 16 46 43 Input Image Kernel

Let's represent this more generally 3 6 1 2 2 16 46 43 1.33 Input Image Multiply corresponding numbers and add

Let's represent this more generally 3 6 1 2 2 16 46 43 1.33 8.22 Input Image Multiply corresponding numbers and add Template moves across the image Think of it as a sliding window

This is called convolution Mathematically expressed as Resulting Image Input Image Convolution Kernel

Take out a piece of paper Let s say i= 1 and j=1 Which location in K is multiplied by I(5,5) I(5,4) Resulting Image Input Image Convolution Kernel

Notation Also denoted as R = I * K We convolve I with K Not convolute! Resulting Image Input Image Convolution Kernel

Sliding Template View Take the template K 1 4 2 5 3 6 7 8 9 Flip it 9 6 8 5 7 4 3 2 1 Slide across image

Predict the Image 1 Input Kernel Output

Predict the Image 1 Input Kernel Output

Predict the Image 1 Input Kernel Output

Predict the Image 1 Input Kernel Output

Predict the Image

Predict the Image

Predict the Image 1 Input Kernel Output

Predict the Image 1 Input Kernel Output

Predict the Image

Predict the Image

Predict the Image 1 1 2 1 1 Input Kernel Output

Predict the Image 1 1 2 1 1 Input Kernel Output

Predict the kernel What if I wanted to compute R(i,j) = I(i+1,j) I(i,j) at every pixel What would the kernel be This is one discrete approximation to the derivative

What s the problem with this derivative [1-1 ] Where s the center of the derivative An alternative [-1 1]

Your Convolution filter toolbox In my experience, 9% of the filtering that you will do will be either Smoothing (or Blurring) High-Pass Filtering (I ll explain this later) Most common filters: Smoothing: Gaussian High Pass Filtering: Derivative of Gaussian

Gaussian Filter Let s assume that a (2k+1) x (2k+ 1) filter is parameterized from k to +k The Gaussian filter has the form And looks like

Derivative of Gaussian Filter Take the derivative of the filter with respect to i: Filter looks like: Basically blur then take the derivative

Effect of Changing σ With σ set to 1 With σ set to 3 Input

Practical Aspects of Computing Convolutions Let's blur this flat, gray image: What should it look like

Practical Aspects of Computing Convolutions Depending on how you do the convolution in MATLAB, you could end up with 3 different images 266x266 Image 256x256 Image 246x246 Image

Border Handling Lets go back to the sliding template view What if I wanted to compute an average right here 3 6 1 16 2 46 2 43

Border Handling 3 6 1 16 2 46 2 43

Practical Aspects of Computing Convolutions Filled in borders with zeros, computed everywhere the kernel touches Called full in MATLAB 266x266 Image

Border Handling 3 6 1 16 2 46 2 43

Practical Aspects of Computing Convolutions Fill in border with zeros, only compute at original pixels Called same in MATLAB 256x256 Image

Border Handling 3 6 1 2 16 46 2 43

Practical Aspects of Computing Convolutions Only compute at places where the kernel fits in the image 246x246 Image

There are other options The first two methods that I described fill missing values in by substituting zero Can fill in values with different methods Reflect image along border Pull values from other side Not supported in MATLAB's convolution Eero Simoncelli has a package that supports that kind of convolution

Going Non-Linear Convolution is a linear operation What does that mean A simple non-linear operation is the median filter Will explore that filter in the first problem set.

Practical Use of These Properties Image Sharpening Take this image and blur it

Basic Convolution Properties Can derive all of these with the definition of convolution Comes from linearity of convolution

Practical Use of These Properties Image Sharpening What do we get if we subtract the two - = This is the leftover sharp-stuff

Let's make the image sharper We know + =

Let's boost the sharp stuff a little 2 +

Let's boost the sharp stuff a little 2 + =

Side-by Side

Now look at the computation Operations 1 convolution 1 subtraction over the whole image As an equation:

Rewrite this This is an identity filter or unit impulse

Basic Convolution Properties Can derive all of these with the definition of convolution Comes from linearity of convolution

Rewrite this

Now look at the computation Can pre-compute new filter Operations 1 convolution