Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
Review
. 2025 Jan;67(1):17-42.
doi: 10.5187/jast.2024.e111. Epub 2025 Jan 31.

RGB-based machine vision for enhanced pig disease symptoms monitoring and health management: a review

Affiliations
Review

RGB-based machine vision for enhanced pig disease symptoms monitoring and health management: a review

Md Nasim Reza et al. J Anim Sci Technol. 2025 Jan.

Abstract

The growing demands of sustainable, efficient, and welfare-conscious pig husbandry have necessitated the adoption of advanced technologies. Among these, RGB imaging and machine vision technology may offer a promising solution for early disease detection and proactive disease management in advanced pig husbandry practices. This review explores innovative applications for monitoring disease symptoms by assessing features that directly or indirectly indicate disease risk, as well as for tracking body weight and overall health. Machine vision and image processing algorithms enable for the real-time detection of subtle changes in pig appearance and behavior that may signify potential health issues. Key indicators include skin lesions, inflammation, ocular and nasal discharge, and deviations in posture and gait, each of which can be detected non-invasively using RGB cameras. Moreover, when integrated with thermal imaging, RGB systems can detect fever, a reliable indicator of infection, while behavioral monitoring systems can track abnormal posture, reduced activity, and altered feeding and drinking habits, which are often precursors to illness. The technology also facilitates the analysis of respiratory symptoms, such as coughing or sneezing (enabling early identification of respiratory diseases, one of the most significant challenges in pig farming), and the assessment of fecal consistency and color (providing valuable insights into digestive health). Early detection of disease or poor health supports proactive interventions, reducing mortality and improving treatment outcomes. Beyond direct symptom monitoring, RGB imaging and machine vision can indirectly assess disease risk by monitoring body weight, feeding behavior, and environmental factors such as overcrowding and temperature. However, further research is needed to refine the accuracy and robustness of algorithms in diverse farming environments. Ultimately, integrating RGB-based machine vision into existing farm management systems could provide continuous, automated surveillance, generating real-time alerts and actionable insights; these can support data-driven disease prevention strategies, reducing the need for mass medication and the development of antimicrobial resistance.

Keywords: Artificial intelligence; Machine vision; Pig behavior pattern; Pig health monitoring; Smart livestock production.

PubMed Disclaimer

Conflict of interest statement

No potential conflict of interest relevant to this article was reported.

Figures

Fig. 1.
Fig. 1.. A schematic showing the fundamental processing steps in machine vision from initial image acquisition through to final image interpretation and analysis.
Fig. 2.
Fig. 2.. An illustration of electromagnetic bands ranging from radio waves to gamma rays, highlighting the visible light spectrum.
Fig. 3.
Fig. 3.. Various commercial RGB imaging sensors used in pig farms for disease symptom detection and behavior and activity monitoring.
(A) Raspberry Pi camera module V2, (B) Mi 360 webcam, (C) EXview HAD CCD, (D) Microsoft Kinect v1, (E) Microsoft Kinect v2, (F) VIVOTEK IB836BA-HF3, (g) Hikevision DS-2CD2142FWD-I, (H) Microsoft OEM Life Cam, (I) Intel RealSense, (J) FL3-U3-88S2C-C (K) IFM O3D313, (L) IPC-HFW1230S-S4, (M) TOF 640, (N) Hero 4, and (O) Nikon D5100.
Fig. 4.
Fig. 4.. A schematic representation of image pre-processing, feature extraction, segmentation, and classification techniques used for the analysis of data in the context of RGB images.
Fig. 5.
Fig. 5.. Various image processing techniques applied to RGB images captured in pig farm environments.
(A) Image binarization, (B) background segmentation, (C) image masking, (D) thresholding of pig image, (E) masking and cropping, (F) color space conversions (RGB, HSV, LAB, YCbCr, xyz, and YUV) for feature extraction, (G) Otsu segmentation, (H) histogram equalization, and (I) pig body skeleton analysis.
Fig. 6.
Fig. 6.. Pig behavior detection and analysis using image processing fusion techniques.
(A) Ellipse-based segmentation, (B) Delaunay triangulation on pig body, and (C) combination of ellipse and Delaunay triangulation for detecting laying patterns.
Fig. 7.
Fig. 7.. Detailed representation of 3D reconstruction of pig point cloud from RGB images for body weight and movement analysis.
Fig. 8.
Fig. 8.. Monitoring, detection, and tracking of pig diseases and behavior using machine learning applications in pig farms.
(A) Posture detection and segmentation, (B) detection and tracking, (C) recognition of different body parts, (D) detection of disease conditions, and (E) tracking and counting in farm settings using RGB image data.

References

    1. Rauw WM, Rydhmer L, Kyriazakis I, Øverland M, Gilbert H, Dekkers JCM, et al. Prospects for sustainability of pig production in relation to climate change and novel feed resources. J Sci Food Agric. 2020;100:3575–86. doi: 10.1002/jsfa.10338. - DOI - PMC - PubMed
    1. Govoni C, Chiarelli DD, Luciano A, Pinotti L, Rulli MC. Global assessment of land and water resource demand for pork supply. Environ Res Lett. 2022;17:074003. doi: 10.1088/1748-9326/ac74d7. - DOI
    1. Vida V, Szűcs I. Pork production and consumption issues from the perspective of the religion and the World’s growing population. Appl Stud Agribus Commer. 2020;14:121–8. doi: 10.19041/APSTRACT/2020/1-2/16. - DOI
    1. Yang CH, Ko HL, Salazar LC, Llonch L, Manteca X, Camerlink I, et al. Pre-weaning environmental enrichment increases piglets’ object play behaviour on a large scale commercial pig farm. Appl Anim Behav Sci. 2018;202:7–12. doi: 10.1016/j.applanim.2018.02.004. - DOI
    1. Jorquera-Chavez M, Fuentes S, Dunshea FR, Warner RD, Poblete T, Unnithan RR, et al. Using imagery and computer vision as remote monitoring methods for early detection of respiratory disease in pigs. Comput Electron Agric. 2021;187:106283. doi: 10.1016/j.compag.2021.106283. - DOI

LinkOut - more resources