a spreadsheet-based manipulative

67
A Spreadsheet-based Manipulative Support for Teaching Convolution STEM Teaching and Learning Conference March 7, 2014 Georgia Gwinnett College School of Science and Technology Dr. Jim Rowan

Upload: brandy

Post on 24-Feb-2016

56 views

Category:

Documents


0 download

DESCRIPTION

A Spreadsheet-based Manipulative. Support for Teaching Convolution STEM Teaching and Learning Conference March 7, 2014 Georgia Gwinnett College School of Science and Technology Dr. Jim Rowan. Sections of today’s talk. -A moment about GGC and Digital Media - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: A Spreadsheet-based Manipulative

A Spreadsheet-based Manipulative

Support for Teaching ConvolutionSTEM Teaching and Learning Conference

March 7, 2014

Georgia Gwinnett CollegeSchool of Science and Technology

Dr. Jim Rowan

Page 2: A Spreadsheet-based Manipulative

Sections of today’s talk

-A moment about GGC and Digital Media

-About blurring images before digital imagesCameraArtistically

-About blurring digital images

-The powerpoint manipulative

Page 3: A Spreadsheet-based Manipulative

GGC and Digital Media

GGC has been built from the ground up since it’s founding in 2005

I arrived in 2007 before any classes were being offered to Freshmen or Sophomores

This was an extraordinary opportunity

Digital Media, a sophomore level class, was my choice

Page 4: A Spreadsheet-based Manipulative

GGC and Digital MediaTwo parts: Projects and Theory

Projects: Using Open Source software…

Audacity for audioInkscape for 2D vector graphics

GIMP for bitmapped graphicsBlender for 3D animation

Theorylook under the coversknow a little about what is going onstrip away the “magic”banish the wizardsempowering students

Page 5: A Spreadsheet-based Manipulative

GGC and Digital MediaIn this class we deal with bitmapped images how they are stored on a computer how to manipulate them

how to do editing

Part of the editing involves the use of filters

One of the filters we use on a project is blur

So… The question isHow does a digital image get blurred?

Page 6: A Spreadsheet-based Manipulative

Image Blur…How does this happen?

Page 7: A Spreadsheet-based Manipulative

Pre-Digital Image Blur: The entire image

Photographically you can de-focus the lens

If you are an aging diva you can insist that vaseline be applied to the lens to get this “soft” focus

Page 9: A Spreadsheet-based Manipulative

imageSource

Pre-Digital Image Blur: Artistically

You can use your fingers to smooth and spread out the charcoal

Page 10: A Spreadsheet-based Manipulative

Image Blur: Digital?You can’t reach into the computer to smear the charcoal… What do you do?

The simple answer is use some image software…

But how doesthat work?

Page 11: A Spreadsheet-based Manipulative

Digital BlurBlur (as well as many other digital image filters) use a process known as convolution

Convolution is simple…it’s just multiplication and addition

Convolution is hard…there’s a lot to keep up with

Page 12: A Spreadsheet-based Manipulative

Is a huge collection of numbersIn the case of 24 bit color depth there are 3 bytes

-one for red-one for green-one for blue

for each pixel!

This image measures1983 X 2252 pixels

Doing the math you get4,465,716 pixels anda file size of 4,465,716 X 3 or13,397,148 bytes

Underlying any digital image…

Page 13: A Spreadsheet-based Manipulative

Homing in on the car’s front grillIf you drill down you can finally see the pixels and the numbers that define the colors

Page 14: A Spreadsheet-based Manipulative

Digital BlurBlur is accomplished by applying a “convolution matrix” to every pixel of the image to create a new blurred image

This convolution matrix is a square matrixthat contains numbers that frequently add

up to 1can be negativecan be as small as 3 X 3can be much larger

The choice of convolution matrix determines the affect that it has on the image

Page 15: A Spreadsheet-based Manipulative

GIMP Convolution MatrixGIMP allows up to a 5 X 5 convolution matrix as well as showing a preview.Design and test your own. BUT how does it work?

