Journal of Transportation Technologies
Vol.4 No.2(2014), Article ID:45508,7 pages DOI:10.4236/jtts.2014.42015

The Automated Vehicle Detection of Highway Traffic Images by Differential Morphological Profile

Bharti Sharma1, Vinod Kumar Katiyar2, Arvind Kumar Gupta3, Akansha Singh4

1Department of Information Technology, College of Engineering Roorkee, Roorkee, India

2Department of Mathematics, Indian Institute of Technology Roorkee, Roorkee, India

3Department of Mathematics, Indian Institute of Technology Ropa, Ropar, India

4Department of Earth quake, Indian Institute of Technology Roorkee, Roorkee, India


Copyright © 2014 by authors and Scientific Research Publishing Inc.

This work is licensed under the Creative Commons Attribution International License (CC BY).

Received 8 November 2013; revised 9 December 2013; accepted 5 January 2014


Vehicle detection has been the critical part of the traffic surveillance system for many years. However, vehicle detection method is still challenging. In this paper, differential morphology closing profile is used to extract the vehicle automatically from the traffic image. Along with closing profile, some addition operation has been applied as a part of the algorithm to get the high detection and quality rate. Result demonstrated that the novel method has an excellent detection and quality percentage. We also have compared our automated detection method with other traditional image processing based methods and the results indicate that our proposed method provides better results than traditional image processing based methods.


Average Filter, Differential Morphology Closing Profile, Structure Element, Thresholding, Vehicle Detection

1. Introduction

Vehicle detection is a challenging research topic in intelligent transport system. It is very useful to improve traffic control and management system. It helps to reduce congestion potentially but appears not to be strongest part in intelligent transport system.

Vehicle detection is motivated by different applications, e.g. traffic flow management, road planning and military applications such as high way traffic monitoring and planning for the traffic management [1] . The vehicle detection enables the extraction of critical traffic parameters such as vehicle speed [2] , vehicle density [3] and traffic flow rate [4] and congestion level.

Over the years, many researchers have proposed different algorithms and techniques to detect the vehicle. In [5] vehicle is detected by calculating the characteristic features in the image of monochrome camera. In detection algorithm, hypothesis is generated by using shadow and symmetry features. This is only applicable for driver but not applicable for vehicle counting. In [6] [7] neural networks were applied for vehicle detection. But there are two major problems with neural network one that there is no warranty to reach the global minimum and second one implies to a data which sets representative of the real world and there is not a universal optimum model for neural network. In [8] fuzzy measures are used to detect vehicles. Light intensity value is used as fuzzy measure. When the intensity value falls in certain interval, fuzzy measures must be used to decide if it is a vehicle or not. In [9] fuzzification of area and circumference is done for classification and each vehicle type (e.g. small, medium and big) is assigned with a measurement range of values by designing fuzzy rules and finally defuzzification is done. In [10] a segmentation approach using adaptive background subtraction is discussed. This method needs the background image and adapts to changes in weather and lightening condition and another approaches is time differencing [11] which consists of subtracting consequents frames. This method is insensitive to lighting conditions and not requiring the background image. This method produces small blobs that are difficult to separate from noise [12] . In [13] the background subtraction and image segmentation based on morphological transformation for tracking and counting vehicles are used .Some morphological algorithm uses thresholding as image segmentation technique for vehicle detection [14] .

In this paper, an automated vehicle detection algorithm for the traffic images is proposed. Differential morphological profile is used to detect the vehicle and averaging filter reduces the noise effect in the input image. Proposed algorithms, automatically detects the vehicles by setting some initial parameters like a series of closing operation of different structure sizes to implement the differential profile.

The rest of this paper is organized as follows proposed system with block diagram is discussed in section 2, which is followed by test results and discussions in section 3 and the conclusion in section 4.

2. Proposed Algorithm

