Permalink
Browse files

Fixing the 0.6 version

  • Loading branch information...
arsenal9971 committed Apr 5, 2018
1 parent 05c9bf8 commit a82aa40f85f9b6123f10aaafaaff050c18d68236
Showing with 11,636 additions and 871 deletions.
  1. BIN data_samples/turbulance.jpg
  2. BIN data_samples/turbulance_coarse.png
  3. +809 −0 examples/Geophysics_applications/.ipynb_checkpoints/Turbulance and Shearlets-checkpoint.ipynb
  4. +290 −0 examples/Geophysics_applications/Shearlets 3D Matlab.ipynb
  5. +1,103 −0 examples/Geophysics_applications/Turbulance and Shearlets.ipynb
  6. BIN examples/Geophysics_applications/Turbulance.mp4
  7. +256 −0 examples/Geophysics_applications/curve_info.csv
  8. BIN examples/Geophysics_applications/distribution1.png
  9. BIN examples/Geophysics_applications/distribution2.png
  10. +1,717 −0 examples/Geophysics_applications/moll_inform.ipynb
  11. +1,341 −0 examples/Geophysics_applications/mollification_inform.ipynb
  12. +29 −0 examples/Geophysics_applications/mollification_inform.m
  13. BIN examples/Geophysics_applications/mollification_inform.pdf
  14. BIN examples/Geophysics_applications/non_smooth.png
  15. BIN examples/Geophysics_applications/original.png
  16. +256 −0 examples/Geophysics_applications/psi1.csv
  17. BIN examples/Geophysics_applications/psi1.png
  18. +200 −0 examples/Geophysics_applications/psi1file.csv
  19. BIN examples/Geophysics_applications/psi1file.mat
  20. +256 −0 examples/Geophysics_applications/psi2.csv
  21. BIN examples/Geophysics_applications/psi2.png
  22. +200 −0 examples/Geophysics_applications/psi2file.csv
  23. BIN examples/Geophysics_applications/psi2file.mat
  24. +256 −0 examples/Geophysics_applications/psi3.csv
  25. BIN examples/Geophysics_applications/psi3.png
  26. +200 −0 examples/Geophysics_applications/psi3file.csv
  27. BIN examples/Geophysics_applications/psi3file.mat
  28. +200 −0 examples/Geophysics_applications/psifile1.csv
  29. +200 −0 examples/Geophysics_applications/psifile2.csv
  30. +200 −0 examples/Geophysics_applications/psifile3.csv
  31. BIN examples/Geophysics_applications/smooth.png
  32. +108 −266 examples/Shearlets/.ipynb_checkpoints/Examples of Image Decoding and Recovery-checkpoint.ipynb
  33. +70 −163 examples/Shearlets/.ipynb_checkpoints/Image Denoising-checkpoint.ipynb
  34. +6 −0 examples/Shearlets/.ipynb_checkpoints/Shearlets 3D Matlab-checkpoint.ipynb
  35. +674 −0 examples/Shearlets/.ipynb_checkpoints/Turbulance and Shearlets-checkpoint.ipynb
  36. +1,717 −0 examples/Shearlets/.ipynb_checkpoints/moll_inform-checkpoint.ipynb
  37. +1,301 −0 examples/Shearlets/.ipynb_checkpoints/mollification_inform-checkpoint.ipynb
  38. +109 −267 examples/Shearlets/Examples of Image Decoding and Recovery.ipynb
  39. +70 −163 examples/Shearlets/Image Denoising.ipynb
  40. +3 −3 examples/Shearlets/Image Inpainting.ipynb
  41. BIN examples/Shearlets/Images_deconvolution/psi1.png
  42. BIN examples/Shearlets/Images_deconvolution/psi1_decay.png
  43. BIN examples/Shearlets/Images_deconvolution/psi1_shear1.png
  44. BIN examples/Shearlets/Images_deconvolution/psi2.png
  45. BIN examples/Shearlets/Images_deconvolution/psi2_decay.png
  46. BIN examples/Shearlets/Images_deconvolution/psi2_shear1.png
  47. BIN examples/Shearlets/Images_deconvolution/psi3.png
  48. BIN examples/Shearlets/Images_deconvolution/psi3_decay.png
  49. BIN examples/Shearlets/Images_deconvolution/psi3_scaling.png
  50. BIN examples/Shearlets/Images_deconvolution/psi3_shear1.png
  51. +6 −2 examples/Wavelets/.ipynb_checkpoints/Example Daubechies-checkpoint.ipynb
  52. +3 −3 src/2D/getshearlets2D.jl
  53. +52 −0 src/2D/shearletdecrec2D.jl
  54. +4 −4 src/fast_wavelet/imaging.jl
View
Binary file not shown.
View
Binary file not shown.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
Binary file not shown.

Large diffs are not rendered by default.

Oops, something went wrong.
Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,29 @@
% Lets load the data
load psi1file
load psi2file
load psi3file
scales = 4
% Lets compute the shearlet transform from the first file data
%%load data
X = psi1;
%%create shearlets
shearletSystem = SLgetShearletSystem2D(0,size(X,1),size(X,2),scales);
%%decomposition
coeffs = SLsheardec2D(X,shearletSystem);
% save it to a csv file
csvwrite('psifile1.csv',psi1)
csvwrite('psifile2.csv',psi2)
csvwrite('psifile3.csv',psi3)
imwrite(psi1,'psi1.png')
imwrite(psi2, 'psi2.png')
imwrite(psi3, 'psi3.png')
Binary file not shown.
Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Oops, something went wrong.
View
Binary file not shown.

Large diffs are not rendered by default.

Oops, something went wrong.
Binary file not shown.

Large diffs are not rendered by default.

Oops, something went wrong.
View
Binary file not shown.

