Lesson video

In progress...


Hi, my name is Dharini.

Welcome to lesson two, data representation going audio-visual.

For this lesson, you will need pen and paper to make notes and also a calculator to do some file calculation.

Remove any distractions if you can and turn off those mobile app notifications, especially if you have any of your devices nearby.

Then you're ready, let's get started.

In this lesson, you will describe how colour can be represented as a mixture of red, green, and blue, with its intensity in binary.

You will be able to compute the representation size of a digital image by multiplying resolution with colour depth.

You will be also able to describe the trade off between the representation size, and perceived quality for digitally images.

Colour mixing.

How do you think painters get new colours of paint? By mixing paint of different colours in different quantities, they produce completely new colours.

So I think you probably know which colours of paint needed to be mixed to get green, purple or orange.

What about green? What colours do you think needed to be mixed to get green? Yellow, that's correct.

And blue, that's correct.

To get green, you need to mix yellow and blue.

What about purple? Red and blue, yes, spot on.

What about orange? Yellow and red, brilliant.

What happens when you mix all your paints together? What colour do you get? I'm sure you're going to say black.

In theory it's black, but when you do it in practise, it's actually dark brown, not black, okay.

I'm sure you're going to experiment with paints soon.

What about digital images? How do you get new colours with the digital images? With digitally images, it's not colour of the paint.

It's the colour of the light.

So digital painters, mix light of different colours in different intensity, in different quantities to produce completely new colours.

Look at the picture on the right.

What new colours can you see? Because of the red, green and blue light? Yes, purple, orange, and yellow.

That's right.

So if in digitally images, if you want to produce completely new colours, you got to use different lights, different coloured lights in different intensities.

What colour do you get when you mix red, green and blue lights together? What do you think? Black? No, it's white.

So when you mix red, green, and blue lights, it becomes white, okay.

So with the digitally images, it's not coloured paint, it's the coloured light we use to produce completely new colours.

Let's reflect on that.

Colours can be described as a mix of red, green, and blue light.

They are elementary colours, but in appropriate quantities, that's how you get new colours.

To specify the quantities of the light, the different coloured light, you use sequence of bits, that is binary digits.

Your first task for this lesson is pick and mix colours.

Sounds interesting, isn't it? RGB colour.

In practise, colour is commonly represented using 24 bits.

First of all, RGB stands for red, green and blue colours.

And the common standard for colour representation for bitmap images is 24 bits.

But why 24 bits? These 24 bits are divided into three 8-bit components representing red, green, and blue quantities.

So eight bits are used to represent every quantity of red, green, and blue.

That's the red component, 87, green is 165, and blue is 235.

Just by looking at the colours you can clearly see, blue value is higher.

The quantity of blue is higher.

So the resulting value will be.

what do you think the colour will be? Blue and green are higher compared to red.

Did he get this colour? Yes, it's light blue.

RGB colour.

A common value for colour depth for bitmap images is 24 bits per pixel.

So every pixel will have eight bits for red component, eight bits for blue and eight bits for green, okay.

So what colour do you think these binary digits represent? So look at the Kingfisher picture carefully.

Yes, you guessed it right.

It is representing orange.

So the quantity of red, green, and blue for each pixel is specified using eight bits.

That's why you get 24.

So eight for red, eight for green, and eight for blue, okay.

Just by looking at the values, 255 for red.

So you can clearly say, it's going to be something darker.

Green value is higher as well, but blue is lower.

So the higher value of red and green will give you orange.

Yes, a light shade of orange.


So there we go, our colour, okay.

How much of each colour can there be? What do you think? What will be the minimum value for red, green or blue? Remember, you've got to have eight bits, that is eight zeros or ones, whatever the value is, okay.

What will be the minimum value of red, green or blue? Zero, correct.

So the minimum value you can have is zero.

What about the maximum value? That means when all of them are ones.

You guessed it right, it's 255.

What does that mean? You can represent colours from zero to 255 shades of red, zero to 255 shades of green, and zero to 255 different shades of blue.

Because each and every coloured component is represented as eight bits.

So the maximum value you can have with eight bits, eight binary bits, are 255.

What are the number of possible values for red, green, or blue then? You're going to say 255, no.

It's because the value starts from zero to 255.

So there will be 256 values for every coloured component.

So you will have 256 shades of red in different quantities, 256 different shades of green, again in different intensities, and 256 shades of blue.

So what will be the total number of possible colours? Correct, it's 256 for red, times 256 for green, times 256 for blue.

That will be 16,777,216 possible colours.

