CMPS210 Assignment 2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

CMPS210 Assignment 2

Image filtering

Instructions:
Please write your answers in a Word document (do not rewrite the questions) and upload it to
Moodle before April 28th at 23:59.
Your submission will be automatically screened for plagiarsim and if the similarity is higher
than 30%, your submission will be rejected.

Questions (1 mark for each question)

Consider the following image


13 22 14 19
22 16 10 8
13 13 20 20
23 13 8 16

And consider the following filters:

1 1 1 0 0 1
1 1
H1 = 𝐶 [0 2 0] and H2 = 𝐶 [0 2 1]
1 2
1 1 1 1 1 1

1. Calculate 𝐶1 and 𝐶2
Significant values

C1 x 0 1 2 3 4
−0.5/ 2 −2/ 2 −8/ 2
 * c( x) / 0.399 1 e e e
−0.5/ 2 −2/ 2 −8/ 2
c( x) / G(0) 1 e e e

C2 For σ=1:

x 0 1 2

c2( x) 0.399 0.242 0.05

1 0.6 0.125

2. Calculate the filtered value of the pixel f(2,1) using the correlation filters H1 and H2
a. Using zero padding

b. Using replication
3. Use the filters H1 and H2 to calculate the value of the pixel f(2,2) using the convolution
a. Using zero padding

b. Using replication.
4. What is the size of a Gaussian filter with 𝜎=5?
Solution:

The suggested channel Gaussian sometimes suggests that there is no movement.Paralysis of


the repetitive response itself (the great thing of a) Gaussian. So by choosing a highly
speculative Gaussian filter size we will be absolutely sure of what the size of the sites is but
which is within the image after the filter, which is not the state of the news channel. This is
limited to a few size acquisition methods as shown within the section at zero intersections.
(The Gaussian filter size additionally ends up being the best deal as the best channel for
identifying a location under non-determining measures of Cranny’s identity.)

5. Create a Gaussian filter with 𝜎=3?

Solution:
This is simply the product of two 1D Gaussian functions (one for eachdirection) and
is given by:

1
3 2
G(x, y) =2
2

A graphical representation of the 2D Gaussian distribution with mean(1,2)


and σ = 3 is shown to the right.

6. Explain why the size of the Gaussian filter is typically 5 𝜎?

Solution:

Because the different scales will be closer to n * * sigma, which means that with sigma = 1
the frame will be 5x5.
7. Explain why Gaussian filter operates faster than averaging filters.

Solution:
The Gaussian filter can be a direct channel. It is not uncommon for an image to be distorted
or disturbed. At the closed risk you are using and holding two, you will use them for "blank
cover" (side area). The Gaussian channel alone will blur the edges and reduce the contrast.

Median channel can be an indirect filter that is widely used as an easy way to reduce noise in
the middle of an image. It is special (over Gaussian turmoil) that it removes noise when
keeping the edges sharp enough.

Due to this reason the one advantage of a Gaussian filter work faster than average filter with
the faster for the reason that duplication and installation may be faster than planning average.

8. Explain how correlation filters can be used to detect edges in an image.

Solution:
Correlation approach to the acquisition of the image classification feature finds the edges
that apply to Sobel's bet on the sub-company. It goes before the sides in this focus when the
trend is very high. which can be used to underline the sides during an image, identifies
regions where there is a rapid pressure alternative using a discrete convolution section that
measures less than 2d of an image within a description.

Vertical edges. Vertical edges are often unfamiliar with using a visual-oriented manager
using feature exercises to hold limited angle limitations. Trends can provide double, positive
or negative limits, depending on the occurrence of the change.

You might also like