Due to the ill-posedness of the image reconstruction problem in electrical resistance tomography, the space resolution of the reconstructed image is relatively low. In order to improve the imaging quality, this paper proposed an improved pre-iteration Landweber image reconstruction algorithm. The improved particle swarm optimization was firstly used off-line to improve the ill-posedness of the sensitivity matrix, and to limit the range of the gain factor which could guarantee the convergence of the algorithm; secondly, set four typical flow regimes, then calculated mean value of the four image correlation coefficients between the four pre-determined resistance distribution and their reconstructions, and regarded the mean value as the fitness function. Thereafter, the improved particle swarm optimization was used to calculate gain factor, and the proposed algorithm was applied to image reconstruction for both typical and complicated flow regimes of two-phase flow. The experimental results demonstrate that, under the same experimental conditions, compared to the offline iteration online reconstruction (OIOR) algorithm, pre-iteration Landweber method with empirically-chosen gain factor, the new method improves the imaging quality obviously; compared to the modified Newton-Raphson method, the improved algorithm enhances the real-time performance without sacrificing the imaging quality.