A method based on Electrical Capacitance Tomography (ECT) and an improved Least Squares Support Vector Machine (LS-SVM) is proposed for void fraction measurement of oil-gas two-phase flow. In the modeling stage, to solve the two problems in LS-SVM, pruning skills are employed to make LS-SVM sparse and robust; then the Real-Coded Genetic Algorithm is introduced to solve the difficult problem of parameters selection in LS-SVM then. In the measurement process, the flow pattern of oil-gas two-phase flow is identified by using fast back-projection image reconstruction and a fuzzy pattern recognition technique and the void fraction is computed using the void fraction model corresponding to the identified flow pattern. Experimental results demonstrate that both the improvement of LS-SVM and the parameter optimization are effective. The results also show that the real-time performance of the proposed void fraction measurement method is good, and the measurement precision can satisfy the application requirement.