y5gfunc.filter.mask¶
mask
¶
Functions:
| Name | Description |
|---|---|
DBMask |
Lolihouse's deband mask |
AnimeMask |
Generates edge/ringing mask for anime based on gradient operator. |
GammaMask |
|
get_oped_mask |
|
kirsch |
|
prewitt |
|
retinex_edgemask |
|
generate_detail_mask |
|
comb_mask |
Comb mask from TIVTC/TFM plugin. |
DBMask
¶
Lolihouse's deband mask
Source code in y5gfunc/filter/mask.py
AnimeMask
¶
Generates edge/ringing mask for anime based on gradient operator.
For Anime's ringing mask, it's recommended to set "shift" between 0.5 and 1.0.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
VideoNode
|
Source clip. Only the First plane will be processed. |
required |
|
float
|
(float, -1.5 ~ 1.5) The distance of translation. Default is 0. |
0
|
|
int
|
(-1 or 1) Type of the kernel, which simply inverts the pixel values and "shift". Typically, -1 is for edge, 1 is for ringing. Default is 1. |
1
|
Returns:
| Type | Description |
|---|---|
VideoNode
|
Generated mask. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If mode(-1 or 1) is invalid. |
Source code in y5gfunc/filter/mask.py
GammaMask
¶
GammaMask(clip: VideoNode, gamma: float = 0.7) -> VideoNode
Source code in y5gfunc/filter/mask.py
get_oped_mask
¶
get_oped_mask(clip: VideoNode, ncop: VideoNode, nced: VideoNode, op_start: int, ed_start: int, threshold: int = 7) -> tuple[VideoNode, VideoNode]
Source code in y5gfunc/filter/mask.py
kirsch
¶
Source code in y5gfunc/filter/mask.py
prewitt
¶
Source code in y5gfunc/filter/mask.py
retinex_edgemask
¶
Source code in y5gfunc/filter/mask.py
generate_detail_mask
¶
generate_detail_mask(source: VideoNode, upscaled: VideoNode, threshold: float = 0.05) -> VideoNode
Source code in y5gfunc/filter/mask.py
comb_mask
¶
comb_mask(clip: VideoNode, cthresh: int = 6, mthresh: int = 9, expand: bool = True, metric: int = 0, planes: Optional[Union[int, list[int]]] = None) -> VideoNode
Comb mask from TIVTC/TFM plugin.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
VideoNode
|
Input clip. |
required |
|
int
|
Spatial combing threshold. |
6
|
|
int
|
Motion adaptive threshold. |
9
|
|
bool
|
Assume left and right pixels of combed pixel as combed too. |
True
|
|
int
|
Sets which spatial combing metric is used to detect combed pixels. - Metric 0 is what TFM used previous to v0.9.12.0. - Metric 1 is from Donald Graft's decomb.dll. |
0
|
|
Optional[Union[int, list[int]]]
|
Planes to process. |
None
|