Using the following code, I am able to generate a grayscale Voronoi diagram:
numpts = 12;
pts = RandomReal[{0, 1}, {numpts, 2}];
mesh = VoronoiMesh[pts, {{0, 1}, {0, 1}}]
mps = MeshPrimitives[mesh, 2];
vvv = {};
For[i = 1, i <= Length[mps], i++,
col = GrayLevel[ RandomReal[{0, 1}] ] ;
graphicGrain = Graphics[{col, Polygon[mps[[ i ]] [[1]] ]} ];
AppendTo[vvv, graphicGrain];
]
img = Show[vvv, ImageSize -> 1000, "ShrinkWrap" -> True];
img = ImageCrop[img, {950}]
Export["img_q.pdf", img]

As we can see from the image below, some of the grain boundaries seem to have a white edge going through them

Is there any way to generate a Voronoi diagram in such a way that these edges are not present? I have looked at similar posts regarding this 'white edge' problem but have not been successful at removing them myself.


