Important Note: This article is part of the series in which TechReport.us discusses the theory of Video Stream Matching.
In the realm of Video Stream Matching, four essential features are integral:
- Histogram
- Edge
- Slope
- Wavelet
Here, we will delve into the algorithms associated with each of these features one by one.
4.4.1 Histogram Feature Extraction
4.4.1.1 Algorithm 2
As outlined in Chapter 3.
Input:
- BMP Image
Output:
- Array of numerical values defining the Histogram
Working:
- The algorithm takes an image as input.
- If the image is not already in grayscale, it is converted into grayscale.
- The image is then divided into tiles, and the histogram of each tile is calculated.
- The calculated histograms are stored in columns and rows, forming a 2D array that represents the result.
Algorithm Steps:
- Step 0: Start
- Step 1: Take input of an image (im).
- Step 2: Check if (im) is in grayscale. If not, convert (im) into grayscale.
- Steps 3-8: Loop through tiles of the image, extract sub-images, calculate histograms (H), increment the number of bins (NumBins), and store the histograms in the resultant array (ResArray).
- Step 9: Return the resulting array (ResArray).
- Step 10: Stop