Enhancing Diffusion's on 2D Images

LeftInvariantDerivatives[os, derivativeIndex]computes the left-invariant derivatives from os (ObjPositionOrientationData)using a finite differences method.
LeftInvariantDerivatives[os,{σs,σo},derivativeIndex]computes the left-invariant derivatives from os using the Gaussian scales σs and σo
OrientationScoreTensor[os,derivativeIndex]construct tensor derivativeIndex from os using the defined Gaussian σs and σo
OrientationScoreTensor[os,{σs,σo},derivativeIndex]construct tensor derivativeIndex from os using a finite differences method
OrientationScoreGaugeFrames[os,{σs,σo}]construct Gauge frames from os usins the Gaussian scales σs and σo
OrientationScoreTransform[data]constructs an orientation score from data

Functions used for enhancing diffusion's.

Load the package
In[1]:=
Click for copyable input
Set example data
In[2]:=
Click for copyable input
Generate some noise
In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input

Left Invariant Hypo-elliptic Diffusion

Initialization

Construct orientation scores
In[126]:=
Click for copyable input
Out[126]=
The effective parameters (based on the grid size)
In[127]:=
Click for copyable input
Out[129]=
The diffusion constants relative to the ξ-normalized geometry
In[130]:=
Click for copyable input
Out[130]=
The corresponding diffusion time (to reach the desired standard deviations)
In[131]:=
Click for copyable input

Perform Diffusion in the Left-Invariant Frame

Function to compute left-invariant finite differences gradient
In[134]:=
Click for copyable input
Perform diffusion with update step (u=u+dt*div(Mξ-1.D.Mξ-1.u)), note that the M_xi are due to the intrinsic geometry
In[135]:=
Click for copyable input
Out[137]=
Show result
In[138]:=
Click for copyable input
Out[138]=

Gauge Frames CEDOS

Initialization

Settings
In[139]:=
Click for copyable input

Compute Gauge Frames

Compute left-invariant Hessian
In[147]:=
Click for copyable input
Out[147]=
Compute Gauge frames
In[148]:=
Click for copyable input
Out[148]=
Perform ξ conversion to match
In[149]:=
Click for copyable input
In[150]:=
Click for copyable input
Function for converting the tensor (in left-invariant frame)
In[151]:=
Click for copyable input
Compute the tensor in the gauge frame and compute the orientation confidence (Laplacian in plane perpendicular to the main direction)
In[152]:=
Click for copyable input
Out[154]=
Adaptive diffusion constants

Perform Diffusion along the Gauge Frames

Eq. (72) Franken Duits IJCV
In[155]:=
Click for copyable input
In[156]:=
Click for copyable input
Helper function for computing the divergence of an orientation score object
In[158]:=
Click for copyable input
Perform diffusion with TschumperléDeriche trace based update step (update via the Hessian)
In[159]:=
Click for copyable input
Out[161]=
In[162]:=
Click for copyable input
Out[162]=

Left Invariant CEDOS

Left Invariant CEDOS
In[163]:=
Click for copyable input
Out[165]=
Show results
In[167]:=
Click for copyable input
Out[167]=