In-situ measurement and analysis of pores are helpful to understand the properties of rocks. However, continuous quantitative analysis of pores in whole borehole is still difficult. Borehole camera technology can capture the borehole wall image of the whole well section by going deep into the borehole, which provides technical conditions for the measurement and analysis of pores. In this paper, a continuous measurement method of rock pores based on borehole camera technology is introduced. According to the characteristics of the optical image of borehole wall, a method of pore recognition and analysis is proposed. Specifically, the influence of redundant information on pore recognition is eliminated, and then the pores are accurately recognized by binarization and morphological operation. Based on the results of pore recognition and the coordinate information provided by borehole wall image, the calculation methods of surface porosity and line porosity are proposed, and the statistical analysis of pore distribution is realized according to the calculation results. In addition, the morphological characteristics of pores are also discussed. This method realizes the accurate recognition and quantitative calculation of pore structure based on borehole wall image, and provides a new method for continuous analysis of pore structure in the whole well.