General information
About this site
On this site I will post content from my part of the course INF2310 — Digital Image Processing at the University of Oslo. It should not be confused with the the official course site. All relevan material on this site will be linked to from the official site, so that you do not need to be updated on both.
Image representation
In digital imaging, an image is essentially a function mapping indices to real (or complex) values
where the index set for . Normally we think of and as the height and with of the image, respectively, and as the number of channels. If we collect all the values for all indices in an array, we get the usual array-representation of an image .
Common image categories are bits one-channel (i.e. graylevel) images, taking values in , and rgb(a) images taking real values in for the red, blue, and green channel.
Coordinate conventions
In a conventional 2D Cartesian coordinate system, we use coordinates to specify a certain location on the plane. We have an origin at , a positive x-axis horizontally to the right, and a positive y-axis vertically upwards.
When we are dealing with digital images that are represented as an array with numbers, (e.g. a 2D graylevel image with vertical pixels, and horizontal pixels), this will be represented with a matrix (which values are the graylevel intensity values in the image). I will denote a pixel location with (or ), so that the positive (or ) -axis is vertically downwards, and the positive y (or ) -axis is horizontally to the right (that is, the conventional cartesian system is rotated 90 degrees clockwise).
Note that this conventionis not neccessarily followed by every programming
language and library. Most uses the same convention with
[row_index, column_index]
, but when naming the axis, there can be some
discrepancies (e.g. matplotlib.pyplot
in python uses positive downwards
and positive horizontally to the right). You can choose whatever convention
you want, as long as you know what you are doing, and are consistent, but this is
the way that works best for me.
I will explicitly use square brackets when dealing with images, and parenthesis when dealing with arguments of general mathematical functions.