In order to achieve contactless and automated online measurement of internal thread parameters, this paper proposes a machine vision measurement system for internal thread pitch based on the spherical catadioptric panoramic imaging principle, using through-hole nuts and blind-hole nuts as inspection objects. Firstly, the system acquires the image obtained by the spherical catadioptric system and segments the complete internal thread area. Secondly, contrast limited adaptive histogram equalization algorithm is used to enhance the image contrast, and a combination of median filtering and bilateral filtering is used to protect the thread boundary information. Then, a Zernike moment edge detection algorithm is used to determine the sub-pixel edges of each thread. Finally, the internal thread pitch dimensions are calculated based on the theory of spherical catadioptric imaging. The pitch measurement values were compared with those of a comprehensive thread measuring machine for metrology. It shows that the system has an average measurement error of 0. 018 5 mm that meets the requirements for accuracy of internal thread pitch measurement in industrial production. The experiments proved that the system is highly effective in detecting and can be used for online visual inspection of internal threads. This study provides a reference solution for cylindrical internal wall dimension measurement and defect detection.