Different segmentation of lung nodules using the same segmentation algorithm can easily lead to excessive segmentation errors. Therefore, it is necessary to design an effective segmentation algorithm to improve image segmentation accuracy. Based on the hidden Markov model, this study processed the ultrasound images of pulmonary nodules to improve their diagnostic results. At the same time, this study was combined with the ultrasound image of lung nodules to process the ultrasound images. In addition, this study combines the convex hull algorithm for image processing, uses the improved vector method to repair, improves image recognizability, establishes a reliable feature extraction algorithm, and establishes a comprehensive diagnostic model. Finally, this study designed the test for performance analysis. Through experimental research, it can be seen that the model constructed in this study has certain clinical effects and can provide theoretical reference for subsequent related research.