Accurate identification of vascular lumen region founded the base of bubble detection and bubble grading, which played a significant role in the detection of vascular gas emboli for the diagnosis of decompression sickness. To assist in the detection of vascular bubbles, it is crucial to develop an automatic algorithm that could identify vascular lumen areas in ultrasound videos with the interference of bubble presence. This article proposed an automated vascular lumen region recognition (VLRR) algorithm that could sketch the accurate boundary between vessel lumen and tissues from dynamic 2D ultrasound videos. It adopts 2D ultrasound videos of the lumen area as input and outputs the frames with circled vascular lumen boundary of the videos. Normalized cross-correlation method, distance transform technique, and region growing technique were adopted in this algorithm. Results A double-blind test was carried out to test the recognition accuracy of the algorithm on 180 samples in the images of 6 different grades of bubble videos, during which, intersection over union and pixel accuracy were adopted as evaluation metrics. The average IOU on the images of different bubble grades reached 0.76. The mean PA on 6 of the images of bubble grades reached 0.82. It is concluded that the proposed method could identify the vascular lumen with high accuracy, potentially applicable to assist clinicians in the measurement of the severity of vascular gas emboli in clinics.