Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. img=Import["http://i.stack.imgur.com/myVKd.png"]
  2.  
  3. pos = ImageValuePositions[img, 1];
  4. newPos = Nest[Function[pts, Mean@*Rest /@ Nearest[pts, pts, 3]], pos, 50];
  5. ReplaceImageValue[ConstantImage[0, ImageDimensions[img]], newPos -> 1]
  6.  
  7. Graphics[Line /@ Nearest[newPos, newPos, 3]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement