← Back to course
AI Explorers 3-5 / Week 03 / Thursday
4/6
Week 03 Β· Pictures as Numbers

Thursday

Pixel data for the sorting model
// Pixels and color values
⏱ about 15 min

Thursday: Pixel Data for the Sorting Model

Rocket lays out three tiny photo grids. Each one has only 9 pixels.

"How can the sorting model tell them apart?" he asks. "It only sees numbers!"

Raven studies the grids. "What do you notice? One is almost all gray. One is mostly green."

Nova bobs up and down. "Here is a hint," she says. "Count each color. Then compare."

Count the colors

A computer sees a photo as numbers. It can count them.

If most pixels are green, the photo might show a plant.

If most pixels are gray, it might show a rock. Or a metal tool!

Counting colors turns a photo into data the sorting model can use.

Here are three tiny photos. A means gray, W means white and G means green.

PhotoRow 1Row 2Row 3
Photo AA A AA W AA A A
Photo BG G WG G GW G G
Photo CA A WA A AW A A
How many gray (A) pixels are in Photo A?
How many green (G) pixels are in Photo B?
How many white (W) pixels are in Photo C?
SORT THE TINY PHOTOS
  • Read the question.
  • Tap your answer.
Photo B is mostly green with some white. Which label fits best?
Photo A is mostly gray. Which label is a good first guess?
Photo C is gray with shiny white spots. Can color alone tell rock from tool?

Show the data

A tally chart shows data so it is easy to compare.

Make one tally mark for each pixel of a color.

The longest row of tallies is the color the photo has most.

Photo B colorsTallyCount
Green (G)|||| ||7
White (W)||2
Gray (A)0
Statement about the tallyTrue or false?
Photo B has more green than white.?
Photo B has 0 gray pixels.?
The tally shows Photo B is mostly white.?
A tally chart helps us compare colors.?
WHY THIS EXERCISEThe tally shows green wins, which supports the claim that Photo B is a plant.
TURN A PHOTO INTO DATA
  • ?Use the counts to pick a label.
  • ?Count how many pixels are each color.
  • ?Show the counts in a tally chart.
  • ?The camera takes the photo.
  • ?The photo is stored as pixel numbers.
WHY THIS EXERCISEPixel numbers become data, and data helps the model sort.
Photo B has 7 green pixels out of 9. How many are not green?
WHY THIS EXERCISEComparing the numbers shows which color a photo has most.
DOES THE DATA SUPPORT THE CLAIM?
  • Read the question.
  • Tap your answer.
Claim: Photo A is mostly gray. Photo A has 8 gray pixels and 1 white. Supported?
Claim: Photo B is mostly gray. Photo B has 0 gray pixels. Supported?
Claim: Photo C has more gray than white. Photo C has 7 gray and 2 white. Supported?
For a grown-up
Ask your child to explain how a photo can become a tally chart.
Ask: what claim does the tally support? Why?

You turned photos into data! Tomorrow we review pixels and look at screens around us.

← Wednesday