PROBLEM TO BE SOLVED: To provide an image processor capable of accurately detecting a lesion area from a body cavity image, and to provide a method for operating the image processor, and an image processing program.SOLUTION: An extracting part 17 extracts a mucosal area from a body cavity image. A criterion creating part 18 creates a criterion in a hue direction and a criterion in a saturation direction for the detection of a lesion area based on the hue and saturation of the mucosa area extracted by the extracting part 17. A lesion area detecting part 19 detects a lesion area from the body cavity image using the criteria created by the criterion creating part 18.