2D phase reconstruction from a brightfield stack is widely useful for high throughput screens. The plane in which cells are in optimal focus can drift slightly even in the presence of hardware autofocus. There is a signature in the data to estimate the drift: the optimal plane of focus is where the brightfield image has the lowest contrast (if only phase information is present) or 3D phase reconstruction has the highest contrast. In the following data from @tmakushok and reconstruction by @talonchandler, slice 2 or 3 is where the cells are in focus.
One approach to dealing with the drift in focus is to use max projection of 3D phase. This should work fine for segmentation but is obviously not suitable for analyzing density variations. The proper fix would be to estimate the slice where cells are in focus from the spatial frequency spectrum of the brightfield/3D phase stack.
We compute the spectrum of brightfield data during the reconstruction. This step can be implemented before 3D OTFs are computed and when the focal_slice parameter is set to auto.
The waveorder.focus function focus_from_transverse_band is now used by the infected cell and mantis projects for finding focus from brightfield and fluorescence images, so I'm closing this.
2D phase reconstruction from a brightfield stack is widely useful for high throughput screens. The plane in which cells are in optimal focus can drift slightly even in the presence of hardware autofocus. There is a signature in the data to estimate the drift: the optimal plane of focus is where the brightfield image has the lowest contrast (if only phase information is present) or 3D phase reconstruction has the highest contrast. In the following data from @tmakushok and reconstruction by @talonchandler, slice 2 or 3 is where the cells are in focus.
https://user-images.githubusercontent.com/2934183/201429200-617a6aa4-da71-42c7-9301-a11f70b35b8a.mov
https://user-images.githubusercontent.com/2934183/201429211-78ee4e85-5593-4b42-b1ce-a8613bbd492c.mov
One approach to dealing with the drift in focus is to use max projection of 3D phase. This should work fine for segmentation but is obviously not suitable for analyzing density variations. The proper fix would be to estimate the slice where cells are in focus from the spatial frequency spectrum of the brightfield/3D phase stack.
We compute the spectrum of brightfield data during the reconstruction. This step can be implemented before 3D OTFs are computed and when the
focal_slice
parameter is set toauto
.