Ab initio determination of model Hamiltonian parameters for strongly correlated materials is a key issue in applying many-particle theoretical tools to real narrow-band materials. We propose a selfcontained calculation scheme to construct, with an ab initio approach, and solve such a Hamiltonian. The scheme uses a Wannier-function-basis set, with the Coulomb interaction parameter U obtained specifically for theseWannier functions via constrained Density functional theory (DFT) calculations. The Hamiltonian is solved by Dynamical Mean-Field Theory (DMFT) with the effective impurity problem treated by the Quantum Monte Carlo (QMC) method. Our scheme is based on the pseudopotential plane-wave method, which makes it suitable for developments addressing the challenging problem of crystal structural relaxations and transformations due to correlation effects. We have applied our scheme to the "charge transfer insulator" material nickel oxide and demonstrate a good agreement with the experimental photoemission spectra.