Computing the Euler Number of a Binary Image Based on a Vertex Codification
Real-time thresholding with Euler numbers