We describe the asymptotic behaviour of the minimal heterogeneous d-capacity of a small set, which we assume to be a ball for simplicity, in a fixed bounded open set Ω ⊆ R d , with d ≥ 2. Two parameters are involved: ε, the radius of the ball, and δ, the length scale of the heterogeneity of the medium. We prove that this capacity behaves as C| log ε| d−1 , where C = C(λ) is an explicit constant depending on the parameter λ := lim ε→0 | log δ|/| log ε|.Applying this result, we determine the Γ-limit of oscillating integral functionals subjected to Dirichlet boundary conditions on periodically perforated domains. In this instance, our first result is used to study the behaviour of the functionals near the perforations which are exactly balls of radius ε. We prove that, as in the homogeneous case, these lead to an additional term that involves C(λ).