Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
21st August 2012, 11:23 | #1 | Link |
Registered User
Join Date: Sep 2011
Posts: 241
|
Can't get RemoveSpots to work with Avisynth
When trying to encode a video I get an error message in Simple X264 Launcher saying "there is no function named "Clense" (RemoveSpots.avsi, line 6). I'm using Windows 7 64-bit with Avisynth 32-bit. I'm using Avisynth MT as well. The Avisynth MT file is in C:\Windows\SysWOW64. I notice that Simple x264 Launcher is in 64-bit mode even though I'm using the 32-bit version of Avisynth. I can't imagine that's the problem as I can encode a video fine when not using RemoveSpots.
The strange thing is I'm using the exact same plugins (copied and pasted them to my new PC) as I was on my 32-bit Vista PC and RemoveSpots worked fine there without errors. I've tried RemoveGrain 1.0b Beta, 1.0 PreRelease and RemoveGrainT-1.0 and they all give the same error (I copied each SSE2 file from each of them (deleting the previous files before I did that). On this page it says if you get the clense error then install RemoveGrainT-1.0. I did that and got the same error. Last edited by VideoFanatic; 21st August 2012 at 11:28. |
21st August 2012, 13:12 | #2 | Link | |
Registered User
Join Date: Nov 2011
Posts: 63
|
Jagabo, on the other forum, already gave you the right advice, see also this old post here:
Quote:
|
|
21st August 2012, 13:24 | #3 | Link |
Registered User
Join Date: Sep 2011
Posts: 241
|
I already said on the other forum that I already installed the v1.0 beta and that I downloaded it again and it still gives the same error. I copied the following files into my plugins folder and made sure to remove any old versions first:
DenoiseSharpen.dll RemoveGrainSSE2.dll RepairSSE2.dll RSharpenSSE2.dll I don't know what you're trying to say with your quoted text. Last edited by VideoFanatic; 21st August 2012 at 13:36. |
21st August 2012, 13:34 | #4 | Link |
Registered User
Join Date: Nov 2011
Posts: 63
|
I tried to point out this is an old trouble and may be you can find other clues in the quoted threads (may be a dependency on an old Visual Studio library?).
I have also verified my installed dll version and tested that function removespot: it is working with rg 1 beta. |
21st August 2012, 14:10 | #6 | Link | |
Registered User
Join Date: Nov 2011
Posts: 63
|
Quote:
I'll check and let you know. |
|
21st August 2012, 14:38 | #7 | Link |
Registered User
Join Date: Nov 2011
Posts: 63
|
Found with dependency walker (hint from another very old thread ):the required library is MSVCR71.DLL- It must be in Windows\system32 (or SYWOW64 on 64bit OS).
EDIT: I see you have solved. Well this post may help someone other in future. Last edited by librarian; 21st August 2012 at 14:43. |
5th September 2012, 11:04 | #9 | Link |
Warm and fuzzy
Join Date: Apr 2010
Location: Moscow, Russia
Posts: 201
|
Various RemoveSpots functions...
. Code:
# # # File: RemoveSpots.avsi # # RemoveSpots and moution compensated RemoveSpots functions # # Functions: # # function NullClip(clip clp) # # function RemoveSpots(clip clp, int "limit", bool "_grey") # function RemoveSpotsMC(clip clp, int "limit", bool "_grey", int "Vectors") # # function RemoveSpotsMC2(clip clp, int "type", bool "show", int "Vectors") # # function RemoveSpotsMC3(clip clp, int "Vectors", int "Show") # # function RemoveSpotsMC4(clip clp, int "Vectors", int "Show") # # function RemoveSpotsMC5(clip clp, int "Vectors", int "Show") # # LoadPlugin("C:\PROGRAM FILES\AVISYNTH 2.5\PLUGINS\REMOVEDIRT_20050507\removedirt.dll") LoadPlugin("C:\PROGRAM FILES\AVISYNTH 2.5\PLUGINS\REMOVEDIRT_20050507\removedirts.dll") LoadPlugin("C:\PROGRAM FILES\AVISYNTH 2.5\PLUGINS\REMOVEGRAIN-1_0\repair.dll") LoadPlugin("C:\PROGRAM FILES\AVISYNTH 2.5\PLUGINS\REMOVEGRAIN-1_0\removegrain.dll") LoadPlugin("C:\PROGRAM FILES\AVISYNTH 2.5\PLUGINS\REMOVEGRAINT-1_0\repairt.dll") LoadPlugin("C:\PROGRAM FILES\AVISYNTH 2.5\PLUGINS\REMOVEGRAINT-1_0\removegraint.dll") LoadPlugin("C:\PROGRAM FILES\AVISYNTH 2.5\PLUGINS\MVTOOLS-V2_5_11_3\mvtools2.dll") LoadPlugin("C:\PROGRAM FILES\AVISYNTH 2.5\PLUGINS\REMOVEDIRT_20050507\removedirt.dll") LoadPlugin("C:\PROGRAM FILES\AVISYNTH 2.5\PLUGINS\FLUXSMOOTH_25_DLL_20040729\fluxsmooth.dll") LoadPlugin("C:\PROGRAM FILES\AVISYNTH 2.5\PLUGINS\VAGUEDENOISER_25_DLL_20050926\vaguedenoiser.dll") LoadPlugin("C:\PROGRAM FILES\AVISYNTH 2.5\PLUGINS\DEFLICKER_25_DLL_20040816\deflicker.dll") LoadPlugin("C:\PROGRAM FILES\AVISYNTH 2.5\PLUGINS\DESPOT_3_6_1\despot.dll") LoadPlugin("C:\PROGRAM FILES\AVISYNTH 2.5\PLUGINS\MASKTOOLS-V2_0A48\mt_masktools-25.dll") LoadPlugin("C:\PROGRAM FILES\AVISYNTH 2.5\PLUGINS\MASKTOOLS-V1_5_8\masktools.dll") LoadPlugin("C:\PROGRAM FILES\AVISYNTH 2.5\PLUGINS\FFT3DFILTER_20070220\fft3dfilter.dll") LoadPlugin("C:\PROGRAM FILES\AVISYNTH 2.5\PLUGINS\DEPAN_20061128\depan.dll") LoadPlugin("C:\PROGRAM FILES\AVISYNTH 2.5\PLUGINS\DEPAN_20061128\depanestimate.dll") (_use_VDub_ == true) ? LoadVirtualDubPlugin("C:\PROGRAM FILES\VIRTUALDUB 1.9.11\PLUGINS\spotremover.vdf", "SpotRemover", 11) : NOP() function NullClip(clip clp) { return BlankClip(clp, length=0) } # ============================================================================= # # function RemoveSpots(clip clp, int "limit", bool "_grey") { _grey = Default(_grey, false) limit = Default(limit, 16) clmode = 17 clensed = Clense(clp, grey=_grey, cache=4) sbegin = ForwardClense(clp, grey=_grey, cache=-1) send = BackwardClense(clp, grey=_grey, cache=-1) alt = Repair(SCSelect(clp, sbegin, send, clensed, debug=true), clp, mode=limit, modeU = _grey ? -1 : limit) restore = Repair(clensed, clp, mode=limit, modeU = _grey ? -1 : limit) clp = RestoreMotionBlocks(clensed, restore, neighbour=clp, alternative=alt, gmthreshold=70, dist=1, \ dmode=2, debug=false, noise=10, noisy=12, grey=_grey) return clp } function RemoveSpotsMC(clip clp, int "limit", bool "_grey", int "Vectors") { _grey = Default(_grey, false) limit = Default(limit, 16) Vectors = Default(Vectors, 1) Vectors = (Vectors < 1) ? 1 : (Vectors > 3) ? 3 : Vectors super = MSuper(clp, pel=2, sharp=2) bvec3 = (Vectors == 3) ? MAnalyse(super, isb=true, delta=3, blksize=8, overlap=4, truemotion=true) : NullClip(clp) bvec2 = (Vectors >= 2) ? MAnalyse(super, isb=true, delta=2, blksize=8, overlap=4, truemotion=true) : NullClip(clp) bvec1 = MAnalyse(super, isb=true, delta=1, blksize=8, overlap=4, truemotion=true) fvec1 = MAnalyse(super, isb=false, delta=1, blksize=8, overlap=4, truemotion=true) fvec2 = (Vectors >= 2) ? MAnalyse(super, isb=false, delta=2, blksize=8, overlap=4, truemotion=true) : NullClip(clp) fvec3 = (Vectors == 3) ? MAnalyse(super, isb=false, delta=3, blksize=8, overlap=4, truemotion=true) : NullClip(clp) backw3 = (Vectors == 3) ? MFlow(clp, super, bvec3) : NullClip(clp) backw2 = (Vectors >= 2) ? MFlow(clp, super, bvec2) : NullClip(clp) backw1 = MFlow(clp, super, bvec1) forw1 = MFlow(clp, super, fvec1) forw2 = (Vectors >= 2) ? MFlow(clp, super, fvec2) : NullClip(clp) forw3 = (Vectors == 3) ? MFlow(clp, super, fvec3) : NullClip(clp) clp = (Vectors == 1) ? interleave(backw1, clp, forw1) : \ (Vectors == 2) ? interleave(backw2, backw1, clp, forw1, forw2) : \ interleave(backw3, backw2, backw1, clp, forw1, forw2, forw3) clp = RemoveSpots(clp, limit=limit, _grey=_grey) clp = (Vectors == 1) ? SelectEvery(clp, 3, 1) : \ (Vectors == 2) ? SelectEvery(clp, 5, 2) : \ SelectEvery(clp, 7, 3) return clp } # ============================================================================= # # SpotRemover() function VirtualDub # function RemoveSpotsMC2(clip clp, int "type", bool "show", int "Vectors") { # Constant # TypeMax = 4 # Variables # type = Default(type, 1) show = Default(show, false) Vectors = Default(Vectors, 2) type = (type < 1) ? 1 : (type > TypeMax) ? TypeMax : type Vectors = (Vectors < 1) ? 1 : (Vectors > 3) ? 3 : Vectors # create auxialiary smooth clip for easier motion detection # filter = clp.DeFlicker(noise=6).Blur(1.58) # this is for internal use by MVtools functions. MVtools' version must be 2.0 or higher. # super = MSuper(clp, pel=2, sharp=2) superfi = MSuper(filter, pel=2, sharp=2) # calculate the motion vectors # bvec3 = (Vectors == 3) ? MAnalyse(superfi, isb=true, delta=3, blksize=8, overlap=4, search=3, truemotion=true) : NullClip(clp) bvec2 = MAnalyse(superfi, isb=true, delta=2, blksize=8, overlap=4, search=3, truemotion=true) bvec1 = MAnalyse(superfi, isb=true, delta=1, blksize=8, overlap=4, search=3, truemotion=true) fvec1 = MAnalyse(superfi, isb=false, delta=1, blksize=8, overlap=4, search=3, truemotion=true) fvec2 = MAnalyse(superfi, isb=false, delta=2, blksize=8, overlap=4, search=3, truemotion=true) fvec3 = (Vectors == 3) ? MAnalyse(superfi, isb=false, delta=3, blksize=8, overlap=4, search=3, truemotion=true) : NullClip(clp) # create 6 additional clips: two predicted backward and two predicted forward # backw3 = (Vectors == 3) ? MCompensate(clp, super, bvec3) : NullClip(clp) backw2 = (Vectors >= 2) ? MCompensate(clp, super, bvec2) : NullClip(clp) backw1 = MCompensate(clp, super, bvec1) forw1 = MCompensate(clp, super, fvec1) forw2 = (Vectors >= 2) ? MCompensate(clp, super, fvec2) : NullClip(clp) forw3 = (Vectors == 3) ? MCompensate(clp, super, fvec3) : NullClip(clp) # clpdeg = (Vectors <= 2) ? MDegrain2(clp, superfi, bvec1, fvec1, bvec2, fvec2, plane=4, thsad=400) : \ # MDegrain3(clp, superfi, bvec1, fvec1, bvec2, fvec2, bvec3, fvec3, plane=4, thsad=400) clpdeg = clp # combine the 5 frames (2 + 1 + 2), the central one undergoes the degrain filter # combine the 3 frames (1 + 1 + 1), the central one undergoes the degrain filter # combine the 7 frames (3 + 1 + 3), the central one undergoes the degrain filter # clp = (Vectors == 1) ? interleave(backw1, clpdeg, ff1) : \ (Vectors == 2) ? interleave(backw2, backw1, clpdeg, forw1, forw2) : \ interleave(backw3, backw2, backw1, clpdeg, forw1, forw2, forw3) # run SpotRemover over each block of 5 (3, 7) frames # removing spots only, no smoothing # !!! change to DSD:0 to turn the debug mode off # !!! change to DSD:1 to turn the debug mode on # # SSI - Smooth Strength Intensity # SSC - Smooth Strength Color # SKW - Smooth Kernel Width # SLI - Smooth Locking level for Intensity # SLC - Smooth Locking level for Color # SLD - Smooth Locking Debug # DLS - Detect Level for Spot detection # DLC - Detect Level for Clearance # DPC - Detect Perimeter Clearance # DSF - Detect Spot Fullness factor # DSD - Detect Spot Debug # MTX - Motion Table X (columns) # MTY - Motion Table Y (columns) # MTL - Motion Table Level to flag cells # MDX - Motion Distance X # MDY - Motion Distance Y # MIH - Motion Interrupted History # CBR - Color BRightness # CCO - Color COntrast # CSA - Color SAturation # CBA - Color Balance # CSR - Color Shift Red # CSB - Color Shift Blue # FCI - Frame Control Interlaced clp = clp.ConvertToRGB32() clp = (type == 1) ? (show == false) ? \ clp.SpotRemover("SSI:0 SSC:-5 SKW:3 SLI:2 SLC:2 SLD:0 DLS:24 DLC:16 DPC:16 DSF:0 DSD:0 MTX:16 MTY:12 MTL:25 MDX:1 MDY:1 MIH:0", "") : \ clp.SpotRemover("SSI:0 SSC:-5 SKW:3 SLI:2 SLC:2 SLD:0 DLS:24 DLC:16 DPC:16 DSF:0 DSD:1 MTX:16 MTY:12 MTL:25 MDX:1 MDY:1 MIH:0", "") : clp clp = (type == 2) ? (show == false) ? \ clp.SpotRemover("SSI:0 SSC:-5 SKW:3 SLI:2 SLC:2 SLD:0 DLS:24 DLC:15 DPC:14 DSF:1 DSD:0 MTX:16 MTY:12 MTL:22 MDX:1 MDY:1 MIH:0", "") : \ clp.SpotRemover("SSI:0 SSC:-5 SKW:3 SLI:2 SLC:2 SLD:0 DLS:24 DLC:15 DPC:14 DSF:1 DSD:1 MTX:16 MTY:12 MTL:22 MDX:1 MDY:1 MIH:0", "") : clp clp = (type == 3) ? (show == false) ? \ clp.SpotRemover("SSI:0 SSC:-5 SKW:3 SLI:2 SLC:2 SLD:0 DLS:26 DLC:18 DPC:10 DSF:2 DSD:0 MTX:16 MTY:12 MTL:22 MDX:1 MDY:1 MIH:0", "") : \ clp.SpotRemover("SSI:0 SSC:-5 SKW:3 SLI:2 SLC:2 SLD:0 DLS:26 DLC:18 DPC:10 DSF:2 DSD:1 MTX:16 MTY:12 MTL:22 MDX:1 MDY:1 MIH:0", "") : clp clp = (type == 4) ? (show == false) ? \ clp.SpotRemover( "SSI:7 SSC:0 SKW:5 SLI:2 SLC:2 SLD:0 DLS:26 DLC:18 DPC:16 DSF:2 DSD:0 MTX:16 MTY:12 MTL:22 MDX:1 MDY:1 MIH:0", "") : \ clp.SpotRemover( "SSI:7 SSC:0 SKW:5 SLI:2 SLC:2 SLD:0 DLS:26 DLC:18 DPC:16 DSF:2 DSD:1 MTX:16 MTY:12 MTL:22 MDX:1 MDY:1 MIH:0", "") : clp # clp = clp.ConvertBackToYUY2() clp = clp.ConvertToYV12() # discard extra frames, keep only the central one # clp = (Vectors == 1) ? SelectEvery(clp, 3, 1) : \ (Vectors == 2) ? SelectEvery(clp, 5, 2) : \ SelectEvery(clp, 7, 3) # compensate for the SpotRemover lag. We will loose the last frame in the movie, but the audio will be in sync # # clp = clp.Trim(1, 0) # Maybe not needed # enhance the contrast (optional) # # clp = clp.ColorYUV(gain_y=0, off_y=10, gamma_y=0, cont_y=80, cont_u=0, cont_v=0) return clp }
__________________
Warm and fuzzy (white and fluffy) |
5th September 2012, 11:06 | #10 | Link |
Warm and fuzzy
Join Date: Apr 2010
Location: Moscow, Russia
Posts: 201
|
Various RemoveSpots functions...
. Code:
global Width2 = 768 global Height2 = 576 # ============================================================================= # # DeSpot() function # function RemoveSpotsMC3(clip clp, int "Vectors", int "Show") { # Constants # _thSCD1 = 400 Vectors = Default(Vectors, 3) Show = Default(Show, 0) Vectors = (Vectors < 1) ? 1 : (Vectors > 3) ? 3 : Vectors Show = (Show < 0) ? 0 : (Show > 2) ? 2 : Show filter = DeFlicker(clp, border=150, percent=70, lmin=5, lmax=240) super = MSuper(clp, pel=2, sharp=2) superfi = MSuper(filter, pel=2, sharp=2) bvec3 = (Vectors == 3) ? MAnalyse(superfi, isb=true, delta=3, blksize=8, overlap=4, truemotion=true) bvec2 = (Vectors >= 2) ? MAnalyse(superfi, isb=true, delta=2, blksize=8, overlap=4, truemotion=true) bvec1 = MAnalyse(superfi, isb=true, delta=1, blksize=8, overlap=4, truemotion=true) fvec1 = MAnalyse(superfi, isb=false, delta=1, blksize=8, overlap=4, truemotion=true) fvec2 = (Vectors >= 2) ? MAnalyse(superfi, isb=false, delta=2, blksize=8, overlap=4, truemotion=true) fvec3 = (Vectors == 3) ? MAnalyse(superfi, isb=false, delta=3, blksize=8, overlap=4, truemotion=true) backw3 = (Vectors == 3) ? MFlow(clp, super, bvec3, thSCD1=_thSCD1) : NullClip(clp) backw2 = (Vectors >= 2) ? MFlow(clp, super, bvec2, thSCD1=_thSCD1) : NullClip(clp) backw1 = MFlow(clp, super, bvec1, thSCD1=_thSCD1) forw1 = MFlow(clp, super, fvec1, thSCD1=_thSCD1) forw2 = (Vectors >= 2) ? MFlow(clp, super, fvec2, thSCD1=_thSCD1) : NullClip(clp) forw3 = (Vectors == 3) ? MFlow(clp, super, fvec3, thSCD1=_thSCD1) : NullClip(clp) # clpdeg = (Vectors <= 2) ? MDegrain2(clp, superfi, bvec1, fvec1, bvec2, fvec2, plane=4, thsad=400) : \ # MDegrain3(clp, superfi, bvec1, fvec1, bvec2, fvec2, bvec3, fvec3, plane=4, thsad=400) clpdeg = clp clp = (Vectors == 1) ? Interleave(backw1, clpdeg, forw1) : \ (Vectors == 2) ? Interleave(backw2, backw1, clpdeg, forw1, forw2) : \ Interleave(backw3, backw2, backw1, clpdeg, forw1, forw2, forw3) clp = clp.Deflicker(percent=99, lag=5, scene=15, info=false) # ==== большие черные пятна ==== clp = clp.DeSpot(mthres=8, mwidth=7, mheight=5, merode=33, interlaced=false, median=false, p1=15, p2=8, \ pwidth=50, pheight=50, ranked=true, sign=1, maxpts=0, p1percent=10, dilate=1, fitluma=true, \ blur=1, tsmooth=0, show=Show, mark_v=255, motpn=false, seg=2, color=true, mscene=40, minpts=0) # ==== большие белые пятна ==== clp = clp.DeSpot(p1=10, mthres=8, p2=6, mwidth=7, mheight=5, merode=33, interlaced=false, median=false, \ pwidth=100, pheight=100, ranked=true, sign=-1, maxpts=0, p1percent=10, dilate=1, fitluma=true, \ blur=1, tsmooth=0, show=Show, mark_v=255, motpn=false, seg=0, color=true, mscene=40, minpts=0) # ==== маленькие точки и пыль ==== clp = clp.DeSpot(mthres=12, mwidth=7, mheight=5, merode=33, interlaced=false, median=false, p1=15, p2=8, \ pwidth=6, pheight=5, ranked=true, sign=0, maxpts=0, p1percent=10, dilate=1, fitluma=true, \ blur=1, tsmooth=2, show=Show, mark_v=255, motpn=false, seg=1, color=true, mscene=40, minpts=0) clp = clp.DeSpot(mthres=8, mwidth=7, mheight=5, merode=25, interlaced=false, median=false, p1=10, p2=6, \ pwidth=720, pheight=576, ranked=true, sign=2, maxpts=0, p1percent=2, dilate=1, fitluma=true, \ blur=4, tsmooth=4, show=Show, mark_v=255, motpn=false, seg=1, color=true, mscene=40, minpts=0) # ==== Маленькие компактные пятна ==== clp = clp.DeSpot(mthres=12, mwidth=7, mheight=5, merode=25, interlaced=false, median=false, p1=15, p2=8, \ pwidth=10, pheight=10, ranked=true, sign=-1, maxpts=0, p1percent=2, dilate=1, fitluma=true, \ blur=4, tsmooth=4, show=Show, mark_v=255, motpn=false, seg=2, color=true, mscene=40, minpts=0) # ==== линии, входящие в контакт с движением, избегите области движения ==== clp = clp.DeSpot(mthres=13, mwidth=7, mheight=5, merode=16, interlaced=false, median=false, p1=15, p2=13, \ pwidth=140, pheight=100, ranked=true, sign=-1, maxpts=0, p1percent=10, dilate=1, fitluma=true, \ blur=1, tsmooth=0, show=Show, mark_v=255, motpn=false, seg=1, color=true, mscene=40, minpts=0) # ==================================== clp = clp.DeSpot(p1=20, p2=4, pwidth=200, pheight=150, mthres=22, merode=33, sign=2, show=Show, seg=0, color=false, \ motpn=true, fitluma=true, mark_v=255) clp = clp.DeSpot(p1=20, p2=12, pwidth=768, pheight=576, mthres=80, merode=33, sign=0, show=Show, seg=0, color=true, \ motpn=true, mark_v=255) clp = clp.DeSpot(p1=12, p2=22, pwidth=100, pheight=100, mthres=22, merode=25, p1percent=10, sign=0, show=Show, seg=1, \ color=true, motpn=true, mark_v=255) clp = clp.DeSpot(p1=15, p2=1, pwidth=40, pheight=40, mthres=4, merode=25, p1percent=10, sign=0, show=Show, seg=1, \ color=true, motpn=true, mark_v=255) clp = clp.DeSpot(p1=35, p2=11, pwidth=250, pheight=250, mthres=23, merode=40, p1percent=1, sign=1, show=Show, seg=2,\ color=true, motpn=false, minpts=6, dilate=1, mscene=100, fitluma=true, blur=1, mark_v=255) clp = clp.DeSpot(p1=22, p2=5, pwidth=100, pheight=140, mthres=11, merode=58, p1percent=25, sign=1, show=Show, seg=1, \ color=true, motpn=false, minpts=6, maxpts=1200, mwidth=7, mheight=5, dilate=2, mscene=90, fitluma=true, \ blur=2, ranked=true, interlaced=false, mark_v=255) clp = clp.DeSpot(p1=30, p2=22, pwidth=400, pheight=300, mthres=20, merode=33, p1percent=10, sign=1, show=Show, seg=2, \ color=true, motpn=true, mark_v=255) clp = clp.DeSpot(sign=2, pwidth=Width2, pheight=Height2, p1=10, p2=6, mthres=8, tsmooth=4, seg=2, blur=4, p1percent=2, \ show=Show, mark_v=255) clp = clp.DeSpot(p1=30, p2=15, pwidth=Width2, pheight=Height2, mthres=20, motpn=true, dilate=1, seg=1, show=Show, mark_v=255) clp = clp.DeSpot(p1=30, p2=10, mthres=45, pwidth=Width2, pheight=Height2, minpts=10, dilate=0, ranked=true, \ p1percent=5, mscene=98, merode=35, mwidth=20, mheight=10, sign=2, show=Show, seg=0, color=true, \ motpn=true, fitluma=true, blur=1, mark_v=255) clp = clp.DeSpot(p1=25, p2=14, mthres=25, pwidth=Width2, pheight=Height2, minpts=3, dilate=3, p1percent=5, \ mscene=98, merode=35, sign=-2, show=Show, seg=2, color=true, motpn=true, fitluma=true, blur=1, mark_v=255) clp = clp.Despot(p1=28, p2=8, mthres=45, pwidth=850, pheight=850, minpts=10, dilate=0, ranked=true, p1percent=5, mscene=98, \ merode=35, mwidth=20, mheight=10, sign=2, show=Show, seg=0, color=true, motpn=true, fitluma=true, \ blur=1, mark_v=255) clp = clp.Despot(p1=25, p2=14, mthres=25, pwidth=555, pheight=555, minpts=3, dilate=3, p1percent=5, mscene=98, \ merode=35, sign=-2, show=Show, seg=2, color=true, motpn=true, fitluma=true, blur=1, mark_v=255) # big black spots # clp = clp.DeSpot(sign=1, pwidth=45, pheight=45, p1=15, p2=8, mthres=8, color=true, show=Show, mark_v=255) # thin white lines # clp = clp.DeSpot(sign=-1, pwidth=140, pheight=100, p1=8, p2=1, mthres=5, show=Show, mark_v=255) # thick hair lines (avoid real hair) # clp = clp.DeSpot(sign=-1, pwidth=140, pheight=100, p1=15, p2=13, mthres=13, merode=24, show=Show, mark_v=255) # lines contacting motion, avoid motion areas # clp = clp.DeSpot(sign=-1, pwidth=140, pheight=100, p1=15, p2=13, mthres=13, merode=16, seg=1, show=Show, mark_v=255) # small dots and dust # clp = clp.DeSpot(pwidth=6, pheight=5, p1=15, p2=8, mthres=12, tsmooth=2, show=Show, mark_v=255) # Long horizontal scratches # clp = clp.DeSpot(sign=-1, pwidth=100, pheight=2, p1=15, p2=8, mthres=12, color=true, show=Show, mark_v=255) # Small compact spots # clp = clp.DeSpot(sign=-1, pwidth=10, pheight=10, p1=15, p2=8, mthres=12, color=true, show=Show, mark_v=255) clp = (Vectors == 1) ? SelectEvery(clp, 3, 1) : \ (Vectors == 2) ? SelectEvery(clp, 5, 2) : \ SelectEvery(clp, 7, 3) return clp }
__________________
Warm and fuzzy (white and fluffy) |
5th September 2012, 11:06 | #11 | Link |
Warm and fuzzy
Join Date: Apr 2010
Location: Moscow, Russia
Posts: 201
|
Various RemoveSpots functions...
. Code:
# ============================================================================= # # DeSpot() function # function RemoveSpotsMC4(clip clp, int "Vectors", int "Show") { # Constants # _thSCD1 = 400 _ml = 100 Vectors = Default(Vectors, 1) Show = Default(Show, 0) Vectors = (Vectors < 1) ? 1 : (Vectors > 3) ? 3 : Vectors Show = (Show < 0) ? 0 : (Show > 2) ? 2 : Show filter = FFT3Dfilter(clp, sigma=6, plane=4, bw=32, bh=32, ow=8, oh=8, bt=3) super = MSuper(clp, pel=2, sharp=2) superfi = MSuper(filter, pel=2, sharp=2) bvec3 = (Vectors == 3) ? MAnalyse(superfi, isb=true, delta=3, blksize=8, overlap=4, truemotion=true) : NullClip(clp) bvec2 = (Vectors >= 2) ? MAnalyse(superfi, isb=true, delta=2, blksize=8, overlap=4, truemotion=true) : NullClip(clp) bvec1 = MAnalyse(superfi, isb=true, delta=1, blksize=8, overlap=4, truemotion=true) fvec1 = MAnalyse(superfi, isb=false, delta=1, blksize=8, overlap=4, truemotion=true) fvec2 = (Vectors >= 2) ? MAnalyse(superfi, isb=false, delta=2, blksize=8, overlap=4, truemotion=true) : NullClip(clp) fvec3 = (Vectors == 3) ? MAnalyse(superfi, isb=false, delta=3, blksize=8, overlap=4, truemotion=true) : NullClip(clp) backw3 = (Vectors == 3) ? MFlow(clp, super, bvec3, thSCD1=_thSCD1) : NullClip(clp) backw2 = (Vectors >= 2) ? MFlow(clp, super, bvec2, thSCD1=_thSCD1) : NullClip(clp) backw1 = MFlow(clp, super, bvec1, thSCD1=_thSCD1) forw1 = MFlow(clp, super, fvec1, thSCD1=_thSCD1) forw2 = (Vectors >= 2) ? MFlow(clp, super, fvec2, thSCD1=_thSCD1) : NullClip(clp) forw3 = (Vectors == 3) ? MFlow(clp, super, fvec3, thSCD1=_thSCD1) : NullClip(clp) sadb = MMask(clp, bvec1, ml=_ml, gamma=1, kind=1, thSCD1=_thSCD1) sadf = MMask(clp, fvec1, ml=_ml, gamma=1, kind=1, thSCD1=_thSCD1) msadb = MT_Binarize(sadb, 20, upper=true) msadf = MT_Binarize(sadf, 20, upper=true) msad = MT_Logic(msadf, msadb, "or") msad = MT_Expand(msad) msadi = Interleave(msad, msad, msad) clp = (Vectors == 1) ? Interleave(backw1, clp, forw1) : \ (Vectors == 2) ? Interleave(backw2, backw1, clp, forw1, forw2) : \ Interleave(backw3, backw2, backw1, clp, forw1, forw2, forw3) # ==== большие черные пятна ==== clp = clp.DeSpot(mthres=8, mwidth=7, mheight=5, merode=33, interlaced=false, median=false, p1=15, p2=8, \ pwidth=50, pheight=50, ranked=true, sign=1, maxpts=0, p1percent=10, dilate=1, fitluma=true, \ blur=1, tsmooth=0, show=Show, mark_v=255, motpn=false, seg=2, color=true, mscene=40, minpts=0, extmask=msadi) # ==== большие белые пятна ==== clp = clp.DeSpot(p1=10, mthres=8, p2=6, mwidth=7, mheight=5, merode=33, interlaced=false, median=false, \ pwidth=100, pheight=100, ranked=true, sign=-1, maxpts=0, p1percent=10, dilate=1, fitluma=true, \ blur=1, tsmooth=0, show=Show, mark_v=255, motpn=false, seg=0, color=true, mscene=40, minpts=0, extmask=msadi) # ==== толстые линии типа волос (избегают реальных волос) ==== clp = clp.DeSpot(mthres=13, mwidth=7, mheight=5, merode=24, interlaced=false, median=false, p1=15, p2=13, \ pwidth=140, pheight=100, ranked=true, sign=-1, maxpts=0, p1percent=10, dilate=1, fitluma=true, \ blur=1, tsmooth=0, show=Show, mark_v=255, motpn=false, seg=2, color=true, mscene=40, minpts=0, extmask=msadi) # ==== линии, входящие в контакт с движением, избегите области движения ==== clp = clp.DeSpot(mthres=13, mwidth=7, mheight=5, merode=16, interlaced=false, median=false, p1=15, p2=13, \ pwidth=140, pheight=100, ranked=true, sign=-1, maxpts=0, p1percent=10, dilate=1, fitluma=true, \ blur=1, tsmooth=0, show=Show, mark_v=255, motpn=false, seg=1, color=true, mscene=40, minpts=0, extmask=msadi) # ==== маленькие точки и пыль ==== clp = clp.DeSpot(mthres=12, mwidth=7, mheight=5, merode=33, interlaced=false, median=false, p1=15, p2=8, \ pwidth=6, pheight=5, ranked=true, sign=0, maxpts=0, p1percent=10, dilate=1, fitluma=true, \ blur=1, tsmooth=2, show=Show, mark_v=255, motpn=false, seg=1, color=true, mscene=40, minpts=0, extmask=msadi) clp = clp.DeSpot(mthres=8, mwidth=7, mheight=5, merode=25, interlaced=false, median=false, p1=10, p2=6, \ pwidth=720, pheight=576, ranked=true, sign=2, maxpts=0, p1percent=2, dilate=1, fitluma=true, \ blur=4, tsmooth=4, show=Show, mark_v=255, motpn=false, seg=1, color=true, mscene=40, minpts=0, extmask=msadi) # ==== Длинные горизонтальные затиры ==== clp = clp.DeSpot(mthres=12, mwidth=7, mheight=5, merode=25, interlaced=false, median=false, p1=15, p2=8, \ pwidth=100, pheight=2, ranked=true, sign=-1, maxpts=0, p1percent=2, dilate=1, fitluma=true, \ blur=4, tsmooth=4, show=Show, mark_v=255, motpn=false, seg=2, color=true, mscene=40, minpts=0, extmask=msadi) # ==== Маленькие компактные пятна ==== clp = clp.DeSpot(mthres=12, mwidth=7, mheight=5, merode=25, interlaced=false, median=false, p1=15, p2=8, \ pwidth=10, pheight=10, ranked=true, sign=-1, maxpts=0, p1percent=2, dilate=1, fitluma=true, \ blur=4, tsmooth=4, show=Show, mark_v=255, motpn=false, seg=2, color=true, mscene=40, minpts=0, extmask=msadi) # ==================================== clp = clp.DeSpot(p1=20, p2=4, pwidth=200, pheight=150, mthres=22, merode=33, sign=2, show=Show, seg=0, color=false, \ motpn=true, fitluma=true, extmask=msadi) clp = clp.DeSpot(p1=20, p2=12, pwidth=768, pheight=576, mthres=80, merode=33, sign=0, show=Show, seg=0, color=true, \ motpn=true, extmask=msadi) clp = clp.DeSpot(p1=12, p2=22, pwidth=100, pheight=100, mthres=22, merode=25, p1percent=10, sign=0, show=Show, seg=1, \ color=true, motpn=true, extmask=msadi) clp = clp.DeSpot(p1=15, p2=1, pwidth=40, pheight=40, mthres=4, merode=25, p1percent=10, sign=0, show=Show, seg=1, \ color=true, motpn=true, extmask=msadi) clp = clp.DeSpot(p1=35, p2=11, pwidth=250, pheight=250, mthres=23, merode=40, p1percent=1, sign=1, show=Show, seg=2,\ color=true, motpn=false, minpts=6, dilate=1, mscene=100, fitluma=true, blur=1, extmask=msadi) clp = clp.DeSpot(p1=22, p2=5, pwidth=100, pheight=140, mthres=11, merode=58, p1percent=25, sign=1, show=Show, seg=1, \ color=true, motpn=false, minpts=6, maxpts=1200, mwidth=7, mheight=5, dilate=2, mscene=90, fitluma=true, \ blur=2, ranked=true, interlaced=false, extmask=msadi) clp = clp.DeSpot(p1=30, p2=22, pwidth=400, pheight=300, mthres=20, merode=33, p1percent=10, sign=1, show=Show, seg=2, \ color=true, motpn=true, extmask=msadi) clp = clp.DeSpot(sign=2, pwidth=Width2, pheight=Height2, p1=10, p2=6, mthres=8, tsmooth=4, seg=2, blur=4, p1percent=2, \ show=Show, extmask=msadi) clp = clp.DeSpot(p1=30, p2=15, pwidth=Width2, pheight=Height2, mthres=20, motpn=true, dilate=1, seg=1, show=Show, \ extmask=msadi) clp = clp.DeSpot(p1=30, p2=10, mthres=45, pwidth=Width2, pheight=Height2, minpts=10, dilate=0, ranked=true, \ p1percent=5, mscene=98, merode=35, mwidth=20, mheight=10, sign=2, show=Show, seg=0, color=true, \ motpn=true, fitluma=true, blur=1, extmask=msadi) clp = clp.DeSpot(p1=25, p2=14, mthres=25, pwidth=Width2, pheight=Height2, minpts=3, dilate=3, p1percent=5, \ mscene=98, merode=35, sign=-2, show=Show, seg=2, color=true, motpn=true, fitluma=true, blur=1, \ extmask=msadi) clp = clp.Despot(p1=28, p2=8, mthres=45, pwidth=850, pheight=850, minpts=10, dilate=0, ranked=true, p1percent=5, mscene=98, \ merode=35, mwidth=20, mheight=10, sign=2, show=Show, seg=0, color=true, motpn=true, fitluma=true, blur=1, \ mark_v=255, extmask=msadi) clp = clp.Despot(p1=25, p2=14, mthres=25, pwidth=555, pheight=555, minpts=3, dilate=3, p1percent=5, mscene=98, \ merode=35, sign=-2, show=Show, seg=2, color=true, motpn=true, fitluma=true, blur=1, mark_v=255, \ extmask=msadi) # big black spots # clp = clp.DeSpot(sign=1, pwidth=45, pheight=45, p1=15, p2=8, mthres=8, color=true, show=Show, extmask=msadi) # thin white lines # clp = clp.DeSpot(sign=-1, pwidth=140, pheight=100, p1=8, p2=1, mthres=5, show=Show, extmask=msadi) # thick hair lines (avoid real hair) # clp = clp.DeSpot(sign=-1, pwidth=140, pheight=100, p1=15, p2=13, mthres=13, merode=24, show=Show, extmask=msadi) # lines contacting motion, avoid motion areas # clp = clp.DeSpot(sign=-1, pwidth=140, pheight=100, p1=15, p2=13, mthres=13, merode=16, seg=1, show=Show, extmask=msadi) # small dots and dust # clp = clp.DeSpot(pwidth=6, pheight=5, p1=15, p2=8, mthres=12, tsmooth=2, show=Show, extmask=msadi) # Long horizontal scratches # clp = clp.DeSpot(sign=-1, pwidth=100, pheight=2, p1=15, p2=8, mthres=12, color=true, show=Show, extmask=msadi) # Small compact spots # clp = clp.DeSpot(sign=-1, pwidth=10, pheight=10, p1=15, p2=8, mthres=12, color=true, show=Show, extmask=msadi) clp = (Vectors == 1) ? SelectEvery(clp, 3, 1) : \ (Vectors == 2) ? SelectEvery(clp, 5, 2) : \ SelectEvery(clp, 7, 3) return clp }
__________________
Warm and fuzzy (white and fluffy) |
5th September 2012, 11:07 | #12 | Link |
Warm and fuzzy
Join Date: Apr 2010
Location: Moscow, Russia
Posts: 201
|
Various RemoveSpots functions...
. Code:
# ============================================================================= # # DeSpot() function # function RemoveSpotsMC5(clip clp, int "Vectors", int "Show") { Vectors = Default(Vectors, 1) Show = Default(Show, 0) Vectors = (Vectors < 1) ? 1 : (Vectors > 3) ? 3 : Vectors Show = (Show < 0) ? 0 : (Show > 2) ? 2 : Show d = clp.DePanEstimate(trust=3, range=1) clp = clp.DePanInterleave(data=d, prev=Vectors, next=Vectors) # ==== большие черные пятна ==== clp = clp.DeSpot(mthres=8, mwidth=7, mheight=5, merode=33, interlaced=false, median=false, p1=15, p2=8, \ pwidth=50, pheight=50, ranked=true, sign=1, maxpts=0, p1percent=10, dilate=1, fitluma=true, \ blur=1, tsmooth=0, show=Show, mark_v=255, motpn=false, seg=2, color=true, mscene=40, minpts=0) # ==== большие белые пятна ==== clp = clp.DeSpot(p1=10, mthres=8, p2=6, mwidth=7, mheight=5, merode=33, interlaced=false, median=false, \ pwidth=100, pheight=100, ranked=true, sign=-1, maxpts=0, p1percent=10, dilate=1, fitluma=true, \ blur=1, tsmooth=0, show=Show, mark_v=255, motpn=false, seg=0, color=true, mscene=40, minpts=0) # ==== маленькие точки и пыль ==== clp = clp.DeSpot(mthres=12, mwidth=7, mheight=5, merode=33, interlaced=false, median=false, p1=15, p2=8, \ pwidth=6, pheight=5, ranked=true, sign=0, maxpts=0, p1percent=10, dilate=1, fitluma=true, \ blur=1, tsmooth=2, show=Show, mark_v=255, motpn=false, seg=1, color=true, mscene=40, minpts=0) clp = clp.DeSpot(mthres=8, mwidth=7, mheight=5, merode=25, interlaced=false, median=false, p1=10, p2=6, \ pwidth=720, pheight=576, ranked=true, sign=2, maxpts=0, p1percent=2, dilate=1, fitluma=true, \ blur=4, tsmooth=4, show=Show, mark_v=255, motpn=false, seg=1, color=true, mscene=40, minpts=0) # ==== Маленькие компактные пятна ==== clp = clp.DeSpot(mthres=12, mwidth=7, mheight=5, merode=25, interlaced=false, median=false, p1=15, p2=8, \ pwidth=10, pheight=10, ranked=true, sign=-1, maxpts=0, p1percent=2, dilate=1, fitluma=true, \ blur=4, tsmooth=4, show=Show, mark_v=255, motpn=false, seg=2, color=true, mscene=40, minpts=0) # ==== линии, входящие в контакт с движением, избегите области движения ==== clp = clp.DeSpot(mthres=13, mwidth=7, mheight=5, merode=16, interlaced=false, median=false, p1=15, p2=13, \ pwidth=140, pheight=100, ranked=true, sign=-1, maxpts=0, p1percent=10, dilate=1, fitluma=true, \ blur=1, tsmooth=0, show=Show, mark_v=255, motpn=false, seg=1, color=true, mscene=40, minpts=0) # ==================================== clp = clp.DeSpot(p1=20, p2=4, pwidth=200, pheight=150, mthres=22, merode=33, sign=2, show=Show, seg=0, color=false, \ motpn=true, fitluma=true, mark_v=255) clp = clp.DeSpot(p1=20, p2=12, pwidth=768, pheight=576, mthres=80, merode=33, sign=0, show=Show, seg=0, color=true, \ motpn=true, mark_v=255) clp = clp.DeSpot(p1=12, p2=22, pwidth=100, pheight=100, mthres=22, merode=25, p1percent=10, sign=0, show=Show, seg=1, \ color=true, motpn=true, mark_v=255) clp = clp.DeSpot(p1=15, p2=1, pwidth=40, pheight=40, mthres=4, merode=25, p1percent=10, sign=0, show=Show, seg=1, \ color=true, motpn=true, mark_v=255) clp = clp.DeSpot(p1=35, p2=11, pwidth=250, pheight=250, mthres=23, merode=40, p1percent=1, sign=1, show=Show, seg=2,\ color=true, motpn=false, minpts=6, dilate=1, mscene=100, fitluma=true, blur=1, mark_v=255) clp = clp.DeSpot(p1=22, p2=5, pwidth=100, pheight=140, mthres=11, merode=58, p1percent=25, sign=1, show=Show, seg=1, \ color=true, motpn=false, minpts=6, maxpts=1200, mwidth=7, mheight=5, dilate=2, mscene=90, fitluma=true, \ blur=2, ranked=true, interlaced=false, mark_v=255) clp = clp.DeSpot(p1=30, p2=22, pwidth=400, pheight=300, mthres=20, merode=33, p1percent=10, sign=1, show=Show, seg=2, \ color=true, motpn=true, mark_v=255) clp = clp.DeSpot(sign=2, pwidth=Width2, pheight=Height2, p1=10, p2=6, mthres=8, tsmooth=4, seg=2, blur=4, p1percent=2, \ show=Show) clp = clp.DeSpot(p1=30, p2=15, pwidth=Width2, pheight=Height2, mthres=20, motpn=true, dilate=1, seg=1, show=Show) clp = clp.DeSpot(sign=2, pwidth=Width2, pheight=Height2, p1=10, p2=6, mthres=8, tsmooth=4, seg=2, blur=4, p1percent=2, \ show=Show, mark_v=255) clp = clp.DeSpot(p1=30, p2=15, pwidth=Width2, pheight=Height2, mthres=20, motpn=true, dilate=1, seg=1, show=Show, mark_v=255) clp = clp.DeSpot(p1=30, p2=10, mthres=45, pwidth=Width2, pheight=Height2, minpts=10, dilate=0, ranked=true, \ p1percent=5, mscene=98, merode=35, mwidth=20, mheight=10, sign=2, show=Show, seg=0, color=true, \ motpn=true, fitluma=true, blur=1, mark_v=255) clp = clp.DeSpot(p1=25, p2=14, mthres=25, pwidth=Width2, pheight=Height2, minpts=3, dilate=3, p1percent=5, \ mscene=98, merode=35, sign=-2, show=Show, seg=2, color=true, motpn=true, fitluma=true, blur=1, mark_v=255) clp = clp.Despot(p1=28, p2=8, mthres=45, pwidth=850, pheight=850, minpts=10, dilate=0, ranked=true, p1percent=5, mscene=98, \ merode=35, mwidth=20, mheight=10, sign=2, show=Show, seg=0, color=true, motpn=true, fitluma=true, blur=1, \ mark_v=255) clp = clp.Despot(p1=25, p2=14, mthres=25, pwidth=555, pheight=555, minpts=3, dilate=3, p1percent=5, mscene=98, \ merode=35, sign=-2, show=Show, seg=2, color=true, motpn=true, fitluma=true, blur=1, mark_v=255) # big black spots # clp = clp.DeSpot(sign=1, pwidth=45, pheight=45, p1=15, p2=8, mthres=8, color=true, show=Show) # thin white lines # clp = clp.DeSpot(sign=-1, pwidth=140, pheight=100, p1=8, p2=1, mthres=5, show=Show) # thick hair lines (avoid real hair) # clp = clp.DeSpot(sign=-1, pwidth=140, pheight=100, p1=15, p2=13, mthres=13, merode=24, show=Show) # lines contacting motion, avoid motion areas # clp = clp.DeSpot(sign=-1, pwidth=140, pheight=100, p1=15, p2=13, mthres=13, merode=16, seg=1, show=Show) # small dots and dust # clp = clp.DeSpot(pwidth=6, pheight=5, p1=15, p2=8, mthres=12, tsmooth=2, show=Show) # Long horizontal scratches # clp = clp.DeSpot(sign=-1, pwidth=100, pheight=2, p1=15, p2=8, mthres=12, color=true, show=Show) # Small compact spots # clp = clp.DeSpot(sign=-1, pwidth=10, pheight=10, p1=15, p2=8, mthres=12, color=true, show=Show) clp = (Vectors == 1) ? SelectEvery(clp, 3, 1) : \ (Vectors == 2) ? SelectEvery(clp, 5, 2) : \ SelectEvery(clp, 7, 3) return clp }
__________________
Warm and fuzzy (white and fluffy) |
Thread Tools | Search this Thread |
Display Modes | |
|
|