The main objective of this part of the research was to detect vehicle automatically moving on the road. In this paper, a traffic image is used to test the proposed detection technique. Multiscale DMP closing profile is applied on the traffic image for the automatic vehicle detection in the proposed algorithm. Shape Index of the vehicle is used for identification of the vehicle. The following steps will be used to detect the vehicle in the proposed algorithm:

1) Input an image 2) Pre-processing 3) Differential Morphology profile 4) Thresholding 5) Filtering The block Diagram of the automatic vehicle detection procedure is presented in the figure 1.

The block diagram in the figure 1 shows sequence of steps was followed in the detection process. First traffic image is taken from any high resolution camera. Pre-processing of image reduces the noise effect. Along with differential morphology profile, thresholding is applied to the image to highlight the vehicles of interest. At last filtering hides the false objects and highlights the vehicles.

2.1. Input a Traffic Image

The proposed algorithm is applied on frames (still images) of road segments. Input traffic image is taken using near vertical positioned cameras. Figure 2 shows the input image.

2.2. Preprocessing

The initial task of vehicle detection is to convert true color input image into gray level image. Input frame I =  [IR IG IB]T, is combination of the three color components Red, Green and Blue. The input color frame is converted

Figure 1. Block diagram of the automatic vehicle detection algorithm.

Figure 2. Input image.

into gray level image IG, according to luminance converter [15] .


To reduce the false object detection in the resultant image, averaging filter [16] is implemented on the image IG. Averaging filter reduces the noise effect in the image.


IS, Image formed by averaging K different noisy images

2.3. The Differential Morphological Profile

Mathematical morphology has been applied to a wide variety of practical problems such as noise filtering, Image segmentation, shape detection and decomposition, pattern recognition [17] -[21] . Mathematical morphology differs from many other image processing techniques because it is a nonlinear approach, usually dealing with discrete data in terms of sets and set operations. The Differential morphological profile (DMP) [22] is used to create a feature vector from a single image. It is based on the repeated use of the two morphological operations, Opening and closing by reconstruction with different structuring element (SE) sizes A. Closing by reconstruction, is applied on preprocessed image IS obtain from equation (2) with a structure element of size i. The closing by reconstruction is computed as dilation of the image IS with SE, followed by a geodesic reconstruction by erosion [22] . The geodesic reconstruction by dilation is an iterative procedure that is performed until idempotence is reached. A morphology closing profile is de fined as


The closing profile is an anti-granulometry generated by closing by reconstruction. When the structure element A differential morphological profile is computed using the equation (4)


where, are derivative of opening and closing profile. The derivative of opening and closing profile are defined as



Δ(IS) function stores information about both type and size of the connected components inside the IS. Δ(IS) function shows darker components unbalanced to the left (closing profile). The point where Δ(IS) takes the maximum value is used to record the size of SE, which give maximum response. This maximum response point is known as the multi scale-closing characteristic, of the image IDMP is defined by equation (7)


2.4. Thresholding

Component The Otsu thresholding [23] is applied on the image to label the candidate vehicles. Thresholding converts the gray level image into binary image by using the following Equation:


where T is calculated by Ostu’s method.

2.5. Filtering

Filtering is used to extract the target object i.e. vehicles from the Iresult..To extract the target objects, Ivehicle, shape index is computed. A shape index threshold enables to extract vehicles more accurately. Mathematically, Shape Index (SI) can be calculated according to equation (9):


After performing above operations, target object i.e. vehicle are detected.

3. Experiments and Discussions

The automated vehicle detection using morphological differential profile is tested on image of Southern Expressway Australia taken from internet [24] . The input image is shown in the figure 1. Within the image, vehicles were manually delineated. The manually delineated vehicles were used as reference vehicles to check the accuracy of the automatic vehicle detection algorithm. The performance of the purposed system is evaluated using the three measures [25] , TPR (true positive rate), FPR (false positive rate) and FNR (false negative rate). They are calculated using the equations (10), (11), (12) respectively:




