Image-processing technique to measure pig activity in response to climatic variation in a pig barn