In the article the results of 2650 esophagogastroduodenoscopies of the the high resolution with NBI (narrow band imaging) application technology are presented. In the course of research the author’s program of the automated allocation of a pathology of the esophagus is applied on the basis of colour segmentation of images. The authentic improving of NBI endoscopy in diagnosis of the early neoplasies at esophagus is shown. The algorithm of the narrowband endoscopy examination of esophagus, stomach, duodenum with application the automated allocation of a pathology is also developed