Lecture: Image manipulations (2) Filters and kernels

Slides:



Advertisements
Similar presentations
CSCE 643 Computer Vision: Template Matching, Image Pyramids and Denoising Jinxiang Chai.
Advertisements

Image Processing. Image processing Once we have an image in a digital form we can process it in the computer. We apply a “filter” and recalculate the.
Lecture 2: Convolution and edge detection CS4670: Computer Vision Noah Snavely From Sandlot ScienceSandlot Science.
Spatial Filtering (Chapter 3)
Motion illusion, rotating snakes. Slide credit Fei Fei Li.
CS 4487/9587 Algorithms for Image Analysis
Computational Photography CSE 590 Tamara Berg Filtering & Pyramids.
Lecture 2: Filtering CS4670/5670: Computer Vision Kavita Bala.
Image Filtering CS485/685 Computer Vision Prof. George Bebis.
Lecture 1: Images and image filtering
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.
CS443: Digital Imaging and Multimedia Filters Spring 2008 Ahmed Elgammal Dept. of Computer Science Rutgers University Spring 2008 Ahmed Elgammal Dept.
Announcements Kevin Matzen office hours – Tuesday 4-5pm, Thursday 2-3pm, Upson 317 TA: Yin Lou Course lab: Upson 317 – Card access will be setup soon Course.
Lecture 2: Image filtering
Linear filtering.
Linear Filtering About modifying pixels based on neighborhood. Local methods simplest. Linear means linear combination of neighbors. Linear methods simplest.
Lecture 1: Images and image filtering CS4670/5670: Intro to Computer Vision Kavita Bala Hybrid Images, Oliva et al.,
Filtering Course web page: vision.cis.udel.edu/cv March 5, 2003  Lecture 9.
CS559: Computer Graphics Lecture 3: Digital Image Representation Li Zhang Spring 2008.
Basis beeldverwerking (8D040) dr. Andrea Fuster Prof.dr. Bart ter Haar Romeny dr. Anna Vilanova Prof.dr.ir. Marcel Breeuwer Convolution.
Lecture 03 Area Based Image Processing Lecture 03 Area Based Image Processing Mata kuliah: T Computer Vision Tahun: 2010.
Image Filtering Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 02/02/10.
Why is computer vision difficult?
Linear filtering. Motivation: Noise reduction Given a camera and a still scene, how can you reduce noise? Take lots of images and average them! What’s.
Course Website: Digital Image Processing Image Enhancement (Spatial Filtering 1)
Lecture 5 Mask/Filter Transformation 1.The concept of mask/filters 2.Mathematical model of filtering Correlation, convolution 3.Smoother filters 4.Filter.
Sejong Univ. CH3. Area Processes Convolutions Blurring Sharpening Averaging vs. Median Filtering.
CS 691B Computational Photography
CSE 6367 Computer Vision Image Operations and Filtering “You cannot teach a man anything, you can only help him find it within himself.” ― Galileo GalileiGalileo.
Image enhancement Last update Heejune Ahn, SeoulTech.
Lecture 3: Filtering and Edge detection
Reconnaissance d’objets et vision artificielle
Linear filtering. Motivation: Image denoising How can we reduce noise in a photograph?
Sharpening Spatial Filters ( high pass)  Previously we have looked at smoothing filters which remove fine detail  Sharpening spatial filters seek to.
Lecture 8: Edges and Feature Detection
Last Lecture photomatix.com. Today Image Processing: from basic concepts to latest techniques Filtering Edge detection Re-sampling and aliasing Image.
CSE 185 Introduction to Computer Vision Image Filtering: Spatial Domain.
Grauman Today: Image Filters Smooth/Sharpen Images... Find edges... Find waldo…
Images and Filters CSEP 576 Ali Farhadi Many slides from Steve Seitz and Larry Zitnick.
Lecture 1: Images and image filtering CS4670/5670: Intro to Computer Vision Noah Snavely Hybrid Images, Oliva et al.,
Non-linear filtering Example: Median filter Replaces pixel value by median value over neighborhood Generates no new gray levels.
Spatial Filtering (Chapter 3) CS474/674 - Prof. Bebis.
Spatial Image Enhancement
Program Studi S-1 Teknik Informatika FMIPA Universitas Padjadjaran
Basic Principles Photogrammetry V: Image Convolution & Moving Window:
Basis beeldverwerking (8D040) dr. Andrea Fuster dr. Anna Vilanova Prof
Linear Filters T-11 Computer Vision University of Houston
Filtering – Part I Gokberk Cinbis Department of Computer Engineering
CS-565 Computer Vision Nazar Khan Lecture 4.
Lecture 1: Images and image filtering
Recap from Wednesday Spectra and Color Light capture in cameras and humans.
Image gradients and edges April 11th, 2017
Dr. Chang Shu COMP 4900C Winter 2008
9th Lecture - Image Filters
Digital Image Processing
Digital Image Processing
Motion illusion, rotating snakes
Spatial operations and transformations
Linear filtering.
Digital Image Processing Week IV
Interesting article in the March, 2006 issue of Wired magazine
Lecture 2: Image filtering
Lecture 1: Images and image filtering
Image Filtering Readings: Ch 5: 5. 4, 5. 5, 5. 6, , 5
Lecture 7 Spatial filtering.
Lecture: Pixels and Filters
All about convolution.
Fundamentals of Spatial Filtering
Spatial operations and transformations
Lecture: Pixels and Filters
Presentation transcript:

