I need a python function that can tell me information about the squares in an image.

Job ID: 32079161

Budget: $10 – $30 USD

I have maps. The maps have squares on them. One is grey, one is red, and one is blue. Sometimes the map will only have red and blue squares, other times it will have only a red and grey square etc. I need to answer the following questions about the maps.

Does the map have red lines that are not on top of black/grey lines? (Yes or no)

Are the sections in question 1 located within the blue square? (Yes or no)

3, How much of the blue square do the areas identified in question 2 occupy? (Percent)

How much of a particulate template map (that I have and can share if needed) is contained in the image? (Percent).

Filename, Q 1, Q2, Percentage 1, Percentage 2
img.png, Y, N, 35%, 40%
img2.png, N, N, 22%, 55%
img3.png, N, Y, 15%, 29%
img4.png, Y, Y, 13%, 66%
....
img10000.png, Y, Y, 31%, 0%


A jupyter notebook with a python function that iterates through a directory (we're looking at a population of over 600,000 images) and answers these questions/accomplish the tasks described.
Related categories: Python OpenCV