An image processing device includes a feature value calculating unit that calculates a color feature value of each pixel or each segment inside at least one of a series of images captured by an image pickup device while moving inside a gastrointestinal tract a color feature value estimating unit that, based on data distribution of the color feature value of each pixel or each segment, estimates color feature value data representing mucous membrane and color feature value data representing gastrointestinal contents and a discrimination boundary setting unit that, based on the estimated color feature value data, sets a color feature value discrimination boundary between mucous membrane and gastrointestinal contents.