Replace upregular shapes by one white pixel

Hi all!
I have some binary photos (only 0 or 255 values) with many unregular shapes like this:


I would like replace all this shapes by one white pixel in a center of shapes.
How is the best way to do that?

welcome.

what have you tried? what do you know?