I have an image with gridline like this and I want to measure each monochrome area with unit squares made from that gridline. The squares that mix with different colours shall not be counted. In the image there are 3 colors: yellow, orange and blue. Borders and gridlines does not count. The original images don't have gridlines.
So far I can count the number of black and white pixels in the image but I don't know how to customize the code to suit my needs.