Maritime search and rescue requires target detection and tracking systems that are highly accurate and capable of achieving the shortest possible response time. Therefore, pan–tilt–zoom (PTZ) camera systems must satisfy these requirements. This study proposes an intelligent pan–tilt camera system for maritime search and rescue under conditions of fluctuating water surfaces, changing illumination, and targets that are easily obscured by waves. Previous methods mainly relied on PTZ tracking, You Only Look Once version 8 (YOLOv8) combined with tracking algorithms, and several image enhancement techniques; however, they remained limited in terms of real–time stability and adaptability to nonlinear noise in the marine environment. In this paper, YOLOv8 is integrated for human detection, while the ByteTrack algorithm is used to maintain object identity and estimate the image–centering error. An optimized Adaptive Neuro–Fuzzy Inference System (ANFIS) controller is designed for the two pan–tilt axes based on red–green–blue (RGB) and thermal imaging. Experimental results in four scenarios demonstrate that the target tracking system is stable, with the error gradually decreasing to acceptable limits. The YOLOv8 model achieved a precision above 0.8, a recall of approximately 0.7–0.75, and a mean Average Precision at an Intersection over Union threshold of 0.50 (mAP@50) of approximately 0.7. In real–world testing, the pan error was reduced from –674 pixels to 5 pixels.