File: examples.rst

package info (click to toggle)
python-dtcwt 0.12.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 8,404 kB
  • sloc: python: 6,253; sh: 29; makefile: 13
file content (43 lines) | stat: -rw-r--r-- 1,870 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Example scripts
===============

.. _3d-directional-example:

Showing 3D Directional Sensitivity
----------------------------------

The :download:`3d_dtcwt_directionality.py<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:

.. plot:: 3d_dtcwt_directionality.py
    :class: align-center

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 :download:`image-registration.py<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.

.. _Efficient Registration of Nonrigid 3-D Bodies: http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=5936113

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.

.. plot:: image-registration.py
    :class: align-center