Never do anything that is a waste of time and be prepared to wage long tedious wars over this principle - Michael O''Connor
🔒 Locked
Filters
Advertisement
Original Post
Hi,
I''m looking for an explanation of some of the less frequently used image filters, such as the ripple and glass effects and some of the artistic filters (crosshatch, charcoal, etc). I can''t really figure out the kernel on my own so a simple explanation of what it should look like should probably suffice. Can anyone provide a link as Google keeps coming up with tutorials on how to use these filters in your favourite image processing program.
Thanks in advance.
Hmm - obviously this isn''t a very hot topic
Okay then - can anyone suggest some paperback literature on the subject? I will also turn this into a discussion just in case there are people here that can give some insight in the filed.
I''m not 100% sure more complex filters use traditional convolution to do the filtering (for instance the median, although a simple filter, filter takes the average of the surrounding pixels). Taking the Stained Glass effect, though can''t be done neither via convolution nor by some simple non-linear approach (averaging, dividing by a mask etc).
Some examples:

1 - the original image
2 - stained glass
3 - patchwork
4 - glass
The Patchwork effect seems to be using the Mosaic filter as its basis with randomly Embossed patches. The Glass effect, however, seems to be using some other means to distort the image. It might be using a normal map to determine the brightenss of the individual pixels (which means you''d have to know how to create the normal map) plus sum random offset filter with a delta PSF that appearingly randomly displaces the original pixel values.
This is my two cents, but I''m far from sure. If anyone can shed some light on these or any other "advanced" effects (such as the Crystallize, Ink Outlines, Spatter etc effects, it''d be really realyl neat).
I''m not 100% sure more complex filters use traditional convolution to do the filtering (for instance the median, although a simple filter, filter takes the average of the surrounding pixels). Taking the Stained Glass effect, though can''t be done neither via convolution nor by some simple non-linear approach (averaging, dividing by a mask etc).
Some examples:

