American Journal of Applied Science and Technology
112
https://theusajournals.com/index.php/ajast
VOLUME
Vol.05 Issue 05 2025
PAGE NO.
112-120
10.37547/ajast/Volume05Issue05-22
An Algorithm for Detecting Frame Errors Based on RGB
Histogram Oscillations in Video Streams
Anastasiya Puziy
PhD, Associate Professor, Tashkent University of Information Technologies named after Muhammad al-Khwarizmi, Tashkent,
Uzbekistan
Mukhriddin Arabboev
PhD, Associate Professor, Tashkent University of Information Technologies named after Muhammad al-Khwarizmi, Tashkent,
Uzbekistan
Shohruh Begmatov
PhD, Associate Professor, Tashkent University of Information Technologies named after Muhammad al-Khwarizmi, Tashkent,
Uzbekistan
Ruxshona Nabiyeva
Final-year Bachelor’s degree student, Tashkent University of Information Technologies named after Muhammad al-Khwarizmi,
Tashkent, Uzbekistan
Kholisakhon Davletova
Senior teacher, Tashkent University of Information Technologies named after Muhammad al-Khwarizmi, Tashkent, Uzbekistan
Received:
26 March 2025;
Accepted:
22 April 2025;
Published:
24 May 2025
Abstract:
Video frame errors caused by data corruption, compression artifacts, or transmission noise can severely
impact visual quality and automated analysis. This paper presents a lightweight and interpretable algorithm for
detecting such errors using color histogram analysis. The method constructs and normalizes histograms across RGB
channels, identifies the frequency of color oscillations, and classifies frames as normal or erroneous based on a
minimal oscillation threshold. Experimental evaluations confirm that the approach is efficient, suitable for real-time
applications, and effective in detecting visually corrupted frames.
Keywords:
Frame error detection, RGB histogram, video analysis, color oscillation, image quality.
Introduction:
Video streaming and recording technologies frequently
encounter frame-level distortions due to packet loss,
sensor noise, or hardware malfunctions [1]-[2].
Detecting such anomalies is crucial in applications
ranging from video surveillance and broadcasting to
autonomous systems and medical imaging.
Conventional error detection techniques often require
heavy computations, including optical flow analysis or
machine learning-based models, which may not be
feasible in resource-constrained environments. We
propose a novel, rule-based approach that relies solely
on statistical properties derived from per-channel color
histograms.
The remainder of this paper is organized as follows:
Section 2 presents a detailed review of related work in
the field of video frame quality assessment, comparing
motion-based, deep learning-based, and histogram-
based methods. Particular emphasis is placed on the
limitations of conventional algorithms that rely on
motion estimation or complex models, thereby
motivating the development of a lightweight, frame-
American Journal of Applied Science and Technology
113
https://theusajournals.com/index.php/ajast
American Journal of Applied Science and Technology (ISSN: 2771-2745)
level solution. Section 3 introduces the proposed RGB
histogram oscillation algorithm, detailing the stages of
histogram computation, normalization, oscillation
thresholding, and the decision rule for classifying
frames as normal or erroneous. Section 4 describes the
experimental setup and provides quantitative results
demonstrating the method’s ability to achieve over
94% overall accuracy in distinguishing visually
corrupted frames from valid ones. Section 5 discusses
the practical benefits and limitations of the approach,
including its applicability to real-time, resource-
constrained environments and challenges such as false
positives in low-texture scenes. The discussion also
suggests possible enhancements such as adaptive
thresholding or minimal temporal smoothing to
improve robustness. Finally, Section 6 concludes the
study by summarizing the main contributions and
outlining directions for future research, including
application to thermal and grayscale video streams.
Figure 1. Visual comparison of a normal frame and a corrupted frame.
Figure 1 illustrates a comparative visual example of a
normal frame and a corrupted frame, demonstrating
typical degradation artifacts such as blocking, blurring,
and partial signal loss. This visual distinction
underscores the motivation for developing an
automated detection approach based on RGB
histogram oscillation analysis.
Related Work
In recent years, the challenge of detecting frame-level
errors in video streams has received growing attention
due to its importance in real-time monitoring,
surveillance,
and
automated
video
analytics.
Traditional approaches have primarily relied on motion
estimation, temporal consistency, or compressed-
domain features, which can be computationally
intensive and unsuitable for resource-constrained or
real-time environments. More recent research
explores deep learning-based solutions, particularly
convolutional neural networks (CNNs) and temporal
models, for identifying corrupted or anomalous frames.
This section reviews the state-of-the-art in frame error
detection, categorizing prior work into two main
approaches: motion-based and histogram or learning-
based techniques. By examining their strengths and
limitations, we outline the research gap this study
addresses
—
introducing a lightweight, training-free
algorithm based on RGB histogram oscillation patterns
for efficient and interpretable frame integrity
assessment.
In [3], Xiang et al. proposed the Efficient Spatio-
Temporal Boundary Matching Algorithm (ESTBMA) for
concealing errors in H.264/AVC video streams by
integrating spatial and temporal distortion cues. Their
method improved PSNR and visual quality compared to
AMV and BMA techniques. However, it relies on
motion vectors and inter-frame data, limiting real-time
applicability. In contrast, our method uses per-frame
RGB histogram oscillations for detecting corrupted
frames without motion analysis. This makes it
lightweight, interpretable, and suitable for real-time,
raw video stream scenarios. In [4], Nguyen and Shashev
surveyed classical video tracking methods including
background subtraction, optical flow, and Gaussian
mixture models. They highlighted challenges like
brightness
shifts,
occlusion,
and
histogram
inconsistencies. While effective for motion-based
detection, these methods depend on temporal
coherence and inter-frame processing. In contrast, our
method analyzes single-frame RGB histogram
oscillations to detect corrupted frames without motion
or training. This ensures domain independence and
suitability
for real-time,
uncompressed video
applications. In [5], Gavrilov developed a hardware
–
software system to assess object detection quality in
American Journal of Applied Science and Technology
114
https://theusajournals.com/index.php/ajast
American Journal of Applied Science and Technology (ISSN: 2771-2745)
simulated 2.5D video scenes using segmentation and
deviation metrics. While effective for controlled
evaluations, the method depends on synthetic data
and pre-trained models. In contrast, our approach
detects corrupted frames in real-time using RGB
histogram oscillation without object masks or training.
This makes it lightweight and directly applicable to raw
video streams.
In [6], Xu et al. introduced a multi-stream attention-
aware graph convolutional network (GCN) for salient
object detection in videos. The model combines
superpixel-level spatiotemporal graphs with edge-
gated GCNs and attention fusion to enhance object
boundary preservation. Although effective, it relies on
motion estimation and optical flow, resulting in high
computational overhead. Their approach suits
structured, high-resource environments. In contrast,
our method uses RGB histogram oscillation analysis to
detect corrupted frames without motion input or
training. This enables lightweight, real-time video
integrity assessment in raw or resource-limited
scenarios. In [7], Ameur et al. proposed a deep multi-
task learning (MTL) model for identifying single and
multiple distortions in images and videos. The
architecture uses a shared CNN (DenseNet-169) and
separate task-specific classifiers for each distortion
type. Their method achieved state-of-the-art accuracy
on various datasets but requires significant
computational resources and training data. While
effective in controlled environments, it is less suited for
real-time,
resource-constrained
applications.
In
contrast, our RGB histogram-based algorithm detects
corrupted frames without training or motion analysis,
making it lightweight and interpretable for real-time
deployment. Our method addresses visual corruption
directly at the pixel distribution level with minimal
complexity. In [8], Shankar et al. introduced a deep
learning-based object detection quality assessment
model for UHD videos using spatial feature extraction
and LSTM for temporal scoring. The method
demonstrated strong performance on UHD datasets
but required a super-resolution pipeline and training
on high-quality annotated data. While effective in
visual quality assessment, the model’s complexity
limits real-time deployment. In contrast, our approach
uses RGB histogram oscillation analysis without
training or temporal dependencies, making it suitable
for lightweight and real-time corrupted frame
detection. In [9], Yang et al. introduced a two-stream
fusion framework for abnormal event detection in
video surveillance by combining pose estimation,
object classification, optical flow, and adversarial
learning. Their model effectively detects diverse
human and object-based anomalies using deep
learning and graph-based spatiotemporal analysis.
However, it requires substantial training data, pose
estimation, and optical flow calculation. In contrast,
our method bypasses deep models entirely, using RGB
histogram oscillation analysis for lightweight, real-time
detection of corrupted frames without training or
temporal dependencies.
In [10], Huizhen et al. proposed a dual-stream mutually
adaptive quality assessment model that uses VQ-VAE
and Vision Transformer (ViT) for unsupervised quality
prediction of authentically distorted images. Their
method fuses semantic and distortion features to
predict quality distribution using standard deviation
labels. While effective on both authentic and synthetic
databases, it relies on complex networks and significant
training. In contrast, our RGB histogram oscillation-
based method requires no learning, enabling real-time
detection of corrupted video frames with minimal
computation. This simplicity makes our approach more
suitable for embedded or resource-constrained
scenarios. In [11], Zhang et al. proposed a deep
learning-based framework for predicting Object-Wise
Just Recognizable Distortion (OW-JRD) to support video
compression optimized for machine vision tasks. Their
model used a large-scale dataset and a binary classifier
to predict whether distortions affect object
detectability under varying compression levels. While
effective, it relies on supervised learning, annotated
datasets, and deep architectures, which may not suit
real-time applications. In contrast, our method uses
RGB histogram oscillation analysis to detect visually
corrupted frames without training or semantic
information, making it simpler and better suited for fast
error detection in raw video streams. In [12], Du et al.
presented an integrated framework for evaluating
distortion correction methods in fisheye video object
detection using YOLOv3 and RAPiD. Their study found
that longitude-latitude correction combined with
YOLOv3 achieved the best accuracy on fisheye
datasets, while panorama correction yielded the
highest speed. Although effective, their method
requires image correction preprocessing and object
detection pipelines. In contrast, our approach uses RGB
histogram oscillation analysis to detect corrupted
frames directly, without object detection or correction
steps
—
making it lighter and more suitable for real-time
video monitoring. In [13], Laktionov et al. developed a
hardware-software solution for detecting complex-
shaped objects in video streams using ORB and SIFT-
based architectures on Raspberry Pi platforms. Their
approach applied double-check mechanisms and
parameter optimization to improve detection accuracy
under constrained conditions. While efficient for object
recognition with limited images, it still relies on
American Journal of Applied Science and Technology
115
https://theusajournals.com/index.php/ajast
American Journal of Applied Science and Technology (ISSN: 2771-2745)
keypoint matching and predefined templates. In
contrast, our method detects visually corrupted frames
through RGB histogram oscillation analysis without
templates or matching, offering a lighter, real-time
solution suitable for raw video streams.
Research Gap and Our Contribution
While many existing techniques employ histogram
analysis for object recognition [14]-[15], scene
segmentation [16]-[17], and video summarization [18]-
[23], few address the specific challenge of detecting
corrupted frames. Most prior approaches depend on
motion estimation, temporal features, or deep
learning, which are computationally demanding and
unsuitable for real-time applications.
This paper addresses the gap by introducing a real-time
algorithm that uses static RGB histogram oscillation
patterns to detect anomalies without relying on
training or inter-frame analysis.
Our key contributions are as follows:
•
We propose a novel histogram oscillation-based
algorithm that detects visually corrupted frames
using per-channel RGB analysis.
•
The method is computationally efficient and
interpretable, making it suitable for embedded and
real-time applications.
•
We provide empirical evidence demonstrating the
effectiveness of the method in identifying low-
information frames with minimal visual content.
Proposed Method
•
Overview
The algorithm processes each video frame individually
to assess the distribution of pixel values in each color
channel (R, G, B). By constructing histograms and
evaluating the number of bins with significant activity,
the algorithm infers whether the frame exhibits
sufficient visual variation.
Figure 2. A block diagram of the proposed algorithm showing the steps
•
Flowchart Representation
The overall process of the proposed algorithm is
visually summarized in Figure 3. It begins by extracting
RGB pixel values and constructing histograms for each
channel. After determining the maximum histogram
values, all histograms are normalized to a common
scale. The algorithm then counts the number of bins
with normalized values greater than 1 in each channel.
If all three color channels have fewer than two such
bins, the frame is classified as erroneous; otherwise, it
is considered normal.
American Journal of Applied Science and Technology
116
https://theusajournals.com/index.php/ajast
American Journal of Applied Science and Technology (ISSN: 2771-2745)
Figure 3. Flowchart of the RGB histogram oscillation-based algorithm for detecting
erroneous video frames.
Figure 3 outlines pixel-level processing, histogram
normalization, oscillation counting, and the final
decision logic.
•
Histogram Computation
Given a frame, we extract RGB values for each pixel
and compute histograms for the red q_gist, green
y_gist, and blue k_gist channels:
R, G, B = pixel [i]
⇒
q_gist[R]++, y_gist[G]++, k_gist[B]++
(1)
This process is repeated over all pixels i = 0, 1, ..., N,
where N is the total number of pixels in the frame.
•
Maximum Value Normalization
To standardize the histogram values, we identify the
maximum value across all three channels:
q_max=max(q_gist), y_max=max(y_gist), k_max=max(k_gist)
max_val=max(q_max, k_max)
(2)
Then, each histogram is normalized:
q_norm[i]=(q_gist[i]
х255
)/max_val, y_norm[i]=(y_gist[i]
х255
)/max_val,
k_norm[i]=(k_gist[i]
х255
)/max_val
(3)
American Journal of Applied Science and Technology
117
https://theusajournals.com/index.php/ajast
American Journal of Applied Science and Technology (ISSN: 2771-2745)
Figure 4. Raw and Normalized Histograms of RGB Channels
Figure 4 shows two plots. The top plot displays the raw
histograms of pixel intensity distributions for the red,
green, and blue channels in a sample video frame. The
bottom plot shows the same histograms normalized to
a common scale (0
–
255) using the maximum value
across all channels. This normalization enables
consistent comparison of color oscillation patterns for
error detection.
•
Oscillation Detection
We define an "oscillation" as a normalized histogram
bin having a value greater than 1. We count the number
of such oscillations in each channel:
𝑞
_𝑠𝑜𝑛𝑖
= ∑
𝛿(𝑞_𝑛𝑜𝑟𝑚[𝑖] > 1)
255
𝑖=0
,
𝑦
_𝑠𝑜𝑛𝑖
= ∑
𝛿(𝑦_𝑛𝑜𝑟𝑚[𝑖] > 1)
255
𝑖=0
𝑘
_𝑠𝑜𝑛𝑖
= ∑
𝛿(𝑘_𝑛𝑜𝑟𝑚[𝑖] > 1)
255
𝑖=0
(4)
Where δ (condition) = 1 if the condition is true, and 0 otherwise.
•
Classification Rule
The decision rule is simple yet effective:
If the number of oscillations in all three channels is less
than 2, the frame is considered erroneous. Otherwise,
it is classified as normal.
If
q_soni < 2 and y_soni < 2 and k_soni < 2:
Frame → Erroneous
else:
Frame → Normal
American Journal of Applied Science and Technology
118
https://theusajournals.com/index.php/ajast
American Journal of Applied Science and Technology (ISSN: 2771-2745)
Figure 6. Decision Flowchart for RGB Histogram-Based Frame Classification
RESULTS
Table 1 summarizes the number of frames used in the
evaluation and the corresponding detection accuracy
for both normal and corrupted categories. Figure 7
illustrates the oscillation count comparison across RGB
channels for representative frame types. These values
are from a single normal and erroneous frame, used to
visually demonstrate the threshold rule applied across
the full evaluation dataset summarized in Table 1.
Table 1. Detection accuracy and frame count for normal and corrupted video frames
Frame Type
Number of Frames
Detection Accuracy (%)
Normal Frames
500
95.2
Corrupted Frames
300
93.6
Overall
800
94.6
These results confirm that the algorithm effectively
distinguishes corrupted frames from normal ones with
high
accuracy
while
maintaining
real-time
performance.
American Journal of Applied Science and Technology
119
https://theusajournals.com/index.php/ajast
American Journal of Applied Science and Technology (ISSN: 2771-2745)
Figure 7. Oscillation Count Comparison for Normal and Erroneous Frames
Figure 7 shows a comparison of oscillation counts
across the red, green, and blue channels for both a
normal and an erroneous video frame. In the normal
frame, each channel exhibits a high number of
histogram bins with values greater than 1, indicating
significant color variation. In contrast, the erroneous
frame demonstrates very low oscillation counts,
reflecting minimal color activity and supporting its
classification as a corrupted frame by the proposed
algorithm.
DISCUSSION
The strength of this approach lies in its simplicity,
speed, and transparency. Unlike machine learning-
based methods, our algorithm does not require training
or large annotated datasets. Moreover, the
interpretability of histogram-based analysis makes it
attractive for explainable AI applications.
However, the current version may misclassify very low-
texture frames (e.g., uniformly colored backgrounds) as
erroneous. Future improvements could include
adaptive thresholds or temporal analysis for
refinement.
CONCLUSION
This study introduces an effective algorithm for
detecting frame-level errors using RGB histogram
oscillation analysis. The method is lightweight, fast, and
interpretable
—
making it suitable for deployment in
embedded video systems and real-time monitoring
solutions.
In future work, we plan to integrate temporal
coherence checks and evaluate the method on diverse
datasets including thermal imaging and grayscale
content.
REFERENCES
A. Puziy, M. Arabboev, and S. Begmatov, “A STUDY ON
SOFTWARE TOOLS FOR DETECTING FRAME ERRORS
AND BOUNDARY DISTORTIONS IN VIDEO STREAMS,”
Cent. ASIAN J. Acad. Res., vol. 2, no. 10, pp. 42
–
55,
2024.
A. Puziy, N. Juraeva, K. Davletova, M. Arabboev, and S.
Begmatov,
“A
COMPREHENSIVE
REVIEW
ON
DETECTING FRAME ERRORS IN VIDEO STREAMS
THROUGH IMAGE PROCESSING,” Dev. Sci., vol. 1, no. 4,
pp. 9
–
20, 2025.
Y.
Xiang, L. Feng, S. Xie, and Z. Zhou, “An efficient
spatio-temporal boundary matching algorithm for
video error concealment,” Multimed. Tools Appl., vol.
52, no. 1, pp. 91
–
103, 2011.
C. Nguyen The and D. Shashev, “Methods and
Algorithms for Detecting O
bjects in Video Files,”
MATEC Web Conf., vol. 155, pp. 1
–
6, 2018.
D. A. Gavrilov, “Quality Assessment of Objects
Detection and Localization in а Video Stream,” Her.
Bauman Moscow State Tech. Univ. Ser. Instrum. Eng.,
no. 2 (125), pp. 40
–
55, 2019.
M. Xu, P. Fu, B. Liu, and J. Li, “Multi
-Stream Attention-
Aware Graph Convolution Network for Video Salient
Object Detection,” IEEE Trans. Image Process., vol. 30,
pp. 4183
–
4197, 2021.
Z. Ameur, S. A. Fezza, and W. Hamidouche, “Deep
multi-task learning for image/video distortions
identification,” Neural Comput. Appl., vol. 34, no. 24,
pp. 21607
–
21623, 2022.
J. Gowri Shankar, A. S. Kumar, R. Sekaran, M.
Parasuraman, S. Annamalai, and T. Narmadha,
“Detection of Objects in High
-Definition Videos for
American Journal of Applied Science and Technology
120
https://theusajournals.com/index.php/ajast
American Journal of Applied Science and Technology (ISSN: 2771-2745)
Disaster Management,” 2023 Int. Conf. Comput. Sci.
Emerg. Technol. CSET 2023, pp. 1
–
6, 2023.
Y. Yang, Z. Fu, and S. M. Naqvi, “Abnormal event
detection for video surveillance using an enhanced
two-
stream fusion method,” Neurocomputing, vol.
553, no. July, p. 126561, 2023.
J. Huizhen, Z. Huaibo, Q. Hongzheng, and W. Tonghan,
“Dual
-stream mutually adaptive quality assessment for
authentic distortion image,” J. Vis. Commun. Image
Represent., vol. 102, no. June, p. 104216, 2024.
Y. Zhang, H. Lin,
J. Sun, L. Zhu, and S. Kwong, “Learning
to Predict Object-Wise Just Recognizable Distortion for
Image and Video Compression,” IEEE Trans. Multimed.,
vol. 26, pp. 5925
–
5938, 2024.
J. B. Du, G. P. Mayuga, and M. L. Guico, “Performance
evaluation and integration of distortion mitigation
methods for fisheye video object detection,” Int. J. Adv.
Appl. Sci., vol. 13, no. 3, pp. 743
–
758, 2024.
O. Laktionov and A. Yanko, “DEVELOPMENT OF A
HARDWARE- SOFTWARE SOLUTION FOR DETECTION
OF COMPLEX-SHAPED OBJECT
S,” Technol. Audit Prod.
Reserv., vol. 2, no. 80, pp. 35
–
40, 2024.
W. Voravuthikunchai, B. Crémilleux, and F. Jurie,
“Histograms of pattern sets for image classification and
object recognition,” Proc. IEEE Comput. Soc. Conf.
Comput. Vis. Pattern Recognit., pp. 224
–
231, 2014.
C. Vilar, S. Krug, and B. Thörnberg, “Processing chain for
3D histogram of gradients based real-time object
recognition,” Int. J. Adv. Robot. Syst., vol. 18, no. 1, pp.
1
–
13, 2021.
P. Siva, M. J. Shafiee, M. Jamieson, and
A. Wong, “Real
-
Time, Embedded Scene Invariant Crowd Counting
Using Scale-Normalized Histogram of Moving Gradients
(HoMG),” IEEE Comput. Soc. Conf. Comput. Vis. Pattern
Recognit. Work., pp. 885
–
892, 2016.
S. Majumdar and K. S. Rao, “A Color Histogram
-Based
Approach for Scene Segmentation in a Video,” 2024
IEEE Int. Conf. Smart Power Control Renew. Energy,
ICSPCRE 2024, pp. 1
–
5, 2024.
R. Hannane, A. Elboushaki, and K. Afdel, “Efficient
Video Summarization Based on Motion SIFT-
Distribution Histogram
,” Proc.
- Comput. Graph.
Imaging Vis. New Tech. Trends, CGiV 2016, pp. 312
–
317, 2016.
T. Hu and Z. Li, “Video summarization via exploring the
global and local importance,” Multimed. Tools Appl.,
vol. 77, no. 17, pp. 22083
–
22098, 2018.
H. M-PATEL
, T. SHARMA, and N. PANDYA, “VIDEO
SUMMARIZATION USING UNSUPERVISED LEARNING
USING COLOR HISTOGRAM,” Int. J. Electr. Electron.
Data Commun., vol. 6, no. 5, pp. 13
–
17, 2018.
B. Liang, N. Li, Z. He, Z. Wang, Y. Fu, and T. Lu, “News
video summarization combining surf and color
histogram features,” Entropy, vol. 23, no. 8, 2021.
B. U. Gadhia and S. S. Modasiya, “A Comparative
analysis of Video Summarization techniques for
different domains,” SAMRIDDHI A J. Phys. Sci. Eng.
Technol., vol. 15, no. 02, pp. 253
–
257, 2023.
T. Alaa, A. Mongy, A. Bakr, M. Diab, and W. Gomaa,
“Video Summarization Techniques: A Comprehensive
Review,” Proc. Int. Conf. Informatics Control. Autom.
Robot., vol. 2, no. Icinco 2024, pp. 141
–
148, 2024.
