A collection of matlab scripts illustrating different concepts in image analysis The scripts are constructed for the basic course in image analysis. at Lund University, Sweden. The examples are intended to illustrate concepts and algorithms in the course. This means that most often the algorithms are implemented in a way that resembles the equations or the theory. To get really efficient and robust algorithms, one often has to implement all kinds of bells and whistles. Such algorithms are often implemented in packages/modules/toolboxes for different programming languages, e.g.

Suggestions and/or corrections are always appreciated. All data and scripts are open source and can be found at http://github.com/kalleastrom/ImageAnalysisExamples.- Lecture 1 - Images, Sampling, Interpolation, Gray-scale transformations
- Getting started with images.. A small example on how to load images, colors, coordinate systems.
- One-dimensional interpolation example..
- Interpolating in images
- Histogram equalization

- Lecture 2 - Machine Learning 1
- Classification of pixels in two classes (heart, background) using grayscale (MR). Using 6 grayscale bins.
- Classification of pixels in two classes (heart, background) using grayscale (MR). Using many bins.
- Classification of colour pixels in three classes (grass, castle, sky) using grayscale (MR). Using 10 bins from K-means.
- Classification of gray-scale pixels in three classes (grass, castle, sky) using plug-in classifier and logistic regression.
- Classification of gray-scale pixels in three classes (grass, castle, sky) using plug-in classifier and logistic regression.

- Lecture 3 - Linear Algebra and FFT
- Lecture 4 - Convolutions
- Lecture 5 - Feature Detection
- Finding blobs by smoothing followed by local maximum suppression and thresholdin g.. Also with sub-pixel refinement.
- Finding edges by calculating gradient magnitude and angle from smoothed image.. However, without thresholding and non-maximum supression.
- Finding edges by calculating gradient magnitude and angle from smoothed image.. This time with thresholding, non-maximum suppression, sub-pixel refinement and linking edgelets together if they forme a low curvature curve.

- Lecture 6 - Machine Learning 2
- Lecture 7 - Deep Learning
- Three examples on how to fit a line to points in 2D. First least squares, then total least squares and finally using the singular value decomposition.