I have a set of images of colored shapes from which I want to count the occurrence of a blue square, of which I have a template image. Currently, my idea is to extract from