A program to find the number of triangles in an image