Detecting vertice/mesh from a edged picture

I’m trying to get the coordinate of vertice from a picture, which is passing through the edge texture filter, using contour.

This is CPU consuming and result is not great.

Is there a better way to get vertices or mesh from a picture which is like the attachment?