Log in

View Full Version : Slightly blurring frame borders


LigH
3rd April 2007, 12:14
Is there already an AviSynth plugin to apply a slight blur to the borders of frames, but not to the center (to "optimize" the compressibility of less important areas)?

I found BorderControl doing a similar job, but not really the expected one.

Wilbert
3rd April 2007, 21:13
Is there already an AviSynth plugin to apply a slight blur to the borders of frames, but not to the center(to "optimize" the compressibility of less important areas)?
Did you try to create a rectangular/circular mask for this?

LigH
4th April 2007, 07:27
And then?

I don't think it is possible to apply a filter via a mask. It is probably only possible to apply a filter to a whole frame, and blend a copy of the original over the filtered image using a mask. And that means two calculation cycles (filter and overlay).

A gaussian blur with ellipsoid-distance based radius might be the mathematically exact solution, but would probably be too much effort. A simple averaging kernel blur (with the center factor and divisor based on the distance from the center) should be suitable.

http://www.ligh.de/pics/ElliBlur.png

Soulhunter
4th April 2007, 16:56
I did the opposite with pics of a digicam that produced blurring towards the edges...

Masked=Mask(Sharpened, Gradient)
Layer(Original, Masked)

Bye

Wilbert
4th April 2007, 21:55
I don't think it is possible to apply a filter via a mask. It is probably only possible to apply a filter to a whole frame, and blend a copy of the original over the filtered image using a mask. And that means two calculation cycles (filter and overlay).
Yep, that's what i meant.

LigH
5th April 2007, 07:09
It should not be too hard to code such a filter with a distance-dependent kernel - provided someone has experience in making an AviSynth filter. If we (in the german doom9/Gleitz board) have any success, we will tell you.

Speed is a preference in this case (HDTV encoding).