Large diffs are not rendered by default.

Oops, something went wrong.
Binary file not shown.

Large diffs are not rendered by default.

Oops, something went wrong.
View
Binary file not shown.

Large diffs are not rendered by default.

Oops, something went wrong.
Binary file not shown.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
Binary file not shown.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,6 @@
{
"cells": [],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 2
}

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -870,15 +870,15 @@
],
"metadata": {
"kernelspec": {
"display_name": "Julia 0.5.0",
"display_name": "Julia 0.6.0",
"language": "julia",
"name": "julia-0.5"
"name": "julia-0.6"
},
"language_info": {
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "0.5.0"
"version": "0.6.0"
}
},
"nbformat": 4,
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -106,7 +106,9 @@
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [
{
@@ -1490,7 +1492,9 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
"collapsed": true,
"deletable": true,
"editable": true
},
"outputs": [],
"source": []
View
@@ -60,13 +60,13 @@ function getwedgebandpasslowpassfilters2D(rows::Int,cols::Int,shearLevels,direct
# Lets compute the filters in the other scales
for j = (size(filterHigh)[2]-1):-1:1
filterLow[j] = convolve(filterLow[size(filterLow,2)],upsample(filterLow[j+1],1,1,1))
filterHigh[j] = convolve(filterLow[size(filterLow,2)],upsample(filterHigh[j+1],1,1,1))
filterLow[j] = conv2(filterLow[size(filterLow,2)],upsample(filterLow[j+1],1,1,1))
filterHigh[j] = conv(filterLow[size(filterLow,2)],upsample(filterHigh[j+1],1,1,1))
end
# Lets compute the filters in the other scales
for j=(size(filterLow2)[2]-1):-1:1
filterLow2[j] = convolve(filterLow2[size(filterLow2,2)],upsample(filterLow2[j+1],1,1,1))
filterLow2[j] = conv(filterLow2[size(filterLow2,2)],upsample(filterLow2[j+1],1,1,1))
end
# Construct the bandpassfilter
# Need to convert first to complex array since
View
@@ -50,3 +50,55 @@ function shearrec2D(coeffs,shearletSystem)
end
return real(fftshift(ifft(ifftshift((1./shearletSystem.dualFrameWeights).*X))))
end# shearrec2D
##############################################################################
## Function that compute the array of the adjoint Shearlet Transform of
## some coefficients matrix
"""
...
sheardecadjoint2D(coeffs,shearletSystem) compute the adjoint of the decomposition operator
...
"""
function sheardecadjoint2D(coeffs,shearletSystem)
# Initialize reconstructed data
gpu = shearletSystem.gpu;
if gpu == 1
X = AFArray(zeros(Complex{Float32},size(coeffs,1),size(coeffs,2)));
else
X = zeros(Complex{Float64},size(coeffs,1),size(coeffs,2));
end
for j = 1:shearletSystem.nShearlets
X = X+fftshift(fft(ifftshift(coeffs[:,:,j]))).*conj(shearletSystem.shearlets[:,:,j]);
end
return real(fftshift(ifft(ifftshift((1./shearletSystem.dualFrameWeights).*X))))
end # sheardecadjoint2D
##########################################################################################
## Function that compute the coefficient matrix of the adjoint inverse Shearlet Transform of
## some array
"""
...
shearrecadjoint2D(X,shearletSystem) compute the coefficient matrix of the adjoint inverse Shearlet
transform of the array X
...
"""
function sheardec2D(X,shearletSystem)
#Read the GPU info of the system
gpu = shearletSystem.gpu;
if gpu == 1
coeffs = AFArray(zeros(Complex{Float32},size(shearletSystem.shearlets)));
else
coeffs = zeros(Complex{Float64},size(shearletSystem.shearlets));
end
# The fourier transform of X
Xfreq = fftshift(fft(ifftshift(X)));
#compute shearlet coefficients at each scale
#not that pointwise multiplication in the fourier domain equals convolution
#in the time-domain
for j = 1:shearletSystem.nShearlets
coeffs[:,:,j] = fftshift(ifft(ifftshift(Xfreq.*shearletSystem.shearlets[:,:,j])));
end
return coeffs
end # shearrecadjoint2D
@@ -14,8 +14,8 @@ function resize_image(f, N)
g = cat(1, g, reshape(g[1,:,:],1,size(g,2),size(g,3)));
# interpolate
t = linspace(1,P,N);
ti = round(Int64,floor(t)) ; tj = round(Int64,ceil.(t));
fi = round(Int64,t-floor(t)); fj = 1-fi;
ti = round.(Int64,floor.(t)) ; tj = round.(Int64,ceil.(t));
fi = round.(Int64,t-floor.(t)); fj = 1-fi;
h = zeros(N,N,size(f,3));
for s in 1:size(f,3)
h[:,:,s] = g[ti,ti,s] .* (fj*fj') + g[tj,tj,s] .* (fi*fi') + g[ti,tj,s] .* (fj*fi') + g[tj,ti,s] .* (fi*fj');
@@ -42,7 +42,7 @@ function load_image(name,n, m = n, gpu=0,square = 0 )
# Size in y
if m == n
if square == 0
m1 = round(Int64,n*old_size[2]/old_size[1])
m1 = round.(Int64,n*old_size[2]/old_size[1])
else
m1 = n
end
@@ -131,7 +131,7 @@ minimum scale
"""
function plot_wavelet(fW, Jmin=0)
n = size(fW,1);
Jmax = round(Int64,log2(n)) - 1;
Jmax = round.(Int64,log2(n)) - 1;
U = copy(fW);
for j = Jmax:-1:Jmin
L = 1:2^j; H = (2^j)+1:2^(j+1);

0 comments on commit a82aa40

Please sign in to comment.