Generally, the operation of an endoscope requires a skillful operator, due to the difficulty of focusing on the target region. To support such a task, a vision system that can produce clear endoscopic images to easily understand the target region, is required. In this paper, we propose an all-in-focus image creation algorithm which uses the original one, developed for microscopic image, and assuming that the target area is static, but we extend its application to endoscopic images. Through several experiments, we confirm the effectiveness of our proposed algorithm.