I want to read a map from googlemaps or similar application. Then I want to extract different type of vehicles from the map. This is to be done using python if possible otherwise matlab. Kindly explain.
Scikit image is your best bet for image anlysis in python:
http://scikit-image.org/
If you save the images to your desktop, the code to read them in would be:
from skimage.io import imread
image = imread('path/to/image')
To identify vehicles is the real problem. That's an image processing problem, regardless of if you use python, matlab, imagej etc... You need to find the features that distinguish vehicles from the rest of your image. Could be color, could be shape, could be any number of these. That's the real trick, and there might be some image processing tools/algorithms specifically designed for vehicle identification in pictures. Probably mostly proprietary. May even be worth asking google how they do it?
I know that it is really hard to extract vehicle images from google maps. I don't know if it helps but this is a good discussion about how hard it is to recognize crosswalk (only one color and a specific shape) on aerial images.
Google maps API allows you to query a route from point A to point B and you can specify the type of a vehicle. It allows you to find a place on the closest road from point A, just ask the API to find a route from A to A. You can retrieve the image but there is no image analysis. I do complex actions just by a simple JavaScript, the code has not been released yet because I do not have time to write installation instructions but you can see the demo here: icebearsoft.euweb.cz/garicam/
I would recommend to utilize the python bindings of popular OpenCV framework which is widely used by computer vision community for image analysis. You can look at the examples related to the object detection. There are three basic approaches (a) template matching, (b) shape similarity using contour extraction, and (c) detection based on extracted features.
OpenCV contains also machine learning module. You can use it to train a recognizer of cars. Note that it is necessary to create a training database which contains images of the vehicles you want to recognize. You can look at Haar cascade. There is a tool that can be used to train the classifiers.