CS 115: Computing for The Socio-Techno Web

Slides:



Advertisements
Similar presentations
Motivation Application driven -- VoD, Information on Demand (WWW), education, telemedicine, videoconference, videophone Storage capacity Large capacity.
Advertisements

Bit Depth and Spatial Resolution SIMG-201 Survey of Imaging Science © 2002 CIS/RIT.
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.
Connecting with Computer Science, 2e
Introduction to Multimedia Student Multimedia Design Center 06/06/06.
Digital Audio, Image and Video Hao Jiang Computer Science Department Sept. 6, 2007.
Representing Sound in a computer Analogue  Analogue sound is produced by being picked up by a transducer (microphone) and converted in an electrical current.
Representing Images. Goals for Image Representation digitization & resolution digitization & resolution representing color representing color color depth.
Digital Data Patrice Koehl Computer Science UC Davis.
CS110: Computers and the Internet Color and Image Representation.
Connecting with Computer Science 2 Objectives Learn why numbering systems are important to understand Refresh your knowledge of powers of numbers Learn.
Digital audio. In digital audio, the purpose of binary numbers is to express the values of samples that represent analog sound. (contrasted to MIDI binary.
(2.1) Fundamentals  Terms for magnitudes – logarithms and logarithmic graphs  Digital representations – Binary numbers – Text – Analog 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.
Chapter 2, Exploring the Digital Domain
Multimedia def. Many forms Multimedia Text Hyperlinks Images Audio Animation Video Text Hyperlinks Images Audio Animation Video.
Digital Media Dr. Jim Rowan ITEC Monday, August 27.
Digital Media Dr. Jim Rowan ITEC Monday, August 27.
Computer Some basic concepts. Binary number Why binary? Look at a decimal number: 3511 Look at a binary number: 1011 counting decimal binary
Announcements Chapter 11 for today No quiz this week Instructor got behind…. We'll be back in MGH389 on Friday.
Chapter 11 Fluency with Information Technology 4 th edition by Lawrence Snyder (slides by Deborah Woodall : 1.
Text, Images, Video and Sound CS 1 Introduction to Computers and Computer Technology Rick Graziani Spring 2015.
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 14 Introduction to Computer Graphics.
Data Representation CS280 – 09/13/05. Binary (from a Hacker’s dictionary) A base-2 numbering system with only two digits, 0 and 1, which is perfectly.
Signal Digitization Analog vs Digital Signals An Analog Signal A Digital Signal What type of signal do we encounter in nature?
© 1999 Rochester Institute of Technology Introduction to Digital Imaging.
Images The Science of Images What is an Image on the computer? The Psychology of Images What do we use images for? What effect color has on our mood and.
Agenda Last class: Memory, Digitizing Numbers Today: Digitizing: Text
File Sizes & Storage Requirements.  An image has a width in pixels and a height in pixels  Start by calculating the number of pixels all up  640 x.
CS 111 – Sept. 3 More data representation Review hex notation Text –ASCII and Unicode Sound and images Commitment: –For Wednesday: Please read pp
Sound in Multimedia Psychology of sound what do you use it for? what techniques for its communication exist? Science of sound why does it exist? how it.
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.
Chapter 1 Background 1. In this lecture, you will find answers to these questions Computers store and transmit information using digital data. What exactly.
Binary! Objectives How sound is stored in digital format What is meant by “sample interval” and how it affects quality The trade off between file size.
1 What is Multimedia? Multimedia can have a many definitions Multimedia means that computer information can be represented through media types: – Text.
Information in Computers. Remember Computers Execute algorithms Need to be told what to do And to whom to do it.
Software Design and Development Storing Data Part 2 Text, sound and video Computing Science.
DATA Unit 2 Topic 2. Different Types of Data ASCII code: ASCII - The American Standard Code for Information Interchange is a standard seven-bit code that.
Data Representation: Sound
ITEC2110, Digital Media Chapter 1 Background & Fundamentals
CS 115: Computing for The Socio-Techno Web
Image and Sound Representation
GCSE COMPUTER SCIENCE Topic 3 - Data 3.2 Data Representation.
Image Processing Objectives To understand pixel based image processing
Data Representation.
Everything is a number Everything in a computer memory and on storages is a number. Number  Number Characters  Number by ASCII code Sounds  Number.
4k… 4K format was named because it has 4000 pixels horizontal resolution approximately. Meanwhile, standard 1080p and 720p resolutions were named because.
Vocabulary byte - The technical term for 8 bits of data.
Binary Representation in Audio and Images
How to Convert Pictures into Numbers
"Digital Media Primer" Yue-Ling Wong, Copyright (c)2013 by Pearson Education, Inc. All rights reserved.
Binary 4 File Sizes.
Presenter Name: Mahmood A.Moneim Supervised By: Prof. Hesham A.Hefny
Multimedia Systems and Applications
Data Formats.
Vocabulary byte - The technical term for 8 bits of data.
Data Representation Keywords Sound
Multimedia Fundamentals(continued)
Representing Images 2.6 – Data Representation.
Ch2: Data Representation
Summer Term Year 10 Slides
Chapter 2 Data Representation.
Representing Sound 2.6 – Data Representation.
COMS 161 Introduction to Computing
ITEC2110, Digital Media Chapter 1 Background & Fundamentals
Visuals are analog signals...
WJEC GCSE Computer Science
"Digital Media Primer" Yue-Ling Wong, Copyright (c)2013 by Pearson Education, Inc. All rights reserved.
Presentation transcript:

CS 115: Computing for The Socio-Techno Web image source: http://www.igenii.com/blog/Social%20Media/social-media/ twitter.com http://www.worthofweb.com/blog/case-study-this-revolution-will-be-tweeted/ http://foxwoodonlinemarketing.typepad.com/my-blog/social-media/ CS 115: Computing for The Socio-Techno Web Representation of Data: Color, Images, Sound, and video

Today Decimal, Binary, Hexadecimal numbers (review) Text representation (review) Color representation Image representation Sound representation Video representation

Numbering system review 01112 = A) 910 B) 510 C) 710 D) I don’t know Apparently you need many more digits to represent a number in binary than in decimal … you can represent any number!

Numbering system review Positional notation systems: Base 10 (10 symbols - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9) 149210 = 1*1000 + 4*100 + 9*10 + 2*1 200910 = 2*1000 + 0*100 + 0*10 + 9*1 Base 2 (2 symbols - 0, 1): 10102 = 1*8 + 0*4 + 1*2 + 0*1 (= 1010) 01112 = 0*8 + 1*4 + 1*2 + 1*1 (= 710) Base 16 (16 symbols - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F): 3A16 = 3*16 + A*1 (= 5810) B216 = B*16 + 2*1 (= 17810) Apparently you need many more digits to represent a number in binary than in decimal … you can represent any number!

Numbering system review decimal 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 A B C D E F hexadecimal Converting decimal to hexadecimal: Left digit: divide by 16, convert quotient to 0..9,A..F Right digit: convert remainder to 0..9,A..F Converting hexadecimal to decimal: Convert left digit to 0..15, multiply by 16 Convert right digit to 0..15, add to (1) Let’s do the review: Example: A716  16710 A16 is 1010, 10*16 = 160 716 = 710  160+7 = 167 Example: 20110  C916 201/16 = 1210  C16 remainder is 910  916

Converting Binary to Hex Let's convert 111100102 to hex in two different ways: via decimal directly Which way is easier? Let’s do the review:

HUman senses Computers leverage our senses: vision, auditory This is essential for human-computer interaction. The input to these senses can be encoded in bits! Our sense have limitations: Vision: ~ 10 million colors Auditory: 20Hz to 20KHz Human eye can distinguish about 10 million colors

Color The human retina has three kinds of color-sensitive photoreceptors that were traditionally called red, green and blue cones Visible colors can be created by adding different amounts of the three primary colors, red, green and blue Color monitors display colors by adding different amounts of red, green and blue light RGB color components are usually defined on a scale from 0 to 255 Human eye can distinguish about 10 million colors

Color RGB color components are usually defined on a scale from 0 to 255 How many colors can be represented this way? 256 768 16,777,216 Human eye can distinguish about 10 million colors

Color RGB color components are usually defined on a scale from 0 to 255 How many colors can be represented this way? 256 768 16,777,216 Human eye can distinguish about 10 million colors

Color RGB color components are usually defined on a scale from 0 to 255 How many bits do we need for 1 color? 8 24 255 Human eye can distinguish about 10 million colors

Color RGB color components are usually defined on a scale from 0 to 255 How many bytes do we need for 1 color? 3 24 255 Human eye can distinguish about 10 million colors

Color Explore RGB Color G B decimal 0-255 hexadecimal 00-FF Explore RGB Color What shades are created when all three primary colors are equal? How can you make a color brighter or darker?

Images

Image representation Images are a 2-dimensional (2D) array of pixels. Number of pixels = height x width (= resolution) 38 pixels high x 44 pixel wide

Image representation Size of the image = resolution * data for each pixel If there are only 2 colors (say black and white), then how many bits per pixel? 1 bit (with 1 = black; 0 = white) Size of the image: w * h * 1 bits = (w * h)/8 Bytes A 640 x 480 BW image takes: A) 38,400 Bytes B) 307,200 bits C) 37.5 KB D) All the above picascii.com Save the “Happy” image. (PNG) Convert it into ASCII (in ImageConverter) as follows:

Image representation Size of the image = resolution * data for each pixel If there are only 2 colors (say black and white), then how many bits per pixel? 1 bit (with 1 = black; 0 = white) Size of the image: w * h * 1 bits = (w * h)/8 Bytes A 640 x 480 BW image takes: A) 38,400 Bytes B) 307,200 bits C) 37.5 KB D) All the above picascii.com Save the “Happy” image. (PNG) Convert it into ASCII (in ImageConverter) as follows:

Image representation Size of the image = resolution * data for each pixel In a true-color image, how many bits for each pixel? 24 bits because r (8 bits), g (8 bits), b (8 bits) Size of the image: w * h * 24 bits = (w * h * 24)/8 Bytes A 640 x 480 color image takes 921,600 B = 900 KB! picascii.com Save the “Happy” image. (PNG) Convert it into ASCII (in ImageConverter) as follows:

Image compression (GIF)

INDEXED COLOR 1 2 3 index color 1 2 3 image image contents 1 2 3 index color 1 2 3 image image contents color palette index color 00 #0000FF 01 #00FF00 10 #FFFF00 11 #00FFFF How large is a file that stores a 300x500 pixel indexed color image with 4 colors, and its color palette? 300x500 pixels, with 2 bits per pixel (why?) 300 x 500 x 2 = 300,000 bits (2) 4 colors, with 24 bits per color 4 x 24 = 96 bits  ~37.5kB (compared to the 450kB uncompressed file!) 2 bits per pixel 24 bits per color

Image compression (GIF) Computing the file size for a GIF image, in bytes: number of bytes to store the image pixels: (width * height * bit-depth) / 8 (2) number of bytes to store the color palette: num_colors * 3 (3) total number of bytes*: (width * height * bit-depth) / 8 + 3 * num_colors (4) divide by 1,024 or 1,048,576 to convert to kilobytes or megabytes *There’s also a small amount of fixed overhead for storing file type, dimensions, etc.

Bit depth Bit depth is the number of bits required to 1 Bit depth is the number of bits required to represent the color for individual pixel. How many colors with bit depth of 4? bit depth of 24? 4 8 24 Do google search to find that 2^24 = 16 777 216 What is the bit-depth of an index-color image with 30 colors in it?

Sound Produced by vibration of object in air, liquid Moves through waves of pressure Is fast: in air, 340 m/sec = 750 miles per hour But not very fast (echo) Time Amplitude Crest Valley Cycle