Page 16: A Spreadsheet-based Manipulative

Showing how it worksTo show the underlying workings of convolution simplifications must be made

-Use a 3 X 3 convolution matrix-Operate on black/white/grey scale images

-each pixel then has only one numberassociated with it

-Select a very small but representative sample of the original image

-Calculate only a few but representativepixels in the new blurred image

-Extrapolate the result to the rest of the image

Page 17: A Spreadsheet-based Manipulative

A simple example:A two pixel wide horizontal line

The image The underlying numbers

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 2550 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 255

Page 18: A Spreadsheet-based Manipulative

The convolution matrix

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 2550 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 255

0 1/3 0

0 1/3 0

0 1/3 0

X

To calculate a single pixel (X) in the new blurred image you need center the matrix over the pixel of interest and then multiply each cell of the matrix by the associated color value of it’s underlying pixel and then add all 9 of these up

Page 19: A Spreadsheet-based Manipulative

The calculations are blinding!

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 2550 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 255

0 1/3 0

0 1/3 0

0 1/3 0

X

Page 20: A Spreadsheet-based Manipulative
Page 21: A Spreadsheet-based Manipulative
Page 22: A Spreadsheet-based Manipulative
Page 23: A Spreadsheet-based Manipulative
Page 24: A Spreadsheet-based Manipulative
Page 25: A Spreadsheet-based Manipulative
Page 26: A Spreadsheet-based Manipulative
Page 27: A Spreadsheet-based Manipulative
Page 28: A Spreadsheet-based Manipulative

That’s a lot of work to make my point!Students get lost in the trees and miss the forest!

Page 29: A Spreadsheet-based Manipulative

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 2550 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 255

0 1/3 0

0 1/3 0

0 1/3 0

X

Instead use a powerpoint slide to do the calculation

It is much easier to keep track of where you are… short enough to make the point

Page 30: A Spreadsheet-based Manipulative

Made easier with powerpoint!

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 2550 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 255

0 1/3 0

0 1/3 0

0 1/3 0

X

Select the convolution matrix

Page 31: A Spreadsheet-based Manipulative

Made easier with powerpoint!

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 2550 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 255

0 1/3 0

0 1/3 0

0 1/3 0X

Drag and center the matrix over the pixel of interest in the original image…

You can “see” the multiplications and the additions

Page 32: A Spreadsheet-based Manipulative

Made easier with powerpoint!

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 2550 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 255

0 1/3 0

0 1/3 0

0 1/3 0170

You can “see” the multiplications!

0X255 + 1/3X255 + 0X255 +0X255 + 1/3X255 + 0X255 +0X0 + 1/3X0 + 0X0 = 85 + 85 = 170

Page 33: A Spreadsheet-based Manipulative

This method made a HUGE differencein student success

Page 34: A Spreadsheet-based Manipulative

One Complete Example!

Page 35: A Spreadsheet-based Manipulative

0/9 3/9 0/9

0/9 3/9 0/9

0/9 3/9 0/9X

255` 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

0 0 0 0 0 0 0

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

Page 36: A Spreadsheet-based Manipulative

255` 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

0 0 0 0 0 0 0

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

0/9 3/9 0/9

0/9 3/9 0/9

0/9 3/9 0/9

X

Page 37: A Spreadsheet-based Manipulative

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

0 0 0 0 0 0 0

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

0/9 3/9 0/9

0/9 3/9 0/9

0/9 3/9 0/9

255

0/9 x 255 + 3/9 x 255 + 0/9 x 255 +0/9 x 255 + 3/9 x 255 + 0/9 x 255 + 0/9 x 255 + 3/9 x 255 + 0/9 x 255 =

0 + 85 + 0 +0 + 85 + 0 +0 + 85 + 0 = 255

Page 38: A Spreadsheet-based Manipulative

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

0 0 0 0 0 0 0

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

0/9 3/9 0/9

0/9 3/9 0/9

0/9 3/9 0/9

255

X

