Multimedia Summer Camp

Slides:



Advertisements
Similar presentations
Pixels and Digital Images Yrd. Doc. Dr. Ahmet Sayar Kocaeli Universitesi Bilgisayar Muhendisligi Ileri Bilgisayar Grafikleri.
Advertisements

Color & Light, Digitalization, Storage. Vision Rods work at low light levels and do not see color –That is, their response depends only on how many photons,
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.
Bit Depth and Spatial Resolution SIMG-201 Survey of Imaging Science © 2002 CIS/RIT.
Capturing and optimising digital images for research Gilles Couzin.
Bits are Not just for Numbers or Characters Computers store characters as bits or binary digits. Characters from the English-language keyboard can be represented.
Bits are Not just for Numbers Computers store characters as bits or binary digits. Characters from the English-language keyboard are represented in ASCII.
CSC Computing with Images1 Image encodings CSC 1040.
CSc 461/561 CSc 461/561 Multimedia Systems Part A: 2. Image.
Bitmapped Images 27 th November 2014 With Mrs
1 Internet Graphics. 2 Representing Images  Raster Image: Images consist of “dots” of color, not lines  Pixel: Picture element-tiny rectangle  Resolution:
Data starts with width and height of image Then an array of pixel values (colors) The number of elements in this array is width times height Colors can.
Color Systems. Subtractive Color The removal of light waves to perceive color: –Local or physical attributes of pigments, dyes, or inks reflect certain.
Colour Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman
Digital Images The digital representation of visual information.
Color Names All standards-compliant browsers should handle these color names These color names can be used with the CSS properties of color and background-color.
Computing with Digital Media: A Study of Humans and Technology Mark Guzdial, School of Interactive Computing.
Lab #5-6 Follow-Up: More Python; Images Images ● A signal (e.g. sound, temperature infrared sensor reading) is a single (one- dimensional) quantity that.
TOPIC 4 INTRODUCTION TO MEDIA COMPUTATION: DIGITAL PICTURES Notes adapted from Introduction to Computing and Programming with Java: A Multimedia Approach.
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.
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 14 Introduction to Computer Graphics.
CS1315: Introduction to Media Computation Picture encoding and manipulation.
CS1315: Introduction to Media Computation Picture encoding and manipulation.
Images Data Representation. Objectives  Understand the terms bitmap & pixel  Understand how bitmap images are stored using binary in a computer system.
© 1999 Rochester Institute of Technology Introduction to Digital Imaging.
Digital Cameras, Digital Video and Scanners Vince DiNoto
Pictures Looping through pixels.. Lab Review (1) Objects  Instantiated from Class  Turtle myTut = new Turtle(myWorld);  new operator creates an instance.
Color on Computers. Bits and Bytes Bit: a single piece of yes/no or 0/1 data Two bits can code 4 items (00, 01, 10, 11) Three bits = 8 (000, 001, 010,
CSC Computing with Images
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
CS1315: Introduction to Media Computation Picture encoding and manipulation.
Lecture 7: Intro to Computer Graphics. Remember…… DIGITAL - Digital means discrete. DIGITAL - Digital means discrete. Digital representation is comprised.
Introduction to Computing and Programming in Python: A Multimedia Approach Chapter 3: Modifying Pictures using Loops.
Color Web Design Professor Frank. Color Displays Based on cathode ray tubes (CRTs) or back- lighted flat-screen Monitors transmit light - displays use.
Data Representation. What is data? Data is information that has been translated into a form that is more convenient to process As information take different.
Graphics in a computers memory How a picture (i.e. a graphic) is stored in a computers memory A computer screen is made up of little dots, called PICture.
TOPIC 4 INTRODUCTION TO MEDIA COMPUTATION: DIGITAL PICTURES Notes adapted from Introduction to Computing and Programming with Java: A Multimedia Approach.
Python: Working with pixels. Reminder: Conditionals if age < 18: showInformation(“Sorry, not allowed to vote yet.”) else: showInformation(“Please select.
More Digital Representation Discrete information is represented in binary (PandA), and “continuous” information is made discrete.
1 of 32 Computer Graphics Color. 2 of 32 Basics Of Color elements of color:
Multimedia and weBLOGging Grade 7-9 | Cahaya Bangsa Classical School (C) 2010 Digital Media Production Facility 03 - Still Picture 01 – Basics.
Unit 2.6 Data Representation Lesson 3 ‒ Images
Unit 1 The History of Photography & The Camera
Images Data Representation.
Data Representation Images.
Image Processing Objectives To understand pixel based image processing
Binary Notation and Intro to Computer Graphics
Image Manipulation Institute for Personal Robots in Education (IPRE)‏
How to Convert Pictures into Numbers
Image Processing & Perception
LET’S LEARN ABOUT GRAPHICS!
Images Presentation Name Course Name Unit # – Lesson #.# – Lesson Name
Representing Images 2.6 – Data Representation.
What do these words mean to you?
Ch2: Data Representation
Looping through pixels.
Introduction to Media Computation
A Media Computation Cookbook
Image Manipulation Institute for Personal Robots in Education (IPRE)‏
Images Presentation Name Course Name Unit # – Lesson #.# – Lesson Name
Manipulating Pictures, Arrays, and Loops
Image Manipulation Institute for Personal Robots in Education (IPRE)‏
Manipulating Pictures, Arrays, and Loops part 6
Digital Image Processing
CS 177 Week 3 Recitation Slides
CSIS110 - Introduction to Computer Science
Visuals are analog signals...
Manipulating Pictures, Arrays, and Loops part 6
CSIS110 - Introduction to Computer Science
Presentation transcript:

Multimedia Summer Camp Picture Encoding

Picture Encoding Theory Practice Digitizing pictures into grids of pixels Representing colors as number Practice Manipulating pictures in JES

Digitizing pictures into dots We digitize pictures into many tiny dots Enough dots and it looks continuous to the eye Our eyes has limited resolution Our background/depth aculty is particularly low Each picture element is a pixel

Digitized picture A digitized picture is a matrix of pixels it has two dimensions: Width and Height

Referencing a Matrix

We perceive light different from how it actually is Color is continuous Visible light is wavelengths between 370 and 730 nm But we perceive light with color sensors that peak around 425 nm (blue), 550 nm (green), and 560 nm (red). Our brain figures out which color is which by figuring out how much of each kind of sensor is responding Dogs and other simpler animals have only two kinds of sensors They do see color. Just less color.

Luminance vs. Color We perceive borders of things, motion, depth via luminance Luminance is not the amount of light, but our perception of the amount of light. We see blue as “darker” than red, even if same amount of light. Much of our luminance perception is based on comparison to backgrounds, not raw values. Luminance perception is color blind. Different parts of the brain perceive color and luminance.

RGB: Three dimensions of color In RGB, each color has three component colors: Amount of red Amount of green Amount of blue Each does appear as a separate dot on most devices, but our eye blends them.

Why would the maximum intensity be 255? Let’s walk through it. If we have one bit, we can represent two patterns: 0 and 1. If we have two bits, we can represent four patterns: 00, 01, 10, and 11. If we have three bits, we can represent eight patterns: 000, 001, 010, 011, 100, 101, 110, 111 The rule: In n bits, we can have 2n patterns In 8 bits, we can have 28 patterns, or 256 If we make one pattern 0, then the highest value we can represent is 28-1, or 255 In the simplest schemes for digitizing black and white pictures, a single byte (8 bits) of computer memory is used for each pixel So that’s why intensities range from 0…255. But what about color pictures?…

Encoding RGB Each component color (red, green, and blue) is encoded as a single byte Because pixel has a combination of three colors, we need three bytes to store its color I.e. a complete RGB color is 24 bits, 8 bits of each, Which means we can represent about 16 million distinct colors in RGB! Colors go from (0, 0, 0) to (255, 255, 255) If all three components are the same, the color is in grayscale (50, 50, 50) at (2, 2) (0, 0, 0) (at position (1, 2) in example) is black (255, 255, 255) is white

Is 256x256x256 enough colors? We’re representing color in 24 (3 * 8) bits. That’s 16,777,216 (224) possible colors Our eye can discern millions of colors, so it is pretty close But the real limitation is the physical devices: We don’t get 16 million colors out of a monitor Some graphics systems support 32 bits per pixel, not 24 May be more pixels for color More useful is to use the additional 8 bits to represent not color but 256 levels of translucence Media jargon: 4th byte per pixel is the “Alpha channel”

Picture Functions getWidth(picture) getHeight(picture) Takes a picture as input and returns its width in the number of pixels left-to-right in the picture. getHeight(picture) Takes a picture as input and returns its height in the number of pixels top-to-bottom in the picture.

Picture Functions getPixel(picture, xpos, ypos) getX(pixel) Takes a picture, an x position and a y position (two numbers), and returns the Pixel object at that point in the picture. getX(pixel) Takes in a pixel object and returns the x position of where that pixel is in the picture. getY(pixel) Takes in a pixel object and returns the y position of where that pixel is in the picture.

Picture Functions getColor(pixel) getRed(pixel) getGreen(pixel) Takes a Pixel and returns the Color object at that pixel. getRed(pixel) Takes a Pixel object and returns the value (between 0 and 255) of the amount of redness in that pixel. getGreen(pixel) Takes a Pixel object and returns the value (between 0 and 255) of the amount of greenness in that pixel. getBlue(pixel) Takes a Pixel object and returns the value (between 0 and 255) of the amount of blueness in that pixel.

Picture Functions setColor(pixel, color) setRed(pixel, redValue) Takes in a pixel and a color, and sets the pixel to the provided color. setRed(pixel, redValue) Takes in a Pixel object and a value (between 0 and 254) and sets the redness of that pixel to the given value. setGreen(pixel, greenValue) Takes in a Pixel object and a value (between 0 and 254) and sets the greenness of that pixel to the given value. setGreen(pixel, blueValue) Takes in a Pixel object and a value (between 0 and 254) and sets the blueness of that pixel to the given value.

Picture Functions makeColor(red, green, blue) makeDarker(color) Takes three inputs: For the red, green, and blue components (in order), then returns a color object. makeDarker(color) Takes a color and returns a slightly darker version of the original color. makeLighter(color) Takes a color and returns a slightly lighter version of the original color.

Picture Functions makeColor(red, green, blue) makeDarker(color) Takes three inputs: For the red, green, and blue components (in order), then returns a color object. makeDarker(color) Takes a color and returns a slightly darker version of the original color. makeLighter(color) Takes a color and returns a slightly lighter version of the original color.