Clinical viability of powered lower-limb assistive devices requires reliable and intuitive control strategies. Stance and swing are the main phases of the gait cycle across different locomotion tasks. Hence, a reliable method to accurately identify these phases can decrease sensing complexity and assist in enabling high-level control of assistive devices. Ultrasound (US) imaging has recently been introduced as a new sensing modality that may provide a solution for intuitive device control. US images of the rectus femoris and vastus intermedius muscles were collected in humans during level, incline, and decline ambulation tasks. Five low-level static (i.e. time-independent) features of US images were measured with respect to a reference image, including correlation coefficient, sum of absolute differences, structural similarity index, sum of squared differences, and image echogenicity. Time-derivatives of the static features were also calculated as temporal features. Support vector machine classifiers were trained using these static features to identify the gait phase both dependent and independent of the ambulation tasks. The results indicate an accuracy of 88.3% in identifying the gait phases for task-independent classifiers when trained using only the static features. Performance of the classifiers improved significantly to 92.8% after using the temporal features (p \lt0.01). The algorithm was efficient and the average processing speed was faster than 100 Hz. This study is the first demonstration on use of US imaging to provide continuous estimates of ambulation phase, and on multiple surfaces. These findings suggest task-independent approaches may reliably identify the main phases of the gait cycle. Advancements in this area of study may provide simpler intuitive strategies for high-level assistive device control and increase their clinical relevance.