Portable chest radiographic images play a critical role in examining and monitoring the condition and progress of critically ill patients in intensive care units (ICUs). For example, portable chest images are acquired to ensure that tubes inserted into the patients are properly positioned for effective treatment. In this paper, we present a system that automatically detects the position of an endotracheal tube (ETT), which is inserted into the trachea to assist patients who have difficulty breathing. The computer detection includes the detections of the lung field, spine line, and aortic arch. These detections lead to the identification of regions of interest (ROIs) used for the subsequent detection of the ETT and carina. The detection of the ETT and carina is performed within the ROIs. Our ETT and carina detection methods were trained and tested on a large number of images. The locations of the ETT and carina were confirmed by an experienced radiologist for the purpose of performance evaluation. Our ETT detection achieved an average sensitivity of 85% at less than 0.1 false-positive detections per image. The carina approach correctly identified the carina location within a 10 mm distance from the truth location for 81% of the 217 testing images. We expect our system will assist ICU clinicians to detect malpositioned ETTs and reposition malpositioned ETTs more effectively and efficiently.