Loading in 5 sec....

Crossing the Boundary Analogue Universe, Digital WorldPowerPoint Presentation

Crossing the Boundary Analogue Universe, Digital World

Download Presentation

Crossing the Boundary Analogue Universe, Digital World

Loading in 2 Seconds...

- 246 Views
- Uploaded on
- Presentation posted in: General

Crossing the Boundary Analogue Universe, Digital World

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Crossing the BoundaryAnalogue Universe, Digital World

Unit Three : M150 : AOU

By : Mais M. Fatayer

- In this unit, we will discuss the way computers represent and handle data.
- Crossing boundary concept
- Analogue vs digital
- Conversion from Analogue world to digital
- Ways of data representation and data manipulation

- The computer’s job is to acquire , store, present, control, exchange and manipulate interesting characteristic of the natural world..
- Can you think of examples for the above jobs?

- As you know , the world we inhabit and live in is different from the computers world.
- We live in Analogue world, but the world of computers is Digital
- The previous jobs of the computers need to be moved from the analogue world to the digital world, in other words Crossing the Boundary between the two different territories.

- The price of using computers must be paid.
- Not just the money costs, but some problems like:
- Quality
- Privacy, liberty and security
- Its just a representation of the real world

- So what is Analogue?
- Analogue quantities are ones that change continuously.
- Example: temperature is analogue quantity , where you can find infinite number of temperatures between any two points on the thermometer scale
- Another Example:Sound , the intensity of sound goes higher or lower smoothly as you turn the volume control

- Name two other analogue quantities ?
- Brightness of light
- Color intensity
- Pitch
- Pressure
- Heat

- Human has five senses , and by use of computer systems we can improve these senses
- Example:
- Microscopes
- Telescopes
- Radar
- X-rays
- Hearing aids

- What is discrete ?
- In contrast to analogue quantities, which change continuously , discrete quantities change in a series of clear steps
- Example:
- Digital thermometer which has window and you can read temperature in decimal places
- Discrete volume control, where you can hear the volume increases if steps

- That means, we can treat analogue quantities as if they are discrete, where sometimes it suites the situation
- For example , it does not make a big difference if the thermometer measured you temperature 38.56556767 or 38.56556766 , you still have fever.

- But some quantities are strictly discrete and can not be analogue , can you give an example?
- Number of students in class
- Number of credit cards you have
- Number of cars in the garage

- You have to understand the computer story is based on numbers!
- Lets see how computer deals with numbers. But first , lets discuss the number system we are using, then we will go to the number system in the computers world

- We deal with the decimal system in our daily life
- This system has infinity of numbers
- But all these numbers are composed of finite set of digits.
- Decimal system set={0,1,2,3,4,5,6,7,8,9}
- 10 digits.
- Any number can be composed of this finite set

- Lets see it in examples
- 10 is represented as one group of ten plus zero
- 37 is represented as three groups of ten (thirty) plus seven
- 345 is represented as three groups of one hundred (three hundred) plus four groups of 4 ( forty) plus five
- As you see from the examples above, we added new columns to the left to represent larger numbers
- Also notice that each new column is ten times bigger than the group immediately to its right

- From the examples, we can produce the following pattern that will help us to generate any decimal number

- In contrast to our decimal system (denary) computers deal with Binary system
- Binary system , as our digital system, has set of elements to compose its numbers
- Binary system set={0,1}
- Any number in binary system can be composed of this finite set.

- Again, lets see it in examples:
- 0, represents zero in decimal
- 1, represents one in decimal
- ………… how to do 2,3,4,5,…???? We are run out of digits!!
- Lets follow the same strategy of decimal system and add new column to the left

- We can have digits to count as far as one, so our new column must count groups of two
- 1
- 10 added new column to the left, because we needed to represent next digit (0,1,2)
- So three can be represented as 11 group of two plus one
- Now how do we represent four?

- From the examples, we can produce the following pattern that will help us to generate any binary number

- Solve exercise 3.5 page 22

- Bit (binary digit) refers to 0 or 1 stored in computer memory
- Byte, group of 8 bits
- Word, 4 bytes
- Hard disk capacity is measured in bytes. Like Kilobytes = 1024 ByteMegabytes = 10242 bytesGigabytes = 10243 bytes

- Computer world is a simple world
- Word processors enable us to enter text into computer and format that text ,display it on monitor in front of us, and may be print it
- But , when text inside the computer boundary , it should have the binary representation
- Then how text can be represented inside the computer into numbers?

- The computer assigns a unique number for each letter in the alphabet , so each letter becomes a number inside the computer

- What other characters need to be represented?
- What about ?,!,#,$,%,^,&,*…..
- What about a ,u ,e ,b ,g ,w,d.........

- We need to include these characters in the character set the computer uses to represent characters( to cross that boundary)
- This takes us to a need to have a Standard set of all characters a computer can represent

- ASCII set aside 128 numbers, from 0 to 127, for upper and lower-case alphabetic characters, punctuation marks and some ‘invisible’ characters, such as a carriage return (start a new line) and a tab.
- Unicode, certified in 1987, preserves the ASCII numbers, but hugely expands the set of numbers available to 65,536.

- How images can cross the digital boundary? In other words, how images can be represented in the digital world of computers?

(a)

(b)

- The artist in painting (a) used all color intensities so you can visualize that light is smooth and analogue
- In (b) the artist used the head of his brush to draw the painting as dots, disconnected and discrete

- Let’s try a simple example. Let’s take an image, divide it into discrete parts and then transform the result into numbers.

- First :place a border around the picture, to indicate the area we are interested in. Anything outside the border will not be part of the work.

- Next , divide the picture up by laying down a grid of equal-sized squares over it,

- Now examine each square of our image. If it contains just the
- background colour (light grey, in this case) just fill the square with white.
- If it contains any other image colour (mauve), then colour it black.
- Looking at the grid, you can see that some squares contain both background and image colour. In such cases colour a square black if roughly a third or more of it is image colour, white otherwise.

- Let’s take the final step. For each square on the image, I assign the number 0 to it if it is coloured white and 1 if it is coloured black.
- this is called mapping the square’s colour to a number. And gives the following pattern:

- Since each number is only either 0 or 1, and computers use bits to store 0s and 1s, this sort of encoding is usually referred to as a bitmap.
- Each square that we have mapped to a 0 or a 1 is called a pixel (short for picture element).

- What do you think could be done to improve the quality of the image?
- One obvious way is to increase the number of squares and to make each square smaller.

- Suppose we double the number of the gridlines in each direction, This is called increasing the resolution of the picture. we can get an image like this

- Mapping each square in previous image will result:

More and more resolution will reach better appearance of an image each time

- Work out how many bits would be needed to store (62 pixels wide by 44 pixels high) image. How many bytes?

- Why is the simple strategy used above not satisfactory for colored images?
- The most obvious point is that we have as yet no way of handling colour.The plain black and white won’t allow us to represent intensities of light and shade.

- In our previous example, we dedicated one bit to each pixel in our image. All we need to do now is devote more bits to each pixel to accommodate a greater range of shades.
- Let’s allocate two bits per pixel with binary 11 representing black and binary 00 standing for white.

- How many shades can we represent using two bits per pixel?
- Counting black as 11 and white as 00, we can have two shades of grey in between - 01 (light grey) and 10 (dark grey). So, four shades in all.
- What about using more bits per pixel.?

- This mapping of shades of grey between black and white in a black and white bitmap is known as grayscale.
- The range of numbers to which a pixel can be mapped is termed the pixel amplitude

Picture of aircraft divided into pixels

A grayscale image of the aircraft

- Color is an example of an analogue property.
- We are trying to map infinite number of colors to a finite number
- Colors are represented in a different way.
- Any color can be made out of a mixture of three basic shades Red, Green and Blue (R, G, B). RGB model
- Each shade is represented by a byte (8 bits), giving values ranging from 0 to 255.
- As a total we have 256 x 256 x 256 shades of color (16,777,216)
- Red is (255, 0, 0) since it is all Red and 0 Green and 0 Blue.
- Green is (0, 255, 255).
- Blue is (0, 0, 255).
- White is (255, 255, 255), all the color spectrum.
- Black is (0, 0, 0), no color what so ever.

