Beruflich Dokumente
Kultur Dokumente
Nanoparticles in Zebrafish
using Particle Tracking
Velocimetry.
Shako Farhad
Master’s Thesis, Spring 2018
This master’s thesis is submitted under the master’s programme Computational
Science and Engineering, with programme option Computational Science, at the
Department of Mathematics, University of Oslo. The scope of the thesis is 60
credits.
The front page depicts a section of the root system of the exceptional Lie group E8 ,
projected into the plane. Lie groups were invented by the Norwegian mathematician
Sophus Lie (1842–1899) to express symmetries in differential equations and today
they play a central role in various parts of mathematics.
Abstract
Cancer is a major public health problem worldwide where it is the second leading
cause of death. To improve safety and efficacy of anti-cancer drugs with less
side effects, nanoparticles (NPs) have been studied heavily. The concept of
selectively detecting and destroying cancer cells with NPs is very exciting, but
from the past 10 years only 0.7% (median) of the administered NP dose is
found to be delivered to a solid tumour. To best be able to study the flow and
distribution of fluorescent NPs in vivo, the zebrafish model has become very
popular as it is optically transparent for easy imaging.
Particle Image Velocimetry (PIV) is a non-intrusive optical measurement
method, which gives velocity fields resolved in both time and space. Using PIV
as the backbone a Particle Tracking Velocimetry (PTV) code was developed
to track NPs varying in scale from 100 nm to 1200 nm. The mean and STD
percentage of nanoparticle trajectories that are likely to end up in the vein
margin within the next frame decreases with nanoparticle size (800 nm, 400
nm, 200 nm). Distribution of nanoparticle trajectories throughout the vein in
relation to different nanoparticle sizes needs more data to determine anything
conclusively.
ACKNOWLEDGEMENTS
I want to thank Kent Andre Mardal, my supervisor, more than anyone for
guiding me, giving me ways to improve the tracking accuracy and ways to in-
vestigate the particle trajectories further. Most of all I want to thank Kent
Andre for being patient with me and being understanding. Kent Andre also in-
troduced me to Federico Fenaroli which I am very thankful for. Federico helped
me immensely to gather the data and explain more about nanoparticle research.
Thanks to Jostein Kolaas and his HydroLabPIV code which has been pivotal
and is the backbone of my PTV code. It is the most important piece of code in
my thesis. Also thanks to Daniel Blair and Eric Dufresne their combinatorical
MATLAB tracking code (track.m), I could swiftly get results and compare my
Particle Tracking Velocimetry (PTV) implementation with it during develop-
ment. Also their particle finder (pkfnd.m) and bandpass filter (bpass.m) gave
me lots of inspiration and a starting point for my own particle finder and filters.
1
List of Figures
2
2.30 Example of PTV trajectory plot with magnitude of velocity field
as background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
2.31 Extract data; dialog box 1 . . . . . . . . . . . . . . . . . . . . . . 50
2.32 Extract data; fitted power law . . . . . . . . . . . . . . . . . . . . 51
2.33 Extract data; selected endpoints . . . . . . . . . . . . . . . . . . 52
2.34 Extract data; number of particles per frame . . . . . . . . . . . . 53
2.35 Extract data; quiver plot with all particle trajectories . . . . . . 54
2.36 Extract data; with limited particle trajectories . . . . . . . . . . 55
2.37 Source image with regions of no nanoparticle flow activity. . . . . 59
2.38 Cropped source image in figure 2.37 with ’cropImagesInFolder.m’
script. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
2.39 Cropping images . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
3
3.24 Results; added image intensities and mask for image set 4 (800
nm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
3.25 Results; particle trajectories plotted on the distance to vein mar-
gin for image set 4 (800 nm) . . . . . . . . . . . . . . . . . . . . . 83
3.26 Results; particle trajectories plotted on the magnitude velocity
field for image set 4 (800 nm) . . . . . . . . . . . . . . . . . . . . 84
3.27 Results; fitted power law for image set 4 (800 nm) . . . . . . . . 85
3.28 Results; reference line for image set 4 (800 nm) . . . . . . . . . . 86
3.29 Results; number of particles per frame for image set 4 (800 nm) . 87
3.30 Results; first image from image set 1 (400 nm) . . . . . . . . . . 88
3.31 Results; PIV signal to noise ratio for image set 1 (400 nm) . . . . 88
3.32 Results; added image intensities and mask for image set 1 (400
nm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
3.33 Results; particle trajectories plotted on the distance to vein mar-
gin for image set 1 (400 nm) . . . . . . . . . . . . . . . . . . . . . 91
3.34 Results; particle trajectories plotted on the magnitude velocity
field for image set 1 (400 nm) . . . . . . . . . . . . . . . . . . . . 92
3.35 Results; fitted power law for image set 1 (400 nm) . . . . . . . . 93
3.36 Results; reference line for image set 1 (400 nm) . . . . . . . . . . 94
3.37 Results; number of particles per frame for image set 1 (400 nm) . 95
3.38 Results; first image from image set 2 (400 nm) . . . . . . . . . . 95
3.39 Results; PIV signal to noise ratio for image set 2 (400 nm) . . . . 96
3.40 Results; added image intensities and mask for image set 2 (400
nm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
3.41 Results; particle trajectories plotted on the distance to vein mar-
gin for image set 2 (400 nm) . . . . . . . . . . . . . . . . . . . . . 99
3.42 Results; particle trajectories plotted on the magnitude velocity
field for image set 2 (400 nm) . . . . . . . . . . . . . . . . . . . . 100
3.43 Results; fitted power law for image set 2 (400 nm) . . . . . . . . 101
3.44 Results; reference line for image set 2 (400 nm) . . . . . . . . . . 102
3.45 Results; number of particles per frame for image set 2 (400 nm) . 103
3.46 Results; first image from image set 3 (400 nm) . . . . . . . . . . 103
3.47 Results; PIV signal to noise ratio for image set 3 (400 nm) . . . . 104
3.48 Results; added image intensities and mask for image set 3 (400
nm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
3.49 Results; particle trajectories plotted on the distance to vein mar-
gin for image set 3 (400 nm) . . . . . . . . . . . . . . . . . . . . . 106
3.50 Results; particle trajectories plotted on the magnitude velocity
field for image set 3 (400 nm) . . . . . . . . . . . . . . . . . . . . 107
3.51 Results; fitted power law for image set 3 (400 nm) . . . . . . . . 108
3.52 Results; reference line for image set 3 (400 nm) . . . . . . . . . . 109
3.53 Results; number of particles per frame for image set 3 (400 nm) . 110
3.54 Results; first image from image set 4 (400 nm) . . . . . . . . . . 110
3.55 Results; PIV signal to noise ratio for image set 4 (400 nm) . . . . 111
3.56 Results; added image intensities and mask for image set 4 (400
nm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
4
3.57 Results; particle trajectories plotted on the distance to vein mar-
gin for image set 4 (400 nm) . . . . . . . . . . . . . . . . . . . . . 114
3.58 Results; particle trajectories plotted on the magnitude velocity
field for image set 4 (400 nm) . . . . . . . . . . . . . . . . . . . . 115
3.59 Results; fitted power law for image set 4 (400 nm) . . . . . . . . 116
3.60 Results; reference line for image set 4 (400 nm) . . . . . . . . . . 117
3.61 Results; number of particles per frame for image set 4 (400 nm) . 118
3.62 Results; first image from image set 1 (200 nm) . . . . . . . . . . 119
3.63 Results; PIV signal to noise ratio for image set 1 (200 nm) . . . . 119
3.64 Results; added image intensities and mask for image set 1 (200
nm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
3.65 Results; particle trajectories plotted on the distance to vein mar-
gin for image set 1 (200 nm) . . . . . . . . . . . . . . . . . . . . . 122
3.66 Results; particle trajectories plotted on the magnitude velocity
field for image set 1 (200 nm) . . . . . . . . . . . . . . . . . . . . 123
3.67 Results; fitted power law for image set 1 (200 nm) . . . . . . . . 124
3.68 Results; reference line for image set 1 (200 nm) . . . . . . . . . . 125
3.69 Results; number of particles per frame for image set 1 (200 nm) . 126
3.70 Results; first image from image set 2 (200 nm) . . . . . . . . . . 127
3.71 Results; PIV signal to noise ratio for image set 2 (200 nm) . . . . 127
3.72 Results; added image intensities and mask for image set 2 (200
nm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
3.73 Results; particle trajectories plotted on the distance to vein mar-
gin for image set 2 (200 nm) . . . . . . . . . . . . . . . . . . . . . 130
3.74 Results; particle trajectories plotted on the magnitude velocity
field for image set 2 (200 nm) . . . . . . . . . . . . . . . . . . . . 131
3.75 Results; fitted power law for image set 2 (200 nm) . . . . . . . . 132
3.76 Results; reference line for image set 2 (200 nm) . . . . . . . . . . 133
3.77 Results; number of particles per frame for image set 2 (200 nm) . 134
3.78 Results; first image from image set 3 (200 nm) . . . . . . . . . . 135
3.79 Results; added image intensities and mask for image set 3 (200
nm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
3.80 Results; particle trajectories plotted on the distance to vein mar-
gin for image set 3 (200 nm) . . . . . . . . . . . . . . . . . . . . . 138
3.81 Results; particle trajectories plotted on the magnitude velocity
field for image set 3 (200 nm) . . . . . . . . . . . . . . . . . . . . 139
3.82 Results; fitted power law for image set 3 (200 nm) . . . . . . . . 140
3.83 Results; reference line for image set 3 (200 nm) . . . . . . . . . . 141
3.84 Results; number of particles per frame for image set 3 (200 nm) . 142
3.85 Results; first image from image set 4 (200 nm) . . . . . . . . . . 143
3.86 Results; added image intensities and mask for image set 4 (200
nm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
3.87 Results; particle trajectories plotted on the distance to vein mar-
gin for image set 4 (200 nm) . . . . . . . . . . . . . . . . . . . . . 145
3.88 Results; particle trajectories plotted on the magnitude velocity
field for image set 4 (200 nm) . . . . . . . . . . . . . . . . . . . . 146
5
3.89 Results; fitted power law for image set 4 (200 nm) . . . . . . . . 147
3.90 Results; reference line for image set 4 (200 nm) . . . . . . . . . . 148
3.91 Results; number of particles per frame for image set 4 (200 nm) . 149
3.92 Results; first image from image set 5 (200 nm) . . . . . . . . . . 150
3.93 Results; PIV signal to noise ratio for image set 5 (200 nm) . . . . 150
3.94 Results; added image intensities and mask for image set 5 (200
nm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
3.95 Results; particle trajectories plotted on the distance to vein mar-
gin for image set 5 (200 nm) . . . . . . . . . . . . . . . . . . . . . 153
3.96 Results; particle trajectories plotted on the magnitude velocity
field for image set 5 (200 nm) . . . . . . . . . . . . . . . . . . . . 154
3.97 Results; fitted power law for image set 5 (200 nm) . . . . . . . . 155
3.98 Results; reference line for image set 5 (200 nm) . . . . . . . . . . 156
3.99 Results; number of particles per frame for image set 5 (200 nm) . 157
3.100Results; first image from image set 6 (200 nm) . . . . . . . . . . 157
3.101Results; PIV signal to noise ratio for image set 6 (200 nm) . . . . 158
3.102Results; added image intensities and mask for image set 6 (200
nm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
3.103Results; particle trajectories plotted on the distance to vein mar-
gin for image set 6 (200 nm) . . . . . . . . . . . . . . . . . . . . . 160
3.104Results; particle trajectories plotted on the magnitude velocity
field for image set 6 (200 nm) . . . . . . . . . . . . . . . . . . . . 161
3.105Results; fitted power law for image set 6 (200 nm) . . . . . . . . 162
3.106Results; reference line for image set 6 (200 nm) . . . . . . . . . . 163
3.107Results; number of particles per frame for image set 6 (200 nm) . 164
3.108Results; first image from image set 7 (200 nm) . . . . . . . . . . 165
3.109Results; PIV signal to noise ratio for image set 7 (200 nm) . . . . 165
3.110Results; added image intensities and mask for image set 7 (200
nm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
3.111Results; particle trajectories plotted on the distance to vein mar-
gin for image set 7 (200 nm) . . . . . . . . . . . . . . . . . . . . . 168
3.112Results; particle trajectories plotted on the magnitude velocity
field for image set 7 (200 nm) . . . . . . . . . . . . . . . . . . . . 169
3.113Results; fitted power law for image set 7 (200 nm) . . . . . . . . 170
3.114Results; reference line for image set 7 (200 nm) . . . . . . . . . . 171
3.115Results; number of particles per frame for image set 7 (200 nm) . 172
3.116Results; first image from image set 1 (100 nm) . . . . . . . . . . 173
3.117Results; PIV ensemble and distorted pass for image set 1 (100 nm)173
6
List of Tables
3.1 Results; the settings used for image set 1 (800 nm) . . . . . . . . 63
3.2 Results; the settings used for image set 2 (800 nm) . . . . . . . . 68
3.3 Results; table of percentage of particles moving towards the vein
margin for image set 2 (800 nm) . . . . . . . . . . . . . . . . . . 72
3.4 Results; the settings used for image set 3 (800 nm) . . . . . . . . 75
3.5 Results; table of percentage of particles moving towards the vein
margin for image set 3 (800 nm) . . . . . . . . . . . . . . . . . . 79
3.6 Results; the settings used for image set 4 (800 nm) . . . . . . . . 82
3.7 Results; table of percentage of particles moving towards the vein
margin for image set 4 (800 nm) . . . . . . . . . . . . . . . . . . 86
3.8 Results; the settings used for image set 1 (400 nm) . . . . . . . . 90
3.9 Results; table of percentage of particles moving towards the vein
margin for image set 1 (400 nm) . . . . . . . . . . . . . . . . . . 94
3.10 Results; the settings used for image set 2 (400 nm) . . . . . . . . 98
3.11 Results; table of percentage of particles moving towards the vein
margin for image set 2 (400 nm) . . . . . . . . . . . . . . . . . . 102
3.12 Results; the settings used for image set 3 (400 nm) . . . . . . . . 105
3.13 Results; table of percentage of particles moving towards the vein
margin for image set 3 (400 nm) . . . . . . . . . . . . . . . . . . 109
3.14 Results; the settings used for image set 4 (400 nm) . . . . . . . . 113
3.15 Results; table of percentage of particles moving towards the vein
margin for image set 4 (400 nm) . . . . . . . . . . . . . . . . . . 117
3.16 Results; the settings used for image set 1 (200 nm) . . . . . . . . 121
3.17 Results; table of percentage of particles moving towards the vein
margin for image set 1 (200 nm) . . . . . . . . . . . . . . . . . . 124
3.18 Results; the settings used for image set 2 (200 nm) . . . . . . . . 129
3.19 Results; table of percentage of particles moving towards the vein
margin for image set 2 (200 nm) . . . . . . . . . . . . . . . . . . 132
3.20 Results; the settings used for image set 3 (200 nm) . . . . . . . . 137
3.21 Results; table of percentage of particles moving towards the vein
margin for image set 3 (200 nm) . . . . . . . . . . . . . . . . . . 140
3.22 Results; the settings used for image set 4 (200 nm) . . . . . . . . 144
7
3.23 Results; table of percentage of particles moving towards the vein
margin for image set 4 (200 nm) . . . . . . . . . . . . . . . . . . 147
3.24 Results; the settings used for image set 5 (200 nm) . . . . . . . . 152
3.25 Results; table of percentage of particles moving towards the vein
margin for image set 5 (200 nm) . . . . . . . . . . . . . . . . . . 155
3.26 Results; the settings used for image set 6 (200 nm) . . . . . . . . 159
3.27 Results; table of percentage of particles moving towards the vein
margin for image set 6 (200 nm) . . . . . . . . . . . . . . . . . . 163
3.28 Results; the settings used for image set 7 (200 nm) . . . . . . . . 167
3.29 Results; table of percentage of particles moving towards the vein
margin for image set 7 (200 nm) . . . . . . . . . . . . . . . . . . 171
3.30 Results; mean and STD of trajectories deviating more than 10° . 174
3.31 Results; mean and STD of trajectories deviating more than 10° . 174
8
Contents
1 Introduction 12
2 Method 14
2.1 Provided Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.1.1 Preparation of Liposomes . . . . . . . . . . . . . . . . . . 15
2.1.2 Zebrafish Injections . . . . . . . . . . . . . . . . . . . . . 15
2.1.3 Zebrafish Fluorescent Imaging . . . . . . . . . . . . . . . . 15
2.2 Identify Particles and Extract the Vein Mask . . . . . . . . . . . 16
2.2.1 Filtering the Images . . . . . . . . . . . . . . . . . . . . . 17
2.2.2 Identify Particles . . . . . . . . . . . . . . . . . . . . . . . 23
2.2.3 Vein Mask . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.2.4 Distance to Boundary . . . . . . . . . . . . . . . . . . . . 26
2.3 Particle Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.3.1 Particle Image Velocimetry . . . . . . . . . . . . . . . . . 27
2.3.2 Particle Tracking Velocimetry . . . . . . . . . . . . . . . . 35
2.4 Running the PTV Code . . . . . . . . . . . . . . . . . . . . . . . 39
2.4.1 Replace Outliers With or Without Mask . . . . . . . . . . 43
2.4.2 Signal to Noise Ratio . . . . . . . . . . . . . . . . . . . . . 44
2.4.3 Remove Trajectories . . . . . . . . . . . . . . . . . . . . . 45
2.4.4 Plot Trajectories . . . . . . . . . . . . . . . . . . . . . . . 46
2.5 Extract Data from Particle Trajectories . . . . . . . . . . . . . . 48
2.5.1 Calculate Angle of Particles . . . . . . . . . . . . . . . . . 55
2.5.2 Fit Power Law . . . . . . . . . . . . . . . . . . . . . . . . 57
2.6 Crop Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
3 Results 60
3.1 800 nm Nanoparticles Image Sets . . . . . . . . . . . . . . . . . . 60
3.2 Image Set 1 (800 nm) . . . . . . . . . . . . . . . . . . . . . . . . 60
3.2.1 Particle Trajectories . . . . . . . . . . . . . . . . . . . . . 63
3.2.2 Particle Trajectory Distribution Histograms and Power
Law Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
3.3 Image Set 2 (800 nm) . . . . . . . . . . . . . . . . . . . . . . . . 66
3.3.1 Particle Trajectories . . . . . . . . . . . . . . . . . . . . . 68
9
3.3.2 Particle Trajectory Distribution Histograms and Power
Law Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
3.3.3 Amount of Particles Moving Towards the Vein Margin . . 71
3.3.4 Particles Found per Frame . . . . . . . . . . . . . . . . . . 72
3.4 Image Set 3 (800 nm) . . . . . . . . . . . . . . . . . . . . . . . . 73
3.4.1 Particle Trajectories . . . . . . . . . . . . . . . . . . . . . 75
3.4.2 Particle Trajectory Distribution Histograms and Power
Law Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
3.4.3 Amount of Particles Moving Towards the Vein Margin . . 78
3.4.4 Particles Found per Frame . . . . . . . . . . . . . . . . . . 79
3.5 Image Set 4 (800 nm) . . . . . . . . . . . . . . . . . . . . . . . . 80
3.5.1 Particle Trajectories . . . . . . . . . . . . . . . . . . . . . 82
3.5.2 Particle Trajectory Distribution Histograms and Power
Law Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
3.5.3 Amount of Particles Moving Towards the Vein Margin . . 85
3.5.4 Particles Found per Frame . . . . . . . . . . . . . . . . . . 86
3.6 400 nm Nanoparticles Image Sets . . . . . . . . . . . . . . . . . . 87
3.7 Image Set 1 (400 nm) . . . . . . . . . . . . . . . . . . . . . . . . 87
3.7.1 Particle Trajectories . . . . . . . . . . . . . . . . . . . . . 90
3.7.2 Particle Trajectory Distribution Histograms and Power
Law Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
3.7.3 Amount of Particles Moving Towards the Vein Margin . . 93
3.7.4 Particles Found per Frame . . . . . . . . . . . . . . . . . . 94
3.8 Image Set 2 (400 nm) . . . . . . . . . . . . . . . . . . . . . . . . 95
3.8.1 Particle Trajectories . . . . . . . . . . . . . . . . . . . . . 98
3.8.2 Particle Trajectory Distribution Histograms and Power
Law Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
3.8.3 Amount of Particles Moving Towards the Vein Margin . . 101
3.8.4 Particles Found per Frame . . . . . . . . . . . . . . . . . . 102
3.9 Image Set 3 (400 nm) . . . . . . . . . . . . . . . . . . . . . . . . 103
3.9.1 Particle Trajectories . . . . . . . . . . . . . . . . . . . . . 105
3.9.2 Particle Trajectory Distribution Histograms and Power
Law Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
3.9.3 Amount of Particles Moving Towards the Vein Margin . . 108
3.9.4 Particles Found per Frame . . . . . . . . . . . . . . . . . . 109
3.10 Image Set 4 (400 nm) . . . . . . . . . . . . . . . . . . . . . . . . 110
3.10.1 Particle Trajectories . . . . . . . . . . . . . . . . . . . . . 113
3.10.2 Particle Trajectory Distribution Histograms and Power
Law Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
3.10.3 Amount of Particles Moving Towards the Vein Margin . . 116
3.10.4 Particles Found per Frame . . . . . . . . . . . . . . . . . . 117
3.11 200 nm Nanoparticles Image Sets . . . . . . . . . . . . . . . . . . 118
3.12 Image Set 1 (200 nm) . . . . . . . . . . . . . . . . . . . . . . . . 118
3.12.1 Particle Trajectories . . . . . . . . . . . . . . . . . . . . . 121
3.12.2 Particle Trajectory Distribution Histograms and Power
Law Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
10
3.12.3 Amount of Particles Moving Towards the Vein Margin . . 124
3.12.4 Particles Found per Frame . . . . . . . . . . . . . . . . . . 125
3.13 Image Set 2 (200 nm) . . . . . . . . . . . . . . . . . . . . . . . . 126
3.13.1 Particle Trajectories . . . . . . . . . . . . . . . . . . . . . 129
3.13.2 Particle Trajectory Distribution Histograms and Power
Law Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
3.13.3 Amount of Particles Moving Towards the Vein Margin . . 132
3.13.4 Particles Found per Frame . . . . . . . . . . . . . . . . . . 133
3.14 Image Set 3 (200 nm) . . . . . . . . . . . . . . . . . . . . . . . . 134
3.14.1 Particle Trajectories . . . . . . . . . . . . . . . . . . . . . 137
3.14.2 Particle Trajectory Distribution Histograms and Power
Law Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
3.14.3 Amount of Particles Moving Towards the Vein Margin . . 140
3.14.4 Particles Found per Frame . . . . . . . . . . . . . . . . . . 141
3.15 Image Set 4 (200 nm) . . . . . . . . . . . . . . . . . . . . . . . . 142
3.15.1 Particle Trajectories . . . . . . . . . . . . . . . . . . . . . 144
3.15.2 Particle Trajectory Distribution Histograms and Power
Law Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
3.15.3 Amount of Particles Moving Towards the Vein Margin . . 147
3.15.4 Particles Found per Frame . . . . . . . . . . . . . . . . . . 148
3.16 Image Set 5 (200 nm) . . . . . . . . . . . . . . . . . . . . . . . . 149
3.16.1 Particle Trajectories . . . . . . . . . . . . . . . . . . . . . 152
3.16.2 Particle Trajectory Distribution Histograms and Power
Law Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
3.16.3 Amount of Particles Moving Towards the Vein Margin . . 155
3.16.4 Particles Found per Frame . . . . . . . . . . . . . . . . . . 156
3.17 Image Set 6 (200 nm) . . . . . . . . . . . . . . . . . . . . . . . . 157
3.17.1 Particle Trajectories . . . . . . . . . . . . . . . . . . . . . 159
3.17.2 Particle Trajectory Distribution Histograms and Power
Law Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
3.17.3 Amount of Particles Moving Towards the Vein Margin . . 162
3.17.4 Particles Found per Frame . . . . . . . . . . . . . . . . . . 163
3.18 Image Set 7 (200 nm) . . . . . . . . . . . . . . . . . . . . . . . . 164
3.18.1 Particle Trajectories . . . . . . . . . . . . . . . . . . . . . 167
3.18.2 Particle Trajectory Distribution Histograms and Power
Law Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
3.18.3 Amount of Particles Moving Towards the Vein Margin . . 170
3.18.4 Particles Found per Frame . . . . . . . . . . . . . . . . . . 171
3.19 100 nm Nanoparticles Image Sets . . . . . . . . . . . . . . . . . . 172
3.20 Mean and STD of Percentage of Particle Trajectories that are
Likely to Hit the Vein Margin . . . . . . . . . . . . . . . . . . . . 173
11
Chapter 1
Introduction
Cancer is a major public health problem worldwide where it is the second lead-
ing cause of death with heart disease at the top [23]. From 1991 to 2014, the
cancer death rate dropped by 25% thanks to improvements in all aspects of
cancer treatment and medicine [23]. Current anti-cancer drugs are often highly
toxic as they are taken up throughout the body and not only the target tissue
[4]. Anti-cancer drugs have to be effective at low concentrations in the target
tissue and also safe everywhere else in the body [12]. Since the anti-cancer drugs
are rapidly excreted out of the body, have poor solubility and, are prone to be
metabolized before reaching the target, they must be given frequently and in
multiple rounds to assure high enough concentration in target tissue. This leads
to significant reduced quality of life in cancer patients [4].
To improve safety and efficacy of anti-cancer drugs with less side effects,
nanoparticles have been studied heavily these past years with thousands of ar-
ticles published [12]. The concept of selectively detecting and destroying cancer
cells with nanoparticles is a very exciting one. From the past 10 years only
0.7% (median) of the administered nanoparticle dose is found to be delivered
to a solid tumour [27]. After injection, the nanoparticles face a myriad of chal-
lenges on route to the target tissue and therefore exploring different nanoparticle
designs (size, shape and surface chemistry) and extracting the quantitative data
is very important [27],[12]. If the nanoparticles are too small (less than 10 nm)
they are cleared by the kidneys and large particles are likely to be swept up
by macrophages [12]. In tuberculosis cases where the macrophages themselves
are infected, nanoparticles loaded with rifampicin have been very successful in
zebrafish embryos [7],[26]. In application of nanoparticles to tumor tissue the
size varies between 10nm to 100nm, where the optimal size is around 20nm, and
must not be taken up by macrophages [12]. Large sized nanoparticles suffer from
limited penetration to the target tissue and are heterogeneously concentrated
between the arteries and veins [15].
The enhanced permeability and retention (EPR) effect of tumors gives sci-
12
entists more reason to be optimistic about nanoparticles. Nanoparticles, when
injected intravenously, accumulate in tissues and remain there for a longer time.
Thus the EPR effect is now widely accepted as the most basic mechanism for
selective targeting of tumor tissue with nanomedicine [14],[20],[10].
Qualitative flow visualization has existed since the days of Prandtl, but with
the ever growing computational power we have available today, we can quantify
the flow [3]. There are many ways to measure fluid motion, one of which is Par-
ticle Image Velocimetry (PIV). PIV is widely used in fluid dynamics and it is
one of the most popular quantitative imaging techniques. This is a non-intrusive
optical measurement method, which gives velocity fields resolved in both time
and space. PIV has been used measure velocity fields at the order of 1µm and
smaller at the micro level [17] [28], and it has also been used to study oil spills
at the macro level [16].
13
Chapter 2
Method
In this chapter we will go through the process of collecting the data, how the
program works and the algorithms used. All the code is provided on my github
repository and can be cloned directly as is [6]. We will go in detail on how to use
the program and in which order to extract the results. In addition to that, we
will go through the reasoning behind the heuristics of the programs and some
of the mathematics of the algorithms.
Figure 2.1: This shows a singular vein with nanoparticles flowing through them.
The nanoparticles are somewhere between 400 nm to 1200 nm and fluorescent
and the image contains 826x157 pixels.
14
2.1.1 Preparation of Liposomes
Phosphatidyl choline (PC) was bought from Lipoid (product E PC-3), Choles-
terol (Chol) from Sigma and Phosphoethanolamine PEG 2000 (PE-PEG) from
Avanti lipids (product 880120P). Briefly, for PEGylated liposomes, 3 ml of chlo-
roform was placed in a Florence flask containing 2.4 mg of PC, 0.64 mg of Chol
and 0.69 mg of PE-PEG and 5 µl of ATTO550 or ATTO633 labelled DOPE
(ATTO-TEC). The prepared mixtures were then dried at room temperature in
the dark using a rotatory evaporator. The drying step conditions were: 150
millibar for 1h, 80 millibar for 30 min, 16 millibar for 10 min. After this pro-
cess, a film can be seen on the flask that was then hydrated at 70°C with 1
ml of PBS and vortexed to allow complete solubilisation. After this passage,
the re-suspended lipids are aspirated with a gas-tight syringe and the solution
is passed through different sizes filters (100 nm, 200 nm, 400 nm and 800 nm)
using a mini-extruder (Avanti lipids) mounted on a heating block at 70°C. Li-
posomes were analysed by dynamic light scattering (DLS) and Zetasizer.
While specific sized filters were employed there will always be nanoparticles
smaller than and bigger than the filters. While a set of data may predominantly
contain nanoparticles of 200 nm, there will always be some nanoparticles bigger,
and some smaller than that. The 800 nm nanoparticles vary from 400 nm to
1200 nm, the 200 nm nanoparticles vary from 100 nm to 300 nm and the 100
nm nanoparticles vary from 50 nm to 200 nm.
15
The imaging was done on three occasions. On the first occasion, the nanopar-
ticles we imaged were predominantly 400 nm and 800 nm. Two sets of data were
collected. One for 400 nm and one for 800 nm nanoparticles. Two different ze-
brafish was imaged, one with 400 nm nanoparticles flowing through it, and the
other with 800 nm nanoparticles flowing through it. But as previously men-
tioned, these could vary in size. Not all nanoparticles were exactly 400 nm and
800 nm.
On the other two occasions we imaged three zebrafish. One zebrafish was in-
jected with 100 nm nanoparticles and the other two zebrafish were injected with
200 nm nanoparticles. The 100 nm nanoparticles were too small to be able to
distinguish single particles which simply was a limitation of the imaging equip-
ment since even after increasing the laser intensity to 100%, we could not select
a low enough exposure time while maintaining visibility. In addition it was very
difficult to control the amount of 100 nm nanoparticles that were injected and
thus the veins were saturated with them. However in the imaging of the 200
nm nanoparticles, it was still possible to distinguish between the nanoparticles.
In one of the the two zebrafish that had 200 nm nanoparticles injected into,
there were too many nanoparticles present in the veins and therefore the other
zebrafish was injected with approximately 1/4 as many nanoparticles. Both 200
nm image sets are possible to use for particle tracking despite one being more
saturated with nanoparticles than the other.
The camera was positioned to image different veins so that many image sets
could be extracted from just one zebrafish. The faster the nanoparticles moved
through the veins, the higher frames per second (FPS), or lower exposure time,
was needed to be used so that it would be possible to see individual nanopar-
ticles in the images. But increasing the FPS, or lowering the exposure time,
came at the cost of visibility, which meant that the laser intensity needed to
be increased. When the laser intensity could not be increased any further a
2x2 pixels binning was employed. A 2x2 binning takes 4 pixels and combines
them into one. This reduces the resolution by half, but increases the brightness
intensities. 4x4 and 8x8 pixel binning would lead to particle flickering from
frame to frame and this is undesirable. The imaging could only be done for 30
to 60 seconds at most as the laser would make the fluorescent fade over time
and thereby the brightness intensities in the images would be variable. All the
image sets are acquired for 30 seconds at a time with variable FPS.
16
modifications made compared to ’pkfnd.m’[6]. Afterwards we will look at the
calculation of the vein mask and how this vein mask is used to calculate the
distance to the vein margin, or vein border.
1 i f ( strcmpi ( f i l t e r , ’ Aggressive ’ ) )
2 %Gaussian f i l t e r − Lowpass
3 meshSize = p a r t i c l e L e n g t h ;
4 G = g a u s s ( meshSize , meshSize , n o i s e L e n g t h ) ;
5
6 %Box b l u r f i l t e r − Lowpass
7 m e s h S i z e = ( round ( p a r t i c l e L e n g t h / 2 ) −1)−(round(− p a r t i c l e L e n g t h
/ 2 ) +1) + 1 ;
8 B = o n e s ( round ( m e s h S i z e ) , round ( m e s h S i z e ) ) ;
9 B = B. / sum (B ( : ) ) ;
10 gConv = conv2 ( image , G, ’ same ’ ) ;
11 bConv = conv2 ( image , B, ’ same ’ ) ;
12
13 %A g g r e s s i v e f i l t e r
14 f i l t e r e d = gConv − bConv ;
15 f i l t e r e d ( 1 : ( round ( p a r t i c l e L e n g t h / 2 ) ) , : ) = 0;
16 f i l t e r e d ( ( end − round ( p a r t i c l e L e n g t h / 2 ) + 1 ) : end , : ) = 0 ;
17 f i l t e r e d ( : , 1 : ( round ( p a r t i c l e L e n g t h / 2 ) ) ) = 0;
18 f i l t e r e d ( : , ( end − round ( p a r t i c l e L e n g t h / 2 ) + 1 ) : end ) = 0 ;
19 f i l t e r e d ( f i l t e r e d < 0) = 0 ;
20
21 e l s e i f ( s t r c m p i ( f i l t e r , ’ Gaussian ’ ) )
22 %Gaussian f i l t e r − Lowpass
23 meshSize = p a r t i c l e L e n g t h ;
24 G = g a u s s ( meshSize , meshSize , n o i s e L e n g t h ) ;
25 f i l t e r e d = conv2 ( image , G, ’ same ’ ) ;
26
27 e l s e i f ( s t r c m p i ( f i l t e r , ’ Box ’ ) )
28 %Box b l u r f i l t e r − Lowpass
29 m e s h S i z e = ( round ( p a r t i c l e L e n g t h / 2 ) −1)−(round(− p a r t i c l e L e n g t h
/ 2 ) +1) + 1 ;
30 B = o n e s ( round ( m e s h S i z e ) , round ( m e s h S i z e ) ) ;
31 B = B. / sum (B ( : ) ) ;
32 f i l t e r e d = conv2 ( image , B, ’ same ’ ) ;
33 else
34 f i l t e r e d = image ;
35 end
Figure 2.3 has had a 5x5 Gaussian and a 5x5 Box blur filter applied to it and
the background noise is greatly reduced compared to the source image in figure
2.2. As we will see later, the Gaussian and the Box filters only smears out the
noise, while not completely removing them. The Box filter is an averaging filter
17
that gives each pixel the same weight, while the Gaussian filter is puts more
weight on the central pixels. The 5x5 Gaussian filter used on figure 2.2 is given
in figure 2.4. The Box Filter can be written as a NxN matrix as follows.
1 1 1 ... 1
1 1 1 1 . . . 1
.. .. .. . . ..
N · N . . . . .
1 1 1 ... 1
And the formula for the N xN Gaussian filter with a given σ > 0 is given as,
(x2 +y 2 )
e− 2σ2
, x, y ∈ [−N/2, N/2] (2.1)
2πσ 2
The denominator in equation 2.1 is the normalizing factor that makes sure
the sum of the filter is 1 just like the Box filter. However this normalization
has been implemented in two ways in the code. If the mesh is greater than
10 times σ then we can safely use the faster performing equation 2.1, but if it
is not, then we have to divide the Gaussian filter values by the sum of all the
entries. Because equation 2.1 is continuous and its domain is the whole of R2 ,
the sum of the filter will be less than 1 when the mesh is not large enough. The
performance difference between these two are negligible when the mesh is small,
but a quick test for N = 10000 and σ = 1000 over 100 iterations shows that on
average equation 2.1 is 6.35% faster than dividing by the sum of the filter.
18
Figure 2.2: Source image of a singular vein that has been plotted in MatLab
with the brightness intensities. The nanoparticles are somewhere between 400
nm to 800 nm and fluorescent and the image contains 1021x194 pixels.
Figure 2.3: A image that has had the ’Aggressive’ filter applied to it. The image
contains 1021x194 pixels.
19
Figure 2.4: An example of a 5x5 Gaussian filter with σ = 1.
Figure 2.5 and figure 2.6 illustrate the fact that both the Gaussian and the
Box filters both smooth out the image significantly. Since the noise is being
smoothed out similarly in both the Gaussian and the Box filter, while the par-
ticles are being accentuated, we can subtract the Gaussian image from the Box
filter image and set negative values to 0, to get the ’Aggressive’ filtered image
to remove the noise completely.
In figure 2.7 we can see that there is a halo effect, an outline, that is visible
after subtracting the two images from one another and setting negative values
to 0. This outline is an artifact from convolving the filter with the image, and
therefore the outlines have a width of half the filter size. In figure 2.8 I have
removed the outline by setting it to zero. This outline is usually only a few
pixels wide as the size of the filters are dependant on the particle diameter in
the code.
20
Figure 2.5: A image that has had a 19x19 Gaussian filter applied to it. The
image contains 1021x194 pixels.
Figure 2.6: A image that has had the Box filter applied to it. The image contains
1021x194 pixels.
21
Figure 2.7: A image that has had a 19x19 ’Aggressive’ filter applied to it where
the outline from the filtering is still visible. The image contains 1021x194 pixels.
Figure 2.8: A image that has had a 19x19 ’Aggressive’ filter applied to it. The
image contains 1021x194 pixels.
22
2.2.2 Identify Particles
After the filter has been applied, we use the MATLAB function find() to find
row and column indices of values greater than a given brightness value thresh-
old. These row and column indices are now seen as the centers of our particles.
This gives a starting point. From here on I check that every pixel above the
given threshold found by the function find() is actually the brightest pixel in
the immediate vicinity of it. Later I remove all the pixels that overlap, that
they are within the particle diameter of each other. This is done because the
coordinates found are assumed to be the centers of the particles and all particles
are assumed to have the same diameter. So if the distance between two particles
is less than one particle diameter, then they overlap as the 2·radius = diameter.
And finally only keep the brightest of these overlapping pixels. Point 4 in the
process below is implemented in such a way that no particle is compared to an-
other particle twice. A vector of row and column indices are then returned. The
code is available on the github repository [6], but the whole process is shown
below.
1. Apply filter.
2. Find the pixels with values greater than the threshold.
3. Make sure there are no brighter pixels in the immediate vicinity.
4. Remove overlapping particles and keep only the brightest particle.
This algorithm does not track a particle from one image to another, it only
identifies bright points, nanoparticles. The threshold number is very important
and it does impact the tracking algorithm. This is the number to adjust to get
the perfect balance between identifying nanoparticles or identifying noise as it
is the brightness levels of the particles. It keeps only those positions that are
above the given brightness threshold.
While the added brightness intensities of all the images as seen in figure 2.9
was an interesting way of looking at the distribution of nanoparticles, the prob-
lem with that was the fact that cells are perceived as dark spots in the images
23
and they move through the center of the vein often. This makes sure that the
added brightness intensities always are brighter at the vein margin, and as such,
this was not a method that could be employed.
Figure 2.9: The top image is the sum of 2181 images. The bottom image is a
binary image given by running a Gaussian filter over the top image and threshold
it. The image contains 1021x194 pixels.
Figure 2.10: The inverted image of the mask in figure 2.9. The image contains
1021x194 pixels.
24
outer part and run the PIV twice, one with each mask and with smaller sub-
windows for the the outer mask as the particles move slower there. The main
way to create the inner mask is to use the ’imagesAdd.m’ MatLab script [6]
where it is possible to cut off a set amount of the upper half and the lower half
of the mask. This script is also used for making the mask in general. The outer
mask can be created by selecting the white region in figure 2.10 and contracting
the selection by a set amount of pixels. This can be done with photoshop or
even an online image editor like pixlr [1]. Figure 2.11 and figure 2.12 shows how
the outer and inner masks look respectively.
Figure 2.11: The inner part of figure 2.10 has been removed, giving us the outer
areas only. The image contains 1021x194 pixels.
Figure 2.12: The outer part of figure 2.10 has been removed, giving us the inner
area only. The image contains 1021x194 pixels.
To create the masks, we just need to run the file ’imagesAdd.m’. This will
give an interactive way of fine tuning the threshold level, the Gaussian blur filter
strength, the lower α and upper α in order to get a good vein mask. The lower
and upper α are used for removing parts of the upper or lower half of the mask.
This is mostly to remove noise and artifacts outside of the main vein. The lower
both α values are chosen, the more of the mask will be removed and vice versa.
Running ’imagesAdd.m’ will first give a dialog box asking for the folder the
images are located. After selecting the folder, a new dialog box comes up. This
one gives you the option for skipping images from the folder so that the process
goes faster and so that the composite image does not get over saturated with too
many images. Afterwards the vein mask will be plotted and a new dialog box
25
will come up asking if the vein mask is satisfactory. If it is not, you can change
the threshold, the Gaussian blur filter strength, the upper α and the lower α.
The process will be repeated until the ’Yes’ or ’Cancel’ button is pressed when
asked if the vein mask is satisfactory. Pressing the ’Yes’ button saves the mask,
the inverted mask and a plot like in figure 2.9 in a folder of your choosing.
Figure 2.13: Every pixel has a measured distance to the vein wall as defined by
figure 2.10.
26
have to be adjusted incrementally by trial and error to get right. Some docu-
mentation is given in the code files and on their website [2].
Cross Correlation
I have decided to use cross correlation throughout even though fast Fourier
transform (FFT) of the cross correlation is faster (O[N 4 ] vs O[N 2 lnN ]). This is
because some of the advantages of FFT may be diminished as the subwindows
has to be a power of two (16x16, 32x32, 64x64 etc) [21]. In the cases of my data
the subwindows have to be rectangles and not a power of two. The normal cross
correlation for two subwindows, A and B, is given as follows:
N M
1 XX
CC(s, t) = A(i, j)B(i + s, j + t) (2.2)
N · M i=1 j=1
To find the cross correlation we first need to divide the two images into a
regular grid as seen in figure 2.14. We can then naively cross correlate every
grid with other grids surrounding it and then pick the grid that gives the highest
correlation peak. But a better way is to define a grid with overlap and a search
range like in figure 2.15. Letting the subwindows overlap makes more particles
part of the calculations, but can lead to oversampling. The search range limits
the maximum displacement and is usually set to be one third of the subwin-
dow size. That means that we assume the maximum displacement is no greater
than one third of the subwindow size in either direction. With a subwindow of
24x24 pixels and an overlap of 50%, we will get a velocity vector every 12 pixels.
Letting the search range be a third of the subwindow will mean it goes from -8
to 8 pixels in both x- and y-direction. The larger the subwindows, the larger
the maximum displacement will be, but a larger subwindow size brings with it
a lower resolution of the velocity field [11]. In figure 2.16 we can see that the
27
velocity is defined by the difference in movement in x- and y-direction.
Figure 2.14: An image that has been divided in a regular grid. The grid repre-
sents the subwindows.
28
Figure 2.15: Two images, one with red particles, other with green particles, are
placed on top of one another. Cyan rectangle is the search range. Red rectangle
is a subwindow from the first image. Green rectangle is a subwindow from the
second image. The yellow arrow is the direction of the movement between the
two rectangles. The yellow marked area between the red and green subwindows
is the overlap.
29
Figure 2.16: Two images, one with red particles, other with green particles, are
placed on top of one another. ’dy’ is the displacement in y-direction. ’dx’ is the
displacement in x-direction. Red rectangle is a subwindow from the first image.
Green rectangle is a subwindow from the second image. The yellow arrow is the
direction of the movement between the two rectangles. The yellow marked area
between the red and green subwindows is the overlap.
Replace Outliers
Detecting and replacing outliers is a way of improving the quality of the PIV
result. HydroLabPIV uses 3x3 normalized local median filter, and if parts of
the 3x3 filter is masked, a masked 5x5 local median filter is used instead. A
cubic B-spline is fitted to the velocity field using an iterative weighted least
squares fit. The fit is then iterated a few times where the residuals, normalized
by 9x9 local median of the residuals, is used to update the weights in the least
squares fit. Increasing the overlap gives more vectors and results in a higher
computational cost, but it will also improve the outlier detection [11].
30
power of two. This is due to an indexing issue in the localmedian(...) function
of ’lsbsfit2.m’ and in ’localfilt.m’. It is the exact same piece of code in both files
and as long as the subwindows and search range are not set to be significantly
bigger than the image (which does not make sense to do as the recommended
search range is a third of the subwindow size) then this modification does not
alter the results. This just makes sure that MatLab indexing is respected.
1 [ I , J ] = s i z e (X) ;
2 i d y = [N+2:M 1 : I I−M+1: I−N− 1 ] ;
3 i d x = [N+2:M 1 : J J−M+1:J−N− 1 ] ;
4
5 %Shako Farhad : Added t h e f o u r l i n e s below t o make s u r e t h a t i d y and
i d x do not c o n t a i n
6 %n e g a t i v e i n t e g e r s o r z e r o s o r v a l u e s g r e a t e r than t h e d i m e n s i o n s
o f X.
7 i d y ( i d y ( : ) <1) = 1 ;
8 i d x ( i d x ( : ) <1) = 1 ;
9 i d y ( i d y ( : )>I ) = I ;
10 i d x ( i d x ( : )>J ) = J ;
11
12 Xext = X( idy , i d x ) ;
Subwindow Distortion
To improve accuracy for shear flows, using subwindow distortion can be bene-
ficial but it will cost more computationally. HydrolabPIV finds the distortion
of the image pair by integrating the Bsplines fitted to the displacements using
Runge-Kutta. The displacement is then used to interpolate a new image pair
tending toward zero/uniform displacement. To get the best accuracy 3-4 dis-
torted passes are recommended. An important choice that greatly affects the
error is interpolation of the image pair, and Lanczos resampling works better
for smaller particles with diameter between 2 and 4 pixels, while cubic b-spline
works better for particles with diameter greater than 5 pixels [11].
Subpixel Accuracy
Figure 2.17c and 2.18c shows the cross correlation plots. The peaks are where
the two subwindows are the most correlated and this peak is more pronounced
the bigger the subwindows are, as can be seen from figure 2.17 and 2.18. With
smaller subwindows, the cross correlation peaks may become ambiguous. To
use small subwindows and reduce the uncertainty, we need subpixel estimates
[25].
Using subpixel interpolation to gain increased accuracy for the PIV velocity
field is possible. Six different subpixel interpolation schemes can be used and
they were all tested and the results can be seen in figure 2.19 on page 35.
With cross correlation peaks as seen in figure 2.18, they are so narrow that
subpixel resolution is lost. Narrow correlation peaks and/or using these subpixel
interpolation schemes may introduce peak-locking, pixel-locking or pixel biasing
when the particles are smaller than just a few pixels in diameter. It is a serious
31
error source in PIV and it means that the measured location and displacement
of a particle image is to be biased towards integer values [18]. In figure 2.19
peak-locking is not tested, and only the ability to reproduce a manufactured
displacement. Both the 3x3 and 5x5 Levenberg–Marquardt (3x3lm and 5x5lm)
subpixel interpolation schemes may become singular and have no solution. The
3x3 or 5x5 least squares (3x3ls or 5x5ls) scheme is recommended.
32
(a) 32x32 subwindow of image 1. (b) 32x32 subwindow of image 2.
33
(a) 64x64 subwindow of image 1. (b) 64x64 subwindow of image 2.
34
Figure 2.19: All 6 algorithms for doing subpixel interpolation that is available
in the HydrolabPIV code was tested on 32x32, 64x64, 128x128, 256x256 and
500x500 subwindows 1000 times each. The subwindows were extracted from
two images where the second image was the same as the first image but shifted
5 pixels in the x-direction and 4 pixels in the y-direction. The x-axis shows
the time taken in seconds (s). The y-axis shows the absolute mean difference
between the interpolated displacement and the true displacement of x = 5 and
y = 4 over 1000 iterations.
There are many options to choose from, both in the HydrolabPIV, and in
my code. Everything pertaining to HydrolabPIV is discussed in section 2.3.1.
We will go through the heuristics of my PTV code, and also go through how to
make use of it. The code is available on the github repository [6], but the PTV
process is given below and we will go through each step.
35
images.
2. Find particle positions for the two first images, and afterwards only the
most recent image, image two.
3. Remove particles found outside of mask.
36
15. Go through all the found trajectories, extract the start- and end-coordinates
of the trajectories. Then connect trajectories that have start-coordinate
within the given ’search radius’ of an end-coordinate of another trajectory,
and that are in chronological order.
If α ∈ (0, 1), the ’ensemble PIV contribution’ option calculates the velocity
field as a linear combination of the ensemble PIV velocity field and the current
image to image PIV velocity field. Let E be the ensemble PIV velocity field and
I the image to image PIV velocity field, then linear combination of E and I is
implemented as follows:
F = I · (1 − α) + E · α (2.3)
In point 4 the ’simplify images contribution’ refers again to a inputted num-
ber in the interval [0, 1]. It creates a separate image where a white dot, or circle,
(with its radius being the same as the particles) will be drawn at the given par-
ticle coordinate on a black canvas, and smoothed out with a Gaussian blur to
resemble a real particle. This simplified image is then scaled such that the max-
imum brightness intensity of the dots, or circles, is the same as the maximum
brightness intensity of the particles in the source image. This ’simplification’ of
the images is done to eliminate noise and faint particles from being included in
the PIV velocity field calculation. But because the veins may at times not be
straight, bend in inwards and outwards toward the camera, particles may move
out of the focal plane and lose its brightness intensity. This may cause these
particles to not be identified in point 2. This may lead to regions on the ’simpli-
fied’ image, where the white dots, or circles, have been drawn to be completely
devoid of activity. This makes the velocity field zero in those regions. Therefore
a the same linear combination as in equation 2.3 is employed where I in this
case is the unaltered image, and E is the black canvas with the white dots, or
circles, drawn on it. This way we can make the particles found in point 2 more
37
pronounced and dominant in the PIV calculation, and still make sure that we
get some non zero velocity field on all possible regions.
The last point, point 14, is visualized in figure 2.20. Here we assume that
particle trajectories that are ’close’ in time and space must necessarily be by
the same particle. If a trajectory for example ends or stops on image number
10, and another trajectory is started from image number 11 and in almost the
same location as the last trajectory ended, then we assume those two particle
trajectories were disconnected because of noise and/or inaccuracies in the ve-
locity field, and/or noise in the images, and they should be connected into one
trajectory.
38
(a) Three trajectories moving in the same direction. (b) Two trajectories moving in the same direction.
Figure 2.20: A ’search radius’ of 2 was used to connect the two trajectories in
figure 2.20a that are on the same line to get only one trajectory as seen in figure
2.20b.
Running the PTV code can take up to a few days (on a 4 core intel i7-7700K
at a fixed core clock speed of 5GHz with 32 GB ram at 3200 MHz PC) for an
image set depending on the resolution, amount of images and the settings used.
39
Figure 2.21: This dialog box gives the opportunity to skip every X images,
where X > 1, and/or to select a subset of the images. It is also possible to
input the particle diameter, select the filter to use and input the diameter of
the noise.
40
Figure 2.22: The left image is the original image, and Figure 2.23: The left image is the original image, and
the image to the right is the image with the selected the image to the right is the image with the selected
filter applied to it. filter applied to it and particles drawn at the particle
positions that were found due to the given threshold
from the threshold slider.
Figure 2.24: Figure 2.22 is before the threshold slider has been moved and figure
2.23 is after the threshold slider has been moved.
41
Figure 2.25: This dialog box gives the opportunity to decide wether to use mask
or not, change the brightness threshold, change the particle diameter, change the
filter, change the noise length, input the PIV overlap percentage, select the PIV
subwindow and the PIV search range, input the tracking search radius, input the
number of frames particles may disappear from view, wether to replace outliers
with or without mask or not at all, the42 percentage of contribution the ensemble
PIV should have, the percentage of contribution simplifying the images (drawn
particles) should have, the precentage of contribution the velocity field from the
previous PIV should have on the current velocity field, the amount of distorted
passes, what subpixel interpolation algorithm to use, wether to plot the PIV
signal to noise ratio, how long the shortest trajectories should be, and lastly
wether to plot the trajectories or not.
Settings field Settings value
images: 1×10 cell
imageFolder: ’C:\Images\’
masks: {’InvertedMask.png’}
maskFolder: ’C:\Images\Mask\PIVMask’
threshold: 1.1148
particleLength: 5
filter: ’Aggressive’
noiseLength: 1
overlap: 0.5000
subWindow: [120 40]
searchArea: [40 12]
trackingSearchRadius: 2
particleSkippedFrames: 10
replaceOutliers: 2
ensembleContribution: 0.5000
simplifyContribution: 0.5000
blur: ’gaussian’
sigma: 1
previousVelocityContribution: 0.5000
distortedPass: 0
subpixel: {’3x3ls’}
trajectoryLength: 2
removeLinesOutsideOfMask: {’Yes’}
Table 2.1: The settings structure array contains all the input values such that
comparing the quality of the PTV and rerunning the PTV code can be done
easily.
43
Figure 2.26: Outliers have been removed with a mask.
44
Figure 2.27: A PIV signal to noise ratio plot where the size of the blocks are, or
the resolution of the plot is an indication of there potentially not being enough
particles in the image, and/or within the subwindows. This plot shows that
the subwindows either could have been increased or that there is not enough
particles in the source images in general.
If the dialog box field ’Remove trajectories outside of mask:’ in figure 2.25
is filled with ’Yes’, then we will remove particle trajectories that cross over the
mask. If a mask has not been selected in figure 2.25 then a dialog box will
ask for a mask image. If no mask image is selected then it exits the, and does
not remove any trajectories. If a mask is selected then it will go through every
two coordinates in a particle trajectory and check along the line between those
coordinates whether the trajectory is outside of the mask or not. If it is out-
side, then the whole trajectory is removed. This option may remove trajectories
45
around the the edge that should not be removed. After removing the particle
trajectories, they are saved as sortedFFTP in the workspace.
q
|V | = Vx2 + Vy2 , (2.4)
Figure 2.28: A plot that appears after running the code ’runPTV.m’. The white
lines are the trajectories and the white dots with black outlines represents the
particle at the last coordinate in the trajectory. The background is the first
image in a image set.
46
Figure 2.29: A plot that appears after running the code ’runPTV.m’. The white
lines are the trajectories and the white dots with black outlines represents the
particle at the last coordinate in the trajectory. The background is the distance
to vein margin as discussed in section 2.2.4.
47
Figure 2.30: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
magnitude of the velocity field.
The script will plot figure 2.32, 2.33, 2.34, 2.35, 2.36 and a set of values as
48
seen in table 2.2. If a number for the ’outer’ and ’inner’ data are inputted then
the trajectories from both data sets will be plotted together in the same way as
can be seen in the previously mentioned figures.
In table 2.2 we see ’angle’ and it is the angle used to calculate ’percentage-
OfTrajectoriesAngle’ which is the percentage of particle trajectories that had an
angle greater than ’angle’ in relation to the reference line (the red line in figure
2.33). ’percentageOfTrajectoriesTheta’ is the percentage of particle trajectories
that had an angle greater than 0 in relation to the reference line. ’signChange-
Count’ is a number describing the number of local minima and maxima in the
reference line. And lastly ’thetaMinMax’ gives the minimum and maximum an-
gle among all the angles, or θ, found. The process of how these are calculated
are discussed further in section 2.5.1 on 55.
Below we can see the first lines of the code in the ’plotAndCalculateData.m’
script. The last four lines are the default values used. These can be changed
before running the script.
49
Figure 2.31: The first dialog box that appears after running the code ’plotAnd-
CalculateData.m’.
50
Figure 2.32: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The power law has been fitted to the histogram pillar centers. There
are 46 points in total. The histogram is comprised of the grey bins, the blue cir-
cles are the histogram bin values and the red line is the fitted power law curve.
The binned distances in pixels are on the x-axis and the number of particles
that fall within those given distance bins is on the y-axis.
51
Figure 2.33: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The red line is the vein reference line, and it is assumed that the flow
direction of particles is along this line.
52
Figure 2.34: A plot that appears after running the code ’plotAndCalculate-
Data.m’. It shows the number of particles that was identified with a given
brightness intensity threshold for each image in the set. The blue line is the
number of particles identified from the images, and the red line is the linear fit
of that data. Along the x-axis is the frame number, and the y-axis shows the
number of particles identified.
53
Figure 2.35: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The white arrows are plotted on the last coordinate in the particle
trajectory of all the unaltered particle trajectories (’firstFoundParticleTracks’
as discussed in section 2.4 on page 39) and the size of the arrow indicates the
mean particle velocity. The background is the magnitude of the velocity field
with the colorbar showing the velocity in pixels per frame. The x- and y-axis
shows pixels.
54
Figure 2.36: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The white arrows are plotted on the last coordinate in the particle
trajectory of the altered particle trajectories (’sortedFFTP’ as discussed in sec-
tion 2.4.3 on page 45) and the size of the arrow indicates the mean particle
velocity. The background is the magnitude of the velocity field with the color-
bar showing the velocity in pixels per frame. The x- and y-axis shows pixels.
55
through the middle of the vein, that can either be manually drawn or be gener-
ated from the vein mask as seen in figure 2.33 on page 52. This reference line is
assumed to be the approximated flow direction throughout the vein. And this
function helps to quantify how many of the particles trajectories will end up in
the vein margin.
The function takes four input values, where two of them are mandatory.
These two are the particle trajectories and a vein mask. The two last optional
inputs are ’framesMovement’ and ’useMaskLine’. By default ’framesMovement’
is set to 1 and ’useMaskLine’ is set to 1. We will go through each step of that
function and the mathematical principles employed.
By using the reference line from point 1, we are assuming that the flow di-
rection is flowing along the line shown in figure 2.33 on page 52. And in point
3, we assume that the the particles will keep moving along the line between
the two extracted coordinates for a given number of frames, ’framesMovement’.
This means that if ’framesMovement’ is set to 3, then we assume that the par-
ticle is moving with the same velocity, in the same direction for the next three
56
frames, and after a maximum of three frames, the particle will have reached
the vein margin. The distances from the particle position to the vein margin is
calculated with the mask as discussed in 2.2.4 on 26.
In point 4 equation 2.5 and 2.6 are employed to calculate the slope and bias.
y1 − y0
a= (2.5)
x1 − x0
b = y0 − a · x0 (2.6)
In point 5 and 6 we assume that the vein is imaged horizontally and not
vertically and we want to make sure that the particle is moving away from the
reference line and towards the vein margin. In point 3 the particle trajectories’
direction was not considered and if the particle is crossing the reference line
then it means that the particle is not moving towards the closest vein margin,
which makes the assumption for point 3 not hold as it needs more than ’frames-
Movement’ amount of frames to reach the vein margin.
where a1 and a0 are the slopes of the main line in figure 2.33 and the lines
constructed with equation 2.5 and 2.6 from the last two coordinates of the par-
ticle trajectories respectively. The second part of the equation 2.7 is for lines
that move vertically and thus having a 90°angle with the x-axis. The slope is
not defined for such vertical lines because x1 = x0 in this case and equation 2.5
is then not defined.
In the last point, point 8, we want to quantify how many local minima and
maxima the vein has so that we can judge if the veins structure affects how
many particle trajectories are likely to move into the vein margin.
57
curve is as follows,
58
Figure 2.37: Source image with regions of no nanoparticle flow activity.
Figure 2.39: Reducing computational load by cropping source images such that
only the regions of interest is used in the PIV calculation.
59
Chapter 3
Results
In this chapter we will go through the results of the PTV on various image
sets; PIV signal to noise plot, the plots of the particle trajectories, the distribu-
tion of said particle trajectories throughout the vein and the power law fit, the
percentage of particle trajectories moving into the vein margin and number of
particles found per frame. The last two plots discussed in section 2.5 on page
48 are omitted as the plots in section 2.4.4 on page 46 are sufficient to illustrate
the nanoparticle tracks. The ’imageFolder’ and ’maskFolder’ from the table in
section 2.4 on page 39 are omitted as they are not relevant. But all the figures
and tables (in .txt files) discussed throughout chapter 2 on page 14. But they
are all available on the github regardless [6].
60
of these calculations. This image set was acquired at 50 FPS.
Figure 3.1: This shows a singular vein with nanoparticles flowing through them.
The image set contains 2180 images and the dimensions are 1021x194 pixels.
61
Figure 3.2: The top image is the sum of 2180 images. The bottom image is a
binary image given by running a Gaussian filter over the top image and threshold
it. The image contains 1021x194 pixels.
62
Settings field Settings value
images: 1×2180 cell
masks: {’InvertedMask.png’}
threshold: 1.8000
particleLength: 4
filter: ’aggressive’
noiseLength: 1
overlap: 0.7500
subWindow: [70 30]
searchArea: [30 14]
trackingSearchRadius: 2
particleSkippedFrames: 6
replaceOutliers: 2
ensembleContribution: 0.7500
simplifyContribution: 0.7500
blur: ’gaussian’
sigma: 0.5000
previousVelocityContribution: 0.5000
distortedPass: 1
subpixel: {’none’}
trajectoryLength: 2
removeLinesOutsideOfMask: {’Yes’}
Table 3.1: The settings structure array contains all the input values such that
comparing the quality of the PTV and rerunning the PTV code can be done
easily.
63
Figure 3.3: A plot that appears after running the code ’runPTV.m’. The white
lines are the trajectories and the white dots with black outlines represents the
particle at the last coordinate in the trajectory. The background is the distance
to vein margin as discussed in section 2.2.4.
64
Figure 3.4: A plot that appears after running the code ’runPTV.m’. The white
lines are the trajectories and the white dots with black outlines represents the
particle at the last coordinate in the trajectory. The background is the magni-
tude of the velocity field.
65
Figure 3.5: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The power law has been fitted to the histogram pillar centers. There
are 46 points in total. The histogram is comprised of the grey bins, the blue cir-
cles are the histogram bin values and the red line is the fitted power law curve.
The binned distances in pixels are on the x-axis and the number of particles
that fall within those given distance bins is on the y-axis.
Figure 3.6: This shows a singular vein with nanoparticles flowing through them.
The image set contains 2557 images and the dimensions are 826x157 pixels.
66
Figure 3.7: A PIV signal to noise ratio plot where the size of the blocks are, or
the resolution of the plot is an indication of there potentially not being enough
particles in the image, and/or within the subwindows.
Figure 3.8: The top image is the sum of 2557 images. The bottom image is a
binary image given by running a Gaussian filter over the top image and threshold
it. The image contains 826x157 pixels.
67
Settings field Settings value
images: 1×2557 cell
masks: {’InvertedMask.png’}
threshold: 0.5000
particleLength: 5
filter: ’aggressive’
noiseLength: 1
overlap: 0.7500
subWindow: [120 40]
searchArea: [40 12]
trackingSearchRadius: 2
particleSkippedFrames: 10
replaceOutliers: 2
ensembleContribution: 0.5000
simplifyContribution: 0.5000
blur: ’gaussian’
sigma: 0.5000
previousVelocityContribution: 0.5000
distortedPass: 3
subpixel: {’3x3’}
trajectoryLength: 2
removeLinesOutsideOfMask: {’Yes’}
Table 3.2: The settings structure array contains all the input values such that
comparing the quality of the PTV and rerunning the PTV code can be done
easily.
68
Figure 3.9: A plot that appears after running the code ’runPTV.m’. The white
lines are the trajectories and the white dots with black outlines represents the
particle at the last coordinate in the trajectory. The background is the distance
to vein margin as discussed in section 2.2.4.
69
Figure 3.10: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
magnitude of the velocity field.
70
Figure 3.11: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The power law has been fitted to the histogram pillar centers. There
are 46 points in total. The histogram is comprised of the grey bins, the blue cir-
cles are the histogram bin values and the red line is the fitted power law curve.
The binned distances in pixels are on the x-axis and the number of particles
that fall within those given distance bins is on the y-axis.
71
Variable Names Output in terminal
angle 10
framesMovement 1
signChangeCount 16
percentageOfTrajectoriesTheta 8.0147
percentageOfTrajectoriesAngle 3.3990
thetaMinMax 2.2026 and 90.0000
Figure 3.12: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The red line is the vein reference line, and it is assumed that the flow
direction of particles is along this line.
72
Figure 3.13: A plot that appears after running the code ’plotAndCalculate-
Data.m’. It shows the number of particles that was identified with a given
brightness intensity threshold for each image in the set. The blue line is the
number of particles identified from the images, and the red line is the linear fit
of that data. Along the x-axis is the frame number, and the y-axis shows the
number of particles identified.
Figure 3.14: This shows a singular vein with nanoparticles flowing through them.
The image set contains 2937 images and the dimensions are 510x97 pixels.
73
Figure 3.15: A PIV signal to noise ratio plot where the size of the blocks are, or
the resolution of the plot is an indication of there potentially not being enough
particles in the image, and/or within the subwindows.
Figure 3.16: The top image is the sum of 2937 images. The bottom image
is a binary image given by running a Gaussian filter over the top image and
threshold it. The image contains 510x97 pixels.
74
Settings field Settings value
images: 1×2937 cell
masks: {’InvertedMask.png’}
threshold: 0.3250
particleLength: 5
filter: ’Aggressive’
noiseLength: 1
overlap: 0.7500
subWindow: [80 30]
searchArea: [30 10]
trackingSearchRadius: 2
particleSkippedFrames: 10
replaceOutliers: 2
ensembleContribution: 0.5000
simplifyContribution: 0.5000
blur: ’gaussian’
sigma: 0.5000
previousVelocityContribution: 0.5000
distortedPass: 3
subpixel: {’3x3ls’}
trajectoryLength: 2
removeLinesOutsideOfMask: {’Yes’}
Table 3.4: The settings structure array contains all the input values such that
comparing the quality of the PTV and rerunning the PTV code can be done
easily.
75
Figure 3.17: A plot that appears after running the code ’runPTV.m’. The white
lines are the trajectories and the white dots with black outlines represents the
particle at the last coordinate in the trajectory. The background is the distance
to vein margin as discussed in section 2.2.4.
76
Figure 3.18: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
magnitude of the velocity field.
77
Figure 3.19: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The power law has been fitted to the histogram pillar centers. There
are 46 points in total. The histogram is comprised of the grey bins, the blue cir-
cles are the histogram bin values and the red line is the fitted power law curve.
The binned distances in pixels are on the x-axis and the number of particles
that fall within those given distance bins is on the y-axis.
78
Variable Names Output in terminal
angle 10
framesMovement 1
signChangeCount 12
percentageOfTrajectoriesTheta 6.6170
percentageOfTrajectoriesAngle 3.8967
thetaMinMax 3.5763 and 135.0000
Figure 3.20: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The red line is the vein reference line, and it is assumed that the flow
direction of particles is along this line.
79
Figure 3.21: A plot that appears after running the code ’plotAndCalculate-
Data.m’. It shows the number of particles that was identified with a given
brightness intensity threshold for each image in the set. The blue line is the
number of particles identified from the images, and the red line is the linear fit
of that data. Along the x-axis is the frame number, and the y-axis shows the
number of particles identified.
Figure 3.22: This shows a singular vein with nanoparticles flowing through them.
The image set contains 11986 images and the dimensions are 511x72 pixels.
80
Figure 3.23: A PIV signal to noise ratio plot where the size of the blocks are, or
the resolution of the plot is an indication of there potentially not being enough
particles in the image, and/or within the subwindows.
Figure 3.24: The top image is the sum of 11986 images. The bottom image
is a binary image given by running a Gaussian filter over the top image and
threshold it. The image contains 511x72 pixels.
81
Settings field Settings value
images: 1×11986 cell
masks: {’InvertedMask.png’}
threshold: 0.0115
particleLength: 3
filter: ’no’
noiseLength: 1
overlap: 0.7500
subWindow: [32 12]
searchArea: [12 4]
trackingSearchRadius: 1
particleSkippedFrames: 10
replaceOutliers: 2
ensembleContribution: 0.5000
simplifyContribution: 0.5000
blur: ’gaussian’
sigma: 0.5000
previousVelocityContribution: 0.5000
distortedPass: 0
subpixel: {’3x3ls’}
trajectoryLength: 2
removeLinesOutsideOfMask: {’Yes’}
Table 3.6: The settings structure array contains all the input values such that
comparing the quality of the PTV and rerunning the PTV code can be done
easily.
82
Figure 3.25: A plot that appears after running the code ’runPTV.m’. The white
lines are the trajectories and the white dots with black outlines represents the
particle at the last coordinate in the trajectory. The background is the distance
to vein margin as discussed in section 2.2.4.
83
Figure 3.26: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
magnitude of the velocity field.
84
Figure 3.27: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The power law has been fitted to the histogram pillar centers. There
are 46 points in total. The histogram is comprised of the grey bins, the blue cir-
cles are the histogram bin values and the red line is the fitted power law curve.
The binned distances in pixels are on the x-axis and the number of particles
that fall within those given distance bins is on the y-axis.
85
Variable Names Output in terminal
angle 10
framesMovement 1
signChangeCount 7
percentageOfTrajectoriesTheta 0.0462
percentageOfTrajectoriesAngle 0.0462
thetaMinMax 18.4349 and 45.0000
Figure 3.28: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The red line is the vein reference line, and it is assumed that the flow
direction of particles is along this line.
86
Figure 3.29: A plot that appears after running the code ’plotAndCalculate-
Data.m’. It shows the number of particles that was identified with a given
brightness intensity threshold for each image in the set. The blue line is the
number of particles identified from the images, and the red line is the linear fit
of that data. Along the x-axis is the frame number, and the y-axis shows the
number of particles identified.
87
Figure 3.30: This shows a singular vein with nanoparticles flowing through them.
The image set contains 1999 images and the dimensions are 511x72 pixels.
Figure 3.31: A PIV signal to noise ratio plot where the size of the blocks are, or
the resolution of the plot is an indication of there potentially not being enough
particles in the image, and/or within the subwindows.
88
Figure 3.32: The top image is the sum of 1999 images. The bottom image
is a binary image given by running a Gaussian filter over the top image and
threshold it. The image contains 511x72 pixels.
89
Settings field Settings value
images: 1×1999 cell
masks: {’InvertedMask.png’}
threshold: 0.0385
particleLength: 3
filter: ’no’
noiseLength: 1
overlap: 0.7500
subWindow: [40 12]
searchArea: [12 4]
trackingSearchRadius: 1
particleSkippedFrames: 10
replaceOutliers: 2
ensembleContribution: 0.5000
simplifyContribution: 0.5000
blur: ’gaussian’
sigma: 1
previousVelocityContribution: 0.5000
distortedPass: 0
subpixel: {’3x3ls’}
trajectoryLength: 2
removeLinesOutsideOfMask: {’Yes’}
Table 3.8: The settings structure array contains all the input values such that
comparing the quality of the PTV and rerunning the PTV code can be done
easily.
90
Figure 3.33: A plot that appears after running the code ’runPTV.m’. The white
lines are the trajectories and the white dots with black outlines represents the
particle at the last coordinate in the trajectory. The background is the distance
to vein margin as discussed in section 2.2.4.
91
Figure 3.34: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
magnitude of the velocity field.
92
Figure 3.35: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The power law has been fitted to the histogram pillar centers. There
are 46 points in total. The histogram is comprised of the grey bins, the blue cir-
cles are the histogram bin values and the red line is the fitted power law curve.
The binned distances in pixels are on the x-axis and the number of particles
that fall within those given distance bins is on the y-axis.
93
Variable Names Output in terminal
angle 10
framesMovement 1
signChangeCount 9
percentageOfTrajectoriesTheta 0.1775
percentageOfTrajectoriesAngle 0.1775
thetaMinMax 11.3099 and 45.0000
Figure 3.36: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The red line is the vein reference line, and it is assumed that the flow
direction of particles is along this line.
94
Figure 3.37: A plot that appears after running the code ’plotAndCalculate-
Data.m’. It shows the number of particles that was identified with a given
brightness intensity threshold for each image in the set. The blue line is the
number of particles identified from the images, and the red line is the linear fit
of that data. Along the x-axis is the frame number, and the y-axis shows the
number of particles identified.
Figure 3.38: This shows a singular vein with nanoparticles flowing through them.
The image set contains 2937 images and the dimensions are 510x97 pixels.
95
Figure 3.39: A PIV signal to noise ratio plot where the size of the blocks are, or
the resolution of the plot is an indication of there potentially not being enough
particles in the image, and/or within the subwindows.
96
Figure 3.40: The top image is the sum of 2937 images. The bottom image
is a binary image given by running a Gaussian filter over the top image and
threshold it. The image contains 510x97 pixels.
97
Settings field Settings value
images: 1×2937 cell
masks: {’InvertedMask.png’}
threshold: 0.1220
particleLength: 3
filter: ’no’
noiseLength: 1
overlap: 0.7500
subWindow: [50 18]
searchArea: [18 6]
trackingSearchRadius: 1
particleSkippedFrames: 10
replaceOutliers: 2
ensembleContribution: 0.5000
simplifyContribution: 0.5000
blur: ’gaussian’
sigma: 0.5000
previousVelocityContribution: 0.5000
distortedPass: 0
subpixel: {’3x3ls’}
trajectoryLength: 2
removeLinesOutsideOfMask: {’Yes’}
Table 3.10: The settings structure array contains all the input values such that
comparing the quality of the PTV and rerunning the PTV code can be done
easily.
98
Figure 3.41: A plot that appears after running the code ’runPTV.m’. The white
lines are the trajectories and the white dots with black outlines represents the
particle at the last coordinate in the trajectory. The background is the distance
to vein margin as discussed in section 2.2.4.
99
Figure 3.42: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
magnitude of the velocity field.
100
Figure 3.43: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The power law has been fitted to the histogram pillar centers. There
are 46 points in total. The histogram is comprised of the grey bins, the blue cir-
cles are the histogram bin values and the red line is the fitted power law curve.
The binned distances in pixels are on the x-axis and the number of particles
that fall within those given distance bins is on the y-axis.
101
Variable Names Output in terminal
angle 10
framesMovement 1
signChangeCount 14
percentageOfTrajectoriesTheta 4.0798
percentageOfTrajectoriesAngle 2.4658
thetaMinMax 4.7636 and 90.0000
Figure 3.44: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The red line is the vein reference line, and it is assumed that the flow
direction of particles is along this line.
102
Figure 3.45: A plot that appears after running the code ’plotAndCalculate-
Data.m’. It shows the number of particles that was identified with a given
brightness intensity threshold for each image in the set. The blue line is the
number of particles identified from the images, and the red line is the linear fit
of that data. Along the x-axis is the frame number, and the y-axis shows the
number of particles identified.
Figure 3.46: This shows a singular vein with nanoparticles flowing through them.
The image set contains 2557 images and the dimensions are 826x157 pixels.
103
Figure 3.47: A PIV signal to noise ratio plot where the size of the blocks are, or
the resolution of the plot is an indication of there potentially not being enough
particles in the image, and/or within the subwindows.
Figure 3.48: The top image is the sum of 2557 images. The bottom image
is a binary image given by running a Gaussian filter over the top image and
threshold it. The image contains 826x157 pixels.
104
Settings field Settings value
images: 1×2557 cell
masks: {’InvertedMask.png’}
threshold: 0.3500
particleLength: 4
filter: ’Aggressive’
noiseLength: 1
overlap: 0.7500
subWindow: [90 30]
searchArea: [30 10]
trackingSearchRadius: 1
particleSkippedFrames: 10
replaceOutliers: 2
ensembleContribution: 0.5000
simplifyContribution: 0.5000
blur: ’gaussian’
sigma: 1
previousVelocityContribution: 0.5000
distortedPass: 0
subpixel: {’3x3ls’}
trajectoryLength: 2
removeLinesOutsideOfMask: {’Yes’}
Table 3.12: The settings structure array contains all the input values such that
comparing the quality of the PTV and rerunning the PTV code can be done
easily.
105
Figure 3.49: A plot that appears after running the code ’runPTV.m’. The white
lines are the trajectories and the white dots with black outlines represents the
particle at the last coordinate in the trajectory. The background is the distance
to vein margin as discussed in section 2.2.4.
106
Figure 3.50: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
magnitude of the velocity field.
107
Figure 3.51: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The power law has been fitted to the histogram pillar centers. There
are 46 points in total. The histogram is comprised of the grey bins, the blue cir-
cles are the histogram bin values and the red line is the fitted power law curve.
The binned distances in pixels are on the x-axis and the number of particles
that fall within those given distance bins is on the y-axis.
108
Variable Names Output in terminal
angle 10
framesMovement 1
signChangeCount 16
percentageOfTrajectoriesTheta 1.5097
percentageOfTrajectoriesAngle 0.9535
thetaMinMax 2.8624 and 135.0000
Figure 3.52: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The red line is the vein reference line, and it is assumed that the flow
direction of particles is along this line.
109
Figure 3.53: A plot that appears after running the code ’plotAndCalculate-
Data.m’. It shows the number of particles that was identified with a given
brightness intensity threshold for each image in the set. The blue line is the
number of particles identified from the images, and the red line is the linear fit
of that data. Along the x-axis is the frame number, and the y-axis shows the
number of particles identified.
Figure 3.54: This shows a singular vein with nanoparticles flowing through them.
The image set contains 2937 images and the dimensions are 510x97 pixels.
110
Figure 3.55: A PIV signal to noise ratio plot where the size of the blocks are, or
the resolution of the plot is an indication of there potentially not being enough
particles in the image, and/or within the subwindows.
111
Figure 3.56: The top image is the sum of 2937 images. The bottom image
is a binary image given by running a Gaussian filter over the top image and
threshold it. The image contains 510x97 pixels.
112
Settings field Settings value
images: 1×2937 cell
masks: {’InvertedMask.png’}
threshold: 0.1180
particleLength: 3
filter: ’no’
noiseLength: 1
overlap: 0.7500
subWindow: [64 18]
searchArea: [20 6]
trackingSearchRadius: 1
particleSkippedFrames: 10
replaceOutliers: 2
ensembleContribution: 0.5000
simplifyContribution: 0.5000
blur: ’gaussian’
sigma: 1
previousVelocityContribution: 0.5000
distortedPass: 0
subpixel: {’3x3ls’}
trajectoryLength: 2
removeLinesOutsideOfMask: {’Yes’}
Table 3.14: The settings structure array contains all the input values such that
comparing the quality of the PTV and rerunning the PTV code can be done
easily.
113
Figure 3.57: A plot that appears after running the code ’runPTV.m’. The white
lines are the trajectories and the white dots with black outlines represents the
particle at the last coordinate in the trajectory. The background is the distance
to vein margin as discussed in section 2.2.4.
114
Figure 3.58: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
magnitude of the velocity field.
115
Figure 3.59: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The power law has been fitted to the histogram pillar centers. There
are 46 points in total. The histogram is comprised of the grey bins, the blue cir-
cles are the histogram bin values and the red line is the fitted power law curve.
The binned distances in pixels are on the x-axis and the number of particles
that fall within those given distance bins is on the y-axis.
116
Variable Names Output in terminal
angle 10
framesMovement 1
signChangeCount 14
percentageOfTrajectoriesTheta 4.4225
percentageOfTrajectoriesAngle 3.2632
thetaMinMax 4.3987 and 90.0000
Figure 3.60: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The red line is the vein reference line, and it is assumed that the flow
direction of particles is along this line.
117
Figure 3.61: A plot that appears after running the code ’plotAndCalculate-
Data.m’. It shows the number of particles that was identified with a given
brightness intensity threshold for each image in the set. The blue line is the
number of particles identified from the images, and the red line is the linear fit
of that data. Along the x-axis is the frame number, and the y-axis shows the
number of particles identified.
118
Figure 3.62: This shows a singular vein with nanoparticles flowing through them.
The image set contains 3987 images and the dimensions are 988x211 pixels.
Figure 3.63: A PIV signal to noise ratio plot where the size of the blocks are, or
the resolution of the plot is an indication of there potentially not being enough
particles in the image, and/or within the subwindows.
119
Figure 3.64: The top image is the sum of 3987 images. The bottom image
is a binary image given by running a Gaussian filter over the top image and
threshold it. The image contains 988x211 pixels.
120
Settings field Settings value
images: 1×3987 cell
masks: {’InvertedMask.png’}
threshold: 0.0040
particleLength: 4
filter: ’no’
noiseLength: 1
overlap: 0.7500
subWindow: [128 36]
searchArea: [40 12]
trackingSearchRadius: 1
particleSkippedFrames: 10
replaceOutliers: 2
ensembleContribution: 0.5000
simplifyContribution: 0.5000
blur: ’gaussian’
sigma: 1
previousVelocityContribution: 0.5000
distortedPass: 0
subpixel: {’3x3ls’}
trajectoryLength: 2
removeLinesOutsideOfMask: {’Yes’}
Table 3.16: The settings structure array contains all the input values such that
comparing the quality of the PTV and rerunning the PTV code can be done
easily.
121
Figure 3.65: A plot that appears after running the code ’runPTV.m’. The white
lines are the trajectories and the white dots with black outlines represents the
particle at the last coordinate in the trajectory. The background is the distance
to vein margin as discussed in section 2.2.4.
122
Figure 3.66: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
magnitude of the velocity field.
123
Figure 3.67: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The power law has been fitted to the histogram pillar centers. There
are 46 points in total. The histogram is comprised of the grey bins, the blue cir-
cles are the histogram bin values and the red line is the fitted power law curve.
The binned distances in pixels are on the x-axis and the number of particles
that fall within those given distance bins is on the y-axis.
124
Figure 3.68: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The red line is the vein reference line, and it is assumed that the flow
direction of particles is along this line.
125
Figure 3.69: A plot that appears after running the code ’plotAndCalculate-
Data.m’. It shows the number of particles that was identified with a given
brightness intensity threshold for each image in the set. The blue line is the
number of particles identified from the images, and the red line is the linear fit
of that data. Along the x-axis is the frame number, and the y-axis shows the
number of particles identified.
126
Figure 3.70: This shows a singular vein with nanoparticles flowing through them.
The image set contains 3987 images and the dimensions are 494x105 pixels.
Figure 3.71: A PIV signal to noise ratio plot where the size of the blocks are, or
the resolution of the plot is an indication of there potentially not being enough
particles in the image, and/or within the subwindows.
127
Figure 3.72: The top image is the sum of 3987 images. The bottom image
is a binary image given by running a Gaussian filter over the top image and
threshold it. The image contains 494x105 pixels.
128
Settings field Settings value
images: 1×3987 cell
masks: {’InvertedMask.png’}
threshold: 0.0113
particleLength: 3
filter: ’no’
noiseLength: 1
overlap: 0.7500
subWindow: [64 24]
searchArea: [20 8]
trackingSearchRadius: 1
particleSkippedFrames: 10
replaceOutliers: 2
ensembleContribution: 0.5000
simplifyContribution: 0.5000
blur: ’gaussian’
sigma: 0.5000
previousVelocityContribution: 0.5000
distortedPass: 0
subpixel: {’3x3ls’}
trajectoryLength: 2
removeLinesOutsideOfMask: {’Yes’}
Table 3.18: The settings structure array contains all the input values such that
comparing the quality of the PTV and rerunning the PTV code can be done
easily.
129
Figure 3.73: A plot that appears after running the code ’runPTV.m’. The white
lines are the trajectories and the white dots with black outlines represents the
particle at the last coordinate in the trajectory. The background is the distance
to vein margin as discussed in section 2.2.4.
130
Figure 3.74: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
magnitude of the velocity field.
131
Figure 3.75: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The power law has been fitted to the histogram pillar centers. There
are 46 points in total. The histogram is comprised of the grey bins, the blue cir-
cles are the histogram bin values and the red line is the fitted power law curve.
The binned distances in pixels are on the x-axis and the number of particles
that fall within those given distance bins is on the y-axis.
132
Figure 3.76: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The red line is the vein reference line, and it is assumed that the flow
direction of particles is along this line.
133
Figure 3.77: A plot that appears after running the code ’plotAndCalculate-
Data.m’. It shows the number of particles that was identified with a given
brightness intensity threshold for each image in the set. The blue line is the
number of particles identified from the images, and the red line is the linear fit
of that data. Along the x-axis is the frame number, and the y-axis shows the
number of particles identified.
134
Figure 3.78: This shows a singular vein with nanoparticles flowing through them.
The image set contains 3988 images and the dimensions are 340x75 pixels.
135
Figure 3.79: The top image is the sum of 3988 images. The bottom image
is a binary image given by running a Gaussian filter over the top image and
threshold it. The image contains 340x75 pixels.
136
Settings field Settings value
images: 1×3988 cell
masks: {’InvertedMask.png’}
threshold: 1.2500
particleLength: 2
filter: ’no’
noiseLength: 1
overlap: 0.7500
subWindow: [80 30]
searchArea: [30 10]
trackingSearchRadius: 1
particleSkippedFrames: 10
replaceOutliers: 0
ensembleContribution: 0.7500
simplifyContribution: 0.5000
blur: ’gaussian’
sigma: 0.5000
previousVelocityContribution: 0.5000
distortedPass: 0
subpixel: {’5x5ls’}
trajectoryLength: 2
removeLinesOutsideOfMask: {’Yes’}
Table 3.20: The settings structure array contains all the input values such that
comparing the quality of the PTV and rerunning the PTV code can be done
easily.
137
Figure 3.80: A plot that appears after running the code ’runPTV.m’. The white
lines are the trajectories and the white dots with black outlines represents the
particle at the last coordinate in the trajectory. The background is the distance
to vein margin as discussed in section 2.2.4.
138
Figure 3.81: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
magnitude of the velocity field.
139
Figure 3.82: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The power law has been fitted to the histogram pillar centers. There
are 46 points in total. The histogram is comprised of the grey bins, the blue cir-
cles are the histogram bin values and the red line is the fitted power law curve.
The binned distances in pixels are on the x-axis and the number of particles
that fall within those given distance bins is on the y-axis.
140
Figure 3.83: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The red line is the vein reference line, and it is assumed that the flow
direction of particles is along this line.
141
Figure 3.84: A plot that appears after running the code ’plotAndCalculate-
Data.m’. It shows the number of particles that was identified with a given
brightness intensity threshold for each image in the set. The blue line is the
number of particles identified from the images, and the red line is the linear fit
of that data. Along the x-axis is the frame number, and the y-axis shows the
number of particles identified.
142
Figure 3.85: This shows a singular vein with nanoparticles flowing through them.
The image set contains 3983 images and the dimensions are 472x107 pixels.
Figure 3.86: The top image is the sum of 3983 images. The bottom image
is a binary image given by running a Gaussian filter over the top image and
threshold it. The image contains 472x107 pixels.
143
Settings field Settings value
images: 1×3983 cell
masks: {’InvertedMask.png’}
threshold: 1.0800
particleLength: 2
filter: ’no’
noiseLength: 1
overlap: 0.7500
subWindow: [80 20]
searchArea: [30 8]
trackingSearchRadius: 2
particleSkippedFrames: 10
replaceOutliers: 0
ensembleContribution: 0.7500
simplifyContribution: 0.5000
blur: ’gaussian’
sigma: 0.5000
previousVelocityContribution: 0.5000
distortedPass: 2
subpixel: {’5x5ls’}
trajectoryLength: 2
removeLinesOutsideOfMask: {’Yes’}
Table 3.22: The settings structure array contains all the input values such that
comparing the quality of the PTV and rerunning the PTV code can be done
easily.
144
Figure 3.87: A plot that appears after running the code ’runPTV.m’. The white
lines are the trajectories and the white dots with black outlines represents the
particle at the last coordinate in the trajectory. The background is the distance
to vein margin as discussed in section 2.2.4.
145
Figure 3.88: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
magnitude of the velocity field.
146
Figure 3.89: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The power law has been fitted to the histogram pillar centers. There
are 46 points in total. The histogram is comprised of the grey bins, the blue cir-
cles are the histogram bin values and the red line is the fitted power law curve.
The binned distances in pixels are on the x-axis and the number of particles
that fall within those given distance bins is on the y-axis.
147
Figure 3.90: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The red line is the vein reference line, and it is assumed that the flow
direction of particles is along this line.
148
Figure 3.91: A plot that appears after running the code ’plotAndCalculate-
Data.m’. It shows the number of particles that was identified with a given
brightness intensity threshold for each image in the set. The blue line is the
number of particles identified from the images, and the red line is the linear fit
of that data. Along the x-axis is the frame number, and the y-axis shows the
number of particles identified.
149
Figure 3.92: This shows a singular vein with nanoparticles flowing through them.
The image set contains 3992 images and the dimensions are 290x50 pixels.
Figure 3.93: A PIV signal to noise ratio plot where the size of the blocks are, or
the resolution of the plot is an indication of there potentially not being enough
particles in the image, and/or within the subwindows.
150
Figure 3.94: The top image is the sum of 3992 images. The bottom image
is a binary image given by running a Gaussian filter over the top image and
threshold it. The image contains 290x50 pixels.
151
Settings field Settings value
images: 1×3992 cell
masks: {’InvertedMask.png’}
threshold: 0.0051
particleLength: 2
filter: ’no’
noiseLength: 1
overlap: 0.7500
subWindow: [64 24]
searchArea: [20 8]
trackingSearchRadius: 1
particleSkippedFrames: 10
replaceOutliers: 2
ensembleContribution: 0.5000
simplifyContribution: 0.5000
blur: ’gaussian’
sigma: 0.5000
previousVelocityContribution: 0.5000
distortedPass: 0
subpixel: {’3x3ls’}
trajectoryLength: 2
removeLinesOutsideOfMask: {’Yes’}
Table 3.24: The settings structure array contains all the input values such that
comparing the quality of the PTV and rerunning the PTV code can be done
easily.
152
Figure 3.95: A plot that appears after running the code ’runPTV.m’. The white
lines are the trajectories and the white dots with black outlines represents the
particle at the last coordinate in the trajectory. The background is the distance
to vein margin as discussed in section 2.2.4.
153
Figure 3.96: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
magnitude of the velocity field.
154
Figure 3.97: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The power law has been fitted to the histogram pillar centers. There
are 46 points in total. The histogram is comprised of the grey bins, the blue cir-
cles are the histogram bin values and the red line is the fitted power law curve.
The binned distances in pixels are on the x-axis and the number of particles
that fall within those given distance bins is on the y-axis.
155
Figure 3.98: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The red line is the vein reference line, and it is assumed that the flow
direction of particles is along this line.
156
Figure 3.99: A plot that appears after running the code ’plotAndCalculate-
Data.m’. It shows the number of particles that was identified with a given
brightness intensity threshold for each image in the set. The blue line is the
number of particles identified from the images, and the red line is the linear fit
of that data. Along the x-axis is the frame number, and the y-axis shows the
number of particles identified.
Figure 3.100: This shows a singular vein with nanoparticles flowing through
them. The image set contains 3992 images and the dimensions are 396x75
pixels.
157
Figure 3.101: A PIV signal to noise ratio plot where the size of the blocks are, or
the resolution of the plot is an indication of there potentially not being enough
particles in the image, and/or within the subwindows.
Figure 3.102: The top image is the sum of 3992 images. The bottom image
is a binary image given by running a Gaussian filter over the top image and
threshold it. The image contains 396x75 pixels.
158
Settings field Settings value
images: 1×3992 cell
masks: {’InvertedMask.png’}
threshold: 0.0051
particleLength: 2
filter: ’no’
noiseLength: 1
overlap: 0.7500
subWindow: [64 24]
searchArea: [20 8]
trackingSearchRadius: 1
particleSkippedFrames: 10
replaceOutliers: 2
ensembleContribution: 0.5000
simplifyContribution: 0.5000
blur: ’gaussian’
sigma: 0.5000
previousVelocityContribution: 0.5000
distortedPass: 0
subpixel: {’3x3ls’}
trajectoryLength: 2
removeLinesOutsideOfMask: {’Yes’}
Table 3.26: The settings structure array contains all the input values such that
comparing the quality of the PTV and rerunning the PTV code can be done
easily.
159
Figure 3.103: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
distance to vein margin as discussed in section 2.2.4.
160
Figure 3.104: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
magnitude of the velocity field.
161
Figure 3.105: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The power law has been fitted to the histogram pillar centers. There
are 46 points in total. The histogram is comprised of the grey bins, the blue cir-
cles are the histogram bin values and the red line is the fitted power law curve.
The binned distances in pixels are on the x-axis and the number of particles
that fall within those given distance bins is on the y-axis.
162
Variable Names Output in terminal
angle 10
framesMovement 1
signChangeCount 4
percentageOfTrajectoriesTheta 7.6619
percentageOfTrajectoriesAngle 2.2117
thetaMinMax 4.3987 and 54.4623
Figure 3.106: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The red line is the vein reference line, and it is assumed that the flow
direction of particles is along this line.
163
Figure 3.107: A plot that appears after running the code ’plotAndCalculate-
Data.m’. It shows the number of particles that was identified with a given
brightness intensity threshold for each image in the set. The blue line is the
number of particles identified from the images, and the red line is the linear fit
of that data. Along the x-axis is the frame number, and the y-axis shows the
number of particles identified.
164
Figure 3.108: This shows a singular vein with nanoparticles flowing through
them. The image set contains 3983 images and the dimensions are 295x126
pixels.
Figure 3.109: A PIV signal to noise ratio plot where the size of the blocks are, or
the resolution of the plot is an indication of there potentially not being enough
particles in the image, and/or within the subwindows.
165
Figure 3.110: The top image is the sum of 3983 images. The bottom image
is a binary image given by running a Gaussian filter over the top image and
threshold it. The image contains 295x126 pixels.
166
Settings field Settings value
images: 1×3983 cell
masks: {’InvertedMask.png’}
threshold: 0.0057
particleLength: 2
filter: ’no’
noiseLength: 1
overlap: 0.7500
subWindow: [64 24]
searchArea: [20 8]
trackingSearchRadius: 1
particleSkippedFrames: 10
replaceOutliers: 2
ensembleContribution: 0.5000
simplifyContribution: 0.5000
blur: ’gaussian’
sigma: 0.5000
previousVelocityContribution: 0.5000
distortedPass: 0
subpixel: {’3x3ls’}
trajectoryLength: 2
removeLinesOutsideOfMask: {’Yes’}
Table 3.28: The settings structure array contains all the input values such that
comparing the quality of the PTV and rerunning the PTV code can be done
easily.
167
Figure 3.111: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
distance to vein margin as discussed in section 2.2.4.
168
Figure 3.112: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
magnitude of the velocity field.
169
Figure 3.113: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The power law has been fitted to the histogram pillar centers. There
are 46 points in total. The histogram is comprised of the grey bins, the blue cir-
cles are the histogram bin values and the red line is the fitted power law curve.
The binned distances in pixels are on the x-axis and the number of particles
that fall within those given distance bins is on the y-axis.
170
Variable Names Output in terminal
angle 10
framesMovement 1
signChangeCount 2
percentageOfTrajectoriesTheta 4.1802
percentageOfTrajectoriesAngle 2.3378
thetaMinMax 4.3987 and 90.0000
Figure 3.114: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The red line is the vein reference line, and it is assumed that the flow
direction of particles is along this line.
171
Figure 3.115: A plot that appears after running the code ’plotAndCalculate-
Data.m’. It shows the number of particles that was identified with a given
brightness intensity threshold for each image in the set. The blue line is the
number of particles identified from the images, and the red line is the linear fit
of that data. Along the x-axis is the frame number, and the y-axis shows the
number of particles identified.
The image in figure 3.116 has been enhanced for visibility in an image ed-
itor. The contrast and brightness has been increased. The bright white dots
that are visible on the top half of the image are not moving particles, rather
accumulation of nanoparticles that have gotten stuck at certain points. The
nanoparticles flowing through the bottom half of the image look like gaussian
noise with motion blur because the cameras exposure time could not be lowered
enough to capture the nanoparticles.
The average velocity field shown in figure 3.117 can only use the black spots
shown in figure 3.116, which are cells, for reference in calculating the velocity
field and this is not sufficient to get granular, detailed, information about the
172
velocity field as the subwindows have to be much too large.
Figure 3.116: This shows a singular vein with nanoparticles flowing through
them. The image set contains 1654 images and the dimensions are 2048x371
pixels.
Figure 3.117: A plot that appears after running the code ’PIVDistortedPass.m’.
It shows the average velocity field over all the images in the set.
173
ries that are likely to hit the vein margin for 800 nm, 400 nm and 200 nm yields
these results;
Table 3.30: The mean and STD of the percentage of particle trajectories that
are likely to hit the vein margin within the next frame with a deviation from
the reference line greater than 10°.
Table 3.31: The mean and STD of the percentage of all particle trajectories
that are likely to hit the vein margin within the next frame.
174
Chapter 4
From the 16 image sets (4 image sets with 800 nm particles, 4 image sets
with 400 nm particles and 7 image sets with 200 nm particles and 1 image set
with 100 nm particles) the results are very spread since the settings and image
quality can drastically change the results.
175
with a power law fit gives a < 1, meaning that the fluid is pesudoplastic as ex-
pected. Not all of these 11 power law fits can be trusted because the histogram
distributions are either skewed towards zero or skewed towards the right, or the
maximum distance to the vein margin. Furthermore the vein masks do not have
uniform thickness and therefore deriving the power law fit from the histogram
distribution of distances to the vein margin is ill advised. The power law often
doesn’t fit because the vein is not a perfect cylinder since that is what the model
is based on. Some parts of the vein are thicker and thinner and therefore the
distribution of trajectories throughout the vein may be skewed.
All the plots of number of particles identified at a given threshold per image
oscillate. What causes these oscillations is unknown. We know that the heart-
beat of the zebrafish visibly accelerates the flow of the nanoparticles in given
intervals. Perhaps this is causing these oscillations as the increased velocity
creates motion blur in the images and the brightness intensity of the particles
are reduced. Or perhaps it is the laser used to illuminate the particles that is on
a specific frequency that the camera catches. There were many issues with the
imaging as the nanoparticles were in one zebrafish moving too fast for the cam-
era to catch, while in another zebrafish the flow was much slower. This made
it so that the resolution of the images did not always coincide with the size of
the nanoparticles as the settings had to be adjusted to make the nanoparticles
visible for the given flow velocity.
While the flow of nanoparticles in veins are dominated by the blood flow,
the nanoparticles seem to exhibit Brownian motion in the form of erratic move-
ment. This was visible to us at times when watching the 800 nm particles under
the microscope. The British botanist, Robert Brown looked at Clarkia puchella
pollen in water with a microscope and the contents of the pollen seeped into the
water. The amyloplasts that that brown saw moving had an average radii of 2
µm[19] which is 2000nm. This is significantly (about 2-10 times) larger than the
nanoparticles that are flowing through the zebrafish. If the amyloplasts were
small enough to have their movement affected by water molecules, then perhaps
this is why we see an erratic movement from the nanoparticles, but it could also
be turbulence in the blood flow that the nanoparticles are reacting to. But to
capture this small motion with my current PTV, we need even higher resolution
images, or better software.
We only studied how the size of the nanoparticles affect the distribution
176
of nanoparticles in the zebrafish veins, but the shape and surface chemistry is
important as well. Unless a fully physics based model of a vein with blood flow
and nanoparticles is made and studied with perhaps a quantum computer, and
generate many different virtual nanoparticles to find the best combination of
size, shape and surface chemistry, we still need to use PIV and other quantita-
tive imaging methods.
I have written a MatLab script that can generate synthetic particle images
(particleLuminosity.m, ParticleEmitter.m, particleGeneratorMainProgram.m) where
the particles are generated from a mathematical model [22] and each particle is
unique with its position from frame to frame being saved. The particles move
along a given velocity field, and it is possible to input a factor of random motion
to each particle individually, and each particle can flicker if needed. The velocity
fields can be calculated with PIV. This can be a great starting point for future
research into particle tracking with either Artificial Neural Networks or Deep
learning algorithms. With MatLab, Keras, TensorFlow and many other frame-
works, it is possible to get started with Deep Learning and Artificial Neural
Networks easily and quickly. The world of nanoparticle research is wide open
for mathematicians, programmers, physicists and others.
177
Bibliography
178
[12] Richard Korsmeyer. Critical questions in development of targeted nanopar-
ticle therapeutics. Regenerative Biomaterials, 3(2):143–147, 2016.
[13] Chao Ma, Jia-Bin Huang, Xiaokang Yang, and Ming-Hsuan Yang. Adap-
tive correlation filters with long-term and short-term memory for object
tracking. arXiv preprint arXiv:1707.02309, 2017.
179
[23] Rebecca L. Siegel, Kimberly D. Miller, and Ahmedin Jemal. Cancer statis-
tics, 2017. CA: A Cancer Journal for Clinicians, 67(1):7–30, 2017.
[24] Takamasa Suzuki, Sadao Araki, Hideki Yamamoto, Kimito Kawamura, Hi-
roko Aida, Dominik Bernitzky, and Roberto Plasenzotti. Measurement of
Flow Properties of Mammalian Blood with Different Hematocrit Values
Using Falling Needle Rheometer. Journal of Systemics, 12(4):18–20, 2014.
[25] J Kristian Sveen and Edwin A Cowen. Quantitative imaging techniques
and their application to wavy flows. In PIV and water waves, pages 1–49.
World Scientific, 2004.
[26] Carina Beatrice Vibe, Federico Fenaroli, David Pires, Steven Ray Wilson,
Vanya Bogoeva, Raja Kalluru, Martin Speth, Elsa Anes, Gareth Griffiths,
and Jon Hildahl. Thioridazine in PLGA nanoparticles reduces toxicity and
improves rifampicin therapy against mycobacterial infection in zebrafish.
Nanotoxicology, 10(6):680–688, 2016. PMID: 26573343.
[27] Stefan Wilhelm, Anthony J. Tavares, Qin Dai, Seiichi Ohta, Julie Audet,
Harold F. Dvorak, and Warren C. W. Chan. Analysis of nanoparticle
delivery to tumours. Nature Reviews Materials, 1, 2016.
[28] Stuart J Williams, Choongbae Park, and Steven T Wereley. Advances
and applications on microfluidic velocimetry techniques. Microfluidics and
Nanofluidics, 8(6):709–726, 2010.
180