Lecture: Image manipulations (2) Filters and kernels Alireza Akhavan Pour CLASS.VISION سه شنبه - ۸ اسفند ۱۳۹۶

Image Manipulations (Part 2) 1. Intro to Convolution 2. Blurring 3.Sharpening 4. Dilation, Erosion, Opening and Closing 5. Edge Detection & Image Gradients سه شنبه - ۸ اسفند ۱۳۹۶

Filter example #1: Moving Average 2D DS moving average over a 3 × 3 window of neighborhood h 1 سه شنبه - ۸ اسفند ۱۳۹۶

Filter example #1: Moving Average 90 90 Courtesy of S. Seitz سه شنبه - ۸ اسفند ۱۳۹۶

Filter example #1: Moving Average 90 90 10 5 سه شنبه - ۸ اسفند ۱۳۹۶

Filter example #1: Moving Average 90 90 10 20 سه شنبه - ۸ اسفند ۱۳۹۶

Filter example #1: Moving Average 90 90 10 20 30 سه شنبه - ۸ اسفند ۱۳۹۶

90 10 20 30 سه شنبه - ۸ اسفند ۱۳۹۶

Filter example #1: Moving Average 90 10 20 30 40 60 90 50 80 Source: S. Seitz سه شنبه - ۸ اسفند ۱۳۹۶

Filter example #1: Moving Average In summary: This filter “Replaces” each pixel with an average of its neighborhood. Achieve smoothing effect (remove sharp features) 1 سه شنبه - ۸ اسفند ۱۳۹۶

Filter example #1: Moving Average سه شنبه - ۸ اسفند ۱۳۹۶

2D convolution   Assume we have a filter(h[,]) that is 3x3. and an image (f[,]) that is 7x7. سه شنبه - ۸ اسفند ۱۳۹۶

2D convolution   Assume we have a filter(h[,]) that is 3x3. and an image (f[,]) that is 7x7. سه شنبه - ۸ اسفند ۱۳۹۶

2D convolution   Assume we have a filter(h[,]) that is 3x3. and an image (f[,]) that is 7x7. سه شنبه - ۸ اسفند ۱۳۹۶

2D convolution   Assume we have a filter(h[,]) that is 3x3. and an image (f[,]) that is 7x7. سه شنبه - ۸ اسفند ۱۳۹۶

2D convolution   Assume we have a filter(h[,]) that is 3x3. and an image (f[,]) that is 7x7. سه شنبه - ۸ اسفند ۱۳۹۶

