ITEC 109 Multimedia Lecture Lecture 23. Photo manipulation Review Lists / Arrays.

Slides:



Advertisements
Similar presentations
Detecting and Mixing Colors STEM DIGITAL Institute Rob Snyder.
Advertisements

Photography and CS Philip Chan. Film vs Digital Camera What is the difference?
A Digital Imaging Primer Nick Dvoracek Instructional Resources Center University of Wisconsin Oshkosh.
TEMPLATE TIPS This Section Does Not Print! This template requires Microsoft PowerPoint 2007 (or newer) and assumes a basic knowledge of the software. Below.
CGA 115 Professor Mary A. Malinconico. Questions from Last Week ????????
Digital Imaging and Image Analysis
DIGITAL IMAGE PROCESSING CMSC 150: Lecture 14. Conventional Cameras  Entirely chemical and mechanical processes  Film: records a chemical record of.
RGB color model Skills: none IT concepts: combining red, green and blue light to generate colors This work is licensed under a Creative Commons Attribution-Noncommercial-
First Bytes - LabVIEW. Today’s Session Introduction to LabVIEW Colors and computers Lab to create a color picker Lab to manipulate an image Visual ProgrammingImage.
2.01 Understand Digital Raster Graphics
CS 1 with Robots Image Manipulation Institute for Personal Robots in Education (IPRE)‏
Digital Colour Theory. What is colour theory? It is the theory behind colour mixing and colour combination.
Digital Images The digital representation of visual information.
Computer Systems Nat 4.5 Computing Science Data Representation Lesson 4: Storing Graphics EXTENSION.
TOPIC 4 INTRODUCTION TO MEDIA COMPUTATION: DIGITAL PICTURES Notes adapted from Introduction to Computing and Programming with Java: A Multimedia Approach.
Image Processing & Perception Sec 9-11 Web Design.
Objective Understand concepts used to create digital graphics. Course Weight : 15% Part Three : Concepts of Digital Graphics.
CS 101: Introduction to Computing Programming picture manipulations Developed by Mark Guzdial, Georgia Institute of Technology, 2003–2004; modified by.
COSC 1P02 Intro. to Computer Science 6.1 Cosc 1P02 Week 6 Lecture slides "To succeed, jump as quickly at opportunities as you do at conclusions." --Benjamin.
Images Data Representation. Objectives  Understand the terms bitmap & pixel  Understand how bitmap images are stored using binary in a computer system.
Replacing colors using if We don’t have to do one-to-one changes or replacements of color We can use if to decide if we want to make a change.  We could.
Do Now: Do Not Log In. Take out your notebook and a pen. Good morning! Do Now: Do Not Log In. Take out your notebook and a pen. Good morning! Aim: Review.
Design Visualization and Character Development Artistic Rendering Using Illustration Software.
Adobe Photoshop CS4 - Illustrated
Image Representation. Digital Cameras Scanned Film & Photographs Digitized TV Signals Computer Graphics Radar & Sonar Medical Imaging Devices (X-Ray,
Do Now: Do Not Log In. Take out your notebook and a pen. Good morning! Do Now: Do Not Log In. Take out your notebook and a pen. Good morning! Aim: Review.
CSC1401. Learning Goals Understand at a conceptual level What is media computation? How does color vision work? How can you make colors with red, green,
CS1315: Introduction to Media Computation Picture encoding and manipulation.
TOPIC 6 MODIFYING PICTURES USING LOOPS 1 Notes adapted from Introduction to Computing and Programming with Java: A Multimedia Approach by M. Guzdial and.
CS 101: Introduction to Computing Color replacements and targeted color replacement (if statement) Developed by Mark Guzdial, Georgia Institute of Technology,
ManipulatingPictures-Mod6-part61 Manipulating Pictures, Arrays, and Loops: Eliminating color, Inversion, grey scale and adjusting for luminance Barb Ericson.
Chapter 5: Advanced Picture Techniques (partial deck)
Computer Systems Nat 4.5 Computing Science Data Representation Lesson 4: Representing and Storing Graphics EXTENSION.
Photoshop Opening and Transforming. Opening There are a couple of ways to open a document in Photoshop 1. Click on ‘File’ and select ‘New’ - Here we can.
ITEC 109 Lecture 24 Advanced Effects. Advanced effects Review Basic effects –Loading / Displaying –Solid color pictures –Black/White –Sepia.
CS1315: Introduction to Media Computation Color replacements and targeted color replacement (IF)
Color Web Design Professor Frank. Color Displays Based on cathode ray tubes (CRTs) or back- lighted flat-screen Monitors transmit light - displays use.
Conditionals-Mod8-part41 Conditionals – part 4 Replace background Barb Ericson Georgia Institute of Technology May 2007.
Compsci 101.2, Fall Plan for October l Review Catchup and Midterm and Future  Make sure everyone understand options l Review Assignment.
What color does this represent? Each of these dots represents a PIXEL … a dot of color on a screen.
Announcements After lecture, adjourn to the observatory to start set-up for Dark Sky Observing night Forecast for Thursday doesn’t look good (60% chance.
A Media Computation Cookbook Manipulating Images and Sounds for Use in Alice Part 1: Image Manipulations Part 2: Changing colors in an area Part 3: Chromakey.
A Media Computation Cookbook Manipulating Images and Sounds for Use in Alice Part 1: Image Manipulations Part 2: Advanced Image Manipulations, e.g., changing.
Text on a CCR Matrix using the SuperStar Sequence Editor Brian Bruderer.
PART TWO Electronic Color & RGB values 1. Electronic Color Computer Monitors: Use light in 3 colors to create images on the screen Monitors use RED, GREEN,
TOPIC 4 INTRODUCTION TO MEDIA COMPUTATION: DIGITAL PICTURES Notes adapted from Introduction to Computing and Programming with Java: A Multimedia Approach.
ManipulatingPictures-part31 Manipulating Pictures, Arrays, and Loops part 3 Barb Ericson Georgia Institute of Technology Nov 2009.
Representing Sound and Image. Representing images One mean of representing an image it to interpret the image as a collection of dots, each is called.
1 Sections 5.1 – 5.2 Digital Image Processing Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
ITEC2110, Digital Media Chapter 2 Fundamentals of Digital Imaging 1 GGC -- ITEC Digital Media.
UNITS OF MEASUREMENT 2.01 Understand Digital Raster Graphics.
Images Data Representation.
Data Representation Images.
Binary Notation and Intro to Computer Graphics
Detecting and Mixing Colors STEM DIGITAL Institute
What is RGB?.
Image Processing CS177.
Image Processing & Perception
Shane Bric and Kevin Paprocki
Lab 9 Intro to Robots.
CS320n –Visual Programming
A Media Computation Cookbook
Colors Computers build colors from Red, Green, and Blue; not Red, Blue, and Yellow. RGB = Red Green Blue Creating Colors Red + Blue = Purple No Red, No.
Manipulating Pictures, Arrays, and Loops
What Color is it?.
Manipulating Pictures, Arrays, and Loops part 6
CS 177 Week 3 Recitation Slides
CS1315: Introduction to Media Computation
Non-numeric Data Representation
Manipulating Pictures, Arrays, and Loops part 6
Presentation transcript:

ITEC 109 Multimedia Lecture Lecture 23

Photo manipulation Review Lists / Arrays

Photo manipulation Objectives Learned basics of programming languages –What can you do with them? –Is programming really about writing functions? Learn how to do image manipulation

Photo manipulation Source

Photo manipulation Backgroun d

Photo manipulation Get in the game

Photo manipulation Tools Resolution: 1024x768 Pixels: Red Green Blue Range: (Intensity of color at position) Pictures are pixels are stored in a list: [ P0, P1, P2, P3, P4…P786432] Load a picture from disk: file = "/Users/Andrew/greenScreen/test3.jpg" picture = makePicture(file) Get list of pixels: list = getPixels(picture) Show picture to user: explore(picture)

Photo manipulation Using Pixels Go through each pixel in a list Print out red value, set to 0 (no red) Print x,y position in original picture file = "/Users/Andrew/greenScreen/test3.jpg" picture = makePicture(file) for pixel in getPixels(picture): printNow(pixel.getRed()) pixel.setRed(0) #Also works for Blue and Green

Photo manipulation Back to X,Y Deal with X,Y coords of original picture file = "/Users/Andrew/greenScreen/test3.jpg" picture = makePicture(file) list = getPixels(picture) for pixel in list: printNow(“X,Y=“ + str(getX(pixel))+str(getY(pixel))) #Get the color (r,g,b) for pixel at 0,0 Pix = getPixel(picture,0,0) color = getColor(Pix) #Make pixel at 0,1 identical to 0,0 list[1].setColor(color)

Photo manipulation Process Find a green pixel, replace with pixel from other picture

Photo manipulation Experimentation Use the explore method to see what the r,g,b values of parts of the picture are Clicking on x,y positions Start thinking of ranges to use

Photo manipulation Only green Green > 220 Find a green pixel, set it to black (0,0,0) Useful for seeing how good it is

Photo manipulation Lower intensity Green > 170

Photo manipulation Experimentatio n Play around with more than just green May lead to unintended results

Photo manipulation Recipe 2 checks –High green intensity (green > 220) –Medium green and low blue (G > 150 and B<90) Get X,Y position of pixel Set color in target picture with X,Y position of background picture Pictures must be same size !

Photo manipulation Other effects Black and white –Sets r,g,b all the same (white to black intensity) –Average r,g,b together and update their values for pixel in getPixels(picture): r = pixel.getRed() b = pixel.getBlue() g = pixel.getGreen() w = (r+g+b)/3 pixel.setRed(w) pixel.setBlue(w) pixel.setGreen(w) explore (picture) We see green because there is more green than red or blue in the spectrum Black and white makes the spectrum into intensity

Photo manipulation Result Black and white Sepia

Photo manipulation Sepia algorithm Simply go through and modify each pixel to be a proportion of the other values –Red is 39% of original red + 77% of green + 19% of blue value outputRed = (r *.393) + (g *.769) + (b *.189) outputGreen = (r *.349) + (g *.686) + (b *.168) outputBlue = (r *.272) + (g *.534) + (b *.131)

Photo manipulation Other effects Negative: 255 – r 255 – g 255 – b Black and white Make negative if intensity is <128 Sunset: Lower green and red by 30%

Photo manipulation Summary Working with images isn’t hard! Basic skills can be applied to diverse areas Next week –Green screen yourself –Image manipulation program