In the recent years the importance of automatic traffic control has increased due to the traffic jams problem especially in big cities for signal control and efficient traffic management. The input video is processed and analyzed to detect an ambulance vehicle. This article introduces a robust approach for ambulance detection and traffic counting approach using novel fuzzy Bat swarm optimization and different image processing techniques. The fuzzy Bat based optimization algorithm is used to generate a template of ambulance from the abstracted frames obtained from predefined ambulance samples. This is done by using a collection of Gabor filters that have been particularly customized for the ambulance detection problem in which filter selection is achieved to group filters that have similar characteristics. The fitness criterion based on Support Vector Machine (SVM) is used to evaluate the output filters. The proposed approach is composed of the following five fundamental building phases: Fuzzy Bat based optimization, image acquisition, object detection, counting the connected objects, and finally ambulance detection. One of the main advantages of the proposed approach is that key Gabor filters is obtained from the selected features (filters with highest membership values) which have a vital role in the ambulance detection phase. Experimental results show that the overall accuracy confirms that the performance of the proposed approach is high.