- When dealing with images, sometimes large amounts of memory are required
- Two Important model
- RGB model
- The primary are colors red, green and blue

- CMYK model (other model)
- The primary colors that are reflected off paper are not red, green and blue – but cyan (blue-green), magenta and yellow.
- The K stands for a special black ink used to add crispness.

- RGB model

- Some types of visual information can be represented more economically than in a bitmap (less waste of memory).
- The huge majority of the pixels will just be white, the background to the picture. The only information all these white pixels give us is the simple fact that the background color is white
- To reconstruct the diagram we need information about what sort of object it is (line, square), the size, the position and the color of them
- Shapes, line thickness, coordinates, all have their numerical representations in a computer.

- First: assign a number to each type of object (rectangle, circle, arrow, line and the text)
- Second: record the size and position (Cartesian coordinates – x, y axes) of each object
- Third: Identify the color
- Finally: put all information together and produce a final set of numbers

y

x

o

- A circle is defined by its radius and the coordinates of its center.
- A rectangle by the coordinates of its upper left and lower right corners.
- Lines and arrows by their starting and ending points.
- The text area by the coordinates of its top left corner

- Vector graphics:
- The way (sort) of encoding of visual information
- Opposed to the bitmap approach (raster graphics)
- Very compact form of encoding
- The resulting image is scalable: we can easily shrink or stretch the size of it without any loss of information.
- Works with fairly simple images

- Drawing packages: the programs that allow us to draw and display vector graphics, like Adobe Illustrator
- Painting packages: the systems for constructing and displaying raster graphics (bitmap) , like Adobe Photoshop

- Several formats exist for image digitizing, depending on the allowed loss of precision (ex: bmp, jpg, gif, etc…)

- Making image move
- A Video or a movie, is a series of images that slightly differ one from another, passing them one after the other at a certain speed will give the illusion of movement.
- A picture would be called a frame.
- The speed of flipping the frames one after the other is called frame rate (fps).

- Transferring such an enormous amount of digital information over a network would be slow.

- We have to find some way of reducing the amount of storage that moving images. The vector graphics approach will not work for complex image, so we must look for a way of compressing bitmapped visual information
- There are many standards for image and film compression.
- Standards for image compression:
- JPEG (Joint Photographic Experts Group)
- GIF (Graphics Interchange Format) standards.
(Both standards reduce the number of bits used to store each pixel)

- For video, the dominant standard is MPEG (Moving Picture Experts Group), which is now used in most digital camcorders.

- Hearing is the second most relied on sense for a human being (another analogue feature of the world).
- A sound consists of a waveform
- How sound waves can be represented in computer?
- The best way into the problem is to consider in a little more detail what sound is. Probably the purest sound you can make is by vibrating a tuning fork. As the prongs of the fork vibrate backwards and forwards, particles of air move in sympathy with them. One way to visualize this movement is to draw a graph of how far an air particle moves backwards and forwards (we call this its displacement) as time passes.

Displacement of air particles over time by vibrating a tuning fork

- Displacement: how far an air moves backwards and forwards
- Cycle: represent the time between adjacent peaks
- Frequency: the number of
cycles completed in a fixed time

- Amplitude: maximum displacement
(how loud the sound is)

- Write down a few ideas about how we might go about transforming a waveform into numbers. It might help to think back to the methods we used for encoding images
- Answer: We have to find some way to split up the waveform. We split up images by dividing them into very small spaces (pixels). We can split a sound wave up by dividing it into very small time intervals.

Sampling every 0.5 second

Improve the sampling process by

Sampling every 0.1 second

- Now we’ve sampled the waveform, what do we need to do next to encode the image?
- Remember that after we had divided an image into pixels, we then mapped each pixel to a number. We need to carry out the same process in the case of the waveform.
- This mapping of samples (or pixels) to numbers is known as quantization.
- sound wave samples are generally mapped to 16-bit numbers.