CS 102 Computers In Context (Multimedia)‏ 02 / 06 / 2009 Instructor: Michael Eckmann.

Slides:



Advertisements
Similar presentations
Introduction to Computing CS A109. Course Objectives Goal is to teach computation in terms relevant to non-CS majors Students will be able to read, understand,
Advertisements

CS1315: Introduction to Media Computation Making sense of functions.
CS 102 Computers In Context (Multimedia)‏ 04 / 13 / 2009 Instructor: Michael Eckmann.
A Media Computation Cookbook Manipulating Images and Sounds for Use in Alice Part 1: Image Manipulations Part 2: Advanced Image Manipulations, e.g., changing.
CS2984: Introduction to Media Computation Drawing directly on images.
CS 376 Introduction to Computer Graphics 01 / 29 / 2007 Instructor: Michael Eckmann.
Python: Modifying Pictures Using Loops. Review JES command area – program area Defining/using functions specifying a sequence of steps for what the function.
TOPIC 5 INTRODUCTION TO PICTURES 1 1 Notes adapted from Introduction to Computing and Programming with Java: A Multimedia Approach by M. Guzdial and B.
CS 206 Introduction to Computer Science II 03 / 02 / 2009 Instructor: Michael Eckmann.
CS 102 Computers In Context (Multimedia)‏ 03 / 20 / 2009 Instructor: Michael Eckmann.
CS 102 Computers In Context (Multimedia)‏ 04 / 08 / 2009 Instructor: Michael Eckmann.
CS 102 Computers In Context (Multimedia)‏ 02 / 18 / 2009 Instructor: Michael Eckmann.
CS 330 Programming Languages 10 / 14 / 2008 Instructor: Michael Eckmann.
CS 102 Computers In Context (Multimedia)‏ 04 / 20 / 2009 Instructor: Michael Eckmann.
CS 106 Introduction to Computer Science I 11 / 09 / 2007 Instructor: Michael Eckmann.
CS 325 Introduction to Computer Graphics 04 / 09 / 2010 Instructor: Michael Eckmann.
CS 102 Computers In Context (Multimedia)‏ 04 / 01 / 2009 Instructor: Michael Eckmann.
CS 330 Programming Languages 10 / 11 / 2007 Instructor: Michael Eckmann.
CS 106 Introduction to Computer Science I 01 / 29 / 2008 Instructor: Michael Eckmann.
CS 102 Computers In Context (Multimedia)‏ 02 / 02 / 2009 Instructor: Michael Eckmann.
CS 106 Introduction to Computer Science I 03 / 26 / 2008 Instructor: Michael Eckmann.
CS 106 Introduction to Computer Science I 02 / 27 / 2008 Instructor: Michael Eckmann.
CS 106 Introduction to Computer Science I 02 / 28 / 2007 Instructor: Michael Eckmann.
CS 106 Introduction to Computer Science I 03 / 28 / 2008 Instructor: Michael Eckmann.
CS 106 Introduction to Computer Science I 03 / 07 / 2008 Instructor: Michael Eckmann.
James Tam Programming: Part II In this section of notes you will learn about more advanced programming concepts such as looping, functions.
CS 106 Introduction to Computer Science I 03 / 03 / 2008 Instructor: Michael Eckmann.
CS 106 Introduction to Computer Science I 04 / 09 / 2008 Instructor: Michael Eckmann.
CS 106 Introduction to Computer Science I 03 / 19 / 2008 Instructor: Michael Eckmann.
CS 102 Computers In Context (Multimedia)‏ 03 / 25 / 2009 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 04 / 15 / 2008 Instructor: Michael Eckmann.
CS 102 Computers In Context (Multimedia)‏ 02 / 25 / 2009 Instructor: Michael Eckmann.
CS 106 Introduction to Computer Science I 10 / 15 / 2007 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 09 / 19 / 2008 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 02 / 25 / 2009 Instructor: Michael Eckmann.
CS 106 Introduction to Computer Science I 03 / 17 / 2008 Instructor: Michael Eckmann.
CS 106 Introduction to Computer Science I 04 / 07 / 2010 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 04 / 02 / 2008 Instructor: Michael Eckmann.
CS 102 Computers In Context (Multimedia)‏ 01 / 28 / 2009 Instructor: Michael Eckmann.
CS1315: Introduction to Media Computation Picture encoding and manipulation.
CS1315: Introduction to Media Computation Picture encoding and manipulation.
Download JES Tool JES: Jython Environment for Students
CS 102 Computers In Context (Multimedia)‏ 01 / 23 / 2009 Instructor: Michael Eckmann.
CS 106 Introduction to Computer Science I 04 / 20 / 2007 Instructor: Michael Eckmann.
Jeopardy Heading1Heading2Heading3Heading4 Heading5 Q $100 Q $200 Q $300 Q $400 Q $500 Q $100 Q $200 Q $300 Q $400 Q $500 Final Jeopardy.
CS 330 Programming Languages 10 / 07 / 2008 Instructor: Michael Eckmann.
CS 102 Computers In Context (Multimedia)‏ 01 / 26 / 2009 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 03 / 21 / 2008 Instructor: Michael Eckmann.
CS1315: Introduction to Media Computation Picture encoding and manipulation.
CS 325 Introduction to Computer Graphics 02 / 26 / 2010 Instructor: Michael Eckmann.
CS 102 Computers In Context (Multimedia)‏ 03 / 30 / 2009 Instructor: Michael Eckmann.
CS 102 Computers In Context (Multimedia)‏ 02 / 09 / 2009 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 02 / 11 / 2008 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 03 / 18 / 2008 Instructor: Michael Eckmann.
Python Programming in Context Chapter 6. Objectives To understand pixel based image processing To use nested iteration To use and understand tuples To.
CS 325 Introduction to Computer Graphics 04 / 12 / 2010 Instructor: Michael Eckmann.
CS 106 Introduction to Computer Science I 03 / 02 / 2007 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 02 / 15 / 2008 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 03 / 17 / 2008 Instructor: Michael Eckmann.
CS 106 Introduction to Computer Science I 03 / 22 / 2010 Instructor: Michael Eckmann.
CS 102 Computers In Context (Multimedia)‏ 04 / 27 / 2009 Instructor: Michael Eckmann.
CS 325 Introduction to Computer Graphics 03 / 10 / 2010 Instructor: Michael Eckmann.
I MAGE P ROCESSING IN CS1 Brad Miller David Ranum Luther College.
Test 2 on Wed, 11/9 On image processing
Python/JES JES IDE (Integrated Development Environment)
Download JES Tool JES: Jython Environment for Students
Test 2 on Wed, 11/9 On image processing
Agenda – 1/31/18 Questions? Group practice problems
Python Practice !!!.
CS 177 Week 3 Recitation Slides
Presentation transcript:

CS 102 Computers In Context (Multimedia)‏ 02 / 06 / 2009 Instructor: Michael Eckmann

Michael Eckmann - Skidmore College - CS Spring 2009 Today’s Topics Questions/comments? Let's read over the hw I assigned Review of reading pages All the JES image functions covered in those pages Write a few more functions

Michael Eckmann - Skidmore College - CS Spring 2009 Calling functions What do we need to know to be able to call a function that already exists correctly?

Michael Eckmann - Skidmore College - CS Spring 2009 Some JES image functions makePicture getWidth, getHeight getPixel getPixels getX, getY getRed, getBlue, getGreen setRed, setBlue, setGreen distance getColor, setColor, makeColor pickAColor makeLighter, makeDarker writePictureTo show

Michael Eckmann - Skidmore College - CS Spring 2009 Try these Let's look at my solution to this: greetWrite a function named greet that takes in someone's name and displays a greeting to that person. For example if I call greet like this: greet('Mike')‏ –It should display Hello, Mike, nice to see you.

Michael Eckmann - Skidmore College - CS Spring 2009 Try these displayWrite a function named display that displays an image, given a file name as a parameter. display('boat.jpg')‏ –It should display the image boat.jpg noRedWrite a function named noRed that alters an image so that it has 0 for the red channel of each pixel. It should take in a picture object as a parameter and alter that picture. pic = makePicture('boat.jpg')‏ noRed(pic)‏ show(pic) # display the boat image after noRed set all reds to 0

Michael Eckmann - Skidmore College - CS Spring 2009 docstrings Docstrings are special comments describing the function, module, class or method being defined. Example: def factorial(num): """ factorial computes the factorial of the number num. num! = num * (num-1) * (num-2) *... * 1 returns an integer, the factorial of num """ fact = 1 while (num > 1): fact = fact * num num -= 1 return fact