In this work, we address the question of calculating the local effective Coulomb interaction matrix in materials with strong electronic Coulomb interactions from first-principles. To this purpose, we implement the constrained random phase approximation into a density functional code within the linearized augmented plane-wave framework. We apply our approach to the 3d and 4d early transition metal oxides SrMO3 (M = V, Cr, Mn) and (M = Nb, Mo, Tc) in their paramagnetic phases. For these systems, we explicitly assess the differences between two physically motivated low-energy Hamiltonians: The first is the three-orbital model comprising the t(2g) states only, which is often used for early transition metal oxides. The second choice is a model where both metal d and oxygen p states are retained in the construction of Wannier functions, but the Hubbard interactions are applied to the d states only ("d-dp Hamiltonian"). Interestingly, since (for a given compound) both U and J depend on the choice of the model, so do their trends within a family of these compounds. In the 3d perovskite series SrMO3, the effective Coulomb interactions in the t(2g) Hamiltonian decrease along the series due to the more efficient screening. The inverse, generally expected, trend, increasing interactions with increasing atomic number, is however recovered within the more localized "d-dp Hamiltonian." Similar conclusions are established in the layered 4d perovskites series Sr2MO4 (M = Mo, Tc, Ru, Rh). Compared to their isoelectronic and isostructural 3d analogs, the 4d perovskite oxides SrMO3 (M = Nb, Mo, Tc) exhibit weaker screening effects. Interestingly, this leads to an effectively larger U on 4d than on 3d shells when a t(2g) model is constructed.