Autonomous underwater vehicles (AUVs) play an important role in deep-sea exploration, in which AUV self-localization is a key component. However, due to poor visibility caused by challenging marine environments, AUVs are often equipped with high-cost and heavy-weight acoustic sensors to accomplish localization tasks. We propose a robust real-time AUV self-localization method based on stereo camera and inertial sensor, which merges point and diagonal features, as well as inertial measurements to overcome the challenges of poor visibility. Our method also includes an underwater loop detection algorithm based on the combination of points and diagonal segments, which can extract effective binary descriptors in low-textured underwater scenarios. Furthermore, we develop an AUV self-localization system based on a real-time, portable, low-cost, and small volume sensor suite. Finally, we test the proposed method in a real underwater environment using our sensor suite, and the experimental results demonstrate the effectiveness of the proposed method under dramatically changing underwater scenarios.