The periodicity of a texture is one of its important visual characteristics. The inertias of co-occurrence matrices of the texture have been often used to detect the visual periodicity. However, it is time-consuming to explicitly construct these matrices. In this paper, we propose the distance matching function to avoid constructing the matrices due to our new interpretation of an inertia. For a texture of size m x n, the inertias of all co-occurrence matrices can be obtained in O(mn log mn) time by simultaneously evaluating the function at all displacement vectors. This is a significant improvement over the previous method using the co-occurrence matrices, that requires O(m(2)n(2)) time. (C) 1999 Elsevier Science B.V. All rights reserved.