High-resolution imaging of CoGa/GaAs and ErAs/GaAs interfaces