Topological invariants are extremely useful in many applications related to digital imaging and geometric modeling, and homology is a classical one, which has not yet been fully explored in image applications. We present an algorithm that computes the whole homology of an object of arbitrary dimension: Betti numbers, torsion coefficients and generators. The effective implementation of this algorithm has been realized in order to perform experimentations. Results on classical shapes in algebraic topology and on discrete objects are presented and discussed.