# Particle Swarm Optimisation in Practice: Multiple Applications in a Digital Microscope System
## 1 Introduction  
Computational intelligence has been a major field of research. This includes stochastic optimisation methods, such as those from the fields of evolutionary computing and swarm intelligence [1; 2]. The latter optimisation paradigms feature several heuristics that can be used over black-box problems, or any other challenging optimisation problem for which using an exact method would not be viable or time-efficient. For this reason, such heuristics approaches do not only represent an interesting fundamental research topic, but have also become very popular among practitioners benefiting from their wide-scope applicability in several domains of sciences, engineering and industry [3; 4; 5; 6]; however, in the vast majority of cases, the literature reporting on such application studies is written from an academic point of view, i.e., highlighting novelty and technical aspects, often overlooking the impact created by the proposed technology in industry in more practical terms. In this study, we instead focus on showing that the introduction of well-known heuristic optimisation in technological devices can improve some characteristics of the product, making it not only more efficient, but also more usable, thus improving upon customer satisfaction. For this reason, we selected an established and simple heuristic for optimisation, namely the particle swarm optimisation algorithm (see Section 2.2 for details), and used it to address feedback from customers on a digital microscope/inspection system for medical applications produced by Ash Ltd. Through customer feedback, four areas where improvements would help in increasing the quality and simultaneously reduce costs were identified. We aim to show that, if areas of improvements are well formulated in the fashion of the optimisation problem, even embedding only one simple general-purpose algorithm within the device (we present the details in Section 2.1) can make a major difference. Moreover, we present the production-ready solutions for these four problems, consisting of* An object height measurement task (Section 3);
* An image stitching for high-resolution images task (Section 4);
* An accurate colour reproduction task (Section 5);
* An image distortion correction task (Section 6).  
Note that using a single general-purpose optimiser for the four problems is preferable in this specific context. Advantages from this approach are multiple, including that only a single software implementation of an optimisation algorithm needs to be developed, that the software/firmware is easier to maintain, that porting the produced software to different platform is faster, but also that training engineers becomes simpler, faster and less costly. It must be also pointed out that the four addressed tasks are measurement problems. As the digital microscope is generally used in a wide variety of applications by the customers who decide to purchase it, these measurements processes might be very different; therefore, optimising algorithms to a particular dataset to gain marginal improvements is not the aim. In fact, this may cause deterioration of results on other datasets [7]. This further supports our approach, which is also consistent with the tenets of Industry 4.0, in providing bespoke solutions to practical problems, in an efficient and inexpensive manner, both resource wise and computationally.