Representing Sound and Image Representing images One mean

  • Slides: 11
Download presentation
Representing Sound and Image

Representing Sound and Image

Representing images • One mean of representing an image it to interpret the image

Representing images • One mean of representing an image it to interpret the image as a collection of dots, each is called pixel. • Pixel is a picture element. • Each pixel is encoded. • Image is represented as a collection encoded pixels. • Such collection is called bit map Islamic University Of Gaza, Nael Aburas 2

Black and white image • Each pixel can be represented by a single bit.

Black and white image • Each pixel can be represented by a single bit. • For more elaborate black and white picture, each pixel can be represented by a collection of bits. Islamic University Of Gaza, Nael Aburas 3

Color image • RGB encoding – Each pixel is represented as three color: red,

Color image • RGB encoding – Each pixel is represented as three color: red, green and blue. – One byte is normally used to represent the intensity of each color. – Three byte of storage are required to represent a single pixel. Islamic University Of Gaza, Nael Aburas 4

Representing sounds • The most generic method of encoding audio information is to sample

Representing sounds • The most generic method of encoding audio information is to sample the amplitude of the sound wave at regular intervals and record the series of values obtained. • Sound waves rises in amplitude, falls, rises at a higher level, and then drop back to 0. • The voice at one end of the communication is encoded as numeric values representing the amplitude of the voice. • The numeric values can be then transmitted over the communication line to the receiving end. Islamic University Of Gaza, Nael Aburas 5

Storing integers • Two’s complement Notation, excess notation are used for representing integer values

Storing integers • Two’s complement Notation, excess notation are used for representing integer values in computing equipment. Islamic University Of Gaza, Nael Aburas 6

Two’s complement Notation • The most popular system within today’s computer. • system in

Two’s complement Notation • The most popular system within today’s computer. • system in which negative numbers are represented by the two's complement of the absolute value • Used a fixed number of bits to represent each of the values in the system. • In today’s equipment, it is common to represent by a pattern of 32 bits which allows a wide range of numbers to be represented. Islamic University Of Gaza, Nael Aburas 7

Figure 1. 21 Two’s complement notation systems Islamic University Of Gaza, Nael Aburas 8

Figure 1. 21 Two’s complement notation systems Islamic University Of Gaza, Nael Aburas 8

Two’s complement Notation • The leftmost bit of a bit pattern represent the sign

Two’s complement Notation • The leftmost bit of a bit pattern represent the sign of the value. – “ 1” represent the negative sign. – “ 0” represent the positive sign • The complement of a pattern is the pattern obtained by changing all the 0 s to 1 s and all the 1 s to 0 s. Islamic University Of Gaza, Nael Aburas 9

Coding the value using Two’s complement • Representing negative value – Copy the original

Coding the value using Two’s complement • Representing negative value – Copy the original pattern from the right to left until a 1 has been copied, then complement the remaining bits until the final bit pattern. Islamic University Of Gaza, Nael Aburas 10

Addition in two’s complement Islamic University Of Gaza, Nael Aburas 11

Addition in two’s complement Islamic University Of Gaza, Nael Aburas 11