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