# Raw Material Flow Rate Measurement on Belt Conveyor System Using Visual Data
## 3 Methodology
### Coke and Limestone Segmentation  
After pre-processing, the next step is to extract coke and limestone being carried on the conveyor belt in each frame. Given the outdoor setup, handling the environmental factors is challenging as each condition can affect the algorithm's performance. Deep learning is quite famous nowadays due to its high effectiveness in segmenting a challenging and diverse environment [35]. However, the only restriction with deep learning is the huge amount of labeled data [36]. A lot of data needs to be labeled with each relevant class separately before it can be passed as input to the deep learning algorithm. The algorithm can then automatically extracts the relevant features from the raw image it will use to segment the unseen data. We have the image sequences for our problem but do not have the label. Thus, we tried segmenting data using unsupervised deep learning segmentation techniques [37]. In unsupervised segmentation, the algorithm, namely convolutional neural network (CNN) assigns each pixel to the cluster to which it belongs. The pixel labels are clustered together using their feature representations. Unsupervised segmentation works well for examples where objects are easily distinguishable based on color, texture, or other features. Their accuracy can also be increased by giving user input as a scribble [38], which roughly specifies different objects in the image. These scribbles can be used as input to the algorithm. Nevertheless, the environment for our problem is quite challenging. It contains many variable factors in each of our data samples. Even with provided scribble, it struggles to properly distinguish between the conveyor belt and the raw material available on the belt. A resulting segmentation is attached in the Figure 8.  
Watershed algorithm [39] is also a widely used technique for segmentation and is especially useful in scenarios where we want to extract objects touching or overlapping. The watershed algorithm uses greyscale images for its segmentation. The greyscale image contains both high and low-intensity values. The watershed algorithm treats the images like a topographic map. The high-intensity values are termed peaks, while low intensities are denoted as valleys. If we fill out each valley with water, the water will rise, and different valleys will start to merge. This is when we build barriers to constitute the object's boundary, which prevents different valleys from merging. Spread-out objects are easy to identify as they have different intensity values, but heavily clustered objects make it harder to differentiate objects accurately based on intensities. The watershed algorithm produces a set of labels as an output, where each label corresponds to a unique object in the image. The results of the watershed algorithm on our data samples are shown in the Figure 9.  
Figure 8: Poor Segmentation with a deep learning algorithm: (**a**) original frame, (**b**) segmentation results using deep learning. Figure 7: Selected region for processing. The results look pretty good for the respective frame. However, the algorithm works on the threshold value set to extract the sure foreground region. Therefore, it does not work well for all the data samples as it has different intensity values, negatively impacting the overall segmentation results. Background Subtraction is another widely used technique for segmentation in which the constant area is termed its background, and the moving instance is identified as its foreground [40]. Background subtraction is used in various applications, such as monitoring, tracking, and recognition of objects, traffic analysis, people detection, tracking of animals, and others [41]. It helps obtain relatively rough and rapid identifications of the objects in the video stream for their further subtle handling. Background subtraction techniques work like our brain; if something does not change, then our brain treats it like a background. The commonly used algorithm for background subtraction is the frame difference [42] method.