1 - the original image
2 - stained glass
3 - patchwork
4 - glass
The Patchwork effect seems to be using the Mosaic filter as its basis with randomly Embossed patches. The Glass effect, however, seems to be using some other means to distort the image. It might be using a normal map to determine the brightenss of the individual pixels (which means you''d have to know how to create the normal map) plus sum random offset filter with a delta PSF that appearingly randomly displaces the original pixel values.
This is my two cents, but I''m far from sure. If anyone can shed some light on these or any other "advanced" effects (such as the Crystallize, Ink Outlines, Spatter etc effects, it''d be really realyl neat).
Never do anything that is a waste of time and be prepared to wage long tedious wars over this principle - Michael O''Connor
quote:
Original post by remi
this is what i did during our Image processing class.
All the pix are 8-bit grayscale but the transformations are not well documented(i''ll do it when i get some spare time).
Those are what I call common or simple filters (emboss, sharpen, edge detection etc - basically anything that takes a PSF and convolves it with the original image). I''ve already implemented those with no problems. The case doesn''t seem to be that simple for more advanced (compound ?) filters, though (such as the glass effect). Thanks for sharing your work, though - they don''t teach stuff like that at school here...
Never do anything that is a waste of time and be prepared to wage long tedious wars over this principle - Michael O''Connor
Unfortunately, there is no nice "kernel" type of filter (where you can just take a linear combination of surrounding values) for this kind of problems (like there is for "simple" filters like emboss, soften etc.)
You have to use your imagination. Stained glass, for example, seems quite easy to produce. Ideally, you randomize vertex coordinates around the image plane so that they''re placed seemingly randomly but uniformly and then you triangulate (or pentagonize, as in your example pic) the vertices. This isn''t too easy, though. Fortunately, there is a simple hack: generate vertices on regular intervals, then form pentagons out of them (easy because vertices are regularly placed) and finally jitter the vertex positions (that is, move them a bit, but not so much that they could intersect with other pentagons).
The colour of a single pentagon might be the average of the colour values in the original picture under that pentagon (accompanied with shading).
The patchwork is quite similar. Just form regular quads from the image plane, and randomize wether it''s high or low (possibly a continuous value and possibly with some smoothing/lowpassing as the altitudes in your example don''t seem too random). Then compute the average colour under the quad, use it as the primary colour and emboss the tiles.
Ripple effects are usually done by computing a displacement map, which has the same size as the image plane and each node is a two dimensional vector. Then to find the colour of a pixel in the new image, just add displacement to its position and grab the value from the old image there (with interpolation to guarantee smoothness). Constructing the displacement map is the hardest part here, but I think some subplasma of pretty high (something like 8 pixels in your example image?) freqency for both x and y displacement directions might do. Or possibly something a bit more complex.
There''s no general recipe for this kind of effects. Just tweak and hack bravely, and use your wit (and google in emergencies).
- Mikko Kauppila
You have to use your imagination. Stained glass, for example, seems quite easy to produce. Ideally, you randomize vertex coordinates around the image plane so that they''re placed seemingly randomly but uniformly and then you triangulate (or pentagonize, as in your example pic) the vertices. This isn''t too easy, though. Fortunately, there is a simple hack: generate vertices on regular intervals, then form pentagons out of them (easy because vertices are regularly placed) and finally jitter the vertex positions (that is, move them a bit, but not so much that they could intersect with other pentagons).
The colour of a single pentagon might be the average of the colour values in the original picture under that pentagon (accompanied with shading).
The patchwork is quite similar. Just form regular quads from the image plane, and randomize wether it''s high or low (possibly a continuous value and possibly with some smoothing/lowpassing as the altitudes in your example don''t seem too random). Then compute the average colour under the quad, use it as the primary colour and emboss the tiles.
Ripple effects are usually done by computing a displacement map, which has the same size as the image plane and each node is a two dimensional vector. Then to find the colour of a pixel in the new image, just add displacement to its position and grab the value from the old image there (with interpolation to guarantee smoothness). Constructing the displacement map is the hardest part here, but I think some subplasma of pretty high (something like 8 pixels in your example image?) freqency for both x and y displacement directions might do. Or possibly something a bit more complex.
There''s no general recipe for this kind of effects. Just tweak and hack bravely, and use your wit (and google in emergencies).
- Mikko Kauppila
2. is probably a delauney triangulation on a random but even set of points. Move from delauney to voronoi and calculate either median or average of the points.
3. is much simpler: put down a regular grid, again calc''ing either average or median. To achieve the 3D effect assign each gridcell a height either at random or dpendant on the brightness and darken or lighten the edges.
4. basic bumpmapping with a smoothed noise texture should do the job. Add some highlights at places of high gradient and you get the shinyness of crystal clear water
Those are just my guesses and may be wrong. But especially the delauney/voronoi stuff I''m pretty sure of.
---------------------------
I may be getting older, but I refuse to grow up
3. is much simpler: put down a regular grid, again calc''ing either average or median. To achieve the 3D effect assign each gridcell a height either at random or dpendant on the brightness and darken or lighten the edges.
4. basic bumpmapping with a smoothed noise texture should do the job. Add some highlights at places of high gradient and you get the shinyness of crystal clear water
Those are just my guesses and may be wrong. But especially the delauney/voronoi stuff I''m pretty sure of.
---------------------------
I may be getting older, but I refuse to grow up
Thanks for the replies - I''ve had a look at the suggested solutions, but nothing definitive.
Dreamforger: does the Delauney thing only deal with triangles? So far I''ve only found information about Delaueny triangulation.
Dreamforger: does the Delauney thing only deal with triangles? So far I''ve only found information about Delaueny triangulation.
Never do anything that is a waste of time and be prepared to wage long tedious wars over this principle - Michael O''Connor
Here
Check out the "Toy Filters" link under "Applications." I''m sure its not what you''re looking for, but its cool anyhow
Check out the "Toy Filters" link under "Applications." I''m sure its not what you''re looking for, but its cool anyhow
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement