Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the best way to "smudge" an image programmatically?

I'm messing around with image manipulation, mostly using Python. I'm not too worried about performance right now, as I'm just doing this for fun. Thus far, I can load bitmaps, merge them (according to some function), and do some REALLY crude analysis (find the brightest/darkest points, that kind of thing).

I'd like to be able to take an image, generate a set of control points (which I can more or less do now), and then smudge the image, starting at a control point and moving in a particular direction. What I'm not sure of is the process of smudging itself. What's a good algorithm for this?

like image 627
Lee Crabtree Avatar asked Oct 13 '25 05:10

Lee Crabtree


2 Answers

This question is pretty old but I've recently gotten interested in this very subject so maybe this might be helpful to someone. I implemented a 'smudge' brush using Imagick for PHP which is roughly based on the smudging technique described in this paper. If you want to inspect the code feel free to have a look at the project: Magickpaint

like image 112
fanfare Avatar answered Oct 16 '25 05:10

fanfare


Try PythonMagick (ImageMagick library bindings for Python). If you can't find it on your distribution's repositories, get it here: http://www.imagemagick.org/download/python/

It has more effect functions than you can shake a stick at.

like image 22
JCCyC Avatar answered Oct 16 '25 07:10

JCCyC