Presentation is loading. Please wait.

Presentation is loading. Please wait.

Comp 1001: IT & Architecture - Joe Carthy 1 Review Floating point numbers are represented in scientific notation In binary: ± m x 2 exp There are different.

Similar presentations


Presentation on theme: "Comp 1001: IT & Architecture - Joe Carthy 1 Review Floating point numbers are represented in scientific notation In binary: ± m x 2 exp There are different."— Presentation transcript:

1 Comp 1001: IT & Architecture - Joe Carthy 1 Review Floating point numbers are represented in scientific notation In binary: ± m x 2 exp There are different standards for representing floating point numbers There are different precisions: single and double Languages like Java and C allow you specify the type of number Micro-controllers are embedded processors with some RAM Code for micro-controller needs to be designed to use as little RAM as possible.

2 Comp 1001: IT & Architecture - Joe Carthy 2 Information Representation: Audio - Sound Sound waves are analog signals Analog signal: continuous signal between a maximum and minimum value Digital Signal: Only two possible values: 1 OR 0 (High/Low etc) Microphone converts sound to analog electrical signal Loudspeaker converts analog electrical signal to sound we can hear How can we represent an analog signal in digital form i.e. how do we represent the analog signal as a sequence of bits ? Conversely, how do we convert digital signal back to its original analog form Use devices called digital-to-analog (DAC) and analog-to-digital (ADC) converters

3 Comp 1001: IT & Architecture - Joe Carthy 3 Information Representation: Audio - Sound ADC samples the value of the electrical signal at regular intervals such as 8000 times per second - sampling rate ADC represents each sample as a binary number. These numbers are then stored or transmitted. DAC takes these samples and recreates an analog signal that “matches” the samples. This re-created signal will NOT be identical to the original BUT may be close enough that the human ear cannot tell the difference The sample may typically be represented by an 8-bit number or a 16-bit number (8-bit sampling/16-bit sampling) - sampling precision The following examples come from HowStuffWorks website - well worth a visit http://entertainment.howstuffworks.com/analog-digital3.htm

4 Comp 1001: IT & Architecture - Joe Carthy 4 Information Representation: Audio - Sound Analog signal

5 Comp 1001: IT & Architecture - Joe Carthy 5 Information Representation: Audio - Sound Sampled signal (1000 samples per sec and 10 gradations per sample)

6 Comp 1001: IT & Architecture - Joe Carthy 6 Information Representation: Audio - Sound Re-created signal in blue (with sharp angles): note there is an error

7 Comp 1001: IT & Architecture - Joe Carthy 7 Information Representation: Audio - Sound More accurate if we increase sampling rate and precision (2000/sec and 20)

8 Comp 1001: IT & Architecture - Joe Carthy 8 Information Representation: Audio - Sound More accurate if we increase sampling rate and precision (4000/sec & 40)

9 Comp 1001: IT & Architecture - Joe Carthy 9 Information Representation: Audio - Sound CD Recording In the case of CDs, the sampling rate is 44,100 samples per second with 16-bit samples The number of gradations is 65,536 (2 16 ) At this level, the output of the DAC so closely matches the original waveform that the sound is essentially "perfect" to most human ears but musical purists hotly debate this contention!! CD Storage Capacity CDs are designed for two sound streams to be recorded (one for each of the speakers on a stereo system). A CD can store up to 74 minutes of music, so the total amount of digital data that must be stored on a CD is: 44,100 samples/(channel*second) * 2 bytes/sample * 2 channels * 74 minutes * 60 seconds/minute = 783,216,000 bytes

10 Comp 1001: IT & Architecture - Joe Carthy 10 Audio Representation: - Review Sound - analog signal Microphone converts to electrical signal which is converted to digital signal by ADC DAC converts digital signal to analog signal which is converted back to sound by loudspeaker Sampling rate: number of samples per second that ADC uses - higher is better Precision: number of bits per sample - more is better Exercises Explain using diagrams how sound is represented digitally What is sampling rate and why is higher sampling rate better What is precision and why is higher precision better What precision is used with CDs

