# Computer Vision System: Measuring Displacement and Bending Angle of Ionic Polymer-Metal Composites
## 1 Introduction  
Electroactive polymers (EAPs) are currently the closest in emulating natural muscles, earning the moniker artificial muscle for some [1, 2, 3]. EAPs deform in response to an electric field [1]. Known for their high power-to-weight ratio, EAPs are relatively new and require extensive research to establish a grounded understanding of their basic principles and what parameters control their electro-activation behaviour [3, 4]. Ionic polymer-metal composites (IPMCs) are a subset of EAPs known for their sensing and actuating abilities [1]. The general structure of an IPMC consists of a polymer membrane sandwiched between metal electrodes. Nafion, a perfluorinated sulfonic-acid (PFSA) ionomer developed and trademarked by DuPont, is commonly used as the polymer membrane for IPMCs, with platinum as the electrodes [1]. One method of characterising IPMC behaviour is to measure its displacement under voltage loading. This study looks at proposing a computer vision system to measure this displacement along with its bending angle. Measuring the displacement of IPMCs entails looking at the tip-to-tip displacement of the composite under various voltage loadings, usually from 1 V to 10 V. Two methods of measuring displacement are generally found in literature: measurement using a camera or using a laser displacement sensor [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]. Some studies combine both methods, interchanging them depending on how large the displacement and bending angle is [17]. The setup using a laser displacement sensor is relatively simple, with the sensor outputting displaced values as the voltage is varied. A disadvantage to laser displacement sensors is that they can only measure linear tip displacement, which could not accurately map the curved bending response exhibited by IPMCs [5]. Furthermore, laser sensors are also affected by changes in beam refraction, making them unsuitable for uses in underwater or humid conditions as well as on highly-reflective objects [11; 12]. Also, depending on the resolution of the sensor used, accuracy may vary. Studies utilising this configuration only use it for small displacements where the curvature is negligible. For larger displacements, many opt for the other method of using a digital camera. The general setup utilising a digital camera is as shown in Figure 1. The setup consists of a camera placed some distance from the clamped sample, against a marked background. As voltage is applied, the IPMC bends from the negatively charged side to the positively charged side. This bending is recorded by the camera, and the displacement can be determined from the still frames captured, using the marked background as reference. Displacement values of the IPMC are calculated using basic trigonometry in this setup. Referring to the triangle with sides xyz in Figure 2, the tip-to-tip displacement can be calculated using [PERSON]'s theorem. Similarly, trigonometric laws such as the Cosine Law can be used to find the bending angle. Figure 1: Digital camera setup to measure IPMC displacement. Figure 2: Calculating IPMC bending displacement. Manually calculating the displacement and bending angle for a few IPMC samples is practical when dealing with a small sample size, for example 3 s bending footage of one IPMC sample shot at 50 frames per second will have 150 frames. However, this becomes repetitive, cumbersome and problematic when the sample is large, possibly ranging from hundreds to thousands of samples. Manually calculating such sizes is unrealistic and will lead to errors and extended work hours. Thus, a more pragmatic approach would be to automate this process through a computer vision system. Computer vision is related to the analysis, modification and high-level understanding of digital images or videos [18]. This idea is not new, with the earliest mention of a setup by [PERSON] et al. [13; 14] in which a system was developed to visualise and measure tip displacement of IPMCs using a charge-coupled device (CCD) camera.