]> git.friedersdorff.com Git - max/ct_plotting.git/blob - slides.rst
Add volume graphs
[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 Sphericity
10 ----------
11
12 Volume
13 ------
14
15 .. image:: plot_bar_volumes_of_seeds.png
16    :width: 9cm
17
18 Surface Area
19 ------------
20
21 Correlations
22 ------------
23
24 Filtering false seeds
25 ---------------------
26
27 .. image:: brassica_pod_lq.png
28    :width: 7.3cm
29
30 * Image analysis produces many false seeds at the beak tip
31 * Density and size is comparable to seed
32 * Hard to recognise by graphical methods alone
33 * Recognise them by mathematical means instead
34
35 Spine fitting
36 -------------
37
38 * For every CT slice we have the centroid of the object
39 * Fit X and Y position as cubic functions of z
40 * Define 'real z' as the distance measured along the fitted curve from 
41   the beak to the z coordinate of the point
42
43 .. image:: fitting_debug.svg
44    :target: fitting_debug.gif
45    :width: 1.25cm
46
47
48 Distinguishing between beak tip and Real Seeds™
49 -----------------------------------------------
50
51 Failed approaches: 
52 ##################
53 1. Assert that seeds must not be implausible - Removed insufficiently many seeds
54
55    * Too close to the ends of the pod
56    * Too large given pod dimensions
57
58 2. Real z position of seeds of a pod is a sample from some probability
59    distribution, fit and paramterize the distribution to classify seeds.
60
61    * Sum of two normal(-ish) distributions - noise at beak might be normal,
62      everything else definitely is not
63    * More complicated distribution - too complicated 
64
65 3. K-Means clustering - Silly for 1 dimensional data
66 4. Jenks Natural Breaks Optimisation - Should work in theory, did not work well
67    in practice
68
69 Break at Minimum Kernel Density Estimation (KDE)
70 ------------------------------------------------
71
72 * Beak has no Real Seeds™ and low density
73 * Expect a gap in real z of detected seeds
74
75 .. image:: plot_real_zs_genotype_unfiltered.png
76
77 .. raw:: pdf
78
79    FrameBreak 50
80
81 * Use KDE to find density of seeds as function of real z
82
83 .. image:: kde_debug.png
84    :width: 7cm
85
86 * First seed has real z less than 100?
87 * Find the local minimum at lowest real z where log(KDE)<-10
88 * Keep seeds with greater real z
89 * Profit
90
91 .. image:: plot_real_zs_genotype_filtered.png
92    :width: 12cm
93
94 .. image:: plot_real_zs_genotype_unfiltered.png
95    :width: 12cm
96
97 Beak and Silique length
98 -----------------------
99
100 Use the seed with lowest real z to mark the boundary of beak and silique:
101
102 .. image:: plot_bar_silique_lengths.png
103 .. image:: plot_bar_beak_lengths.png
104