1. An image filtering method comprising: setting a path connecting a first pixel of an arbitrary N-dimensional vector (N is a natural number) to a plurality of second pixels in an N-dimensional space having γ-dimensional positions and an η-dimensional feature quantity (γ is a natural number equal to 2 or more and n is a natural number equal to 1 or more); obtaining an integration value by integrating the feature quantity on the path; calculating a kernel function value corresponding to the first pixel using the integration value as a variable value of a preset kernel function; calculating a mean shift vector by dividing the sum of products of the kernel function value and the feature quantities of the second pixels by the sum total of the kernel function values; moving the first pixel according to the mean shift vector; and replacing the feature quantity of the first pixel with the feature quantity of the moved first pixel.