Now, pause the video to complete your task.

Your task is to complete your worksheet, which has got two tables.

The first table has called different numbers for red, green, and blue component.

And you got to identify what colour will be the output based on the given different quantities of red, green, and blue.

And table two, you have been given the colours, you have been given the output colours, and you got to guess what will be the different numbers for red.

So what will be the quantity for red? What will be the quantity for green? And what will be the quantity of blue to get that colour, okay? What you got to remember is we are not looking for specific values because we got differentiates of different colours.

So as long as that produces a colour, similar to the output colour given on the table, that's absolutely fine.

So go and do your worksheet, and when you're finished, come back and we will discuss your answers.

Welcome back.

Did he manage to do everything? Brilliant? Did he enjoy the activity? Yes, I like it as well, okay.

So Ben, you have 255 for red and green.

What will be the actual colour produced? It's yellow, that's correct.

So when there is no blue component value, that's zero, okay.

And the values for red and green are maximum values.

So the highest value can have is 255, okay.

So what about the next one? 160 for red and 160 for blue.

Remember when we did discuss about what will be the new colour produced based on their red and blue lights? It's purple, absolutely correct.

What happens if all of them have the same value, 128? It's grey.

Did you get it right? Brilliant.

What about the next one? You've got to guess the values for red, green, and blue.

For orange, 255 for red and 165 for green.

Do not worry if you have a different value.

As long as the output colour is orange for the combination of red and green, that's fine.

The next colour is Brown.

So when you have more of red, that is 165 for red, and green and blue have the same values, 42 and 42, the output colour produced will be Brown.

What happens when they all have the maximum values? When you combine red, green, and blue lights, it's going to be white.

Your task two for this lesson is representation size.

For this task, you may need to use calculator.

So if you don't have a calculator, pause this video and go and grab a calculator.

Representation size.

How many bits are required to represent an image? How would you calculate that? We got rows, columns, and the colour depth values as binary numbers, sequence of binary numbers.

So how do you calculate, how many bits are required to represent an image? So resolution is nothing but the total number of pixels in an image.

And the only way to calculate the total number of pixels is by multiplying rows by columns.

So it is resolution times colour depth.

So colour depth is the sequence of binary digits used to represent the pixel colour, okay.

To calculate the number of bits required to representing image, all you need to do is to multiply resolution by column depth.

And resolution is rows times columns, colour depth is the number of binary bits used to represent a colour, a pixel's colour.

Now, pause the video to complete your task two.

Your task two is representation size.

And for this task, you may need to use your calculator.

Go to task two on your worksheet to compute the inmate size for Van Gogh's painting, which has been reduced in size.

Use the worked out example on the worksheet has guide to help you with this task.

Once you have finished resume this video, and we will discuss your own answers.

So the task two, Van Gogh's painting "The Starry Night" has been reduced to the resolution of 640 times 500.

That's the number of rows times columns, with a colour tip of three bytes.

It's not three bits, three bytes.

What does three bytes in bits? 24, you got it right.

Because one byte is equal to eight bits.

So three bytes will be 24 bits.

So use this information to calculate the number of bytes required to represent this image.

So what do we do first? You multiply 640 times 500 by colour depth, which is three bytes, okay.

So that's the first part of your task.

And the second part of the task is convert the final answer, to kilobytes and megabytes.

So let's look at the solution, okay.

First, resolution is the total number of pixels in an image.

So that's 640 times 500 is 320,000 pixels, okay.

So the size is 320,000 pixels times three bytes per pixel.

So how would you calculate the file size? Its resolution times colour depth.

Resolution is the total number of pixels.

And colour depth is the sequence of binary bits used to represent pixels colour, okay.

So our image size here is 320,000 pixels, times three bytes per pixels.

So that will be 960,000 bytes.

The final answer is in bytes because he multiplied the colour of depth, which is three bytes, okay.

How would they convert this to kilobytes? Yes, you divide by 1,000, okay.

So you if you want to convert the bytes by kilobytes, you divide by 1,000.

So 960,000 bytes divided by 1,000 is 960 kilobytes.

What about megabytes? You divide the 960 kilobytes by 1,000 again, to get the megabyte.

So 960 kilobytes divided by 1,000 is 0.

96 megabytes.

Did you get it right? Well done.

I would love to see your work about colours.

So if you would like to share your book with Oak National, please ask your parent or carer to share your work on Instagram, Facebook, or Twitter, tagging @OakNational and #LearnwithOak.

Hope you enjoyed this lesson.

See you in lesson three.