You are on page 1of 7

Department of Mechanical Engineering

Biomechanics (Daytime)
First Written Test of Image Processing
Academic Year 2022/2023 — 3.o Year — 2.o Semester
Duration of the Written Test: 2 hours + 45 minutes — 15/April/2023

Clearly identify the groups and questions you are answering.

Use only a blue or black pen or ballpoint pen, and do not use correction devices.

You may use a calculator during the written test.

The written test is without consultation and includes a form on page 7.

The written test consists of 2 groups and has 7 pages.

The marks will be published in the Moodle platform until 27/April/2023.

Present with rigor and clarity all the calculations, justifying your answers conveniently.

1. [10.0 values] “Fluorescence is understood as the property that some substances possess, after
being excited with low wavelength radiation, resulting in the emission of longer wavelength
radiation. Thus, certain substances absorb the energy of ultraviolet light and then emit
radiation within the visible light spectrum.

One of the devices that allows the observation of ‡uorescence is called a ‡uorescence microscope
and its discovery was a major breakthrough in the study of cell structures and their constituents.
The ‡uorescence microscope is a variation of the ultraviolet light microscope in which objects are
illuminated by rays of a certain wavelength. The observed image is the result of electromagnetic
radiation emitted by molecules that have absorbed primary excitation and re-emitted a longer
wavelength of light. To let only the desired secondary emission pass, appropriate …lters should be
placed under the condenser and above the objective.”

(https://pt.wikipedia.org/wiki/Microscopia_de_fluorescência).

(a) [1.0 value] Brie‡y describe the process of acquiring a digital image and based on the presented
text, describe the concept of re‡ectance and indicate, with justi…cation, how this concept is
evaluated during the process of acquiring a digital image.

(b) [9.0 values] Figure 1, obtained from the indicated webpage, is an example of the type of digital
images that can be obtained with the ‡uorescence microscope and shows bovine pulmonary
artery endothelial cells.
In the RGB colour model, a small region has been selected and the matrices R, G and B,
present the intensity levels of the pixels of that region where:

1
the region starts at the pixel of spatial coordinates (286; 101);
pixel P is the isolated pixel identi…ed in the matrices;
region I is the region identi…ed in the matrices on the upper left and composed by 8 pixels
(4 2 matrix type);
region II is the region identi…ed in the matrices on the lower right and composed by 6
pixels (2 3 matrix type).

2 3
206 188 187 195 215
6 7
6 7
6 238 240 245 246 247 7
6 7
6 238 235 234 229 232 7
6 7
6 7
6 239 237 242 191 180 7
6 7
6 7
R=6
6 203 193 167 109 105 7
7
6 7
6 102 89 72 51 53 7
6 7
6 7
6 79 89 86 76 44 7
6 7
6 7
6 86 87 83 74 52 7
4 5
42 26 21 18 23

Figure 1: endothelial cells.

2 3 2 3
96 86 87 94 106 17 2 1 6 21
6 7 6 7
6 7 6 7
6 88 84 79 76 76 7 6 27 23 19 17 20 7
6 7 6 7
6 59 49 42 37 46 7 6 19 10 3 0 5 7
6 7 6 7
6 7 6 7
6 41 44 66 28 28 7 6 28 29 42 0 0 7
6 7 6 7
6 7 6 7
G=6
6 35 34 36 0 9 77 B=6
6 34 31 18 0 0 7
7
6 7 6 7
6 11 8 15 14 35 7 6 10 4 0 0 0 7
6 7 6 7
6 7 6 7
6 32 54 62 63 45 7 6 38 58 60 54 29 7
6 7 6 7
6 7 6 7
6 67 81 81 78 59 7 6 99 109 102 90 65 7
4 5 4 5
80 71 68 62 59 155 138 124 107 95

i. [1.0 value] In the context of space domain …ltering, de…ne the concept of normalization
of a digital image and state its importance in space domain …ltering.
ii. [1.5 value] Determine the intensity levels that result from applying the radiometric
transformation de…ned by,

2
0:8
R (x; y) + 6G (x; y) + 3B (x; y)
g (x; y) =
10
to the pixels of region I and present the …nal result as a 5-bit monochrome digital image.
iii. [1.5 value] Determine the result of converting the pixels in region II to a monochrome
digital image using 12:5 % red map and 63:2 % blue map and present the …nal result as a
4-bit monochrome digital image.
iv. [1.0 value] Determine the approximation of the 4-bit monochrome digital from the
previous question by eliminating the two least signi…cant bit planes.
v. [1.5 value] Determine, in the HSI colour model, the coe¢ cients of pixel P and provide a
characterisation of pixel P in this colour model.
vi. [1.0 value] Characterize the HSI colour model and describe how a colour in the HSI colour
model is converted to a colour in the RGB colour model.
vii. [1.5 value] In the HSI colour model, pixel Q has approximately the coe¢ cients,

(0:9834; 0:1940; 0:2627) .

Determine its spatial coordinates and the distance d4 (P; Q).

2. [10.0 values] “Parasitic twin or also called fetus in fetu is a very rare case in which a non-viable
or malformed fetus is encompassed by the fetus of its normally developing twin. It is believed that
one case occurs in every 500,000 births, and there are less than 100 cases cited in the literature
worldwide.”(https://pt.wikipedia.org/wiki/Gêmeo_parasita).

In the December 2022 issue of the scienti…c journal Neurology, the surgery and follow-up case were
described by doctors at Fudan University in Shanghai, in which the parasitic twin grew inside the
sister’s skull. Figure 2 shows one of the CT scan images obtained of the girl with the parasitic
twin inside her skull.

Figure 2: CT scan image.

3
Applying the function de…ned by parts to Figure 2, whose graph is shown in Figure 3, we obtain
Figure 4.

Figure 3: graph of the function de…ned by parts.

Figure 4: result from Figure 3.

Solve the items on …ltering in the space domain of monochrome digital images.

(a) [1.0 value] Describe the concept of a function de…ned by parts and de…ne analytically the
function depicted in Figure 3. Brie‡y state what is intended to be done to Figure 2 with this
function de…ned by parts.

4
(b) [1.0 value] Describe the concept of a histogram of a monochrome digital image and state how
the equalization of the histogram is performed and what disadvantages may result.

(c) [2.0 values] Figure 5 is a representation of Figure 4 as a 3-bit monochrome digital image and
the table shows the number of pixels at each of its intensity levels (Note: Figure 5 has 89238
pixels).

Figure 5: 3-bit monochrome digital image.

r0 r1 r2 r3 r4 r5 r6 r7
15432 18277 7490 5321 12621 2475 576 27046
Determine the …nal correspondence between the intensity levels of the monochrome digital
image in Figure 5 after histogram equalization and the intensity levels that result from
specifying the histogram with the probability distribution de…ned in the vector d,
h iT
d = 0:150 0:100 0:100 0:250 0:150 0:200 0:040 0:010 .

(d) [1.0 value] Present a sketch of the initial histogram and the equalized histogram and brie‡y
state the result obtained.

(e) [5.0 values] In Figure 5 a small region has been selected and the matrix M presents the
intensity levels of the pixels in this region where:

pixel P is the isolated pixel identi…ed in the matrix with the intensity level 68;
pixel Q is the isolated pixel identi…ed in the matrix with the intensity level 120;
region I is the region identi…ed in the matrix in the lower right corner and composed by 4
pixels(2 2 matrix type).
region II is the region identi…ed in the matrix in the upper left corner and composed by 6
pixels (2 3 matrix type);
region III is the region identi…ed in the matrix in the lower left corner and composed by 6
pixels (3 2 matrix type).

5
2 3
67 67 67 65 65 69 71 71
6 7
6 7
6 70 70 68 68 69
67 7 70 70
6 7
6 71 71 70 70 70 68 68 70 7
6 7
6 7
6 71 69 68 68 65 65 67 68 7
6 7
6 7
6 71 71 75 74 72 72 69 66 7
6 7
M =6 7
6 78 72 68 74 74 72 72 72 7
6 7
6 7
6 121 77 73 74 74 75 77 78 7
6 7
6 7
6 126 123 121 120 120 121 122 122 7
6 7
6 7
6 132 130 127 128 127 125 125 127 7
4 5
134 132 131 133 130 125 127 127
i. [1.0 value] State, justifying, whether pixels P and Q are d-connected, in the intensity set
de…ned by, V1 = fv 2 M : v 68g and whether they are m-connected, in the intensity set
de…ned by, V2 = fv 2 M : 68 v 74g.
ii. [1.0 value] Determine the result of …ltering the pixels of region I, using the edge
replication technique and applying the weighted average smoothing …lter of type 2 2,
whose coe¢ cients are those of the matrix F ilter2 2 de…ned by,
2 3
1 3 1 5
F ilter2 2 = 4 .
5 1 0

iii. [1.0 value] Determine the result of …ltering the pixels of region II, using the image
reduction technique and applying the weighted average smoothing …lter of type 3 3,
whose coe¢ cients are those of the matrix F ilter3 3 de…ned by,
2 3
0 1 0
1 66
7
7
F ilter3 3 = 6 1 6 1 7.
10 4 5
0 1 0

iv. [2.0 values] Determine the result of …ltering the pixels of region III, using the zero-padding
technique and applying by convolution the …lter of type 2 4, whose coe¢ cients are those
of the matrix F ilter2 4 de…ned by,
2 3
0 1 1 1
F ilter2 4 =4 5.
1 5 1 0

Note: the …lter anchor coe¢ cient is the one in row 1 and column 3.

6
Form
Converting from RGB Color Model to HSI Color Model
8 0 1
< se B G (R G) + (R B)
H= with = cos 1 @ q A
: 360o se B > G 2
2 (R G) + (R B) (G B)

3 min (R; G; B) R+G+B


S=1 I=
R+G+B 3

Converting from HSI Color Model to RGB Color Model

Sector RG (0o H < 120o ) Sector GB (120o H < 240o )

B = I (1 S) R = I (1 S)

S cos (H) S cos (H 120o )


R=I 1+ G=I 1+
cos (60o H) cos (180o H)

G=3 I (B + R) B=3 I (R + G)

Sector BR (240o H < 360o )

G = I (1 S)

S cos (H 240o )
B=I 1+
cos (300o H)

R=3 I (G + B)

You might also like