Skip to content

Instantly share code, notes, and snippets.

@Spaxe
Forked from interealtime/gist:b97ced10eb7c74c0a66f
Last active August 29, 2015 14:05
Show Gist options
  • Save Spaxe/d2f7002e57b2cb683562 to your computer and use it in GitHub Desktop.
Save Spaxe/d2f7002e57b2cb683562 to your computer and use it in GitHub Desktop.
Take original image A, blur it to get image B. Then:
(A-B) * effectStrength + A
gives you output with lots more apparent detail.
It boosts contrast against surrounding pixels. A blur kernel with 1 pixel radius is equivalent to standard pixel sharpening, bigger blurs give a better effect but produce haloes around objects. You need a smarter blur that preserves edges to remove them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment