Color Values All colors in computer images are a combination of red, green and blue Each component is encoded as a number 0..255 0 means the color is.

Slides:



Advertisements
Similar presentations
Python: Modifying Pictures Using Loops. Review JES command area – program area Defining/using functions specifying a sequence of steps for what the function.
Advertisements

My Penguin Math Book By:. I see How many penguins do you see? Count them & type the number in the box penguins.
The Binary Numbering Systems
Bits are Not just for Numbers Computers store characters as bits or binary digits. Characters from the English-language keyboard are represented in ASCII.
Connecting with Computer Science, 2e
Eleven colors and rasters. Color objects Meta represents colors with color objects You can create a color by saying: [color r g b] r: amount of red (0-255)
Fundamentals of Python: From First Programs Through Data Structures
Four simple expressions in meta. Data objects Pieces of data in a computer are called objects Today, we’ll talk about four kinds of objects Numbers Pictures.
CSE 113 Week 5 February , Announcements  Module 2 due 2/15  Exam 3 is on 2/15  Module 3 due 2/22  Exam 4 is on 2/25  Module 4 due 2/29.
March 2006Taner Erig - EMU2-1 Metamorphosis of Information How is information represented and how do computers store information?
Eleven colors and rasters. Color objects Meta represents colors with color objects You can create a color by saying: [color r g b] r: amount of red (0-255)
Images: Pixels and Resolution Monica A. Stoica, Boston University Books used: “The Essential Guide to Computing” by E. Garrison Walters.
Painting shades and tints A monochromatic color scheme Ms. Blaylock.
Bitmapped Images 27 th November 2014 With Mrs
01/31/02 (C) 2002, UNiversity of Wisconsin, CS 559 Last Time Color and Color Spaces.
Why HTML. View Code This is my home page. My name is Ali. I’m studying Educational Technology. Save as Text.
Georgia Institute of Technology Introduction to Media Computation Barb Ericson Georgia Institute of Technology May 2006.
Color. -Visual light -An integral part of the sculpture -Creates desired effect -Distinguish items -Strengthen interest.
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.
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.
Nov 061 Size Control How is a component’s size determined during layout and during resize operations? Three factors determine component sizes: The component’s.
Number Systems CIT Network Math
Image Representation. Objectives  Bitmaps: resolution, colour depth and simple bitmap file calculations.  Vector graphics: drawing list – objects and.
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 Science 112 Fundamentals of Programming II Graphics Programming.
Color and Resolution Introduction to Digital Imaging.
Pictures Looping through pixels.. Lab Review (1) Objects  Instantiated from Class  Turtle myTut = new Turtle(myWorld);  new operator creates an instance.
Lecture 15: Intro to Graphics Yoni Fridman 7/25/01 7/25/01.
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,
Ch1: Introduction Prepared by: Tahani Khatib AOU
Introduction to Image processing using processing.
Lecture 7: Intro to Computer Graphics. Remember…… DIGITAL - Digital means discrete. DIGITAL - Digital means discrete. Digital representation is comprised.
Paint Application in Java Clark Jayson Cacal Aveline Germar Jose Sison Christopher Valera.
Digital Imaging Fundamentals Ms. Hema C.R. School of Mechatronic Engineering.
Why a bitmap (.bmp), not a.jpg? If you cannot save a.bmp, make it an uncompressed.tif. Compression (of this 8-bit 397,000 pixel image): none (397kb memory)medium.
CSC 1051 – Data Structures and Algorithms I Dr. Mary-Angela Papalaskari Department of Computing Sciences Villanova University Course website:
 By Bob “The Bird” Fiske & Anita “The Snail” Cost.
Lawrence Snyder University of Washington, Seattle © Lawrence Snyder 2004 Drawing pictures … It’s not art, it’s fun.
Why HTML. This is my home page. My name is Ali. I’m studying Technology Education.
Data Representation. How is data stored on a computer? Registers, main memory, etc. consists of grids of transistors Transistors are in one of two states,
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,
My Penguin Math Book By:. I see How many penguins do you see? Count them and type the number in the box penguins.
More Digital Representation Discrete information is represented in binary (PandA), and “continuous” information is made discrete.
Information in Computers. Remember Computers Execute algorithms Need to be told what to do And to whom to do it.
What do you think this lesson is all about? Write your answer on a sticky note.
Why HTML. This is my home page. My name is Ali. I’m studying Technology Education.
AP CSP: Pixelation – B&W/Color Images
Image Processing Objectives To understand pixel based image processing
Stays the same Spacing increases Spacing decreases
Image Processing CS177.
Image Processing & Perception
Digital Data Format and Storage
Chapter I Digital Imaging Fundamentals
Microprocessor and Assembly Language
Images Presentation Name Course Name Unit # – Lesson #.# – Lesson Name
CS320n –Visual Programming
Each column represents another power of the base
Representing Images 2.6 – Data Representation.
Looping through pixels.
Gray Scale picture def pixBW(pixel): # given a pixel, change to BW
Images Presentation Name Course Name Unit # – Lesson #.# – Lesson 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.
What Color is it?.
Digital Image Processing
Lawrence Snyder University of Washington, Seattle
Non-numeric Data Representation
Basic Processing … Drawing pictures … It’s not art, it’s fun
What do you see here???.
Presentation transcript:

Color Values All colors in computer images are a combination of red, green and blue Each component is encoded as a number 0..255 0 means the color is absent, 255 the color is maximum bright All other values are intensity shades of the color Example: R,G,B = 255,0,0 R,G,B = 0,0,255 R,G,B = 255,255,255 R,G,B = 255,255,0 R,G,B = 0,0,0

Pixels and Coordinates To make or change a picture, we need to assign values to the pixels We can enumerate the pixels using Cartesian coordinates (column, row): V = getPixel(c,r) would deliver the three components setPixel(c,r,V) would set the three components to V But what is V? 0,0 2,2 2,1 1,0 1,1 1,2 0,2 0,1 2,0

Pixel Values For now, we restrict to black and white, as it simplifies our data structures: setPixelToBlack(c,r) setPixelToWhite(c,r) setAllPixelsToWhite() isPixelWhite(c,r) isPixelBlack(c,r)

Making a B&W Picture Need to create the pixel rectangle: Canvas functions: makeWhiteImage(width,height) destroyImage() Pixel assignment functions setPixelToBlack(c,r) setPixelToWhite(c,r) setAllPixelsToWhite() isPixelWhite(c,r) isPixelBlack(c,r)

Example makeWhiteImage(4,3) setPixelToBlack(0,0) setPixelToBlack(0,2) setPixelToBlack(2,1) setPixelToWhite(0,0)

Turtle Metaphor Turtle moves across canvas, pixel by pixel, starts somewhere Where the turtle is, it leaves a black pixel Turtle can move N, S, E, W Tell the turtle: Where to start, here at position (1,4) Where to move Moves could be encoded as a string: “EESS”

Boundaries What should happen if the turtle wants to move East but is at the border? Could throw an error Could stay put Example: “EEE” If we stay put, then turtle ignores going off raster Then “EESS” is equivalent to “EEESS”

Turtle Algorithm Recall the “read book” algorithm… Turtle algorithm: Get width, height of image; create white image Get pos_x, pos_y of turtle Make pixel (pos_x, pos_y) black Get string S encoding turtle moves While there remain characters of S not yet processed: move turtle according to next character make new pixel black

Parallels Characters of S are like machine instruction The “machine” is the infrastructure of marking turtle squares black and keeping the turtle on the rectangle of pixels The instructions manipulating pixels are also machine instructions… But that machine has a lower level of abstraction CS is all about abstractions and conceptual machines