An automatic system for the detection of dairy cows lying behaviour in free-stall barns