Automated detection of oestrus and mastitis in dairy cows by