Computer Vision · Beginner level

Beginner level · Module 2 of 6 · 8 guided hours

Digital Image Representation

How images are stored: pixels, resolution, channels, bit depth, colour spaces and file formats, explored hands-on as NumPy arrays with OpenCV and Pillow, with practical guidance on storage and compression.

Learning objectives

  • Explain pixels, channels, resolution and bit depth
  • Work with images as NumPy arrays and convert between colour spaces
  • Choose file formats and compression for storage and low bandwidth

Topics

  • pixels, resolution and coordinates
  • channels and bit depth
  • images as NumPy arrays
  • RGB, BGR, grayscale and HSV
  • file formats and compression
  • efficient image storage

Lessons

  1. Lesson 1 Pixels, Resolution and Coordinates

    Learners see that a digital image is a grid of numbers, learn how resolution and coordinates work and load a first image in a notebook.

    pixelresolutionrow-column coordinatesorigin at top-leftcv2.imread / plt.imshow

  2. Lesson 2 Images as NumPy Arrays

    Learners inspect colour images as three-dimensional arrays, slice and crop them, convert colour to grayscale and measure simple properties such as the share of green pixels.

    height × width × channelsuint8 (0–255)array slicinggrayscale weightsboolean masks

  3. Lesson 3 Colour Spaces, File Formats and Efficient Storage

    Learners convert between BGR, RGB and HSV, choose file formats, and reduce image size with resizing and compression so that datasets stay small enough for modest computers and slow connections.

    BGR vs RGBHSV (hue, saturation, value)JPEG and PNGcompression qualityresizing with INTER_AREA

Practical activity

Prepare the level project's image collection: gather licensed images and your own produce photographs, then resize, compress and organise them into folders by category with a short data description.

Expected outcomes

  • Confident handling of images as arrays
  • An efficiently stored, documented project dataset

Assessment

Practical test on array operations and colour conversion (50%) and the prepared dataset with description (50%).

Free taster lesson Images Are Grids of Numbers Read a free self-study lesson on this topic in the Free Course Library.

Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.