BM3DDenoise.bm3d_configType

Some runtime parameters. The default value is after the =

step 1:

bm3d_config.thr_patchSize = CartesianIndex(8, 8)	size of patches;
bm3d_config.thr_searchStride = CartesianIndex(3, 3)	In order to speed up the processing,the loop over the pixels of the imageis done with a stepp(integer) in row and column;
bm3d_config.thr_searchWin = CartesianIndex(19, 19)	search window size;
bm3d_config.thr_nMatch = 31	maximum number of similar patches kept;
bm3d_config.thr_thresh3D = 2.7	3D group hreshold;
bm3d_config.thr_distFunction = Euclidean2	A function that measures the distance between blocks;
bm3d_config.thr_group_transform! = FFTW.dct!	A function that 3D transform in group
bm3d_config.thr_group_itransform! = FFTW.idct!	A function that 3D inverse transform in group;

step2:

bm3d_config.wie_patchSize = CartesianIndex(8, 8)	size of patches;
bm3d_config.wie_searchStride = CartesianIndex(3, 3)	In order to speed up the processing,the loop over the pixels of the imageis done with a stepp(integer) in row and column;
bm3d_config.wie_searchWin = CartesianIndex(11, 11)	search window size;
bm3d_config.wie_nMatch = 15	maximum number of similar patches kept;
bm3d_config.wie_distFunction = Euclidean2	A function that measures the distance between blocks;
bm3d_config.wie_group_transform! = FFTW.dct!	A function that 3D transform in group;
bm3d_config.wie_group_itransform! = FFTW.idct!	A function that 3D inverse transform in group;

others

bm3dconfig.showinfo = false show some running message

note:

The 3D group data struct:

G3D[k, :, :]	# k-th matching block.
size(G3D)	# (nMatch, patchSize[1], patchSize[2])
BM3DDenoise.HardThresholding!Method
HardThresholding!(data::AbstractArray, λ::AbstractFloat)

Hard Thresholding function λ is threshold parameter Return the number of non-zero elements in the array

BM3DDenoise.bm3dFunction
bm3d(img, σ)
bm3d(img, σ, config)
img: input grayscale image(Float32 or Float64 or Gray or YCbCr or RGB)
σ: known or assumed standard deviation of noise
config: see bm3d_config.
return: denoised image
BM3DDenoise.bm3d_thrMethod
bm3d_thr(img::Array{Float64}, sigma::AbstractFloat, config::bm3d_config)

1st step of BM3D denoising: hard thresholding

img: input noisy image sigma: known or assumed standard deviation of noise config: bm3d_config

BM3DDenoise.bm3d_wieMethod
bm3d_wie(img::Array{Float64}, imgBasic::Array{Float64}, sigma::AbstractFloat, config::bm3d_config)

2nd step of BM3DDenoise

img: input noisy image imgBasic: denoised image from first step of BM3D (hard thresholding) sigma: known or assumed standard deviation of noise config: bm3d_config

BM3DDenoise.form_group!Method
form_group!(G3D::AbstractArray{Float64, 3},
		img::AbstractArray{Float64, 2},
		matchTable::Array{CartesianIndex{2}, 3},
		refIndex::Array{CartesianIndex{2},2},
		patchSize::CartesianIndex{2},
		position::CartesianIndex{2},
		group_transform!::Function)

Forward BM3DDenoise groupings

BM3DDenoise.get_reference_pixelsMethod
get_reference_pixels(imgSize::Vector{Int64},
				patchSize::CartesianIndex{2},
				searchStride::CartesianIndex{2})

Get locations of reference pixels, the upper-left corner of each patch.

imgSize - size of input image, including border patchSize - size of patch in pixels searchStride - step in x and y between reference pixels

BM3DDenoise.group_to_image!Method
group_to_image!(img::AbstractArray{Float64, 2},
		G3D::AbstractArray{Float64, 3},
		matchTable::Array{CartesianIndex{2},3},
		refIndex::Array{CartesianIndex{2},2},
		patchSize::CartesianIndex{2},
		position::CartesianIndex{2},
		imgLockPool::Array{ReentrantLock})

group to image

BM3DDenoise.group_to_image!Method
group_to_image!(img::AbstractArray{Float64, 2},
		W::Float64,
		matchTable::Array{CartesianIndex{2},3},
		refIndex::Array{CartesianIndex{2},2},
		patchSize::CartesianIndex{2},
		position::CartesianIndex{2},
		imgLockPool::Array{ReentrantLock})
BM3DDenoise.image_to_group!Method
image_to_group!(img::AbstractArray{Float64, 2},
		G3D::AbstractArray{Float64, 3},
		matchTable::Array{CartesianIndex{2},3},
		refIndex::Array{CartesianIndex{2},2},
		patchSize::CartesianIndex{2},
		position::CartesianIndex{2})
BM3DDenoise.invert_group!Method
invert_group!(img::AbstractArray{Float64, 2},
			G3D::AbstractArray{Float64, 3},
			matchTable::Array{CartesianIndex{2},3},
			refIndex::Array{CartesianIndex{2},2},
			patchSize::CartesianIndex{2},
			position::CartesianIndex{2},
			group_itransform!::Function,
			imgLockPool::Array{ReentrantLock})

Inverse BM3DDenoise groupings

BM3DDenoise.match_patchesMethod
match_patches(img::AbstractArray{Float64},
		refIndex::Array{CartesianIndex{2},2},
		patchSize::CartesianIndex{2},
		searchWindow::CartesianIndex{2},
		nMatch::Int64,
		distF::Function)

Full-search block matching algorithm for BM3DDenoise