Page 39: A Spreadsheet-based Manipulative

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

0 0 0 0 0 0 0

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

0/9 3/9 0/9

0/9 3/9 0/9

0/9 3/9 0/9

255

1700/9 x 255 + 3/9 x 255 + 0/9 x 255 +0/9 x 255 + 3/9 x 255 + 0/9 x 255 + 0/9 x 0+ 3/9 x 0 + 0/9 x 0=

0 + 85 + 0 +0 + 85 + 0 +0 + 0 + 0 = 170

Page 40: A Spreadsheet-based Manipulative

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

0 0 0 0 0 0 0

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

0/9 3/9 0/9

0/9 3/9 0/9

0/9 3/9 0/9

255

170

X

Page 41: A Spreadsheet-based Manipulative

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

0 0 0 0 0 0 0

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

0/9 3/9 0/9

0/9 3/9 0/9

0/9 3/9 0/9

255

170

1700/9 x 255 + 3/9 x 255 + 0/9 x 255 +0/9 x 0 + 3/9 x 0+ 0/9 x 0+ 0/9 x 255 + 3/9 x 255 + 0/9 x 255 =

0 + 85 + 0 +0 + 0 + 0 +0 + 85+ 0 = 170

Page 42: A Spreadsheet-based Manipulative

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

0 0 0 0 0 0 0

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

0/9 3/9 0/9

0/9 3/9 0/9

0/9 3/9 0/9

255

170

170

X

Page 43: A Spreadsheet-based Manipulative

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

0 0 0 0 0 0 0

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

0/9 3/9 0/9

0/9 3/9 0/9

0/9 3/9 0/9

255

170

170

170

0/9 x 0 + 3/9 x 0 + 0/9 x 0 +0/9 x 255 + 3/9 x 255 + 0/9 x 255 + 0/9 x 255 + 3/9 x 255 + 0/9 x 255 =

0 + 0 + 0 +0 + 85+ 0 +0 + 85+ 0 = 170

Page 44: A Spreadsheet-based Manipulative

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

0 0 0 0 0 0 0

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

0/9 3/9 0/9

0/9 3/9 0/9

0/9 3/9 0/9

255

170

170

170

X

Page 45: A Spreadsheet-based Manipulative

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

0 0 0 0 0 0 0

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

0/9 3/9 0/9

0/9 3/9 0/9

0/9 3/9 0/9

255

170

170

170

255

0/9 x 255 + 3/9 x 255+ 0/9 x 255 +0/9 x 255 + 3/9 x 255 + 0/9 x 255 + 0/9 x 255 + 3/9 x 255 + 0/9 x 255 =

0 + 85 + 0 +0 + 85 + 0 +0 + 85+ 0 = 255

Page 46: A Spreadsheet-based Manipulative

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

0 0 0 0 0 0 0

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

0/9 3/9 0/9

0/9 3/9 0/9

0/9 3/9 0/9

255 255 255 255 255

170 170 170 170 170

170 170 170 170 170

170 170 170 170 170

255 255 255 255 255

This matrix blurs horizontal lines(but not vertical ones!)

Page 47: A Spreadsheet-based Manipulative

Another complete example…Sometimes a mask has no effect

Page 48: A Spreadsheet-based Manipulative

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

0 0 0 0 0 0 0

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

0/9 0/9 0/9

3/9 3/9 3/9

0/9 0/9 0/9

Page 49: A Spreadsheet-based Manipulative

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

0 0 0 0 0 0 0

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255

0/9 0/9 0/9

3/9 3/9 3/9

0/9 0/9 0/9

0/9 x 255 + 0/9 x 255 + 0/9 x 255 +3/9 x 255 + 3/9 x 255 + 3/9 x 255 + 0/9 x 255 + 0/9 x 255 + 0/9 x 255 =

0 + 0 + 0 +85 + 85 + 85 +0 + 0 + 0 = 255

Page 50: A Spreadsheet-based Manipulative

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

0 0 0 0 0 0 0

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255

255

0/9 0/9 0/9

