Efficient Color Based
Efficient Color Based
net/publication/322243793
CITATIONS READS
3 1,813
1 author:
Rachna Verma
JNV University Jodhpur INDIA
23 PUBLICATIONS 49 CITATIONS
SEE PROFILE
All content following this page was uploaded by Rachna Verma on 09 February 2024.
1
Department of Computer Science and Engineering, Faculty of Engineering, JNV University, Jodhpur,
Rajasthan, India
ABSTRACT:
In this paper, a new efficient color based object detection and tracking of a moving object in a
video is discussed, which is based on a new formula, proposed by the author, to convert an RGB
image into an intensity image. The proposed formula has a great discriminating ability to
highlight a shade of a particular primary color in an image and suppress all other colors. This
discriminating ability is used to detect an object of any primary color shade very efficiently as
it eliminates many additional processing steps, such as segmentation, histogram matching, etc,
used in previously reported color based trackers. In future, the proposed concepts will be
extended to track objects of any color.
[1] INTRODUCTION
Detecting and tracking moving objects in videos and reconstructing trajectories are an active
research area of computer vision [1]. The ability to detect and track objects in videos helps a
machine to simulate the basic abilities of biological systems, such as the abilities to understand
scenes, detect objects (static or moving), understand surrounding, recognize events, analyze
crowd, count people, detect people and vehicles detection, etc. Object detection refers to finding
an object of some interest in a scene, for example detecting people, vehicles, etc. in a scene.
Object tracking refers to estimate the trajectory of a moving object in a scene, for example,
tracking the trajectory of a moving car to find lane violation. For object detection and tracking,
a number of techniques, such as feature based, optical flow, background subtraction, particle
filter, Kalman filter, etc., have been reported in literature. Out of these methods, feature based
methods are widely used. In this method, features, such as texture, gradient, color, etc., are used
to detect and track objects. Of various object features, color provides very useful information for
object recognition [2].
This paper proposes an efficient color based object detection and tracking system for objects with
primary color shades. The proposed method utilizes a newly proposed scheme for converting an
RGB image into an intensity image that automatically highlights the desired primary color and
suppresses other colors. This eliminates a number of steps, such as foreground segmentation,
background modeling, histogram matching, etc., previously used in most of color based trackers,
making detection and tracking more efficient. The new proposed color conversion scheme is the
major contribution of this paper.
The remaining part of the paper is organized as follows: section 2 reviews the related work.
It introduces the basic concepts of a color-based object detection and tracking system and reviews
the state of the art. Section 3 describes the proposed system. Section 4 presents some experimental
results and finally, section 5 concludes the paper and sets directions for the future research.
For detecting objects, color histograms are often used to model objects due to low computational
cost, robustness against non-rigidity, scale and rotation. For locating objects, the Mean-shift
algorithm [3], a nonparametric density gradient estimator, is used that finds the image window
that is most similar to the object’s color histogram in the current frame. The mean-shift tracker
maximizes the appearance similarity iteratively by comparing the histogram of the object and the
histogram of the window around the candidate object location. For computing similarity between
two histograms, Bhattacharya distance is used. Though this method is simple to implement, it
cannot handle scale variations and clutter.
Using the Bhattacharya color histogram distance for HSV color space, a probabilistic
framework is used in [4] for tracking objects. A Monte Carlo estimation method, called particle
filter, is used to better handle color clutter in the background. Li and Zheng [5] used RGB color
histogram and particle filter by adding two auxiliary variables in the particle state space. These
variables control the updating speed of the color observation mode. Another method based on
histogram based particle filtering is proposed by Fotouhi et al. [6]. To handle the object
appearance changes, focusing on pose and illumination changes, Fotouhi et al [6] proposed a
novel adaptation target histogram according to FIFO queue concept, to save the histogram of
object at each frame. The model histogram is computed recursively, based on weighted averaging
of histograms for each bin. The method is robust against partial occlusion, rotation, scaling and
object deformation.
Zhao [7] presented the use of matrix filters, by keeping the important information, for
building the target’s histogram model for robust object tracking. The author also presented an
approach for combining histogram with different feature spaces into an enhanced histogram. A
hybrid histogram matching, using combination of Bhattacharyya and Chi-squared similarity
measures is presented in [8]. They concluded that in general, Bhattacharyya metric performs
better than Chi squared, but the combined approach gives better results in case of multimodal
histograms.
In this paper, a new color-based method to track a moving object in videos has been
presented. The proposed method is based on a new intensity calculation stategy for converting
an RGB image into an intensity image that facilitates automatic detection of primary color objects
more efficiently.
𝑅∗𝑅
𝐼= (1)
𝐺∗𝐵
where R, G, and B are the red, green and blue values of the pixel and I is the calculated
intensity of the pixel.
Similarly, to highlight green and blue color shades, equations 2 and equation 3 are used,
respectively, with identical meanings of the symbols used.
𝐺∗𝐺
𝐼= (2)
𝑅∗𝐵
𝐵∗𝐵
𝐼= (3)
𝐺∗𝑅
The rationale behind the proposed formula is the observation that for a pixel to appear
red, in the RGB color representation scheme, the ratios of the red value with respect to the green
and blue values of the pixel are more important than the absolute red value of the pixel. For
example, a pixel with the RGB values (100, 5, 10) looks redder as compared to a pixel with the
RGB values (225,200,100), despite the higher red value of the later pixel. The proposed formula
is very effective in locating objects of various shades of primary colors, i.e. red, green and blue.
[FIGURE 2] shows the use of the proposed formula on three randomly selected frames of test
videos. From [FIGURE 2], it can be seen that intensity images generated by the rgb2gray matlab
function have no discriminating strength to segregate objects of a selected color. On the other
hand, intensity images generated by the proposed method are capable of segregating objects of a
selected primary color shade, without any additional processing. The segregation capability is the
major strength of the proposed method. However, in the present form, the formula is not effective
for combined shades.
Figure 2: Uses of the proposed intensity image generation formula for red objects
[FIGURE 3] shows the block diagram of the proposed method to detect and track an object in a
video. After reading a frame from a video stream, the frame is converted into an intensity image
by using the proposed intensity index formula for the desired primary color. The intensity image
is further processes to remove background objects by a thresholding process in which the pixels
of the intensity image with intensity values less than a predefined threshold value are set to zero.
The thresolded intensity image is further processed by a median filter to remove noises. Finally,
the centroid of the detected object is calculated as the mean of the positions of the remaining
bright pixels. The above process is repeated for the next frame of the video.
[6] CONCLUSIONS
Moving object detection and tracking in videos is an actively researched area for the last three
decades and has many practical applications, such as generating the trajectory of a moving object,
surveillance, collision detection, game playing robots, human machine interaction, etc. This paper
presents a new efficient color based object detection and tracking for an object of any shade of a
primary color. the proposed method is based on a newly developed formula for converting an
RGB image into an intensity image. During this conversion, image regions of the selected
primary color are highlighted but other colors of the image are suppressed. This discriminating
ability of the proposed formula gives computational efficiency to the proposed
Original RGB frame with the detected object The corresponding intensity frame
centroid
Figure 4: Some sample frames of a test video with the corresponding intensity image
Figure 5: The tracked path, shown in blue color, of the red moving object in the test video shown in figure 4
REFERENCES
[1] Jonas Sköld, Estimating 3D-trajectories from Monocular Video Sequences, Degree Project in
Computer Science and Communication, School of Computer Science and Communication, KTH
Royal Institute of Technology, Stockholm, Sweden, 2015.
[2] Theo Gevers, Arnold W.M. Smeulders, Color based object recognition, Pattern Recognition, Vol.
32, pp 453-464, 1999.
[3] D. Comaniciu, V. Ramesh, P. Meer, “Kernel-Based Object Tracking”, IEEE Transactions On
Pattern Analysis And Machine Intelligence, Vol. 25, NO. 5, 2003.
[4] P.Perez, C.Hue, J, Vermaak, M. Gangnet, “Color –Based Probabilistic Tracking” European
Conference on Computer Vision , 2002.
[5] X. Li, N. Zheng, “Adaptive Target Color Model Updating for Visual Tracking Using Particle
Filter”, IEEE International Conference on Systems, Man and Cybernetics, pp 3105-3109, 2004.
[6] M. Fotouhi, A. R. Gholami, S. Kasaei, “Particle Filter Based Object Tracking using Adaptive
Histogram” Iranian Conference on Machine Vision and Image Processing, 2011.
[7] A. Zhao, “Robust Histogram based Object Tracking in Image Sequences”, Digital Image
Computing Techniques and Applications, 2007.
[8] N. Naik, S. Patil, M. Joshi, “A Scale Adaptive Tracker using Hybrid Color Histogram Matching
Scheme”, ICETET, IEEE Computer Society, pp 279-284, 2009.