key: cord-0985014-rr6i820n authors: Anandhalli, Mallikarjun; Tanuja, A.; Baligar, Pavana title: Geometric invariant features for the detection and analysis of vehicle date: 2022-04-20 journal: Multimed Tools Appl DOI: 10.1007/s11042-022-12919-8 sha: beed5cbea42cbf7319c49c9b5be02378544375b3 doc_id: 985014 cord_uid: rr6i820n The intelligent traffic management system (ITS) is one of the active research areas. Vehicle detection is a major role in traffic analysis. In the paper, analysis of detecting vehicles is proposed based on the features posed by the vehicle. The foreground pixels from image are extracted by histogram based foreground segmentation. After segmenting, Hu-Moments and Eigen values features are extracted and normalized. The classifiers are trained with the extracted Hu-Moments and Eigen values. The experiments are conducted on different benchmark datasets, and results are analysed considering the overall classification accuracy. Results of the algorithm are satisfactory and acceptable in real time. Traffic congestion is one of the major issues in this era. Due to the pandemic situation of COVID-19 which has hit all around the world has made public to make use of private vehicle over public transportation. According to the recent research in this covid-19 situation, it is evident that automobile companies have grown up at least 5-10% due to rapid rise in the sale of vehicle. It has lead to the traffic congestion. To deal with traffic congestion, vehicle detection [9] , tracking analysis [2] etc are major important task to be considered. Many algorithms have addressed the issues related to vehicle detection and tracking with varying environmental conditions. The following section investigate various research expert in the field of vehicle detection to solve real-time traffic problems by considering car features. Existing algorithms, techniques and merits of detection are discussed. Cao et al. [5] and [4] , have determined HOG features of vehicles and trained SVM classifiers. In order to improve accuracy of the algorithm, authors proposed LPS-Hog features method and trained these features to linear SVM. The algorithm still has a scope of improvement with respect to accuracy of detection. The authors Tuermar et al. [18] segmented the road region to limit search for the Hog features in road region only. Disparity map is used to limit the search for road region only. The limitations of the work is that it needs higher resolution to improve the accuracy. Gupte et al. [7] proposed the system for classification of cars and no-cars. The step involved in system are detection, tracking and classification. vehicle detection is based on the dimensions of the vehicle. Other than the classification of vehicle, the methodology also provides other parameters like velocity and location of vehicle. The algorithm has a scope to improve the classification of vehicle more precisely. Lai et al. [11] proposed a methodology of detecting vehicles by considering vehicle length. The work is reported on virtual loop assignment and to identify the type of vehicle. The categories are classified into 4 types like motor-cycle, fire truck, van and sedan. The analysis of each vehicle type is represented with 1D signature chart. The authors have considered length of vehicle has the only parameter to classify type of vehicle. Yun Wei et al. [19] , proposed a method using two step detection algorithm by combining Haar and Histogram Oriented Gradients. The target region is extracted using strong descriptive ability of hog feature with segmenting the region of interest based on the Haar features with detection accuracy of 97.96%. Hassaballah et al. [8] , proposed a methodology for the detection of vehicle based on local binary pattern (LBP). The LBP is used to extract local structure of vehicle. The histogram generated concurrence with LBP is used to measure the dissimilarity between regions of training images. The histogram fit is generated using the forests clustering. Latent features obtained from clustering discriminative codebooks are used to search different LBP features of the random regions utilizing the Chi-square dissimilarity measure. The map obtained in training phase is used to determine the vehicle location in test images. Achyunda Putra et al. [15] , proposed a methodology where region of interest features is extracted using Histogram Oriented Gradient. KNN classifier is used to classify between car and no car with accuracy of 84%. However authors carried out work and compared with only SVM classifier. Aleena Ajay et al. [1] , proposed a methodology to detect small vehicles from aerial images. In training phase, the features are extracted using singular value decomposition and histogram of oriented gradients and then trained to SVM classifier to classify vehicle and non-vehicular image. In detection phase, the features are extracted from region of interest and detection of vehicles is performed. The comparison is made between SVD and HOG methods. The accuracy with SVD is 63.31% and HOG is 63.23%. Qian Tian et al. [17] proposed a model using Hu features of vehicle and non-vehicle. The adaptive thresholding and edge detection algorithms are carried out prior to the extraction of Hu features. SVM is trained with the features for detection of vehicle. The performance of algorithm which has led to the accuracy of 88%. The authors believe that greater accuracy can be reached with knowing best match between shape descriptor and classifier. The research is carried out in 5 phases 1. Histogram Based Fore-ground Segmentation 2. Pre-processing 3. Feature Extraction 4. Classification 5. Prediction as shown in Fig. 1 . The architecture of the proposed method is illustrated in the Fig. 2. To obtain the region of interest in proposed system maximum intensity values from histogram are nullified to showcase only region of interest. The images from dataset are split into 3 different channels i.e. R, G and B channel and there histograms are drawn respectively to obtained foreground from image. The mathematical expression to define foreground pixel based on histogram is given by (1) where P x (n) is the probability of pixel n, total number of occurrences of pixel n is denoted by f(n), f max is the maximum occurrence of pixel calculated from the histogram. After the successful trials of histogram based foreground segmentation on different images, have found that the foreground pixels are segmented without much loss of The images are categorized into two groups based on presence and absence of vehicle. If vehicle is present then it is considered as positive image else they are considered to be negative image. All the images are converted to binary images for faster computation rate and then contours are extracted for canny edge detection. After pre-processing stage, all images are imposed on 8 x 8 matrix and from each cell features are extracted using Hu and Eigen values. It has been the major implementation technique in the sector of image processing and pattern recognition. With the aid of algebraic invariants theory, the features of object do not change on following operations:--Translation (position change) -Rotation (orientation change) -Scaling (size change) -Reflection Using central moments better results of object matching can be achieved due to the fact that they are invariant to translation. Hu moment are calculated which are invariant to reflection, position, size and orientation changes . The central moments M ji are calculated as: (a',b') being center of the mass, calculated as: Hu invariants can be derived accordingly, H 6 = (P 20 − P 02 ) (P 30 + P 12 ) 2 − (P 21 + P 03 ) 2 + 4P 11 (P 30 + P 12 ) (P 21 + P 03 ) (10) The contour image is super imposed with the 8 x 8 matrix as shown in Fig. 3 . Hu moments are calculated on cell of the grid for both vehicle and non-vehicle region which generates seven Hu-moments values and these values are added to get one single value for each cell of 8 x 8 matrix using (12) . The single Hu -Moment is caluclated from each cell and represented in matrix format for both vehicle and non-vehicle images as shown in Tables 1 and 2. Eigen values and Eigen vectors mandatorily implemented on square matrices. Eigen values may accept value Zero, but Eigen vectors are always non-zero. let, the image with matrix E be of size (m ×m). If 'v' and 'u' are scalar multiples of eigenvalue matrix E, then eigen vector of the linear transformation of E is labelled as v and φ is scalar factor of eigenvalue corresponding to that eigenvector. Ev = u = φv (13) Equation (13) can be written as given in (14). In (14), if the determinant of the matrix (E -φI) is zero then we get non-zero solutions. Where I (m×m) is an identity matrix. Therefore, the eigenvalues of E will have values of φ that satisfy (15) . |E − φI | = 0 (15) Equation (15) is known as secular or characteristic equation of E. The basic algebraic theorem tells that the polynomial characteristic of an 'E' (m x m) matrix with 'm' the degree of polynomial results in (16) when multiplied with 'm' linear terms. The Eigen values are calculated for each cell of 8 x 8 matrix. These values are normalized to eliminate the complex values and to get single value for image. The result of Eigen values of an image is shown in Table 3 . Hu-Moments represent suitable shape features that are invariant to scaling, translation and rotation. Eigen values are compact form of image features and represent principal components of an image matrix. The uniqueness of these shape descriptors motivated to experiment on detection of vehicles. Hu and Eigen features are extracted from the image to classify vehicle and non-vehicle images using supervised learning algorithm. The train-test split technique is considered to split the dataset which help in evaluating the performance of classifiers. The train-test split is made in ratio of 80-20. Support Vector Machine is supervised machine learning algorithm widely used in face detection, image classification, handwriting recognization with highest accuracy compared to traditional query based refinement. The aim of SVM algorithm is to determine a hyperplane which classifies the sample data into space of dimension N, where N indicates the feature number. A hyperplane is drawn to separate two sets of data points. Our main aim is to determine the plane with maximum distance between the points of two sets i.e. the maximum margin. Hyperplanes act as decision boundaries which help to classify the sample data points. Unoptimized decision boundary with new data may lead to greater misclassification. The dimension of hyperplane depends upon feature number. As the feature number increase, dimension of the hyperplane also increase. Support vectors are sample data points which are closer to hyperplane and controls the orientation of hyperplane. The data points helps to build the SVM model. KNN is used mainly in the field of data mining. The new object is classified based on the similarity of nearest objects. The nearest object is grouped with most common class which is identified by using Euclidean distance function as measurement. The best results can be met with larger sample size and the algorithm can be considered for regression based applications. Logistic regression is supervised learning and is mainly applied for biform classification. The logistic regression have four methods to assess the relationship between one or more predictor variables and a response variable. • Binary logistic regression -Number of categories are 2 and characteristics are at 2 levels. It is used when the dependent variable is divided into two branches and is nonparametric and also error term is not differing with respect to independent variable. Ex. Pass or Fail, Yes or No, High or Low. It is also called as Extreme Gradient Boosting. The classifier is widely used because of its scalability, performance is outstanding compared with other algorithms and also computational complexity is less. Gradient boosting classifier uses the decision tree to create a strong prediction model. The algorithm combines the weak learning models to build a strong model. In XBoost classifier algorithm, many models are trained sequentially. Each model reduces the loss function of whole system using Gradient Descent method. To provide a accurate estimation of the response, learn procedure fits the new model consecutively. The main idea behind the XBoost algorithm is to build a base learners which can correlate with negative gradient of loss function. With aforementioned unique features of classifiers, all four classifiers are included in proposed system to define the performance of vehicle detection. During this phase, histogram based foreground segmentation is performed on images which were not the part of training phase. Pre-processing step is performed taking the images from segmentation and shape features are extracted using Hu and Eigen values. The classification algorithms are performed to classify between car and no-car based on the feature extracted. Experiments are conducted on the i3 processor with 8GB RAM and implemented using python which includes libraries like opencv, PIL, sklearn etc. The algorithm is trained with datasets, some of the images in datasets is as shown in the Fig. 4 . The images are segmented using histogram and performed pre-processing steps as aforementioned. The images obtained from pre-processed step are used to extract the features using Hu and Eigen value and passed to different classifiers to check the classification performance using shape descriptors. In the testing phase, images which were not included in training phase are considered to evaluate the performance of an algorithm in detecting vehicular and non-vehicular image effectively. Precision, Recall and F1-score are the metrics to measure performance of all classifiers and determine the best model. Classification report is generated on each classifier to know the precision, recall and f1-score for comparison. Precision is the ratio of accurately predicted positive images by sum of false positive images and true positive images. If the precision value is high then, it is a sign of low false positive rate, which indicates the model is performing pretty well. Recall is the ratio of accurately predicted positive images with the actual positive images which is obtained by sum of true positive and false negative. It tells that how many are positive image when labelled it has positive. If the measure is 0.5 then it is said as good model. F1-score is necessary when we have uneven distribution of positive and negative classes. It is a better metrics, if we need balance between Recall and Precision. The score above 0.5 is an indication of good model. Table 4 will give us the comparative analysis of predicting the vehicles based on features extracted from the Hu-Moments and classified by different algorithms. Experimental results show the precision rate is ranging from 84 to 88%, F1-score is in range of 0.89-0.92 which is above the 0.5 and recall value is in range of 0.92 -0.96. The recall and f1-score are above 0.5, which is an indication of good model. The Table 5 shows precision of different classifiers, where the features are extracted using Eigen values. The experimental results show that Eigen features are giving good results with range of 80-97%. We can observe that Gradient Booster is giving good results compared with other classifiers on Eigen value and Hu-moments. Receiver Characteristic Curve (ROC) is important metric used to visualize the performance of classification model making use of predicted probability. ROC curve is plotted with true positive rate (TPR) on y-axis and false positive rate (FPR) on x-axis. The ROC is a metric used to evaluate classification of binary problems. TPR give us the proportion of positive classes that are predicted correctly FPR gives us the proportion of positive classes that are predicted incorrectly Random classifier of ROC is always baseline to measure the performance of classifiers, above the baseline is considered as the good performance and below the baseline is considered as bad performance. Area under curve (AUC) in ROC gives the degree of separability of the classes by classifiers. Higher the degree of the area under curve, better the prediction of classes. The AUC is given by y=g(x) and with two points as x=c and x=d, then The Figs. 5 and 6 shows area under curve for all the four classifiers on Hu-Moments and Eigen values feature, which determines the performance of the proposed system. The results of area under curve is above 0.5 which as expected value. The Table 6 shows implementation results with accuracy based on Hu-Moments and Eigen values. Eigen values based prediction of test samples with 80 to 97%. With Table 6 The Table 7 gives the observations on proposed system and other methodologies as stated in literature survey. This paper uses Hu-Moments and Eigen value based feature extraction to predict vehicle or non-vehicle images using different classifiers. The datasets is of 10000 The proposed method is tested on the benchmark datasets such as GTI [3] , CaltechGraz and Stanford [20] to evaluate the performance. The detailed study is as shown in the Table 8 . ROC curve of hu and eigen value based detection on different classifer using GTI dataset is plotted as shown in Figs. 7 and 8. Figures 9 and 10 gives detection accuracy on CaltechGraz dataset. Figures 11 and 12 shows the performance of proposed method on Stanford dataset. One can see from the figures, the proposed method gave satisfactory results with Eigen value shape descriptor classified using Xboost. The proposed system focused on the comparative analysis of vehicle detection using the Hu-Moments and Eigen value based feature extraction with different classifiers. The performance results of Eigen values with Gradient Booster classifier has 97% of accuracy which is satisfactory. However, better accuracy can be achieved with larger dataset and enhancement can be done for detecting the vehicle in video. Vehicle detection in aerial imagery using eigen features A novel approach in real-time vehicle detection and tracking using Raspberry Pi Video analysis based vehicle detection and tracking using an MCMC sampling framework Vehicle detection and motion analysis in low-altitude airborne video under urban environment Linear SVM classification using boosting HOG features for vehicle detection in low-altitude airborne videos Vehicle-logo Recognition Method Based on Tchebichef Moment Invariants and SVM Detection and classification of vehicles Local binary pattern-based on-road vehicle detection in urban traffic scene Vehicle detection and tracking in adverse weather using a deep learning framework Visual pattern recognition by moment invariants Vehicle-type identification through automated virtual loop assignment and block-based direction-biased motion estimation Geometrically invariant image watermarking using Polar Harmonic Transforms High capacity watermark embedding based on invariant regions of visual saliency Rotation invariant watermark embedding based on scale-adapted characteristic regions Wayan Firdaus M (2020) HOG feature extraction and KNN classification for detecting vehicle in the highway Face recognition using neural network and eigen values with distinct block processing A new method for vehicle detection using Mexican-Hat wavelet and moment invariants Airborne vehicle detection in dense urban areas using HoG features and disparity maps Multi-vehicle detection algorithm through combining Harr and HOG features