Colonoscopy is the accepted screening method for detection of colorectal cancer or its precursor lesions, colorectal polyps. Indeed, colonoscopy has contributed to a decline in the number of colorectal cancer related deaths. However, not all cancers or large polyps are detected at the time of colonoscopy, and methods to investigate why this occurs are needed. One of the main factors affecting the diagnostic accuracy of colonoscopy is the quality of bowel preparation. The quality of bowel cleansing is generally assessed by the quantity of solid or liquid stool in the lumen. Despite a large body of published data on methods that could optimize cleansing, a substantial level of inadequate cleansing occurs in 10% to 75% of patients in randomized controlled trials. In this paper, a machine learning approach to the detection of stool in images of digitized colonoscopy video files is presented. The method involves the classification based on color features using a support vector machine (SVM) classifier. Our experiments show that the proposed stool image classification method is very accurate.