I have an array of pixels which can be black or white (values 0 or 1).
This array represent an image with a very complex polygon border (the white pixels). What I have to do is to fill this polygon with 1 values, so I have to identify which pixels are inside the polygon and change their value from 0 to 1.
I found this example (http://www.alienryderflex.com/polygon/ ) but I dont't know how to recognize the corners of the polygon (which are thousands I guess).
Is there something useful function in Boost libraries?
Or do you have any other idea?
I don't know how to recognise the corners of the polygon
Check the neighbours. You are doing a scanline, if the neighbours of the pixel are both at the same side (or on), then you don't need to change the colour.
[edit] This only apply to the original neighbours, before filling the interior. You could do it with two passes [/edit]