  Mobile on-body sensing has distinct advantages for the analysis and
understanding of crowd dynamics: sensing is not geographically restricted to a
specific instrumented area, mobile phones offer on-body sensing and they are
already deployed on a large scale, and the rich sets of sensors they contain
allows one to characterize the behavior of users through pattern recognition
techniques.
  In this paper we present a methodological framework for the machine
recognition of crowd behavior from on-body sensors, such as those in mobile
phones. The recognition of crowd behaviors opens the way to the acquisition of
large-scale datasets for the analysis and understanding of crowd dynamics. It
has also practical safety applications by providing improved crowd situational
awareness in cases of emergency.
  The framework comprises: behavioral recognition with the user's mobile
device, pairwise analyses of the activity relatedness of two users, and graph
clustering in order to uncover globally, which users participate in a given
crowd behavior. We illustrate this framework for the identification of groups
of persons walking, using empirically collected data.
  We discuss the challenges and research avenues for theoretical and applied
mathematics arising from the mobile sensing of crowd behaviors.
