Subdiv2D subtract holes (black pixels) from mesh

Is there any sample? I have saw some in python but those require some libraries other than openCV. I’m with C# and trying to make this with openCV.