DeDot
m (→Syntax and Parameters) |
m (→How it works:) |
||
Line 60: | Line 60: | ||
Consider 'e' to be the current pixel and a,b,c,d,f,g,h,i to be its spatial neighbors in the current frame: | Consider 'e' to be the current pixel and a,b,c,d,f,g,h,i to be its spatial neighbors in the current frame: | ||
− | :a b c | + | :{| class="wikitable" style="text-align: center; width: 75px; height: 75px;" |
− | + | |- | |
− | + | | a | |
+ | | b | ||
+ | | c | ||
+ | |- | ||
+ | | d | ||
+ | | '''e''' | ||
+ | | f | ||
+ | |- | ||
+ | | g | ||
+ | | h | ||
+ | | i | ||
+ | |} | ||
DeDot first uses the following two tests: | DeDot first uses the following two tests: | ||
Line 72: | Line 83: | ||
For the next tests consider pixel 'c' to be the pixel in the current frame and a,b,d,e to be its temporal neighbors in adjacent frames: | For the next tests consider pixel 'c' to be the pixel in the current frame and a,b,d,e to be its temporal neighbors in adjacent frames: | ||
− | :a b '''c''' d e | + | :{| class="wikitable" style="text-align: center; width: 100px; height: 25px;" |
+ | | a | ||
+ | | b | ||
+ | | '''c''' | ||
+ | | d | ||
+ | | e | ||
+ | |} | ||
:abs(c-a) <= lumaT | :abs(c-a) <= lumaT | ||
Line 84: | Line 101: | ||
Chroma filtering (rainbow removal) works in the following way. First it tests the following conditions... Again assume 'c' is from the current frame and a,b,d,e are the temporal neighbors: | Chroma filtering (rainbow removal) works in the following way. First it tests the following conditions... Again assume 'c' is from the current frame and a,b,d,e are the temporal neighbors: | ||
− | :a b '''c''' d e | + | :{| class="wikitable" style="text-align: center; width: 100px; height: 25px;" |
+ | | a | ||
+ | | b | ||
+ | | '''c''' | ||
+ | | d | ||
+ | | e | ||
+ | |} | ||
:abs(c-a) <= chromaT1 | :abs(c-a) <= chromaT1 | ||
Line 97: | Line 120: | ||
<br> | <br> | ||
<br> | <br> | ||
+ | |||
== Changelog == | == Changelog == | ||
v0.0.01: | v0.0.01: |
Revision as of 20:48, 25 November 2013
Abstract | |
---|---|
Author | thejam79 / minamina |
Version | v0.0.02 |
Download | DeDot |
Category | Rainbow & Dot Crawl Removal |
Requirements | |
License | GPLv2 |
Discussion |
Contents |
Description
- Spatial and temporal dot crawl removal.
Requirements:
Syntax and Parameters
- DeDot(clip, int "luma2d", int "lumaT", int "chromaT1", int "chromaT2")
- luma2d int = 20
- Spatial luma threshold.
- Lower values will detect more pixels as dot crawl, but may cause artifacts.
- Spatial luma threshold.
- luma2d int = 20
- lumaT int = 20
- Temporal luma threshold.
- Higher values will detect more pixels as dot crawl, but may cause artifacts.
- Temporal luma threshold.
- lumaT int = 20
- chromaT1 int = 15
- chromaT1 int = 15
- chromaT2 int = 5
- chromaT2 int = 5
Examples
Reduce dot crawl only:
- Adjust luma2d and lumaT accordingly.
MPEG2Source("DotCrawl.d2v") DeDot(luma2d=20, lumaT=20, chromaT1=0, chromaT2=255)
Reduce rainbows only:
- Adjust chromaT1 and chromaT2 accordingly.
MPEG2Source("Rainbows.d2v") DeDot(luma2d=255, lumaT=0, chromaT1=15, chromaT2=5)
How it works:
Written by tritical
I'll give a quick explanation of how the parameters are used in relation to pixel values (this is all taken simply from reading the source code).
Its operation is quite simple, which is why it is very fast and is able to be written completely in mmx.
For filtering luma (dot crawl) it uses luma2d and lumaT...
Consider 'e' to be the current pixel and a,b,c,d,f,g,h,i to be its spatial neighbors in the current frame:
a b c d e f g h i
DeDot first uses the following two tests:
- abs(b+h-2*e) > luma2d
- abs(d+f-2*e) > luma2d
If either of those conditions is met it goes on and tests the following conditions else it drops out w/o doing any filtering on that luma pixel.
For the next tests consider pixel 'c' to be the pixel in the current frame and a,b,d,e to be its temporal neighbors in adjacent frames:
a b c d e
- abs(c-a) <= lumaT
- abs(c-e) <= lumaT
- abs(b-d) <= lumaT
If all three of those conditions are met it decides that the pixel needs to be filtered and it either averages the current pixel 'c' with 'b' or 'd' based on whichever one is closer to the value of 'c'.
Chroma filtering (rainbow removal) works in the following way. First it tests the following conditions... Again assume 'c' is from the current frame and a,b,d,e are the temporal neighbors:
a b c d e
- abs(c-a) <= chromaT1
- abs(c-e) <= chromaT1
- abs(b-d) <= chromaT1
- abs(c-b) > chromaT2
- abs(c-d) > chromaT2
If all five of those conditions are met then it does filtering on the pixel. For the filtering it either averages the current pixel 'c' with 'b' or 'd' based on whichever one is closer to the value of 'c'.
Hope that helps explain the parameters a little bit better.
Changelog
v0.0.01: - Initial release
Links
- Doom9 Forum - DeDot discussion and English translation by niiyan.
- Doom9 Forum - DeDot discussion and English translation by helix. In the last post, tritical explains how DeDot works.
- Doom9 Forum - DeDot discussion about correct usage, English translation, and some history of DeDot by niiyan.
- Scintilla's Guide - English documentation by Scintilla.