Guest User

Untitled

a guest
Dec 2nd, 2017
155
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from PIL import Image,  ImageFilter
  2. import sys
  3.  
  4. def low_poly(source, min_dist, factor):
  5.   edges = source.filter(ImageFilter.GaussianBlur(5))
  6.   return edges
  7.  
  8. source = Image.open(sys.argv[1]).convert("RGB")
  9. image = low_poly(source,float(sys.argv[2]),float(sys.argv[3]))
  10. image.show()
  11. if len(sys.argv) > 4:
  12.   image.save(sys.argv[4])
RAW Paste Data