Labs:

Wednesday, 16:45-18:15, EB207


During the exercises, we will cover some topics of image analysis. Your task is complete and handover them for final grading. We'll use the OpenCV library in our implementation. You can read the explanatory text that describes the basic operations with images.
To code the exercises, you can use VS2017 project, Visual Studio Code, or source code with Makefile.
For VSCode, install these two extensions:
        code --install-extension ms-vscode.cpptools
        code --install-extension ms-vscode.cmake-tools

Exercise 1

Edge detection - first derivative
Text describing the content of the exercise is available in ex01 [PDF] or in a web presentation

Exercise 2

Edge detection - second derivative and Sobel operator (see the text from Exercise 1)
Image convolution is described here

Exercise 3

Image thresholding, object indexing.
Text describing the content of the exercise is available in ex01 [PDF] or in a web presentation.
For testing, use the image train.png from the directory images.

Exercise 4

Simple features computation.
In the last exercise, you implemented the algorithm for object indexing. After this step, every object in the image has its index id (1, 2, 3, ... or a random value, according to your implementation). Your task is to compute moments for each object and compute the features from them. Text describing the content of the exercise is available in ex02 [PDF] or in a web presentation.

Exercise 5

Etalons and their usage in object classification.
Text describing the content of the exercise is available in etalons.pdf or in a web presentation
Testing image test02.png
BONUS: You can also try a testing image test04.png that contains the circle object that is not in the training set. Try to create a new feature F3 such that this new object will be recognizable. Then, use train04.png for the training.

Exercise 6

Classification using k-means algorithm.
Text describing the content of the exercise is available in kmeans.pdf.

Exercise 7

Classification using neural networks.
Example of the neural network (NN) in OpenCV is here (read the comments in the source code).
Experiment with the NN and try to get as low testing error as possible. Afterwards, edit the neural network such that it would be able to classify the objects from the last exercises, i.e. using the features from Ex.4, classify the objects in the image test02.png with your NN.
BONUS: you can implement your own NN. Text describing the neural network is here.
The template for your NN is here.

Exercise 8

Classification using neural networks with the PyTorch framework.
Similarly as in Ex.7, create the neural network for the object classification in the image test02.png. The instructions are here.

Exercise 9

Hand written digits detection and classification using convolutional neural networks implemented in PyTorch framework. The instructions are here.

Exercise 10

Histogram of Oriented Gradients.
Text describing the content of the exercise is available in hog.pdf.
BONUS: Use HOG features to classify numbers.
Use a neural network (your own implementation, PyTorch or a network in OpenCV).
Use the images from the MNIST dataset to train and test the network. You can download the dataset here.

Exercise 11

SLIC Segmentation
Text describing the content of the exercise is available in slic.pdf.