Measuring and mapping human activities are essential steps towards constructing an intelligent and efficient society. Using thermal imaging, the privacy issues often related to surveillance can be eliminated and public acceptance of such systems is easier to obtain. The main focus of this thesis is automatic analysis of the use of sports arenas. This work is organised under three themes: Occupancy analysis, Activity recognition and Tracking. Finally, the thesis demonstrates how thermal imaging can also be applied efficiently for analysing humans in the Smart City. This thesis starts by introducing the technology of the sensor and the different application areas. Two new methods for counting people are presented, as well as two methods for sports type recognition. Tracking of sports players is an important task in many applications, from recognition of activities to evaluation of performance. This thesis presents a real-time tracking algorithm based on Kalman filtering and it suggests two methods for improving global offline tracking. At the end of this thesis five different applications of thermal imaging in the Smart City are presented. Methods for counting and tracking pedestrians are presented and applied, as well as a method for detecting potential near-collisions between cars and cyclists in large urban intersections.