# New Evolutionary-Based Techniques for Image Registration
## 5 The Proposed Evolutionary Algorithms for Image Registration
### The Proposed Variants of Firefly Algorithm and APSO  
In the following we describe two proposed updating rule variants to develop new algorithms based on the general scheme of the standard firefly algorithm and APSO mechanism respectively. Each candidate solution (firefly) is a D-dimensional real valued vector whose entries are the values of a potential transformation parameter. Note that if the search space corresponds to the degradation model (8) then \(\mathrm{D}=5\). We considered the fixed-size model, with each current population having \(\mathrm{n}\) chromosomes, \(\mathrm{X}=\{\mathrm{x_{1}},\mathrm{x_{2}},\mathrm{x_{3}},\ldots\mathrm{x_{n }}\}\),  
\[\mathrm{x_{i}}{=}\left(\mathrm{x_{i}}(1),\mathrm{x_{i}}(2),\ldots,\mathrm{x_{ i}}(\mathrm{D})\right) \tag{27}\]  
Also, we assume that for each candidate solution \(\mathrm{x_{i}}\)  
\[\mathrm{x_{i}}(\mathrm{k})\in[\mathrm{lb}(\mathrm{k}),\mathrm{hb}(\mathrm{k}) ],\ \mathrm{k}=1,\ldots,\mathrm{D} \tag{28}\]  
In other words, each transformation parameter belonging to SP is assumed to be bounded by certain given values, the search space being defined by  
\[\mathrm{S}=\prod_{\mathrm{k}=1}^{\mathrm{D}}[\mathrm{lb}(\mathrm{k}),\mathrm{ hb}(\mathrm{k})] \tag{29}\]The initial firefly population, \(X_{0}\), is randomly generated according to  
\[x_{i}(k)=(hb(k)-lb(k))\cdot d+lb(k) \tag{30}\]  
where \(d\) is a random number generated from uniform distribution \(U(0,1)\). We introduce two modalities to define the randomness parameter \(\alpha\) and we compute the dissimilarity between each component of two different individuals instead of the classic Euclidian distance to deal with the attributes diversity. First, we take into account the search space bounds to define the updating rule  
\[x_{i}(k)=x_{i}(k)+\beta_{\bar{ij}}(k)\cdot\left(x_{i}(k)-x_{i}(k)\right)+ \frac{hb(k)-lb(k)}{\max_{k}(hb(k)-lb(k))}\cdot\varepsilon\cdot c \tag{31}\]  
\[\beta_{\bar{ij}}(k)=\beta_{0}e^{-\gamma r(k)_{\bar{ij}}^{2}} \tag{32}\]  
\[x_{i}(k)=(hb(k)-lb(k))\cdot d+lb(k) \tag{33}\]  
where \(c\) is a given constant scale factor, \(\varepsilon\) is randomly generated from the uniform distribution \(U(0,1)\). Note that the factor \(\beta_{ij}\) depends on the value of \(k\). The vector \(r\) measures the differences between \(x_{i}\) and \(x_{j}\), its \(k\)th component being given by  
\[r_{\bar{ij}}(k)=\frac{\left|x_{i}(k)-x_{j}(k)\right|}{Dmax(k)} \tag{34}\]  
where  
\[Dmax(k)=\frac{hb(k)-lb(k)}{\sqrt{D}} \tag{35}\]  
The updating rule (31) modifies each component \(k\) of the individual \(x_{i}\) based on its corresponding range. The second proposed updating rule takes into account both the variable ranges and the quality of the attractor  
\[x_{i}(k)=x_{i}(k)+\beta_{\bar{ij}}(k)\cdot\left(x_{j}(k)-x_{i}(k)\right)+ \frac{hb(k)-lb(k)}{\max_{k}(hb(k)-lb(k))}\cdot\varepsilon\cdot c\cdot\exp \left(1-\mathrm{fitness}\left(x_{j}\right)\right) \tag{36}\]  
\[\mathrm{x_{i}}(\mathrm{k})\in[\mathrm{lb}(\mathrm{k}),\mathrm{hb}(\mathrm{k}) ],\ \mathrm{k}=1,\ldots,\mathrm{D} \tag{28}\]0  
where \(\mathrm{fitness}\left(x_{j}\right)\) represents the quality of the attractor, \(c\) is the constant scale factor and \(\varepsilon\) is randomly generated from uniform distribution. In the proposed attractiveness formula, the quality of the attractor affects the randomness parameter defined by (37). In case of high luminous intensity individuals \(x_{j}\) less randomness value \(\varepsilon\) is added. If the firefly \(x_{j}\) is weak then the perturbation grows. As the search progresses, unfeasible individuals can be obtained. In order to deal with unfeasibility, we use the following border reflection mechanism.