Abstract—Although there is a growing number of scientific papers describing classification of in-body images, most of it is based on traditional colour histograms. In this paper we explain why these might not be the most adequate visual features for in- body image classification. Based on a colour dynamic range maximization criterion, we propose a methodology for creating more adequate colour histograms, testing it on a vital-stained magnification endoscopy scenario. I. INTRODUCTION MAGING technology in gastroenterology is very rapidly evolving. In the last decade, we have not only seen the arrival of new imaging modalities such as capsule endoscopy, narrow-band imaging endoscopy or micro- endoscopy, but also the full transition to digital video or high-definition video of older technologies such as colonoscopy and vital-stained endoscopy. This explosive growth of digital imaging data is raising the need to reassess ancient problems such as training and dissemination of technologies as well as previously unknown problems such as data storage and data analysis. In fact, there has been some previous research in these types of images, namely in capsule endoscopy. This technique was probably the tipping point for the gastroenterology community since all of a sudden clinicians had to sit down in front of a computer and watch an eight-hour video exam instead of the real-time analysis done on traditional endoscopies. New and ancillary real-time endoscopic technologies have increasing clinical relevance but limited dissemination and training, which may lead to uncertainty in the diagnosis and management of patients. Therefore, a growing effort of the computer vision and medical imaging community in developing automatic and semi-automatic systems to assist analysis of gastroenterology exams and clinical decisions was observed. Focusing on capsule endoscopy alone, there have been efforts towards the topographic segmentation of the Manuscript received April 16, 2008. This work was supported in part by the Grant “Bolsa à Iniciação Científica” given by Instituto de Telecomunicações, Portugal. A. Sousa and M.Coimbra are with the Instituto de Telecomunicações, Faculdade de Ciências da Universidade do Porto, Rua do Campo Alegre, 1021/1055, 4169 – 007 Porto, Portugal (e-mail: {andresousa, mcoimbra}@dcc.fc.up.pt). M. Correia is with the Faculdade de Engenharia da Universidade do Porto, Portugal (e-mail: mcorreia@fe.up.pt). M. Areia is with the Instituto Português de Oncologia – Coimbra, Portugal (e-mail: miguel.areia@netcabo.pt) M. Dinis-Ribeiro is with the CINTESIS / Faculdade de Medicina do Porto and Instituto Português de Oncologia, Portugal (e-mail: mario@med.up.pt). gastrointestinal (GI) tract (division into its four main sections: entrance, stomach, small intestine, large intestine) from Coimbra et al. [1-3] and Mackiewicz et al. [4,5], blood detection [6], intestinal fluid detection [7], detection of intestinal contractions [8], etc. Most of these examples are based on the classic pattern recognition approach of feeding a classifier with adequately extracted visual features. A limitation of this methodology is that traditional colour and texture features might not be the most adequate ways to describe in-body images where colours are mostly “red-ish” and there are no clearly defined geometric structures such as in man-made objects. Coimbra et al. [3] have shown that more adequate features are needed for robust event detection, and Maciewicz et al. [4,5] have used a specialized Hue-Saturation histogram followed by Discrete Cosine Transform (DCT) and Principal Component Analysis (PCA), although they have not explicitly studied the adequacy of this descriptor. In this work, we propose a methodology for creating more adequate color histograms for in-body images by studying the under and over-usage of the bins of a classical Hue- Saturation-Value (HSV) histogram. New histograms are created via merging and splitting of such bins and their classification performance measured using simple classification techniques. II. MATERIALS For our study, we have focused on the specific scenario of vital-stained magnification upper gastrointestinal endoscopy. The reason for this choice is that the quality of the images is higher than with capsule endoscopy, and there is a specific computer vision challenge worth studying. Dinis-Ribeiro et al. [9] showed that it was possible to effectively diagnose certain gastric lesions (namely extension of intestinal metaplasia in the gastric mucosa) and adequately predict neoplasia occurrence using this technology. Dinis-Ribeiro developed an original classification for gastric mucosa, recently externally validated [10], dividing images into 3 groups based on their colour and texture features, which were proven to be robust in intra-observer and inter-observer evaluation. A future objective of our research is to automate this classification, based on the promising results of the study here presented. The image data-set used (Porto1 – 176 images) was obtained at Instituto Português de Oncologia (IPO), Porto (Olympus ® Q240Z) and manually annotated by a clinical specialist who divided into three groups: I (Normal – 31.8% of images), II (Metaplasia – 54.5% of images), III (Dysplasia – Towards more adequate colour histograms for in-body images A. Sousa, M.Dinis-Ribeiro, M.Areia, M.Correia, M.Coimbra, Member, IEEE I