How to compare objects in a image with objects in another image and give the results?

I have around 100 different images of pens. My requirement is to compare multiple images of pens with one master or one another and need to give the result which all pen’s images are matching with the original one.

How to do it with OpenCV?
All the images are with different background, image size and dimensions.

what approaches have you considered?

First I have define Min Match Count = 9 then
if len(good)>MIN_MATCH_COUNT:
matchesMask = mask.ravel().tolist()

I am trying to take all the background as plane but in few scenarios it is not possible to keep plane background for the object.
My another issue is sometime same pens are showing as not matching and in that case I need to change the Min Match Count which is not possible as it should not be dynamic value to change everytime.

what are you doing, exactly ?

please explain how you try to use flann matching for this