100 likes | 211 Views
Sampling and Digitisation. Digitisation. Real-life images and sounds need to be digitised for computer representation. Turning an analogue or continuous signal into a digital signal. There are 3 stages to digitisation. Sampling Quantisation. Coding. The 3 stages of Digitisation. Sampling.
E N D
Digitisation • Real-life images and sounds need to be digitised for computer representation. • Turning an analogue or continuous signal into a digital signal. • There are 3 stages to digitisation. • Sampling • Quantisation. • Coding.
The 3 stages of Digitisation Sampling Quantisation 1011, 1100, 1101, 0000, 0010, 0100, 0101, 0101, 0101, 0101, 0100, 0010, 0000, 1101, 1100, 1011, 1011, 1011, 1011, 1100 Coding
Sampling • Examine the signal at discrete intervals (in space or time). • Nyquist’s sampling criteria states that we must sample a signal twice as fast as it is changing to represent it accurately. • If we do not we get aliasing. • Applies to any signal (sound or vision)
Sampling • Sampling happens in life time events. Looking at the weather. • Cartwheels classic example. • More samples mean more data • Sometimes we degrade sound and vision so that we don’t have to sample it so often.
Quantisation • Sampled signal is still an analogue signal. • The sample values may be any value within the signal’s range. I.e. an infinite number of values. • The computer deals in numbers, but not in infinite numbers.
Quantisation • We need to decide the smallest amount a change from one number to the next will represent in our signal. • The decision is called quantisation • If we have a 4 bit number it can only represent 16 different values. 0 -15 • An 8 bit number can represent 256 different values. 0 –255
Quantisation • Generally an ‘n’ bit number can represent 2n different values. 0 – (2n-1) • So the more accurately we need to represent a signal, the greater the levels of quantisation. • Greater levels of quantisation require more bits (data). • 8 bits vision ,16 - bits sound. • 16 bit gives 0 to 65535
Coding • Once we have our sampled, quantised data, we need to develop some coding scheme to store in the computer. Or transmit. • Need not be difficult. • 8 – bit video brightness levels vary from 0 – 255, so simple hexadecimal provides a good coding scheme. • Sound waves go negative so a bit more difficult. So could use 2’s complement, offset binary or sign bit coding.
Two’s complement • Turn all the zeros to ones and all the ones to zero and add 1. • Gives us a range from: • -32767 to • 32767 • We lose 8016 • The scale • 7F 32767 • …. (numbers between) • 01 1 • 0 0 • FF -1 • …… (numbers between) • 81 -32767 • All negative numbers start with MSB = 1