Skip to content

Commit

Permalink
BM3D: fixed the mistake that bm3d.Basic/bm3d.VBasic is used for final…
Browse files Browse the repository at this point in the history
… estimate

copy-paste mistakes...
also the radius used for final estimate should be radius2
  • Loading branch information
mawen1250 committed Nov 20, 2015
1 parent 69a366f commit 1e20b50
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mvsfunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -962,17 +962,17 @@ def BM3D(input, sigma=None, radius1=None, radius2=None, profile1=None, profile2=

# Final estimate
for i in range(0, refine):
if radius1 < 1:
if radius2 < 1:
# Apply BM3D final estimate
flt = core.bm3d.Basic(clip, ref=flt, profile=profile2, sigma=sigma, \
flt = core.bm3d.Final(clip, ref=flt, profile=profile2, sigma=sigma, \
block_size=block_size2, block_step=block_step2, group_size=group_size2, \
bm_range=bm_range2, bm_step=bm_step2, th_mse=th_mse2, matrix=100)
else:
# Apply V-BM3D final estimate
flt = core.bm3d.VBasic(clip, ref=flt, profile=profile2, sigma=sigma, radius=radius2, \
flt = core.bm3d.VFinal(clip, ref=flt, profile=profile2, sigma=sigma, radius=radius2, \
block_size=block_size2, block_step=block_step2, group_size=group_size2, \
bm_range=bm_range2, bm_step=bm_step2, ps_num=ps_num2, ps_range=ps_range2, ps_step=ps_step2, \
th_mse=th_mse2, matrix=100).bm3d.VAggregate(radius=radius1, sample=pSType)
th_mse=th_mse2, matrix=100).bm3d.VAggregate(radius=radius2, sample=pSType)
# Shuffle Y plane back if not processed
if not onlyY and sigma[0] <= 0:
flt = core.std.ShufflePlanes([clip,flt,flt], [0,1,2], vs.YUV)
Expand Down

0 comments on commit 1e20b50

Please sign in to comment.