Abstract In order to measure the deformed parts under pressure, a size measurement method of underwater parts based on machine vision is proposed, whereas the relative position between the camera and target parts remains basically unchanged. Firstly, the imaging theory of the underwater camera is analyzed, and the mathematical relationship between the size of the target object and the number of pixels is established; Then, the underwater parts measurement system based on machine vision is built, and the image processing algorithm is studied to extract the target size; Thirdly, the genetic algorithm is studied to calibrate the camera measurement system; Finally, the relevant experiment is conducted on the underwater parts measurement system. Through the analysis of the results, the measurement uncertainty of the system is 0.0355mm, and the relative error is 0.1%. The underwater parts measurement system has practical value.