Units Frequency (aka pitch): Unit: Hz = cycles/sec Detectible frequency between 20 Hz and 20KHz, depends on age (mosquito buzz) Amplitude (aka loudness): Unit: deciBell Time Amplitude Crest Valley Cycle http://www.freemosquitoringtones.org/

Sampling rate A signal can be reconstructed from samples taken at regular intervals as long as the intervals are short enough

Sampling rate If the samples are too infrequent a lower-frequency signal may fit the sampled points and the original signal can’t be recovered Harvard Bits

Digitizing sound Sampling Rate: Sample the sound amplitude often enough so that you get a close approximation. Quantization (aka bit depth): Use a detailed “ruler” so that you get a more accurate reading. The reproduced signal might not be identical to the original But might be “good enough”

Digitizing sound n bits/sample => 2n possible sample values Audio CDs, most digitial audio uses 16 bits/sample * 2 channels for stereo

From analog to digital Sampling Rate Bit-resolution (bit depth) # of samples/sec Usually between 11.0 and 44.1 KHz Digital telephones sample at 8.0KHz Voice Over IP(e.g., skype) can have higher fidelity than telephone land lines! High Quality mono = 44 KHz * 16/8 bytes = 88 Kb/sec! Bit-resolution (bit depth) # of bits devoted to record each sample Usually between 8 and 16 bits (1-2 bytes) Audio file size = sampling rate * bit depth / 8 * recording time * num of channels 3600 s * 44,100 sample/s * 16 bits/sample* 2 stereo channels = 5Gb = 636MB

Audio compression Some ideas: Throw away very high frequency components Throw away any component that is both soft and loud simultaneously Change stereo to mono (50% savings) These standards stipulate decoding but not encoding -- there may be several encodings of the same music that discard different information to produce different storage sizes and bit rates March 18, 2009 Harvard Bits

Today Decimal, Binary, Hexadecimal numbers (review) Text representation (review) Color representation Image representation Sound representation Video representation

Video

Video Say you watch 10mins of an uncompressed Netflix video: The image resolution of Netflix is 1280 wide and 720 high. The number of images per second: 30 frames per second (frame rate). Calculate the size of the video with no compression: Calculate the size of an individual image in true-color. Calculate the size of the sound for one second of video. Calculate the size of video (sound + images) for one second of video. Calculate the size of the video (sound + images) for one minute of video. Calculate the size of the video (sound + images) for 10mins of video.

Video 1280 * 720 * 24 = 22,118,400 bits = 2,764,800 Bytes or 2.6MB Say you watch 10mins of an uncompressed Netflix video: The image resolution of Netflix is 1280 wide and 720 high. The number of images per second: 30 frames per second (frame rate). Calculate the size of the video with no compression: Calculate the size of an individual image in true-color. 1280 * 720 * 24 = 22,118,400 bits = 2,764,800 Bytes or 2.6MB Calculate the size of the sound for one second of video. 44*16*2 = 1408 bits per second = 176 KBps Calculate the size of video (sound + images) for one second of video. Size per second: 2.6MB*30+176KB = 78MB Calculate the size of the video (sound + images) for one minute of video. Size for 1min: 78MB*60 = 4.5GB per min Calculate the size of the video (sound + images) for 10mins of video. Size for 10min: 45GB per 10min If you have 25Mbps, how long will it take to download the video? 360,000,000,000 (bits) / 25,000,000 = 14,400 seconds or 240min or 4hours

Data that travels the internet As 1 and 0 Time Amplitude Crest Valley Cycle

To-do Assignment 2 due today Weekly reflection due tomorrow Next week: Grace Abuhamad ’13 will join us! After Wellesley, she worked at ICANN (Internet Corporation for Assigned Names and Numbers) and then at the Department of Commerce working on Internet Governance. Currently, she is a student at MIT in the Technology & Policy Program in the Internet Policy Research Initiative lab. Come with questions!