Before the lesson
- Teacher video: Pixels
Teacher video: Pixels
- Presentation: Pixels
- Access to a spreadsheet program such as Microsoft Excel, Google Sheets or Apple Numbers, via computers, laptops or tablets – one per pupil or pair of pupils
- Squared or graph paper – one per pupil
- Resource: Pixels teacher information (see Classroom resources) – one for the teacher
- To understand how bit patterns represent images as pixels
Pupils should be taught to:
- Understand computer networks including the internet; how they can provide multiple services, such as the world-wide web; and the opportunities they offer for communication and collaboration
- I recall how computers transfer data in binary
- I can relate 8-bit binary to 256 possibilities
- I know that a pixel is the smallest possible element of a digital image
- I can explain how a series of pixels are used to encode an image.
Display slide 2 of the Presentation: Pixels and discuss the Learning objective and Success criteria.
Show on your interactive whiteboard
Slide 3: start by asking the ‘Key Questions’ question.
By now children will be familiar with the whole Mars Rover project, so this should stimulate some interesting discussion about the temperature of Mars, the atmosphere, whether there is/was water, and whether there was/is/could be life on Mars.
Slide 4: if the conversation does not lead to it naturally, discuss the importance of images sent back from the Mars Rover, as we can learn a lot from seeing what it looks like and how that changes over time.
Have a look at the latest images sent back from the Rover on the ‘NASA’s Mars Rover Mission Updates’ page or the ‘NASA’s Mars Rover Gallery’ page, which, although not updated, has lots of interesting images.
Slide 5: recap from the first half of the topic, that all the transmissions from the Mars Rover – like the transmissions within and between most computers – are in binary.
Ask: how is binary used to transfer the data of a photo?
- What do you think is the most useful data that has been or could be sent back from the Mars Rover? (There is no “answer” to this, but most would suggest that the digital images are the most valuable.)
- How is binary used to transfer the data of a photo?
Slide 6: open the ‘NASA’s Space Place Binary Code Pictures’ and hover your cursor over the picture of Saturn or Jupiter. You will see that the image changes to a binary image (of 1s and 0s).
Remember, computer data is all transmitted as binary: Ones and Zeros (Ons and Offs).
Slide 7: display a pixelated picture (such as the one below )
When you look at this picture, your eyes and your mind work together to do something rather clever. The Greeks and Romans used a similar technique to make mosaics by sticking lots of coloured tiles one after the other to make patterns or images.
Slide 8: your mind stitches together a picture, from the different tiles of colour. And as long as you are able to see the whole of the picture, your mind can usually work out what it is looking at.
When a camera takes a photo, it does a similar thing. It codes the image into coloured blocks, or pixels.
Each pixel is a single block of colour, like the tiles in a mosaic.
Slide 9 and 10: to transfer the data for this image, the computer has to use a code to represent this colour.
If the computer is using standard 8-bit binary (8 bits is also referred to as a byte), it has 256 different possibilities. As the children will have already learnt, when looking at the ASCII computer code, each of these 256 possibilities can be used to represent letters and numbers, as well as representing colours.
Slide 11: the Mars Rover, or any device that is going to transmit an image has to break it down into these individual pixels.
Slide 12: now look at the ‘NASA’s Billion Pixel Picture of Mars’.
You should then be able to zoom in on the image down to the tiniest pixel and explore the image.
Draw pupils’ attention to the following:
- There are sections in black and white.
- You can see the stitch lines between the different images
- You can zoom in on interesting details, such as the tracks in the dust, and the ripple lines on the sand which suggest Martian winds.
Slide 13: hand out pieces of squared or graph paper and ask children to create a rough design of a pixel image.
They should then open up the spreadsheet software you are using (Excel, Google Sheets, Numbers etc.). Demonstrate how they should adjust the cells to make them equal in length and width. In most spreadsheet software, you can do this by highlighting the columns you want to alter, right clicking and selecting ‘resize columns’.
You need to select a column width for all of the columns you’ve highlighted. You can do the same with the rows to make each cell a square.
Slide 14: model the activity for children to create a pixel picture inspired by Mars/Mars Rover/Space. Using their rough design on paper, they will need to select cells and use ‘fill’ to colour in each one and draw a picture. Make sure they know how to colour cells.
Slide 15: they can then create their picture by filling a cell (or pixel) at a time.
If they want to create a larger, more complex picture, they can explore the ‘Pixilart’ website.
The activity is self-extending in that children can spend as much time as they want on this. Real ‘works-of-art’ could be created. The main opportunity to extend the learning is to direct children towards the Custom tab, and the Red, Green, Blue values (see the wrap-up).
Pupils needing extra support: Create an excel spreadsheet with the correct row/column width. These students could then be directed how to open this on their device, and spend more time filling in the pixels, rather than adjusting the size.
Pupils working at greater depth: These students could adjust the column width/row height to be even smaller so that they have more “pixels”, or could simply zoom out. Also, they should be encouraged to think about shading images using a range of colours, not just the primary ones. Finally, they could be directed to the ‘Space Place website’ to do more research about sending images back from space.
Slide 16: if children have not discovered this themselves, show them the “custom” area of the colour selection box. Click on ‘More colours’ and then ‘Custom’.
If you’re using Excel, you will see three numbers which represent RGB (red, green and blue), however, if you’re using Google sheets, you will see a hex code which is made up of numbers and letters. In this case, use a website such as ‘Rapid Tables’ to look at the RGB codes of varying colours.
Start off by setting values of:
What happens? They will notice that the colour is bright red.
What about if you change it to:
This should produce a vibrant pink. Ask children to suggest other colour values and predict what happens.
What happens if all colours are set to 255. By setting all of the values to 0, you should end up with white because this indicates all of the three colours on full. Why do you think 255 is the top number? (it’s binary again! Because 8 bit binary has 256 combinations, so 0-255 covers 256 possibilities. It all comes back to 8 bit binary!)
If children do not understand how red/green/blue makes up all the different colours, ask them if they have ever seen inside the school printer. These use three different coloured inks, which mix like paint to make any colour the printer needs. Light works in much the same way.
Assessing pupils' progress and understanding
Pupils with secure understanding indicated by: Creating a pixel picture, explaining that a pixel is the smallest element of a digital image and that binary is used to code and transfer this data.
Pupils working at greater depth indicated by: Explaining in more depth, the process of digital image capture, data transfer and digital display as well as recalling previous lessons and link ‘A way of telling the computer what you want it to do., memory and output’ to digital image capture, processing and display.
A way of seeing whether the computer has done what you asked it to....