We propose to use the codispersion coefficient to define a measure of similarity between images. This coefficient has been widely used in spatial statistics to quantify the association between two spatial processes, and here we explore its capabilities in an image processing context is mathematically simple to compute and possesses good statistical properties. The new measure takes into account the spatial association in a specific direction h between a degraded image and the original unmodified image. Three applications are developed to illustrate the capabilities of our proposal. The defined measure captures the spatial association produced by fitting AR-2D processes with different window sizes. It is able to distinguish the levels of similarity between two images for specific directions in two-dimensional space. Finally, it detects stochastic resonance when an image is transmitted by a nonlinear device.