3.3. Representing Images

This lesson reinforces two important enduring understandings. First, a variety of abstractions built upon binary sequences can be used to represent all digital data. In this lesson, students see how digital sequences can be used to represent images. And, second, there are always trade-offs when representing information as digital data. In this lesson, we explore trade-offs that occur when compressing images: lossy compression algorithms trade the loss of some bits from the image in order to get higher levels of compression.


CSP Framework
Big Idea 2: Data (DAT)
Enduring Understanding DAT-1: The way a computer represents data internally is different from the way the data is interpreted and displayed for the user. Programs are used to translate data into a representation more easily understood by people.
Learning Objective DAT-1.A: Explain how data can be represented using bits.
Learning Objective DAT-1.D: Compare data compression algorithms to determine which is best in a particular context.

Professional Development

Complete the activities for Unit 3 Lesson 3.3: Representing Images.

Materials

3.3.1. Learning Activities

Estimated Length: 90 minutes

  • Hook/Motivation (10 minutes): Ask students to think about how images are represented on computers. Look at a zoomed in image to see the pixels (example at http://introcomputing.org/image-1-introduction.html). If no one mentions it, explain computers break down images into pixels, and that the term pixel is short for "picture element." Discuss image representation with the class, being sure to cover the following points:
    • After breaking an image into pixels, computers use a variety of methods to represent each pixel or groups of pixels as numbers.
    • Numbers are translated to bits, which are stored and sent like any other data.
    • Other computers use the bits to reconstruct image.
    • Storing specific information about every single bit would be an enormous amount of data for an image. What are some ways a computer might store an image using less data? Compression techniques!
  • Experiences and Exploration (70 minutes):
    • Have students watch the CS Unplugged video on image compression for a quick look at one way that images are represented and compressed.
    • Do the RLE compression for the letter a below as a class or in pairs (the first row is 1, 3, 1). Draw it in on the board or in the interactive pixel grid under Practice in the student side or copy the image to a projected document.
    • Have students work in POGIL groups or pairs to complete the Image Representation worksheet. They could do these on paper or using the interactive pixel grid under Practice on the student side.
    • Talk about how color is represented using RGB values, RGB Color explorer

    When finished, present a more detailed explanation of run-length encoding, storing images on computers, and other image compression techniques. Mention the trade-off in compression which is quality vs. file size and lossy vs. lossless compression (whether some data is lost when compressing, see this additional resource on lossy vs. lossless compression). There are several ways you can present this information. If you are new to teaching Mobile CSP, we suggest starting by having students watch the video lecture. As you become more familiar with the lesson and its content, you may decide to use the slides to give the lecture on your own, or guide students through reading the text-based lesson.

    • Have students watch the video of the Mobile CSP version of the lecture
    • Use the slides to give the lecture yourself.
    • Have students read the text-based version of the lesson.
  • Optional Activities: If you have extra time, have students complete some of the "Other Activities" on the student side and watch some of the Still Curious videos (e.g.How Snapchat Filters work).
  • Rethink, Reflect, and/or Revise (10 minutes): Have students complete the first two questions of their portfolio reflections in class and tell them to complete the last question for homework.

3.3.2. Professional Development Reflection

Discuss the following questions with other teachers in your professional development program.

  • How does this lesson help students toward the enduring understanding that all digital data can be represented by a variety of abstractions built upon binary sequences?
  • What might be some other trade-offs that students could connect to that would reinforce the enduring understanding that there are trade-offs when representing information as digital data? 
  • How does this lesson develop students' computational thinking practices, particularly their analysis and problem solving skills and their ability to use abstractions?

    I am confident I can teach this lesson to my students.
  • 1. Strongly Agree
  • 2. Agree
  • 3. Neutral
  • 4. Disagree
  • 5. Strongly Disagree

Before you keep reading...

Making great stuff takes time and $$. If you appreciate the book you are reading now and want to keep quality materials free for other students please consider a donation to Runestone Academy. We ask that you consider a $10 donation, but if you can give more thats great, if $10 is too much for your budget we would be happy with whatever you can afford as a show of support.