Labs:

Monday, 17:45-19:15

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 here [PDF]

Exercise 2

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

Exercise 3

Hough Line Transform
Text describing the content of the exercise is available here [PDF]. Download the testing image here.

Exercise 4

Image thresholding, object indexing.
Text describing the content of the exercise is available here [PDF].
For testing, use the image train.png from the directory images.

Exercise 5

Simple features computation.
In the last exercise, you have implemented the algorithm for object indexing. After this step, every object in the image has an 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 here [PDF].

Exercise 6

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

Exercise 7

Classification using k-means algorithm (see the text from Exercise 6).

Exercise 8

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. use the features from Ex.5 and classify the objects in the image test02.png with your NN.
BONUS (+10 points): you can implement your own NN. Text describing the neural network is here.
The template for your own NN is here.

Exercise 9

Histogram of Oriented Gradients.
Text describing the content of the exercise is available here.
Implement the method and test it on the image test.png.

Exercise 10

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

Exercise 11

Assignment.

Task Points
Edge detection (First+Second Derivative) 3
Hough Line Transform 3
Image thresholding, object indexing 3
Moments and features Computation 3
Classification using etalons 2
Classification using k-means 3
Classification using neural network 2
Histogram of oriented gradients 3
SLIC Segmentation 3
BONUS: Sobel operator 3
BONUS: New feature 3
BONUS: Own implementation of neural network 10