11 Comp 1001: IT & Architecture - Joe Carthy 11 Image Representation See: http://electronics.howstuffworks.com/digital-camera.htm Traditional photographic image is represented by analog A digital image is simply a sequence of 1s and 0s that represent tiny colored dots These dots are called picture elements or pixels and they make up the image. You can convert an image to its digital form by using a digital scanner which records light reflected from the image as binary numbers or pixel values You can also use a digital camera which samples the light reflected from the subject and stores it in pixel form A single image will typically consist of millions of pixels (megapixels) Cameras are rated according to the maximum number of pixels the camera is capable of using to represent an image - called the resolution of the camera The higher the number of pixels the better the image quality e.g. 3.2 megapixels is used by some cameras

12 Comp 1001: IT & Architecture - Joe Carthy 12 Image Representation The key difference between a digital camera and a film-based camera is that the digital camera has no film. Instead, it has a sensor that converts light into electrical charges -> pixels Some typical resolutions that you find in digital cameras today include: 256x256 pixels - You find this resolution on very cheap cameras. This resolution is so low that the picture quality is almost always unacceptable. This is 65,000 total pixels. 640x480 pixels - This is the low end on most "real" cameras. This resolution is great if you plan to e-mail most of your pictures to friends or post them on a Web site. This is 307,000 total pixels. 1216x912 pixels - If you are planning to print your images, this is a good resolution. This is a "megapixel" image size -- 1,109,000 total pixels. 1600x1200 pixels - This is "high resolution." Images taken with this resolution can be printed in larger sizes, such as 8x10 inches, with good results. This is almost 2 million total pixels. You can find cameras today with up to 10.2 million pixels.

13 Comp 1001: IT & Architecture - Joe Carthy 13 Image Representation Resolution for Web and E-mail You may or may not need lots of resolution, depending on what you want to do with your pictures. If you are planning to do nothing more than display images on a Web page or send them in e-mail, then using 640x480 resolution has several advantages: Your camera's memory will hold more images at this low resolution than at higher resolutions. It will take less time to move the images from the camera to your computer. The images will take up less space on your computer. On the other hand, if your goal is to print large images, you need to take high- resolution shots and need a camera with lots of pixels. JPEG compression reduces size by a factor of 16 if used

14 Comp 1001: IT & Architecture - Joe Carthy 14 Image Representation Resolution: Printing Pictures There are many different technologies used in printers. In general, printer manufacturers will advertise the printer resolution in dots per inch (dpi).. The rule of thumb is that you divide your printer's color resolution by about four to get the actual maximum picture quality of your printer. So for a 1200 dpi printer, a resolution of 300 pixels per inch would be just about the best quality that printer is capable of. This means that with a 1200x900 pixel image, you could print a 4-inch by 3-inch print. In practice, though, lower resolutions than this usually provide adequate quality. To make a reasonable print that comes close to the quality of a traditionally developed photograph, you need about 150 to 200 pixels per inch of print size.

15 Comp 1001: IT & Architecture - Joe Carthy 15 Image Representation Kodak recommends the following as minimum resolutions for different print sizes

16 Comp 1001: IT & Architecture - Joe Carthy 16 Image Representation: Video Video may be regarded as sequences of still images and essentially the same techniques are used to represent the images as for photographic images. In addition the sound is stored separately, again, in the same fashion as for CDs. Compression becomes an important issue for video because of the huge volume of data involved. A set of standards called MPEG (-1,-2,-3, -4) is used for compressing video Raw video generates approx. 170Mbps e.g. 10 second video clip uses over 200Mb Can reduce this to 100Kbps by using MPEG e.g 10 second clip takes 125Kb MPEG makes it feasible to easily store and transmit video

17 Comp 1001: IT & Architecture - Joe Carthy 17 Image Representation: Review Images are represented using pixels Resolution refers to number of pixels per image Need Megapixel resolution for print quality large images Compression is important: JPEG Video: sequence of still images MPEG compression Exercises How are images represented ? What are pixels ? What is resolution ? Why is high resolution needed in some cases ? What cases ? Why is compression important ?


Download ppt "Comp 1001: IT & Architecture - Joe Carthy 1 Review Floating point numbers are represented in scientific notation In binary: ± m x 2 exp There are different."

Similar presentations


Ads by Google