## 3 Materials and Methods
### Identifying PVI Location
#### 3.2.2 Detecting Markers in Challenging Conditions  
After comparison, the authors found that Aruco markers are better and give more accuracy than QR codes. So, the authors decided to use Aruco markers in the proposed system. The authors also found that both cannot be detected in challenging conditions such as long distances, blurring effects, distortion of marker, and occlusion. To solve this problem, the authors converted the identification part of the problem to a classification one and used CNN to identify the markers as shown in Figure 6. The authors formed the following hypothesis:  
**H3:**_CNN models can be used to detect Aruco markers in challenging conditions._  
To detect markers in the mentioned challenging conditions, the authors converted the identification component in the architecture shown in Figure 5 to a classification one and CNN is used to identify the markers. The architecture consists of two main units, the first unit marked in white is used to extract markers from captured frames, while the second one is marked in grey and used for classification. Following the image conversion to greyscale and detecting markers, a CNN model is used to identify them. This model returns the correct ID of detected markers or if it fails to do so, it determines that no marker is available. In a typical marker-based application, image frames are affected by various noisy conditions such as blurring and distortion of markers, etc. Such noises affect the accuracy of marker identification. The authors have created a dataset that covers most of the challenges above. A dataset is created corresponding to each class of challenging conditions and different orientations. This dataset contains 40 classes of 10 markers and one to indicate no markers [37]. As shown in Figure 7, the authors have created different effects by randomly applying various transformations to the original images. For each class, the authors generated 500 samples. So, a total of 14,000 images were created for the 28 classes. To identify that no markers were visible in the image captured by the camera, the authors assigned the null class with images taken from a dataset [35]. 75% of the input samples from each class were used for training and rest for validation. CNN automatically learns the most efficiently from raw data instead of using traditional machine learning techniques. A typical CNN has a convolutional layer, which is the basis. It also contains an activation function for transforming the summed weighted input from the node into the activation  
Figure 6: Main components of the application using CNN. Figure 7: A few samples of makers with illumination change and motion blur: (**a**) Original; (**b**) Illumination change; (**c**) Motion blur; (**d**) Horizontal motion blur; (**e**) Vertical motion blur. of the node or output for that input. Another so called pooling layer is used, which performs a downsampling operation along the spatial dimension. These layers together are used for effective feature extraction and are called feature extraction unit (FEU). For classification, CNN also contains the FC layer. As shown in Figure 8, the authors used three FEUs in the proposed model. In the first FEU, the authors used a convolutional layer with a dimension of \(20\times 5\times 5\) and a sigmoid activation function. Then, max-pooling with a pooling filter size of 2 and stride of 2 is used to down sample the outputs by a scale factor of 2. The second and the third FEU are of the same structure as the first one with a slight variation. The authors used a convolutional layer with a dimension of \(50\times 5\times 5\) in the second FEU, while a convolutional layer with a dimension of \(200\times 5\times 5\) was used in the third one. For classification, the output of the last feature extraction unit is converted into a vector through flattening and is provided as an input to the fully connected layer. The output of the fully connected layer is converted into probabilities corresponding to 29 classes of the classifier.