########################### Image manipulation tricks ########################### ************** Segmentation ************** Ostu's method ============= .. note:: **References** - `Implement Otsu's thresholding in Python without using OpenCV and MATLAB `_ - `Scikit's skimage.filters.threshold_otsu `_ - `Scikit's Otsu's thresholding `_ :download:`source: otsu.py ` .. image:: otsu.svg :width: 800px :align: center This example uses Otsu's method to combine two sources (two different images of the same object) to get an optimal threshold. The idea is to get a weighted average of two images as follows .. math:: \mathcal{I} = (1 - \alpha) \mathcal{I}_a + \alpha \mathcal{I}_b whereby :math:`\alpha` is chosen such that the separability, defined by Otsu is maximised.