2D convolution   Assume we have a filter(h[,]) that is 3x3. and an image (f[,]) that is 7x7. سه شنبه - ۸ اسفند ۱۳۹۶

2D convolution example سه شنبه - ۸ اسفند ۱۳۹۶

2D convolution example Slide credit: Song Ho Ahn سه شنبه - ۸ اسفند ۱۳۹۶

2D convolution example Slide credit: Song Ho Ahn سه شنبه - ۸ اسفند ۱۳۹۶

2D convolution example Slide credit: Song Ho Ahn سه شنبه - ۸ اسفند ۱۳۹۶

سه شنبه - ۸ اسفند ۱۳۹۶

Slide credit: Song Ho Ahn سه شنبه - ۸ اسفند ۱۳۹۶

2D convolution example سه شنبه - ۸ اسفند ۱۳۹۶

1 ? = * Original Courtesy of D Lowe سه شنبه - ۸ اسفند ۱۳۹۶

Convolution in 2D - examples 1 = * Original Filtered (no change) Courtesy of D Lowe سه شنبه - ۸ اسفند ۱۳۹۶

Convolution in 2D - examples 1 ? = * Original Courtesy of D Lowe سه شنبه - ۸ اسفند ۱۳۹۶

Convolution in 2D - examples 1 = * Original Shifted right By 1 pixel Courtesy of D Lowe سه شنبه - ۸ اسفند ۱۳۹۶

? 1 = * Original Courtesy of D Lowe سه شنبه - ۸ اسفند ۱۳۹۶

Convolution in 2D - examples 1 = * Original Blur (with a box filter) Courtesy of D Lowe سه شنبه - ۸ اسفند ۱۳۹۶

- = ? - 2 1 1 1 1 (Note that filter sums to 1) Original 2 1 = ? (Note that filter sums to 1) Original “details of the image” - 1 1 1 + Courtesy of D Lowe سه شنبه - ۸ اسفند ۱۳۹۶

What does blurring take away? detail – = original smoothed (5x5) Let’s add it back: original detail sharpened + a = سه شنبه - ۸ اسفند ۱۳۹۶

Convolution in 2D – Sharpening filter - 2 1 = Original Sharpening filter: Accentuates differences with local average Courtesy of D Lowe سه شنبه - ۸ اسفند ۱۳۹۶

Image support and edge effect A computer will only convolve finite support signals. What happens at the edge? • zero “padding” • edge value replication • mirror extension • more (beyond the scope of this class) -> Matlab conv2 uses zero-padding f h سه شنبه - ۸ اسفند ۱۳۹۶

Convolution vs. (Cross) Correlation A convolution is an integral that expresses the amount of overlap of one function as it is shifted over another function. convolution is a filtering operation Correlation compares the similarity of two sets of data. Correlation computes a measure of similarity of two input signals as they are shifted by one another. The correlation result reaches a maximum at the time when the two signals match best . correlation is a measure of relatedness of two signals سه شنبه - ۸ اسفند ۱۳۹۶

What about OpenCV? Convolution or (Cross) Correlation? http://docs.opencv.org/modules/imgproc/doc/filtering.html#filter2d سه شنبه - ۸ اسفند ۱۳۹۶

https://en.wikipedia.org/wiki/Kernel_(image_processing) سه شنبه - ۸ اسفند ۱۳۹۶

سه شنبه - ۸ اسفند ۱۳۹۶

سه شنبه - ۸ اسفند ۱۳۹۶

سه شنبه - ۸ اسفند ۱۳۹۶

سه شنبه - ۸ اسفند ۱۳۹۶

سه شنبه - ۸ اسفند ۱۳۹۶

منابع http://vision.stanford.edu/teaching/cs131_fall1718/ https://en.wikipedia.org/wiki/Kernel_(image_processing) https://www.udemy.com/master-computer-vision-with-opencv-in-python/ http://docs.opencv.org/ سه شنبه - ۸ اسفند ۱۳۹۶