A system includes an electrical interface and a processor. The electrical interface is configured for communicating with a probe inserted into a heart of a patient. The processor is configured to receive, via the electrical interface, (i) a first indication of an electrical impedance measured by the probe at a given location on an inner surface of the heart, and (ii) a second indication of a quality of mechanical contact between the probe and the inner surface of the heart during measurement of the electrical impedance. The processor is further configured, based on the first and second indications, to classify tissue at the given location as scar tissue.