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).
Over the past 20+ years, I have been working as a software engineer, architect, and programmer, creating, designing, and programming various applications. My main focus has always been to achieve business goals and transform business ideas into digital reality. I have successfully solved numerous business problems and increased productivity for small businesses as well as enterprise corporations through the solutions that I created.
My strong technical background and ability to work effectively in team environments make me a valuable asset to any organization.
The article begins by highlighting the dynamic nature of image processing in the context of advancing information technology. It predicts a future shift from image to video processing due to the increasing prevalence of videos over text-based media. The Video Stream Matcher (VSM) is introduced as a tool for analyzing video data using statistical models like KS Test, Variation, Mean, and Norm.
Key frames extraction is identified as a technique to minimize the vast collection of frames in a video. Four features are extracted from each frame: histogram, edge, slope, and wavelets. The literature review section references research papers and books that inform the implementation of VSM, including studies on similarity analysis of video sequences and key frame extraction.
The key elements of VSM are outlined, including the input of source and test data (videos or images), key frames extraction, feature extraction, and application of statistical models for decision making. The problem statement highlights the need for automated video evaluation systems, particularly in scenarios like security checks on public transportation and video database management in TV stations.
The proposed solution revolves around VSM’s ability to process videos, focusing on key frames extraction, feature extraction, and statistical model application for decision making. The scope of the project encompasses mean frame extraction, feature extraction algorithms, and dual-phase statistical decision making. The organization of the report is structured to cover research findings, implementation details, software functioning, and conclusions with future work discussions.
This segment of VSM encompasses two distinct components:
1. Target Image – Source Video – Model
2. Target Video – Source Video – Model
Each component represents a different scenario for comparison: matching a target image with a source video and matching a target video with a source video. These models serve as the foundation for analyzing and comparing video streams, enabling various applications in multimedia processing and content-based similarity analysis.
Algorithm 3 extracts edge map features from BMP images. It begins by converting the image to grayscale if necessary and applies the Canny algorithm, returning the image edges. The process involves steps like Gaussian filtering to remove noise, Sobel operator application in horizontal and vertical directions, and angle calculation for each pixel. The resulting edges are thresholded and subjected to double thresholding for refinement. Finally, the processed image with edge maps is returned.
Algorithm 4 operates similarly but focuses on extracting edge angles instead of edge maps. It follows a comparable process, including Gaussian filtering, Sobel operator application, and angle calculation, but stores the occurrences of each angle in tiles of the image, returning an array defining the edge angles.