3
$\begingroup$

I have generated a Delaunay mesh region from the seeds, shown like following:

enter image description here

This is a zoomed-in crop image, showing the bottom left corner. The black dots are the seeds. The continuous black lines are the Delaunay mesh. The problem is that we can find some boundary effects on the outer seeds(shown in red circles), and I want to generate a Delaunay mesh without them.

I don't mind to delete all the outermost seeds and generate a mesh with seeds left inner, but it still exists. And I tried constrained Delaunay mesh it failed again.

Is there a way to solve this? Thank you!

The seeds are generated from following picture and codes: bw

imgt=Import["bw.JPG"]
k = DistanceTransform[ColorNegate[imgt]] // ImageAdjust;
ReliefPlot[Reverse@ImageData[k]]; (*To illustrate*)
l = ColorNegate[Binarize[ColorNegate[LaplacianGaussianFilter[k, 4] //ImageAdjust]]];

meanValues = ComponentMeasurements[l, {"Centroid"}];
listData = meanValues /. Rule -> List;
listData = Partition[Flatten[listData[[All, 2]]], 2];
imgBounds = Transpose[{{0, 0}, ImageDimensions[imgt]}];

R = DelaunayMesh[listData,imgBounds];
HighlightMesh[R, Style[0, Black]]

listData is the seeds here.

$\endgroup$
2
  • $\begingroup$ Can you show the code you used to create the image. This will help others in giving you a solution $\endgroup$
    – Dunlop
    Commented Mar 14, 2017 at 6:54
  • $\begingroup$ I have revised it, thank you for your suggestion. $\endgroup$
    – Shuoqi Li
    Commented Mar 14, 2017 at 8:57

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.