A method, including pressing a distal end of a medical probe against a wall of a body cavity, and receiving from the probe first measurements of a force exerted by the distal end on the wall. The method also includes receiving from the probe second measurements indicating a displacement of the wall in response to the force. The method further includes estimating a thickness of the wall based on the first and the second measurements.