# Computer Vision-Based Approach for Reading Analog Multimeter
## 2 Framework and System Setup
### Mapping Relationship of Instrument Meter  
Several scales can be found in the instrument meter sub-image (or \(\mathbf{R}_{IM}\)), as illustrated in Figure 1d. In order to correctly read the measured value, we focused on the value indicated by the pointer, \(\in\)\(\mathbf{R}_{IM}\), at the scale relative to the selected function in Table 1. The scales in \(\mathbf{R}_{IM}\) may be arranged in _linear_ (e.g., the scales of ACV, DCV, and DCmA) or _nonlinear_ (e.g., the scale of \(\Omega\)) form. In addition, they can be designated in sector form, as depicted in Figure 5, where the pointer (\(\theta_{p}\)) with a spin center rotates from _right end_ (\(\theta_{r}\)) to _left end_ (\(\theta_{l}\)). It was assumed that the A-meter had been adjusted in the horizontal direction. For the linear case, we found that the maximum value, say \(v_{\mathtt{max}}\), was set at the right end of the scale (see Figure 1d for reference). Therefore, the observing or measuring value (\(M(\theta_{p})\)) from the pointer (\(\theta_{p}\)) could be simply expressed as  
\[\textbf{Linear case:}\ M(\theta_{p})=\left(\frac{\theta_{l}-\theta_{p}}{ \theta_{l}-\theta_{r}}\right)\times v_{\mathtt{max}}. \tag{2}\]  
If \(\theta_{s}\) is detected and its \(F(\theta_{s})\) in Equation (1) belonged to a linear case, then we had the corresponding maximum value, \(A(\theta_{s})\), in Table 1. Therefore, the above Equation (2) was rewritten as  
\[\textbf{Linear case:}\ M(\theta_{p})_{F(\theta_{s})}=\left(\frac{\theta_{l}- \theta_{p}}{\theta_{l}-\theta_{r}}\right)\times A(\theta_{s}), \tag{3}\]  
where \(F(\theta_{s})\in\{0,1,\ldots,15\}\) in Table 1. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Index of Function, \(F(\theta_{s})\)** & **Auxiliary Value, \(A(\theta_{s})\)** & **Function Name** & \(\theta_{s}\in\) **Orientation Range** \\ \hline  
\hline \hline \end{tabular}
\end{table} 
Table 1: The mapping table for the selector arrow built with the relationship between \(\theta_{s}\) and \(F(\theta_{s})\), based on Equation (1). Here, \(N=20\) and \(\Delta=18^{\circ}\). The auxiliary value, \(A(\theta_{s})\), represents the maximum value used in _linear cases_ (i.e., \(F(\theta_{s})=0,1,\ldots,15\)) and the multiplier used in _nonlinear cases_ (i.e., \(F(\theta_{s})=16,17,18,19\)), respectively. Here “NA” denotes “not available.”For the nonlinear case, in this study, only the \(\Omega\)-scale was used, where the maximum value (\(\infty\)) was located at the left end of the scale, whereas the minimum value (\(0\)) was located at the right end. According to the known \(\Omega\)-scale \(\in\mathbf{R}_{IM}\), as given in Figure 1d, a nonlinear mapping table can be built as listed in Table 2 to solve this situation, where the ground-truth angle, \(\theta_{\text{gt}}(k),k=0,1,2,\ldots,K-1\) (\(K=58\) in this study) corresponding to the resistance value, \(R(k)\), on the \(\Omega\)-scale \(\in\mathbf{R}_{IM}\) can be obtained by means of a protractor. If the pointer was located within two consecutive ground-truth angles, e.g., \(\theta_{\text{gt}}(k)\leq\theta_{p}\leq\theta_{\text{gt}}(k+1)\), the \(\theta_{p}\) was estimated by interpolation as below  
\[\textbf{Nonlinear case:}\ M(\theta_{p})=R(i)+\left(\frac{\theta_{p}-\theta_{ \text{gt}}(i)}{\theta_{\text{gt}}(i+1)-\theta_{\text{gt}}(i)}\right)\times \left(R(i+1)-R(i)\right), \tag{4}\]  
where \(i=\{k|\theta_{\text{gt}}(k)\leq\theta_{p}\leq\theta_{\text{gt}}(k+1)\}\).