Lua-Filter: Mathematical Gradient (Edge Detection)

Hier können eigene Artweaver Materialien veröffentlicht und gedownloadet werden - Here you can publish custom Artweaver materials and download them.
Beiträge: 15
Registriert: Do Feb 08, 2007 2:07 pm

Lua-Filter: Mathematical Gradient (Edge Detection)

Beitragvon peter » Di Apr 17, 2007 10:36 pm

Hi there,

Here's another filter for you:


Installation as with any other Lua script. This is just a by-product of something else, so I'd love to see the result if anyone actually finds some use for it.

For artists: This is just another kind of edge detection filter. Use it as a starting point for further manipulation to create a hand-drawn look for a photo, or to create some fancy graphics (you might want to try minimum/maximum/median filters to adjust the edge width).

For scientists: The filter calculates the gradient at each pixel based on the luminance of the image. The resulting 2D-vector is then stored in the red and green channels of the image (x in red and y in green). To avoid clipping of negative values, the result is offset by 0.5.

For any non-scientist who wants to know what's the point of it: This filter analyzes how much the image changes from pixel to pixel. Red means the image gets brighter at that pixel in horizontal direction, green means it gets brighter vertically, yellow means it gets brighter in both directions. The complementary colors mean the pixels become darker in the respective direction, and gray means no change at all.

So… no idea if this is useful to anyone out there, but I thought I'd share it anyway, you never know what people come up with :)
It might be possible to use this filter as a starting point for some method to easily neutralize color fringing artifacts in photos taken with cheap lenses, but I have not tried that so far. Or, you could use this as some kind of normal map for bump-mapping effects or something in that diraction. Again, if you find a way to use this filter for something useful or something that looks cool, please post it here.

Install into C:\Program Files\Artweaver\Standard\Lua Scripts. Restart Artweaver, and it appears under Filter > Math > Gradient
(1.94 KiB) 863-mal heruntergeladen

Zurück zu „Artweaver user materials“

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 2 Gäste