The backscattered electron (BSE) signal in the scanning electron microscope (SEM) can be modulated, under the proper experimental conditions, by magnetic fields inside the specimen. This modulation is typically less than 1% of the collected current, and this must be amplified so as to be clearly visible in the recorded image. We have found that unwanted topographic contrasts can be reduced in comparison with this magnetic contrast by a lock-in technique. With a 1-μm permalloy film as the sample, the domain walls can be moved repetitively by applying a sinusoidal magnetic field. If the video waveform is processed using a lock-in amplifier controlled by this same signal, then the portions of the domain walls that move are emphasized in the image. Parts of the image which are not affected by the modulating magnetic field are strongly attenuated in the processed image.