MVTools2/MSCDetection
From Avisynth wiki
(Difference between revisions)
m (minor formatting) |
m (cosmetics) |
||
Line 1: | Line 1: | ||
{{FilterCat4|External_filters|Plugin_functions|Other_filters|Scene_change_detection}} | {{FilterCat4|External_filters|Plugin_functions|Other_filters|Scene_change_detection}} | ||
− | + | '''MSCDetection''' creates scene detection mask clip from motion vectors data. The mask is created both on the luma and on chroma planes. Output without scene change is 0.<br> | |
− | ''' | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
<br> | <br> | ||
== [[Script variables|Syntax and Parameters]] == | == [[Script variables|Syntax and Parameters]] == |
Latest revision as of 15:28, 6 January 2016
MSCDetection creates scene detection mask clip from motion vectors data. The mask is created both on the luma and on chroma planes. Output without scene change is 0.
[edit] Syntax and Parameters
- MSCDetection (clip, clip, int "Ysc", int "thSCD1", int "thSCD2", bool "isse")
- clip =
- Input clip.
- clip =
- clip =
- Vector clip from MAnalyse.
- clip =
- int Ysc = 255
- The value taken by the mask on a scene change.
- int Ysc = 255
- int thSCD1 = 400
- Threshold which decides whether a block has changed between the previous frame and the current one. When a block has changed, it means that motion estimation for it isn't relevant. It occurs for example at scene changes. So it is one of the thresholds used to tweak the scene changes detection engine. Raising it will lower the number of blocks detected as changed. It may be useful for noisy or flickered video. The threshold is compared to the SAD (Sum of Absolute Differences, a value which says how bad the motion estimation was) value. For exactly identical blocks we have SAD=0. But real blocks are always different because of objects complex movement (zoom, rotation, deformation), discrete pixels sampling, and noise. Suppose we have two compared 8x8 blocks with every pixel different by 5. It this case SAD will be 8x8x5 = 320 (block will not detected as changed for thSCD1=400). If you use 4x4 blocks, SAD will be 320/4. If you use 16x16 blocks, SAD will be 320*4. Really this parameter is scaled internally in MVTools, and you must always use reduced to block size 8x8 value. Default is 400.
- int thSCD1 = 400
- int thSCD2 = 130
- Threshold which sets how many blocks have to change for the frame to be considered as a scene change. It is ranged from 0 to 255, 0 meaning 0%, 255 meaning 100%. Default is 130 (which means 51%).
- int thSCD2 = 130
[edit] Examples
MSCDetection with default values.
AviSource("blah.avi")
Back to MVTools2 ←