Created
January 3, 2015 03:10
-
-
Save sherbondy/3c533708697e2ad19092 to your computer and use it in GitHub Desktop.
Laplacian Pyramid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# generates a laplacian pyramid decomposition of an image A, with nlevels + 1 residual level | |
function lappyramid(A, nlevels) | |
residual = A | |
pyramid = () | |
for n = 1:nlevels | |
(N, Ns) = impyramid(residual, sizes="both") | |
L = residual - N | |
residual = Ns | |
pyramid = tuple(pyramid..., L) | |
end | |
return tuple(pyramid..., residual) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment