1 Looking at microCT data of Brassica pods
2 ========================================
4 I am not a biologist, please stop me and correct me if I say silly things.
15 .. image:: plot_bar_volumes_of_seeds.png
27 .. image:: brassica_pod_lq.png
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
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
43 .. image:: fitting_debug.svg
44 :target: fitting_debug.gif
48 Distinguishing between beak tip and Real Seeds™
49 -----------------------------------------------
53 1. Assert that seeds must not be implausible - Removed insufficiently many seeds
55 * Too close to the ends of the pod
56 * Too large given pod dimensions
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.
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
65 3. K-Means clustering - Silly for 1 dimensional data
66 4. Jenks Natural Breaks Optimisation - Should work in theory, did not work well
69 Break at Minimum Kernel Density Estimation (KDE)
70 ------------------------------------------------
72 * Beak has no Real Seeds™ and low density
73 * Expect a gap in real z of detected seeds
75 .. image:: plot_real_zs_genotype_unfiltered.png
81 * Use KDE to find density of seeds as function of real z
83 .. image:: kde_debug.png
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
91 .. image:: plot_real_zs_genotype_filtered.png
94 .. image:: plot_real_zs_genotype_unfiltered.png
97 Beak and Silique length
98 -----------------------
100 Use the seed with lowest real z to mark the boundary of beak and silique:
102 .. image:: plot_bar_silique_lengths.png
103 .. image:: plot_bar_beak_lengths.png