An animal's locomotor rate is an important indicator of its motility. In studies of the nematode C. elegans, assays of the frequency of body bending waves have often been used to discern the effects of mutations, drugs, or aging. Traditional manual methods for measuring locomotor frequency are low in throughput and subject to human error. Most current automated methods depend on image segmentation, which requires high image quality and is prone to errors. Here, we describe an algorithm for automated estimation of C. elegans locomotor frequency using image invariants, i.e., shape-based parameters that are independent of object translation, rotation, and scaling. For each video frame, the method calculates a combination of 8 Hu's moment invariants and a set of Maximally Stable Extremal Regions (MSER) invariants. The algorithm then calculates the locomotor frequency by computing the autocorrelation of the time sequence of the invariant ensemble. Results of our method show excellent agreement with manual or segmentation-based results over a wide range of frequencies. We show that compared to a segmentation-based method that analyzes a worm's shape and a method based on video covariance, our technique is more robust to low image quality and background noise. We demonstrate the system's capabilities by testing the effects of serotonin and serotonin pathway mutations on C. elegans locomotor frequency.