I MAGE P ROCESSING IN CS1 Brad Miller David Ranum Luther College.

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

+ Introduction to Programming My first red-eye removal.
CS1315: Introduction to Media Computation Making sense of functions.
CS2984: Introduction to Media Computation Drawing directly on images.
Def f(n): if (n == 0): return else: print(“*”) return f(n-1) f(3)
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.
Computer Science 111 Fundamentals of Programming I More Digital Image Processing.
ManipulatingPictures-Mod6-part21 Manipulating Pictures, Arrays, and Loops part 2 Barb Ericson Georgia Institute of Technology.
CS 102 Computers In Context (Multimedia)‏ 02 / 06 / 2009 Instructor: Michael Eckmann.
CS 102 Computers In Context (Multimedia)‏ 02 / 18 / 2009 Instructor: Michael Eckmann.
Improved Image Quilting Jeremy Long David Mould. Introduction   Goal: improve “ minimum error boundary cut ”
Programming: Part II In this section of notes you will learn more advanced programming concepts such as branching and repetition as well as how to work.
James Tam Programming: Part II In this section of notes you will learn about more advanced programming concepts such as looping, functions.
CHAPTER 2 ANALYSIS OF ALGORITHMS Part 2. 2 Running time of Basic operations Basic operations do not depend on the size of input, their running time is.
CS 102 Computers In Context (Multimedia)‏ 02 / 25 / 2009 Instructor: Michael Eckmann.
Computer Science 111 Fundamentals of Programming I Introduction to Digital Image Processing.
Recursion. Sum a list of numbers Iterative def sum(L): total = 0 for i in L: total += i return total Recursive def sum(L): if len(L) == 0: return 0 else:
Computer Science 101 Introduction to Programming with Pictures.
+ Introduction to Programming My first red-eye removal.
IMAGE PROCESSING LIBRARY (PIL) This is a package that you can import into python and it has quite a few methods that you can process image files with.
CS 102 Computers In Context (Multimedia)‏ 01 / 28 / 2009 Instructor: Michael Eckmann.
How to use the Java class libraries Brief documentation of how to do this all with Java.
Introduction to Computer Science – Chapter 9 CSc 2010 Spring 2011 Marco Valero.
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
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.
CS1315: Introduction to Media Computation Picture encoding and manipulation.
Computer Science 111 Fundamentals of Programming I Introduction to Digital Image Processing.
CSE 219 Computer Science III Image Manipulation. HW 1 Has been posted on Blackboard Making a Game of Life with limited.
CS 102 Computers In Context (Multimedia)‏ 02 / 09 / 2009 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.
Loops ! We've seen variables change in-place before: [ x*6 for x in range(8) ] [ 0, 6, 12, 18, 24, 30, 36, 42 ] remember range ?
Machine Vision. Image Acquisition > Resolution Ability of a scanning system to distinguish between 2 closely separated points. > Contrast Ability to detect.
CSCI 931 III–1 Copyright © 2010 Thomas W. Doeppner. All rights reserved. CS 931: Dictionaries.
1 CS 177 Week 7 Recitation Slides Modifying Sounds using Loops + Discussion of some Exam Questions.
Int fact (int n) { If (n == 0) return 1; else return n * fact (n – 1); } 5 void main () { Int Sum; : Sum = fact (5); : } Factorial Program Using Recursion.
Course 3 Binary Image Binary Images have only two gray levels: “1” and “0”, i.e., black / white. —— save memory —— fast processing —— many features of.
Multidimensional Arrays Eric Roberts CS 106A February 17, 2016.
1 Sections 5.1 – 5.2 Digital Image Processing Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
Image from
Test 2 on Wed, 11/9 On image processing
Python/JES JES IDE (Integrated Development Environment)
Image Processing CS177.
Week 2.
Picture Functions ppp =makePicture(pickAFile())
Download JES Tool JES: Jython Environment for Students
EECS 110: Lec 10: Definite Loops and User Input
Test 2 on Wed, 11/9 On image processing
Fractions.
Agenda – 1/31/18 Questions? Group practice problems
Lecture 26: Lists of Lists
Multidimensional Arrays and Image Manipulation
Other displays Saving Arrays Using fors to process
Drawing the Mandelbrot Set
Circles! You are going to create an “image” with circle(s)
Ашық сабақ 7 сынып Файлдар мен қапшықтар Сабақтың тақырыбы:
Windows басқару элементтері
CS 177 Week 3 Recitation Slides
Creative Commons Attribution Non-Commercial Share Alike License
Nested Loops Circles inside Circles
Nested Loops Circles inside Circles
Қош келдіңіздер!.
The Image The pixels in the image The mask The resulting image 255 X
Mixed Numbers Equivalent Simplest Form Comparing
Информатика пән мұғалімі : Аитова Карима.
Lecture 23 – Practice Exercises 5
Python – May 25 Quiz Python’s imaging library Lab
Presentation transcript:

I MAGE P ROCESSING IN CS1 Brad Miller David Ranum Luther College

I MAGE P ROCESSING WITH C I MAGE Window Image File Image Empty Image List Image Pixel Does not require PIL Images getWidth, getHeight getPixel,setPixel Pixels getRed, setRed getGreen, setGreen getBlue, setBlue ClassesMethods

def blackWhite(pic): bwpic = EmptyImage(pic.getWidth(), pic.getHeight()) for row in range(pic.getHeight()): for col in range(pic.getWidth()): thepixel = pic.getPixel(col,row) r = thepixel.getRed() g = thepixel.getGreen() b = thepixel.getBlue() gray = (r + g + b)//3 if gray <= 127: p = Pixel(0,0,0) else: p = Pixel(255,255,255) bwpic.setPixel(col,row,p) return bwpic

E DGE D ETECTION Iteration Patterns Four levels of nesting Setting boundaries Edge Cases Sum of Products