Improving Template Matching Algorithm for OpenCV Car detection using OpenCV
I am working on a small personal project where i have to know wether an image shown is a car or not. I am using the basic OpenCV python based template matching.
Positive Image / Template Image
Car Top View  :-

The simple template matching by using one of the positive image on the other is giving the required result.
Negative Image
But when we are using negative images like

the template finder is finding this as a positive match.
Methods tried and failed :-

Increase the threshold for template matching :- Increasing the threshold is causing many of the actual positive images to stop matching

Different types of template matching techniques that are there in OpenCV :- Not giving any better result

Using multiple templates to reinforce positive and negative matches:- Doesn't work well for all the cases


Is there  a better way to remove the template matching false positives that we are getting. Are there any feature matching or edge detection based techniques that can be used instead of template matching to improve my algorithm.
I assume that the image have same scales in terms of sizes.
With that out of the way, I would suggest try using the following:


Break up your image into parts. (the template image as well as the test image. may be 3 or 4 according to your choice.)
Then perform template matching on each part. Consider common threshold for every template part and then count it as positive only when all parts give a positive result. 


(P.S. A similar solution was suggested on some other post. I don't exactly remember which post.)

Update: Partition your template and test images at exactly same points.