ANUSHA DEVI
ANUSHA DEVI

Reputation: 225

Delaunay triangulation : Matlab

I was trying to write a code using Delaunay triangulation method and I got a plot with some bunch of triangles. But how can I verify whether what I plotted is correct or not? or whether the triangles are from the desired points or not?

 I = bwmorph(I,'skel',Inf);
[i1,j1] = ind2sub(size(I),find(bwmorph(bwmorph(I,'thin',Inf),'branchpoint') == 1));
tri1 = delaunayTriangulation(i1,j1)
figure
triplot(tri1)

This is a part of my code where DT was implemented.

Input enter image description here

DT

enter image description here

Upvotes: 0

Views: 610

Answers (1)

LowPolyCorgi
LowPolyCorgi

Reputation: 5169

To have a visual check you can simply overlay the result of the Delaunay triangulation onto your points with hold on. For instance:

figure
hold on
scatter(i1,j1, 'r');
triplot(tri1)

Best,

Upvotes: 1

Related Questions