# Particle and Particle Agglomerate Size Monitoring by Scanning Probe Microscope
## 5 Determination of the Parameters of the Mutual Orientation of Overlapping Images  
The existing methods of image stitching can require considerable (up to 50% [43]) overlapping of images which is necessary for the allocation of the sufficient number of common key points in the images \(Z_{0}\) and \(Z\). When particle sizes are determined with the use of several overlapping images, the result of the stitching process is not important. It is important that the parameters of the mutual orientation of overlapping images, displacement and rotation, are determined; this permits the determination of the overlap region and exclude the repeating results of the measurements relating to the region. The determination of the parameters is more exact when there is a sufficient number of common points. For the homography, the number of such points should not be less than 4 and at the use of the method of image matching by key points' pairs (IMBKPP) [44], it should be 3. Let us consider the realization of the IMBKPP method where the detected particle centres are taken as key points. In order to compute the displacement and rotation of the images, we used the key points' pairs of the images, which are made up of the key points from the total set of key points. Each key points pair (line segment) is described by the coordinates of the ends (\(x_{1}\), \(y_{1}\)) and (\(x_{2}\), \(y_{2}\)) and the length \(l\). For the computational shortcut, the displacement values \(\Delta_{x}\), \(\Delta_{y}\) and the rotation angle \(\varphi\) are computed only for the pairs of points with the same length. The order of the computations is provided in [44]. The \(\Delta_{x}\) and \(\Delta_{y}\) values form a two-dimensional array M(\(\Delta_{x}\), \(\Delta_{y}\)) where the number of certain displacement values (\(\Delta_{x}\), \(\Delta_{y}\)) is entered into the cell with the coordinate (\(\Delta_{x}\), \(\Delta_{y}\)). The set of the values of the rotation angles forms a histogram of iteration N(\(\varphi\)) for the range from \(-180^{\circ}\) to \(180^{\circ}\).The coordinates of the maxima in M(\(\Delta_{x}\), \(\Delta_{y}\)) and N(\(\varphi\)) determine the displacement and rotation of the images. During the size monitoring process, to minimize losses of time for scanning the same surface areas, it is practical to restrict the overlap region of the sequentially acquired images so that there would not be more than 3-5 particles. However, it can lead to a decrease in the overlapping coefficient by 10-15%. As the practice showed, the background elements (disturbances) cause the appearance of false key points and several local maxima in the array M(\(\Delta_{x}\), \(\Delta_{y}\)) which makes the computation of the mutual orientation parameters of two images difficult. In the simplest case, a key points pair is described with the use of the descriptor D1 which represents the coordinates of the ends (\(x_{1}\), \(y_{1}\)) and (\(x_{2}\), \(y_{2}\)) and the length \(l\) of the line segment connecting them: D1 = {(\(x_{1}\), \(y_{1}\)), (\(x_{2}\), \(y_{2}\)), \(l\)}. To improve the accuracy of the pairs'correspondence, the more informative pair descriptor is recommended: D2 = {(\(x_{1}\), \(y_{1}\)), (\(x_{2}\), \(y_{2}\)), \(R_{1}\), \(R_{2}\), \(l\)), where \(R_{1}\) and \(R_{2}\) are the radii of the particles, the centres of which coincide with key points. In this case, the correspondence search algorithm checks both the length equality of the pairs in the images and the validity of the condition:  
\[ \begin{array}{c}(\left|R_{1}-R_{i}+R_{2}-R_{j}\right|<2t)and(((\left|R_{1}-R_ {i}\right|<t)and\\ and(\left|R_{2}-R_{j}\right|<t))or\left((\left|R_{1}-R_{j}\right|<t)and(\left|R _{2}-R_{i}\right|<t)\right))\end{array}  \tag{4}\]  
where \(R_{1}\) and \(R_{2}\) are the radii of the curvature of the key points pair of the first image; \(R_{i}\) and \(R_{j}\) are the radii of the curvature of the key points pair of the second image; \(t\) is the tolerance value.