RgTools/RemoveGrain
From Avisynth wiki
(Difference between revisions)
m (→Syntax and Parameters: typo) |
m (minor formatting) |
||
Line 1: | Line 1: | ||
− | + | {{FilterCat4|External_filters|Plugin_functions|Denoisers|Spatial_denoisers}} | |
− | + | ||
'''Back to [[RgTools#Filters|RgTools]] ←''' | '''Back to [[RgTools#Filters|RgTools]] ←''' | ||
== Description == | == Description == | ||
− | + | Purely spatial denoising function that includes 24 different modes. {{Template:FuncDef|mode}} 13 through 16 are meant for deinterlacing only, they required interlaced content.<br> | |
<br> | <br> | ||
== Requirements == | == Requirements == | ||
− | + | * [[FAQ_different_types_content#How_do_I_recognize_progressive.2C_interlaced.2C_telecined.2C_hybrid_and_blended_content.3F|Progressive]] input only (except for {{Template:FuncDef|mode}} 13 through 16) | |
− | + | * Supported color formats: [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]] | |
<br> | <br> | ||
== [[Script variables|Syntax and Parameters]] == | == [[Script variables|Syntax and Parameters]] == | ||
Line 14: | Line 13: | ||
<br> | <br> | ||
::{{Par2| |clip| }} | ::{{Par2| |clip| }} | ||
− | :::Input clip | + | :::Input clip must be [[planar]] |
<br> | <br> | ||
::{{Par2|mode |int|2}} | ::{{Par2|mode |int|2}} | ||
Line 66: | Line 65: | ||
[[AviSource]]("Blah.avi") | [[AviSource]]("Blah.avi") | ||
RemoveGrain(mode=2, modeU=2, modeV=2, planar=false) | RemoveGrain(mode=2, modeU=2, modeV=2, planar=false) | ||
− | |||
<br> | <br> | ||
<br> | <br> | ||
----------------------------------------------- | ----------------------------------------------- | ||
'''Back to [[RgTools#Filters|RgTools]] ←''' | '''Back to [[RgTools#Filters|RgTools]] ←''' |
Revision as of 10:53, 21 September 2014
Back to RgTools ←
Contents |
Description
Purely spatial denoising function that includes 24 different modes. mode 13 through 16 are meant for deinterlacing only, they required interlaced content.
Requirements
- Progressive input only (except for mode 13 through 16)
- Supported color formats: Y8, YV12, YV16, YV24, YV411
Syntax and Parameters
- RemoveGrain (clip, int "mode", int "modeU", int "modeV", bool "planar")
- clip =
- Input clip must be planar
- clip =
- int mode = 2
- int modeU = mode
- int modeV = modeU
- Independently control the processing mode for each plane.
- Each mode applies a different kind of smoothing to the input clip by combining each pixel with 8 of its neighbours.
- Just like original RemoveGrain, the borders rows and columns (1-pixel thick) are not processed.
- int mode = 2
- -1 : Bypass - input plane is trashed thus faster than mode 1
- 0 : Copy - input plane is left intact
- 1 : Clips the pixel with the minimum and maximum of the 8 neighbour pixels.
- 2 : Clips the pixel with the second minimum and maximum of the 8 neighbour pixels. [Default]
- 3 : Clips the pixel with the third minimum and maximum of the 8 neighbour pixels.
- 4 : Clips the pixel with the fourth minimum and maximum of the 8 neighbour pixels, which is equivalent to a median filter.
- 5 : Line-sensitive clipping giving the minimal change.
- 6 : Line-sensitive clipping, intermediate.
- 7 : Line-sensitive clipping, intermediate.
- 8 : Line-sensitive clipping, intermediate.
- 9 : Line-sensitive clipping on a line where the neighbours pixels are the closest.
- 10 : Replaces the target pixel with the closest neighbour.
- 11 : [1 2 1] horizontal and vertical kernel blur. Similar to Blur(1).
- 12 : Same as mode 11.
- 13 : Bob mode, interpolates top field from the line where the neighbour pixels are the closest.
- 14 : Bob mode, interpolates bottom field from the line where the neighbour pixels are the closest.
- 15 : Bob mode, interpolates top field. Same as 13 but with a more complicated interpolation formula.
- 16 : Bob mode, interpolates bottom field. Same as 14 but with a more complicated interpolation formula.
- 17 : Clips the pixel with the minimum and maximum of respectively the maximum and minimum of each pair of opposite neighbor pixels.
- 18 : Line-sensitive clipping using opposite neighbours whose greatest distance from the current pixel is minimal.
- 19 : Replaces the pixel with the average of its 8 neighbours.
- 20 : Averages the 9 pixels ([1 1 1] horizontal and vertical blur). Similar to Blur(1.58).
- 21 : Clips pixels using the averages of opposite neighbour.
- 22 : Same as mode 21 but simpler and faster.
- 23 : Small edge and halo removal, but reputed useless.
- 24 : Small edge and halo removal, but reputed useless.
- By default if modeU is not set it defaults to the value of mode. If modeV is not set it defaults to the value of modeU
- bool planar = false
- Parameter to keep compatibility with the original plugin; it's use is not recommended.
- This allows to skip any colorspace checks whatsoever, making the filter always assume that planar input is passed.
- bool planar = false
Examples
RemoveGrain with default values:
AviSource("Blah.avi") RemoveGrain(mode=2, modeU=2, modeV=2, planar=false)
Back to RgTools ←