Does word "subject" have the same meaning in the following two sentences?

Her favorite subject is physics.

A moving picture of a train is more dramatic than a still picture of the same subject.
different meanings