I am working on some robot vision project where I need to do some object recognition by color. I am currently using masks for this purpose. So far so good, but now I need to tweak certain settings and I would like to actually see how these changes affect the end result.
My first thought was, 'Fine, print the mask on screen', so I tried to treat the mask like a surface but it turns out PyGame masks can not be 'blit' to the screen surface:
TypeError: argument 1 must be pygame.Surface, not pygame.mask.Mask
I am currently using PyGame.mask operations and guessing what the mask looks like but I think it would be very useful to display the current mask on screen. I think it might be even better if I could apply the mask to a surface and see what is actually being recognised but a black/white representation of the mask is enough. I read the docs but could not figure out how to proceed.
Also, the mask I am trying to display is generated by pygame.mask.from_threshold
Any clues on how to do this?