We investigate the influence of blending on the Cepheid distance scale using two Local Group galaxies, M31 and M33. Blending leads to systematically low distances to galaxies observed with the HST, and therefore to systematically high estimates of H0. High-resolution HST images are compared to our ground-based data, obtained as part of the DIRECT project, for a sample of 22 Cepheids in M31 and 102 Cepheids in M33. For a sample of 22 Cepheids in M31, the average (median) flux contribution from luminous companions not resolved on the ground-based images in the V-band, SV, is about 19% (12%) of the flux of the Cepheid. For 102 Cepheids in M33 the average (median) values of SV, SI, SB are 23% (13%), 28% (20%), 28% (15%). For 64 Cepheids in M33 with periods in excess of 10 days the average (median) SV, SI, SB are 16% (7%), 23% (12%), 20% (10%).