View Single Post
Old 2nd January 2008, 20:11   #4  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,391
I'd think of a filter like basically this:

SmartBlur( radius, sensitivity )

1. Calculate the span [max-min] in the window of [radius] around [current pixel]

2. Apply blurring. To blur the current pixel, take into account only pixels that differ from [current pixel] by no more than [max-min]*[sensitivity]

In plain english: Blur each pixel by averaging it with those pixels which difference to the current pixel is not more than, say, 20% of the local min/max gradient.

Possible extensions:
- kind of blurring / radius2 for blurring window
- split sensitivity into sens_low & sens_high to avoid harsh boundaries between "filtered" and "not filtered"

That's kind of a "full-fledged version" of what HQDering is doing (or trying to do).
Strictly speaking, this kind of filtering can not be "scripted". It has to be implemented in a plugin. With scripted implementations, only overly slow and very rough piecewise approximations are possible.
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote