In underwater image acquisition process, due to the impact of water currents and other disturbances, the movement posture of the underwater machine will be unstable, which could lead to unusual problems such as twisting of underwater image capture. These factors will increase the error rate of feature point matching and lead to the failure of panoramic image mosaic. In this regard, we propose a new, highly applicable underwater image stitching algorithm. Firstly, the posture angle adjustment link is added to the underwater image processing, and the angle deflection problem of the underwater image is effectively improved by using the posture angle information. Secondly, the feature points of underwater images are extracted based on the accelerated robust feature (SURF) algorithm. Then, the reference image is matched with the feature points of the image to be registered, and effective feature point pairs are obtained by screening. Finally, the images are stitched based on OpenCV to obtain a good panoramic image. Afterexperimental analysis and comparison, our method can increase the number of matching feature point pairs between images. In addition, the Euclidean distance is significantly shortened during the matching process, which further makes the matching of feature points more accurate. Our method satisfactorily overcomes the adverse effects of actual underwater operations and has a better application prospect.