PROBLEM TO BE SOLVED: To extract an image of a detection target region from an image.SOLUTION: An image processing program causes a computer to perform the steps of: classifying a plurality of pixels in an image into a plurality of clusters on the basis of pixel values of the pixels; determining whether or not each of the plurality of clusters is a specific cluster containing a pixel which defines a portion of a detection target region among a plurality of regions of the image, on the basis of relationships of pixel values of the pixels contained in one of the plurality of clusters with pixel values of the pixels contained in others of the clusters; and outputting an image obtained by combining the pixels contained in the specific cluster.SELECTED DRAWING: Figure 1COPYRIGHT: (C)2020,JPO&INPIT【課題】画像から検出対象領域の画像を抽出すること。【解決手段】画像内の複数の画素それぞれの画素値に基づき、各画素を複数のクラスタのいずれかに分類し、前記複数のクラスタの間における、前記複数のクラスタそれぞれに含まれる画素の画素値の関係に基づいて、前記複数のクラスタそれぞれが、前記画像内の複数の領域のうち検出対象領域の一部となる画素を含む特定クラスタであるか否かを判定し、前記特定クラスタに含まれる画素を合成した画像を出力する。【選択図】図1