Gray-Value-Based Encoding Representation Method for Images

Resource Overview

In image template matching, although correlation algorithms based on pixel gray values are widely used, they suffer from high time complexity and sensitivity to brightness and size variations. To address these limitations, we propose a novel encoding representation method based on image gray values. This approach divides the image into fixed-size blocks (termed R-blocks), calculates the total gray value for each R-block, and encodes it based on its ordinal relationship with adjacent R-blocks. Template matching is achieved by comparing the encoded values of R-blocks. The computation of R-block encodings is simple, and matching only requires equality checks between codes, enabling fast comparison algorithms. The method demonstrates robustness to gray-level variations and noise.

Detailed Documentation

In the context of image template matching, current correlation algorithms based on pixel gray values are prevalent and widely applied, yet they exhibit drawbacks such as high time complexity and sensitivity to variations in image brightness and size. To overcome these limitations, we propose a novel encoding representation method grounded in image gray values. This method partitions the image into fixed-size blocks, referred to as R-blocks. For each R-block, the total gray value is computed, and an encoding is generated based on its ordinal ranking relative to adjacent R-blocks. Template matching is accomplished by comparing the encoded values of individual R-blocks. The algorithm facilitates straightforward computation of R-block encodings, and the matching process solely involves equality comparisons between codes, which can leverage efficient comparison algorithms. Additionally, the method exhibits strong robustness to pixel gray-level fluctuations and noise. Notably, the time complexity of the proposed algorithm is O(M²log(N)). Experimental results indicate that the computational time of the new algorithm is two orders of magnitude faster than existing gray-value correlation methods.