Introduction to Programming in MATLAB Intro. MATLAB Peer Instruction Lecture Slides by Dr. Cynthia Lee, UCSD is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.

Slides:



Advertisements
Similar presentations
Introducing DFA Formal Description Using Peer Instruction Cynthia Bailey Lee UCSD 2011 Theory of Computation Peer Instruction Lecture Slides by Dr. Cynthia.
Advertisements

Introduction to Programming in MATLAB Intro. MATLAB Peer Instruction Lecture Slides by Dr. Cynthia Lee, UCSD is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
Most-to-Least Legible Color Combinations for Viewing on Slide Shows Color and contrast are very important tools in communication. They can be used to enhance.
THE PUMPING LEMMA PROVING A LANGUAGE IS NOT REGULAR Dr. Cynthia Lee - UCSD - Spring 2011 Theory of Computation Peer Instruction Lecture Slides by Dr. Cynthia.
Introduction to Programming in MATLAB Intro. MATLAB Peer Instruction Lecture Slides by Dr. Cynthia Lee, UCSD is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
Green Screen. Objectives: 2. Understand what the difference is between a Luma key and a Chroma key. By the end of todays lesson students will: 3. Understand.
Boolean Algebra Lecture 7: Supporting Material Dr Kathryn Merrick Tuesday 24 th March, 2009.
IAT 800 Foundations of Computational Art and Design Lecture 2.
Computer Vision Introduction to Image formats, reading and writing images, and image environments Image filtering.
Introduction to Special Effects Blue Screen (Traveling Matte)
Using color and fonts in HTML and XHTML Please use speaker notes for additional information!
Theory of Computation 1 Theory of Computation Peer Instruction Lecture Slides by Dr. Cynthia Lee, UCSD are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
TERMS TO KNOW. Programming Language A vocabulary and set of grammatical rules for instructing a computer to perform specific tasks. Each language has.
3-D Movies, Stop Motion: Claymation, Blue Screen Lilibeth Cureño Rachel Marsh Anthony Torres.
Theory of Computation 1 Theory of Computation Peer Instruction Lecture Slides by Dr. Cynthia Lee, UCSD are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
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.
Shorter of two objects and changing color V2 Functions, events and setting the color in sequence and randomly This is a modification of the Changing Color.
Theory of Computation 1 Theory of Computation Peer Instruction Lecture Slides by Dr. Cynthia Lee, UCSD are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
Introduction to Programming in MATLAB Intro. MATLAB Peer Instruction Lecture Slides by Dr. Cynthia Lee, UCSD is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
Introduction to Programming in MATLAB Intro. MATLAB Peer Instruction Lecture Slides by Dr. Cynthia Lee, UCSD is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
Kids S1 Vocabulary U1 Colors. Listen and say the color:
CS112 Scientific Computation Department of Computer Science Wellesley College Numb3rs Number and image types.
Introduction to Programming in MATLAB Intro. MATLAB Peer Instruction Lecture Slides by Dr. Cynthia Lee, UCSD is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
Tutorial: Reduction from A TM Proofs Dr. Cynthia Lee CSE 105, UCSD Spring 2011 Theory of Computation Peer Instruction Lecture Slides by Dr. Cynthia Lee,
COMPOSITING USING BLUE AND GREEN SCREENS   Background filmed or.
Introduction to Programming in MATLAB Intro. MATLAB Peer Instruction Lecture Slides by Dr. Cynthia Lee, UCSD is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
Introduction to Programming in MATLAB Intro. MATLAB Peer Instruction Lecture Slides by Dr. Cynthia Lee, UCSD is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
Theory of Computation 1 Theory of Computation Peer Instruction Lecture Slides by Dr. Cynthia Lee, UCSD are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
Introduction to Computer Programming
Programming: Putting Together the Pieces Built-in Questions and Expressions Alice.
Class 2 Remote Instruction Review of Working with Buttons EDU 556 Programming for Instruction Dr. Steve Broskoske This is an audio PowerCast. Make sure.
Introduction to Programming in MATLAB Intro. MATLAB Peer Instruction Lecture Slides by Dr. Cynthia Lee, UCSD is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
COMPUTER GRAPHICS. Can refer to the number of pixels in a bitmapped image Can refer to the number of pixels in a bitmapped image The amount of space it.
Conditionals-Mod8-part41 Conditionals – part 4 Replace background Barb Ericson Georgia Institute of Technology May 2007.
UCSD Media Computation in Java CS1 for majors* (N >130, 2x a year) Increase retention ◦ Losing 32% by end of first year Increase recruitment (more students.
LCC 6310 Computation as an Expressive Medium Lecture 2.
 In computer programming, a loop is a sequence of instruction s that is continually repeated until a certain condition is reached.  PHP Loops :  In.
Ready, SET, go! By Melissa Dalis Professor Susan Rodger Duke University July 2011.
Unit 7 Review. A. Convex lens B. Convex mirror C. Concave lens D. Concave mirror E. Plane mirror.
Digital Cinema From Motion JPEG to Film projection A presentation by: Maxime Cassan Florent Rioult Neil Sinclair December 2008.
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.
CompSci 4 Chap 6 Sec 2 Sep 30, 2010 Prof. Susan Rodger “All your troubles are due to those ‘ifs’,” declared the Wizard. If you were not a Flutterbudget.
CS3241 C OMPUTER G RAPHICS Tutorial 8. Q UESTION #1 Given an object represented in polygons, how to find its bounding sphere?
Introduction to Programming in MATLAB
Image Processing & Perception
Georgia Institute of Technology
Introduction to Programming in MATLAB
Which of the transformations below results in a mirror image? Incorrect – dilations make the shapes larger or smaller dilation Incorrect – glide reflections.
Barb Ericson Georgia Institute of Technology August 2005
Because you know who said let there be light…
Color Values All colors in computer images are a combination of red, green and blue Each component is encoded as a number means the color is.
Georgia Institute of Technology
Applying the Color Schemes
What do these words mean to you?
Investigation 21. 3: Subtractive Color Process
Name: _______________________________
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.
Directions: On each slide you will find fish of different colors, sizes, and numbers. You will also find bubbles for grouping the fish. On some slides.
What Color is it?.
Chapter 6 Conditionals - part 4
Introduction to Programming in MATLAB
Introduction to Programming in MATLAB
Binary CSCE 101.
Non-numeric Data Representation
IAT 800 Foundations of Computational Art and Design
LCC 6310 Computation as an Expressive Medium
Java-Assignment #4 (Due, April. 9, 2004)
CSIS110 - Introduction to Computer Science
Presentation transcript:

Introduction to Programming in MATLAB Intro. MATLAB Peer Instruction Lecture Slides by Dr. Cynthia Lee, UCSD is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. Based on a work at Cynthia Lee, UCSDCreative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported Licensewww.peerinstruction4cs.org 1

RELATIONAL OPERATORS 2

Relational Operators 4 < 5true (1) 4 <= 5true (1) 4 == 5false (0) 4 ~= 5 4 > 5false (0) 4 >= 4 ‘A’ < ‘B’ 3 (a) true (1) (b) false (0) (c) other/error

Why would we want to test “<“ between a number and a matrix? >> im = imread(‘rainbow.jpg’); >> g = im(:,:,2); >> result = g > 200; What type of variable will result be after the assignment? What does this code do, conceptually? a)Increases the amount of green in the image b)Identifies pixels with high green value c)Removes green layer from the image d)None/more than one/MATLAB error 4

A new data type for variables! 5

LOGICAL OPERATORS 6

Why would we want to test “<“ between a number and a matrix? >> im = imread(‘rainbow.jpg’); >> result = im(:,:,1) > 200 & im(:,:,2) > 200 & im(:,:,3) > 200; First, take each part by itself and figure out what it does; then combine the parts. What does this code do, conceptually? a)Identifies pixels that have high red, or high blue, or high green value(s) b)Identifies pixels that are close to black c)Identifies pixels that are close to white d)Error 7

8

>> im = imread(‘rainbow.jpg’); >> result = im(:,:,1) > 200 & im(:,:,2) > 200 & im(:,:,3) > 200; a)Identifies pixels that have high red, or high blue, or high green value(s) b)Identifies pixels that are close to black 9 Can you write code for the other answer choices?

“Green screen” special effects Actors or other objects are filmed in front of a screen with a very specific shade of green Later, a computer program checks the color of each pixel of the movie – Pixels matching that specific shade of green are replaced with pixels from another image/movie – Pixels not matching that specific shade of green are left alone 10

“Green screen” special effects Actors can wear green and be invisible in the final movie – The two men on the left are moving a puppet – The man on the right, if he doesn’t put his green shirt back on, will appear to be a floating torso 11