We use the first Betti number of a complex to characterize the morphological structure of granular samples in mechanical equilibrium. We analyze two-dimensional granular packings after a tapping process by means of both simulations and experiments. States with equal packing fraction obtained with different tapping intensities are distinguished after the introduction of a filtration parameter which determines the particles (nodes in the network) that are joined by an edge. We first use numerical simulations to characterize the effect of the precision in the particles localization by artificially adding different levels of noise in this magnitude. The outcomes obtained for the simulations are then compared with the experimental results allowing a clear distinction of experimental packings that have the same density. This is accomplished by just using the position of the particles and no other information about the possible contacts, or magnitude of forces.