# Raw Material Flow Rate Measurement on Belt Conveyor System Using Visual Data
## 3 Methodology
### Coke and Limestone Segmentation
It takes the absolute difference of two successive frames. So the constant regions in both the frames are termed the background, and the other region is segmented as the image's foreground. This way of segmenting moving objects in the image works quite well in segmenting the moving environment. However, in our specific situation, there is an additional challenge. Alongside the raw material on the conveyor belt, there are occasionally dust particles present. The frame difference technique can be sensitive to the choice of threshold, and this sensitivity can lead to some regions of the belt being incorrectly identified as part of the foreground. This issue arises because the dust particles introduce subtle changes in pixel values, which may surpass the threshold and be mistakenly labeled as moving objects. Apart from the basic frame difference technique, advanced background subtraction methods also exist, which solve the task of foreground extraction by creating a background model. They start by generating a background after processing N frames to provide the background image, then model a technique to keep the background updated for handling the changes that occur over time [43]. Finally, it divides the pixels into sets of background or foreground. Models use different features such as color, texture, and edge descriptors to capture optimal foreground. These features are also called descriptors. The background model to be finalized is vital as some of the algorithms assume that the background area is static, meaning that the color of the same regions is fixed, and hence background can be identified. However, different illumination variations can distort the colors. Thus, the background model we used must be resilient enough to deal with environmental factors. Given the context, we used the BackgroundSubtractorCNT method [44] due to it being resilient to outdoor lighting conditions. It is also one of the fastest algorithms for background subtraction. The CNT in its name stands for the count, as it counts for how many frames a pixel does not change and divides it into background or foreground. The algorithm effectively distinguishes the raw material from the conveyor belt, achieving good separation. However, it's worth noting that some noise may still be present in the output. To address this, we have applied morphological operators to further refine the results. Morphological image processing encompasses a set of operations that pertain to the shape and structure of an image [45]. These operations help us improve the quality and accuracy of the segmentation results. To eliminate noise from the image, we employ the opening morphological operation [46]. This operation involves two key steps: erosion and dilation. Initially, the image  
Figure 9: Segmentation results of Watershed algorithm: (**a**) sample frame from dataset, (**b**) segmentation results. undergoes erosion, followed by dilation, using the same structuring element for both operations. The morphological opening helps remove small objects and thin lines from an image while preserving the shape and size of larger objects in the image. Next, dilation is applied. Morphological dilation makes objects more visible and fills in small holes in objects [47]. As a result, lines appear thicker, and filled shapes appear larger. Finally, to remove its gaps, the closing morphological operation is applied [48]. Morphological closing helps fill small holes in an image while preserving the shape and size of large holes and objects. The closing operation, starts by dilating the image and then proceeds to erode the dilated image, utilizing the same structuring element for both operations. All these transformations are visually depicted in Figure 10.  
Following background subtraction and the subsequent application of morphology operations, we successfully isolate the raw material from the conveyor belt.