NoMoSmooth Filter for Avisynth [Readme]
NoMoSmooth - An Avisynth filter for motion-adaptive spatio-temporal smoothing
By Ross Thomas <ross@grinfinity.com> When it comes to smoothers (as opposed to smoothies) there are two main varieties: temporal smoothers and spatial smoothers. Temporal smoothers work by looking at frames surrounding the current one and averaging corresponding pixels together if they're deemed similar enough (and thus likely to be noise). Spatial smoothers work in a similar way, except they look at nearby pixels within the same frame. A few filters are a hybrid of the two, including this one and the excellent Convolution3D. Each approach has its advantages and disadvantages. The great thing about temporal smoothers is that they do a fantastic job getting rid of noise when you set them up just right, but they can also generate some very ugly artifacts, particularly when dealing with motion. Spatial smoothers, on the other hand, can be quite destructive to the details in your image, but are great with high-motion areas because those have few details and are moving too quickly to notice artifacts anyway. Ideally, then, one would like to apply a temporal smoother to relatively static areas and a spatial smoother to moving ones. That's what this filter tries to do, and the aim is for a higher quality result (i.e. less noticible smoothing) than Convolution3D but with correspondingly less of an impact on compressibility. In addition to this motion-based approach, NoMoSmooth employs another technique to try to retain as much existing detail as possible: only pixels that are "fluctuating" are smoothed. In other words, given three frames in a row with the current one in the centre, the pixel being examined will only be considered for either type of smoothing if it is either greater than both the corresponding pixels in the previous and next frames, or less than both. This could be considered a very simplistic "noise detector" and seems to help reduce temporal smoothing on important details such as those in skin tones. Usage Code:
NoMoSmooth([clip], int motion_threshold, int temporal_radius, int temporal_threshold, int spatial_radius, int spatial_threshold, bool show)
Known Issues - Pixels within spatial_radius of the edges get passed through. - Frames within temporal_radius of the ends of the clip get passed through. - While the algorithm is fairly well optimized it's still fairly slow, but very brief tests indicate it might be slightly faster than Convolution3D in preset="movieHQ" mode. To-Do - Optimize both algorithmically and by implementing assembly code versions of critical parts of the algorithm. - Improve motion detector such that it is more sensitive to motion in low-contrast areas. History
Download here: http://www.digitalfaq.com/archives/a...h-filters.html |
Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.