Does the word "impression" have the same definition in the next two sentences?

The events left a permanent impression in his mind.

He left the impression of his fingers in the soft mud.
different meanings