Registration Functions
In this example page I will show how to work with the registration algorithms lap
, pflap
, sparse_lap
and sparse_pflap
.
I will generate some images to show the workings and function calls.
# using the package
using LAP_julia;
# default arguments:
img, imgw, flow = gen_init();
See the Basic Interaction
section or the Public Documentation
for more advanced input generation
These are the differences between the target
(img
) and source
(imgw
) images.
imgoverlay(img, imgw, figtitle="Target vs Source")
Full LAP Methods
These functions are from the algorithms from the paper Local All-Pass Geometric Deformations.
lap
function
# set a filter half size, which is larger than the default max displacement: 10 used in gen_init
fhs = 15;
flow_est, source_reg = lap(img, imgw, fhs);
This gives us a estimation of the flow and the registered source image
This is what the registered source image looks like:
imgoverlay(img, source_reg, figtitle="lap: Target vs Registered Source")
pflap
function
flow_est, source_reg = pflap(img, imgw, display=false);
This gives us a estimation of the flow and the registered source image
This is what the registered source image looks like:
imgoverlay(img, source_reg, figtitle="pflap: Target vs Registered Source")
Sparse LAP Methods
These functions are insired by the lap
and pflap
functions. The difference being that the displacement vectors are calculated at points of high gradient and the result is fit into a global deformation.
sparse_lap
function
# set a filter half size, which is larger than the default max displacement: 10 used in gen_init
fhs = 15;
flow_est, source_reg = sparse_lap(img, imgw, fhs, display=false);
This gives us a estimation of the flow and the registered source image
This is what the registered source image looks like:
imgoverlay(img, source_reg, figtitle="sparse lap: Target vs Registered Source")
sparse_pflap
function
flow_est, source_reg = sparse_pflap(img, imgw, display=false);
This gives us a estimation of the flow and the registered source image
This is what the registered source image looks like:
imgoverlay(img, source_reg, figtitle="sparse pflap: Target vs Registered Source")
This page was generated using Literate.jl.