International Journal of Computational Intelligene & Teleommuniation Sstems () 0 pp. 39-45 NOISE REOVAL FOR OBJECT TRACKING BASED ON HSV COLOR SPACE PARAETER USING CASHIFT P. Raavel G. Appasami and R. Nakeeran 3 Dr. Pauls Engineering College Vanur Villupuram INDIA raavel@gmail.om appas_5g@gmail.om 3 sughandhiram@ahoo.om Abstrat: CASHIFT is a traking algorithm whih needs traking target to be alibrated automatiall and an onl trak one single target at a time. Aiming at these problems this paper proposes a human/ objet traking approah based on method and CASHIFT algorithm. The algorithm developed here is based on a robust nonparametri tehnique for limbing densit gradients to find the mode (peak) of probabilit distributions alled the mean shift algorithm. In our ase we want to find the mode of a olor distribution within a video sene. Therefore the mean shift algorithm is modified to deal with dnamiall hanging olor probabilit distributions derived from video frame sequenes. The Continuousl Adaptive ean Shift Algorithm (CASHIFT) is an adaptation of the ean Shift algorithm for objet traking that is intended as a step towards moving traking for a pereptual user interfae. In this paper we review the CASHIFT Algorithm and extend a default implementation to allow traking in an arbitrar number and tpe of feature spaes. We evaluate the effetiveness of this approah b omparing the results with a generi implementation of the ean Shift algorithm in a quantized feature spae of equivalent dimension. We also intend to appl this CASHIFT algorithm to moving objet suh as Vehile person ball or an moving objet and to trak the objet based on Region of Interest (ROI) through wireless vision approah. In this projet we onentrate on the noise removal i.e. shadows of the images suh that no better traking an be attained. Kewords: eanshift Traking Image Segmentation I. INTRODUCTION Traking has been widel used in man pratial appliations suh as surveillane sstem video streaming and video arhiving et []. Compared with a normal video sequene an LFR video has a lower frame rate and worse ontinuit. Therefore issues of fast motion and abrupt hange of objetappearane sale in an LFR video sequene will degrade the traking performane of a traditional mean-shift (S) traker designed for a normal video sequene. Generall there are two kinds of major approahes in objet traking []. One uses the predition theor to evaluate the probabilisti hpotheses ielding filtering tehniques suh as Kalman filters [3] and partile filters [4]; the other exemplified b the S traker [3] uses the statisti distribution of features to loalize the objet aording to the target appearane. Beause of its low omputation ost and parameter-free nature the S traker has been widel used in man realtime onstrained appliations suh as objet traking video/image segmentation and et. However it has been also pointed out that while a S traker operates relativel well on a smoothing video sequene with nie ontinuit its performane drops signifiantl in an LFR video sequene [5]. The reasons are first the S traker relies ver muh on the suffiient appearane overlap of the objet under traking in onseutive frames. Although Porikli and Tuzel [] proposed a multi-kernel S traker b using a bakground modelling approah the issue still remains in a realtime appliation with ompliated bakground and hange illumination. Seondl the S traker applies a fixed or limited-freedom window (kernel) sale b assuming a smooth hange in objet sale thus the traking aura will be affeted one the S traker is applied in an LFR video where the adaptation of the kernel sale annot ath up with the sale variation of the objet appearane. Bradski et al. [5] proposed a ontinuousl adaptive S (CASHIFT) algorithm to determine the window
40 International Journal of Computational Intelligene & Teleommuniation Sstems sale based on the seond moment of the traked area but it still onl suits a ase with gradual sale hange. Real-time detetion of the moving vehile requires loating vehiles auratel and quikl without manual alibration and with as little sstem resoures onsumption as possible whose effet has a diret impat on the subsequent part of the sstem. B doing researh on moving target detetion and traking in video sequene of stati senes this paper proposes a multivehile detetion and traking methods. Firstl do motion detetion b means of double-differene method in video sequenes ontained moving objets then regard the deteted moving vehiles target as region of interest referred to as ROI and finall use a CASHIFT multitraker to do multi-vehile traking thereb overoming the defet of CASHIFT algorithm. In this paper we propose an enhaned CASHIFT approah b using a novel kernel predition method to predit the initial kernel position. Related works are related to CASHIFT algorithm is disussed in Setion II and Setion III desribes the ontinuousl adaptive ean shift Traking (CASHIFT) algorithm and its derivation. Setion IV desribes about the Noise Removal. Setion V desribes about the CASHIFT sstem model. The remaining parts of the paper are organized as the follows. In setion II we introdue the main parts of the algorithm whih inlude the (ean Shift) S algorithm the kernel predition (KP) method; Setion III shows and disusses the experimental results followed b a onlusion in setion IV. II. CASHIFT ALGORITH The mean shift algorithm operates on probabilit distributions. To trak olored objets in video frame sequenes the olor image data has to be represented as a probabilit distribution [7]; we use olor histograms to aomplish this. Color distributions derived from video image sequenes hange over time so the mean shift algorithm has to be modified to adapt dnamiall to the probabilit distribution it is traking. The new algorithm that meets all these requirements is alled CASHIFT. For fae traking CASHIFT traks the X Y and Area of the flesh olor probabilit distribution representing a fae. Area is proportional to Z the distane from the amera. Head roll is also traked as a further degree of freedom. We then use the X Y Z and Roll derived from CASHIFT fae traking as a pereptual user interfae for ontrolling ommerial omputer games and for exploring 3D graphi virtual worlds. Figure summarizes the algorithm desribed below. For eah video frame the raw image is onverted to a olor probabilit distribution image via a olor histogram model of the olor being traked (flesh for fae traking). The enter and size of the olor objet are found via the CASHIFT algorithm operating on the olor probabilit image (the gra box is the mean shift algorithm). The urrent size and loation of the traked objet are reported and used to set the size and loation of the searh window in the next video image. The proess is then repeated for ontinuous traking. Aiming at these two problems this paper firstl do realtime detetion of multi-vehile moving in video b means of double-differene method also mark eah ROI of moving vehile to solve the manual alibration problem and then start CASHIFT traker for eah vehiles ROI separatel in order to overome the shortoming that CASHIFT algorithm an onl trak a single target at a time. Eah traker in this algorithm is in harge of its separate vehile objetive independentl and will no longer work until the targets disappear. CASHIFT Algorithm. CASHIFT (ontinuousl adaptive mean-shift) is an extended motion traking Algorithm of ean Shift algorithm [8] to the ontinuous images sequene whih is a non-parametri method based on the gradient of dnami distribution of probabilit densit funtion. The basi idea is to do ean Shift operation to all the frames in video sequene use mass enter and size of searh window obtained in previous frame as the initial value of searh window in the next frame and ahieves the target traking b iteration. CASHIFT algorithm mainl uses information of olor probabilit distribution of moving targets in video images to ahieve the traking purpose [9] [0] whih an effetivel solve objetive deformation and objetive shelter problems with high omputational effiien. RGB olor spae is quite sensitive to brightness hange. In order to redue the impat of brightness
Noise Removal for Objet Traking Based on HSV Color Spae Parameter using CASHIFT 4 4. Center the searh window at the mean loation omputed in Step 3. 5. Repeat Steps 3 and 4 until onvergene (or until the mean loation moves less than a preset threshold). Proof of Convergene [3] Assuming a Eulidean distribution spae ontaining distribution f the proof is as follows refleting the steps above:. A window W is hosen at size s.. The initial searh window is entered at data point p k 3. Compute the mean position within the searh window Figure : CASHIFT Algorithm Flowhart hange on traking CASHIFT algorithm onverts the image from RGB spae to HSV spae. Whereas in HSV spae onl H-omponent an represent olor information so it must alulate one-dimensional olor histogram of H omponent in the HSV spae then onvert the original image into a olor probabilit distribution image based on the obtained histogram and finall adopt ean Shift algorithm. The alulation proess [] is shown in Fig. : CASHIFT algorithm an do real-time traking to target of speifi olor ahieve ver good traking effet and effetivel remove noise and interferene from image sequene. III. CASHIFT DERIVATION The losest existing algorithm to CASHIFT is known as the mean shift algorithm [][3]. The mean shift algorithm is a non-parametri tehnique that limbs the gradient of a probabilit distribution to find the nearest dominant mode (peak). How to Calulate the ean Shift Algorithm. Choose a searh window size.. Choose the initial loation of the searh window. 3. Compute the mean loation in the searh window. Pk ( W ) = PK W () J W the mean shift limbs the gradient of f(p). K P W P f ` ' ( PK ) K = f P () K 4. Center the window at point P K (W). 5. Repeat Steps 3 and 4 until onvergene. Near '` the mode onverges there. f P 0 so the mean shift algorithm For disrete D image probabilit distributions the mean loation (the entroid) within the searh window (Steps 3 and 4 above) is found as follows: (a) Find the zeroth moment = I( x) (3) Find the first moment for x and 0 0 = x xi ; = I. (45) x (b) alulate the mean searh window loation (entroid) is x = ; = ; 0 0 where I(x) is the pixel (probabilit) value at position (x) in the image and x and range over the searh window.
4 International Journal of Computational Intelligene & Teleommuniation Sstems At the same time alulate seondar moment on the basis of equation obtain long axis short axis and diretion of the target. The seondar moment is: = x I (6) 0 = I (7) 0 = xi (8) The diretion of target is θ = artan Where suppose x 0 0 x 0 a b 0 = = 0 = x (9) (0) So the long axis l short-axis w of traking objetive an be presented as: ( a + b) + b + ( a ) l = () ( a + ) b + ( a ) w = () () Reset the size S of searh window as the funtion of olor probabilit distribution of the above searh window. (d) Repeat a b steps until onvergene (hange of mass enter is less than a given threshold). How to Calulate the Continuousl Adaptive ean Shift Algorithm. Choose the initial loation of the searh window.. ean Shift as above (one or man iterations); store the zeroth moment. 3. Set the searh window size equal to a funtion of the zeroth moment found in Step. 4. Repeat Steps and 3 until onvergene (mean loation moves less than a preset threshold). IV. NOISE REOVAL The algorithm used to remove the shadow. The first step is to load image with shadow whih have probabl same texture throughout. Remove pepper and salt noise b appling ontra harmoni filter. To remove shadow properl average frame is omputed to determine effet of shadow in eah of the three dimensions of olour. So the olours in shadow regions have larger value than the average while olours in non-shadow regions have smaller value than the average values. Images are represented b varing degrees of red green and blue (RGB). Red green and blue bakgrounds are hosen beause these are the olors whose intensities relative and absolute are represented b positive integers up to 55. Then onstrut a threshold pieewise funtion to extrat shadow regions. The results of the threshold funtion is a binar bitmap where the pixel has a value of zero if the orresponding pixel is in the shadow region and it has a value of one if the orresponding pixel is in the non shadow region. Finall onvolute the noise-free binar image with the original image to separate the shadow from the non shadow regions. B testing the effets of shadow on speifi pixels loated in the solid bakgrounds the effet of shadow an be derived for different pixel value ombinations b appling binar and morphologial funtion. Pixels with wide variations in olour ma reside next to eah other giving skewed results. The separate analses of these three solid bakgrounds showed a orrelation utilized to predit the effet of shadow in a multitude of situations. Finall energ funtion is applied to remove shadow. As introdued before when mathed the snake and the real ontour must share a ommon entroid. Alternativel having a ommon entroid is a neessar ondition for registration of the two ontours. In this setion we investigate how to register the entroids of the two ontours whilst performing the ontour segmentation. To register the entroids of the two ontours we exploit the CASHIFT algorithm whih is the variation of the
Noise Removal for Objet Traking Based on HSV Color Spae Parameter using CASHIFT 43 mean shift algorithm (Cheng 995). First of all we briefl review the priniple of mean shift. Given an image point sequene is (i =... n) in the m- dimensional spae R then the multivariate kernel densit estimate with kernel K(s) and window radius r is given as m i= ( s s ) n i F ( S) = k nr r (3) The multivariate Epanehnikov kernel an be estimated b ( m )( s ) + KE ( s) = s < m (4) Where m is the volume of the unit m- dimensional sphere. Assuming a kernel ( s) 0 ( s ) Ψ = Ψ where 0 normalization onstant the mean shift vetor is is expressed as n i= ( ( i ) ) ( s s ) r s iψ s s r i= S( s) = s n Ψ ( i ) (5) Where Ψ( ) is an intermediate funtion (Comaniiu et al. 0). The mean shift proedure in fat is a reursive evolution b omputing the mean shift vetor S(s) and adjusting the entroid of kernel Ψ b S(s). In theor the Eulidean distane between the entroids d is proportional to the mean of the mean shift: dα S( s) (6) Now let us look at the appliation of the mean shift in our ase. The mean shift algorithm is emploed to find the ontour andidate that is the most similar to the real boundar with the similarit being expressed b the Eulidean distane between the initial entroid of the snake and that of the real boundar whih satisfies the objet energ funtion as well. The following steps are onduted: The entroid ( ) of a ontour is alulated b x = 0 and = 0 where we have the initial (zeroth) moment moment 0 for x-oordinates and moment 0 for -oordinates of image points on the ontour. The initial entroid (b guess) for the real boundar and the estimated one for the snake are obtained respetivel. One the entroids have been obtained the Eulidean distane d between these two entroids then beomes defined for performing the revised GVF strateg. This is followed b running the standard CASHIFT algorithm After the CASHIFT; we again ompute the Eulidean distane between the entroids. Keep iterating the above proess till the Eulidean distane of the entroids is smaller than. V. EXPERIENTAL RESULT AND ANALYSIS In order to trak the objet using CASHIFT algorithm we have implemented an Wireless vision interfae model for aquiring the real time images from remote plae through wireless Surveillane amera whih is interfaed with atlab for traking the objets based user defined region of Interest. To grab the image we have using USB image grabber TV tuner for aquiring the image from wireless amera through.5ghz video reeiver module interfaed with PC. For better results GAA & THRESHOLD parameter is implemented along with the CASHIFT algorithm for better traking and removal of noise partile. For testing purpose we have tested the algorithm with real time with an Image Size of 30x40. CASHIFT traking purel depends on the size of the images and enter of mass. Figure : Figure 3: Performane of the objet traking is good after Threshold=0. and GAA=30 Performane of the objet traking is fair after Threshold=0.0 and GAA=8.65
44 International Journal of Computational Intelligene & Teleommuniation Sstems Figure 4: Performane of the objet traking is fair after Threshold=0.0 and GAA=8.65 Figure 7: Performane of the objet traking is fair after Threshold=0.0 and GAA=8.6 Complete traking is omputed b aquiring the new position of the objet and its new enter of mass values. From the above the initial position is the user s region of Interest and New positions are objet displae from its initial position s obtain the ontinuous adaptive traking the new position is now initiated as initial position and so on..ore results on Human traking shown below in the following figures. Figure 8: Performane of the objet traking is fair after Threshold=0.0 and GAA=8.0 CONCLUSIONS In this paper we have explored the use of variable kernels to enhane mean-shift segmentation. Figure 5: Performane of the objet traking is good after Threshold=0.4 and GAA=35 Experimental results show the improved traking apabilit and versatilit of our implementation of mean-shift objet traking algorithms when ompared with results using the standard kernel. The CASHFIT traker an be a ver effetive and effiient solution for video traking. While its mathematial foundation an be ompliated it is ver eas to implement. It gives ver good traking results while being omputationall inexpensive whih allows for real time traking and higher level omputations. It is ver flexible in a sense that it has man parameters that an be tuned. an different target models an be used and enhanements be made whih makes the traker adaptive to several different domains. However its performane also strongl depends on the orret tuning of these parameters and the orret set of enhanements used. Thus some work and testing is required before using the traker in different appliation areas. Figure 6: Performane of the objet traking is fair after Threshold=0.0 and GAA=8.65 ACKNOWLEDGENT The authors gratefull aknowledge the following individuals for their support: r. R. Nakeeran Professor Dr.Pauls Engg College; r.g.appasami Leturer Dr.Pauls Engg College and m famil and friends for their valuable guidane for devoting their preious time sharing their knowledge and o-operation.
Noise Removal for Objet Traking Based on HSV Color Spae Parameter using CASHIFT 45 REFERENCES [] F. Porikli and O. Tuzel Objet traking in lowframerate video SPIE Image and Video Communiations and Proessing 5685: 7 79 5. [] D. Comaniiu V. Ramesh and P. eer Kernelbased objet traking IEEE Trans. on Pattern Analsis and ahine Intelligene pages 564 577 3. [3] Y. Bokov and D. Huttenloher Adaptive Baesian reognition in traking rigid objets CVPR 0. [4]. Isard and A. Blake Condensation-Conditional Densit Propagation for Visual Traking International Journal of Computer Vision Vol. 9 No. pp. 5-8 998. [5] G. R. Bradski Computer Vision Fae Traking for Use in a Pereptual User Interfae IEEE Workshop on Appliations of Computer Vision Prineton NJ p. 4-9 998. [6] N. N. Shraudolph Loal gain adaptation in stohasti gradient desent in Proeedings of the 9 th International Conferene on Artifiial Neural Networks Edinburgh Sotland pp. 569-574 999. [7] D. Comaniiu and P. eer Robust Analsis of Feature Spaes: Color Image Segmentation CVPR 97 pp. 750-755. [8] D Comaniiu V Ramesh P eer. Kernel-Based Objet Traking. IEEE Transation on PAI 3 Vol. 5 pp. 564 577. [9] A Lei TIAN Yuan SU Hong qi. A Small Target Traking Algorithm Based on onte Carlo ethod. Journal of Image and Graphis. 8 Vol. 3 pp. 445 449. [0] ZHAO Yi U Zhi Chun LIU Ke. Real-time Ear Traking Based on Both Skin-olor and Contour Information. Journal of Image and Graphis. 6 Vol. 7 pp. 949 953. [] Bradski G. R. Computer Vision Fae Traking for Use in a Pereptual User Interfae IEEE Workshop on Appliations of Computer Vision Prineton NJ 998 pp. 4-9. [3] K. Fukunaga Introdution to Statistial Pattern Reognition Aademi Press Boston 990. [4] Y. Cheng ean shift mode seeking and lustering IEEE Trans. Pattern Anal. ahine Intell. 7: 790-799 995.