An electromagnetic localization signal may be sensed by an electromagnetic field sensor in an in-vivo device with an electromagnetic field interference that is superimposed on the electromagnetic localization signal. The electromagnetic field interference may be filtered by outputting, by the electromagnetic field sensor, an alternating signal that represents, or in response to, the electromagnetic localization signal sampling a first (e.g., positive) portion of the alternating signal during a first sampling window or period to obtain a first set of samples, sampling a second (e.g., negative) portion of the alternating signal during a second sampling window or period to obtain a second set of samples and calculating a number, NR, from the first and second sets of samples, that approximately represents a substantially interference free electromagnetic localization signal.