Task 1

Task 2

Task 3

Task 4

Figure 4.1 Original `circles.png`.

a)

Here, we perform edge detection with two different sizes disks as structuring elements.

Figure 4.2 Disk structuring elements with radius 1 (left) and 4 (right.
Figure 4.2 Morphological edge detection with strucutre element radius 1 (left) and 4 (right).

b)

Figure 4.3 Skeleton of `circles.png`.

c)

Figure 4.4 Half checkerboard.

First, we try with a hit-or-miss with structure elements

and the results can be seen in Figure 4.5.

Figure 4.5 Hit-or-miss transform.

If we in stead employ the following structuring elements

we get the location the top right corner of all white squares, as shown in Figure 4.6.

Figure 4.6 Hit-or-miss transform.

Task 5

The original image is shown in Figure 5.1.

Figure 5.1 Electronic circuit image.

First, we fill the holes of the image.

Figure 5.2 Figure 5.1 with filled holes.

Then, we subtract the original image from the filled one to obtain the holes.

Figure 5.3 Holes of Figure 5.1.

Using the fact that they are almost circular, we can compute the the diameter from the perimeter and the location of the center points. The result is shown in Figure 5.4.

Figure 5.4 Holes with center points and diameters.

Task 6

Original image showing the start of the decimal progression of superimposed over a version of the Mona Lisa painting. The task is to isolate the numbers in the image.

Figure 6.1 Original image.

Trying with a simple, global thresholding works poorly.

Figure 6.2 Global thresholding with Otsu's binarization.

We clearly need another approach. We will try to separate the numbers and the Mona Lisa background, and we do it by first extracting the background with morphological closing

Figure 6.3 Mona Lisa background.

and subtract the original from this background image.

Figure 6.4 Subtraction of original from the background.

This is exactly (per definition) the same as performing a bottom-hat (or black top-hat) transformation on the original image, which can be seen by comparing Figure 6.4. and Figure 6.5.

Figure 6.5 Black top-hat transformation of the original.

Employing a global thresholding on this image is more successful.

Figure 6.6 Result after global thresholding is employed on the image in Figure 6.5 (and Figure 6.4. since they are identical).

We can clean the result by removing the pixel dust (salt noise).

Figure 6.7 Black top-hat transformation of the original.

Finally, we invert the colors.

Figure 6.8 Final image on the left, which can be compared with the original on the right.