Академический Документы
Профессиональный Документы
Культура Документы
Blob analysis
STEP 1: Non-parametric image segmentation
The algorithm for this
step is as follows:
STEP 1: Non-parametric image segmentation
Lines 11-14 transform the RGB coordinates of the image into
normalized chromaticity coordinates (NCC) to consider the shading
variation.
Lines 17-22 extract a region of interest (ROI) from the image and
transform the RGB coordination of the ROI into NCC.
Lines 26-48 performs non-parametric segmentation. This method
utilizes histogram backprojection where the pixels of the image were
replaced with their corresponding histogram value in the chromaticity
space.
I chose the non-parametric method because I realized from doing the
Activity 7 that the amount of segmentation can be varied by changing
the number of bins used in non-parametric method. Hence, this
method is more flexible than the parametric method.
STEP 1: Non-parametric image segmentation
Figure 4.1: Image obtained Figure 4.2: Image obtained after Figure 4.3: Image obtained
after the 1st imerode() function the 2nd imerode() function after the imopen() function
STEP 2.3: Image cleaning by watershed segmentation
Lines 77-81 perform watershed segmentation on the image to separate
touching blobs. Here, the watershed() function treats the image as a
surface with high elevations at the white pixels and low elevations at
the dark pixels. To use this, we filter out tiny maxima that are in the
middle of the blobs in line 78 and 79. Then, we compute its watershed
transform in line 80. The ridge lines of the watershed was then used to
segment the original image in line 81.
Reference:
https://blogs.mathworks.com/steve/2013/11/19/watershed-
transform-question-from-tech-support/
STEP 2.3: Image cleaning by watershed segmentation
Figure 5.2 is the result of
the watershed
segmentation. As shown,
the connected blobs are
separated. As shown, the
blobs are have similar
shapes and sizes to their
cells counterpart which is
shown in Figure 5.1. We
can now perform blob
analysis to get the shape
features of the cells in the Figure 5.1: Original Image Figure 5.2: Image obtained
image. after cleaning
STEP 3: Blob analysis
Lines 85-96 performs labelling and displays the label on the
centroid of the corresponding blob. By using
numel(regionprops()) function, I found that there are 104 cells
in the image. 40 63 96
16 44 54 97
37
1 11 24
48 86
34 57 69
2 13 29
20 36 100
59 82
3 14 73 90
25 43 104
4 35
75
39 52
5 74 83 102
19 38 93
27 51 76
9 87 103
21 67
33 42
15
49
6 58
62 77
10 31 95
18 45 70
91
66 81
30 47
23 53 61 101
89
8 26 65 71
32 41
50 79 92
12 17 55 64 85 99
68 80
7 56 94
22 84 98
46 60 72
28 78 88
Figure 6.1: Algorithm for this step Figure 6.2: Final blob image with labels
STEP 3: Blob analysis
I did lines 100-105 for fun. These lines result to an image that
displays the centroids and the borders of the blobs.
They show the best estimate of the average cell area, average
eccentricity, average major axis length, average minimum axis
length and the average perimeter.
STEP 3: Blob analysis
Here’s the data obtained. Note that this is in number of pixels.
Since I resized the image in line 6 to 600 pixels by 600 pixels, my
result may differ from other people’s result.
Figure 9.1: Final blob image Figure 9.2: Final blob image
from previous algorithm when for this investigation when
imerode() was used twice. imerode() is not used. Self-evaluation: 12/10