Some of the Undergraduate students of my college developed a code for license plate detection but for the following image the car grill is also coming along with the number plate. How to avoid it?
Can you provide details regarding the algorithm your students used for car plate detection? Knowing the basic assumptions made in the algoritm will help in pointing the problem. At this very moment any answer will only be guessing and trying to find the answer for the unspoken question.
I would go for the first option suggested by Ka-Chun Wong.
However, how general should the detection be? Do the images all have a good resolution, are the plates never dirty, only UK cars? If all 'yes', you could locate a rectangle with the color blue of the European Union.
The images are random, some have part of the car. At first the unwanted region is filtered out by checking the low histogram values (little variations among neighbouring pixels). Next segmentation is done based on the probability of containing the license plate. The region with the maximum histogram value is considered as the most probable region containing number plate.
If the images are random and you have parts of cars and the license plates can appear or not you can do the detect all the rectangular regions and train a neural network to recognize letters and numbers. Using this way you can obtain only the rectangular region in which are present the license plates and obtain the plates numbers.
Normally, there are two steps for license plate recognition. First is to detect it (plate localization), then second is the recognition part. In of one my students work, we were trying to detect and recognize white characters with blackbackground (normal plate) and black characters with white background (taxi plate). First, we find valid blobs after thresholding the image (using Niblack's method). Then, we measure the inter and intra properties of this blobs. Inter properties in basically is what Ka-Chu Wong mentioned in his 1st approach. The intra propeties in the distance and angle between blobs as well as their consistency in size. Once this is confirmed, the blob is then passed to the recognition part.
This just a short summary of what we have done in our approach for detecting and recognizing Malaysia car plate, which is quite tough since the plate can come in many different styles.
If you're are interested we can pass you some of our papers that we have published.