This paper introduces a method for analysing motion patterns that can be utilised to optimise data-driven systems. The aim is to use surveillance cameras and artificial intelligence to track multiple objects in a reliable manner, thereby preserving the authenticity of movement patterns for numerous and similar objects. In a case study, this method is applied to optimize lighting conditions in animal husbandry. Furthermore, this approach can be utilized not only in animal husbandry but also in other domains.