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.

Slides:



Advertisements
Similar presentations
Video We will consider how electronic pictures (monochrome) are made up. Consider some important characteristics of electronic images. See how image are.
Advertisements

Convolution. Why? Image processing Remove noise from images (e.g. poor transmission (from space), measurement (X-Rays))
Gaussian Elimination Matrices Solutions By Dr. Julia Arnold.
Neighborhood Processing
November 12, 2013Computer Vision Lecture 12: Texture 1Signature Another popular method of representing shape is called the signature. In order to compute.
Spatial Filtering (Chapter 3)
Image Filtering. Outline Outline Concept of image filter  Focus on spatial image filter Various types of image filter  Smoothing, noise reductions 
Multimedia communications EG 371Dr Matt Roach Multimedia Communications EG 371 and EE 348 Dr Matt Roach Lecture 6 Image processing (filters)
5/24/2015© 2009 Raymond P. Jefferis III Lect Geographic Image Processing Data Transformation and Filtering Noise in data Arrays Digital filtering.
Lecture 4 Linear Filters and Convolution
Image Filtering CS485/685 Computer Vision Prof. George Bebis.
Multimedia Data Introduction to Image Processing Dr Mike Spann Electronic, Electrical and Computer.
Low Pass Filtering Spatial frequency is a measure of how rapidly brightness or colour varies as we traverse an image. Figure 7.11a shows that an image.
7. Neighbourhood operations A single pixel considered in isolation conveys information on the intensity and colour at a single location in an image, but.
CS 376b Introduction to Computer Vision 02 / 27 / 2008 Instructor: Michael Eckmann.
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.
Image Enhancement.
Linear Filtering About modifying pixels based on neighborhood. Local methods simplest. Linear means linear combination of neighbors. Linear methods simplest.
Most slides from Steve Seitz
Image Processing1 Image Filtering Filtering can be use to enhance some features and de- enhance others. Usually used as a pre-processing step.
CS 376b Introduction to Computer Vision 02 / 26 / 2008 Instructor: Michael Eckmann.
National Center for Supercomputing Applications University of Illinois at Urbana-Champaign Image Features Kenton McHenry, Ph.D. Research Scientist.
Digital Image Processing Image Enhancement Part IV.
Multimedia Data Introduction to Image Processing Dr Sandra I. Woolley Electronic, Electrical.
Lecture 03 Area Based Image Processing Lecture 03 Area Based Image Processing Mata kuliah: T Computer Vision Tahun: 2010.
infinity-project.org Engineering education for today’s classroom 2 Outline How Can We Use Digital Images? A Digital Image is a Matrix Manipulating Images.
School of Computer Science Queen’s University Belfast Practical TULIP lecture next Tues 12th Feb. Wed 13th Feb 11-1 am. Thurs 14th Feb am. Practical.
GK-12 Sensors! Matrices and Digital Pictures Part II - Matrix operations with digital pictures.
Course Website: Digital Image Processing Image Enhancement (Spatial Filtering 1)
October 7, 2014Computer Vision Lecture 9: Edge Detection II 1 Laplacian Filters Idea: Smooth the image, Smooth the image, compute the second derivative.
How to Multiply Two Matrices. Steps for Matrix Multiplication 1.Determine whether the matrices are compatible. 2.Determine the dimensions of the product.
Visual Computing Computer Vision 2 INFO410 & INFO350 S2 2015
1 Computational Vision CSCI 363, Fall 2012 Lecture 6 Edge Detection.
CS 691B Computational Photography
MATRICES MATRIX OPERATIONS. About Matrices  A matrix is a rectangular arrangement of numbers in rows and columns. Rows run horizontally and columns run.
Digital Image Processing Part 3 Spatial Domain Processing.
: Chapter 5: Image Filtering 1 Montri Karnjanadecha ac.th/~montri Image Processing.
Linear filtering. Motivation: Image denoising How can we reduce noise in a photograph?
Digital Filters. What are they?  Local operation (neighborhood operation in GIS terminology) by mask, window, or kernel (different words for the same.
CSE 185 Introduction to Computer Vision Image Filtering: Spatial Domain.
Sliding Window Filters Longin Jan Latecki October 9, 2002.
Lecture 1: Images and image filtering CS4670/5670: Intro to Computer Vision Noah Snavely Hybrid Images, Oliva et al.,
Filters– Chapter 6. Filter Difference between a Filter and a Point Operation is that a Filter utilizes a neighborhood of pixels from the input image to.
Spatial Filtering (Chapter 3) CS474/674 - Prof. Bebis.
Spatial Image Enhancement
Ch. 7 – Matrices and Systems of Equations
Basic Principles Photogrammetry V: Image Convolution & Moving Window:
13.4 Product of Two Matrices
Practical TULIP lecture next Tues 12th Feb. Wed 13th Feb 11-1 am.
Histogram Histogram is a graph that shows frequency of anything. Histograms usually have bars that represent frequency of occuring of data. Histogram has.
WarmUp 2-3 on your calculator or on paper..
Computer Vision Lecture 9: Edge Detection II
Image filtering Images by Pawan Sinha.
9th Lecture - Image Filters
Digital Image Processing
Image filtering Images by Pawan Sinha.
Image filtering Images by Pawan Sinha.
Spatial operations and transformations
Lecture: Image manipulations (2) Filters and kernels
Digital Image Processing Week IV
Most slides from Steve Seitz
Image filtering Images by Pawan Sinha.

Lecture 2: Image filtering
Image Filtering Readings: Ch 5: 5. 4, 5. 5, 5. 6, , 5
Most slides from Steve Seitz
Digital Filters.
Ch. 7 – Matrices and Systems of Equations
Spatial operations and transformations
Presentation transcript:

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 pixel values of the processed image. We will look at the application of filters to sharpen and soften (make less sharp) the image.

Filters or Kernals Our filters take the form of a small matrix or vector which we place (in turn ) over the image at each pixel position. Typically our filters are symmetrical 3 x 3 matrices. We use a process called convolution to apply the filter to the image.

Convolution Convolution is the process of multiplying each element of our filter by the pixel values of the image that the filter covers and adding the products. We can describe the result as “the original image convolved with the filter”. conv2 is a Matlab function which can do this. Strictly what is described above is not a convolution but a correlation, however if our filters are symmetric the result is the same.

Convolution and filters Filter Image sample set

Convolution and filters Image sample set

Convolution and filters So the value of 3 in the centre of the original image is replaced with –5 on the convolved image.

Image softening If we make all the elements of the filter equal to one ninth, then the convolution value will be the average of all the elements “covered” by the filter. It is the same as adding all the 9 values together and dividing by nine.

Image softening The following block of image samples represents a sharp vertical edge as pixel values suddenly change from 0 (black) to 255 (white). We will attempt to smooth it (make it less sharp) Sample Block

Image softening Consider the operation of the averaging filter on the block of image samples /9 Filter Sample Block

Image softening As we “run” the filter over the centre of the sample block. The following changes will take place. See next slide Sample Block Filter

Image softening The zeros in the 4 th column are replaced with 85, since:

Image softening Similarly as we perform the convolution of the filter with the rest of the centre of the sample block we get:

Image softening The resultant convolution (image) no longer has a sharp edge, but a more gradual one

Image softening That’s the theory; lets try it. for i=1:256 grey(i, 1:3)=(i-1)/255 end colormap(grey) myedge=zeros(5, 8) myedge(:, 5:8)=255 filt=ones(3,3)/9 image(myedge) myconv=conv2(myedge,filt, 'valid') image(myconv)

Softening an image im=imread(‘urban.bmp'); smooth=[ 1 1 1; 1 1 1; 1 1 1]/9 % convolve all colours sharpim(:,:,1)=conv2(im(:,:,1),smooth); sharpim(:,:,2)=conv2(im(:,:,2),smooth); sharpim(:,:,3)=conv2(im(:,:,3),smooth); image(im) figure image(uint8(smoothim))

Image sharpening It is easier to see this in one dimension initially. Consider some neighbouring pixels that are not sharp. If they are not sharp there will be no abrupt change in value between them. If we can cause an a more abrupt change in value between neighbouring pixels, we will sharpen the image.

Image sharpening It is easier to see this in one dimension initially. Consider some neighbouring pixels that are not sharp. If they are not sharp there will be no abrupt change in value between them. If we can cause an a more abrupt change in value between neighbouring pixels, we will sharpen the image.

Image sharpening The idea is to generate artificial sharp edges at the points of differing neighbouring pixels and then add these edges to the original image. The following diagram shows the variation in brightness values for: –(a) A perfect (sharp) edge. –(b) A blurred edge. –(c) The artificial correction to be added. –(d) The corrected (enhaced) edge.

Image sharpening (a) (b) (c) (d)

Image sharpening What kernal (filter) will (when convolved with the image) generate the correction waveform (c) ? In one dimension Check it. –It produces zero for flat fields, but a negative and positive edge at edges In two dimensions

Image sharpening We need to produce a kernal which will add the artificial edges and the original together. The original will be produced if we only have a one (1) in the centre of the a convolution kernal. Check it. Add this to the edge generator + =

Sharpening an Image im=imread(‘urban.bmp'); sharp=[ 0 –1 0; -1 5 –1; 0 –1 0] % convolve all colours sharpim(:,:,1)=conv2(im(:,:,1),sharp); sharpim(:,:,2)=conv2(im(:,:,2),sharp); sharpim(:,:,3)=conv2(im(:,:,3),sharp); image(sharpim) figure image(uint8(sharpim))