The purpose of this study was to investigate the feasibility and validity of an automated image processing method to detect the locomotion of pigs in a group housed environment and under experimental conditions. Topview 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 40 kg (SD=6.5) at the end. Each pen was monitored by a topview CCD camera. The image analysis protocol to automatically quantify locomotion involved localising pigs through background subtraction and tracking them over a set period of 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 the 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.