I am not overly familiar with image processing. I know a little about it from University, but I have not really done any for a while and I have found myself with a problem that requires it.
What I have is frames of a video which may or may not have blocks (usually 16x16) of solid colour (either purple or green) randomly distributed throughout. What I would like to be able to do is pick out each block of colour and count up the pixels in each.
I have looked into things, and I realise I could perform some sort of edge detection which would produce an image with just the edges highlighted, but that seems to only produce the further problem of how to then identify the blocks from their edges.
I am hoping somebody can point me in the right direction for how to solve this problem, because so far my research has been rather fruitless. There doesn't seem to be a whole lot of useful material out there for a beginner such as myself.
I am using C++, though I would prefer to avoid using external libraries if possible. I am prepared to develop my own implementations.