Cancers located on the internal wall of bladders can be detected in image sequences acquired with endoscopes. The clinical diagnosis and follow-up can be facilitated by building a unique panoramic image of the bladder with the images acquired from different viewpoints. This process, called image mosaicing, consists of two steps. In the first step, consecutive images are pairwise registered to find the local transformation matrices linking geometrically consecutive images. In the second step, all images are placed in a common and global coordinate system. In this contribution, a mutual information-based similarity measure and a stochastic gradient optimization method were implemented in the registration process. However, the images have to be preprocessed in order to register the data in a robust way. Thus, a simple correction method of the distortions affecting endoscopic images is presented. After the placement of all images in the global coordinate system, the parameters of the local transformation matrices are all adjusted to improve the visual aspect of the panoramic images. Phantoms are used to evaluate the global mosaicing accuracy and the limits of the registration algorithm. The mean distances between ground truth positions in the mosaiced image range typically in 1-3 pixels. Results given for in vivo patient data illustrate the ability of the algorithm to give coherent panoramic images in the case of bladders.