A second order partial derivative matrix and at least one first order partial derivative value of a pixel value at each pixel position in an image are calculated. Based on values of the calculated second order partial derivative matrix, an evaluation value of a likelihood of being a line-like structure and/or an evaluation value of a likelihood of being a plate-like structure for the pixel position are calculated, such that the larger the first order partial derivative value, the smaller the evaluation values.