CCD surface photometry of galaxies with dynamical data. I. NGC 3379, M 87 and NGC 1052.