Object Tracking and Detection in Videos using Block Matching with Intuitionistic Fuzzy Logic (BMIFL) Algorithm

In this study, an innovative attempt has been made using Attanassov’s Intuitionistic fuzzy set theory for tracking moving objects in video. The main focus of this proposed work is taking an account for handling uncertainty in assignment of membership degree known as hesitation degree using Intuitionistic fuzzy. Many algorithms have been developed to reduce the computational complexity of motion vector estimation. Block matching algorithm for motion estimation is accepted in all the video coding standards proposed till date. In Block Matching Algorithm Full Search Algorithm produces the best result for motion vector estimation. But Full Search algorithm is a time consuming and computationally expensive process. The Challenge is to reduce the computational complexity of Full Search algorithm without losing too much quality at the output. In this study we propose to implement Intuitionistic logic based block Matching Algorithm to overcome the computational complexity. This algorithm performs better than fuzzy logic based Three Step Search algorithm.


INTRODUCTION
Video tracking is the process of locating a moving object (or multiple objects) over time using a camera.It has a variety of uses, some of which are: human-computer interaction, security and surveillance, video communication and compression, augmented reality, traffic control, medical imaging (Bregler, 1997) and video editing (McCane et al., 2002;Li and Leung, 2001).Video tracking can be a time consuming process due to the amount of data that is contained in video.Adding further to the complexity is the possible need to use object recognition techniques for tracking (Neelima and Rao, 2011).
The objective of video tracking is to associate target objects in consecutive video frames.The association can be especially difficult when the objects are moving fast relative to the frame rate.Another situation that increases the complexity of the problem is when the tracked object changes orientation over time.

LITERATURE REVIEW
Many applications have been developed for monitoring public areas such as offices, shopping malls or traffic highways.In order to control normal activities in these areas, tracking of pedestrians and vehicles play the key role in video surveillance systems.
We classify these tracking techniques into four categories: Tracking based on a moving object region: This method identifies and tracks a blob token or a bounding box, which are calculated for connected components of moving objects in 2D space.The method relies on properties of these blobs such as size, color, shape, velocity, or centroid.A benefit of this method is that it time efficient, and it works well for small numbers of moving objects.Its shortcoming is that problems of occlusion cannot be solved properly in "dense" situations.Grouped regions will form a combined blob and cause tracking errors.For example, (Peter et al., 2010) presents a method for blob tracking.Kalman filters are used to estimate pedestrian parameters.Region splitting and merging are allowed.Partial overlapping and occlusion is corrected by defining a pedestrian model (Chen et al., 2005).

Tracking based on an active contour of a moving object:
The contour of a moving object is represented by a snake, which is updated dynamically.It relies on the boundary curves of the moving object.For example, it is efficient to track pedestrians by selecting the contour of a human's head.This method can improve the time complexity of a system, but its drawback is that it cannot solve the problem of partial occlusion, and if two moving objects are partially overlapping or occluded during the initialization period, this will cause tracking errors.For example, Koller et al. (1993) proposes a stochastic algorithm for tracking of objects.This method uses factored sampling, which was previously applied to interpretations of static images, in which the distribution of possible interpretations is represented by a randomly generated set of representatives.It combines factored sampling with learning of dynamical models to propagate an entire probability distribution for object position and shape over time.This improves the mentioned drawback of contour tracking in case of partial occlusions, but increases the computational complexity (Chen et al., 2005).
Tracking based on a moving object model: Normally model based tracking refers to a 3D model of a moving object.This method defines a parametric 3D geometry of a moving object.It can solve partially the occlusion problem, but it is (very) time consuming, if it relies on detailed geometric object models.It can only ensure high accuracy for a small number of moving objects.For example, Masoud and Papanikolopoulos (2001) solved the partial occlusion problem by considering 3D models.The definitions of parameterized vehicle models make it possible to exploit the a-priori knowledge about the shape of typical objects in traffic scenes (Chaira, 2003;Chen et al., 2005).

Tracking based on selected features of moving objects:
Feature based tracking is to select common features of moving objects and tracking these features continuously.For example, corners can be selected as features for vehicle tracking.Even if partial occlusion occurs, a fraction of these features is still visible, so it may overcome the partial occlusion problem.The difficult part is how to identify those features which belong to the same object during a tracking procedure (feature clustering).Several papers have been published on this aspect.For example, Chaira and Ray (2008) extract corners as selected features using the Harris corner detector.These corners then initialize new tracks in each of the corner trackers.Each tracker tracks any current corner to the next image and passes its position to each of the classifiers at the next level.The classifiers use each corner position and several other attributes to determine if the tracker has tracked correctly (Chen et al., 2005).Rossi and Bozzoli (1994) and Stern and Efros (2002) successfully used moving blobs to track and count people crossing the field of view from a vertically mounted camera.In a different approach with blobs, Rossi and Bozzoli (1994) represented each pixel in each motion image by its optical flow characteristics according to certain features of the flow vector.The color spaces that are typically used in video tracking and surveillance are YCbCr (Cutler and Davis, 2000) and HSV (Lyudmila et al., 2007).As highlighted in Alper et al. (2006), the more efficient notion will be to detect the presence of a human being without having to pre-determine its body segments.Polana andNelson 1994 andMahmoud et al. (2008) were among the first to champion the idea of using low-level visual features to track human motion.In their own words, they proposed a way to "get your man without finding his body parts".The task of detecting human motion is incomplete without the classification phase to distinguish human movements from other motions belonging to animals and objects.With the emerging use of fuzzy logic in various applications, fuzzy-based classification schemes (Shi and Sun,1999) have also proven to yield better accuracy rates than conventional shape-based (Aggarwal and Cai, 1997) and motionbased (Chaira, 2004) techniques.

METHODOLOGY Noise:
The most significant stages in image processing applications are the noise filtering.The importance of image sequence processing is regularly increasing with the ever use of digital television and video systems in consumer, commercial, medical, and communicational applications.Image filtering is not only used to improve the image quality but also is used as a preprocessing stage in many applications including image encoding, pattern recognition, image compression and target tracking, to name a few.This preprocessing stage is essential in most of the image-processing algorithm and improper noise filtering may result in inappropriate or even false outcome.Different methods have been proposed for the purpose of noise filtering (Linda and Stockman, 2001).By using the various types of noises like: We obtain the clarity of the image using various filters like: From the results obtained we conclude that with three different noises salt and pepper noise, Gaussian noise and periodic noise applied for denoising of the spatial video produces variant results over different filtered techniques.From the results obtained using various filtering techniques it is observed that for salt and pepper noise median and rank order filter works better than other techniques.In case of Gaussian noise Weiner and rank order filter works fine.For Periodic noise 2D filter works better than other filters.

SEGMENTATION
Segmentation is the process of partitioning a digital image into multiple segments (sets of pixels, also known as super pixels).The goal of segmentation is to simplify and/or change the representation of an image into something that is more meaningful and easier to analyze (Dhanalakshmi et al., 2008).Image segmentation is typically used to locate objects and boundaries (lines, curves, etc.) in images.

Aapproximate median segmentation:
Approximate median method uses a recursive technique for estimating a background model.Each pixel in the background model is compared to the corresponding pixel in the current frame, to be incremented by one if the new pixel is larger than the background pixel or decremented by one if smaller.A pixel in the background model effectively converges to a value where half of the incoming pixels are larger than and half are smaller than its value.This value is known as the median Pseudo code approximate median: The Approximate median foreground detection compares the current video frame to the background model, and identifies the foreground pixels.For this it checks if the current pixel bw(x, y) is significantly different from the modeled background pixel bg(x, y): |bw(x, y) − bg(x, y)| > T A simplified pixel-wise implementation of the approximate median background subtraction method in pseudo-code is given below: /* Adjust background model */ If (bw > bg) then bg = bg + 1; Else if (bw < bg) then bg = bg -1; /* determining foreground */ If (abs (bw -bg) > T) then fg = 1; Else fg = 0;

FEATURE EXTRACTION
The feature is defined as a function of one or more measurements, each of which specifies some quantifiable property of an object, and is computed such that it quantifies some significant characteristics of the object (Krassimir, 1986).
Feature Extraction plays a major role to detect the moving objects in sequence of frames.Every object has a specific feature like color or shape.In a sequence of frames, any one of the feature is used to detect the objects in the frame (Gyaourova et al., 2003).
Bounding box with color feature: If the segmentation is performed using frame difference, the residual image is visualized with rectangular bounding box with the dimensions of the object produced from residual image.For a given image, a scan is performed where the intensity values of the image are more than limit (depends on the assigned value, for accurate assign maximum).In this Features is extracted by colour and here the intensity value describes the color.The pixel values from the first hit of the intensity values from top, bottom, left and right are stored.By using this dimension values a rectangular bounding box is plotted within the limits of the values produced (Gyaourova et al., 2003).Algorithm for Bounding Box: Block matching: Block Matching Algorithm (BMA) is a standard technique for determining the moving object in video.Blocks are formed in a region without overlapping on the other region.Every block in a frame is compared to the corresponding blocks in the sequence of frames and compares the smallest distance of pixel values (Polana and Nelson, 1994;Gyaourova et al., 2003).
In BMA it is implicit that each pixel within a macro block has identical motion activity and produce one motion vector for every macro block.The major proposal behind block matching is to divide the current frame into number of macro blocks of fixed size and produce a motion vector which includes the location of Typically the macro block is taken as a succession of 16 pixels and search area is up to 7 pixels on all four sides of the parallel macro block in previous frame.The matching of one macro block with any more depends on the output of a cost function.The matching of one macro block with another is based on the output of a cost function.The macro block that results in the least cost is the one that matches the closest to current block (Fig. 1).
There are various cost functions, of which the most popular and less computationally expensive is Mean Absolute Difference (MAD) (en.wikipedia.org/wiki/ Video_tracking).In this proposed work we adapted the concept of Intuitionistic fuzzy divergence (IFD) (Cavallaro et al., 2000) for measuring distance.
Unlike fuzzy divergence that considers only the membership degree (Ryszard, 2007;Lipton et al., 1998), IFD takes into account the membership degree, the non-membership degree, and the hesitation degree.

Intuitionistic fuzzy set:
The key improvement of Intuitionistic fuzzy set theory over fuzzy set theory is that in the latter, the membership value of an object also defines the non-membership value of it by means of a mathematical relation, whereas in the former the membership value and non-membership value of an object are not, in general, related by a mathematical equation.Rather, the decision-maker (or the problem analyst or the intelligent agent) independently decides both, up to his best intellectual capability.This is because, when deciding the degree of membership of an object there may be some hesitation.
A fuzzy set could be viewed as a special case of Intuitionistic fuzzy set, provided that at the processing stage for evaluation of membership value, there is no in deterministic situation with respect to any object of the universe of discourse.
An Intuitionistic Fuzzy Set (IFS) A on a universe X is defined as an object of the following form: Where the functions: µ A : X → [0,1] and ν A : X → [0,1] Defines the degree of membership and the degree of non-membership of the element xX in A, respectively and for every xX Obviously, each ordinary fuzzy set may be written as: Recently, the necessity has been stressed of taking into consideration a third parameter π A (x), known as the Intuitionistic fuzzy index or hesitation degree, which arises due to the lack of knowledge or 'personal error' in calculating the distances between two fuzzy sets (en.wikipedia.org/wiki/Video_tracking). In fuzzy set, non-membership value is equal to 1-membership values or the sum of membership degree and non-membership value is equal to 1.This is logically true.But in real world this may not be true as human being may not express the non-membership value as 1-membership value.This is due to the presence of uncertainty or hesitation or the lack of knowledge in defining the member ship function.This uncertainty is named as hesitation degree.Thus the summation of three degrees, i.e., membership, non-membership and hesitation degree is 1.It is obvious that 0≤ π A (x) ≤1, for each xX.So, with the introduction of hesitation degree, an Intuitionistic fuzzy set A in X may be represented as The Table 1 shows the comparison of Fuzzy and Intuitionistic Fuzzy logic (Isard and Blake, 1996;Kato and Mark, 1999).

PROPOSED ALGORITHM
The Three Step Search algorithm searches every one of the four side of a macro block.But occasionally the search at all the four side of a macro block is unwanted.The variation in intensity from the darker region to the lighter region or from the lighter region to the darker region is called the EDGE region of an image.The macro block positioned on one side of edge region does not require to be searched at the other side of the edge for best match.As an example if a macro block is at the lighter side of the edge then search at the darker side of the edge is unwanted.So in this algorithm a Intuitionistic fuzzy membership value according to intensity is introduced for every macro block.Now searching the macro block of the reference frame for the best match only can continue if the Intuitionistic fuzzy degree of membership value is greater than the value of degree of non membership and degree of hesitation of that current macro block of the present frame.The search location and all other steps are similar with the conventional three step search.The proposed algorithm is similar to almost three step search and be able to be described like of the macro block of the previous frame is greater than Non membership value ν A (x) and hesitation value π A (x) of the macro block of the current frame • Then calculate the cost function IFD for that macro block else skip the calculation • The same process described in step 4 and 5 for center location is repeated for all eight locations +/-S around the center • If calculation is skipped for all the nine locations then we keep the search origin same • Else from these nine locations searched so far it picks the one giving least cost and makes it the new search origin • According to the three step algorithm new step size is S = S/2 and repeats the similar search for two more iterations until S = 1.

Tracking:
The process of locating the moving object in sequence of frames is known as tracking.This tracking can be performed by using the feature extraction of objects and detecting the objects in sequence of frames.By using the position values of object in every frame, we can calculate the position and velocity of the moving object (Qi and Reinhard, 2003;Rossi and Bozzoli, 1994).

Distance:
The distance travelled by the object is determined by using the centroid.It is calculated by using the Euclidean distance formula.The variables for this are the pixel positions of the moving object at initial stage to the final stage.Distance measures between two Intuitionistic fuzzy sets A and B that take into account the membership degree m, the non-membership degree n, and the hesitation degree (or Intuitionistic fuzzy index) p in X = {x 1 , x 2 . . .x n }: Be two Intuitionistic fuzzy sets.Considering the hesitation degree, the interval or range of the membership Degree of the two Intuitionistic fuzzy sets A and B may be represented as The non membership degrees π A (x), π B (x) is the hesitation degrees in the respective sets, with The interval is due to the hesitation or the lack of knowledge in assigning membership values.The distance measure has been proposed here taking into account the hesitation degrees.
For two images A and B, at the (i, j) th pixels (i.e., at pixels a ij and b ij ), the amount of information between the membership degrees of images A and B is given as follows: • Due to m 1 (A) and m 1 (B), i.e., µ A (a ij ) and µ B (b ij ) of the (i,j)th pixels: • Due m 2 (A) and m 2 (B), i.e., µ A (a ij )+∏ A (b ij ) and µ B (a ij )+∏ B (b ij ) of the (i,j)th pixels: Fuzzy Logic Intuitionistic Fuzzy Logic Determines only the degree of membership Determines degree of membership and degree of non-membership Let E be universal set.A fuzzy set on E is an object A of the form A = { < x, µA(x) > | x ∈ E }where, 0≤µA(x)≤1 Let X be a universal set.An Intuitionistic Fuzzy set A is an object of the form A = { < x, µA(x), νA(x) > | x ∈ X }where,0 ≤ µA(x)+νA(x)≤1 In fuzzy logic 1-µA(x) is considered as non member ship value If νA(x) = 1 -µA(x) (or) µA(x) + νA(x) = 1Then A represents fuzzy set The function ΠA(x) = 1 -µA(x) -νA(x)represents degree of hesitancy of the element

EXPERIMENTAL RESULTS
The experimental results are conducted with the help of MATLAB R2007a.Intel® Core™2DUO CPU T5870 and speed 2.00 GHZ and its capacity are 2.99GB of RAM.The proposed framework act of the object tracking is achieved by four stages and they are discussed below

Noise removal technique:
The input video may suffer from noises due to three main reasons are as follows: • Light level and sensor temperature • Atmospheric disturbance during transmission Prior to any other processing phase the input video has to be preprocessed to remove the noises to increase the quality of video as well as increase the efficiency of object tracking In this Preprocessing stage the video with Gaussian noise, salt and pepper noise and Periodic Noise are taken under consideration.The test was conducted on these videos by applying different noise filters.The result shows for Gaussian noise the wiener filter best suits, Salt and Pepper noise is effectively removed by Median filter and for the periodic noise 2D FIR filter performs better than other filters.The result obtained are shown in the Fig. 2.

