Research Article
Ancient Chinese Character Image Retrieval Based on Dual Hesitant Fuzzy Sets
Algorithm 1
Elastic grid division algorithm.
| Input: Chinese character image (size: M × N) | | Output: vertical and horizontal grid lines ( and ) | (1). | for i = 0 to M−1//traverse the whole image pixels | (2). | for j = 0 to N−1 | (3). | DV = DV + Density[i][j]//accumulate pixel density | (4). | if DV > Sum ∗ (k + 1)/5 then//the image is divided into 5 areas in the horizontal direction, Sum is the total number of pixels | (5). | = j; k = k + 1//the initial value of k is 0 | (6). | end if | (7). | end for | (8). | end for | (9). | for i = 0 to M−1//traverse the pixels of each area of the above partition | (10). | for j = to | (11). | DH = DH + Density[i][j]//accumulate pixel density | (12). | if DH > Sum ∗ (z + 1)/25 then//the image is divided into 25 areas | (13). | = i; l = l + 1; z = z + 1//the initial values of l and z are 0 | (14). | end if | (15). | end for | (16). | end for | (17). | return, |
|