Automated detection of oestrus and mastitis in dairy cows door