Image Processing
In the lecture, you have learnt that "pixel" is the basic unit of a digital image.
30 x 40 pixels, 8X zoom

1X zoom
In this tutoiral, we are going to learn some algorithms
which move pixels in different ways -- what is called "Image Processing".
The basic geometric transformations are translation, rotation,
and scaling.
Other transformations that are applied to digital images include reflection and shear.
Please note, we are NOT going to teach you how to use software to draw the pixel-image, but instead, you will be using Pen and Paper!!
Pixel Coordinates
Pixel coordinates enable you to specify locations within images.
In this coordinate system, the image is treated as a grid of discrete elements, ordered from top to bottom and left to right, like the following:
![]()
Be careful, some software and programming languages consider the top-left pixel to be located at (0, 0), instead of (1, 1). (that means the first row index = 0, first column index = 0 )
The Pixel Coordinate System
For pixel coordinates, the first component r (the row) increases downward, while the second component c (the column) increases to the right. Pixel coordinates are integer values (eg. 1, 6, 33) and range between 1 and the length of the row or column.
For example, here is the pixel located at row 2, column 3:
![]()

Raster dimensions in the pixel coordinate reference system.
Spatial Coordinates
In the pixel coordinate system, a pixel is treated as a discrete unit, uniquely identified by a single coordinate pair, such as (5,2). From this perspective, a location such as (5.3,2.2) is not meaningful.
In this spatial coordinate system, locations in an image are positions on a plane, and they are described in terms of x and y (not r and c as in the pixel coordinate system).
The following figure illustrates the spatial coordinate system used for images. Notice that y increases downward.
![]()
In this diagram, the pixels are modeled as squares, but this is somewhat misleading. Pixels usually aren't squares, they're little dots. Each square indicates the area lit by the pixel, but a pixel is always just a dot at the center of a square. The distinction may seem small, but it's important.

Remember, different tools may use different coordinate systems to represent apixel.
For example:
Since we wont use any software to create pixel-images in digital form, we can use any kind of coordinate system we like:

Order from bottom to top and left to right
