Part 1

Part 1 Pixels

What is a megapixel?

  • Digital cameras have sensors that record color at millions of points.
  • Those points are arranged in rows and columns. Every picture is essentially a 2D array.
  • Each point is called a PICTURE (PIX) ELEMENT. It's a pixel.
  • one megapixel = one million pixels
    • Want to learn more about digital cameras and megapixels? Click here

How are pixels represented in our computers?

  • the only thing we need to know is the color of each pixel
  • you can record color using the Red, Blue, Green (RGB) color model
    • each pixel gets a number from 0-255 for each color pathway - that's three numbers in all
    • ex: (40, 251, 103)
  • color make-up: paint vs. light
    • mixing paint: yellow + blue = green
    • RGB: red + green = yellow
    • computers use light to display color, which works differently
    • if you have ever seen a prism, you can see that white light contains other colors
    • sometimes, computers also store an "alpha-value" which determines how opaque/transparent the pixel is


How does the computer actually store the RGB numbers?

  • It uses binary! (test here)
  • 256 = 2^8 = 10000000
  • 255 = 2^8 - 1 = 11111111
  • so, the highest possible value uses 8 bits of memory
    • note: when you have a lower number, it still has to use a 0 as a placeholder, so it will still be 8 bits
  • 1 byte = 8 bits
  • Play a game of conversion here

Each part of the Pix Lab will have some questions associated with it. You will answer all questions in the same document. They may be either typed or handwritten (consider the legibility of your handwriting when you make this decision; you know who you are). Everybody will be turning in a paper copy at the end.


Part 1 Questions

  1. How many bytes does the computer use to store each pixel?
  2. How many bytes does the computer use to store a megapixel?
  3. How many bytes does the computer need to store a colored picture that is 600x400 pixels?

Part II ---