Example scripts

Showing 3D Directional Sensitivity

The 3d_dtcwt_directionality.py script in the docs/ directory shows how one may demonstrate the directional sensitivity of the 3D DT-CWT complex subband coefficients. It computes empirically the maximally sensitive directions for each subband and plots them in an interactive figure using matplotlib. A screenshot is reproduced below:

(Source code, png, hires.png, pdf)

_images/3d_dtcwt_directionality.png

There are some points to note about this diagram. Each subband is labeled sich that ‘1’ refers to the first subband, ‘5’ the fifth and so forth. On this diagram the highpasses are all four apart reflecting the fact that, for example, highpasses 2, 3 and 4 are positioned in the other four quadrants of the upper hemisphere reflecting the position of subband 1. There are seven visible subband directions in the +ve quadrant of the hemisphere and hence there are 28 directions in total over all four quadrants.

2D Image Registration

This library includes support for 2D image registration modelled after the 3D algorithm outlined in the paper Efficient Registration of Nonrigid 3-D Bodies. The image-registration.py script in the docs/ directory shows a complete worked example of using the registration API using two sets of source images: a woman playing tennis and some traffic at a road junction.

It will attempt to register two image pairs: a challenging sequence from a video sequence and a sequence from a traffic camera. The result is shown below.

(Source code)

_images/image-registration_00.png

(png, hires.png, pdf)

_images/image-registration_01.png

(png, hires.png, pdf)