The effective quadrupole moments Q eff of the nuclei of 165Ho, 175Lu, 176Lu, 179Hf and 181Ta were accurately measured by detecting the pionic atom 5g-4f X-rays of the elements. The spectroscopic quadropole moments, Q spec, were obtained by correcting Q eff for nuclear finite size effect, distortion of the pion wave function by the pion-nucleus strong interaction, and contribution to the energy level splittings by the strong interaction. The intrinsic quadrupole moments, Q 0, were obtained by projecting Q spec into the frame of reference fixed on the nucleus. The shift, ε 0, and broadening, Γ 0, of the 4f energy level due to the strong interaction between the pion and the nucleons for all the elements were also measured. Theoretical values of ε 0 and Γ 0 were calculated and compared to the experimental values. The measured values of Q 0 were compared with existing results in muonic and pionic atoms. The measured values of ε 0 and Γ 0 were also compared with existing values.