We formulate the computational processes of perception in the framework of the principle of least action by postulating the theoretical action being time-integral of the free energy in the brain sciences. The free energy principle is accordingly rephrased as that for autopoietic reasons all viable organisms attempt to minimize the sensory uncertainty about the unpredictable environment over a temporal horizon. By varying the informational action, we derive the brain's recognition dynamics which conducts the adaptive inference of the external causes of sensory data with addressing only canonical positions and momenta of the brain's representations of the dynamical world. To manifest the utility of our theory, we provide how the neural computation may be implemented biophysically at a single-cell level and subsequently be scaled up to a large-scale functional architecture of the brain. We also present formal solutions to the recognition dynamics for a model brain in linear regime and analyze the perceptual trajectories about fixed points in state space.