To obtain good performance, the detection algorithm must try to reduce the false negative rate and false positive rate types of errors and FNR = 0 and FPR = 0 indicates 100% accuracy of the detection algorithm.

The automated detection algorithm discussed in section 2 is implemented on the input image. The DMP is generated on the test image using disc-shaped morphological structures with increasing radius r from 3 to 24 (using equal step size 3).Structure information(Shape Index) is used to extract the vehicles. The detection algorithm is tested on the traffic image as shown in figure 2. Total vehicles visible in the input image are 26. The algorithms [26] [27] is tested on the same traffic image and the statistics measures of proposed and other algorithms [26] [27] are summarized in table 1, which present the false positive rate, true positive rate, false negative rate .

The statistics measures of Table 1 indicate that the proposed vehicle detection method has better detection rate than other methods available in literature.

Figures 2-5 show original image, the result of method [25] [26] and proposed algorithm respectively. Method [25] result shows that some detected vehicles are very blurred and merged with background .So it is difficult to recognize them as true vehicles. The true positive rate of the method [25] is 84%, method [26] is 38% and proposed algorithm shows 96% true vehicle detection rate.

Table 1. The performance statistics of different detection algorithms.

Figure 3. result of method [25] .

Figure 4. result of method [27] .

Figure 5. Result of proposed method.

4. Conclusion

