In this section, the strategy proposed in the current study is explained in detail. The strategy has two phases: first, partitioning all blocks of the image which is performed based on the edge property which is specified by the coefficients of DCT; and second, encoding each range block via ICA in which an appropriate mechanism for finding the best candidate empire is employed to decrease MSE computation.
4.1 Phase 1: image partitioning based on DCT coefficient
The classification algorithm mainly aims at categorizing the whole image blocks (i.e., range and domain blocks) into three discrete classes. From the spatial domain, a block of image could be transformed to the frequency domain by means of DCT transformation. Within the frequency domain, the DCT coefficient that is situated in the upper left of the image block signifies the image block's low-frequency information and its rough contour, whereas the DCT coefficient that is situated in the lower right of the image block signifies the image block's high-frequency information and its fine texture. Therefore, we can explore the class of the image block by considering its lower-higher frequency DCT coefficients.
Therefore, for executing the classification, we used F(1,0) which indicates the lowest vertical coefficient and F(0,1) which represents the lowest horizontal coefficient. The DCT function is presented as follows:
(4)
where m,n = 0,1,…,N - 1, and
If a block is smooth, it means that it has a small F(1,0) and F(0,1), so its block does not have a clear texture. Therefore, this block could be categorized as a smooth type and represented by S type. A far distance between F(1,0) and F(0,1) indicates the edge in the block. If F(1,0) is large and F(0,1) is small, it indicates a vertical edge. On the contrary, if F(1,0) is small and F(0,1) is large, it indicates a horizontal edge. In both conditions, we classify this image block as a horizontal/vertical edge that is represented by HV type. In another condition, if F(1,0) is large and also F(0,1) is large, it indicates that this block is either a subdiagonal or a diagonal edge. In this situation, this block is classified as DS type.
For determining the types of image blocks, first, the DCT transformation is executed for finding their F(0,1) and F(1,0) values that, in turn, can indicate the class of the blocks. For each image block, a DCT absolute coefficient pair (|F(1,0)|, |F(0,1)|) is constituted based on absolute values of its F(1,0) and F(0,1). After that, we should normalize these absolute coefficient pairs; thereafter, they are known as (|F(1,0)|
N
, |F(0,1)|
N
). The obtained values are labeled on a Cartesian coordinate system in which |F(1,0)|
N
and |F(0,1)|
N
are x and y coordinates, respectively. Figure 1 shows the coefficient pair before normalization. As we can see in Figure 1a, all points are scattered throughout the Cartesian coordinate system, while in Figure 1b, the whole points are located on the first quadrant. It was performed to facilitate the classification of the points. In Figure 2, normalized coefficient pairs that are placed upon the first quadrant's unit circle are presented.
For all points, the distance and angle are calculated from and to the first point of the Cartesian coordinate system. TD and TA are two thresholds that are used for classification; TD is the distance threshold, and TA is the angle threshold. Therefore, according to Figure 2, if an image block is located on the unit between TA and 90 - TA and its distance value is more than TD, it is classified as DS type. All blocks whose distance value is less than TD are classified as S type. The remaining blocks are classified as HV class.
The algorithm of classification is shown as follows:
4.2 Phase 2: DCT imperialist competitive algorithm for FIC
As it can be observed in the ICA algorithm, the values of power of countries (i.e., MSE) should be calculated for all countries existing in the algorithm. Based on the edge property of the blocks, the domain blocks will be considered as proper candidates if and only if they are in a class with the same label as that of the range block. To avoid the useless computations, countries could be divided into two groups: developed countries and undeveloped countries. A suitable country is one which is able to be matched with the range block. Countries of a certain class are more likely to be matched with the range block of the same class. These are developed countries that have also the chance to be selected as empire. On the other hand, those countries whose class is not matched with the range block are known as undeveloped countries which, consequently, have less chance for being an empire. It is hoped that these countries will be developed and get a better position in the future decades. The power will be calculated merely for the developed countries. For the undeveloped countries, - Inf is assumed as their powers, which reduce MSE computation size. Based on the power of countries, the algorithm chooses NE countries as empire. Pseudo code of this proposed algorithm is shown below:
The stages of this pseudo code are explained as follows:
-
➢ Country formation
The stages of formation are a key part of DCTICA of FIC; in order to create the fractal encoding for the country using the partitioned iterated function system (PIFS), dihedral transformation pt and the location (p
x
, p
y
) of the domain block for each country are considered. As demonstrated in Figure 3, the country has three parts that are allocated p
x
, p
y
, and pt, where p
x
represents the domain blocks in the horizontal direction, p
y
its vertical position, and pt the transformation at rotation 0°, 90°, 180°, 270°, horizontal, vertical flip, relative to 135°, and flip relative to 45°.
-
➢ Calculate the country power
For calculating the power of each country within the population, the similarity characteristic is measured using MSE. The countries with less MSE are more similar to the candidate range block, and consequently, they will be more powerful.
-
➢ Initializing the empires and their colonies
More powerful countries are selected to be emperors; other counties are designated as colonies, which are dominated by one of the emperors. The colonies are distributed between the empires but on the basis of the empires' power; empires with more power will obtain more colonies. Based on the power of countries, the algorithm chooses NE countries as empire. As a result, three conditions may arise: (1) If NE is greater than the total number of developed countries, all these countries will be assigned as empire and the remaining empires will be selected randomly among undeveloped countries. (2) If NE is smaller than the number of members of the developed countries, NE members are selected as the empire and the remaining will be distributed as colony among the empire. (3) If NE is equal to the developed countries, all will be selected as empire. The undeveloped countries will be distributed ultimately among the emperors according to the empires' power.
-
➢ Moving the colonies toward their relevant imperialist
Here, the integration policy that each country requires in order to move toward their local minimum optima is determined. As the emperor is more powerful than its colonies, optimal solutions are located more probably around them. Therefore, each colony should move toward its corresponding emperor. In essence, the colonies have the chances of getting a new position that may be better than their last position.
-
➢ The colony position exchange
In new positions, developed countries and undeveloped countries are formed. The power of developed countries is calculated merely. For the undeveloped countries, - Inf is assumed as their powers. If a colony possesses a higher power in comparison with its imperialist, that colony can become the new imperialist, and this can be termed exchange.
-
➢ Revolution
In each imperialist, according to the revolution rate, a country can be selected and is then moved to a new position. This stage is performed randomly. In the proposed algorithm, when a revolution takes place in a country, it is hoped that this country would be directed to a better position. As we know, better situation for the country is that it could join the developed countries group. Therefore, if the revolution takes place in a developed country, and after revolution, it is positioned as an undeveloped one, and then we can ignore the revolution and consider its former position as the current one. On the other conditions, the new position obtained by the countries after revolution would be recorded for them.
-
➢ Computing the total cost
Here, for computing the total cost of each imperialist, first, we calculate the mean power of the developed countries belonging to that empire, and then we add a proportion of this value to the power of the empire itself. Equation 5 presents this operation. n stands for the number of developed countries of this imperialist, and ξ is a number considered to be between 0 and 1.
(5)
-
➢ Competition
In this step, the weak colonies from the weak empires are picked and then added with high power imperialist.
-
➢ Eliminating the powerless empires
The weakest empires are those with no colony. If an empire is the weakest, its imperialism will be eliminated and replaced by a country that we consider as a colony with powerful empire.
-
➢ Terminating condition
Steps 23 to 51 would be repeated until Decade = 0 or just one imperialist would remain in the cycles. This empire is considered as the best solution for the supposed range block. For each range block, steps 6 to 53 are done.