Technical Questions Flashcards

1
Q

Outline the operation of the 3x3 mean filter.

A

Technique used to smooth or reduce noise in an image. The mean filter is a linear filter that calculates the mean intensity value of the surrounding pixels.

This can be done by summing the intensities of the surrounding pixels and dividing by the total number of pixels in the neighbourhood.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Outline the operation of the 3x3 median filter.

A

Technique used to smooth or reduce noise in an image. The median filter is a non-linear filter that calculates the median intensity value of the surrounding pixels.

This can be done by sorting the intensities of the surrounding pixels in ascending order, and then selecting the middle value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Outline the key elements of the multi-stage Canny edge detection process.

A

Key elements:
1. Noise Reduction: This is typically done using a Gaussian filter, which smooths the image by removing high-frequency noise while preserving the edges in the image.

  1. Gradient calculation: Typically done using the Sobel operator, which calculates the gradient magnitude and direction of the image at each pixel. The gradient magnitude indicates the strength of the edge of that pixel, while the gradient direction indicates the orientation of the edge.
  2. Non-maximum suppression: Done by comparing the gradient magnitude of each pixel with the gradient magnitudes of the pixels in its neighbourhood, and keeping only the maximum values. This step helps to thin the edges and remove false edges from the image.
  3. Hysteresis Thresholding: This is done by setting 2 threshold values, high and low. Pixels with gradient magnitudes above the high threshold are considered strong edges and are kept in the image. Pixels with gradient magnitude below the low threshold are considered weak edges and are removed from the image.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Outline an application of the Euler number to binary image analysis. What is a key advantage of this approach?

A

Object recognition:
Consider a binary image of a scene that contains several objects, such as a car, a tree, and a building. The Euler number can be used to identify and classify each of these objects by counting the number of connected components and holes in the image.

Key Advantage:
Robustness and reliability: Unlike other methods that rely on pixel values or geometric features, the Euler number is a topical invariant that is not affected by factors such as noise, blur or deformations in the image.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Outline the operation of the 3x3 Chamfer Algorithm based Distance Transform.

A

Calculates the distance from each pixel in an image to the nearest non-zero pixel
1. apply a horizontal and vertical dilation to the binary image using a 3x3 SE. = first distance map
2. Apply a diagonal dilation operation to the binary image. = Second distance map
3. Compute the final distance map by taking the minimum of the 1st and 2nd distance maps at each pixel.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Using the faster of the two approaches to Otsu thresholding (inter or intra class based variance), apply Otsu to the image segment illustrated in Figure Q1.3 for a sample threshold value of 1.

A

faster of the 2 approached = intra-class based variance.
Works by dividing the image into 2 classes: foreground pixels with intensity values above the threshold, and background pixels with intensity values below the threshold. The goal of the algorithm is to find the threshold value that minimises the intra-class variance, which is a measure of the spread of intensity values within each class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Outline a Mathematical Morphology based approach to the removal of an illumination gradient from a poorly acquired grey scale image.

A

Illumination gradients can cause uneven lighting and make it difficult to accurately analyse an image.
1. Convert the image to a binary image by applying a threshold to the pixel intensities. This divides the pixels into foreground and background pixels.
2. Use dilation & erosion to expand the foreground pixels and contract the background pixels. This removes some of the uneven lighting in the image by making both the foreground and background pixels more uniform.
3. Use opening to remove any small, isolated foreground pixels that may be present. Opening = a combination of erosion followed by dilation
4. Use closing to fill any small holes / gaps in the foreground. Closing = a combination of dilation followed by erosion.

The illumination gradient should now be significantly reduced and the objects in the image should be more uniformly lit and easier to analyse.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Outline an example of the Mathematical Morphology Erosion-Dilation Duality concept.

A

A fundamental concept in mathematical morphology that states that the erosion and dilation operations are not inverse of each other. This means that if an image is eroded and then dilated with the same SE, the resulting image will not be the same as the original image.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Using the concept of convolutional based filtering; develop a sequence of robust image processing and analysis steps to detect and highlight all the instances of the template letters “L” (Figure Q1.2) and “T” (Figure Q1.3) in the source image (Figure Q1.1). Assume both the source and template images are binary. You can assume that the template images are of the same scale as their corresponding entries in the source image.
What happens if you apply the templates to a rotated version of the source image?