Segmentation technique:
The segmentation technique is used to cluster the related objects by performing background subtraction using Average Median.This technique best suited for moving objects segmentation.The result shows the input image, the previous frame and after applying the Average Median and subtracting the background objects the foreground is alone displayed the result is displayed in the figures.The result shows that the Moving Object Segmentation can be done best using the average median compared to the frame difference it is revealed that the accuracy of average median is high (Fig. 3).

Feature extraction using bounding box with color
Segmentation shows the objects and boundaries in an image.Each Pixel in the region has some similar characteristics like color, intensity, etc.In this study the feature extraction bounding box with color feature is adapted.For a specified image, an examination is performed where the intensity values of the image are additional than limit.In this Features is extracted by color and here the intensity value describes the color.The pixel values from the first hit of the top, bottom, left and right are stored.By using this dimension values a rectangular bounding box is plotted within the limits of the values produced.The Fig. 4 shows the output of the feature original video, (b) and (c) shows that the video of an moving object is detected using bounding box using color feature.Object identification and object tracking tracking in video is performed by applying the Block Matching using three step approach of Intuitionistic Fuzzy to set the motion vector of the moving objects then finding the threshold of each object and detecting and tracking the objects which exc value as moving objects.The experimental results are shown in the Fig. 5 to 7. The Table 2 shows that the proposed work of object tracking using Intuitionistic fuzzy logic outperforms the remaining techniques.And the time taken also considerably reduced on using the proposed approach From the Fig. 8 for PSNR, proposed BMIFL algorithm shows the higher PSNR value.
From the Fig. 9 for MSE ,proposed BMIFL algorithm shows the lower the MSE value.
From the Fig. 10 for Timetaken ,proposed BMIFL algorithm shows the less the timetaken to track the object.
From the Fig. 11, proposed BMIFL algorithm shows the higher PSNR value and lower the MSE Values which shows the proposed algorithm is best for tracking in less time.

CONCLUSION
The Intuitionistic Fuzzy Logic Based Three Step Search algorithm in this study reduced computation time especially in the edge region of image.As the computation time is reduced, the total time to complete the.This concept can be used with the other block matching algorithm also.This process has an advantage to control the quality of the image and the speed of the process as required, by controlling the allowable range.The distance is measure with the Intuitionistic fuzzy Divergence.In our opinion, the results are found better due to the use of Intuitionistic fuzzy set.It takes into account the uncertainty in the assignment of the membership degrees.The membership degree is set with the change in the hesitation degree and so the edge-detected results also vary with it.Thus with the change in hesitation degree, good edge-detected image is obtained.

•
Read the Image difference • For (pres pos=int value: final Value)of y resolution • For (pres pos=int value: final Value)of x resolution o Calc the sharp change in intensity of image from top and bottom o Store the values in an array • Height of the bounding box is = bottom value -top value • For (pres pos=int value: final Value)of x resolution • For (pres pos=int value: final Value)of y resolution o Calc the sharp change in intensity of image from left to right o Store the values in an array • Width of the bounding box = Right value-left value o Using the Dim draw the boundary to the image.• Initial Value: he starting position of pixel in an image • Final Value: The ending position of pixel in an image • Height = Bottom value-top value/2 • Width = Right value-Left value/2 • Add the Height value with the top value • Store it in a variable like mid.top • Add the width value with the left value • Store it in a variable like mid.left

Fig. 1 :
Fig. 1: Image frame the macro block of the current frame in the previous frame.Typically the macro block is taken as a succession of 16 pixels and search area is up to 7 pixels on all four sides of the parallel macro block in previous frame.The matching of one macro block with any more depends on the output of a cost function.The matching of one macro block with another is based on the output of a cost function.The macro block that results in the least cost is the one that matches the closest to current block (Fig.1).There are various cost functions, of which the most popular and less computationally expensive is Mean Absolute Difference (MAD) (en.wikipedia.org/wiki/ Video_tracking).In this proposed work we adapted the concept of Intuitionistic fuzzy divergence (IFD)(Cavallaro et al., 2000) for measuring distance.Unlike fuzzy divergence that considers only the membership degree(Ryszard, 2007;Lipton et al., 1998), IFD takes into account the membership degree, the non-membership degree, and the hesitation degree.

Fig. 5 :
Fig. 5: Block matching of moving objects with co

Table 1 :
Comparison of Fuzzy and Intuitionistic Fuzzy logic

Table 2 :
Performance evaluation of proposed