Figure 2
From: 3D Holographic Observatory for Long-term Monitoring of Complex Behaviors in Drosophila

Algorithm flow chart illustrating the entire processing steps in order, using the hologram in Fig. 1d.
(a) Hologram after enhancement (z = 0) through time average background subtraction. (b) Binary image after automatic thresholding and opening used to identify Drosophila in the FOV. Both images contain a scale bar of 2 mm. (c) 2D trajectories of detected single objects colored by speed (2D) over 2.5 s on either side of the hologram with an arrow pointing to the current time step (marked with a black circle and a ROI of size 150 × 150 pixel2). The red disks indicate locations and periods of missing data due to occlusion, which can be seen in Supplementary Video 3. (d) Illustration of the focus metric algorithm showing the recording plane with an inset of the original hologram and its reconstruction (inverted grayscale). The curve is overlaid on top of the fly arena, with a common x-axis for the z position (origin at the top left of hologram plane) and the peak corresponds to the plane of maximum focus shown by the inset of the refocused image. The arena is located at 140 mm to satisfy the paraxial approximation (Supplementary Methods). Scale bar of 2 mm on both insets.