This paper has described automatic vehicle detection algorithm for traffic images that take into account the differential morphological profile for detection process. The DMP is a non-linear technique applied into highway traffic images to detect the vehicles. Experimental result shows the applicability and the superiority of this algorithm. Further extensions are needed to effectively reduce this misclassification based on semantic and geometric properties of roads and vehicles.


  1. Ghani, K.A. and Yosri, H. (2011) Application of Artificial Intelligent for Armour Vehicle Detection Using Digital Image Processing for Aerial Application. Proceedings of the International Conference on Advanced Science, Engineering and Information Technology, Putrajaya, 14-15 January 2011, 173-177.
  2. Wu, J.P., Liu, Z.B., Li, J.X., Gu, C.D., Si, M.X. and Tan, F.Y. (2009) An Algorithm for Automatic Vehicle Speed Detection Using Video Camera. Proceedings of 4th International Conference on Computer Science & Education, Nanjing, 25-28 July 2009, 193-196.
  3. Ozkurt, C. and Camci, F. (2009) Automatic Traffic Density Estimation and Vehicle Classification for Traffic Surveillance Systems Using Neural Networks. Mathematical and Computational Applications, 14, 187-196.
  4. Vanaja, A., Hema Kumar, G. and Sri Rama Krishna, K. (2011) A Novel Approach for Efficient Traffic Flow Density Estimation. International Journal of Advanced Engineering Sciences and Technologies, 5, 269-276.
  5. Hoffman, C., Dang, T. and Stiller, C. (2004) Vehicle Detection Fusing 2D Visual Features. Proceedings of IEEE Intelligent Vehicles Symposium, Parma, 14-17 June 2004, 280-285.
  6. Mantri, S. and Bullock, D. (1995) A Neural Network Based Vehicle Detection and Tracking System. Proceedings of the Twenty-Seventh Southeastern Symposium on System Theory, Starkville, 12-14 March 1995, 279-283.
  7. Ha, D., Lee, J. and Kim, Y. (2004) Neural-Edge-Based Vehicle Detection and Traffic Parameter Extraction. Image and Vision Computing, 22, 899-907.
  8. Liu, Z., Li, X. and Leung, X. (2001) Fuzzy Measures for Vehicle Detection. Proceedings of the 10th IEEE International Conference on Fuzzy Systems, Melbourne, 2-5 December 2001, 848-851.
  9. Jain, I. and Rani, B. (2010) Vehicle Detection Using Image Processing and Fuzzy Logic. International Journal of Computer Science & Communication, 1, 255-257.
  10. Karma, K. and von Brandt, A. (1990) Moving Object Recognition Using an Adaptive Background Memory. In: Capellini, V., Ed., Time-Varying Image Processing and Moving Object Recognition, Elsevier Publishers B.V., Amsterdam, 297-307.
  11. Lipton, A., Fujiyoshi, H. and Patil, R. (1998) Moving Target Classification and Tracking from Real Time Video. Proceedings of the 4th IEEE Workshop on Applications of Computer Vision, Princeton, 19-21 October 1998, 8.
  12. Gupte, S., Masoud, O. and Papanikolopoulos, N.P. (2000) Vision-Based Vehicle Classification. Proceedings of 3rd Annual IEEE Conference on Intelligent Transportation Systems, Dearborn, October 2000, 46-51.
  13. Daigavane, P.M. and Bajaj, P.R. (2010) Real Time Vehicle Detection and Counting Method for Unsupervised Traffic Video on Highways. International Journal of Computer Science and Network Security, 10, 112-117.
  14. Wang, W.H. (2009) Reach on Sobel Operator for Vehicle Recognition. Proceedings of International Joint Conference on Artificial Intelligence (IEEE), California, 25-26 April 2009, 448-451.
  15. Sharpiro, L.G. and stockman, G.C. (2001) Computer Vision. Prentice Hall, Upper Saddle River.
  16. Gonzalez, R.C. and Woods, R.E. (2002) Digital Image Processing. Pearson Education, Upper Saddle River.
  17. Benediktsson, J.A., Pesaresi, M. and Arnason, K. (2003) Classification and Feature Extraction for Remote Sensing Images from Urban Areas Based on Morphological Transformations. IEEE Transactions on Geoscience and Remote Sensing, 41, 1940-1949.
  18. Vincent, L. (1993) Morphological Gray Scale Reconstruction in Image Analysis: Applications and Efficient Algorithms. IEEE Transactions on Image Processing, 2, 176-201.
  19. Soille, P. and Pesaresi, M. (2002) Advances in Mathematical Morphology Applied to Geoscience and Remote Sensing. IEEE Transactions on Geoscience and Remote Sensing, 40, 2042-2055,.
  20. Vincent, L. and Soille, P. (1991) Watersheds in Digital Spaces: An Efficient Algorithm Based on Immersion Simulations. IEEE Transactions on Pattern Analysis and Machine Intelligence, 13, 583-598.
  21. Costa, L. da F. and Cesar Jr., R.M. (2001) Shape Analysis and Classification: Theory and Practice. CRC Press, Boca Raton.
  22. Pesaresi, M. and Benediktsson, J.A. (2001) A New Approach for the Morphological Segmentation of High-Resolution Satellite Imagery. IEEE Transactions on Geoscience and Remote Sensing, 39, 309-320.
  23. Otsu, N. (1979) A Threshold Selection Method from Gray-Level Histograms. IEEE Transactions on Systems, Man and Cybernetics, 9, 62-66.
  25. Brown, L.M., Senior, A.W., Tian, Y.L., Connell, J., Hampapur, A., Shu, C.F., Merkl, H. and Lu, M. (2005) Performance Evaluation of Surveillance Systems under Varying Conditions. IEEE International Workshop on Performance Evaluation of Tracking and Surveillance, Colorado, January.
  26. Zheng, Z.Z., Wang, X.T., Zhou, G.Q. and Jiang, L. (2012) Vehicle Detection Based on Morphology from Highway Aerial Images. 2012 IEEE International Geoscience and Remote Sensing Symposium (IGARSS), Munich, 22-27 July 2012, 5997-6000.
  27. Ekanayake, E.M.C.L., Wijayakulasooriya, J.V. and Alahakoon, P.M.K. (2012) Controlling High-Traffic Intensities: Detection of Vehicular Movement in a Pre-Specified Region of Interest Using Morphological Image Processing. International Journal of Scientific and Research Publications, 2, ISSN2250-3153.