This research aims to improve ventilation protocols in critical care by using appropriate computer models that take into account the essential lung mechanics. This paper automatically tracks the boundary of individual or groups of alveoli, and converts this into a pressure volume curve for three different types of alveoli. Schiller et al. investigate the inflation and deflation of alveoli in a surfactant deactivation model of lung injury in pigs. Three different types of alveoli were tracked using dynamic ventilation data from Schiller et al. The boundaries of all the tracked alveoli compared well visually to the movies. Pressure versus area curves were derived for both inflation and deflation, they captured the expected physiological behaviour, and were qualitatively similar to the quasi-static pressure area curves derived by Schiller et al. Quantitative differences are due to the dynamic effects of ventilation which were not investigated by Schiller et al.