1. An image processing apparatus comprising: an obtaining unit that obtains a captured image of a test piece including a target cell having a nucleus; a setting unit that sets target regions in the captured image, each of the target regions having a given size; a filter setting unit that sets a filter in each of the target regions, each filter including a number of first to N-th filter regions, and each filter is configured so that an i-th filter region does not extend outside an (i+1)-th filter region, where N is an integer that is equal to or larger than two and i is any integer in a range of 1 to N−1, and the filter setting unit is configured to change a basic pattern of the filter, the number of the first to N-th filter regions, a size of internal patterns within the basic pattern, and a position of the internal patterns in each filter region; a generating unit that, for each filter disposed in each of the target regions set by the setting unit, generates an image feature value based on a difference between the sum of pixel values of pixels included in the odd-numbered filter regions of the filter and the sum of pixel values of pixels included in the even-numbered filter regions of the filter; and a determination unit that determines, based on whether or not the image feature value generated by the generating unit satisfies an image-feature-value condition for the image feature value, whether or not the target cell is included in the filter region, the image-feature-value condition being predetermined.