The purpose of this study is to investigate the feasibility and validity of an automated image processing method to detect the locomotion of pigs housed under experimental conditions. Top-view video images were captured for forty piglets, housed ten per pen. On average, piglets had a weight of 27 kg (SD = 4.4 kg) at the start of experiments and 40kg (SD=6.5) at the end. Each pen was monitored by a top-view CCD camera. The image analysis protocol to automatically quantify locomotion consisted localising pigs through background subtraction and tracking them over time. To validate the accuracy of detecting pigs “In Locomotion” or “Not In Locomotion”, they were compared to offline manually labelled behavioural data ('In Locomotion' versus 'Not In Locomotion'). This is the first study to show that locomotion of “pigs in a group” can be determined using image analysis with an accuracy of 89.8 %. Since locomotion is known to be associated with issues such as lameness, careful monitoring can give an accurate indication of the health and welfare of pigs.