The results of a study on the creation of technology for non-contact detection of local temperature changes in the skin of the udder and teats are presented. The focus of the technology is the early diagnosis of mastitis in cows, since this disease of the udder is one of the most common and causes great damage to dairy farming, leading to a decrease in milk yield. The technology makes it possible to determine the temperature increase in local areas of the udder skin, to carry out early diagnosis and reduce additional costs associated with the treatment of mastitis. This paper presents an algorithm for non-contact temperature diagnostics of local areas of the skin of the udder of cows using 3 thermal imaging modules that allow you to receive thermograms simultaneously from all local areas of the skin of the udder. We have derived formulas for the main parameters of thermal imaging modules for their location relative to each other. Data collection can be carried out both in the dynamic and in the static position of the animal. This algorithm assigns one of 3 possible statuses to the animal: “healthy”, “suspicion of subclinical mastitis”, “suspicion of clinical mastitis”.