## 4 Recent Developments in IRT Detection
### IRT Image Preprocessing  
Different scientific teams use different methods for image preprocessing. According to [61], the simplest image processing methods that can be used to enhance the quality of thermal images are those based on contrast adjustment. Histogram equalization, a technique leading to an even redistribution of the brightness levels of individual pixels so that the resulting histogram is as flat as possible, is usually applied to optimize the image contrast [98]. The histogram equalization process is divided into three parts. The first part is the computation of the histogram, followed by the computation of the normalized histogram sum, and the last step is the transformation of the input image to the output image [101]. [PERSON] et al. chose gamma correction, defined as a nonlinear function that modifies the distribution of brightness values of the input image, as the basic operation, which they further combined with image matching (histogram matching) and contrast-limited adaptive histogram equalization (CLAHE) methods [102]. Image enhancement methods not only increase the quality of the image, but also allow for sharpening of features and reduction of image noise. In the spatial domain, they operate with direct manipulation of image pixels, where their values are modified [77]. Linear filters are applied using convolution, i.e., the new value of each pixel is calculated based on the pixel values in the neighboring region of the original pixel and the kernel coefficients of the operator, which is usually a square matrix of values with an odd number of rows and columns [98]. A common operation leading to image enhancement is noise reduction, in which, for example, a Gaussian filter is usually applied, which belongs to the group of linear filters and reduces noise very effectively by smoothing the image at the expense of fine details [66; 78]. The main representative of nonlinear filtering techniques is the median filter [94], which replaces the value of each point of the original image with the median of the values of the points that surround it, thus eliminating isolated noise points [103]. The median filter has a very strong effect on suppressing salt and pepper \begin{table}
\begin{tabular}{c c} \hline \hline
**Reference** & **Resolution of Thermal Images** \\ \hline
[64] & 60 \(\times\) 80 (0.005 MP) \\
[65; 66] & 160 \(\times\) 120 (0.019 MP) \\
[67; 68; 69; 70; 80] & 320 \(\times\) 240 (0.077 MP) \\
[63; 81; 82] & 320 \(\times\) 256 (0.085 MP) \\
[83; 84] & 336 \(\times\) 256 (0.086 MP) \\
[85; 86] & 384 \(\times\) 288 (0.111 MP) \\
[59; 62; 87; 88; 94] & 640 \(\times\) 480 (0.307 MP) \\
[95; 96] & 640 \(\times\) 512 (0.328 MP) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Resolution of thermal images used for detection in livestock production. noise [85, 104]. The image can also be modified in the frequency domain, using Fourier [70], wavelet [105], and cosine transforms [106, 107] to convert the image to a signal. [PERSON] et al. and [PERSON] et al. applied wavelet transformation to reduce image noise, where the noise values took on different frequencies compared to other points; then, the unwanted frequencies were eliminated using low-pass and high-pass filters [88, 108]. The application of thermal contrast-based methods using infrared thermography usable for identification of defects in the observed object must also be mentioned. Classical thermal contrast values correspond to the difference between the temperature of the pixel under investigation or the average temperature of a group of pixels and the temperature of the sound area, which is the reference non-defective region of the object at a given time. However, the determination of the sound area is difficult to define; its localization depends on the occurrence and recognition of the non-defective parts of the object, whose existence may not be known in advance.