3/9 3/9 3/9

0/9 0/9 0/9

0/9 x 255 + 0/9 x 255 + 0/9 x 255 +3/9 x 255 + 3/9 x 255 + 3/9 x 255 + 0/9 x 255 + 0/9 x 255 + 0/9 x 255 =

0 + 0 + 0 +85 + 85 + 85 +0 + 0 + 0 = 255

Page 51: A Spreadsheet-based Manipulative

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

0 0 0 0 0 0 0

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255

255

0

0/9 0/9 0/9

3/9 3/9 3/9

0/9 0/9 0/9

0/9 x 255 + 0/9 x 255 + 0/9 x 255 +3/9 x 0+ 3/9 x 0+ 3/9 x 0+ 0/9 x 255 + 0/9 x 255 + 0/9 x 255 =

0 + 0 + 0 +0 + 0 + 0 +0 + 0 + 0 = 0

Page 52: A Spreadsheet-based Manipulative

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

0 0 0 0 0 0 0

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255

255

0

255

0/9 0/9 0/9

3/9 3/9 3/9

0/9 0/9 0/9

0/9 x 255 + 0/9 x 255 + 0/9 x 255 +3/9 x 255 + 3/9 x 255 + 3/9 x 255 + 0/9 x 255 + 0/9 x 255 + 0/9 x 255 =

0 + 0 + 0 +85 + 85 + 85 +0 + 0 + 0 = 255

Page 53: A Spreadsheet-based Manipulative

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

0 0 0 0 0 0 0

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255

255

0

255

255

0/9 0/9 0/9

3/9 3/9 3/9

0/9 0/9 0/9

0/9 x 255 + 0/9 x 255 + 0/9 x 255 +3/9 x 255 + 3/9 x 255 + 3/9 x 255 + 0/9 x 255 + 0/9 x 255 + 0/9 x 255 =

0 + 0 + 0 +85 + 85 + 85 +0 + 0 + 0 = 255

Page 54: A Spreadsheet-based Manipulative

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

0 0 0 0 0 0 0

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255

255 255 255 255 255

0 0 0 0 0

255 255 255 255 255

255 255 255 255 255

0/9 0/9 0/9

3/9 3/9 3/9

0/9 0/9 0/9

This matrix does nothing to a horizontal line…What about a vertical one?

Page 55: A Spreadsheet-based Manipulative

Other example setupsTry your hand at it!

Page 56: A Spreadsheet-based Manipulative

0 255 255 255 255 255 255

0 0 255 255 255 255 255

0 0 0 255 255 255 255

0 0 0 0 255 255 255

0 0 0 0 0 255 255

0 0 0 0 0 0 255

0 0 0 0 0 0 0

1/3 0 0

0 1/3 0

0 0 1/3

Diagonal Image,Diagonal Mask:

What values would be in the turquoise cells?

Page 57: A Spreadsheet-based Manipulative

0 255 255 255 255 255 255

0 0 255 255 255 255 255

0 0 0 255 255 255 255

0 0 0 0 255 255 255

0 0 0 0 0 255 255

0 0 0 0 0 0 255

0 0 0 0 0 0 0

0 0 1/3

0 1/3 0

1/3 0 0

Diagonal Image,A different diagonal Mask:

What values would be in the turquoise cells?

Page 58: A Spreadsheet-based Manipulative

255 255 255 255 255 255 255

255 255 255 255 255 255 255

255 255 255 255 255 255 255

0 0 0 0 0 0 0

0 0 0 0 0 0 0

255 255 255 255 255 255 255

255 255 255 255 255 255 255

-1 -1 -1

-1 9 -1

-1 -1 -1

A wider horizontal line,The mask can be signednumbers:

What values would be in the turquoise cells?

Page 63: A Spreadsheet-based Manipulative
Page 64: A Spreadsheet-based Manipulative
Page 65: A Spreadsheet-based Manipulative
Page 66: A Spreadsheet-based Manipulative
Page 67: A Spreadsheet-based Manipulative