Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- img=Import["http://i.stack.imgur.com/myVKd.png"]
- pos = ImageValuePositions[img, 1];
- newPos = Nest[Function[pts, Mean@*Rest /@ Nearest[pts, pts, 3]], pos, 50];
- ReplaceImageValue[ConstantImage[0, ImageDimensions[img]], newPos -> 1]
- Graphics[Line /@ Nearest[newPos, newPos, 3]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement