]> git.friedersdorff.com Git - max/ct_plotting.git/blob - slides.rst
Add some useful links at the end
[max/ct_plotting.git] / slides.rst
1 Looking at microCT data of Brassica pods
2 ========================================
3
4 I am not a biologist, please stop me and correct me if I say silly things.
5
6 Pod Width
7 ---------
8
9 .. image:: plot_bar_pod_widths.png
10    :width: 9cm
11
12 Sphericity
13 ----------
14
15 .. image:: plot_bar_sphericities_of_seeds.png
16    :width: 9cm
17
18 Volume
19 ------
20
21 .. image:: plot_bar_volumes_of_seeds.png
22    :width: 9cm
23
24 Surface Area
25 ------------
26
27 .. image:: plot_bar_surface_area_of_seeds.png
28    :width: 9cm
29
30 Correlations
31 ------------
32
33 .. image:: plot_correlations.png
34    :width: 8cm
35
36 .. image:: plot_number_of_seeds_vs_mean_volume_of_seeds.png
37    :width: 9cm
38
39 .. image:: plot_length_of_pod_vs_mean_volume_of_seeds.png
40    :width: 9cm
41
42 .. image:: plot_length_of_pod_vs_number_of_seeds.png
43    :width: 9cm
44
45 Filtering false seeds
46 ---------------------
47
48 .. image:: brassica_pod_lq.png
49    :width: 7.3cm
50
51 * Image analysis produces many false seeds at the beak tip
52 * Density and size is comparable to seed
53 * Hard to recognise by graphical methods alone
54 * Recognise them by mathematical means instead
55
56 Spine fitting
57 -------------
58
59 * For every CT slice we have the centroid of the object
60 * Fit X and Y position as cubic functions of z
61 * Define 'real z' as the distance measured along the fitted curve from 
62   the beak to the z coordinate of the point
63
64 .. image:: fitting_debug.svg
65    :target: https://git.friedersdorff.com/max/ct_plotting/raw/master/fitting_debug.gif
66    :width: 1.22cm
67
68
69 Classify beak tip and Real Seeds™
70 ---------------------------------
71
72 Failed approaches: 
73
74 1. Assert that seeds must not be implausible - Removed insufficiently many seeds
75
76    * Too close to the ends of the pod
77    * Too large given pod dimensions
78
79 2. Real z position of seeds of a pod is a sample from some probability
80    distribution, fit and paramterize the distribution to classify seeds.
81
82    * Sum of two normal(-ish) distributions - noise at beak might be normal,
83      everything else definitely is not
84    * More complicated distribution - too complicated 
85
86 3. K-Means clustering - Silly for 1 dimensional data
87 4. Jenks Natural Breaks Optimisation - Should work in theory, did not work well
88    in practice
89
90 Break at Minimum Kernel Density Estimation (KDE)
91 ------------------------------------------------
92
93 * Beak has no Real Seeds™ and low density
94 * Expect a gap in real z of detected seeds
95
96
97 .. image:: plot_real_zs_genotype_unfiltered.png
98    :width: 11cm
99
100 .. raw:: pdf
101
102    FrameBreak 50
103
104 * Use KDE to find density of seeds as function of real z
105
106 .. image:: kde_debug.png
107    :width: 7cm
108
109 * First seed has real z less than 100?
110 * Find the local minimum at lowest real z where log(KDE)<-10
111 * Keep seeds with greater real z
112 * Profit
113
114 .. image:: plot_real_zs_genotype_filtered.png
115    :width: 11cm
116
117 .. image:: plot_real_zs_genotype_unfiltered.png
118    :width: 11cm
119
120 Beak and Silique length
121 -----------------------
122
123 Use the seed with lowest real z to mark the boundary of beak and silique:
124
125 .. image:: plot_bar_silique_lengths.png
126 .. image:: plot_bar_beak_lengths.png
127
128 Resources
129 ---------
130
131 `Git Repository`_
132
133 `This Presentation`_
134
135 `Numpy`_
136
137 `Matplotlib`_
138
139 `Seaborne`_
140
141 .. _Git Repository: https://github.com/NPPC-UK/ct_scanner_plotting 
142 .. _This Presentation: https://git.friedersdorff.com/max/ct_plotting.git
143 .. _Numpy: https://www.numpy.org/
144 .. _Matplotlib: https://matplotlib.org/
145 .. _Seaborne: https://seaborn.pydata.org/
146
147 .. target-notes::