DeSpot

From Avisynth wiki
Revision as of 18:04, 1 June 2020 by Reel.Deal (Talk | contribs)

Jump to: navigation, search
Abstract
Author Fizick
Version 3.6.1.0
Download despot3610.zip
Category Film Restoration
License GPLv2
Discussion Doom9 Forum


Contents

Description

This filter is designed to remove temporal noise in the form of dots (spots) and streaks found in some videos. The filter is also useful for restoration (cleaning) of old telecined 8mm (and other) films from spots (from dust) and some stripes (scratches).


Requirements


Syntax and Parameters

DeSpot (clip, int "mthres", int "mwidth", int "mheight", int "merode", bool "interlaced", bool "median", int "p1", int "p2", int "pwidth", int "pheight", bool "ranked", int "sign", int "maxpts", int "p1percent", int "dilate", bool "fitluma", int "blur", int "tsmooth", int "show", int "mark_v", bool "show_chroma", bool "motpn", int "seg", bool "color", int "mscene", int "minpts", clip "extmask", bool "planar")


clip   =
Input clip.


int  mthres = 16
A pixel needs to be different from the another frame by at least 'MTHRES' in order to be considered moving. This number should be larger than 'P2' in order to prevent noise from being identified as motion.


int  mwidth = 7
int  mheight = 5
These define the width and height of block for motion map denoising algorithm (erode and dilate stages).


int  merode = 33
These define a threshold value of percent of motion pixels in the block at erode stage.


bool  interlaced = false
Whether to treat the video as interlaced or not (progressive). The default is false (progressive) for DeSpot since version 1.3. (In older versions, the Field based video was processed as interlaced by default - it was a bug).


bool  median =
True or false.


int  p1 = 24
int  p2 = 12
A pixel needs to be at different from its neighbors by at least 'P1' in order for it to be considered noise. The surrounding pixels must be different by at lease 'P2' in order for the pixel to be considered part of the same spot.


int  pwidth = 6
int  pheight = 5
A spot can be no larger than pwidth x pheight.


bool  ranked = true
Enables ranked ordered difference spot detector with 6 points instead of 2.


int  sign = 0
Set mode for removing of only black or white spots or both:
  • sign = 0 - any spots and outliers (default)
  • sign = 1 - only black (dark) spots and outliers
  • sign = -1 - only white (light) spots and outliers
  • sign = 2 - only black (dark) spots, any outliers
  • sign = -2 - only white (light) spots, any outliers


int  maxpts = 0
Set upper limit of points (pixels) per every spot.
Range: from 0 to 10000000, default=0 - no limit


int  p1percent = 10
Set lower limit of relative fracture of high-contrasted (by criterion P1) pixels per spot (in percent).
Range: from 0 to 100


int  dilate = 1
Set range of morphological dilate (growing) of removed spots (in pixel units).
Range: from 0 to 255


bool  fitluma = true
Enables some frame luminosity correction in places of deleted spots.


int  blur = 1
Value (length) of local spatial blur near borders of deleted spots
Range: from 0 to 4, default 1


int  tsmooth = 0
Control temporal smoothing in static areas (except spots and motion).
Set approximate threshold of pixel luma variance in 3 frames,
The more variance exceed this threshold, the less temporal smoothing.
0 - no temporal smoothing.
Range: from 0 to 127


int  show = 0
To instead spots removing, show a motion map and noise that would of been eliminated, use parameter:
  • 0 - not show,
  • 1 - to highlight the noise instead of removing it
  • 2 - show a motion map and noise


int  mark_v = 255
Where mark_v is the luma value to highlight the noise with.
The color (pink, green or grey) of noise spot now is depend from parity of mark_v.
Motion map is also shown.
Range: from 0 to 255


bool  show_chroma = false
Use to show clip color data on motion map.


int  motpn = true
Define motion detecting method.
  • false - detect motion from previous to current and from current to next frame (old method used in all versions before 3.0)
  • true - detect motion from previous to next frame (new method since version 3.0)


int  seg = 2
Control spots segments removing method.
  • 0 - remove only spots pixels which has no overlap with motion zones (old method used in all versions before 3.0, most strong removing);
  • 1 - remove only spots line segments which has no any overlap with motion zones;
  • 2 - remove only whole spots which has no any overlap with motion zones (most safe).


bool  color = false
Control color correction at place of removed spots .
  • true - change color of pixels at places of removed spots to mean value previous, current and next frames,
  • false - not change color of pixels at places of detected spots.


int  mscene = 40
Set percent of pixels in motion for scenechange detection and disabling of frame spot removal.
Range: from 0 to 100


int  minpts = 0
Set lower limit of points (pixels) per every spot.
Range: from 0 to 10000000, default=0 - no limit


clip  extmask = none
Optional external mask clip. It will be binarized with threshold 127 and logically added (by "OR" operation) to internal motion mask. It can be used for additional protection of good objects (if you have some reliable mask).


bool  planar = False
Old hack, do not use. Read included docs if you are curious.


Examples

DeSpotwith default settings:

AviSource("Blah.avi")
DeSpot()


Archived Downloads

Version Download Mirror
v3.6.1.0 despot3610.zip despot3610.zip


External Links




Back to External Filters


Personal tools