A
  1. Load the input and template image. Convert both to greyscale to allow for further processing.
  2. Apply noise reduction (e.g. low pass Gaussian) filter is applied to the image to remove noise so that the data-driven thresholding stage operates more efficiently. This also has the effect of blurring the image.]
  3. Use a data-driven (otsu) threshold to separate out the regions of interest. The resultant image is binary.
  4. Clean the image to remove smaller blobs. Dilate (expand the binary image using a predetermined SE). This strengthens the image signal.
  5. Remove any objects touching the boundaries (reconstruction by dilation to remove boundary objects.)
  6. Label (shade the output image so that each binary blob i.e. letters is given a separate intensity value (grey-level patch). Measure the images associated region properties.
  7. Repeat steps for template image and match region area of template to region area.
  8. Isolate the L’s and T’s found.
  9. Use the convex hull (smallest convex polygon which will enclose the shape) to approximate the component shape.
  10. Highlight (overlay binary image found in 9) the convex hulls in the original image, to mark the regions with L’s and T’s.

Finally, we test the solution for robustness: noise, scale and rotation variations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Outline two different mathematical morphology Point-Pair structuring element based approaches to removing the non-parallel line from the binary image illustrated in Figure Q2.4. Assume the distance between the periodic lines is 16 pixels.

A
  1. dilation and subtraction: dilate the binary image using a point-pair SE that is parallel to the periodic lines and subtracting the dilated image from the original image. Point-pair SE should have a length equal to the distance 16 pixels. The subtraction operation will remove the non-parallel line, because it will be present only in the original image, and not in the dilated image.
  2. Opening and reconstruction: Open the binary image using a Point-pair SE that is parallel to the periodic lines and then reconstruct the image from the opened image. The point-pair SE should have a length of 16 pixels and should be orientated at an angle that is perpendicular to the periodic lines. The opening will remove the small objects in the image, and will open the gaps between the periodic lines, so that the periodic lines become separated and fragmented. The reconstruction restores the periodic lines, by dilation and erosion, so that the periodic lines become continuous and parallel, without the non-parallel line.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Detail how discrete convolution can be used as a filter in image processing. Give a detailed example of its usage.

A

Mathematical operation that can be used to filter images in image processing and analysis. Convolution is a point-to-point operation that modifies the value of each pixel in the image, based on the values of the pixels in a neighbourhood around the pixel.

  1. define the filter kernel: specifies the coefficients and the shape of the neighbourhood used in the convolution.
  2. pad the image: with a border of zeros, to avoid the boundary effects and to ensure that the convolution is performed on all pixels in the image.
  3. perform the convolution. dot product of the filter kernel and the neighbourhood
  4. unpad the image: removing the border of zeroes to restore the original size and shape of the image.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Outline the operation of a 5x5 Adaptive Threshold function.

A

A type of thresholding algorithm that automatically computes a local threshold value for each pixel in the image.
1. define a neighbourhood size: 5x5 size is used, 25 pixels.
2. Compute the local mean value: using a sample or a weighted average. It’s an estimate of the background intensity of the image.
3. Compute the local threshold value: the sum of the local mean value and the threshold coefficient, and determines whether the pixel is assigned to the foreground or the background region.
4. Binarise the image: compare the value of each pixel with the local threshold value, foreground region pixels are assigned 1, background is assigned 0.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Detail the operation of Freeman Chain Coding when applied to a binary image.

A

Method for representing the shape and the contour of an object in a binary image. Commonly used in IPA as it provides a compact and efficient way to encode the shape and the contour of the object, without the need for storing the pixels or the edges in the image.
1. Identify the starting point: first pixel in an object in a predefined search direction.
2. Trace the contour of the object: following the sequence of pixels that form the boundary of the object, starting from the starting point.
3. Encode the contour of the object: record the sequence of codes that corresponds to the pixels visited in the previous step.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Outline the operation of the Marr-Hildreth edge detector. Clearly indicate the role of the Gaussian in this approach.

A
  1. Convolve the image with a Gaussian kernel to smooth out any noise that might obscure the edges. This step is important because it allows the edge detector to focus on the overall structure of the image.
  2. Apply the Laplacian operator to the smoothed image to highlight areas of high spatial frequency, which are likely to correspond to edges.
  3. Threshold the output of the Laplacian operator to identify the strongest edges in the image. This involves setting a threshold value and only keeping the pixels that are above the threshold.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Develop a sequence of robust image processing and analysis steps using pseudo code to remove the boundary objects from a binary image

A
  1. Load the binary image
  2. Clean the image to remove smaller binary blobs (remove objects smaller than a specified size). Dilate (expand the binary image using a predetermined SE) the image to strengthen the image signal.
  3. Remove objects touching the boundary by reconstruction by dilation.
  4. Subtracted the dilated image from the binary image. This will produce a new image with the boundary objects removed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Detail the operation of the Maximum-likelihood Classifier for a two class problem.

A

Method of classifying objects into 2 classes based on their observed characteristics. Operates by finding the class that is most likely to produce the observed characteristics of the project.

Also referred to as Bayesian Classification.
Assume 2 classes of objects, C1 and C2, with a single feature(x) to distinguish these classes
Find the probability density function (PDF) for each class.
Measure of probability that an object from a given class will have a given feature value.
Found by measuring x for a large number of samples of each class.

17
Q

Outline one approach to image thresholding that is data driven (i.e. not dependent on a user defined fixed threshold value).

A

Dynamic thresholding:
The threshold value is determined automatically by the algorithm, and is updated as the algorithm processes the image.
Advantage: suitable for applications where the characteristics of the image may vary, or where it is not possible for the user to set the threshold value accurately.

18
Q

Develop a sequence of robust image processing and analysis steps using pseudo code to find the number of objects (gears) in the binary image (sequence of steps only)

A

Sequence of steps:
1. Load the input image.

  1. Clean the image to remove smaller binary blobs (remove objects smaller than a specified size). Dilate (expand the binary mage using a predetermined SE) the image to strengthen the image signal.

3.Apply a Hough Transform to detect the inner circles of the gears.

  1. Use the centre of the circle to identify the approximate centre of the gear, and to define a bounding box around the gears.
  2. Use region labelling of the inner circles and find the maximum label value to get the total number of gears.
19
Q

Disadvantage of run-coding

A

It is not lossless, meaning that it does not preserve all of the information in the original image. Run code algorithm only stores the runs of pixels, and discards information about the individual pixels in the image. As a result, the reconstructed image may not be identical to the original image, and may have some loss of detail or quality.

Not very versatile, as it only works for binary images with two colours. It cannot be used for images with more than 2 colours, or for images with continuous intensity values. This can limit its usefulness in applications where the input image may have more than 2 colours, or where the image may need to be processed in more detail.

20
Q

Outline how Convex Deficiencies can be used as a discriminating feature in binary image analysis.

A

Convex deficiencies are points in a binary image where the local convex hull of the object, which is the smallest convex polygon that encloses the object, is not equal to the object itself.
1. Compute the local convex hull of each object in the binary image, using a convex hull algorithm
2. Identify the points in the binary image where the convex hull is not equal to the object, and label these points as convex deficiencies.
3. Use the convex deficiencies as distinctive features for identifying and classifying the objects in the image.

21
Q

Using appropriate pseudo code, develop a convolution based N-tuple procedure capable of detecting the letter “t” in the image showing “can you locate the letter ‘t’ in this sentence”. State any assumptions clearly. Discuss the robustness of this approach.

A
  1. Load the input image, and convert it to greyscale to allow for further processing.
  2. Apply noise reduction [e.g. low pass (Gaussian) filter to remove noise so that the data-driven thresholding stage operates more efficiently. This also has the effect of blurring the image]
  3. Use a data-driven (return a threshold value based on Otsu’s method) threshold to separate out regions of interest. The resultant image is binary.
  4. Define a set of N-tuples, (small sub-images or patches that represent the shape of the letter “t”). These N-tuples can be obtained by using a template matching algorithm.
  5. For each N-tuple in the set, compute the convolution of the N-tuple with the image, using a convolution kernel that is designed to match the shape of the N-tuple.
  6. For each convolution result, threshold the result to remove noise and isolate the regions of the image that match the N-tuple.
  7. For each region of the image that matches the N-tuple, compute the centre of the region.
  8. If the centroids of the regions that match the N-tuple form a vertical line, then the letter “t” is detected in the image.

Robust as it uses convolution and N-tuples to detect the letter “t”, which are robust methods for patter recognition.

Limitations: the need for manually selecting N-tuples, and the assumption that the letter “t” is vertically aligned in the image.

22
Q

Using appropriate pseudo code, outline the operation of the Otsu approach to automated threshold selection. What are the key advantages and disadvantages of this approach?

A
  1. Load the input image, and convert it to greyscale to allow for further processing.
  2. Compute the histogram of the image, which is a plot of the number of pixels at each intensity level.
  3. For each possible threshold value t, compute the between-class variance s^2(t)
    - explain this
  4. Select the threshold value t that maximises the between class variance - this is the optimal threshold
  5. Threshold the image using the optimal threshold value, and return the thresholded image.

Advantage:
Automated - does not require the user to specify the threshold value
Based on well-defined objective function

Disadvantage:
Assumes that the image contains 2 dominant intensity levels, and that the histogram of the image can be modelled as a bimodal distribution.

23
Q

4 key stages in developing a solution

A
  1. Outline the key steps of your approach.
    - identify the feature that will allow you the greatest discrimination and/or analysis potential.
  2. Based on the outline description, break the problem down into discrete stages.
    - At each stage, determine the best methodology / algorithm.
  3. Implement your detailed solution in software.
  4. Test the solution