An image processing device comprising: an acquisition means adapted to acquire a taken image obtained by imaging a sample including a target cell having a nucleus; a first extraction means adapted to extract pixels to be a candidate of the nucleus from pixels included in the taken image based on a first condition determined in advance with respect to at least one of a color and a luminance, which the pixels to be the candidate of the nucleus are required to have; a second extraction means adapted to label connected pixel groups each of which is obtained by connecting adjacent ones of the pixels extracted by the first extraction means, adapted to set a circumscribed rectangle to each of the connected pixel groups, and adapted to extract the connected pixel groups each having a vertical length, a horizontal length, and a ratio between the vertical length and the horizontal length of the circumscribed rectangle, and a density of the pixels to be the candidate of the nucleus extracted by the first extraction means in the circumscribed rectangle each included in a range determined in advance for each of the values, as candidates of the target cell; a setting means adapted to set a rectangular area, which has a predetermined size and is centered on a pixel included in the connected pixel group extracted by the second extraction means, for each of a plurality of pixels included in the connected pixel group; a calculation means adapted to calculate an image feature amount obtained from the rectangular area by dividing the rectangular area set by the setting means into predetermined partial areas, calculating a direction of a luminance gradient in each of the pixels in each of the partial areas, calculating a histogram of luminance gradient directions calculated with respect to each of the partial areas, and connecting the histograms of the respective partial areas; a learning means adapted to learn a condition of said image feature amount of the target cell based on sample images of a positive example and a negative example of the target cell by machine learning; and determination means adapted to determine whether or not the target cell is included in the rectangular area, which is set by the setting means for each of the plurality of pixels included in the connected pixel groups, based on whether or not the image feature amount obtained from the rectangular area satisfies the condition of the image feature amount of the target cell learned by the learning means. an acquisition means adapted to acquire a taken image obtained by imaging a sample including a target cell having a nucleus; a first extraction means adapted to extract pixels to be a candidate of the nucleus from pixels included in the taken image based on a first condition determined in advance with respect to at least one of a color and a luminance, which the pixels to be the candidate of the nucleus are required to have; a second extraction means adapted to label connected pixel groups each of which is obtained by connecting adjacent ones of the pixels extracted by the first extraction means, adapted to set a circumscribed rectangle to each of the connected pixel groups, and adapted to extract the connected pixel groups each having a vertical length, a horizontal length, and a ratio between the vertical length and the horizontal length of the circumscribed rectangle, and a density of the pixels to be the candidate of the nucleus extracted by the first extraction means in the circumscribed rectangle each included in a range determined in advance for each of the values, as candidates of the target cell; a setting means adapted to set a rectangular area, which has a predetermined size and is centered on a pixel included in the connected pixel group extracted by the second extraction means, for each of a plurality of pixels included in the connected pixel group; a calculation means adapted to calculate an image feature amount obtained from the rectangular area by dividing the rectangular area set by the setting means into predetermined partial areas, calculating a direction of a luminance gradient in each of the pixels in each of the partial areas, calculating a histogram of luminance gradient directions calculated with respect to each of the partial areas, and connecting the histograms of the respective partial areas; a learning means adapted to learn a condition of said image feature amount of the target cell based on sample images of a positive example and a negative example of the target cell by machine learning; and determination means adapted to determine whether or not the target cell is included in the rectangular area, which is set by the setting means for each of the plurality of pixels included in the connected pixel groups, based on whether or not the image feature amount obtained from the rectangular area satisfies the condition of the image feature amount of the target cell learned by the learning means.